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 keep bouncing off the Scheme language
51–60 of 91 posts
Re: I keep bouncing off the Scheme language
#52The 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
#53Earlier 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.
Re: I keep bouncing off the Scheme language
#54Earlier 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.
Re: I keep bouncing off the Scheme language
#55I 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…
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
#56I'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 .
> 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
#57I 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…
Re: I keep bouncing off the Scheme language
#58I'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…
Re: I keep bouncing off the Scheme language
#59I 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.
Re: I keep bouncing off the Scheme language
#60Earlier 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
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.