social.coop is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Fediverse instance for people interested in cooperative and collective projects. If you are interested in joining our community, please apply at https://join.social.coop/registration-form.html.

Administered by:

Server stats:

489
active users

#kawa

1 post1 participant0 posts today
Continued thread

Compiling!

% cat hello.scm
;; hello.scm
;; -*- coding: utf-8 -*-

(module-name <hello>)
(module-compile-options main: #t)

(let* ( (args (command-line))
(name (cond
((<= (length args) 1) "World" )
(else (cadr args) )
))
)
(format #t "Hello, ~A!~%" name)
)

% kawa -C hello.scm
(compiling hello.scm to hello)
# the classpath is ugly:
% java -cp /usr/local/share/kawa/lib/kawa.jar:. hello
Mark
Hello, Mark!

Poproszę polecajki dobrej kawy, bo otworzyłem ostatnią torebkę.

Poprzednim razem były Bazzara Aromamore i Bazzara Dodicigrancru.

Ma nie kosztować dwóch milionów monet za torebkę 250g, ale niech to będzie coś, czego nie znajdę w moim lokalnym generycznym markecie.

(mam ekspres ciśnieniowy, młynek nożowy i rozważam też coś jeszcze, może aeropress)

cc @patryk

Replied in thread

@syntaxerror in my opinion, Scheme as a perennial quality that other languages lack. It's simply a work of beauty. ("Tail recursion is its own reward".)

But it lacks certain essential features (and every implementation provides their own, in a non-compatible manner)

Common Lisp's design is more of a political compromise of the past. It's perhaps more popular, but I'd say that the popularity of both is close to negligible.

I learned both, but Scheme stuck with me. (I started with Common LIsp though).

Personally I would recommend #Kawa, because it extends Scheme with practicality. But I won't do that, because its main author - Per Bothner - posted a few years ago that he's looking for someone to maintain the thing, and no one volunteered.

And unfortunately the implementation isn't free of bugs.

Racket on the other hand is a great teaching language, and a well maintained implementation with some exceptional qualities (and the HTDP book).

I guess the answer will depend on why exactly someone wants to learn a Lisp.

If someone just wants to expand their mental horizons, then I would recommend both Structure and Interpretation of Computer Programs (Scheme) and Paradigms of Artificial Inteliigence Programming (Common LIsp).

Both are great books, and I don't think that the choice of their particular programming languages makes them hard to read.

On the other hand, if the students have some particular projects in mind, I think this should dictate the choice.

Also, there is a fantastic online environment for learning Clojure called maria.cloud

While working on #GRASP, I occasionally try analyzing #Interlisp's #SEdit (because I'm curious about its internal representation), but I always end up not being able to understand literally anything from that code base.

And that makes me wonder: are the sources of GRASP so much easier to understand to me because I'm their author, or do the programming practices that I use (such as type definitions and plenty of examples) actually make things easier to read?

(A while ago, I did have a look at implementations of some things in #Emacs. The "undo" mechanism is understandable, but it owes this understandability to comments which make up for a missing type system. On the other hand, I've found Emacs' implementation of window splits much more difficult thant in GRASP -- in large part because GRASP is written in #Kawa #Scheme, and has a Java-like OO system, and I feel that classes and objects do a really good job at grouping related things together.)