> 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…
Yes but I don’t know how someone familiar with a Jetbrains IDE can claim that only Lisp has that feature. I love Common Lisp and SLIME, but most of what it can do, I can also do in Java with the IDE. Change a method definition while it’s running and then restart the method? No problem. Run any code within the context of the running method? Yes, Java can do it. Change local variables values in the middle of a method?…
Why I still reach for Lisp and Scheme instead of Haskell
141–150 of 172 posts
Re: Why I still reach for Lisp and Scheme instead of Haskell
#142Earlier quoted context omitted.
Yes but I don’t know how someone familiar with a Jetbrains IDE can claim that only Lisp has that feature. I love Common Lisp and SLIME, but most of what it can do, I can also do in Java with the IDE. Change a method definition while it’s running and then restart the method? No problem. Run any code within the context of the running method? Yes, Java can do it. Change local variables values in the middle of a method?…
I've frequently said that Java + JRebel gets the closest to the Common Lisp + slime experience (closer than Python) but as you say the Lisp experience is still superior, the Java ecosystem has yet to close the gap*. The widest part of that gap I'd mention is in not having the condition system built-in to Java (though I'm aware people have tried to make a comparable one as a library), lacking it degrades the debugging…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#143> 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 trivially easy to do in Clojure (literally one line of code to start an nREPL server, after deps/requires), and often very useful in dev and personal, local projects. In practice, I’ve never once used it in a user-facing production system, in 16 years of writing Clojure. Out of the box, there’s zero security or audit trail. Building that properly isn’t trivial and, even with it in place, many corporate infosec t…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#144Re: Why I still reach for Lisp and Scheme instead of Haskell
#145Earlier quoted context omitted.
I use it a lot for my one man projects; it is really fantastic in that setting. I use SBCL exclusively; it is very fast and robust and has image based development. I have my own versioning toolkit so I don't go insane. It is obvious why it is not really used or recommended as it really falls flat in a team setting, mostly even when 2 people are involved. But fixing bugs live as they happen and then spitting out a new…
What makes you think it falls flat in a team setting? There are plenty of N-pizza-sized teams successfully using Lisp to this day and you're probably aware of many teams successfully using Lisp in the past, too. There's also the success of Clojure. What's required to have a well functioning team is mostly programming language independent; Lisp itself won't save a team lacking those properties anymore than say Java wo…
I prefer lisp over most other things in life, and so does my team. I was specifically not talking about the language though.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#146Earlier quoted context omitted.
How do Lisp developers deal with XML and JSON? Convert it to s-expressions. As a common lisp developer, that is only very vaguely true for me. The mapping I prefer for json Lisp is: true: t false: nil null: :null [] #() {} (make-hash-table :test #'equal) This falls out of my desire for the mapping to be bijective: - The only built-in type that is unambiguously a mapping type is hash-tabe. - nil is the only value that…
In Kernel I would use something like this: true #t false #f null () [...] (& ...) "k" : v (: k v) {...} (@ ...) Where &, :, @ are defined as: ($define! & ($lambda args (cons list args))) ($define! : ($vau (key value) env (list key (eval value env)))) ($define! @ (wrap ($vau kvpairs env (eval (list* $bindings->environment kvpairs) env)))) Using the "person" example from the JSON/syntax section on Wikipedia: ($define!…
Re: Why I still reach for Lisp and Scheme instead of Haskell
#147I 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 simplicity of s-expressions), but procedures aren't really good at expressing complex systems or problem domains. In my experience, relational languages like Prolog are vastly better at this. Lisps are much easier for the average programmer to pick up and write reasonably performant code with, though.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#148Earlier quoted context omitted.
Think of macros as what you want when you want to perform computation at compile time rather than run time. An example: building the equivalent of a switch statement, but that compares (via string equality) with a set of strings. The macro would translate this into code that would do something like a decision tree on string length or particular characters at particular positions. Basically anything that's done with a…
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.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#149Earlier quoted context omitted.
In Kernel I would use something like this: true #t false #f null () [...] (& ...) "k" : v (: k v) {...} (@ ...) Where &, :, @ are defined as: ($define! & ($lambda args (cons list args))) ($define! : ($vau (key value) env (list key (eval value env)))) ($define! @ (wrap ($vau kvpairs env (eval (list* $bindings->environment kvpairs) env)))) Using the "person" example from the JSON/syntax section on Wikipedia: ($define!…
I don't know kernel very well; what will the value of person print as?
[#environment]
The environment type is encapsulated, so it doesn't give you very useful debug information.Perhaps having `@` produce an environment is the wrong approach and we should just produce an association list instead - then move `$bindings->environment` into the `?` operative to enable querying.
Re: Why I still reach for Lisp and Scheme instead of Haskell
#150> 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…