> Actually, in my opinion, Scheme (and Lisp) allows you to express complex systems and problem domains in more simple terms than any other language can. I disagree with this. Lisps are procedural languages like most other programming languages. They can describe procedures in a relatively simple manner (big asterisk on that one, the simplicity of Lisp as a language is greatly overstated and conflated with the simplic…
Why I still reach for Lisp and Scheme instead of Haskell
151–160 of 172 posts
Re: Why I still reach for Lisp and Scheme instead of Haskell
#152> Actually, in my opinion, Scheme (and Lisp) allows you to express complex systems and problem domains in more simple terms than any other language can. I disagree with this. Lisps are procedural languages like most other programming languages. They can describe procedures in a relatively simple manner (big asterisk on that one, the simplicity of Lisp as a language is greatly overstated and conflated with the simplic…
Prolog is great for the cases where logic programming makes sense but you can easily create a logic engine in Lisp (or other languages - that's what kanren/minikanren which has been ported to many languages)
Re: Why I still reach for Lisp and Scheme instead of Haskell
#153> Actually, in my opinion, Scheme (and Lisp) allows you to express complex systems and problem domains in more simple terms than any other language can. I disagree with this. Lisps are procedural languages like most other programming languages. They can describe procedures in a relatively simple manner (big asterisk on that one, the simplicity of Lisp as a language is greatly overstated and conflated with the simplic…
Prolog is great for the cases where logic programming makes sense but you can easily create a logic engine in Lisp (or other languages - that's what kanren/minikanren which has been ported to many languages)
Re: Why I still reach for Lisp and Scheme instead of Haskell
#154Earlier quoted context omitted.
That sort of hotfix workflow isn't really a thing in Racket or Scheme in general. Changing the definition of a function doesn't update everything else that calls that function like it does in CL. Maybe emacs lisp works that way?
You know, after some testing with a bunch of different scheme implementations, I take back what I said, at least for working in a REPL. (define (displayln msg) (display msg) (newline)) (define (inner x) (+ x 1)) (define (outer x) (inner x)) (displayln (outer 5)) (define (inner x) (+ x 2)) (displayln (outer 5)) outputs 6 and 7 in every one I tried, not the 6 and 6 I expected.
(let ((inner (lambda (x) (+ x 3)))) (outer 5))
"7"
But updating the definition of inner with set! or define changes the top-level definition.Re: Why I still reach for Lisp and Scheme instead of Haskell
#155Earlier quoted context omitted.
The other motivation for me is to drastically reduce boilerplate code. I can’t believe people here are saying they never use macros, they are so good for this that avoiding them sounds to me like a skill issue! Overuse can damage readability, sure, but so can pretending macros are not an option.
Operatives do that for me, better than macros. Parent is correct that macros are compile time, which gives them a performance advantage over operatives - but IMO, they're not better ergonomically. I find operatives simpler, cleaner and more powerful.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#156> Actually, in my opinion, Scheme (and Lisp) allows you to express complex systems and problem domains in more simple terms than any other language can. I disagree with this. Lisps are procedural languages like most other programming languages. They can describe procedures in a relatively simple manner (big asterisk on that one, the simplicity of Lisp as a language is greatly overstated and conflated with the simplic…
I think it all depends on the shape of the problem. I love Prolog for its expressive power, sometimes. Complex simulation problems are really nice to model in OCaml or CLOS, and then again, maybe remodelling in Prolog brings some insights. And often writing a recursive function in Lisp is all you need to understand a complex system. It's all layers. An outer shell to prolog would be a theorem solver for example, beca…
I think it's the wrong way to look at it. It's not that Prolog is a rudimentary theorem solver, it's that theorem provers are a specialized use-case of deductive proofs, so a computational foundation of FOL makes them trivial to write as programs. A pile of bricks and a jar of mortar isn't a rudimentary house, so to speak.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#157Earlier quoted context omitted.
So you want to line the equals signs up or similar? let f = 9 fo = 10 foo = 123 in f+fo+foo vs. let f = 9 fo = 10 foo = 123 in f+fo+foo
No, the issue is if the first binding is on the same line as the `let`, you are required to write, e.g.: someValue = let f = 9 fo = 10 foo = 123 in f+fo+foo rather than: someValue = let f = 9 fo = 10 foo = 123 in f+fo+foo I think it used to be the case that it had to be indented past the `=` or the `let` even if it was't on the same line. Note also that `in` has to be indented past `someValue`, but doesn't need to be…
someValue = let {f = 9;
fo = 10;
foo = 123 }
in f+fo+foo
it will just look a little out of place.Edited to add that this is also OK:
someValue = let
f = 9
fo = 10
foo = 123
in f+fo+fooRe: Why I still reach for Lisp and Scheme instead of Haskell
#158Earlier quoted context omitted.
M-expressions were never implemented and never used.
Actually, variations on M-expressions have been created many times in the Lisp world. (Look what you can do with macros!) So far, none of them has caught on. The latest attempt for Scheme is SRFI-266, which creates a very nice infix expression sublanguage. If I were working on a team, I would encourage them to use this, but I don't know if it has enough traction to become widespread.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#159Haskell is godsend when using LLMs though.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#160Earlier quoted context omitted.
Sometime back 15 years ago [0], I hit a bit of an existential crisis regarding my career and the kind of work I was doing. I thought the particular technology I was working in was "part of the problem", as I felt pigeon-holed by .NET and C# to always be a corporate-monkey CRUD consultant. So, I went out in search of something better. Different programming languages. Different environments. Just something that wasn't…
> [...] who thought it was okay to yell at people about [...] That society as a whole accepts this kind of abuse, no matter industry or circumstances, is beyond me. It's an abuse of power. If anybody did this to anyone, the only appropriate response should be to walk and never come back. Nobody would want to accept this kind of crap from family and friends, so why is it ok in a professional setting? Because of the mo…
Got fired shortly thereafter for basically refusing to commit timesheet fraud. That's when I went on my "programming language walkabout." It was an amazing time.
Now I have a wife and kids and a mortgage. But also now I'm the boss, working hard to not inflict the same bullshit on my people that was inflicted upon me.