Live data from Hacker News

I keep bouncing off the Scheme language

sicpers.info

51–60 of 91 posts

Re: I keep bouncing off the Scheme language

#51
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…

It's advantageous in the real world as well with Guile Scheme being used for Guix.

Re: I keep bouncing off the Scheme language

#52
I'm kind of especially surprised that an OOP person bounces of Scheme. OOP and Scheme both like to atomize things into webs of a zillion little functions.

The biggest advice I would give to the author is "If you're doing general programming instead of compiler construction, get off the goddamn lists, ignore recursion and use vectors and loops like somebody civilized. Don't write a macro until you have a gun to your head." Everybody I know who "bounces off" of Scheme/Lisps does so because of the idiotic "List Pedagogy" when the expert programmers almost invariably use vectors everywhere.

However, in this day and age, the lack of strong typing is a lot more of an issue. I've been more directing people toward OCaml rather than Scheme/Lisp nowadays--especially since they added multicore. However, similar advice attends: "Ignore the functional crap and type inference. Use vectors and put type signatures on all the things, you savage. OCaml works just fine as an "imperative" language."

Re: I keep bouncing off the Scheme language

#53
post #36
post #21

Earlier quoted context omitted.

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

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.

The GP is right to be offended by what you said, because his way of learning Emacs was an extremely typical one for decades. Remember that such informative and inspirational resources like Mastering Emacs didn't exist until the 2010s. I myself got into Emacs around the turn of the millennium because I wanted a free IDE for my programming-language classes at uni, and also I wanted to use Gnus which was such a capable mail and Usenet reader. It was only over years, as I amassed various problems that I needed to solve and tasks to automate, that I began learning all the tricks of Emacs customization and then eventually Emacs Lisp itself.

Re: I keep bouncing off the Scheme language

#54
post #37

Earlier quoted context omitted.

> I could a bit biased because I do have prior experience with SML You're probably under-weighing this factor. The average programmer looks at SML syntax and cannot make, pardon the expression if you will, heads or tails of it. Indeed, I'd argue the average programmer still considers recursion an advanced topic.

Recursion. Very interesting. My daughter didn’t know much about programming, then started CS. The first semester language was Ocaml and they of course used recursion quite heavily and she’d didn’t know it was supposed to be complicated. The second semester had assembly, C and Java and suddenly it was a problem. I had to remind her that she’s had already done it in the first semester.

Sounds like a sick CS department. We had to do Java. The whole first year was just OOP day in and day out. If I’d never seen python I really would have thought all programming is OOP, and probably would’ve dropped it for good

Re: I keep bouncing off the Scheme language

#55

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…

> types don’t have their core functions associated with them concretely.

They do in Racket? You look at the "List" documentation and you find all of the functions for lists. Likewise with hash tables, numbers, strings, sequences, files, etc.

> The only way to know strcat, puts, and strlen exist is…

... to look at the documentation on docs.racket-lang.org. The powerful search includes results not only for the standard ("batteries included") library reference, but also the standard guide and 3rd party libraries.

> 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

I mean, why are you not able to do (trait whatever) before (define whatever) or (for-each whatever) or (let whatever)?

> Lisp is neat but it just doesn’t fit in the future of programming that Rust and C#

Have you tried it or did you just try to figure out why you don't think you like it from an LLM?

Re: I keep bouncing off the Scheme language

#56

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 .

Assuming your comment applies to Common Lisp as well, if Scheme (and Lisp) truly was, "hard to read, unfit for most purposes and that even proficient coders never seem to fully grasp," it wouldn't be the language that introduced so many features later implemented in other languages.

> Lisp pioneered many ideas in computer science, including tree data structures, automatic storage management, dynamic typing, conditionals, higher-order functions, recursion, the self-hosting compiler, and the read–eval–print loop.

So many proficient coders were able to grasp features of Lisp, find the fitness of those features, and implement them in their own languages.

Re: I keep bouncing off the Scheme language

#57
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…

Do you find yourself programming a solution in the second language in the style of the first? Or are they both similar enough to you that it is effectively the same style of solution?

Re: I keep bouncing off the Scheme language

#58

I've been forcing myself to stay within the CHICKEN ecosystem for the past 6 months. So far, the whole ecosystem moves really slow, but CHICKEN is such a good design that adding/rolling your own library for whatever you need is so simple. I ended up creating a bunch of eggs (CHICKEN libs) and even rolling my own web framework with its own ORM and background job processing that I rolled out to prod (1000+ users for th…

But are you learning programming in Chicken or in Claude?

Re: I keep bouncing off the Scheme language

#59
post #37
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…

> I could a bit biased because I do have prior experience with SML You're probably under-weighing this factor. The average programmer looks at SML syntax and cannot make, pardon the expression if you will, heads or tails of it. Indeed, I'd argue the average programmer still considers recursion an advanced topic.

After spending years on end doing functional programming I used to stumble when looking at for loops until I got used to thinking that way again. It's funny how different the skills are.

Re: I keep bouncing off the Scheme language

#60

Earlier quoted context omitted.

Recursion. Very interesting. My daughter didn’t know much about programming, then started CS. The first semester language was Ocaml and they of course used recursion quite heavily and she’d didn’t know it was supposed to be complicated. The second semester had assembly, C and Java and suddenly it was a problem. I had to remind her that she’s had already done it in the first semester.

Sounds like a sick CS department. We had to do Java. The whole first year was just OOP day in and day out. If I’d never seen python I really would have thought all programming is OOP, and probably would’ve dropped it for good

> If I’d never seen python I really would have thought all programming is OOP

But isn't Python object-oriented? I mean, it's arguably more object-oriented than Java, since unlike Java, everything in Python is an object and it supports multiple inheritance. It's totally fair to not like Java, but if you like Python, then I doubt that OOP itself is what made you dislike Java.

Post reply on HN