Live data from Hacker News

Lisp's Influence on Ruby

blog.tacoda.dev

11–20 of 91 posts

Re: Lisp's Influence on Ruby

#12

I love Ruby, use it for most of my projects that don't require performance. Nothing I would love more than a Ruby with a Common-Lisp like compiler and runtime. Unboxed types, native compilation, partial compilation, live image (Ruby has this but "faster Rubies" like Crystal don't), etc...

... or just use Common Lisp.

Re: Lisp's Influence on Ruby

#13
post #2

That is actually Lisp influence on Smalltalk, and Perl, that eventually influenced Ruby.

Totalle agree, I just googled it: "Yukihiro 'Matz' Matsumoto heavily credits Smalltalk as the deepest structural inspiration behind Ruby’s object model. He combined Smalltalk’s beautiful object-oriented architecture and message-passing system with features from other languages to create a tool designed primarily for developer happiness." Including the closures and collection operations.

"Some may say Ruby is a bad rip-off of Lisp or Smalltalk, and I admit that. But it is nicer to ordinary people."

(Matz speaking at the LL2 conference some 20+ years ago)

Re: Lisp's Influence on Ruby

#14
post #12

I love Ruby, use it for most of my projects that don't require performance. Nothing I would love more than a Ruby with a Common-Lisp like compiler and runtime. Unboxed types, native compilation, partial compilation, live image (Ruby has this but "faster Rubies" like Crystal don't), etc...

... or just use Common Lisp.

Which is what I do. One can dream though right? Of a world where Ruby stayed just a tad more Lisp-y and less Perl/C/Smalltalk/Unix-y.

Also I'm working on a DSL/Macros that give me more Ruby-esque quality of life things in Lisp.

Re: Lisp's Influence on Ruby

#18
post #11

> He’s described Ruby’s design as starting from a simple Lisp, stripping out macros and s-expressions Put the macros back! It would be so cool!

You kind of don't need them in Ruby, because everything is a method or an object or a closure and you can dynamically create and alter those at runtime. That's why Ruby is really good for ad-hoc DSLs in ways that Rust and Swift really are not.

Re: Lisp's Influence on Ruby

#19
post #9
post #7

Earlier quoted context omitted.

But macros and s-expressions are two of my favorites parts of lisp!

Funny enough Lisp was originally meant to be written in a higher level syntax (with infix operators and everything). But yeah, macros and S-expressions make it easier to write your own DSLs.

With decades later, Dylan and Julia becoming the only ones that kind of managed to get some adoption doing it.

For better or worse, parenthesis aren't that bad with the proper IDE tooling.

Re: Lisp's Influence on Ruby

#20
Now that I'm out of the corporate tyranny and have my own company, I use lisp for everything. There's certain satisfaction in writing config files and persisting data directly in s-expressions. Any json requirements are triggered by exports to foreign systems.
Post reply on HN