Top
Best
New

Posted by ingve 2 days ago

I keep bouncing off the Scheme language(www.sicpers.info)
105 points | 35 commentspage 2
matheusmoreira 4 hours ago|
I bounced off Scheme so many times I just created my own lisp instead. At some point I just accepted that I wouldn't ever be comfortable in any language other than the one I made myself. I too have the ALGOL neurotype...
pfdietz 3 hours ago||
You might try Common Lisp instead.
neilv 4 hours ago||
> Obviously an LLM generated the code, but I felt comfortable following along and understood what it was doing, reading and Trusting the Tests. [...] My difficulty is with thinking the way that lets me write Scheme.

There's your problem, right there. Vibe-coding is sabotaging learning before you even start.

You can learn some things by reading good code, but there's no substitute for the exercise of thinking through problems yourself. (Also, an LLM won't necessarily give you good code.)

First learn paint fence, Daniel-san. Not watch third-hand videos spliced together of other people painting the fence, and thinking you'll understand much of anything about it.

> I have the ALGOL neurotype.

Good news! Scheme started as a block-structured imperative "algorithmic" language in the spirit of ALGOL. Just with more parentheses.

Write as if in ALGOL, but using Scheme's comparable syntax and language features. And lots of parentheses.

Don't get confused by CS professors showing you pure-functional features, the metacircular evaluator, recursive programming, syntax extension and language-oriented programming, etc. You can come back to that.

Just start coding ALGOL-style in Scheme. You'll accomplish something in an hour.

Once you see it's easy, and are comfortable with that part, then the next thing you do, to get more idiomatic is one of the following, then do the other one:

* Try to get more functional, by eliminating some of the mutations of variables in your code. For example, if you're using `set!` a lot, can you eliminate them by, for example, making them arguments in a named-`let` recursion. (Or, instead of named-`let`, spell out the recursive functions, like some intro CS professors will want you to do, but that can obscure things that are obvious once you see the named-`let` lexical structure.)

* Try to get more language-oriented, by making a little domain-specific language, maybe with `syntax-rules`, `syntax-case`, or `syntax-parse`.

One more tip, for anyone coming from C, C++, Rust, etc., who may like trying to know the cost of everything: If you get hung up on high-level language features like GC, and not knowing which of a number of ways of doing something, is the right (performant) way, try not to. But if you want an intuition (that might be a lie), imagine that needless mutations or allocations may be more expensive than finding a different way to do it. And each FFI call has very expensive overhead. At one point that I had to make highly performant code, I made a little tool, to help confirm my intuitions: https://www.neilvandyke.org/racket/shootout/ There's also a statistical profiler in Racket now, and you can even (with work) rig it up in production systems, for measuring real-world workloads, which I used to guide optimizing performance of a large and complicated system.

varjag 5 hours ago||
I think it's the symptom of inadequate practice rather than some "language neurotype". Consider writing (yeah 2026 I know) a substantial project in Scheme from scratch.
Pay08 5 hours ago|
Two websites don't sound like insubstanial projects.
r14c 34 minutes ago||
With LLMs you can make 20 websites and still not really understand the language. For learning you really do have to type the code out yourself. That's how you build familiarity and understanding. Reading code is a good starting point, but it doesn't really gel until you start writing your own ideas down, fail, and try again until it works and makes sense. Especially if you're working in a new language with unfamiliar semantics.
SilentM68 1 hour ago||
I've had a similar problem. I originally started learning programming with BASIC, assembly, procedural, event-driven, languages, found OOP bloated and thus counter productive, time consuming, still do. Have tried to focus on functional languages, but for some reason none stick. Not sure if it is my brain, or haven't found the right language that will work with my head. I'm trying my luck at Odin to see if that can stick with me.
tmtvl 5 hours ago||
There's something very ironic about an article about bouncing off Scheme on a website called 'SICPers'. OT: I think I'm pretty decent at thinking in Scheme, although I don't quite have the hang of continuations. That said, because I like type declarations I use Common Lisp, which allows me to bounce between a more Scheme-like style and a more Assembly-like style however I see fit.
throw310822 2 hours ago||
I've had to go through my Scheme labs when I was studying CS. Even as a hobbyist with a decade of experience in various languages and a decent intuition for coding, I couldn't get my head around it. It's quite telling that a language that is hard to read, unfit for most purposes and that even proficient coders never seem to fully grasp, was chosen as a tool to introduce beginners to coding.
wellpast 4 hours ago||
> When I think about a programming problem, I think in terms of the sequence of instructions I need the computer to do, and the memory locations that can hold the information the computer needs to track.

You’re almost there. Just stop thinking about the sequence of instructions. Focus on the information half (the values) that you need to produce.

Pay08 5 hours ago||
I was the same way (and still am somewhat, I can't get hygenic macros into my head) but due to the differences between Scheme and Common Lisp. What helped me was writing imperative code that Scheme people would surely scoff at, and gradually using more and more Scheme features as I kept writing. Then I refactored the whole codebase to look like the final few hundred lines.
bitwize 4 hours ago|
Oh, kinda like how I learned Emacs: use it "wrong" for years, treating it as a sort of weird archaic Notepad++, then gradually discover features, master the keybindings, and learn to program Emacs Lisp over time until my proficiency, and the utility the editor provided to me, grew.

these days i'm seriously considering switching to zed tho

Pay08 1 hour ago||
That sounds like a horrible way of learning Emacs, but fair enough. I don't think you need to know elisp as a prerequisite but personally I learnt enough of it to be able to get by without Customize.

You might want to read Zed's EULA.

bitwize 40 minutes ago||
Well, I'm sorry for not employing a Hackernews-approved data-driven, spaced-repetition learning technique utilizing Pomodoro, Zettelkasten, and balanced gut bacteria to optimize the time to proficiency. I was frickin' 18 when I discovered Emacs (and Linux), it was 1995, and most of us were just figuring this crap out as we went.

I do not use Zed's online services, only the editor itself which is GPLv3. If I need AI I wire in a third-party ACP provider, which is easy enough to configure.

leecommamichael 5 hours ago|
Do what works for you.