Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
Hacking S-expressions into Ruby | Better HN
Hacking S-expressions into Ruby
(opens in new tab)
(sonnym.github.io)
31 points
sonnym
11y ago
6 comments
Share
6 comments
default
newest
oldest
_mikz
11y ago
` puts RubyVM::InstructionSequence.compile('[]').disasm` points to `newarray` which is YARV instruction:
https://github.com/ruby/ruby/blob/ca6b174078fa15f33655be704d...
lectrick
11y ago
I don't suppose there's a way to hook into newarray ...?
Maybe a gem with a C component could provide a hook?
aaronem
11y ago
At some point it's surely simpler just to write a Lisp interpreter instead.
1 more reply
lookatparsetree
11y ago
Have a look at
https://github.com/seattlerb/parsetree
bradleyland
11y ago
That version only works with 1.8. There is an updated fork though, sexp_processor:
https://github.com/seattlerb/sexp_processor
j
/
k
navigate · click thread line to collapse