Hacking S-expressions into Ruby
sonnym.github.io
Hacking S-expressions into Ruby
1–7 of 7 posts
Re: Hacking S-expressions into Ruby
#2` puts RubyVM::InstructionSequence.compile('[]').disasm` points to `newarray` which is YARV instruction:
https://github.com/ruby/ruby/blob/ca6b174078fa15f33655be704d...
Re: Hacking S-expressions into Ruby
#3` puts RubyVM::InstructionSequence.compile('[]').disasm` points to `newarray` which is YARV instruction: https://github.com/ruby/ruby/blob/ca6b174078fa15f33655be704d...
I don't suppose there's a way to hook into newarray ...?
Maybe a gem with a C component could provide a hook?
Re: Hacking S-expressions into Ruby
#4` puts RubyVM::InstructionSequence.compile('[]').disasm` points to `newarray` which is YARV instruction: https://github.com/ruby/ruby/blob/ca6b174078fa15f33655be704d...
I don't suppose there's a way to hook into newarray ...? Maybe a gem with a C component could provide a hook?
At some point it's surely simpler just to write a Lisp interpreter instead.
Re: Hacking S-expressions into Ruby
#5Have a look at https://github.com/seattlerb/parsetree
Re: Hacking S-expressions into Ruby
#6Have a look at https://github.com/seattlerb/parsetree
That version only works with 1.8. There is an updated fork though, sexp_processor: