Live data from Hacker News

Chez Scheme is now free

github.com

91–100 of 185 posts

Re: Chez Scheme is now free

#91
post #80
post #75

Earlier quoted context omitted.

Is the fundamental issue in #2 that you don't like the syntax? or that Scheme has mutation? It's interesting looking back on the history of Scheme. Probably because of the order of presentation of SICP, along with hearsay, people seem to get an impression of Scheme being all about functional programming (and if it's because functions are values you can pass around... well even Algol and Pascal could do that). It's tr…

It's both... I feel like Scheme is oversold as axiomatic mathematics. You have to add all this other stuff to it to make anything useful, in particular mutation and mutable data structures. Even toy programs like the metacircular evaluator SICP need this! And yes, I've been programming a lot in the intervening 19 years, and doing imperative programming with ((Lisp)) syntax is hugely annoying. OCaml actually annoyed m…

I agree with you on this. I used lisp/scheme a fair bit in 2004-2008 and over time have gravitated to C++. Not being able to treat memory as a first class primitive ends up being restrictive eventually.

Re: Chez Scheme is now free

#92
post #50
post #41

Earlier quoted context omitted.

I thought scheme was like the beatles - people universally only had good things to say about it.

I might not be getting a reference here, but FWIW, I had a recent experience with Scheme that was interesting. I did SICP nearly 19 years ago as a freshman, in 1997. And then a few months ago, I ported the metacircular-evaluator -- the "crown" of the course -- to femtolisp (the Lisp implementation underlying Julia). My thoughts were: 1) It sure is awkward to represent struct fields 1 2 3 as (cdr struct), (cadr struct…

Regarding #2: I have a complete version of McCarthy's original evaluator at https://programmingpraxis.com/2011/11/01/rip-john-mccarthy/, and it doesn't use a single mutation.

Re: Chez Scheme is now free

#94

Earlier quoted context omitted.

The Guile 2.0 branch. I don't know what magic optimisation dust they sprinkled over the upcoming 2.2, but it sure is fast. We thought about using chicken, but it depends quite a lot on using syntax-case to deconstruct everything, and I didn't want to learn their implicit renaming stuff. Apparently the 2.2 branch has full elisp support. Can't wait for Emacs to run on it.

Ah, that makes sense! Guile 2.2 has a completely rewritten compiler and virtual machine. I'm happy to see some real-world instances of it greatly improving performance.

"greatly improving performance" is an understatement! It was literally 3x. I didn't even have to change anything. Not bad for a language that usually beats python by quite a large margin :)

Re: Chez Scheme is now free

#96
post #41
post #36

Dybvig's compiler course was exemplary. Say what you may about Scheme, you learned so much more in those classes. His Scheme Programming Language book is highly recommended. Especially check out his extended examples chapter: http://www.scheme.com/tspl4/examples.html#./examples:h0

I thought scheme was like the beatles - people universally only had good things to say about it.

I newly joined this company, and they have 20 years old codebase which is mix of C and Scheme code. The only way they debug the massive Scheme part is using print statements. And I only have bad things to say about that. :( If there's a better way all of them have been missing, I'd love to hear that. I've learned that they have adapted the MIT Scheme implementation to add Object Oriented features, and it "kind of" works like an object oriented language, except when it doesn't - which happens a lot. It's a mess.

Re: Chez Scheme is now free

#97
post #83

Earlier quoted context omitted.

See GuixSD: https://www.gnu.org/software/guix/ Edit: remove useless commentary

I also use GNU Guix and Shepherd on top of Ubuntu at work. Shepherd manages all of my user daemons (mostly Ruby web application servers) and Guix as an RVM (and other such tool) replacement. Is that practical enough?

There's a big difference between "practical" and being the foundation of software (and I guess people ARE still trying to make that happen; it's not a strawman).

Emacs Lisp is probably a better example of practical.

Re: Chez Scheme is now free

#98
post #50
post #41

Earlier quoted context omitted.

I thought scheme was like the beatles - people universally only had good things to say about it.

I might not be getting a reference here, but FWIW, I had a recent experience with Scheme that was interesting. I did SICP nearly 19 years ago as a freshman, in 1997. And then a few months ago, I ported the metacircular-evaluator -- the "crown" of the course -- to femtolisp (the Lisp implementation underlying Julia). My thoughts were: 1) It sure is awkward to represent struct fields 1 2 3 as (cdr struct), (cadr struct…

> 1) It sure is awkward to represent struct fields 1 2 3 as (cdr struct), (cadr struct), (caddr), ...

The Right Way to do this is with a D-List, or Detached List, analogous to an A-List or a P-List. An A-List, if you recall, is a list of key-value conses. A P-List is a list of alternating key-value pairs. A D-list is a cons of a list of keys and a list of values, i.e.:

((key1 key2 ...) val1 val2 ...)

D-lists are superior to A-Lists and P-Lists because:

1. The key list structure can be re-used

2. D-ASSOC only requires one traversal down the key list, after which the index of the key can be cached. This is usually the first step in writing a "fast" interpreter, but if you use A-Lists or P-Lists then you have to change data structures. If you use a D-List you already have the optimized structure in the CDR of the D-List pair.

3. Going from optimized interpreter to full compiler is a simple matter of replacing the linked list of values with a vector of values.

It's a shame that D-Lists are very rarely taught.

Post reply on HN