Live data from Hacker News

Understanding the Power of Lisp (2020)

joshbradley.me

91–100 of 140 posts

Re: Understanding the Power of Lisp (2020)

#91
post #45

Earlier quoted context omitted.

I follow that up with knowledge of a large project that was started in Lisp (actually Scheme) that had to be converted to C# because the difficulty of finding experienced Scheme developers for the years of maintenance that would be expected was far more than the cost of converting to a language that's more "usable." Still remember all the meetings that generally always included someone complaining "what the $#&^%! we…

I know a startup that hired a Marxist-collective group of programmers. I was told this story years ago, and they were acquired, so I’ll just name the firm - “White Ops”. This story is so absurd that I’m naming the firm in hopes someone can verify the accuracy of this, although I trust the person that told me the tale. The programmers were based in Canada and only wrote in Haskell. The CTO of White Ops had apparently…

In what way was the group "Marxist"? Are you trying to say they hired the entirety of a workers co-op?

Re: Understanding the Power of Lisp (2020)

#92
post #45

Earlier quoted context omitted.

I know a startup that hired a Marxist-collective group of programmers. I was told this story years ago, and they were acquired, so I’ll just name the firm - “White Ops”. This story is so absurd that I’m naming the firm in hopes someone can verify the accuracy of this, although I trust the person that told me the tale. The programmers were based in Canada and only wrote in Haskell. The CTO of White Ops had apparently…

You described every enterprise Java project developed by contractors except that it can’t be rewritten because Java is THE enterprise language.

Nah, they get rewritten back and forth between Java and .NET, with a little bit of C++ (actually COM) every now and then. :)

Re: Understanding the Power of Lisp (2020)

#93

Note that the examples in the "cdr" section are incorrect. (cdr '(x a)) ; does not return a, it returns (a) (cdr '((x a) y)) ; does not return y, it returns (y) (cdr '((x a) (y b))) ; does not return (y b), it returns ((y b))

The author might be new to Lisp, and I hope what I write doesn't discourage him. There are some other mistakes: ((ab . c) . d . nil) isn't a valid s-expression. Maybe it should be ((ab . c) d . nil) Also, (eq '(a b) '(a b)) ; (a b) is a list and cannot be evaluated by eq eq works fine on lists. It returns T iff its arguments are the same object (i.e. are at the same memory location, or are small enough integers or fl…

> There are some other mistakes:

     ((ab . c) . d . nil)

 isn't a valid s-expression. Maybe it should be

    ((ab . c) d . nil)
Can someone explain why ?

Re: Understanding the Power of Lisp (2020)

#94
post #44

Earlier quoted context omitted.

Well, for Clojure ... Spend 5 minutes playing with -> [0]. Appreciate how pretty it makes the code and how nice it is for laying out sequential operations. What a fun operator. Then try to implement it yourself as a function. When you discover that you can't, you will have discovered the unique power of macros (note the docs link to source code so you can see the readable 8-line macro implementation). You've also lea…

Note that this cannot be written as a function only because Clojure uses strict (call-by-value) evaluation everywhere and has no way to change this (other than Macros). In theory languages could provide annotations to allow a user to specify whether parameters are call-by-value or call-by-need. Haskell and Scala both provide this. But I don't think this is a bad example at all, I tend to think of macros as "extending…

Yeah. And for the interested reader, this is unique power of macros.

It doesn't matter what specific combination of language features are supported. Macros mean you can implement things anyway. It doesn't really matter what the evaluation logic of the language is, a macro can create syntax that does what you want it to.

If there is a macro system available, a new operator can be implemented in any language. If there is no macro system, it depends what features the language supports.

Re: Understanding the Power of Lisp (2020)

#95
post #45

Earlier quoted context omitted.

I follow that up with knowledge of a large project that was started in Lisp (actually Scheme) that had to be converted to C# because the difficulty of finding experienced Scheme developers for the years of maintenance that would be expected was far more than the cost of converting to a language that's more "usable." Still remember all the meetings that generally always included someone complaining "what the $#&^%! we…

I know a startup that hired a Marxist-collective group of programmers. I was told this story years ago, and they were acquired, so I’ll just name the firm - “White Ops”. This story is so absurd that I’m naming the firm in hopes someone can verify the accuracy of this, although I trust the person that told me the tale. The programmers were based in Canada and only wrote in Haskell. The CTO of White Ops had apparently…

> I know a startup that hired a Marxist-collective group of programmers

I think i know these guys! Their names are Karl, Vlad, and Fred, right? Last I heard they founded the International Common-Lisp Party

Re: Understanding the Power of Lisp (2020)

#96
post #34

I have the same response to this as I do to every other lisp article. It’s cool, but how have you personally leveraged this advantage that everyone talks about? What big lisp project has the author contributed to, such that they have enough data to sing it’s praises?

I follow that up with knowledge of a large project that was started in Lisp (actually Scheme) that had to be converted to C# because the difficulty of finding experienced Scheme developers for the years of maintenance that would be expected was far more than the cost of converting to a language that's more "usable." Still remember all the meetings that generally always included someone complaining "what the $#&^%! we…

For a happier note, in this interview they tell how they managed to train non-lisp engineers on their internal browser-based Lisp system: https://lisp-journey.gitlab.io/blog/lisp-interview-kina/

Re: Understanding the Power of Lisp (2020)

#97
post #80

Is VScode with Alive a viable alternative to Emacs with SLIME nowadays? IntelliJ has nothing close to it, does it?

Alive has the most important features of SLIME (including debugger and restarts), so yes. It has less features and is more fragile still.

Nope, saw nothing for IntelliJ. However if it highlights parens, one can code in there and `(load "myfile.lisp")` in any other REPL. It's a start.

Re: Understanding the Power of Lisp (2020)

#98
post #91
post #45

Earlier quoted context omitted.

I know a startup that hired a Marxist-collective group of programmers. I was told this story years ago, and they were acquired, so I’ll just name the firm - “White Ops”. This story is so absurd that I’m naming the firm in hopes someone can verify the accuracy of this, although I trust the person that told me the tale. The programmers were based in Canada and only wrote in Haskell. The CTO of White Ops had apparently…

In what way was the group "Marxist"? Are you trying to say they hired the entirety of a workers co-op?

I was told they are self-described Marxists. I am not an expert in the finer points of communist philosophy but I assume this means they believed in the labor theory of value and the class struggle.

Re: Understanding the Power of Lisp (2020)

#99
post #58

> Eric Raymond went so far as to say that understanding LISP is a “profound enlightenment experience.” Maybe this is true for language hobbyists or whatever, but every few years throughout my career, I went back to LISP or LISP-like languages and never found it super profound. Do I need to spend more time on a project? I just don't get the same excitement others seem to get.

Some of it is because a lot of features that used to be unique in Lisp (or few other "rare" languages) became way more available in other languages - partially thanks to Lisp&co popularising them first.

Other stuff is that it tends to take some time working, and actually ending up using some of the more interesting bits, to see effect.

Lots of people for example talk about macros when it comes to homoiconicity, but rarely (outside of old lisp wizards) do I see people going further to how Lisp makes it easy to build languages and compilers that are easy to debug and handle - I'm not just talking about the common idea trope of "write DSL for your program", because a) you're going to write a partial language specific to your program anyway, no matter the language, you might just obfuscate it calling them functions and types b) the easy manipulation of code and lack of parsing (and thus poof goes half the dragon book) means that writing compilers is simply... simple. And with CL's macroexpand and similar features in other lisps, it tends to be much easier to figure what is going wrong (and it's reasonably easy to add reporting of errors in compiled code down to specific form)

Re: Understanding the Power of Lisp (2020)

#100
post #38

Earlier quoted context omitted.

> So that's how I view Lisp macros - creating code on the fly and executing it. This is an incorrect assumption. In compiled Lisps[0], macros are a compile-time construct, which manipulate the data structures that represent your code[1]. All manipulation occurs at compile-time. In interpreted Lisps, macro evaluation is temporally intertwined with program execution, but the two phases are logically distinct. [0]: Comp…

So Clojure programs are data structures, and you can pass a structure to a macro to rewrite it into something the compiler can evaluate. In this way you can extend the language. You can build your own DSL that solves your particular problem in an organic way that grows as you go along. If I understand that correctly I don't get it, because I would still have to write the macro, which in C# I would write as a function…

Consider that macros generally don't expand syntax - because there is very little syntax anyway, and what you have is a tree of data and function calls.

A Macro just lets you write a function that will be executed by compiler to manipulate such tree, meaning that you can have equivalent of adding syntax like "with/using" from some languages by writing a function that takes as arguments the object and a block of code, then re-emits the same block of code but adding object.Dispose() call at the end. Or whatever else you need.

But they are still normal functions - it's the time of execution that changes.

Post reply on HN