TL;DR: Download Racket, run plt-r6rs my-file.scm. Bookmark this book and check it when you have questions.
Scheme is an old programming language,...
For further actions, you may consider blocking this person and/or reporting abuse
Dan Friedman was one of my professors!! π€― Seeing these books mentioned brings back lots of memories...
(mostly (of ('parentheses)))
I bet @daniel13rady would enjoy this post π
Probably so! Will read soon π
I used to think that scheme is locked down in academia, but it turns out I was wrong about that. You should check out GUILE, the official extension language for GNU, and turns out it's a scheme dialect . There's a whole ecosystem written in it like GUIX, shepherd(an alternative init system) and a bunch of other cool stuff. For books to read, I'd strongly recommond Structure and Interpretation of Computer Programs(SICP).
I've only come across GUILE in the context of GUIX, when I was deep-diving through NixOS. Do you use Guile or Guix?
I've been using GUILE for a while(wrt prototyping random things) now. I want to setup GUIX on a spare machine. I run FreeBSD so unfortunately alot of linux tooling doesn't really work out of the box. I want to create a monitoring tool in that ecosystem.
Update. I've been using GUIX now for the past 3 months and I've kinda even got my hands dirty hacking on some things in that ecosystem like: gitlab.inria.fr/guix-hpc/guix-past
That brings back memories. We used Scheme in university for the Functional Programming course back in 1994.
No highlighting of opening and closing parentheses in editors. That was fun.
Highlighting is for the weak.
I program like a man. I use "copy con program.exe". :)
(((()(()()()))))
!!!I had a lot of fun with Scheme / Racket at school, good times π
I can't remember how, but we plugged in a way to visualize the results of our programs and I even was able to animate the thing! My professor's mind was blown and I started realizing I liked "the front end" side of my projects more than anything π
Can't quite say the same about Prolog though.. that broke my brain.
I've created bookmarklet that runs Scheme REPL on any website, you can use it on book or this site. The Scheme implementation is LIPS: my Scheme interpreter written in JavaScript.
Note that
mod
is not in R7RS standard function, so it's not defined in LIPS (it may be in R6RS but no one is using it). In order to run your example you need(define mod modulo)
or changemod
in thegdc
function definition.I don't understand how anyone can recommend book like "The Little Schemer". I've got 3 books in the series without looking inside and they were worse programming books I've ever seen.
I can only see benefit if someone is learning scheme elsewhere and this is just exercises book. Since the structure of that book doesn't make any sense to me if you want to learn on your own. For me the those books were useless.
Well, conversely, I don't understand how anyone can not get a lot out of this series, I devoured every entry as a self-learner. No, they were not the only material I used to learn Scheme and recursion, but but I've never learned any concept from just one resource. It's an unorthodox format, I agree. But everyone has a different learning style. I'm sorry to hear it didn't work for you, but clearly it's worked for a lot of other people. i'm glad there's a massive range of learning materials for self-learners, so if one recommendation doesn't sit well, there's always more to try.
I would love to see experience from someone that has 0 knowledge and start with this book. And this is what people recommend as first book. I can understand if someone want to use this book when she already know Scheme. But the target for this book are complete newbies, which for them I would never recommend it.
For me personally best book about Scheme is Sketchy Scheme by Nils M Holm.
I recognize it as a "Lisp", right? What about Clojure, how does Scheme compare to Clojure? Clojure is/was sort of getting popular and creating a community ...
Yup! It's the oldest of the commonly used Lisp families, alongside Common Lisp and Clojure. I think the rough analogy goes like this:
Scheme : C
Common Lisp : C++
Clojure : Java
Of these, Scheme and Clojure are "functional" languages, or at least functional-first, and Common Lisp is truly multi-paradigm. It's very "kitchen sink", it has a massive amount of features, like C++.
Clojure is designed specifically with interop in mind. It can be used seamlessly as a hosted language targetting either JVM bytecode or JavaScript via the Closure Compiler. It also ships with a set of persistent data structures, and Clojure code is highly suited for concurrency and immutability. It's partially a response to the relatively stagnant development models of Scheme and Common Lisp, bringing the Lisp sensibility to a more pragmatic type of tool.
In a sentence, Clojure has a focus on actually building large, robust, reliable software, whereas Scheme is primarily an academic tool focused studying abstract concepts.
Emacs Lisp gets a shout-out as the fourth "category" still in wide use, but I don't believe it really has a life outside of Emacs itself.
The Little Schemer is one of my favorite books, period, not just technical. I'm also interested in The Little Typer but I'm not sure I'm smart enough.
I wrote a much, much more basic how to here: dev.to/jamesliudotcc/use-dr-racket.... It is more for someone with this problem: "I got suggested The Little Schemer and the code won't run."
Always good to see more Lisp and Scheme code. Hopefully you can use Racket for production code at your workplace!
Workplace at all first, racket second ;)
Aaa you got parethesiasis?
Best if you couple your knowledge with this book
web.mit.edu/alexmv/6.037/sicp.pdf
Is there a web framework/web server for Racket that folks would recommend? This post has gotten me nostalgic.
Just take a look at awesome-racket, github.com/Junker/routy looks pretty nice. But not sure why they don't map parameters to form like:
oh my, I already start thinking about how to build that macro
get
.