Why I still reach for Lisp and Scheme instead of Haskell
51–60 of 172 posts
Re: Why I still reach for Lisp and Scheme instead of Haskell
#52> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
it's been my experience that when most people say "Lisp does this that or the other", what they usually mean is "Common Lisp does this that or the other". Often there's an implicit "with SLIME" in there as well
Re: Why I still reach for Lisp and Scheme instead of Haskell
#53Because they're elegant. Haskell is a conceptual and syntax mess.
Compared to lisp? Ok fine. Syntax doesn't get more simple than Lisp. But compared to JavaScript? C++? C#? Haskell is top tier when it comes to syntactic and conceptual elegance. The biggest problem is tooling, I would say.
(I write Haskell professionally)
Re: Why I still reach for Lisp and Scheme instead of Haskell
#54I tried some ML language once, it's difficult even to write a basic factorial example, which in Scheme I could do it iteratively and recursively with ease. Either with S9 Scheme for quick fun (it has Unix sockets and ncurses :D ) or Chicken Scheme for completeneless (R5RS/R7RS-small + modules), I always have fun with both. Oh, and well, Forth, too, but more like a puzzle (altough it shines to teach you that you can d…
What do you mean? It's one of the first things taught in any tutorial for the ML family or Haskell.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#55I don't believe monads are a "heavy handed abstraction" and that's what prevents people from prototyping in Haskell. What really prevents people from writing in Haskell at a reasonable speed is the poor language design. Programming languages are supposed to aid in reading by emphasizing structure. It's important to emphasize that a particular group of "words" constitutes a function call, or a variable definition, or…
> Haskell is a word salad. Every line you read, you have to read multiple times, every time trying to guess the structure from the disconnected acronyms. This is a huge roadblock on the way to prototyping as well as any other activity that implies the ability to read code quickly. I couldn't disagree more. Yes, there is more upfront work understanding Haskell code. But it's very dense. Once you understand the pattern…
Not to support the parent comment, which I disagree with, but If you use multi-line let-bindings, those require that you indent not just more than the previous line, but as much as the first token after the let keyword on the previous line. It’s a very strange rule, all the more surprising because it’s inconsistent even with the rest of the language. It is totally avoidable if you, like I think most experienced haskellers do, just prefer ‘where’, but people more familiar with procedural code usually lean into using ‘let’ everywhere because it feels more familiar.
I think the strange indentation used to be required in more places - I vaguely remember running into it a lot more when I started with Haskell 20 years ago, but that was also just when I was new to the language. These days I just keep ‘let’ to a bare minimum, so it doesn’t bother me. One thing that made Elm frustrating was that it disallowed ‘where’ clauses, forcing you to deal with this weird edge case all the time.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#56I learned Scheme before Haskell and as much as I enjoyed the experience, I still wouldn't reach for Haskell first. It's pretty much limited to my xmonad configuration.
I have written a very large codebase in Scheme (gambit) and in the end I really, really, wanted a type system to catch bugs.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#57> Lisp hackers have been effortlessly reshaping the language for decades using the powerful macro system and extending and bending the language to their will. I've written a bit of Racket code ( https://github.com/evdubs?tab=repositories&q=&type=&language... ) and I still haven't written a macro. In only one case did I even think a macro would be useful: merging class member definitions to include both the type and t…
For what it's worth, anytime I have written a macro it's usually not because it's needed, but just because I think it'll be fun :)
I've not written a Scheme macro since. I've written hundreds of Kernel operatives though.
I was also a typoholic previously, but am in remission now thanks to Kernel.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#58Earlier quoted context omitted.
> Haskell is a word salad. Every line you read, you have to read multiple times, every time trying to guess the structure from the disconnected acronyms. This is a huge roadblock on the way to prototyping as well as any other activity that implies the ability to read code quickly. I couldn't disagree more. Yes, there is more upfront work understanding Haskell code. But it's very dense. Once you understand the pattern…
> inner expressions must be indented more Not to support the parent comment, which I disagree with, but If you use multi-line let-bindings, those require that you indent not just more than the previous line, but as much as the first token after the let keyword on the previous line. It’s a very strange rule, all the more surprising because it’s inconsistent even with the rest of the language. It is totally avoidable i…
let
f = 9
fo = 10
foo = 123
in f+fo+foo
vs. let
f = 9
fo = 10
foo = 123
in f+fo+fooRe: Why I still reach for Lisp and Scheme instead of Haskell
#59> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
Not Lisp, but for those interested in editing programs that are running in production: I read some Erlang article saying that hot swapping is not actually very useful in production because of some reasons, and instead a blue-green deployment is preferred. Can't find the link atm. This was close: https://learnyousomeerlang.com/relups Compare to this comment: https://news.ycombinator.com/item?id=42405168 Hot swaps for…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#60> You can pause, inspect objects, change values, and even redefine a broken function on the fly to test a fix in any environment (yes even in production, while running). I see this mentioned often, and it sounds amazingly useful (especially the part about fixing in production!). But how truly widespread is it among the Lisp dialects to be able to connect to a running program, debug, and hotfix it? I understand Common…
Python is not Lisp, but jumping into a Python REPL in a halfway-run program and poking at the internals easily is _very_ useful as a debugging tool, quickly getting you answers on some messier programs. It's a shame that other scripting languages that theoretically have the capabilities to do this don't do this (looking at you, node! Chrome dev tools are fine but way too futzy compared to `import pdb; pdb.set_trace()…