--- Log opened Tue Dec 20 00:00:38 2011 |
00:06 | | You're now known as TheWatcher[zZzZ] |
00:28 | < McMartin> | TF: Have you taken a look at Lua 5.2? |
00:41 | < McMartin> | ! |
00:41 | < McMartin> | Google gave me what I needed as the first result. |
00:41 | < McMartin> | Of course, I was searching for the phrase "full force of every reactor on the planet". |
00:42 | < ToxicFrog> | McMartin: yes. Ambivalent. |
00:54 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
01:12 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
01:13 | | AnnoDomini [annodomini@Nightstar-7772b630.84-49-12.nextgentel.com] has quit [[NS] Quit: leaving] |
01:17 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
01:46 | | Attilla [Obsolete@Nightstar-9d19ccd5.as43234.net] has quit [Ping timeout: 121 seconds] |
01:48 | | Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has joined #code |
01:52 | | Derakon[AFK] is now known as Derakon |
02:40 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
02:45 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
03:28 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
03:34 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
03:59 | | Kindamoody[zZz] is now known as Kindamoody |
04:06 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
04:11 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
04:12 | | Stalker [Z@Nightstar-5aa18eaf.balk.dk] has quit [Ping timeout: 121 seconds] |
04:41 | | Kindamoody [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has quit [Ping timeout: 121 seconds] |
04:44 | | Kindamoody|out [Kindamoody@Nightstar-5507a6b5.tbcn.telia.com] has joined #code |
04:47 | | Kindamoody|out is now known as Kindamoody |
04:54 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
05:00 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
05:19 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
05:55 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
05:59 | | eckse is now known as Dave_ |
06:00 | | Dave_ is now known as eckse |
06:01 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
06:28 | | Derakon is now known as Derakon[AFK] |
06:35 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has quit [Ping timeout: 121 seconds] |
07:13 | | You're now known as TheWatcher |
07:16 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
07:21 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
07:22 | | eckse [eckse@Nightstar-6fa75dbe.dsl.sentex.ca] has quit [Connection reset by peer] |
07:45 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
07:49 | | Kindamoody is now known as Kindamoody|out |
07:51 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
07:58 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
08:00 | | You're now known as TheWatcher[afk] |
08:02 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
08:31 | | celticminstrel is now known as celmin|sleep |
08:49 | | Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Connection reset by peer] |
08:55 | | Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code |
08:56 | | Syloqs_AFH is now known as Syloqs-AFH |
09:01 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
09:07 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
09:10 | < Alek> | as far as favicons - isn't it true that if you open an image directly in the browser, the favicon is a shrunk-down version of said image? |
09:10 | < Alek> | thus, wouldn't it be heavier? |
09:11 | | Attilla [Obsolete@Nightstar-9d19ccd5.as43234.net] has joined #code |
09:20 | | AnnoDomini [annodomini@Nightstar-7772b630.84-49-12.nextgentel.com] has joined #code |
09:56 | | You're now known as TheWatcher |
10:05 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
10:09 | < Ling> | Yes, but it doesn't get cached as a favicon |
10:09 | < Ling> | It gets cached as an image |
10:09 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
10:14 | < Alek> | hm. dunno then. |
10:44 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection] |
10:52 | | You're now known as TheWatcher[d00m] |
--- Log closed Tue Dec 20 11:50:29 2011 |
--- Log opened Tue Dec 20 11:50:41 2011 |
11:50 | | TheWatcher[d00m] [chris@Nightstar-3762b576.co.uk] has joined #code |
11:50 | | Irssi: #code: Total of 27 nicks [3 ops, 0 halfops, 0 voices, 24 normal] |
11:51 | | Irssi: Join to #code was synced in 41 secs |
12:06 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
12:07 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
12:23 | | You're now known as TheWatcher |
13:04 | | Stalker [Z@Nightstar-3602cf5a.cust.comxnet.dk] has joined #code |
13:34 | | You're now known as TheWatcher[afk] |
13:46 | | Rhamphoryncus [rhamph@Nightstar-14eb6405.abhsia.telus.net] has quit [Client exited] |
13:48 | | celmin|sleep is now known as celticminstrel |
14:26 | | Kindamoody|out is now known as Kindamoody |
14:36 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
14:41 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
15:43 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
15:48 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
16:02 | | Kindamoody is now known as Kindamoody|out |
16:09 | < ToxicFrog> | Oh wait, lua 5.2 has actually been released! Eep. |
16:09 | < iospace> | o rly |
16:24 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
16:25 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
16:33 | | Kindamoody|out is now known as Kindamoody |
16:37 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
16:42 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
17:16 | | EvilDarkLord is now known as Maze |
17:19 | < jerith> | XML. Namespaces. Pain. |
17:20 | | * iospace pats jerith |
17:21 | < jerith> | ElementTree is horrible. |
17:21 | < jerith> | It handles namespaces by making you qualify every damned thing with the whole damned URL. |
17:22 | | * iospace keeps on patting jerith |
17:22 | < iospace> | i only deal with XML when i update our documentation that our customers get :P |
17:22 | | * jerith is working on an XForms implementation. |
17:47 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has quit [Operation timed out] |
17:48 | | ToxicFrog [ToxicFrog@ServerAdministrator.Nightstar.Net] has joined #code |
17:50 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has quit [Connection reset by peer] |
17:50 | | gnolam [lenin@Nightstar-202a5047.priv.bahnhof.se] has joined #code |
18:06 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has quit [Ping timeout: 121 seconds] |
18:12 | | Reiver [orthianz@3CF3A5.E1CD01.C6689C.33956A] has joined #code |
18:29 | | Kindamoody is now known as Kindamoody[zZz] |
--- Log closed Tue Dec 20 18:55:33 2011 |
--- Log opened Tue Dec 20 18:55:47 2011 |
18:55 | | TheWatcher[afk] [chris@Nightstar-3762b576.co.uk] has joined #code |
18:55 | | Irssi: #code: Total of 27 nicks [3 ops, 0 halfops, 0 voices, 24 normal] |
18:56 | | Irssi: Join to #code was synced in 44 secs |
19:13 | | You're now known as TheWatcher |
19:30 | | celticminstrel is now known as celmin|away |
19:41 | | Maze is now known as EvilDarkLord |
19:50 | | * McMartin performs a reverse merge. |
19:50 | < McMartin> | This may be my first one. |
19:51 | < McMartin> | ToxicFrog: Yeah, the Lua 5.2 actually being released thing was why I was asking you about it >_> |
19:59 | | AnnoDomini [annodomini@Nightstar-7772b630.84-49-12.nextgentel.com] has quit [[NS] Quit: Going home for Christmas.] |
20:04 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code |
20:18 | | eckse [eckse@Nightstar-6fa75dbe.dsl.sentex.ca] has joined #code |
21:02 | | Derakon[AFK] [Derakon@Nightstar-f68d7eb4.ca.comcast.net] has quit [Ping timeout: 121 seconds] |
21:02 | | Derakon[AFK] [Derakon@Nightstar-f68d7eb4.ca.comcast.net] has joined #code |
21:05 | | Derakon[AFK] [Derakon@Nightstar-f68d7eb4.ca.comcast.net] has quit [Operation timed out] |
21:08 | | Derakon[AFK] [Derakon@Nightstar-f68d7eb4.ca.comcast.net] has joined #code |
22:35 | | You're now known as TheWatcher[T-2] |
22:37 | | You're now known as TheWatcher[zZzZ] |
23:33 | < jerith> | McMartin: Parsers. School me. |
23:33 | < McMartin> | jerith: What is it you're trying to parse? |
23:33 | < jerith> | A language of my own devising. |
23:34 | < McMartin> | regexes are primarily useful for the lexer phase - breaking a string into a stream of tokens. |
23:34 | < jerith> | My ideas for syntax are pretty boring. Basically Pythonesque, but with braces instead of indentation to delimit blocks. |
23:34 | < McMartin> | Once you have the string of tokens, how you go about doing the parsing depends on the complexity of the grammar. |
23:35 | < McMartin> | Python is, by design, extremely easy to parse. Its grammar is "LL(1)", which means that given one token of lookahead you know what grammar rule you're going to use. |
23:35 | < jerith> | The main thing is that I want to play with the pypy toolchain, which means the core bits need to be written in RPython. |
23:35 | < McMartin> | This lets you write a "recursive descent" parser almost trivially, as predictive parsers and procedure calls have a 1-1 mapping between functions and parsing rules. |
23:35 | | himi [fow035@Nightstar-5d05bada.internode.on.net] has joined #code |
23:35 | < jerith> | There are (possibly suboptimal) parsing tools available, but the pypy lexer is hand-coded. |
23:36 | < McMartin> | Machine-generated parsers such as created by yacc or CUP tend to be a subset of LR(), which is a much larger grammar class |
23:36 | < McMartin> | In that class, you have to know with one token of lookahead whether you've just *finished* reading something. |
23:36 | < McMartin> | That's more a stack machine and is a royal pain to do by hand. |
23:37 | < jerith> | I know the very basics about lexing and parsing, which is basically what each stage does and why they don't need to be glued together. |
23:37 | < McMartin> | Python-like languages tend to start with unique keywords and as such lend themselves extremely well to recursive descent. |
23:37 | < himi> | But easy to do mechanically, and not difficult to define the syntax |
23:38 | < McMartin> | If you can find a copy of the Dragon Book (any version, really, but the Purple Dragon Book is the most recent) it will in its early parts cover hand-parsing. |
23:38 | < McMartin> | You can get some gist of it from Appel's books in various languages as well. |
23:38 | < McMartin> | ("Modern Compiler Implementation in C/ML/Java") |
23:38 | < jerith> | I'm not really up to learning all the theory at present. |
23:38 | | * Vornicus has written a parser! |
23:38 | < McMartin> | Yeah. |
23:38 | < himi> | What are you writing this parser for? |
23:39 | < McMartin> | The Appel book is more practically oriented, but it's also soup-to-nuts |
23:39 | < jerith> | (It's interesting, but not the goal of this project.) |
23:39 | < McMartin> | Right |
23:39 | < McMartin> | If you want to see sample code, Ophis's source is available. |
23:39 | < himi> | Appel goes all the way down to some fairly sophisticated optimisation, doesn't it? |
23:39 | < McMartin> | Yes, and the Purple Dragon book also covers extremely sophisticated program analysis. |
23:39 | < jerith> | himi: I want to play with the pypy toolchain and write a simple language with JIT and such. |
23:40 | < jerith> | My vague aim is to write a language that's useful for solving Project Euler problems. |
23:40 | < McMartin> | (This is also why I have a citation in the Purple Dragon Book >_>) |
23:40 | < himi> | For any particular end goal, or is a working implementation enough? |
23:40 | | * himi gives McMartin a really big chocolate cigar |
23:40 | < jerith> | Since those have an emphasis on algorithms over libraries. |
23:40 | < jerith> | McMartin: Nice! |
23:40 | < McMartin> | It's cheating (it's part of an author's self-citation), but I'll take it |
23:41 | < himi> | Definitely worth taking any cite in a book that has it's own colloquial name ;-) |
23:41 | < jerith> | himi: Mostly, I want to play with the tools and tinker with a language that doesn't come from someone else's spec. |
23:41 | | * himi nods |
23:42 | < McMartin> | https://github.com/michaelcmartin/Ophis <-- has a pretty good Python lexer, has a kind of crappy parser since it's for an assembler |
23:42 | < himi> | How much of the most basic language theory do you have? |
23:42 | < jerith> | I have almost no formal CS education. |
23:42 | < McMartin> | Does some fairly standard tricks for recursive-descent parsing of arithmetic expressions, though, and it also uses some semi-Pythonic translations of non-Python constructs very common in OO compiler techs |
23:43 | < McMartin> | Oh, right, also: because this was my specialty, more or less, I have *no idea* how to properly pitch my explanations. |
23:43 | < jerith> | (My degree was in EE and my programming skillset was self-taught.) |
23:43 | <~Vornicus> (The first thing I did after Hello World was a parser.) |
23:44 | <~Vornicus> (perhaps I can be of use.) |
23:44 | < McMartin> | (Perhaps, yes) |
23:44 | < McMartin> | I also have no experience with pypy. |
23:44 | < jerith> | I've done some parser/lexer stuff in the past, but mostly using various tools. |
23:44 | < McMartin> | One important thing about parsers is that the theory is different for with-tools vs without. |
23:44 | < jerith> | I'd use those tools here, but none of them generate code in the language I need. |
23:45 | | Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection] |
23:45 | < jerith> | Since it's a language created specifically for a single project, which doesn't use such tools. |
23:45 | < himi> | You may be best off starting with a given language spec first, to get a bit of an idea of how it works before you come up with your own spec |
23:45 | < McMartin> | Well, sublanguage specs can help witht hat |
23:45 | < McMartin> | You Will Need Arithmetic Expressions. |
23:46 | < jerith> | Yeah. |
23:46 | < McMartin> | So write bc. |
23:46 | < McMartin> | If you can take a string that describes an infix algebraic expression and evaluate it with proper precedence &c, you are On Your Way. |
23:46 | <~Vornicus> Infix is not hard if you know the rules. Let me see if I can remember them. |
23:46 | | * himi nods |
23:46 | < jerith> | I laready have a basic implementation of a language similar to what I want to build here, but it uses pyparsing or something. |
23:46 | < himi> | pybc! |
23:47 | < jerith> | No, ply. |
23:47 | <~Vornicus> Heck, I was in hte middle of teaching kaura the rules when we got so rudely interrupted by his new job. |
23:47 | | * McMartin has a specific trick he uses for them but it's not the usual way it's done |
23:47 | | * McMartin 's way relies on having good language support for heterogeneous lists. |
23:48 | <@Namegduf> | Could you do it without with pointers? |
23:48 | < jerith> | RPython has that. :-) |
23:48 | <@Namegduf> | Presuming you have access to a void*? |
23:48 | < McMartin> | jerith: Python does indeed, which is why Ophis did it that way |
23:48 | < jerith> | I have Python, minus a few features, plus a few restrictions, with almost no standard library. |
23:48 | < himi> | Namegduf: you can do anything in C |
23:48 | < McMartin> | (Basically, instead of a "binary op" that gets chained into trees, it's instead an "op" which alternates terms and operators.) |
23:49 | < himi> | It's not necessarily nice |
23:49 | < McMartin> | himi: Tail calls. =( |
23:49 | < jerith> | (The biggest restriction static typing of variables.) |
23:49 | < himi> | McMartin: I think most modern C compilers will do something with obvious cases, but yeah . . . |
23:50 | < McMartin> | Also, setjmp/longjump make guarantees that limit their usefulness for many of the things you'd want them for. |
23:51 | <@Namegduf> | himi: Nope |
23:51 | <@Namegduf> | They won't because it screws stack traces |
23:51 | <@Namegduf> | Not unless you ask, anyway. |
23:52 | <@Namegduf> | I mean, they're still useful, but it affects them. |
23:52 | < himi> | Namegduf: I'm pretty sure you can tell them to - at -O3 you don't expect to be able to debug the code |
23:54 | < himi> | Actually a quick check of the GCC manpage suggests that tail call optimisations are enabled at O2 |
23:55 | <@Namegduf> | Hmm, didn't expect that. Do they include extra stuff for stack traces or are those upset at O2? |
23:55 | < McMartin> | Yeah, I'm surprised by that too - I thought you didn't even get proper inlining until O3. |
23:55 | < McMartin> | (Once you allow inlining you might as well allow tail calls) |
23:55 | <@Namegduf> | Interesting perspective, I hadn't thought about inlining. |
23:55 | < McMartin> | C does still end up doing exceptions less efficiently than other languages can, due to language guarantees |
23:55 | < himi> | I imagine there's either s omething to track it, or they just assume any debugging is going to be highly iffy |
23:56 | <@Namegduf> | Which is fairly important |
23:56 | <@Namegduf> | Well, the thing is |
23:56 | <@Namegduf> | If you're tracking it you still have some costs of a stack |
23:56 | <@Namegduf> | Your RAM use rises with depth |
23:56 | <@Namegduf> | If not, then you can truly tail-call-recurse indefinitely |
23:57 | < McMartin> | True |
23:57 | | * Vornicus actually puts the notes into a text file, because they're large. |
23:57 | < McMartin> | THough you can have your debugger stack put in a fake frame for "some number of tail calls" |
23:57 | <@Namegduf> | "some number", yeah. |
23:57 | <@Namegduf> | That can be static. |
23:57 | < himi> | Hell, -O enables inlining of small functions |
23:58 | | celmin|away is now known as celticminstrel |
23:58 | < himi> | Which just means inline functions where the inlined code is smaller than the function call overhead |
23:59 | < himi> | Generic inlining is enabled at O3 |
--- Log closed Wed Dec 21 00:00:20 2011 |