Live data from Hacker News

Lisp's Influence on Ruby

blog.tacoda.dev

81–90 of 91 posts

Re: Lisp's Influence on Ruby

#81
post #77

Earlier quoted context omitted.

I don't want to be a gatekeeper, but Clojure, Janet and similars doesn't even have cons cells; that's hardly 'the same programming language'.

Is the lack of cons cells a significant limitation?

Limitation is the wrong way to think about things when computational equivalence is in play. It's about mental foundation. Lisp at its core is like driving a Turing machine, Clojure is not.

Re: Lisp's Influence on Ruby

#83
post #76

Most of the points listed are hardly considered lispy anymore these days, Python also has most of these. Where Ruby's lisp lineage really shows is the fact that it's got Kernel#callcc, aka call with current continuation. It doesn't get any lispier than that!

`callcc` was obsoleted about 10 years ago. I don't know if it has been removed yet. https://bugs.ruby-lang.org/issues/10548

Re: Lisp's Influence on Ruby

#84
post #44
post #19

Earlier quoted context omitted.

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.

> For better or worse, parenthesis aren't that bad with the proper IDE tooling. Hell, even without [0], you can at least count the parenthesis by hand in a pinch. I remember seeing lots of crazy-awesome stuff done in AutoLisp by 'non-programmers', versus 'structure as spacing' in Python which really sucks if the Editor was designed to use the system default (probably non-monospaced, cause other products in the indust…

Reminds me of my first exposure to Lisp. It was in a survey course in my final year. This was using punched card input and output on a line printer. You could turn on paren counting, but it was clumsy at best. This was in 1970

Re: Lisp's Influence on Ruby

#85
post #52

Earlier quoted context omitted.

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.

Have you checked out dieggsy's Whisper ( https://sr.ht/~dieggsy/whisper/ >) yet? It's based on Arne Bab's Wisp (SRFI 119).

and the newer Moonli for CL: https://moonli-lang.github.io/ (:

Re: Lisp's Influence on Ruby

#86
post #75

Earlier quoted context omitted.

I feel languages should just have some kind of sugar or operator for this, in fact in Ocaml the |> operator exists where |> ( ) Are just one and the same For a variadic language you'd need something more involved though. But some kind of syntax can probably be invented in some language.

Elixir has it. To make it worthwhile, the entire standard library has to be designed to have the ‘object’ of the function as first argument. [1,2,3] |> Enum.map(&square/1) |> Enum.filter(&odd?/1) Using a threading operator where there is no such consistency is painful. This is why I dislike CL’s or Python’s map function, taking the list to operate on as second argument, instead of first. A threading operator wouldn’t…

The issue is that these functions in Lisps are variadic and can accept more arguments than one. `map`, and `zipwidth` in lisps are actually the same function.

Re: Lisp's Influence on Ruby

#87
post #44
post #19

Earlier quoted context omitted.

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.

> For better or worse, parenthesis aren't that bad with the proper IDE tooling. Hell, even without [0], you can at least count the parenthesis by hand in a pinch. I remember seeing lots of crazy-awesome stuff done in AutoLisp by 'non-programmers', versus 'structure as spacing' in Python which really sucks if the Editor was designed to use the system default (probably non-monospaced, cause other products in the indust…

[dead]

Re: Lisp's Influence on Ruby

#88
post #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.

That JSON prohibits trailing commata makes it an absolute pain to work with in practice. I also like how in Haskell: something = { element , element1 , element2 , element3 } Is an actually idiomatic way to deal with the lack of trailing commata.

Commata?

Re: Lisp's Influence on Ruby

#89
post #2

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

The article doesn't mention Perl at all but it did have some direct influences on Ruby.

Even Ruby's trailing blocks syntax are an homage to Perl's block list subroutines:

  # first Ruby example in article
  users.select { |u| u.admin? }.map(&:email)

  # using Perl's block list
  map {$_->email} grep {$_->is_admin} @users;
Post reply on HN