News for hackers. Stuff that matters.
Re:Structure and Interpretation of Computer Programs – JavaS... by jcora on Wednesday December 18, 2019 @07:48AM (#21824267)
Can lisps place arbitrary code in types and formally verify complex properties of stateful systems--all in the same language? Doubt it. Lisp isn't the epitome of power.
Re:Structure and Interpretation of Computer Programs – JavaS... by shakna on Wednesday December 18, 2019 @11:48AM (#21826708)
... Yes. Of course they can.

Lisp is usually an academic language, which means research into type systems and type safety frequently takes place in it.

ACL2 is a theorum prover written in Common Lisp [0]. And not just a random project either, but something AMD, ARM, IBM, etc. have used.

[0] https://en.wikipedia.org/wiki/ACL2

Re:Structure and Interpretation of Computer Programs – JavaS... by jcora on Friday December 20, 2019 @05:54AM (#21843181)
This is not a practical language with dependent types tho lol
Re:Structure and Interpretation of Computer Programs – JavaS... by throwawaybbb on Wednesday December 18, 2019 @07:55AM (#21824311)
Yes. That's the point, you will write the dsl to do that in scheme. Then use that to solve the original problem. Abstractions on top of abstractions.
Re:Structure and Interpretation of Computer Programs – JavaS... by jcora on Friday December 27, 2019 @04:33PM (#21894871)
No. You can write a compiler for any language in Scheme, but it's disingenuous to say that Scheme has that language's features. There are many languages with way more powerful features than Scheme if you're comparing type systems.
Re:Structure and Interpretation of Computer Programs – JavaS... by iLemming on Wednesday December 18, 2019 @11:24AM (#21826428)
Checkout Little Typer and Clojure.Spec.

> Lisp isn't the epitome of power.

Lisp is the epitome of simplicity. If the foundations based on simplicity you can do very powerful things.

Re:Structure and Interpretation of Computer Programs – JavaS... by braythwayt on Wednesday December 18, 2019 @06:27PM (#21830572)
Lisp in general is not the epitome of simplicity. Lisp-2s like Common Lisp add some cognitive load for those used to simpler languages (although Lisp-2s have their advantages).

And of course, Lisps that include meta-object protocols (Flavours, Common Lisp again, &c.) deliver power, very elegantly, but for people unfamiliar with them, there is a learning curve to climb.

Re:Structure and Interpretation of Computer Programs – JavaS... by iLemming on Wednesday December 18, 2019 @07:31PM (#21830959)
You're mistaking Lisp for a programming language. Which Lisp is not. Lisp is an idea (or rather a set of ideas), based on which different PLs can be implemented.
Re:Structure and Interpretation of Computer Programs – JavaS... by lispm on Thursday December 19, 2019 @02:02AM (#21832665)
McCarthy not only had an idea, he and his team a specific programming language. It even had a manual.

This is the Lisp I manual:

http://bitsavers.org/pdf/mit/rle_lisp/LISP_I_Programmers_Man...

Re:Structure and Interpretation of Computer Programs – JavaS... by neonate on Wednesday December 18, 2019 @08:08PM (#21831178)
He said Lisps and Lisp-2s, so obviously knows this.
Re:Structure and Interpretation of Computer Programs – JavaS... by iLemming on Wednesday December 18, 2019 @08:56PM (#21831398)
I'm perfectly aware of that. My point stands - using a concrete language to generalize over some abstract ideas might be confusing for those who are unfamiliar. In general, Lisp dialects strive for simplicity.

That is exactly the reason why Scheme was chosen for SICP.

Re:Structure and Interpretation of Computer Programs – JavaS... by braythwayt on Wednesday December 18, 2019 @09:20PM (#21831518)
Can we agree on this?

“Lisp dialects strive for elegance.”

Elegance is not always synonymous with simplicity. For example, Smalltalk’s use of Class and Metaclass is very elegant, but most programmers encountering this for the first time would not call it “simple.”

After they got over the hump and grok how the two things work together to serve as the foundation for Smalltalk’s OOP and allow programmers to alter Smalltalk’s OOP... Then the elegance emerges.

I think elegance is a measure of the simplicity of a tool relative to the complexity of the problem domain, whereas simplicity feels like a more absolute measure.

Re:Structure and Interpretation of Computer Programs – JavaS... by iLemming on Wednesday December 18, 2019 @11:57PM (#21832081)
Yes! This is probably the most accurate description. I take my hat off. Thank you!