--- Log opened Fri May 31 00:00:52 2013 |
00:10 | | Reiv [NSwebIRC@Nightstar-95746c1f.kinect.net.nz] has joined #code |
00:10 | | mode/#code [+o Reiv] by ChanServ |
00:14 | <@Azash> | small basic computer adventures |
00:14 | <@Azash> | Oops |
00:14 | <@Azash> | https://bugs.launchpad.net/renpy/+bug/417439 |
00:14 | <@Azash> | There we go |
00:14 | <@Tamber> | *snrk* |
00:15 | <@Tamber> | Hooray, open-source software \o/ |
00:29 | | * Azash reads Oregon Trail source: "6310 IF 100*RND(-1)<100-(40/4**(E-1)) THEN 6410" |
00:30 | <@Azash> | Yes, exactly |
00:31 | <&McMartin> | Oregon Trail source wat |
00:31 | | 459AAERZ5 is now known as Derakon |
00:32 | <&McMartin> | Also, man |
00:33 | <&McMartin> | I really ought to try to get Archie and Mehitabel's Guide To Almost Painless Structured Basic working in DOSBOX |
00:34 | <&McMartin> | It's a 30 KLOC BASIC program about how to write 30 KLOC BASIC programs without going mad |
00:35 | <@Azash> | McMartin: 18:06 * Azash gets a brilliant IRC bot idea: An oregon trail bot that lets you take an action every 15 minutes |
00:36 | <&McMartin> | Yeah, I remember that |
00:36 | <&McMartin> | But your most recent comment implied you had access to the old sources |
00:36 | <@Tamber> | McM: The problem there is it assumes you're writing 30kLOC BASIC programs without already being mad. :) |
00:36 | <@Azash> | McMartin: I have a copy here, yeah |
00:37 | <&McMartin> | Is it online somewhere? |
00:37 | <@Azash> | 10 REM PROGRAM NAME - OREGON VERSION: 01/01/78 |
00:37 | <@Azash> | 20 REM ORIGINAL PROGRAMMING BY BILL HEINEMANN - 1971 |
00:37 | <@Azash> | http://deserthat.files.wordpress.com/2010/11/oregon1.doc |
00:37 | | * McMartin likes to collect sources of formative games of yore |
00:37 | <&McMartin> | Many thanks |
00:38 | <&McMartin> | "For explanations of what variable names mean, list lines XXXX-YYYY" |
00:38 | <&McMartin> | In the days before Doxygen, this is how we rolled |
00:38 | <&McMartin> | And good for him for so doing. |
00:39 | | * McMartin has the original Prince of Persia sources around here somewhere, too |
00:39 | <@Azash> | Share |
00:40 | <&McMartin> | Oh man, do I have the machine versions |
00:40 | <&McMartin> | For the full effect I printed it out |
00:40 | <@Azash> | Oh dear |
00:40 | <@Tamber> | Full effect on target? |
00:41 | | * Tamber imagines a sizable machine-listing being dropped, winces |
00:41 | <&McMartin> | https://github.com/jmechner/Prince-of-Persia-Apple-II |
00:41 | <&McMartin> | It turns out that when you only have 128KB of RAMs, there's a real limit to size |
00:41 | <&McMartin> | http://jordanmechner.com/blog/2012/04/source/ |
00:41 | <@Azash> | Cheers |
00:42 | <&McMartin> | Ha ha ha ha ha ha ha ha ha |
00:42 | <&McMartin> | "Jamie -- who knows the term "source code" primarily as the title of the movie Jake Gyllenhaal did after Prince of Persia" |
00:42 | <&McMartin> | How did I miss that line the first time |
00:42 | <&McMartin> | I would have been quoting it *all the time* |
00:42 | <@Azash> | :P |
00:52 | | * McMartin reads the context behind that source code |
00:52 | | Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
00:53 | <&McMartin> | This ought to be easy (though not trivial, as there are real-time elements) to port. |
00:54 | <&McMartin> | ( http://deserthat.wordpress.com/2010/11/07/oregon-trail-ver-3-basic-3-1-1978/ ) |
00:55 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
00:57 | | Derakon_ is now known as Derakon |
00:57 | | mode/#code [+ao Derakon Derakon] by ChanServ |
00:57 | | himi [fow035@D741F1.243F35.CADC30.81D435] has joined #code |
00:57 | | mode/#code [+o himi] by ChanServ |
01:00 | <@Azash> | McMartin: I'm not porting it as much as taking the logic from behind the code |
01:01 | <@Azash> | As I need to have it in a form that preferable generates one message per prompt-to-act, no more than two |
01:03 | | * McMartin nods |
01:03 | <&McMartin> | Yeah. I was referring to the bit at the end where he laments not having a working emulator |
01:03 | <@Azash> | Ah |
01:03 | <&McMartin> | I see you are several steps ahead of me ;-) |
01:03 | <@Azash> | My bad |
01:03 | <@Azash> | Haha |
01:03 | <@Azash> | I'd be wary of thinking that of anyone in this channel really |
01:03 | | * Azash is a lazy novice |
01:04 | <&McMartin> | I guess I count as a vet now, though I hope to remain ungrizzled for a while |
01:04 | <&McMartin> | But being easily distracted produces similar results, and, well, 70s BASIC games are structurally pretty simple |
01:04 | | Turaiel[Offline] is now known as Turaiel |
01:04 | <&McMartin> | ... they're all Liftoff reskins, come to think of it |
01:04 | <&McMartin> | 10 ALLOCATE RESOURCES |
01:04 | <&McMartin> | 20 UNLEASH RANDOM DISASTERS IN WORRYING DETAIL |
01:04 | <&McMartin> | 30 GOTO 10 |
01:05 | | Turaiel is now known as Turaiel[Offline] |
01:08 | | Turaiel[Offline] is now known as Turaiel |
01:09 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has quit [[NS] Quit: Gone.] |
01:12 | | RichyB [RichyB@D553D1.68E9F7.02BB7C.3AF784] has joined #code |
01:18 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
01:34 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
01:34 | | mode/#code [+ao Derakon Derakon] by ChanServ |
01:39 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
01:40 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
01:40 | | mode/#code [+ao Derakon Derakon] by ChanServ |
01:50 | | gnolam [lenin@Nightstar-b2aa51c5.cust.bredbandsbolaget.se] has quit [[NS] Quit: Rebooty Call] |
01:52 | | gnolam [lenin@B19C04.C4B928.3477B4.1341ED] has joined #code |
01:52 | | mode/#code [+o gnolam] by ChanServ |
01:59 | <&ToxicFrog> | ahahahahahaha what in the entire fuck |
01:59 | <&ToxicFrog> | In the year 2013, GNU Make still doesn't handle filenames with spaces in them |
02:00 | <@gnolam> | Still? Jesus Christ. |
02:04 | <&McMartin> | That would be selling out to M$ |
02:06 | <@gnolam> | Sadly, that is probably the exact reasoning. |
02:07 | <@gnolam> | Dollar sign and all. |
02:08 | <&ToxicFrog> | You know, I was kind of considering looking for another build tool that could be deployed as a stand-alone thing |
02:08 | <&McMartin> | At least the FSF admits now that MSVS's linking ABI is not mysteriously intrinsically incompatible with the LGPL |
02:08 | <&ToxicFrog> | But you know what, fuck it |
02:08 | <&ToxicFrog> | I'll just use bash |
02:09 | <&McMartin> | Welcome to the UQM project, five years ago. -_- |
02:09 | <&McMartin> | At some point I will need to learn SCons, I think. |
02:12 | <&ToxicFrog> | I was considering waf, since that's self-contained |
02:12 | <&ToxicFrog> | Normally I'd go for pm but I must finally admit that that is a dead project |
02:13 | | * McMartin decides it's time to head into the office, as while WFH is nice, it does not have as good restaurants nearby. |
02:18 | <&Derakon> | So you're going in to the office to get dinner? |
02:19 | <&McMartin> | Actually, to check in on a couple of things, and then go somewhere nearer the office to get dinner thereby. |
02:28 | | Turaiel is now known as TurShower |
02:39 | | Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
02:41 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
03:00 | | TurShower is now known as Turaiel |
03:12 | | Kindamoody[zZz] is now known as Kindamoody |
03:23 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
03:23 | | mode/#code [+ao Derakon Derakon] by ChanServ |
03:24 | | Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out] |
03:51 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code |
03:51 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
04:11 | | Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
04:12 | | VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has quit [[NS] Quit: Program Shutting down] |
04:13 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
04:39 | <~Vornicus> | Hm. Is the latest version of inform in fact 6G30? |
04:40 | <~Vornicus> | er, 6G60, I can type? |
04:44 | <&McMartin> | YEs, still 6G |
04:49 | <~Vornicus> | (I was concerned mostly because it has an update date of, uh, three years ago) |
04:51 | < Derakon_> | IF is a stable technology~ |
04:54 | <&McMartin> | Life happened, also, and I think the plan is less to add stuff at this point and more refactor it so that other people can actually continue it later |
04:58 | < JBeshir> | Refactor + Life happening usually means "dead project" IME |
04:58 | < Derakon_> | Not dead; only sleeping. |
05:14 | | VirusHome [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has joined #code |
05:15 | | Pandemic [VirusJTG@Nightstar-09c31e7a.sta.comporium.net] has quit [Ping timeout: 121 seconds] |
05:29 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
05:29 | | mode/#code [+ao Derakon Derakon] by ChanServ |
05:32 | | Derakon_ [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
05:33 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
05:34 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
05:34 | | mode/#code [+ao Derakon Derakon] by ChanServ |
05:50 | | * Vornicus completely derps at this code he just made. How could he have missed that one. |
06:16 | | AverageJoe [evil1@61024F.B1DB7D.E87B5D.526FE4] has joined #code |
06:20 | <&Derakon> | Okay, Thomas Was Alone is pretty quality. |
06:20 | <&Derakon> | And I'm quite happy that they make use of what I initially thought was a glitch. |
06:20 | <&Derakon> | (After showing it to you so you know it's actually a thing) |
06:22 | <&Derakon> | At any rate it's done a good job of clearing the stress from dealing with Comcast~ |
06:32 | | Derakon[AFK] [Derakon@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
06:34 | | Derakon [Derakon@Nightstar-a3b183ae.ca.comcast.net] has quit [Operation timed out] |
06:57 | | Turaiel is now known as Turaiel[Offline] |
06:59 | | * Vornicus blibbleblibbleblibbs. Feels really silly. |
07:00 | <~Vornicus> | It's like I can't math at all today. |
07:09 | < Syka> | I had that last night |
07:09 | < Syka> | 26 + 26 + 10 + 2 last night was 72 to me |
07:23 | | You're now known as TheWatcher |
07:41 | | himi [fow035@D741F1.243F35.CADC30.81D435] has quit [Ping timeout: 121 seconds] |
07:43 | | celticminstrel [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!] |
08:19 | | cpux|2 [cpux@Nightstar-98762b0f.dyn.optonline.net] has quit [Client closed the connection] |
09:07 | | Kindamoody is now known as Kindamoody|out |
09:48 | | Xon [Xon@Nightstar-362effcc.highway1.net.au] has quit [[NS] Quit: No Ping reply in 180 seconds.] |
09:49 | | Xon [Xon@Nightstar-362effcc.highway1.net.au] has joined #code |
09:53 | | Xon [Xon@Nightstar-362effcc.highway1.net.au] has quit [[NS] Quit: No Ping reply in 180 seconds.] |
09:53 | | Xon [Xon@9C034E.A7474E.446F1A.DEA144] has joined #code |
09:58 | | Xon [Xon@9C034E.A7474E.446F1A.DEA144] has quit [[NS] Quit: No Ping reply in 180 seconds.] |
09:59 | | Xon [Xon@Nightstar-362effcc.highway1.net.au] has joined #code |
10:18 | <@Azash> | Once these exams are over I'm going to focus over the summer into developing as a programmer |
10:18 | <@Azash> | What books and languages are there I should work on first? TAOCP, Cormen, CC? C, Haskell? |
10:21 | <~Vornicus> | What do you know, what do you want to try to do? |
10:23 | <@Azash> | I know C and Java on an intermediate level and have dabbled in Haskell, LUA, PHP and node.js/JS, I have some programming experience and practical (not very theoretical) knowledge of the usual algorithms and data structures |
10:24 | <@Azash> | Just to be able to produce sane, robust and effective code |
10:24 | <@Azash> | And understand it |
10:29 | <~Vornicus> | Hng. |
10:29 | <@TheWatcher> | Okay, so |
10:29 | <~Vornicus> | Part of the difficulty here is |
10:29 | <~Vornicus> | "a programmer" is like "an artist" or "an engineer" |
10:30 | <@TheWatcher> | s/or/and/ ¬¬ |
10:30 | <~Vornicus> | just because I'm pretty good with oil paints doesn't mean I could compose a song or sculpt in marble or... |
10:30 | <@TheWatcher> | Or even should expect to be able to |
10:31 | <~Vornicus> | And just because I have done some helicopter work doesn't mean I can design a bridge or a building or a tortilla machine. |
10:31 | < Syka> | Azash: there's always practice |
10:31 | <@Azash> | So, just practice? |
10:31 | <@Azash> | Syka: Yer |
10:31 | < Syka> | theory only gets you so far |
10:31 | <@TheWatcher> | Theory generally gets you bugger all, honestly |
10:31 | <~Vornicus> | Practice a lot. Pick a project that looks like you can do it, and, well, do it. |
10:31 | <~Vornicus> | Generally they're a lot harder than they look. |
10:31 | <@TheWatcher> | It's nothing without lots and lots of practice |
10:32 | < Syka> | the only code book i've ever actually read has been the SQLite manual by O'Reillys, so :P |
10:32 | <@TheWatcher> | And there are things that you need to be able to learn that simply aren't, and can't, be conveyed in textbooks and tutorials |
10:32 | < Syka> | eg. dealing with non-perfect systems |
10:33 | < Syka> | code books are like physics textbooks |
10:33 | <@Azash> | Right, I'll stick to practical work then |
10:33 | <@Azash> | Cheers~ |
10:33 | < Syka> | they assume no air, no varying gravity and some magical world where everything has a centre of gravity in the centre |
10:33 | < Syka> | :P |
10:34 | <@Azash> | Haha |
10:34 | <@TheWatcher> | So yes, pick a project, something with some meat to it. Then try to work out which language(s) might be best suited to it, because "the languages I know" may or may not be in that set, and then work on it. Even if you don't finish it, the experience - and even bits of the code, if you design it well - will not be wasted |
10:35 | <@Azash> | Yer, that's what I had figured out I'd do |
10:35 | <@Azash> | I was wondering if anyone had thoughts on any, uh, "workout supplements" if the simile holds |
10:35 | <~Vornicus> | taocp is not generally a book I pick up and read. |
10:36 | <~Vornicus> | It's one I go "this is probably in the Knuth" and then open to the appropriate page. |
10:36 | <@Azash> | So like the Oxford then :P |
10:39 | <@Azash> | Thanks for all the suggestions |
10:40 | <@Azash> | http://img.pr0gramm.com/2013/05/wtf3gibhm9cen.png |
10:41 | <~Vornicus> | Yay, floats |
10:45 | <@gnolam> | Azash: To get some theory in, I suggest you do the classic introductory course stuff and implement a bunch of data structures in, say, C. |
10:45 | <@gnolam> | That'll teach you how they work under the hood and give you a feel for their strenghts and weaknesses. |
10:47 | <@Azash> | What are some slightly more difficult algorithms or data structures, then? I have a fairly good feel for lists, the basic 4-5 sorting algos, A* and Dijkstra, typical trees like R/B and AVL |
10:47 | <~Vornicus> | I have recently had to choose a data structure based on a metric that nobody seems to care about. |
10:48 | < Syka> | I've never implemented a tree :D |
10:51 | <~Vornicus> | Here's a good 'un: get a thing to do differential calculus on elementary functions. |
10:52 | <~Vornicus> | This is described in a little detail in one of the knuth things but I don't remember precisely where |
10:53 | <@Azash> | Yeah, that sounds like a good project |
10:56 | | AverageJoe [evil1@61024F.B1DB7D.E87B5D.526FE4] has quit [[NS] Quit: Leaving] |
10:57 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
10:57 | | mode/#code [+o himi] by ChanServ |
10:57 | <@gnolam> | https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/Co nnectionStatus.java#L213 |
10:58 | <@gnolam> | Azash: you should at least get some hash tables in there as well. |
10:58 | <@Azash> | gnolam: What? re. link |
10:59 | <@Azash> | And yeah, I forgot to mention those~ |
10:59 | <@gnolam> | Line 213. |
10:59 | < AnnoDomini> | It appears someone is using random error catching. |
11:02 | <@Azash> | Well yeah, gnolam, just.. why |
11:12 | <~Vornicus> | gnolam: what |
11:15 | | * TheWatcher eyes the line |
11:16 | <@TheWatcher> | .... |
11:18 | <@iospace> | i hate it when people try to be cute with shit like that |
11:25 | < Syka> | ...random... error catching? |
11:25 | < Syka> | why would... what |
11:43 | <@Tamber> | ...holy shit, Syka, when you pasted that elsenet; I thought you were *taking the piss* |
11:43 | | * Tamber boggles |
11:45 | < Syka> | Tamber: I always like making fun of mongodb |
11:45 | <@Tamber> | I know; but I thought it was a parody D: |
11:45 | < Syka> | roflscale all of the error catching |
11:46 | <@Tamber> | MongoDB: Where the parody is more serious code than our git HEAD. |
12:06 | | VirusJTG [VirusJTG@2B12AA.572255.206A2A.901581] has joined #code |
12:57 | | Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: Leaving] |
13:14 | < Syka> | more mongodb fucktasticery, https://jira.mongodb.org/browse/PYTHON-532 |
13:16 | <@TheWatcher> | "Labels: incompetence; Environment: ALL THE ENVIRONMENTS", snerk |
13:18 | < Syka> | oh my god my sides |
13:21 | <@Azash> | That's a brilliant meltdown |
13:24 | <@Tamber> | "...wait. Is that seriously. ... :I fuck this shit. And that shit. And this shit here. Fuck all that shit. *flips desk*" |
13:25 | < Syka> | thank christ i ignored mongodb |
13:25 | <@Azash> | Tamber: I imagine someone working with MongoDB would attach their desk to one of those big rotating spits |
13:25 | <@Azash> | And every 15 minutes just get up and crank the handle a couple of times |
13:26 | <@Tamber> | Hee |
13:27 | <@Tamber> | Nah, it's on a button, with pneumatic rams. Push chair back, hit the "desk" button, and cello! Greatly reduced strain on the arms from flipping desks all day. |
13:27 | <@Azash> | Snerk |
14:31 | | VirusHome is now known as Pandemic |
14:31 | | mode/#code [+o Pandemic] by ChanServ |
14:34 | | * ToxicFrog resyncs |
14:35 | <@Azash> | Pandemic: That nick change is pretty clever, can't believe it took me this long to notice it |
14:35 | | ToxicFrog is now known as ToxicFrog|W`rkn |
14:36 | <&ToxicFrog|W`rkn> | Azash: fundamentally, you become a better programmer by programming. A lot. |
14:36 | <&ToxicFrog|W`rkn> | This is not in and of itself sufficient but it is very, very necessary. |
14:38 | <@Azash> | Yeah |
14:38 | <@Azash> | Like I specified later, I was looking for things to supplement the practical aspect with |
14:42 | <&ToxicFrog|W`rkn> | TAOCP I find works best as a reference; "ok, I need a sorting algorithm here" and then you grab the appropriate volume of Knuth |
14:42 | <&ToxicFrog|W`rkn> | The recommendations that come immediately to mind to me would be to either work through SICP, or write a compiler. |
14:43 | <@Azash> | Well, I do have the Dragon Book |
14:43 | <&ToxicFrog|W`rkn> | The former will stretch your mind, the latter will get you familiarity with a bunch of handy techniques and data structures. |
14:43 | | * Azash gives his bookshelf an affectionate wave |
14:44 | <&ToxicFrog|W`rkn> | I've only had to write a compiler in anger once, but the stuff I learned - especially about lexing and parsing - in doing that and in the Compilers course keeps coming in handy. |
14:44 | <@Azash> | Is sippy more about the thinking or scheme itself? |
14:44 | <&ToxicFrog|W`rkn> | I'd say the former. I mean, it will also teach you Scheme, but the point of the book is programming and program interpretation in general. |
14:48 | <@Azash> | Right, cheers |
14:49 | <@Azash> | Would it be enough to come up with a simple language of my own for the compiler or try to follow an existing spec? |
14:50 | <&ToxicFrog|W`rkn> | (it is well worth the read, and ends up with you writing a complete interpreter) |
14:50 | <@Azash> | Ah |
14:51 | <&ToxicFrog|W`rkn> | Up to you! I wrote one in school for C- (a stripped down C variant) and one at work for CPL (a custom configuration/scripting language). |
14:51 | <&ToxicFrog|W`rkn> | I may at some point write a Lua to Clojure compiler~ |
14:52 | <@Azash> | Yeah we have two compiler courses here, one includes a practical assignment to make an interpreter for some non-lib Java version |
14:52 | <&ToxicFrog|W`rkn> | This was a AOT compiler targeting an itty bitty toy processor with 8 registers |
14:53 | <&ToxicFrog|W`rkn> | Register allocation was the hardest part~ |
14:53 | <@Azash> | Oh, that might be interesting in itself |
14:53 | <&ToxicFrog|W`rkn> | (I ended up writing the lexer in flex, the parser in yacc, and the heavy lifting in lua; turns out the lua C API lends itself very well to incremental bottom-up AST creation) |
14:53 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
14:53 | | mode/#code [+o celticminstrel] by ChanServ |
14:54 | <@Azash> | It can't be worse than trying to use Rhino |
15:06 | <@Pandemic> | Thanks Azash |
15:17 | <&ToxicFrog|W`rkn> | Azash: I've never used Rhino except as a REPL |
15:17 | <&ToxicFrog|W`rkn> | Lua has a stack-based API, so reading a terminal just involves pushing it onto the stack, and creating a nonterminal consists of popping the top N items, packing them into a table, and pushing the table |
15:18 | <&ToxicFrog|W`rkn> | And when you're done the value on top of the stack is S |
15:18 | <@Azash> | Nice |
15:19 | <@Azash> | And yeah had to get a JS AST solution once |
15:19 | <@Azash> | Originally considered Rhino but it has no documentation, very few comments and a fairly mystical code base |
15:27 | <&ToxicFrog|W`rkn> | Nice |
15:30 | < Xon> | ToxicFrog|W`rkn, recursive descent parsers are quite easy to write |
15:30 | < Xon> | and if your grammer is such a mess that you are hitting recusion limits you probably need to think up something more sane |
15:31 | <@Azash> | Hm |
15:31 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has quit [[NS] Quit: KABOOM! It seems that I have exploded. Please wait while I reinstall the universe.] |
15:31 | <@Azash> | https://en.wikipedia.org/wiki/Ukkonen%27s_algorithm |
15:32 | <@Azash> | Ukkonen is the head of our dept, maybe I should learn this :b |
15:32 | | celticminstrel [celticminst@Nightstar-e83b3651.cable.rogers.com] has joined #code |
15:32 | | mode/#code [+o celticminstrel] by ChanServ |
15:37 | <&ToxicFrog|W`rkn> | Xon: this is true, but were were encouraged to use flex/yacc and they are easy to write config files for based on the formal specification. |
15:37 | <&ToxicFrog|W`rkn> | The CPL analyzer used PEGs, and the vstruct parser is recursive descent. |
15:38 | < Xon> | one property about hand crafted parsers is you can give actually sane error messages compared to trying to beat flex/yacc into doing that =p |
15:39 | <&ToxicFrog|W`rkn> | I actually found getting sane error messages out of yacc to be pretty easy. Likewise scala's combinator library. |
15:39 | <&ToxicFrog|W`rkn> | LPEG, on the other hand? Just give up. |
15:39 | < Xon> | hehe |
15:40 | <&ToxicFrog|W`rkn> | (and vstruct actually needs a major overhaul to error handling which is, i think, my next big project for it) |
15:42 | <&ToxicFrog|W`rkn> | (error reporting in the parser is alright, but runtime error reporting is kind of rubbish and there's a bunch of stuff that reports internal errors that should be detected and handled as environment errors) |
15:51 | <&ToxicFrog|W`rkn> | (this means that occasionally I get an email with a hugeass stack trace attached when the actual problem is "you passed it a truncated file") |
15:51 | < Xon> | lol |
16:00 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has quit [Ping timeout: 121 seconds] |
16:09 | <@Azash> | Re. MongoDB https://twitter.com/strlen/status/340292997918883841 |
16:10 | <&ToxicFrog|W`rkn> | what |
16:10 | <&ToxicFrog|W`rkn> | is there any sort of context for that |
16:10 | <@Azash> | Yeah, hang on |
16:11 | <@Azash> | 11:57 <@gnolam> https://github.com/mongodb/mongo-java-driver/blob/master/src/main/com/mongodb/Co nnectionStatus.java#L213 |
16:12 | | Turaiel[Offline] is now known as Turaiel |
16:13 | < [R]> | Lovely. |
16:15 | <&ToxicFrog|W`rkn> | First thought: they should have written that as (_ok || Math.random() > 0.1), the ?: just confuses matters. |
16:15 | <&ToxicFrog|W`rkn> | Second thought: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA |
16:16 | <@TheWatcher> | I think you missed a few 'A's there~ |
16:17 | <&ToxicFrog|W`rkn> | I mean, I guess they were trying for something kind of like LOG_EVERY there, but aaaaaugh no |
16:25 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
16:25 | | mode/#code [+o himi] by ChanServ |
16:35 | < [R]> | if (!_ok && Math.random() <= 0.1) // fixed to not have all the parens. But that's like the least of the issues with that statement. |
16:37 | <&ToxicFrog|W`rkn> | \o/ git \o/ |
16:37 | < Syka> | i like how git's manual calls it the 'stupid content tracker' |
17:07 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has joined #code |
17:07 | | mode/#code [+ao Derakon Derakon] by ChanServ |
17:10 | <@iospace> | Seg faults? In my builds? It's more likely than you think T_T |
17:12 | | * Tamber sprinkles some caterpillars in iospace's build. |
17:12 | <@iospace> | T_T |
17:13 | | * Syka invents vertical-endianness |
17:13 | <@iospace> | how about no |
17:14 | < Syka> | :D |
17:16 | <@iospace> | http://25.media.tumblr.com/tumblr_m7g8rjJ2r51rzupqxo1_500.png |
17:38 | | Turaiel is now known as TurNoms |
18:03 | | TurNoms is now known as Turaiel |
18:03 | | AnnoDomini is now known as Wires |
18:46 | <&Derakon> | Ahh, that was nicely straightforward to fix. |
18:48 | <&Derakon> | Always nice when a problem is readily amenable to examination. |
19:23 | | Reiver [quassel@Nightstar-3762b576.co.uk] has quit [Operation timed out] |
--- Log closed Fri May 31 19:27:11 2013 |
--- Log opened Fri May 31 19:33:57 2013 |
19:33 | | TheWatcher [chris@Nightstar-3762b576.co.uk] has joined #code |
19:33 | | Irssi: #code: Total of 37 nicks [17 ops, 0 halfops, 0 voices, 20 normal] |
19:33 | | mode/#code [+o TheWatcher] by ChanServ |
19:34 | | Irssi: Join to #code was synced in 38 secs |
19:35 | | Derakon [chriswei@Nightstar-a3b183ae.ca.comcast.net] has quit [[NS] Quit: leaving] |
19:45 | | Turaiel is now known as Turaiel[Offline] |
19:45 | | Turaiel[Offline] is now known as Turaiel |
19:54 | | Turaiel is now known as Turaiel[Offline] |
20:10 | | Turaiel[Offline] is now known as Turaiel |
20:46 | | Wires is now known as AnnoDomini |
20:52 | | Kindamoody|out is now known as Kindamoody |
21:03 | <@iospace> | ohgodsanymomentnow |
21:24 | <@Azash> | Looks like many moments |
21:34 | <@celticminstrel> | ? |
21:38 | | Kindamoody is now known as Kindamoody[zZz] |
21:48 | <@Azash> | celticminstrel: Joking about the comment on "any moment now" without further explanation |
21:49 | <@Tamber> | I think it's that interview with Gargle, unless I'm imagining things. |
22:17 | | * Azash has an idea for his oregon trail bot |
22:17 | <@Azash> | Obviously the hunting game can't be done talking to an IRC bot |
22:18 | <@Azash> | So I'm thinking having it ask an equation and how quickly you answer affecting the food you manage to get |
22:20 | <&McMartin> | Azash: Hm. The original was "echo this line quickly" |
22:20 | <&McMartin> | That could be timed too |
22:20 | <@Azash> | In IRC that's easy, at least in eg. putty+irssi |
22:20 | <@Azash> | Just paint the line and paste it back in |
22:28 | <@Azash> | McMartin: Slight question about BASIC |
22:29 | <@Alek> | There was also a version where you had to type in shooting words to hunt. the faster, the better. |
22:29 | <@Azash> | The game asks you to choose how good you are at something on a scale 1-5 |
22:29 | <@Alek> | bang, etc. |
22:29 | <@Azash> | Then it's "PRINT D9", D9 being the variable for it |
22:29 | <@Azash> | And follows up with "IF D95 ..." |
22:29 | <@Azash> | What does it mean when they add the 5 on the end? |
22:46 | | * Azash works sed to replace variables for explanatory names throughout code |
23:04 | <&McMartin> | I found at least one typo in their code already |
23:05 | <&McMartin> | That said: some BASICs (including Commodore BASIC, but not GW-BASIC) restricted variable names to two characters and a type glyph |
23:05 | <&McMartin> | So AR$ and ARRRRRRR$ and ARGYLE$ and ARGH$ were all the same (string) variable. |
23:06 | <@Azash> | Hm |
23:07 | <@Azash> | Well, I'm making some advances in sane-itizing this~ |
23:07 | <&McMartin> | Study the logic, and see if it makes sense, I think~ |
23:07 | <&McMartin> | If there are no other rrferences to D95 in the code, probably a type |
23:07 | <&McMartin> | typo |
23:07 | <@Azash> | Well, it's more that I'm not used to BASIC programming |
23:08 | <&McMartin> | There was a place later on where the line numbers go out of order by an order of magnitude, and I think they fat-fingered 5 there too =P |
23:08 | <@Azash> | Something like "if (stuff) then 790" is just annoying to me |
23:08 | <@Azash> | Yeah I laughed at that |
23:08 | <@Azash> | 6430, 64540, 6450 |
23:09 | <@Azash> | Cough, I did goof a bit with the sedding |
23:09 | <@Azash> | 5090 PRINT "YOU CAN'CASH_LEFT_AFTER_INIT AFFORD ANIMAL_SPENDING DOCTOR" |
23:10 | | * TheWatcher ponders "MuggleBytes", a measure used for areas of memory that are guaranteed to be free of magic numbers. |
23:12 | | * McMartin gestures dramatically. "Make it so" |
23:23 | <&McMartin> | Azash: Note that there were a bunch of BASIC dialects, and this was specifically for some mainframe variant that might have quirks |
23:23 | <&McMartin> | So some of it will require guessing |
23:23 | <&McMartin> | Note that "if (stuff) then (number)" is "then GOTO (number)" |
23:24 | <&McMartin> | Also note that I'm waiting impatiently for [R] to get to the point where he learns about tail call optimization in Scheme so I can break out the "how to represent BASIC style, complete with line numbers, with nothing but function calls - yes, not even any variable assignments" |
23:24 | <&McMartin> | It is the finest of Horribly Perverse Things (though it's syntactically cleaner in Haskell) |
23:25 | <@Azash> | I'm trying to figure out this line |
23:25 | <@Azash> | It has a bunch of variables multiplied equals 0 |
23:25 | <@Azash> | Like.. A*B*C=0 |
23:25 | <&McMartin> | Oh man |
23:26 | <&McMartin> | That's "AND" without the AND. |
23:26 | <&McMartin> | A, B, and C are being used as booleans, but BASIC doesn't have those, it has numbers |
23:26 | <@Azash> | And the =0 ? |
23:26 | <&McMartin> | So you set them to 0 (false) and either 1 or -1 depending on dialect (true). |
23:26 | <&McMartin> | If they can only be zero or one, then A*B*C=1 if and only if all of them are 1. |
23:26 | <@Azash> | Ah.. So it ends up being either zero or nonzero |
23:26 | <@Azash> | Right |
23:26 | <&McMartin> | So A*B*C=0 if any of them are 0. |
23:26 | <&McMartin> | (For OR, you'd use +.) |
23:27 | <@Azash> | So what does the line actually do? |
23:27 | <@Azash> | I mean it only has that and-and-equals-zero and nothing else |
23:27 | <&McMartin> | o_O |
23:28 | <&McMartin> | That I don't know offhand. |
23:28 | <&McMartin> | I'm used to IF _____ requiring a THEN |
23:28 | <&McMartin> | Does this dialect have FI or END IF statements later on? |
23:28 | <@Azash> | 820 K8*S4*F1*F2*M*M9*D3=0 |
23:28 | <&McMartin> | Wait, it's *not* an IF |
23:28 | <&McMartin> | That line is unfamiliar to me. |
23:29 | <&McMartin> | Would it make sense in context that it was assigning 0 to all those variables individually? |
23:29 | <@Azash> | And the line above it is |
23:29 | <@Azash> | 810 X1*-1 |
23:29 | <@Azash> | Yeah it would |
23:29 | <@Azash> | The "sane" version of it is |
23:29 | <&McMartin> | Would X1*-1 be "X1 = -X1"? |
23:29 | <@Azash> | 820 K8*ILLNESS_FLAG*CLEAR_SOUTH_PASS_FLAG*CLEAR_BLUE_MOUNTAINS_FLAG*TOTAL_MILEAGE*CL EAR_SOUTH_PASS_FLAG*TURN_NUMBER_FOR_DATE_SET=0 |
23:29 | | * McMartin nods |
23:30 | <@Azash> | And well, the first one |
23:30 | <@Azash> | Is the fort flag |
23:30 | <&McMartin> | X1 *= -1, maybe? |
23:30 | <@Azash> | So I guess it's set to true because you're in the start location shopping |
23:30 | | Derakon[AFK] is now known as Derakon |
23:30 | | mode/#code [+ao Derakon Derakon] by ChanServ |
23:31 | <@Azash> | I mean, that would make sense |
23:31 | <@Azash> | Of course I don't know what the fort flag *does* because all the documentation on it is 6790 REM X1 = FLAG FOR FORT OPTION |
23:39 | <&McMartin> | I'm guessing that anything that isn't 0 is true. |
23:39 | <@Azash> | Yeah, they use -1 though apparently |
23:40 | | * McMartin nods |
23:40 | <&McMartin> | It's sensible; it's ~0 |
23:44 | | * Azash has his first encounter with "on X goto a,b,c", wonders if he still has his whisky somewhere |
23:44 | <&McMartin> | Oh man |
23:44 | <&McMartin> | That's a switch |
23:44 | <&McMartin> | but the cases are 1, 2, 3 etc |
23:44 | <@Azash> | Yeah |
23:45 | <&McMartin> | Even cooler than that is on X gosub |
23:45 | <&McMartin> | Because that is secretly a *C++ method call* |
23:56 | <@Azash> | What |
23:56 | <&McMartin> | The way virtual method calls in C++ work under the hood is "look up a table of subroutine locations and index into it based on the method identifier" |
23:56 | <&McMartin> | The "vtable" |
23:57 | <&McMartin> | on X gosub A, B, C is basically "A, B, C is your vetable, X is your method name" |
23:57 | <@Azash> | Similar principle to interrupt vectors? |
23:57 | <&McMartin> | I think so |
23:58 | <@Azash> | Right, got it |
23:58 | <&McMartin> | Those are better, really, as an analogy |
23:58 | <&McMartin> | Because vtables are carried with the object, and subclassing means that the vtable points to different places but is laid out identically, a trick you can't get from ON X GOSUB unless you put in additional machinery |
23:59 | <@Azash> | Right, I think I get it |
--- Log closed Sat Jun 01 00:00:53 2013 |