News for hackers. Stuff that matters.
Re:I’ve Consed Every Pair by PythagoRascal on Friday May 01, 2020 @10:29AM (#23042311)
If I may ask, what references would you recommend to someone interested in something like Lisp, but who has never touched a functional language before?
Re:I’ve Consed Every Pair by pcr910303 on Friday May 01, 2020 @10:42AM (#23042441)
Not OP, but Lisp isn’t really a functional language — it’s a usual language that also has some functional ideas inside. Mutation is common, don’t think Lisp will be a language like Haskell.

For resources, I would recommend Practical Common Lisp[0] and PAIP[1].

For some modern development practices, the Common Lisp Cookbook[2] is great.

[0]: http://www.gigamonkeys.com/book/

[1]: https://github.com/norvig/paip-lisp

[2]: http://lispcookbook.github.io/cl-cookbook/

Re:I’ve Consed Every Pair by munificent on Friday May 01, 2020 @12:37PM (#23043839)
> Lisp isn’t really a functional language — it’s a usual language that also has some functional ideas inside.

The idea that "functional language" means "purity" is something that was retconned onto functional programming in the 90s decades after Lisp had defined functional programming to mean programming in terms of expressions that produce values.

I like the ML/Miranda/Haskell lineage of languages a lot, but it really bugs me when people in that camp lay claim to some notion of being a "better" functional language than the older Lisp family. (Lispers, while smug about many other things, are generally less smug about how "pure" their languages' approach to functional programming is.)

This is like arguing that Lagavulin isn't "really" whiskey because real whiskeys are made in the US from corn mash.

Re:I’ve Consed Every Pair by aidenn0 on Friday May 01, 2020 @02:01PM (#23044757)
Lagavulin isn't whiskey, it's whisky (/s)
Re:I’ve Consed Every Pair by couchand on Friday May 01, 2020 @09:08PM (#23048150)
There's no true scotch, man.
Re:I’ve Consed Every Pair by DonHopkins on Saturday May 02, 2020 @04:19PM (#23054595)
Lisp is "Functiony"! ;)

But it took JavaScript to invent the concept of "Truthy".

https://www.sitepoint.com/javascript-truthy-falsy/

Re:I’ve Consed Every Pair by hedora on Sunday May 03, 2020 @09:43AM (#23058931)
Perl 5 has truthy values, and it came out a year (1994) before JS (1995). The idea probably appeared in Perl 1 (1987), and probably was borrowed from shell scripting, etc. It wouldn’t surprise me if “Truthy” predated unix.
Re:I’ve Consed Every Pair by dreamcompiler on Friday May 01, 2020 @06:59PM (#23047382)
Sigh. Immutability is a relatively recent addition to the long list of features that defines a language as "functional."

In the beginning, "functional" meant functions were first-class objects and there was little--if any--global state. Lisp passes this test. Lisp invented this test (especially Scheme which introduced lexical scoping and closures).

If you want to write code with immutable data, you can certainly do so with Lisp; it just doesn't force you to. For the most part Lisp creates a brand new data structure when you "modify" an old one. You have to work a bit harder to actually mutate things.

Where e.g. Haskell is "more" functional than Lisp is more about automatic currying than immutability. Plus the static type system that allows monadic programming, which is much more difficult in Lisp because of Lisp's dynamic typing.

Re:I’ve Consed Every Pair by PythagoRascal on Friday May 01, 2020 @10:49AM (#23042505)
> Lisp isn't really a functional language

I guess I have even more to learn then :). Thank you for the links.

Re:I’ve Consed Every Pair by 7thaccount on Friday May 01, 2020 @11:41AM (#23043169)
Common Lisp can be used as a functional language, or imperative, or extremely advanced OO (see CLOS).

There are lots of different Lisp's though. Clojure is the most popular one that runs on the JVM and idiomatic Clojure is generally pretty functional although it calls out to lots of Java which is OO.

Re:I’ve Consed Every Pair by DonHopkins on Saturday May 02, 2020 @04:33PM (#23054693)
Lisp DEFs the FUN in FUNCTIONAL.
Re:I’ve Consed Every Pair by ctdean on Friday May 01, 2020 @11:37AM (#23043104)
On Lisp is the best Lisp programming book I have ever read. Both PG’s lisp books are great and you can just read those and the CL hyperspec.

On Lisp is out of print, but can be downloaded.

Re:I’ve Consed Every Pair by mark_l_watson on Friday May 01, 2020 @12:14PM (#23043567)
I would like to recommend that after reading PG's On Lisp, that you also consider Doug Hoyt's Let Over Lambda. Both are really great books for advanced study.
Re:I’ve Consed Every Pair by mark_l_watson on Friday May 01, 2020 @12:12PM (#23043544)
I think Racket might be worth you spending one or two evening with, to see if you like it. It has an OK IDE, and a rich ecosystem.
Re:I’ve Consed Every Pair by onemoresoop on Saturday May 02, 2020 @08:41AM (#23051411)
I second this, I discovered scheme through racket and got a lot of enjoyment out of it. DrRacket is easy to install and a great platform. I’d it a week to get used to it.