--- Log opened Mon Jan 30 00:00:03 2012 |
00:04 | | You're now known as TheWatcher[T-2] |
00:04 | <@maoranma> | You making a bot? |
00:05 | <@TheWatcher[T-2]> | No |
00:05 | | * ToxicFrog gnaws on Felt |
00:05 | <@ToxicFrog> | I'm design-blocked again :/ |
00:05 | <@TheWatcher[T-2]> | Hooking my irssi setup directly into a database for logging (which has some bot features on the side for other things) |
00:09 | | You're now known as TheWatcher[zZzZ] |
00:13 | <@ToxicFrog> | I keep going back and forth on where the responsibility for being picked up should lie. |
00:13 | <@Eri> | It should lie with the woman, because everyone always laughs at my attempts to pick people up. |
00:17 | <@ToxicFrog> | A compelling argument; if only we were talking about dating and not a board game simulator. |
00:20 | <@Eri> | Ah. |
00:26 | <@Eri> | Hey, did anyone take part int he global game jam, this weekend? |
00:26 | <@Eri> | *in the |
00:27 | <@ToxicFrog> | There was a global game jam? |
00:28 | <@Eri> | I thought so. I had midterms to study for, but I popped into the comp lab at school for a couple minutes. |
00:28 | <@Eri> | There wasn't any pizza left, so I went back downstairs |
00:30 | | cpux [cpux@Nightstar-c5874a39.dyn.optonline.net] has joined #code |
01:03 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [[NS] Quit: Z?] |
01:07 | | Netsplit *.net <-> *.split quits: @iospace, @ShellNinja, @Attilla, @simon_, @Vornicus, @froztbyte, @Reiver, cpux, @Tarinaky, @eckse, (+12 more, use /NETSPLIT to show all of them) |
01:07 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Ping timeout: 121 seconds] |
--- Log closed Mon Jan 30 01:08:09 2012 |
--- Log opened Mon Jan 30 01:08:21 2012 |
01:08 | | TheWatcher[zZzZ] [chris@Nightstar-3762b576.co.uk] has joined #code |
01:08 | | Irssi: #code: Total of 28 nicks [21 ops, 0 halfops, 0 voices, 7 normal] |
01:08 | | mode/#code [+o TheWatcher[zZzZ]] by ChanServ |
01:08 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 122 seconds] |
01:09 | | Irssi: Join to #code was synced in 44 secs |
01:09 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
01:09 | | mode/#code [+o himi] by ChanServ |
01:24 | | Kindamoody[zZz] is now known as Kindamoody |
02:06 | <&McMartin> | Man, ML constructors are so great |
02:07 | | * McMartin throws together most of an IR for Pascal in about ten minutes. |
02:15 | <&McMartin> | http://pastebin.ubuntu.com/822105/ |
02:16 | <@ToxicFrog> | So basically the IR definition is the CFG~ |
02:16 | <@ToxicFrog> | That's pretty sweet. |
02:16 | <&McMartin> | I'm building this out of a CFG, yeah |
02:16 | <&McMartin> | (Haskell stole its enumerated type mechanism from ML, and rightly so) |
02:17 | <&McMartin> | The CFG has a lot more productions to handle precedence, etc. |
02:17 | <&McMartin> | I'm going to see if I can't trivially transform it into something ocamlyacc can understand. |
02:18 | <&McMartin> | Subtleties: Mutually recursive types need to be defined together (joined with 'and'...) |
02:18 | <&McMartin> | The actual type and top-level structural items are going to need to be records, I think. |
02:18 | <&McMartin> | I kind of forget how to do those cleanly~ |
02:19 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Connection closed] |
02:19 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
02:19 | | mode/#code [+ao Derakon Derakon] by ChanServ |
02:20 | | * ToxicFrog goes back and forth and back and forth and back and forth on whether Pickupable should be a trait or a class |
02:22 | <&Derakon> | What are the arguments for making it a class? |
02:23 | <&Derakon> | Personally I would go for making it an interface. |
02:25 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
02:26 | <&Derakon> | Or, if you think that everything will want to do the same thing when picked up, make it a superclass that everything inherits from. |
02:26 | <&Derakon> | Only make it a property if you want to impose the picking up / dropping from outside. |
02:31 | <@ToxicFrog> | ...I wasn't ever considering making it a property |
02:32 | <@ToxicFrog> | And this is a duck-typed language, so interfaces aren't terrible useful, while traits are. |
02:32 | <@ToxicFrog> | (the argument for making it a class is that it doesn't require me to write support for traits into the object system~) |
02:32 | <&Derakon> | Okay, what does "trait" mean then? |
02:33 | <@ToxicFrog> | Aka mixin? |
02:33 | <@ToxicFrog> | It's like an interface, but carries method definitions with it. |
02:34 | <&Derakon> | So...like self.pickUpFunc = externallyDefinedFunction? |
02:34 | <&Derakon> | I'm kind of surprised I haven't heard of this design method before. |
02:36 | <@ToxicFrog> | http://en.wikipedia.org/wiki/Mixin |
02:36 | <@ToxicFrog> | Scala, Smalltalk and Ruby have them, at least |
02:37 | <&McMartin> | C++ has them but they break everything horribly because they use multiple inheritance to do them with |
02:37 | <&McMartin> | They are the usual justification for *having* multiple inheritance |
02:37 | <&Derakon> | Okay, so basically they're a module you staple onto your class to give it extra functionality. |
02:38 | <&Derakon> | Like, yes, multiple inheritance. |
02:40 | <@ToxicFrog> | Yes. |
02:52 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
02:53 | | mode/#code [+o himi] by ChanServ |
03:01 | | * McMartin remembers why ML is not great for casual throwing-stuff-together again. |
03:02 | <&McMartin> | To wit, the type-inference parts mean that within a namespace, no record types can share field names because then you can't do type inference on "x.f". |
03:02 | | * ToxicFrog implements traits and mixing in of said traits |
03:18 | | Attilla [Obsolete@Nightstar-1b32260b.as43234.net] has quit [Ping timeout: 121 seconds] |
03:22 | | Derakon is now known as Derakon[shower] |
03:31 | | Kindamoody is now known as Kindamoody|nap |
03:34 | | Vash [Vash@Nightstar-8697fea9.wlfrct.sbcglobal.net] has joined #code |
03:34 | | mode/#code [+o Vash] by ChanServ |
03:44 | <@ToxicFrog> | Holy shit I was not expecting that to work |
03:44 | | Derakon[shower] is now known as Derakon |
03:45 | | * ToxicFrog just loaded up a game that the client didn't have, and got a field full of "missing object definition" markers rather than a crash |
03:45 | <&Derakon> | Ah, so this isn't so much "working" as "failing softer than expected". |
03:47 | <~Vornicus> | I'd actually expect it to bail out a bit earlier than that. |
03:48 | <~Vornicus> | Or rather, um, not crashing, but going "I don't have that game." instead of "I don't have those pieces" |
03:49 | <@ToxicFrog> | Well, the actual use case here is that some types are defined entirely server-side, so the client is permitted to fall back to the most specialized type it knows about |
03:50 | <@ToxicFrog> | This is not actually the case with chess, so it falls back to felt.game.Entity |
03:50 | <@ToxicFrog> | (which is a generic "you should have implemented something here, dammit" marker) |
03:50 | <@ToxicFrog> | There is actually a "do I actually have this game installed" check, but it's not implemented yet. |
03:51 | <~Vornicus> | SO loading Yahtzee f'rinstance should work even if the client doesn't have that game? |
03:51 | <~Vornicus> | Because it's all dice? |
03:52 | <@ToxicFrog> | Yeah. |
03:52 | <@ToxicFrog> | Yahtzee can actually be implemented entirely server-side as long as you don't have fancy scoresheet graphics or something. |
03:53 | <@ToxicFrog> | So all game setup actually consists of is a script that creates the table and places a bunch of dice. |
03:54 | <@ToxicFrog> | (given a basic set of dice and cards, there's a lot of games that can be implemented entirely server-side. If you choose a piece naming convention that lets the client infer what graphics to use from the name of the piece, the list expands dramatically.) |
03:55 | <~Vornicus> | felt.game.Meeple.blue |
03:59 | <@ToxicFrog> | I was thinking the object name, not the type name |
03:59 | <@ToxicFrog> | But that could probably work as well |
04:00 | | * Vornicus thinks about the various games he has, or has played, and the kinds of things show up a lot. beads (mancala, go), checkers (checkers, backgammon), pawns (sorry, clue), dominos, houses (settlers, power grid), um... |
04:01 | <@ToxicFrog> | Hmm. |
04:01 | <~Vornicus> | Dollars |
04:01 | <@ToxicFrog> | Ok, all 32 chess pieces are piled up in the upper left corner of the chessboard. |
04:01 | <@ToxicFrog> | Something has clearly gone wrong with the positioning code. |
04:01 | <~Vornicus> | oops~ |
04:01 | <@ToxicFrog> | ...and I even know what it is! |
04:02 | <@ToxicFrog> | Also, anything that's just "an object the player moves around" - which includes beads, checkers, chess pieces, clue pawns, houses, etc - is felt.game.Entity with the Pickupable trait. |
04:02 | <@ToxicFrog> | The only part that the client needs to worry about at all is how to display it. |
04:05 | | * ToxicFrog ponders |
04:06 | <@ToxicFrog> | Let us say that each entity has two new properties: "game", which game box it originated in; and "face", which is a hint as to how it should be displayed. |
04:07 | <@ToxicFrog> | The default implementation of the client then infers the display image of an entity - absent overrides - as "share/%s/%s.png" % { self.game, self.face or self.name } |
04:07 | <@ToxicFrog> | The code for this goes in client/game.felt.Entity, so anything that has an existence in the gameworld uses this as its default renderer. |
04:08 | <@ToxicFrog> | If this fails (no image with that name exists, for example) it gets an eye-rapingly visible "missing object" icon. |
04:09 | <@ToxicFrog> | (the most likely cause of failure - for an end user - being that you have somehow managed to install the client module for a game, but not the graphics) |
04:09 | <@ToxicFrog> | Sound sane? |
04:09 | <~Vornicus> | magenta/lime diagonal stripes? :) |
04:10 | <~Vornicus> | Okay, so what about, um |
04:10 | <~Vornicus> | What game did my giant pile of d6s originate in? |
04:11 | <@ToxicFrog> | Good question |
04:11 | <@ToxicFrog> | WH40k? |
04:11 | <~Vornicus> | Har. |
04:11 | <&Derakon> | Eye-rapingly visible should use magenta, yes. |
04:11 | <~Vornicus> | What I mean is, clearly, I can play Yahtzee with just a pile of dice. |
04:12 | <&Derakon> | Max-saturation magenta is the go-to "you didn't choose a proper color, idiot" color. |
04:12 | <~Vornicus> | (though really I would recommend yellow/black diagonals, it's a little less eye raping and a little more warningicious) |
04:12 | <&Derakon> | That combo might actually be used in a game though. |
04:13 | <~Vornicus> | True, Roborally or something in that vein might use it. |
04:13 | <@ToxicFrog> | Chequered magenta and black is the classic "missing texture" texture in 3d games, so I'll probably go with that. |
04:13 | <@ToxicFrog> | Possibly with a lime border to make it clear where the bounding box is. |
04:14 | <&Derakon> | A thought for a possible future feature: the ability to snap pieces to other pieces. |
04:14 | <&Derakon> | E.g. for arranging Carcasonne tiles, or for putting tokens on cards. |
04:14 | <~Vornicus> | Pretty sure that's in there already. |
04:14 | <@ToxicFrog> | There's actually code for that in the old codebase that should port over mostly unchanged. |
04:14 | <&Derakon> | Oh, cool. |
04:15 | <@ToxicFrog> | Although it's snap-to-underlying-grid, not snap-to-adjacent-pieces - chess uses it, for example, so that chesspieces snap to the square they're dropped on. |
04:15 | <@ToxicFrog> | But in cases like Carcasonne you can always have an invisible gridboard underlying the playing field, or have each piece generate an invisible one around itself. |
04:16 | <&Derakon> | Fairynuff. |
04:16 | <@ToxicFrog> | (general "put tokens on cards" - really, "put anything on anything else" - is already in and working) |
04:17 | <~Vornicus> | Power Grid: put pieces on particular features. |
04:18 | <&Derakon> | Power Grid has hidden money and a deck and is otherwise entirely tokens. |
04:19 | <~Vornicus> | Right, but what I'm saying is you'll want to snap pieces to city locations |
04:19 | <&Derakon> | Easiest way to do that would probably be to just make each buildable spot a snap location. |
04:20 | <@ToxicFrog> | Magenta is (1, 0, 1), right? |
04:20 | <~Vornicus> | yes |
04:20 | <~Vornicus> | and lime is (0, 1, 0) |
04:24 | | * Vornicus thinkerizes. |
04:24 | | * Derakon offers a bucket for brain cooling. |
04:24 | <&Derakon> | (Bucket full of water, that is) |
04:24 | <&McMartin> | But there still remain - and I can not stress this enough - things that are not on top of other things. |
04:25 | <~Vornicus> | That's from somewhere and I don't remember where. |
04:25 | <&McMartin> | Monty Python, the skit about the society for putting things on top of other things |
04:25 | <&Derakon> | http://www.youtube.com/watch?v=1f-kfRREA8M |
04:26 | <@ToxicFrog> | Ok, let's try this. |
04:26 | <@ToxicFrog> | Hmm. |
04:26 | <@ToxicFrog> | Dense3pattern is not nearly eye-searing enough. |
04:32 | | eckse [eckse@Nightstar-6eec2b93.dsl.sentex.ca] has quit [Connection reset by peer] |
04:33 | | eckse [eckse@Nightstar-6eec2b93.dsl.sentex.ca] has joined #code |
04:38 | <~Vornicus> | Cards, dice, dominoes, squares, circles, octagons (used in among others power grid and puerto rico), houses, dollars (? most games that use them, you could replace them with a straight number, though putting a pile for the "free parking" house rule in monopoly would be kind of funny), meeples, letter and number tiles (possibly with score corners), um... |
04:38 | <&Derakon> | Cards should include some zooming and/or iconizing capability. |
04:39 | <&Derakon> | Imagine playing Race for the Galaxy with fixed-size cards and four players. |
04:39 | <~Vornicus> | I've never played rftg |
04:39 | <&Derakon> | Each card has a title, cost, VP value, up to six sets of icons, and optional additional text. |
04:40 | <&Derakon> | And the game's a race to get 12 cards down in front of you. |
04:40 | <@ToxicFrog> | Huh. This is a new and exciting bug. |
04:40 | <@ToxicFrog> | [client] Error receiving message from server: lib/box/unpack.lua:6: non-string argument to box.unpack |
04:40 | <&Derakon> | (Each card enhancing your ability to do different things Puerto Rico-style) |
04:40 | <@ToxicFrog> | Derakon: the entire gamefield is zoomable and pannable. |
04:40 | <&Derakon> | Hm. |
04:41 | <@ToxicFrog> | Individual game modules may implement tooltips or other info popups; the Descent module, for example, has a side pane it uses to show close-ups of monster stat cards when you mouse over a monster figure. |
04:41 | <@ToxicFrog> | There's no Race module (although I think I have the graphics for it scanned), but it could easily do something similar. |
04:41 | <&Derakon> | Fair enough. |
04:42 | <&Derakon> | Small cards that show their stats when moused over would help. |
04:42 | | Vash is now known as Vash[Sleeping] |
04:51 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
04:52 | | eckse [eckse@Nightstar-6eec2b93.dsl.sentex.ca] has quit [Client closed the connection] |
04:53 | | eckse [eckse@Nightstar-6eec2b93.dsl.sentex.ca] has joined #code |
04:53 | | mode/#code [+o eckse] by ChanServ |
04:53 | <@ToxicFrog> | Ok. |
04:53 | <@ToxicFrog> | Chess is now happily synchronizing and displaying properly. |
04:53 | <@ToxicFrog> | Now to finish what I was actually working on before I decided I needed a better test case. |
04:53 | <@ToxicFrog> | Which is to say, the ability to actually pick up and drop things. |
05:05 | | Kindamoody|nap is now known as Kindamoody |
05:26 | | eckse [eckse@Nightstar-6eec2b93.dsl.sentex.ca] has quit [Connection reset by peer] |
05:46 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
06:31 | | Derakon is now known as Derakon[AFK] |
07:07 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
07:12 | | You're now known as TheWatcher |
07:12 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
07:12 | | mode/#code [+o ToxicFrog] by ChanServ |
07:24 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
07:31 | | Kindamoody is now known as Kindamoody|out |
07:49 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
07:49 | | mode/#code [+o himi] by ChanServ |
07:57 | <@maoranma> | You wrote a chess game? |
07:57 | <@maoranma> | What next? class dog(): ...? |
07:58 | <@TheWatcher> | Nah |
07:58 | <@TheWatcher> | Global Thermonuclear War, obviously. |
08:00 | <@maoranma> | Meh |
08:01 | <@maoranma> | God, chrome is still not fixed? |
08:07 | | You're now known as TheWatcher[afk] |
10:30 | | You're now known as TheWatcher |
10:34 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
11:04 | | Attilla [Obsolete@Nightstar-036c237a.as43234.net] has joined #code |
11:15 | | RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has joined #code |
12:08 | | * TheWatcher eyes this table, realises why it wasn't working |
12:08 | <@TheWatcher> | Apparently the w3c hasn't seen fit to add a <tf> tag yet.... |
12:09 | <@Tamber> | Maybe that comes after <wtf>? |
12:09 | <@Ling> | Why does the World Trade Federation need its own HTML tag? |
12:09 | <@Tamber> | :p |
12:10 | <@Tamber> | <omg><wtf><bbq /></wtf></omg> |
12:13 | <@jerith> | And the Object Management Group *really* needs a Web Task Force. |
12:59 | <@TheWatcher> | With a subgroup that monitors the Business Building Quality of the advice offered by the Web Task Force? |
13:01 | <@jerith> | TheWatcher: No, just frequent outdoor social events. |
13:05 | | * gnolam comes to the conclusion that this data set was written by and for a PDP-11. |
13:06 | < gnolam> | Mmm, middle-endian byte order... |
13:06 | <@jerith> | Doesn't x86 use middle-endian? |
13:09 | < gnolam> | Nope. |
13:12 | <@jerith> | Isn't bit-order one direction and byte-order the other? |
13:15 | < RichardBarrell> | "Middle-endian" refers to weird byte orders like 4231. |
13:19 | < RichardBarrell> | "Little-endian" just refers to how you u?int(16|32|64)_t's look when you address them byte-by-byte. |
13:36 | < gnolam> | Anyway. Looks like I'm reading the data properly now: http://www.lysator.liu.se/~gnolam/temp/war0000.png |
13:44 | | * TheWatcher eyes |
13:44 | <@TheWatcher> | What's that for? |
13:45 | < gnolam> | Decided to resurrect my old wargame project. |
13:46 | < gnolam> | Unfortunately, the properly readable version of the data set had been lost in the mists of time, so I had to go back to the original source. |
13:47 | < gnolam> | Which is in a format apparently designed for the PDP-11, documented only by a hacky K&R C program from 1989. |
13:48 | < gnolam> | It was a nice change from all that high level GUI stuff I've been doing lately. :) |
13:49 | < gnolam> | (Or if you're asking what the original data set was for: ask the CIA.~) |
13:49 | <@TheWatcher> | heheh |
13:52 | | EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has quit [Operation timed out] |
13:53 | | EvilDarkLord [jjlehto3@Nightstar-a5db08cc.org.aalto.fi] has joined #code |
13:53 | | Vash[Sleeping] is now known as Vash |
14:42 | | SouthernMyst [Myst@Nightstar-3762b576.co.uk] has joined #code |
14:43 | < SouthernMyst> | I know this is undoubtedly really easy, but I can't figure it out and I can't find something to tell me, so perhaps you fine folks will take pity and help me. |
14:43 | < gnolam> | Shoot. |
14:44 | <@Tamber> | Yes, it needs to be switched on to work. Yes, and plugged in, even if it does say "Wireless" on the box. ;) |
14:44 | | * Tamber ducks. |
14:44 | < SouthernMyst> | In html, I just want a few characters in a line gray. <p style="color:gray">21</p> almost does it, but starts a new paragraph after 21, which I don't want. <font color="gray"> is what I used to do, but the internet tells me it's deprecated, so what am I supposed to do now? |
14:44 | < SouthernMyst> | pbbbbth @ Tamber ;P |
14:45 | <@jerith> | SouthernMyst: <span> instead of <p> perhaps? |
14:45 | <@Tamber> | <span id="greybit">characters</span> and have .greybit { color: gray } in the CSS |
14:45 | <@Tamber> | I think. |
14:45 | <@jerith> | Or maybe <div>? I forget what the difference is. |
14:46 | <@jerith> | I think <span> is supposed to be for inline things and <div> is supposed to be for discrete chunks. |
14:46 | < SouthernMyst> | Aha, span works. Thank ye! |
14:46 | < SouthernMyst> | Aye, I seem to recall that being what I was told. Perhaps. |
14:46 | <@jerith> | You probably want to be using CSS instead of setting style parameters directly. |
14:47 | <~Vornicus> | span is inline, div is paragraphs |
14:48 | <~Vornicus> | and if using Tamber's, use <span class="greybit">... |
14:49 | <~Vornicus> | (you can put by-id stylesheet data in, but it's not a good idea; there is guaranteed to be at most one element with a particular id in the DOM) |
14:49 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has joined #code |
14:50 | <~Vornicus> | (but you use # for that, not .) |
14:52 | < SouthernMyst> | Thanks yall. |
14:52 | < SouthernMyst> | jerith, I don't know what CSS is, and thankfully I'm not coding a whole website or anything, just trying to get some text in a wiki. |
14:52 | <~Vornicus> | ah, if it's a wiki you don't have stylesheet control, so don't worry about that. |
14:52 | < SouthernMyst> | Vornicus, all that sounds way beyond my ability. |
14:53 | < SouthernMyst> | aha. |
14:53 | <~Vornicus> | Just use <span style="color: gray">21</span> |
14:53 | < SouthernMyst> | Aye, thanks. |
14:54 | <@jerith> | SouthernMyst: CSS is "Cascading Style Sheets". It's a way to put all your style information in one place instead of scattering it across your HTML. |
14:55 | <@jerith> | So that when you decide you actually want that text to be purple instead of grey, you only have to change it in one place instead of trying to track down everywhere you have that kind of grey text. |
14:55 | < SouthernMyst> | Ah, that makes sense. |
14:56 | <@jerith> | It also means you can differentiate between different things that happen to look the same. Maybe you want section headings to be grey as well, but you don't want to confuse them with other grey things. |
14:58 | | * SouthernMyst nods |
15:01 | < gnolam> | As a bonus, it's also faster and more compact - you can have a single stylesheet for a whole site. |
15:05 | <~Vornicus> | (it also makes it so you can switch stylesheets as a method of changing skins, which is awesome, and if you really want you can apply your own customized stylesheet to other people's sites, if their taste offends.) |
15:07 | <@jerith> | (On the other hand, CSS has become very complicated and it can be quite hard to make stuff look the same across various browsers.) |
15:07 | | You're now known as TheWatcher[afk] |
15:07 | <~Vornicus> | (especially if one of those browsers is IE before 9.) |
15:08 | <@jerith> | (But that's mostly if you're using all the layout stuff that got added in recent versions.) |
15:24 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has quit [Client exited] |
15:28 | | * SouthernMyst nods |
15:45 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
15:55 | | mao42ranma [maoranma@490720.C448F4.B6D94A.8A4DC0] has joined #code |
15:57 | | maoranma [maoranma@Nightstar-5d9e9fed.pools.spcsdns.net] has quit [Ping timeout: 121 seconds] |
15:59 | < RichardBarrell> | SouthernMyst, jerith: <span> and <div> have display:inline and display:block by default respectively. Other than that there is no difference between the two and they carry no semantic meaning at all. |
16:00 | < RichardBarrell> | You can quite happily put div { display:inline; } and span { display:block; } in your stylesheets just for the sheer joy of the worship of Eris. :) |
16:01 | <@Eri> | Damn straight |
16:01 | <@Eri> | Venerate me! |
16:02 | | * SouthernMyst chuckles |
16:03 | <@jerith> | Eri: Only if there are several of you. Sorry. |
16:03 | | * Tamber gets out the ACME cloning machine... |
16:03 | <@Tamber> | Sure, the firmware's still in 'beta', but... |
16:03 | < SouthernMyst> | Eri: And only if you can get this zit out of my ear. |
16:05 | <@ToxicFrog> | Ok. Now all I need is a way to drop items after picking them up. |
16:06 | <@Tamber> | Perhaps if you were to use less superglue... |
16:13 | | Stalker [Z@26ECB6.A4B64C.298B52.9B92DB] has joined #code |
16:55 | | Kindamoody|out is now known as Kindamoody |
17:27 | | * ToxicFrog ponders. Game should probably be a subclass of game.felt.Object, not Object. |
17:28 | | * ToxicFrog finds two bugs! |
17:29 | <@ToxicFrog> | ...three! |
17:36 | <@ToxicFrog> | ...four! |
17:36 | <@jerith> | Five! Five! Do we have five? |
17:37 | <@jerith> | No takers for five? |
17:38 | <@ToxicFrog> | It's aliiiiiiiiiiiiiiiive! |
17:38 | <@jerith> | SOLD! To the poisonous amphibian for four bugs. |
17:38 | <@ToxicFrog> | Well, apart from the fact that gridsnapping is snapping the wrong part of the object |
17:38 | <@ToxicFrog> | But that's just math |
17:41 | | maoranma [maoranma@Nightstar-dcdc4287.pools.spcsdns.net] has joined #code |
17:42 | | mao42ranma [maoranma@490720.C448F4.B6D94A.8A4DC0] has quit [Ping timeout: 121 seconds] |
17:57 | <@ToxicFrog> | It works! |
17:57 | <@ToxicFrog> | Now to construct a windows build ;.; |
17:58 | <@ShellNinja> | Where did you get your nickname, ToxicFrog? |
18:03 | <@ToxicFrog> | It is a mystery. |
18:03 | <@ShellNinja> | Clearly! |
18:11 | <@ToxicFrog> | Why do you ask? |
18:12 | <@ShellNinja> | I am curious. |
18:29 | <@ToxicFrog> | Anyways, it started out as pFrog many years ago for reasons I no longer remember, and mutated over the years into this. |
18:29 | <@ToxicFrog> | In other news |
18:29 | <@ToxicFrog> | Fuck yes, windows version working |
18:30 | <@TheWatcher[afk]> | \o/ |
18:30 | | You're now known as TheWatcher |
18:38 | <@Ling> | One cold, miserable day in 2038, IE will get an update that allows it to support APNG and decades later Windows will become nicer to program in, being describable as "slightly unconformfortable to develop in, but it was much worse before". |
18:40 | < RichardBarrell> | and then 30 seconds later it'll roll back the update because time_t just went negative. |
18:54 | | mao42ranma [maoranma@D5CC77.617194.6136F0.741AC2] has joined #code |
18:55 | | maoranma [maoranma@Nightstar-dcdc4287.pools.spcsdns.net] has quit [Ping timeout: 121 seconds] |
19:04 | <@ToxicFrog> | Oh wait it's not actually ready for testing |
19:04 | <@ToxicFrog> | opos |
19:14 | <@jerith> | ToxicFrog: MacOS? |
19:23 | < gnolam> | Ling: you'll pry my intellisense from my cold, dead hands. |
19:34 | | Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has joined #code |
19:39 | | Kindamoody is now known as Kindamoody[zZz] |
19:44 | | * Vornucopia fiddles with random generation of metric asstons of stars. |
19:44 | | RichardBarrell [mycatverbs@Nightstar-3b2c2db2.bethere.co.uk] has quit [[NS] Quit: ERC Version 5.3 (IRC client for Emacs)] |
19:46 | <@ToxicFrog> | jerith: er? |
19:46 | <@ToxicFrog> | I'm developing on linux. |
19:47 | <@ToxicFrog> | I hope to target linux, OSX, and windows, but I can only actually test on linux and windows. |
19:47 | | * Vornucopia should figure out how to use Canvas. |
19:47 | <@jerith> | ToxicFrog: Shout if you want me to test anything for you. |
19:48 | <@ToxicFrog> | I don't expect this to be problematic, though - I'm using lua, lfs, luasocket, and Qt, all of which are portable to the big three. |
19:50 | <@jerith> | ToxicFrog: But there are always little things that are problematic. |
19:53 | < Vornucopia> | Wheeee, inverting functions for use in a random number generator. |
20:04 | < Vornucopia> | --not that I know whether the functions I come up with are sane for an RNG. I guess I could just use a d5 and a gaussian and get the same reasults. |
20:04 | < Vornucopia> | Or much cleaner results. |
20:19 | | * Vornucopia thinks he might have it now. |
20:27 | <@Tarinaky> | I'm trying to write a MUD client in Python using Twisted and I'm having a lot of difficulty. |
20:27 | <@Tarinaky> | Err |
20:27 | <@Tarinaky> | *Mud server in Python... |
20:28 | <@Tarinaky> | Anyway. I'm currently using the LineReceiver as my base class. |
20:28 | <@Tarinaky> | But the problem is that I don't want to wait for the user to send input before emitting output. |
20:28 | | Stalker [Z@26ECB6.A4B64C.298B52.9B92DB] has quit [Ping timeout: 121 seconds] |
20:28 | < Vornucopia> | So you need triggers to send stuff that isn't necessarily on user input. |
20:29 | <@Tarinaky> | I'm not really sure how, practically, to do this. |
20:30 | <@Tarinaky> | I considered adding a forked loop that'd check for output - but that would have introduced race conditions. |
20:30 | <@Tarinaky> | +elsewhere |
20:30 | < Vornucopia> | No, you just want certain events to drop send events into the queue for users other than the one that triggers it. |
20:31 | <@Tarinaky> | The problem is I'm not sure how to actually emit them from the queue. |
20:31 | <@Tarinaky> | It's not enough that the server knows it needs to send so many lines to the user. |
20:31 | <@Tarinaky> | It should go ahead and do it as soon as reasonable. |
20:32 | <@Tarinaky> | It shouldn't wait for the user to do something before sending them. |
20:32 | <@Tarinaky> | How do I flush the queue. |
20:32 | <@Tarinaky> | In a sensible way. |
20:33 | < Vornucopia> | Dunno. I'd have to examine the queue's docs, but usually things like this flush when there's a newline involved. |
20:33 | <@Tarinaky> | I dunno if I'm making sense. Yay, I've become another dirty first year who can't code his way out of a paper bag :) |
20:33 | <@Tarinaky> | Err, it's not really a queue. |
20:34 | <@Tarinaky> | I mean, Twisted already sends data when I tell it to. |
20:34 | <@Tarinaky> | I just don't know when/where to tell it to. |
20:34 | <@Tarinaky> | Does that make sense/ |
20:34 | <@Tarinaky> | Or should I start explaining again from scratch >.< |
20:36 | < Vornucopia> | Well, this is a mud; it acts like a telnet connection, and that means that you are on pretty safe grounds pretending each client is a console and having done with it. |
20:36 | < Vornucopia> | If that doesn't work, then you have to go hunting. |
20:36 | <@Tarinaky> | I have no idea how to do that |
20:37 | < Vornucopia> | "relax, put dat ain the clients' queue, have done with it" |
20:37 | <@Tarinaky> | Yeah. I mean I have no idea how to get Twisted to behave like that. |
20:37 | < Vornucopia> | If it does what I expect it to, then there is nothing at all to worry about and you're getting worked up over nothing. |
20:38 | <@Tarinaky> | At the moment if I want write a string I have to set a variable to that string then wait for lineReceived to be called - which checks if said variable has been set to anything. |
20:38 | <@Tarinaky> | I could replace the variable with a queue - but that'd solve nothing. |
20:39 | < Vornucopia> | Is this code you wrote, or somebody else? |
20:39 | <@Tarinaky> | I wrote. |
20:40 | <@Tarinaky> | Oh! |
20:40 | <@Tarinaky> | I have it on github if that helps. |
20:40 | < Vornucopia> | It does. This seems like you're over-engineering. |
20:41 | <@Tarinaky> | https://github.com/Tarinaky/AberByCyberscape |
20:41 | | * ToxicFrog upreads |
20:41 | <@ToxicFrog> | Why do you need the queue at all? |
20:41 | <@Tarinaky> | Because I don't know how to, sensibly, call an output function. |
20:41 | < Vornucopia> | Yeah, this doesn't seem to be a sensible thing. |
20:42 | < Vornucopia> | But clearly you've gotten it to send /somehow/ |
20:42 | <@Tarinaky> | Like I said - a queue wouldn't solve anything. |
20:42 | <@ToxicFrog> | Just call .sendLine(), like it says in the examples |
20:42 | < Vornucopia> | So Just Do That, quit fucking around with scheduling and stuff. |
20:43 | < Vornucopia> | This isn't bittorrent, you're not saturating anybody's lines unless they're connecting to the MUD on their Apple ][e with 1200 baud modem and even then, the protocol should handle that! |
20:43 | <@Tarinaky> | That's not the problem. |
20:43 | < Vornucopia> | Then... what is/ |
20:44 | <@Tarinaky> | The problem is I don't know how to call sendLine without increasing Coupling. |
20:44 | <@ToxicFrog> | what? |
20:44 | <@Tarinaky> | >.< |
20:44 | < Vornucopia> | Oh, I see |
20:45 | < Vornucopia> | You've got a user that might wish to ignore certain classes of message, and using sendLine everywhere makes those messages unignoreable? |
20:45 | <@Tarinaky> | That as well. |
20:45 | | * jerith readsup. |
20:45 | <@Tarinaky> | The more of you readup the more stupid I feel :p |
20:46 | < Vornucopia> | And while you're at it, certain entities want notification that there's something in the room, but they'r e not all users |
20:46 | <@Tarinaky> | I guess so. |
20:46 | | * Tarinaky only hammered this code out one afternoon while he had no internet access - he probably wants to rewrite anyway >.< |
20:47 | < Vornucopia> | What you should do then is have your entities that might care have a method that will be called when the game rules say that that entity knows about a particular event. |
20:47 | <@jerith> | I haven't looked at the code, but you probably want a more complex message type than a raw string. |
20:47 | < Vornucopia> | And then for users, you want that method to (among other things) call sendLine on the user's connection. |
20:47 | <@Tarinaky> | jerith: I can only write a raw string to a telnet client on the other end though. |
20:48 | <@jerith> | Tarinaky: You want to decide whether to write it or not. |
20:48 | < Vornucopia> | So for instance I'll have a entity.critterEnters() event. |
20:48 | <@Tarinaky> | Ah. Yes. |
20:48 | < Vornucopia> | And then for users, that method will trigger whenever a critter enters a room that the entity has vision on. |
20:48 | <@Tarinaky> | Anyway. Thanks for talking. You might have helped me a little. |
20:48 | <@jerith> | And what Vorn is saying makes more sense. |
20:49 | < Vornucopia> | Er, for any entity, that method will trigger... |
20:49 | < Vornucopia> | But then for user-type entities, you have a sendLine to that user's connection. |
20:50 | < Vornucopia> | (this makes, among other things, creatures and users look the same from the code standpoint, and that makes the game easier to program) |
20:51 | <@jerith> | You really want to call sendLine() whenever you want to send stuff instead of tying it to input. |
20:51 | | * jerith writes Twisted code for a living, so can probably help. |
20:51 | <@Tarinaky> | The TL;DR is I don't really know what I'm doing. |
20:52 | <@jerith> | Tarinaky: That's good. If you knew what you were doing, it would be boring. :-) |
20:56 | <@Tarinaky> | Can python docstrings, ie """ foo """ contain ' characters? |
20:56 | < Vornucopia> | Yes. |
20:56 | < Vornucopia> | Also " characters |
20:56 | < Vornucopia> | Als ""s |
20:56 | <@Tarinaky> | I mostly care about apostrophes. |
20:57 | < Vornucopia> | In fact the only thing that isn't allowed is """ itself and then you can just escape enough of them to make there not be three in a row. |
20:58 | <@Tarinaky> | Cool beans. |
21:02 | | * Vornucopia discovers the von Mises distribution, thinks this might help~ |
21:02 | <@Tarinaky> | Is there a pythonic way of doing an abstract class or an interface? |
21:03 | | maoranma [maoranma@490720.C448F4.1402BD.E3F5F7] has joined #code |
21:03 | <@Tarinaky> | Or is def foo(self): raise as good as you can do? |
21:03 | < Vornucopia> | Tarinaky: just don't define the function on the class |
21:04 | < Vornucopia> | You'll get a NameError when trying to call it, and that's what duck typing expects. |
21:04 | <@Tarinaky> | Yeah... but then how do you document that it's needed. |
21:04 | <@Tarinaky> | Inb4 "By including it in the documentation" |
21:04 | < Vornucopia> | Tarinaky: by including it in the documentation. |
21:05 | | mao42ranma [maoranma@D5CC77.617194.6136F0.741AC2] has quit [Ping timeout: 121 seconds] |
21:05 | < Vornucopia> | If you really expect all objects of a particular subtype to respond to an event, you can always do def foo(self): pass |
21:05 | <@Tarinaky> | That's not what an abstract class is :p |
21:05 | < Vornucopia> | Or some other sensible default |
21:05 | < Vornucopia> | That's too bad. |
21:06 | <@Tarinaky> | Sometimes I dislike python for being too much like python. |
21:06 | < Vornucopia> | I don't have to subclass number to make a numeric type. |
21:06 | < Vornucopia> | If it talks like a number, it's a number, end of discussion. |
21:06 | < Vornucopia> | Welcome to dynamically typed languages. |
21:07 | <@Tarinaky> | I was just asking :p |
21:07 | < Vornucopia> | (more to the point, I iddn't have to subclass function to make a callable polynomial, nor dictionary to make a piecewise function.) |
21:11 | | * Vornucopia then discovers to his happiness that I_a is actually available in Excel, gets goal seek going. |
21:12 | <@jerith> | Tarinaky: Look up Abstract Base Class. |
21:12 | <@Tarinaky> | Does it add anything? |
21:13 | <@Tarinaky> | Or is Vorn's advice of "Get over it" better? |
21:14 | < Vornucopia> | Probably adds something to the discussion, but remember: this isn't a type-checked language. Python doesn't bother asking whether something is the right type before interrogating it as though it is. |
21:14 | <@Tarinaky> | Mostly I guess it's a desire for a compilation test/safety net. |
21:15 | < Vornucopia> | That you'll just have to get over. |
21:15 | < Vornucopia> | Unit tests are your best friends though. |
21:16 | <@Tarinaky> | Yeah. |
21:16 | < Vornucopia> | Even if they're not structured in a nice way, having tests sprinkled liberally throughout your code will make you program more confidently. |
21:16 | <@Tarinaky> | It's a lot harder to write them when I don't know what I'm doing though. |
21:17 | < Vornucopia> | Right now I'm kind of bogged down on my spline work because I don't really have any good sense of the tests I'm trying to do. |
21:17 | <@jerith> | Tarinaky: If you want a compilation safety net, you want Java or something. |
21:17 | <@Tarinaky> | The only time I used them was on my first uni project - where I knew what I wanted every class and method to do before I started writing code. |
21:17 | <@Tarinaky> | Because 1) the problem was trivial and 2) I did a thorough design. |
21:18 | < Vornucopia> | The Actual Official Work Flow is Request/Bug -> Test -> Code. |
21:18 | <@Tarinaky> | But I was only able to do that because all I had to write was stated clearly in 3 or so paragraphs. |
21:18 | <@Tarinaky> | Since, you know... first year project >.< |
21:18 | < Vornucopia> | Well, okay, that's TDD, which has its detractors. |
21:18 | <@jerith> | Tarinaky: The more tests you write, the easier they get. |
21:19 | < Vornucopia> | But you write code and should pretty much immediately confirm that the code does what you think it does. |
21:19 | <@Tarinaky> | It'd be easier except I don't know what the feature is :) |
21:19 | <@jerith> | Tarinaky: TDD says you figure out the behaviour by writing a test instead of writing the code. |
21:19 | <@Tarinaky> | Derp. I always forget how to use super... |
21:19 | <@Tarinaky> | Is this right? super(LogInState,self).__init__(self,user) |
21:20 | <@jerith> | Nope. |
21:20 | | * Tarinaky frowns. |
21:20 | <@Tarinaky> | I hate super. It's silly and annoying. |
21:20 | <@jerith> | Either super(LogInState).__init__(self, user) or super(LogInState, self).__init__(user). |
21:21 | < Vornucopia> | (in another case, I was bogged down earlier with my spline/algebra work, and writing tests on what I had done made it not only possible but trivial to write the next piece of code.) |
21:21 | <@jerith> | super's a pain. And a bit broken. |
21:22 | <@jerith> | But as long as you don't do complicated things with multiple inheritance you should be fine. |
21:23 | <@Tarinaky> | Don't worry. I'm not torturing the interpretter to within an inch of its life. |
21:24 | < Vornucopia> | (not least because it essentially documented how to use what I had written.) |
21:31 | < Vornucopia> | (and in one case surprised and pleased me that it did work.) |
21:33 | <@jerith> | Tarinaky: Twisted has a good testing guide. |
21:33 | <@Tarinaky> | You must link me to it. |
21:34 | <@jerith> | http://twistedmatrix.com/documents/current/core/howto/trial.html |
21:34 | <@jerith> | Also http://twistedmatrix.com/documents/current/core/howto/testing.html |
21:34 | <@Tarinaky> | I'll have a look after I commit this. |
21:35 | <@jerith> | The first link is the meatier one, but the second has a few extra things in it. |
21:36 | | * Tarinaky facepalms. |
21:36 | <@Tarinaky> | Except Twisted doesn't want to work on Windows. |
21:36 | <@Tarinaky> | Joy! I get to have fun trying to figure out how to test this commit! |
21:37 | < Vornucopia> | wtf, I never had trouble with twisted, or at least of that type. |
21:37 | <@Tarinaky> | I'm missing a dependency. |
21:38 | <@Tarinaky> | I probably shouldn't run it on Windows anyway. |
21:38 | <@ToxicFrog> | god I had forgotten what a pain in the ass C is to debug |
21:40 | <@jerith> | Tarinaky: What's the error? |
21:40 | <@jerith> | ToxicFrog: 'Seasy. You screwed up a pointer dereference. |
21:44 | <@jerith> | Tarinaky: You probably don't want to name your package "py". |
21:45 | <@jerith> | Eep! Tabs. ;_; |
21:48 | <@ToxicFrog> | jerith: no. something eight stack frames into one of the libraries I'm using did. |
21:48 | <@Tarinaky> | AAAAAAAAAAAAAARRRRRRRRRGGGH |
21:48 | <@Tarinaky> | Why won't github accept my public key |
21:48 | <@jerith> | Dunno. What does it claim is the problem? |
21:49 | <@Tarinaky> | Oops! The key is invalid. Ensure you've copied the file correctly. |
21:49 | <@jerith> | And how did you push if it didn't? |
21:49 | <@ToxicFrog> | (why am I confident that it's not something I did? Because I'm calling it from Lua, which means the ability to generate a crash at all is a bug in the binding!) |
21:49 | <@Tarinaky> | I originally pushed from my laptop. |
21:49 | <@Tarinaky> | I am on a different machine. |
21:49 | <@ToxicFrog> | Did you copy the same key from your laptop to this machine? |
21:49 | <@Tarinaky> | I fucking hate github. |
21:49 | <@Tarinaky> | No. |
21:49 | <@ToxicFrog> | In that case, did you copy the public half of the keypair you generated on this machine to github? |
21:49 | <@Tarinaky> | Github allows you to use different keys for different machines. |
21:50 | <@Tarinaky> | I am attempting to copy the public half to github. |
21:50 | <@Tarinaky> | Github is telling me the public half is invalid. |
21:51 | <@ToxicFrog> | So, wait. You get that error from the "add a key" web interface, not when you try to SSH into it? |
21:51 | <@Tarinaky> | Yes. |
21:52 | <@Tarinaky> | I can't ssh into it yet, because it doesn't have a key for me. |
21:52 | <@ToxicFrog> | You're sure it's (a) the complete key, (b) the public half, and (c) not mangled by windows copy-paste fuckery in any way? |
21:52 | | Vornucopia [NSwebIRC@C888DE.7F9621.4A1301.BBBE7B] has quit [[NS] Quit: Page closed] |
21:52 | <@Tarinaky> | I can't guarentee c. |
21:52 | <@Tarinaky> | I can guarentee a and b. |
21:52 | <@jerith> | How did you generate the key? |
21:53 | <@Tarinaky> | By clicking "Generate RSA key" in Eclipse. |
21:53 | <@Tarinaky> | I also have the same error with the public key I generated earlier using cygwin's version of rsa-keygen. |
21:53 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
21:53 | <@jerith> | Can you pastebin the public key? |
21:54 | <@Tarinaky> | http://pastebin.com/W2u52WuK |
21:56 | <@jerith> | That looks okay to me. |
21:56 | <@Tarinaky> | ... |
21:56 | <@Tarinaky> | And now it accepts it. |
21:56 | <@Tarinaky> | I have no idea what was wrong. |
21:57 | <@jerith> | Maybe they were broken for a bit. |
21:57 | <@jerith> | It happens from time to time. |
21:57 | <@Tarinaky> | Or apparently not. |
21:57 | <@Tarinaky> | Because now Eclipse gives me an auth fail. |
21:57 | <@jerith> | Is Eclipse using the right private key? |
21:57 | <@Tarinaky> | Yes. |
22:05 | <@Tarinaky> | ARGH |
22:07 | <@Tarinaky> | Right. |
22:07 | <@Tarinaky> | It's working now. |
22:07 | <@Tarinaky> | I restarted eclipse and remade the remotes. |
22:07 | <@Tarinaky> | I don't know if that actually did anything but it works now. |
22:08 | <@jerith> | Eclipse is made out of fail, held together with pain. |
22:08 | <@Tarinaky> | I like Eclipse's Python debugger. |
22:08 | <&McMartin> | And yet, it remains best of breed in its realm, by a wide margin |
22:08 | <@Tarinaky> | That's basically what I use it for. |
22:08 | <&McMartin> | (This description also applies to NSIS.) |
22:09 | <@jerith> | Tarinaky: How thickly does it wrap pdb? |
22:09 | <@jerith> | Also, I very seldom need a debugger. That's what tests are for. |
22:09 | <@jerith> | (In the past year, the only time I've used pdb was to delve into the bowels of pypy. |
22:09 | <@jerith> | ) |
22:10 | | eckse [eckse@Nightstar-d939497f.dsl.sentex.ca] has joined #code |
22:10 | | mode/#code [+o eckse] by ChanServ |
22:11 | <@Tarinaky> | jerith: I'm not as good as you. |
22:12 | <@Tarinaky> | I should hope it wrapes pdb all the way. But command line debuggers have their flaws. |
22:12 | <@Tarinaky> | Ie: The moment you want to debug a command line utility. :) |
22:12 | <@Tarinaky> | Then the Fun begins! |
22:12 | <@jerith> | Tarinaky: I just find it easier to write tests and print breadcrumbs. |
22:13 | <@Tarinaky> | I'd write tests - but I don't have features to test. |
22:13 | <@Tarinaky> | I have a vague notion of what I might maybe want to do maybe. |
22:13 | <@Tarinaky> | I'm hoping once I have a bit more of a framework it'll be more obvious. |
22:13 | <@Tarinaky> | Anyway. |
22:13 | <@jerith> | Write some test around is_yes() and is_no(). |
22:13 | <@jerith> | That kind of thing. |
22:13 | <@Tarinaky> | jerith: WHat should I use instead of py? |
22:14 | <@jerith> | Dunno. What do you want to call your thing? |
22:14 | <@Tarinaky> | I don't like having things clutter the top directory because that's where readme and runme stuff goes. |
22:14 | <@Tarinaky> | I only have py as an alternative to src or bin >.< |
22:15 | <&McMartin> | src/python? |
22:15 | <&McMartin> | I ended up using bin/ and lib/ for Ophis. |
22:16 | <@jerith> | No, use a name that describes your project. |
22:17 | <@jerith> | "aber" or something, perhaps. |
22:18 | <@Tarinaky> | There's already an AberMUD |
22:18 | <@jerith> | "py" as a name doesn't tell us anything, and there's also a set of handy libraries (which I don't use, but which I've seen others use) that calls itself "py". |
22:19 | <@Tarinaky> | Hunh. That's interesting. |
22:20 | <@Tarinaky> | In connection.py I have the line "self.user = User(self)" |
22:20 | <@Tarinaky> | Which is supposed to construct the User object with a pointer back to the parent object - so that User can call sendLine or whatever... |
22:21 | <@Tarinaky> | But Python complains that it's only receiving one argument, not two. |
22:21 | <@Tarinaky> | No, wait. |
22:21 | <@Tarinaky> | No. |
22:21 | <@Tarinaky> | I can't read. |
22:21 | <@Tarinaky> | Curse you Eclipse for not giving me bloody line numbers >.> |
22:22 | <@jerith> | Tarinaky: You should really start using PEP-8 formatting. |
22:23 | <@Tarinaky> | I thought was. |
22:23 | <@Tarinaky> | *I thought I was |
22:23 | <@jerith> | Spaces after commas. No trailing whitespace. |
22:23 | <@jerith> | Double spaces before line comments. |
22:23 | <@Tarinaky> | Trailing? |
22:24 | <@Tarinaky> | super(LogInState).__init__(self,user) |
22:24 | <@Tarinaky> | exceptions.TypeError: super() argument 1 must be type, not LogInState |
22:24 | <@jerith> | Whitespace at the end of a line. |
22:24 | <@Tarinaky> | I don;t understand that exception. |
22:25 | <@jerith> | Brb. |
22:25 | <@Tarinaky> | Gutted. |
22:35 | <@ToxicFrog> | FIXED! |
22:35 | <@ToxicFrog> | Finally |
22:35 | <@ToxicFrog> | Based on the docs, what I'm doing should not be necessary |
22:35 | <@ToxicFrog> | But hey, it works |
22:37 | | * ToxicFrog ka-push |
22:46 | <@jerith> | Back. |
22:49 | <@jerith> | Tarinaky: I get this: |
22:50 | <@jerith> | File "/Users/jerith/code/AberByCyberscape/py/user.py", line 27, in __init__ |
22:50 | <@jerith> | state = LogInState() |
22:50 | <@jerith> | exceptions.TypeError: __init__() takes exactly 2 arguments (1 given) |
22:58 | <@Tarinaky> | Typing code, feel tired. |
22:58 | <@Tarinaky> | Get ready for bed and lie down: WIDE AWAKE |
22:58 | <@Tarinaky> | jerith: I changed it to super(LogInState,self).__init__(user) and it worked. |
22:59 | <@Tarinaky> | Or rather, it gave me a bunch of different errors that I fixed in turn and -now- it works. |
23:00 | <@jerith> | :-) |
23:00 | <@jerith> | Do what I do. Laptop in bed. |
23:00 | <@Tarinaky> | I live in a tiny coffin like room in halls. |
23:00 | <@Tarinaky> | I can reach the keyboard from bed. |
23:01 | <@Tarinaky> | The problem is I require sleep. |
23:05 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
23:05 | | mode/#code [+o himi] by ChanServ |
23:13 | | celticminstrel [celticminst@Nightstar-5d22ab1d.cable.rogers.com] has quit [Client closed the connection] |
23:17 | | SouthernMyst [Myst@Nightstar-3762b576.co.uk] has quit [Client closed the connection] |
23:19 | | You're now known as TheWatcher[T-2] |
23:22 | | Rhamphoryncus [rhamph@Nightstar-5697f7e2.abhsia.telus.net] has joined #code |
23:26 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Tue Jan 31 00:00:19 2012 |