--- Log opened Mon Feb 25 00:00:29 2013 |
--- Day changed Mon Feb 25 2013 |
00:00 | <&McMartin> | Also, do you have SBLASTER.MDI? |
00:01 | < ShellNinja> | I have irq on 5. I have no mixer, apparently, but sbmixer. |
00:01 | < ShellNinja> | Otherwise my settings are the same. |
00:01 | < ShellNinja> | Where, in the MoO2 folder? |
00:01 | <&McMartin> | Yeah |
00:01 | <&McMartin> | (I do appear to have main menu music) |
00:02 | < ShellNinja> | Yes, I have that file. |
00:02 | <&McMartin> | Mrflgnrk. I think that's where the music lives. |
00:05 | <&McMartin> | I'm getting horrible sound skipping when I run it, though; I think my settings need to be tuned. |
00:08 | < ShellNinja> | Is there any shell command I can issue that would check if the folder contains files with the same name except for case? |
00:09 | | * ShellNinja has better idea. |
00:09 | | * ShellNinja opens the patch via Windows virtual box, and overwrites using Windows detection. |
00:10 | <&McMartin> | Heh |
00:10 | <&McMartin> | (Pipe the results of ls through a lowercaser, sort results, look for duplicates~) |
00:11 | <&ToxicFrog> | ls | tr [A-Z] [a-z] | uniq -d |
00:11 | <&ToxicFrog> | gnolam: since when has Wine supported DOS? |
00:11 | < ShellNinja> | Nope, still no sound. |
00:11 | <@gnolam> | It hasn't. |
00:11 | < ShellNinja> | Well, music. |
00:12 | < ShellNinja> | Sound is okay, if somewhat weird. |
00:12 | <@gnolam> | Again: DOS /and/ Windows (95). |
00:12 | <&ToxicFrog> | Oh, I see. You mean the game is for both. |
00:12 | <&ToxicFrog> | ShellNinja: is there a configuration program where you can choose between different music settings? |
00:13 | <&ToxicFrog> | FWIW I know MoO2 music works in dosbox because it had music when I played it. |
00:13 | <&McMartin> | ToxicFrog: Yeah, checking on my GOG install there are two executiables, orion2.exe (DOS) and orion95.exe (Win95). |
00:14 | | Kindamoody|autorejoin [Kindamoody@Nightstar-05577424.tbcn.telia.com] has joined #code |
00:16 | < ShellNinja> | ToxicFrog: Doesn't seem that way. |
00:17 | <&McMartin> | I'm still wondering if it's trying to force stuff through a non-existent GM device. |
00:17 | <&McMartin> | Because, I mean, I just checked on my copy just now and it totally had music. |
00:20 | < ShellNinja> | The W95 version I have has music. But now, I must sleep. |
00:23 | <&McMartin> | Yeah, it sounds like this is some kind of DosBox config issue, not missing files |
00:34 | <&ToxicFrog> | It is not uncommon for pirated copies of things to omit anything they can possibly get away with omitting |
00:35 | <&ToxicFrog> | That said, MoO2's music is MIDI, so no-one would actually rip it. |
00:50 | <&McMartin> | OK, it's time to Ask The Duck The Question. |
00:51 | <&McMartin> | I've got a board game that I seek to present as a GUI app. I'd like to divorce the game core as much as possible from the details of the GUI. |
00:52 | <&McMartin> | I'm thinking something like a client-server model, but the message queue that this requires to make sense in the face of possibly-berzerk clients seems overwrought. |
00:52 | <&McMartin> | I'm thinking of having the referee live in its own thread, consuming game events and emitting "the game state has changed in thus and so a way" events. |
00:52 | <&McMartin> | With a separate thread responsible for, say, animating moves. |
00:53 | <&McMartin> | The thread that does animation also seems like a reasonable place to deposit raw UI events like "the player just clicked on hex (X, Y), etc." |
00:53 | <&McMartin> | But the queues, in order to make sense, need the ability to do locked produce/consume, to clear out all pending events, and to selectively enable and disable themselves. |
00:54 | <&McMartin> | That feels like a lot of overhead. |
00:55 | <&McMartin> | ... I suppose I can save a thread by having the "server" - the "referee thread" - actually just be a "call this function, get this reply" and run it in the UI processing thread, but that makes some bits clunky. |
00:55 | <~Vornicus> | "possibly-berzerk clients"? |
00:55 | <&McMartin> | If the user clicks on a bunch of hexes during the animation, they need to be swallowed, not interpreted as buffered moves. |
00:56 | <&McMartin> | Anyway, it's also kind of weird to have the referee thread be the "server" because a lot of the referee's statements are basically "the state is X, it is player Y's move, respond by telling me what it is" |
00:56 | <&McMartin> | or "these things have changed in the state. Tell the user that and acknowledge when ready" |
00:57 | <&McMartin> | ISTR the Plotkin core in Spellcast having similar issues. |
00:57 | | * Reiv muses |
00:57 | <@Reiv> | Isn't this very, very similar to what TF has been working on? |
00:58 | <&McMartin> | Felt? Not really? |
00:58 | <&McMartin> | That's two clients talking to each other over a network |
00:58 | <@Reiv> | A board game playing interface with a client/server architecture where you have to watch out for the clients going batshit... |
00:58 | <&McMartin> | I'm trying to make this be local and not also be horrible. |
00:58 | <&McMartin> | Well |
00:58 | <&McMartin> | That's because in *any* client/server you have to watch out for clients going batshit, because if nothing else, at some point someone will point Metasploit at you. |
00:59 | <&McMartin> | I'm suspecting that for a single-player setup, though, the entire model is misguided. |
00:59 | <&ToxicFrog> | Reiv: this is, AIUI, a singleplayer game; the client/server architecture is to separate model and view. |
00:59 | <&McMartin> | I was thinking of making it client/server anyway just to ensure separation of concerns. |
01:00 | <@Reiv> | Oh I see |
01:00 | <&McMartin> | (Since it would be nice to have it at least theoretically be then, say, portable to Android by swapping out the "display state to user" and "get input from user" bits and nothing else) |
01:00 | <&ToxicFrog> | The Plotkin core actually adapts to full client-server quite easily, because it's already written to run as a single X app |
01:00 | <&McMartin> | TF: Well, the part that was problematic that I recall was that it was spectacularly roundtrip-happy |
01:00 | <&ToxicFrog> | Aah |
01:00 | <&ToxicFrog> | That I honestly don't remember |
01:01 | <&ToxicFrog> | It's not realtime, messages are a few dozen bytes, traffic is cheap~ |
01:01 | <&McMartin> | Also, the design I had in mind here had three synchronized event queues, which felt like overkill. |
01:01 | <&McMartin> | In stating the problem here I'm pretty sure I can drop that to two by making the referee (the "server") wholly synchronous. |
01:02 | <&McMartin> | That then drops the event queue to the system event queue (raw mouse events, semi-interpreted ones like "move window", "select menu item", etc.), and the game's event queue ("hex (X, Y) clicked, New Game, User Has Acknowledged Message") |
01:03 | <&McMartin> | And then stuff like "User clicked the About Dialog" can live wholly outside the game core, which never sees it. |
01:04 | <&McMartin> | The primary thing I'm trying to avoid here is running the AI in the UI thread~ |
01:08 | | You're now known as TheWatcher[T-2] |
01:10 | | You're now known as TheWatcher[zZzZ] |
01:20 | <&McMartin> | I think this will ultimately work better if I rework the protocol so that it's more clearly, um, client-driven, though. |
01:20 | <&McMartin> | Right now the referee thread is demanding that the UI thread do things and then waiting for acknowledgement. |
01:20 | <&McMartin> | I think this is backwards, and it makes the state machine ludicrous. |
01:32 | <~Vornicus> | THat is backwards. |
01:45 | | * Vornicus fiddles with mvc separation on his d&d sheet |
02:04 | | * ToxicFrog wrestles with System Shock map display |
02:04 | <&ToxicFrog> | I would ideally not want to write an entire map viewer. |
02:04 | <&ToxicFrog> | On the other hand, there's a shitload of information to be displayed here. |
02:04 | <&ToxicFrog> | I wonder if I could do something with HTML5? |
02:05 | <&McMartin> | I hear the Canvas entity is pretty badass |
02:07 | <&ToxicFrog> | I'm looking at that now, and yeah, it looks it |
02:08 | <&ToxicFrog> | I just need to handle mouse events on it |
02:08 | | * ToxicFrog rummages for documentation |
02:09 | <@Reiv> | what are you doing man |
02:09 | <&ToxicFrog> | Upgrading this: http://funkyhorror.ancilla.ca/toxicfrog/projects/shockmap/ |
02:11 | <&ToxicFrog> | In particular, I need to be able to display the locations of keycards, implants, code panels (and the codes for them), software upgrades, cyberjacks, and CPU nodes |
02:11 | <@Reiv> | Oh man, oldschool maps |
02:11 | <@Reiv> | Half Life was an incredible game, there is no argeument. |
02:12 | <@Reiv> | But its legitimising highly linear maps, even if they themselves did fantastically well, still has a lot to answer for in the wider gameverse~ |
02:14 | <&ToxicFrog> | Yeah, as much as I like Half-Life it does seem to have popularized the corridor shooter |
02:14 | <&ToxicFrog> | I miss LGS map design. |
02:14 | <&ToxicFrog> | Ok, KineticJS looks like what I need. |
02:17 | <~Vornicus> | TF: can you get it to build an actual, um. Can you make the things colored by actual floor altitude? |
02:17 | <&ToxicFrog> | Yes. |
02:18 | <~Vornicus> | woot |
02:18 | <@Reiv> | That's a good idea. |
02:18 | <&ToxicFrog> | Although I was just planning to use the same colouration the in-game map uses (different shades of green for "impassable wall", "ledge too tall to jump", and "ledge short enough to jump", without bothering to mark slopes or the like) |
02:27 | <~Vornicus> | Steep enough slopes, you slide down them, right? |
02:28 | | Attilla [chatzilla@Nightstar-87646183.range86-143.btcentralplus.com] has quit [Ping timeout: 121 seconds] |
02:29 | <&ToxicFrog> | In principle yes, in practice the only example of this I can think of is NICE JUMP, HUMAN in the Cargo Pits. |
02:30 | <&ToxicFrog> | Also, I don't actually know what the limits on slope steepness are, that field has yet to be reverse engineered beyond "controls slope somehow" |
02:32 | <@celmin|busy> | Oh wow, :: is being added to Java? |
02:33 | <~Vornicus> | wat |
02:33 | <~Vornicus> | How would it need that? |
02:33 | <@celmin|busy> | Part of the lambdas proposal. |
02:34 | <@celmin|busy> | To get a reference to a method. |
02:34 | <&ToxicFrog> | Ok, KineticJS is nice but it really needs better documentation. |
02:36 | <@Reiv> | ... what on earth would it be used for? |
02:37 | <@celmin|busy> | Hm? |
02:47 | <@Reiv> | How's the :: syntax going to be used? |
02:48 | <&McMartin> | "to get a reference to a method", he said |
02:48 | <&McMartin> | So, C# delegates |
02:53 | <@celmin|busy> | It can do both bound and unbound. |
02:53 | | * celmin|busy was reading this: http://cr.openjdk.java.net/~briangoetz/lambda/lambda-state-4.html |
02:54 | <@celmin|busy> | (Which I found from here: http://openjdk.java.net/projects/lambda/ ) |
03:07 | | * ToxicFrog stabs javascript closure behaviour a few times |
03:20 | | Rhamphoryncus [rhamph@Nightstar-f8b1f87b.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
03:21 | | VirusJTG [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [[NS] Quit: Program Shutting down] |
03:30 | | Rhamphoryncus [rhamph@Nightstar-f8b1f87b.abhsia.telus.net] has joined #code |
03:30 | | mode/#code [+o Rhamphoryncus] by ChanServ |
04:20 | | syksleep is now known as Syk |
04:37 | | mac [mac@Nightstar-fe8a1f12.il.comcast.net] has joined #code |
05:06 | | Kindamoody|autorejoin is now known as Kindamoody |
05:36 | | mode/#code [+o Kindamoody] by ChanServ |
06:06 | | Derakon is now known as Derakon[AFK] |
06:27 | | ErikMesoy|sleep is now known as ErikMesoy |
06:43 | | Kindamoody is now known as Kindamoody|out |
07:15 | | mac [mac@Nightstar-fe8a1f12.il.comcast.net] has left #code ["Leaving"] |
07:39 | <~Vornicus> | The middle of a large-scale refactor feels really weird. |
07:40 | < jeroud> | Vornicus: I've done three of those recently. |
07:41 | <~Vornicus> | A while ago, I had a monolith of steel. |
07:41 | < jeroud> | Two of them big enough that they're actually "rearchitect" rather than "refactor". |
07:41 | <~Vornicus> | Soon, I will have another monolith of steel, in the same shape, but all the pieces are in different places. |
07:42 | <~Vornicus> | Right now? I have a living room full of taffy. |
07:42 | <&McMartin> | Is it at least delicious taffy? |
07:43 | <&McMartin> | (No. It is poison taffy.) |
07:43 | <~Vornicus> | It might be, but I'm too busy turning it back into a monolith. |
07:46 | < jeroud> | Ah, you're on the boundary of the two phases of refactoring. I like to call them "break all the things" and "fix all the things". |
07:48 | < jeroud> | Having decent test coverage is a good way to know when you've finished fixing things. |
07:49 | < Syk> | i have never written a unit test |
07:49 | <~Vornicus> | For shame |
07:49 | < Syk> | c: |
07:49 | < Syk> | I don't even know how c: |
07:49 | <~Vornicus> | This really is a rearchitect; I've gone from mostly ad-hoc to strictly MVC |
07:51 | <~Vornicus> | Which means my event handlers have been strewn across three counties. |
07:53 | < jeroud> | My current rearchitecting is about replacing a bunch of ad-hoc message routing magic that has little bits of functionality all over the place with a routing table that gets updated by all the places and is a central authority for routing. |
07:54 | < jeroud> | Syk: Have a look at some code with good tests. Twisted is a great example. |
07:54 | < Syk> | yeah but |
07:54 | < Syk> | lazy |
07:54 | < Syk> | my code is deathly simple :( |
07:55 | < jeroud> | I'm too lazy to not have tests. |
07:55 | < jeroud> | Simple code breaks too. |
07:55 | < Syk> | heh |
07:55 | < Syk> | also |
07:55 | < Syk> | markdown for page content [y/n] |
07:55 | < jeroud> | What kind of page content? |
07:55 | < Syk> | website page content |
07:56 | < Syk> | jeroud: making a easy to use website builder thing for small businesses |
07:56 | < Syk> | wondering if md counts as 'easy to use' for the general person |
07:57 | < jeroud> | There are lots of those already. Probably not worth the effort of building yet another one. |
07:57 | < Syk> | jeroud: it's more focused than that, really |
07:57 | < Syk> | but that's the 'one line description' |
07:57 | < Syk> | (it's more of a 'overall services' thing) |
07:58 | < Syk> | uh 'business services' thing |
07:59 | < Syk> | ...it makes sense, I swear >v> |
07:59 | | Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has quit [Ping timeout: 121 seconds] |
07:59 | | You're now known as TheWatcher |
08:01 | < jeroud> | Syk: Some kind of wysiwyg thing is probably better for that market. |
08:01 | < Syk> | jeroud: it's going to be mainly set up by me, but with optional editing access |
08:02 | | Courage [Moltare@583787.FF2A18.190FE2.4D81A1] has joined #code |
08:02 | | mode/#code [+o Courage] by ChanServ |
08:02 | < Syk> | so... I guess that Markdown would be good (since then I can use it without dealing with yet more HTML shit) |
08:02 | < jeroud> | Anyway, back to tests. Write some for your simple code to get the hang of it. |
08:03 | < jeroud> | Two mandatory things in any project I work on are VCS and automated tests. |
08:03 | < Syk> | i have the former |
08:03 | < Syk> | although i'm shit at committing |
08:03 | | * Vornicus will finally be able to automate some tests when he gets this separated. |
08:04 | < jeroud> | The first lets you stop worrying about losing stuff that already works. |
08:04 | < Syk> | this is my average git commit: "10 files changed, 244 insertions(+), 14 deletions(-)" |
08:05 | < jeroud> | The second lets you stop worrying about breaking stuff that already works. |
08:05 | < jeroud> | Syk: You might need to work on fewer things at once. |
08:05 | < Syk> | possibly! |
08:06 | < Syk> | this is just getting the core thing working |
08:07 | < jeroud> | How big is the "core thing"? |
08:07 | < Syk> | python is 148 lines of code |
08:08 | < Syk> | sql is about twenty |
08:08 | < jeroud> | Or rather, how small can you possibly make it? |
08:08 | < Syk> | html and css is about a thousand all up |
08:29 | <~Vornicus> | 20 lines of SQL for me is typically about one query. |
08:29 | < Syk> | lol |
08:29 | < Syk> | i make my sql one giant line |
08:29 | < Syk> | because lol |
08:30 | | * Vornicus is very promiscuous with linebreaks in sql. |
08:37 | <@TheWatcher> | Syk: ... you do realise I'm going to have to hate you now, right? |
08:37 | < Syk> | TheWatcher: why is this |
08:39 | <@TheWatcher> | on giant line, really? |
08:39 | < Syk> | TheWatcher: I split WHERE and LEFT JOIN and etc onto new lines |
08:39 | < Syk> | but otherwise I prefer to have the defs in long lines |
08:41 | <~Vornicus> | I build a SELECT and it's got one line for each field it comes up with and one line for each condition and... |
08:55 | | celmin|busy [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: And lo! The computer falls into a deep sleep, to awake again some other day!] |
09:09 | <~Vornicus> | nerp. okay there is something I missed about mvc - obviously really the model knows nothing about the view. But I find myself with calls to the view (when all the actual modeling is done) to tell the view stuff's changed. I'm trying to figure out what the right way to do this is. |
09:12 | <&jerith> | Vornicus: "view" is basically "HTML template", right? |
09:13 | <&jerith> | I think the standard mechanism is to have the model fire events (or call callbacks or whatever) that the controller notices and passes on. |
09:13 | <~Vornicus> | jerith: pretty much. |
09:14 | <&jerith> | I actually prefer Django's Model/View/Template nomenclature. |
09:16 | <~Vornicus> | which is to say that the "controller" is now the "view" and the "view" is now the "template"? |
09:17 | <&jerith> | Pretty much. |
09:18 | <~Vornicus> | all this is js actually, it's a "static page" but there's all sorts of good javascript going on underneath. |
09:18 | <~Vornicus> | So the client-server model of django rails zope whatever doesn't exactly fit. |
09:19 | <&jerith> | https://en.wikipedia.org/wiki/Model%96view%96controller |
09:21 | <~Vornicus> | Oh. I guess I kind of am doing it right. |
09:26 | <~Vornicus> | I may need to make it more flexible later - hand the model the view hooks and go to town. but. |
09:59 | | Attilla [chatzilla@Nightstar-87646183.range86-143.btcentralplus.com] has joined #code |
11:05 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
12:20 | <@froztbyte> | https://thoughtstreams.io/froztbyte/dumb-and-obvious-thoughts-about-parsing-bina ry-pro/#card-1415 |
12:51 | <&ToxicFrog> | I'm totally going to steal some features from that for the 2.x release of vstruct~ |
12:51 | <&ToxicFrog> | ('that' being Construct) |
12:54 | <&ToxicFrog> | Question: how do you validate message length? You kind of handwave that. |
12:56 | <@froztbyte> | oh, well, that pretty much depends on the message, I guess |
12:56 | <@froztbyte> | I mean, if you have a variable-length thing, you have to scan up to the next message header, then chuck it all into a parses and check the results |
12:57 | <@froztbyte> | if you have (supposedly) fixed-length, you can just make sure your next message starts after data[0:len(aMessage]) |
12:57 | <&ToxicFrog> | Yeah, that doesn't seem sufficiently rigorous |
12:57 | <@froztbyte> | this is why there are so many buffer overflow bugs... |
12:58 | <@froztbyte> | (and underflow) |
12:58 | <@froztbyte> | ToxicFrog: I guess you'd have to have message checksumming, and readahead? |
12:58 | <&ToxicFrog> | I mean, if the message is a 4-byte header and then N bytes of message, and you have a 4+12 byte message, a 4+4 byte message, and a 4+N byte message, but the 12 bytes get truncated to 4, then the end of the first message is immediately followed by a valid message header |
12:58 | <@froztbyte> | yes, exactly |
12:59 | <&ToxicFrog> | It's just that that's the header for the third message, and most of the first message has been incorrectly replaced with the second message. |
12:59 | <@froztbyte> | in the protocol that I have to deal with here |
12:59 | <&ToxicFrog> | And if "you just scan up to the next message header", now you aren't allowed to have payload contents that look like a message header. |
12:59 | <@froztbyte> | a message is 66 bytes, and the header is \x05\x02\x01\x01 |
12:59 | <&ToxicFrog> | (and of course if you're running on top of TCP this should never happen anyways~) |
13:00 | <@froztbyte> | ToxicFrog: yes, but that's a protocol-level thing |
13:00 | <@froztbyte> | lemme pastebin this quick |
13:01 | <@froztbyte> | http://slexy.org/view/s21DYCslI2 |
13:01 | <@froztbyte> | I only just wrote nValidate, so it's not tested yet |
13:01 | <@froztbyte> | but that's the general idea |
13:01 | <@froztbyte> | (and I still need to write the fail-clause in the while loop) |
13:01 | <@froztbyte> | (and some more shuffling) |
13:02 | <@froztbyte> | but yeah, there's a somewhat fuzzy fine line between "common mistakes" and "how to generally do protocol handling" |
13:02 | <@froztbyte> | I suspect the latter is built up mostly out of wisdom and experience, because you get tons of dumb protocols |
13:02 | <&ToxicFrog> | (also, there are so many buffer overrun vulnerabilities because people keep using strcpy() rather than strncpy()~) |
13:03 | <@froztbyte> | this is much the same thing |
13:03 | <@froztbyte> | just a different form of it |
14:10 | < Xon> | strcpy isn't so bad that you can't properly safely use it =p |
14:10 | < Xon> | which is more than you can say for some string functions |
14:10 | <@TheWatcher> | yes, yes it is |
14:10 | < Xon> | but strcpy is really fucking horrible |
14:11 | <@TheWatcher> | there is absolutely no reason why you should not ever explicitly limit string operations |
14:14 | <&ToxicFrog> | Man, these tiles are stored in the most awkward way possible |
14:14 | <&ToxicFrog> | Convention in most things is that (0,0) is in the upper left, right? |
14:14 | < Xon> | TheWatcher, oh I agree. tbh having a sane string type would have solved a lot of problems |
14:15 | <@TheWatcher> | TF: Or bottom left in some cases, but yes |
14:15 | <&ToxicFrog> | These are stored row-major from the bottom up. |
14:15 | <&ToxicFrog> | They're ideally situated if you want to do (row,column) addressing with southwest gravity. |
14:16 | <@froztbyte> | the only reason there wasn't a sane string type is because all the C-turds liked their "power of being able to directly manipulate the dataassasas!!" more |
14:16 | <&ToxicFrog> | Unfortunately, that's not what I want to do. |
14:16 | < Xon> | ToxicFrog, strncpy is still kinda shitty |
14:16 | <&ToxicFrog> | Xon: well, yeah, any string manipulation in C is kinda shitty |
14:16 | <&ToxicFrog> | froztbyte: erwhat |
14:16 | <&ToxicFrog> | C was explicitly designed to be processor-agnostic assembler. |
14:17 | <&ToxicFrog> | The whole point is to be able to do everything you can do in asm, without significant performance sacrifices and without needing to rewrite the entire program when you port it from VAX to PDP-11. |
14:18 | <@froztbyte> | ToxicFrog: oh, sorry, I guess that wasn't really clear |
14:18 | <@froztbyte> | it's like the people who hate python because of "all these newfangled objects and things" |
14:18 | <@froztbyte> | their way of thinking is pretty much stream-based |
14:18 | <&ToxicFrog> | Yeah, uh |
14:18 | <&ToxicFrog> | C was developed in 1969 |
14:18 | <@froztbyte> | and built around directly fiddling with the bits |
14:19 | <@froztbyte> | so there's people who like that, and will just *forever* keep on using that |
14:19 | <@froztbyte> | ToxicFrog: something like Boost wasn't necessarily impossible |
14:19 | <@froztbyte> | I mean it doesn't have to be baked into the languages to be widely used |
14:19 | <&ToxicFrog> | It wasn't a pushback against HLLs, it was "we want to be able to write device drivers without drinking ourselves to death" |
14:21 | <@gnolam> | froztbyte: I can't parse what you said other than "it should've been in the language". Which goes against what C /is/. |
14:21 | <@gnolam> | *than as |
14:21 | <@froztbyte> | eh |
14:21 | <@froztbyte> | I'm too tired to formulate it better, either |
14:21 | <@froztbyte> | but no matter |
14:21 | <&ToxicFrog> | (specifically, K&R developed C because they wanted something better than raw PDP-11 ASM or BCPL to implement UNIX in, and the C89 standards committee approached it with the same mindset - it's a "friendly assembler" systems programming language.) |
14:21 | <@froztbyte> | this is not a particularly important point for me :) |
14:22 | <@gnolam> | And it's the reason _every single thing that you can target_ has a C compiler. |
14:22 | <&ToxicFrog> | (this is the same reason it doesn't have array bounds checking or garbage collection - it's not meant to replace Lisp or FORTRAN, it's meant to replace assembler) |
14:23 | | * TheWatcher ponders the madness of writing a c compiler in jython |
14:23 | < Syk> | interpreted c! |
14:24 | <@TheWatcher> | No, make it an actual compiler. Use a trollface as the project logo.... |
14:24 | <&ToxicFrog> | Interpreted C is actually a thing. |
14:24 | <&ToxicFrog> | It's called Ch. |
14:24 | < Syk> | does compiled python exist |
14:24 | <@froztbyte> | yes |
14:24 | < Syk> | because that would be neat |
14:25 | <@froztbyte> | in multiple forms |
14:25 | < Syk> | is it any good |
14:25 | <&ToxicFrog> | Depends on what you mean by "compiled", but yes. |
14:25 | <@froztbyte> | py2exe, pypy, etc |
14:25 | < Syk> | ToxicFrog: statically linked i suppose |
14:25 | <&ToxicFrog> | There's compiled to bytecode images (.pyc), there's JIT PVM implementations (pypy), there's packaged with the interpreter executable (py2exe)... |
14:25 | < Syk> | spits out a self-running executable |
14:25 | <&ToxicFrog> | Oh, and there's cython |
14:25 | <@froztbyte> | I mean, you could argue that most .net is operationally the same as a .pyc? since it all goes to CLF and whatnot |
14:26 | <&ToxicFrog> | For "self-running executable" you want py2exe, but that doesn't compile it to machine code, it bundles the source (or bytecode) and interpreter into a single executable. |
14:26 | < Syk> | also why doesnt the main file get made .pyc |
14:27 | < Xon> | ToxicFrog, technically, but .net has had a working JIT from day one and is designed to compile down to native code and doesn't have an interpreter which can run C# |
14:27 | < Xon> | (or the pseudo-asm they use0 |
14:28 | <&ToxicFrog> | Xon: I think you meant to reply to froztbyte ? |
14:28 | < Xon> | yeah |
14:28 | < Syk> | .net doesnt compile to native |
14:29 | < Syk> | iirc |
14:29 | < Xon> | (Mono has a .Net interpreter) |
14:29 | < Syk> | its still fairly abstracted |
14:29 | < Xon> | Syk, C# compiles to CLI |
14:29 | < Xon> | CLI is compiled/JITed into native code |
14:29 | < Xon> | *then* it is executed |
14:30 | < Syk> | the cli thing makes me lol |
14:30 | < Syk> | because I do vb.net if i have to do .net |
14:30 | < Xon> | under .NET, the entire function needs to be JITed/compiled before it can be executed |
14:30 | < Syk> | and i lol at the C# users who have inferior syntax and standard library, for no speed gain |
14:31 | < Syk> | it makes me happy inside |
14:31 | < Xon> | (tho you can do fancy tricks where it can discard the native image, rebuild the CLI methor and the debugger trigger the JIT and reset the instruction pointer) |
14:32 | < Xon> | why the fuck would you use vb.net? |
14:33 | <&ToxicFrog> | Xon: CIL. Common Intermediate Language. |
14:33 | <&ToxicFrog> | CLI is the Common Language Infrastructure, the specification for CIL, the base libraries, etc |
14:34 | < Xon> | I kinda hate that. just need to transpose 2 letters =\ |
14:35 | < Syk> | xon: better language than C# |
14:35 | < Syk> | c: |
14:36 | < Syk> | the standard library is nicer and the language isn't as obtuse |
14:37 | < Syk> | anyway i have some serious pain and cramps so i'm going to watch whose line is it anyway and sleep |
14:38 | | Syk is now known as syksleep |
14:58 | < Shiz> | >vb.net better than c# |
14:58 | < Shiz> | u wot |
15:02 | < syksleep> | Shiz: C# has no benefits c: |
15:02 | < Shiz> | a sane syntax for one |
15:02 | < Shiz> | linq |
15:02 | < Shiz> | generics that don't make you want to stab your eyes out |
15:02 | < syksleep> | c syntax is not sane |
15:02 | < syksleep> | linq is stupid |
15:02 | < Shiz> | hell of a lot more sane than fucking basic |
15:03 | < syksleep> | better than semicolon and curly bracket land, USA |
15:03 | < Shiz> | no |
15:04 | < syksleep> | yes c: |
15:05 | < syksleep> | it doesn't matter anyway, since .NET is crap as a whole |
15:05 | | * syksleep goes to slep |
15:05 | | * TheWatcher eyes |
15:06 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
15:07 | <@gnolam> | Re: the lame-off there: is "c:" supposed to be an emoticon? Because I only parse it as "oops, tried to switch drives in the wrong window". |
15:07 | < Shiz> | it's supposed to be a reversed :) |
15:07 | < Shiz> | for extra snarkiness |
15:09 | <@TheWatcher> | Of course it is. |
15:14 | < ShellNinja> | What package do I need to have access to the "svn" command under Debian? |
15:15 | | d4de [olorin@4B91FF.00BEE6.E394BC.59ED7B] has quit [Ping timeout: 121 seconds] |
15:15 | | d4de [olorin@687AAB.418D22.06F82B.4AC788] has joined #code |
15:17 | <&ToxicFrog> | ShellNinja: 'subversion' |
15:19 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
15:19 | | mode/#code [+o himi] by ChanServ |
15:19 | < ShellNinja> | Thank you. |
15:24 | <&ToxicFrog> | I note that on Ubuntu/Mint, you can just type the command and it'll tell you what package you need: |
15:24 | <&ToxicFrog> | ben@thoth:~/devel/ss1edit$ svn |
15:24 | <&ToxicFrog> | The program 'svn' is currently not installed. You can install it by typing: |
15:24 | <&ToxicFrog> | sudo apt-get install subversion |
15:24 | <&ToxicFrog> | I don't know if that's a holdover from Debian or something Ubuntu addded, though. |
15:26 | <@froztbyte> | ubuntu flavouring |
15:26 | <@froztbyte> | but it's some bash and python (last I looked), so it's pretty portable |
15:28 | <&ToxicFrog> | \o/ http://hastebin.com/raw/tudagabasi |
15:31 | <@TheWatcher> | Yey \o/ |
15:33 | <&ToxicFrog> | Now I just need to generate pretty HTML5 output instead. |
15:33 | < Shiz> | froztbyte: it uses apt |
15:33 | < Shiz> | so I imagine it's not really portable |
15:33 | <&ToxicFrog> | Well, that and process the object tables. |
15:33 | <@froztbyte> | well, portable to debian, or any other debian-based |
15:34 | <@froztbyte> | but I don't care too much about other distros anyway |
15:34 | | * froztbyte can work on them if required, and will typically be filled with lots of rage |
15:34 | | * TheWatcher patpats |
16:20 | <@gnolam> | I feel dirty for linking Dilbert, but... |
16:20 | <@gnolam> | http://www.dilbert.com/2013-02-24/ |
18:08 | | JustBob [justbob@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection] |
18:09 | | JustLurk [justbob@ServerAdministrator.Nightstar.Net] has joined #code |
18:09 | | JustLurk is now known as JustBob |
18:32 | | Kindamoody|out is now known as Kindamoody |
19:22 | | Kindamoody is now known as Kindamoody[zZz] |
20:07 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
20:07 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
20:27 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
20:27 | | mode/#code [+ao Derakon Derakon] by ChanServ |
20:28 | | * Derakon eyes his code, which is reporting that type(LightHandler()) is "<type 'instance'>". |
20:28 | <&Derakon> | So, no wonder my code is failing to recognize when the lights come on~ |
20:31 | <&Derakon> | Oh right, I want isinstance(), not type(). Durrr. |
20:44 | < Shiz> | you really don't want to use isinstance() in python |
20:50 | <&Derakon> | Your unsubstantiated opinion has been noted and ignored. |
20:52 | <&McMartin> | I will substantiate it with "Python has duck typing; using isinstance makes your architecture intrinsically more brittle" |
20:54 | <&Derakon> | Mm, a fair point, but in this case I already have objects registering themselves to a depot effectively based on their typing. |
20:54 | <&Derakon> | So there's no additional brittleness. |
20:56 | <&Derakon> | Though that does make me realize that instead of using isinstance I can just ask the device depot for a list of all of its light sources and check if the given device handler I'm operating on is in there. |
21:21 | | Rhamphoryncus [rhamph@Nightstar-f8b1f87b.abhsia.telus.net] has quit [Ping timeout: 121 seconds] |
21:23 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
21:23 | | mode/#code [+o celticminstrel] by ChanServ |
21:24 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [Client closed the connection] |
21:24 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
21:24 | | mode/#code [+o celticminstrel] by ChanServ |
21:25 | | Rhamphoryncus [rhamph@Nightstar-f8b1f87b.abhsia.telus.net] has joined #code |
21:26 | | mode/#code [+o Rhamphoryncus] by ChanServ |
21:30 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving] |
21:38 | <@iospace> | XP EMBEDDED IS BOOTING WHAT THE FUCK IS GOING ON |
21:38 | <@Tamber> | You're hallucinating. |
21:41 | <@iospace> | Tamber: i must be |
21:52 | <@iospace> | it failed |
22:20 | <&jerith> | Derakon isn't here, but type(foo) returns a type of "instance" if foo is an instance of an old-style class. |
22:21 | <&jerith> | isinstance() is actually somewhat useful in Python as long as you're careful about where you use it. |
22:22 | <&jerith> | "isinstance(foo, basestring)" is almost invariably the right thing. "isinstance(foo, dict)" is often the wrong thing. |
22:23 | <&jerith> | If you're doing complicated things with polymorphism and duck typing, you probably want zope.interface. |
22:23 | <&jerith> | But sleep. |
22:43 | | Derakon[AFK] is now known as Derakon |
22:46 | <&Derakon> | Jerith: yeah, my brain wasn't entirely on-board today, so I forgot about that "instance" thing for instantiations of old-style classes. |
22:50 | <~Vornicus> | why are you using old-style classes anyway? |
22:58 | | ErikMesoy is now known as ErikMesoy|sleep |
22:59 | <&Derakon> | Force of habit, mostly. |
23:00 | <&Derakon> | Using new-style requires minor positive action (inheriting from Object) and I just don't remember and can't be arsed to fix it after the fact, since I don't see much difference. |
23:30 | | You're now known as TheWatcher[T-2] |
23:41 | | You're now known as TheWatcher[zZzZ] |
--- Log closed Tue Feb 26 00:00:06 2013 |