Show enters and exits. Hide enters and exits.
| 00:41:14 | boyscout | Upgrade to RubyGems 1.3.4 - 93dc928 - Evan Phoenix |
| 00:41:14 | boyscout | Fix return used in a block passed to Module#define_method - 3419d86 - Evan Phoenix |
| 01:24:35 | boyscout | Properly remove instance variables - 53f972a - Evan Phoenix |
| 01:31:26 | tarcieri | wtf @ "Ruby for Python" |
| 01:47:36 | tarcieri | evan: I am now appreciating what you must've felt getting a compiled eval working, heh |
| 01:50:38 | ddub | tarcieri: is "Ruby for Python" a set of lessons for Python developers to switch to Ruby? Sounds like a reasonable idea |
| 02:08:21 | evan | tarcieri: yeah, it was an amazing feeling when i got eval passing it's specs. |
| 02:14:15 | slava | evan: why is eval so hard? |
| 02:20:07 | tarcieri | slava: generating a "statically" compiled representation of a complex scripting language is... hard |
| 02:20:54 | tarcieri | ddub: it was on ruby-talk |
| 02:20:59 | tarcieri | I recommend against clicking the link |
| 02:21:35 | ddub | tarcieri: I know I was wrong, but what a nice world it would be if that was what the thread really was about? |
| 02:21:50 | tarcieri | heh |
| 02:22:00 | ddub | and, I think really your problem with eval is that you are trying to implement it correctly |
| 02:22:11 | ddub | where correctly means 'what MRI allowed you to get away with' |
| 02:22:26 | tarcieri | my eval is whatever I want it to be! |
| 02:22:43 | tarcieri | unfortunately what I want it to be is rather complex |
| 02:22:52 | ddub | eval becomes trivial to implement, all you have to do is have an interpreter walk over an AST |
| 02:23:00 | ddub | i.e. implement it just like MRI did |
| 02:23:00 | ddub | :) |
| 02:23:01 | tarcieri | slava: I have to decorate the parse tree so it returns both the "real" return value and the last version of all bound variables |
| 02:23:11 | tarcieri | no mutable state and all |
| 02:24:30 | ddub | I'm trying to make a PEG for ruby, but I don't really know the majority of the corner cases of the grammar |
| 02:24:49 | tarcieri | with Treetop? |
| 02:25:02 | ddub | pegleg right now |
| 02:25:05 | tarcieri | has had an awfully hard time finding Treetop grammars for various languages |
| 02:25:10 | tarcieri | I need one for JavaScript |
| 02:25:21 | slava | tarcieri: I guess eval is not an issue in factor because it evaluates the string in the top-level lexical environment |
| 02:25:23 | tarcieri | I poked around for a mailing list and couldn't even find that |
| 02:25:25 | slava | just like lisp eval |
| 02:25:33 | tarcieri | slava: yeah I have a bunch of different scopes |
| 02:25:35 | tarcieri | that doesn't help |
| 02:25:38 | ddub | I was looking at the ometa implementation in javascript |
| 02:25:39 | slava | local variables are a compile-time notion |
| 02:25:43 | ddub | I made my head asplode |
| 02:25:45 | slava | there's no runtime reflection at all |
| 02:25:51 | tarcieri | I've wondered how other languages handle that |
| 02:25:59 | slava | tarcieri: they handle it by restricting what eval can do |
| 02:26:08 | slava | which is reasoanble, since you should only really need eval to implement stuff like REPLs |
| 02:26:12 | tarcieri | because I'm basically doing something like eval(string, scope, bound_variables) |
| 02:26:15 | slava | eval to access local variables is bad |
| 02:26:28 | slava | its just bad coding style, period |
| 02:26:34 | slava | any new language shouldn't support it |
| 02:26:36 | ddub | like I said, trivial if you are an interpreter walking an AST! :) |
| 02:26:43 | ddub | and your local scope is a hashtable |
| 02:26:48 | slava | ddub: any new language should not be an interpreter walking an AST :) |
| 02:27:12 | tarcieri | hehe |
| 02:27:34 | tarcieri | slava: that's what Reia does now for the toplevel scope |
| 02:27:53 | tarcieri | which sucks |
| 02:27:57 | tarcieri | that's what I'm trying to fix |
| 02:28:33 | ddub | yeah this made my brain hurt: http://www.tinlizzie.org/ometa-js/#OMeta_Tutorial |
| 02:28:49 | tarcieri | slava: I'm trying to move to a purely compiled representation |
| 02:29:09 | ddub | the source did, rather. |
| 02:34:51 | ddub | tarcieri: are you doing this for rubinius? |
| 02:59:33 | tarcieri | ddub: Reia |
| 03:15:38 | tarcieri | ddub: I'm trying to make a language that's simpler than Ruby, but faces a lot of the same design challenges as a Ruby implementation |
| 12:12:29 | rue | ddub: Look at the ruby_parser specs/tests |