IRC Logs for #io Tuesday, 2013-11-05

*** mkroehnert has quit IRC00:35
*** irclogger___ has joined #io00:58
*** mal`` has joined #io01:02
*** nisstyre has quit IRC01:51
*** nisstyre has joined #io02:06
*** debris` has joined #io02:49
*** gatesphere has quit IRC04:49
*** pchalupa has quit IRC06:40
*** hashmal has joined #io08:03
*** pchalupa has joined #io08:08
*** OpenSpace has quit IRC08:57
*** OpenSpace has joined #io09:25
*** OpenSpace has quit IRC09:32
*** OpenSpace has joined #io09:45
*** nisstyre has quit IRC10:25
*** pchalupa has quit IRC10:37
*** pchalupa has joined #io10:51
*** hashmal has quit IRC12:47
prologichey jer with operator precedence one part I'm struggling with is: what should happen when you see a ( or ) in the token stream?13:26
*** mi6x3m-alt has joined #io13:33
mi6x3m-althello, is there a consistent grammar of the io language?13:33
locks^ prologic probably knows :P13:34
mi6x3m-altlocks: let's wait for him then :)13:34
jerprologic, new message tree13:44
jerthere's one13:45
jerthat has an extension which permits: foo: 113:46
jeras being the same as foo(1)13:46
jeronly works for single arguments, but the rest is an Io grammer sans operator precedence13:46
jeror op shuffling13:46
jerwhich isn't really part of the core parser anyway anymore13:46
mi6x3m-altjer: hm13:47
mi6x3m-altso you say the sample grammar in the lang. guide is consistent?13:48
jermi6x3m-alt, linke me to it13:48
jeri haven't seen it in about 6 years13:48
mi6x3m-altsearch Syntax13:48
jerno it's not complete13:49
jerfor instance its use of ; is out of date. ; is a proper message now13:49
jerit's just special cased in the evaluator13:50
mi6x3m-altI would need a precise grammar13:50
mi6x3m-altI will see the one for acute then13:51
mi6x3m-altand make some changes if it need be13:51
jerthe one for acute is complete except for operator shuffling/precedence13:51
jerbut that's done at a later phase, after tokenization13:51
jerso it doesn't make sense to live in the parser13:51
mi6x3m-altjer: can I actually run your grammar with the code provided13:51
jerit's a separate system between the parsing subsystem and the evaluator13:51
mi6x3m-alti see it's a peg13:51
mi6x3m-altoperator precedence in io?13:52
mi6x3m-altis that necessary13:52
jerthe C++ acute code (the "wee" dir) isn't complete, and has bugs; the grammar is solid though13:52
jernecessary? no, but it's nice to be able to write 1 + 2 * 5 + 813:52
jerinstead of: 1 +(2 *(5)) +(8)13:52
mi6x3m-altjer: hm, yeah, so the grammar doens't provide it now?13:53
jergiven i was aiming for self hosted, i didn't care about precedence in the peg grammar13:53
jerit'll parse the first as this:13:53
jer1 +() 2 *() 5 +() 813:53
jerthe second it gets right13:53
jerthe act of handling inserting the ()'s is called shuffling13:54
jerthe act of adjusting where the ()'s are inserted based on precedence rules is part of the operator shuffler too, but it's conceptually different13:54
mi6x3m-altok, i will have to see about that13:55
mi6x3m-altthis gives me some info13:55
mi6x3m-altyour grammar seems not to consider the '\r\n' case13:55
mi6x3m-altalso, where are comments?13:56
jermy grammar doesn't take into account \r\n, no13:57
jeri comment the why, not the how. there's no need to document any why in the grammar13:57
mi6x3m-alti mean, your language grammar excludes comments in the described language13:58
mi6x3m-altbut overall top work, this will be quite useful13:59
jerah sorry misunderstood14:03
jeryeah as i say this grammar was meant for a bootstrap interpreter (acute was a project to implement io in itself)14:03
jercomments weren't needed =]14:03
jeryou can ignore the single-opener stuff though14:03
jerthat's non-standard io14:03
*** hashmal has joined #io14:07
*** Thor has quit IRC16:03
*** Thor has joined #io16:27
*** pchalupa has quit IRC16:36
*** mi6x3m-alt has quit IRC17:32
*** pchalupa has joined #io18:25
*** mkroehnert has joined #io20:15
prologicjer, problem is I don't construct the message chain at that point21:03
prologicjer, I'm only inserting ('s and )'s in the token stream at "mostly" the right spots21:03
jerprologic, how don't you? Messages are your tokens21:05
prologicwell ok what I mean is probably what not you mean21:07
prologicI meant I don't construct the Message object at that stage (yet)21:07
prologicit's done later in make_message and make_chain21:07
prologicbut I think what you're saying is what I thought last night21:07
prologicif you see a ( recursively process the next tokens21:08
prologicbecause I think in order to not screw up existing parens written by theu user you have to proces the deepest ones first?21:08
prologicinner ones21:09
prologice.g: (1 + 2) * 3 + (4 + 5)21:09
jerhaven't tried to implement this, i just know how it should work =p21:10
prologicactually that's a bad example :)21:10
prologicsure :)21:10
prologicI think I fixed my lexer and the operator precedence function anyway21:10
prologicI just need to work out how to handle ('s and )'s if it see sthem inthe stream21:10
prologicI think the answer is to recurse21:10
prologicso as to process the inner most groups of parens first21:10
prologicI mean the algorithm is basically top-down parsing anyway ( just mostly using a stack )21:11
prologicI still hate this whole notion of operator precedence realy21:11
jerprologic, implementing it will bring you to that conclusion21:11
prologicI had originally decided against it but my colleage at work believes that a langauge without them is useless and wrong21:12
prologicnot that I agree :)21:12
prologicit's already driving my nuts21:12
prologicbecause there are so many edge cases21:12
prologicit's like writing a parser all over again21:12
prologicso I'm doing lexing in mio/lexer.py21:13
prologicas well as operator precedence parsing!21:13
prologicthen proper parsing in mio/parser.py21:13
prologicgah :)21:13
*** debris` has quit IRC21:37
*** zehl has joined #io21:37
zehlhey folks21:38
*** debris` has joined #io21:44
*** hashmal has quit IRC22:16
prologicI wan to implement data descriptors in mio ala
prologicand use this to unify blocks and methods into a singlet thing22:29
prologicas well ad implement properties and staric functions22:30
prologicanyone has any thoughts on this.22:30
*** OpenSpace has quit IRC22:54
*** gatesphere has joined #io22:59
*** OpenSpace has joined #io23:04
*** nisstyre has joined #io23:53

Generated by 2.11.0 by Marius Gedminas - find it at!