News for hackers. Stuff that matters.
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by fidesomnes on Friday April 16, 2021 @07:59AM (#26832789)
I used to work at an AI firm that used it. Large Lisp codebases are a minefield with near impossible security and debugging issues. I still love it as a programming language tho.
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by ska on Friday April 16, 2021 @12:00PM (#26835558)
> Large Lisp codebases are a minefield with near impossible security and debugging issues.

Sounds about like most large codebases. Languages can't save you from this, it seems, only discipline can.

Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by abhinav22 on Friday April 16, 2021 @09:51AM (#26833856)
I would love to hear more on the security challenges and debugging issues, if you have time. It’s not used as much in industry, so any insights are really very valuable.

Also so cool that you worked in AI! That’s my dream field :)

Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by blacktriangle on Friday April 16, 2021 @02:42PM (#26837534)
I saw a fun debugging issue the other day on r/lisp that almost made me want to walk away from lisp for good.

You have a function (defun my-val () "a string")

Referentially transparent, easy to reason about right? Wrong. Lisp strings are mutable, and everything is a reference. So if you do something like this

(replace (my-val) "b" :start1 0 :end1 1)

(my-val) => "b string"

I appreciate that CL doesn't force everything to be immutable, but it seems like at least strings would benefit from being treated as immutable values.

Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by dreamcompiler on Friday April 16, 2021 @06:28PM (#26839757)
Destructive modification of literal objects is one of those things you're not supposed to do because the consequences are undefined [0]. Some CL implementations might let you get away with it; others might not. I agree that it would be better if immutability was required for literals.

[0] http://www.lispworks.com/documentation/HyperSpec/Body/03_aba...

Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by blacktriangle on Saturday April 17, 2021 @09:34AM (#26844151)
Nice link. I'd be happy if an implementation just turned that into a compiler error. I can see use cases for reaching in and mutating like that, but also seems like dynamic scope is a better solution for when you want that kind of action at a distance.
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by kagevf on Friday April 16, 2021 @04:18PM (#26838599)
I remember that ... it was pretty surprising!

I thought I could do (string "a string") to prevent it, but that didn't work.

(concatenate 'string "a string") worked, though ...

Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by abhinav22 on Friday April 16, 2021 @04:10PM (#26838536)
Interesting example. Yes, it’s not a perfect language by any means :-) Some things are better in Lisp, some things are better in other languages as well for sure!
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by medo-bear on Friday April 16, 2021 @08:28AM (#26833030)
There are a number of large companies that use CL quite effectively for safety critial purposes. Can you please give more details about your experience?
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by exdsq on Friday April 16, 2021 @08:53AM (#26833262)
Out of interest can you give some examples?
Re:Lisp and the Web: Creating Web Apps Through Lisp and GCE by medo-bear on Friday April 16, 2021 @12:39PM (#26836085)
siscog in portugal is one example but there are others, historical and current. it is also used in quantum computing and financial markets. gramarly and google flights are perhaps the most famous current users of the software.

edit: i adjusted my answer because i thought i was answering to parent