Live data from Hacker News

I keep bouncing off the Scheme language

sicpers.info

41–50 of 91 posts

Re: I keep bouncing off the Scheme language

#41
post #8
post #5

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.

Two websites don't sound like insubstanial projects.

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.

Re: I keep bouncing off the Scheme language

#42
post #4

Scheme was invented as a consequence of Sussman & Steele’s discovery that lexical closures in the lambda calculus had essentially an identical implementation to a fully elaborated version of Hewitt’s actor model. I do wonder what a language with the same “taste” and minimalism as Scheme but embracing the actor model would look like. Erlang? Even better if someone could figure out how to harmonize them in the same lan…

LFE: lisp flavoured Erlang?

https://lfe.io/

Re: I keep bouncing off the Scheme language

#43
post #14

I think that it helps a lot to have a daily practice of using a language for small things. In much that same way that many people do the daily wordle or crossword, I do the daily leetcode. I flip a coin and solve it first in either C++ or Python, then re-write my solution in the other one. Usually it takes me around 20 minutes to solve it in either language, and 5 minutes to re-solve it in either language. Recently I…

Where do you find a daily leetcode problem? Is there a website somewhere that publishes them?

It's a feature of the leetcode.com website. I actually can't find a URL that will directly link to the current day's problem, but you can open https://leetcode.com/problemset/ and select the current date in the calendar widget (at the top right on desktop, or by clicking the green calendar floating action button at the bottom right on mobile).

You can view the daily problem without logging in or creating an account.

Fair warning: today's daily problem is a "hard" difficulty and it is often worth skipping those or peeking at the solution. They can take a while to solve (often at least an hour) and/or rely on unusual tricks or data structures. I haven't solved this one yet so idk exactly what its deal is.

Re: I keep bouncing off the Scheme language

#44
I went back and forth with ChatGPT on this a while ago. I concluded that my main problem with Lisps (and C) is that types don’t have their core functions associated with them concretely. The only way to know strcat, puts, and strlen exist is…to know that they exist. This vexed me. We lightly mapped out the idea of having traits for types in lisp and then having those traits and their associations frozen at compile time. That way, you could see which traits a given type implements and feel your way around the language more confidently.

However, like “If you give a mouse a cookie”, I realized that once I had my traits that I also wanted compile-time attributes à la Rust/C# and there’s no clean way to add those to Lisp’s syntax without seriously cluttering it up (note: yes, function-level attributes would look fine but C# allows attributes on locals, iterators, and usings which just don’t mesh with Lisp’s syntax).

I gave up. Lisp is neat but it just doesn’t fit in the future of programming that Rust and C# have shown us.

Re: I keep bouncing off the Scheme language

#45

I went back and forth with ChatGPT on this a while ago. I concluded that my main problem with Lisps (and C) is that types don’t have their core functions associated with them concretely. The only way to know strcat, puts, and strlen exist is…to know that they exist. This vexed me. We lightly mapped out the idea of having traits for types in lisp and then having those traits and their associations frozen at compile ti…

You might be interested in the Gauche implementation of Scheme which overall has a Python-like extended standard library, notably including a lot of functions that are generic over sequences and collections which historically in Scheme (and even moreso in Lisp) had a menagerie of special-cased functions for working with them.

Re: I keep bouncing off the Scheme language

#46
post #14

I think that it helps a lot to have a daily practice of using a language for small things. In much that same way that many people do the daily wordle or crossword, I do the daily leetcode. I flip a coin and solve it first in either C++ or Python, then re-write my solution in the other one. Usually it takes me around 20 minutes to solve it in either language, and 5 minutes to re-solve it in either language. Recently I…

Nice to meet someone else that does the daily leetcode! It is really a nice feature - I wish every online judge website would add it.

Bonus - Racket is an accepted language on leetcode ;-)

Re: I keep bouncing off the Scheme language

#47
post #14

I think that it helps a lot to have a daily practice of using a language for small things. In much that same way that many people do the daily wordle or crossword, I do the daily leetcode. I flip a coin and solve it first in either C++ or Python, then re-write my solution in the other one. Usually it takes me around 20 minutes to solve it in either language, and 5 minutes to re-solve it in either language. Recently I…

Where do you find a daily leetcode problem? Is there a website somewhere that publishes them?

They are published on the leetcode website. Here's a screenshot showing where to click [1].

LeetCode does have an "unofficial" API to get the problem of the day. Should work for previous days as well. This code worked last I tried [2].

[1] https://github.com/ebanner/daily-coding-challenges#leetcode

[2] https://github.com/ebanner/get-daily-leetcode-problem/blob/m...

Re: I keep bouncing off the Scheme language

#48
post #4

Scheme was invented as a consequence of Sussman & Steele’s discovery that lexical closures in the lambda calculus had essentially an identical implementation to a fully elaborated version of Hewitt’s actor model. I do wonder what a language with the same “taste” and minimalism as Scheme but embracing the actor model would look like. Erlang? Even better if someone could figure out how to harmonize them in the same lan…

What do you find insufficiently minimalistic about Erlang? It’s not exactly a shaggy dog of a language.

Re: I keep bouncing off the Scheme language

#49
I've been trying to learn Scheme lately by way of schemesh[1], which strikes me as a very clever integration of Scheme into a shell. My favorite parts are that you mix Scheme and shell using () or {} directly, as well as shebang right into one or the other fully as the default when needed.

[1] https://github.com/cosmos72/schemesh

Re: I keep bouncing off the Scheme language

#50
post #34

Earlier quoted context omitted.

How did you arrive at C++ and Python? Yes I'm aware they have many structural and aesthetic differences, but why would you not choose a language with a different paradigm—functional, logical, even procedural, etc?

Good question. I chose them because they are the languages that I use professionally and would choose for technical interviews. I expect to be asked to solve problems in either language in any given interview. Technical interviews are different enough from day-to-day work that I still find it valuable to practice in them.

I hope you really do it more as enjoyment (like people do crosswords) with just a very secondary benefit of technical interviews, because otherwise I can't but find this rat race obsession super sad.
Post reply on HN