handmade.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
handmade.social is for all handmade artisans to create accounts for their Etsy and other handmade business shops.

Server stats:

36
active users

#scheme

0 posts0 participants0 posts today
Replied in thread

@xameer the “R7RS small” Scheme standard has a full numerical tower built-in, including unbounded integers.

(- (+ (expt 10 100) 1) (expt 10 100))

gives you precisely the correct answer without any floating-point operations. Although macros for symbolic computation with optimization that would avoid computation of (expr 10 100) is “an exercise left to the reader.” Haskell might do the optimal computation though thanks to it’s lazy evaluation.

Replied in thread

@nsrahmad @ksaj @praetor why use `t`?

Because my training is in logic, and `t` is an expression which is always true;
Because I've been using it for the past 42 years and see no reason to change;
Because it works in more or less any dialect of #Lisp, not just "Common" Lisp (but note that #Scheme uses `else` rather than `otherwise`, and Portable Standard Lisp, just to keep you on your toes, uses `NIL`, while #Clojure uses nothing at all)!

In short, because.

Replied in thread

@amoroso Sure, it's usually possible to brush all the funcall and such nonsense into a corner. But you first had to remember it was there and brush it up, which in Scheme you don't. "I take a thing and apply it to these things", not "Now first I make my thing a different thing…"

Chez really is like the platonic ideal of "what if Lisp was cleaned up and fun". Racket's got more toys, but I hate the Dr Racket GUI and then I'm tempted to screw around with libraries instead of code.
#lisp #scheme

Replied in thread

@amoroso The use of square brackets (which otherwise indicate vectors) in argument lists in function definitions is one of the #Clojure design decisions I consider perverse; the removal of bracketing around `cond` clauses is another. I really (still, after thirteen years) really dislike these decisions.

The fact remains it's a very good language, and (with respectful glances at #Scheme), probably the best and most usable #Lisp dialect we now have.

Nothing is perfect.

Replied in thread

“Question for lispers with experience: If you should start to learn a LISP style language today, which one do you pick up? Why?”

@syntaxerror The R7RS “Small” Scheme standard is roughly 80 pages, so you can learn about all of the language features very quickly. I love it because of it’s minimalism, it is my preferred language.

My take on it is that the “Small” Scheme standard is perfectly designed to construct larger programming languages with more features. One such language is R7RS “Large” Scheme, but you could theoretically use it to implement Common Lisp, Python, JavaScript, or any other language.

The R7RS “Large” standard is still being discussed (10 years after “small” was ratified), but it relies heavily on the “Scheme Request For Implementation“ (SRFI) process to fill out features. The larger portion of the R7RS “Large” standard is already ratified and published, so it is still useful even though it is not complete.

There are many Scheme implementations, but I recommend Guile, as it is almost completely R7RS-Small compliant, and has a ton of other useful features that come with it out of the box. So if you need, for example, a quick web server, or a way to search your filesystem, Guile has modules for that.

Another good batteries-included Lisp is Racket, which is a larger language built on top of Chez Scheme (an R6RS Standard Scheme implementation). You can easily install the R7RS Scheme language pack on Racket and write your code in Scheme as you read through the R7RS standard document.

Both Guile and Racket/CS (Chez Scheme) not only have many useful features, but compile to binary code that runs extremely fast for a high-level language.

Also, if you haven’t already, try to learn to use Emacs.

#tech#software#Lisp