Live data from Hacker News

I keep bouncing off the Scheme language

sicpers.info

61–70 of 91 posts

Re: I keep bouncing off the Scheme language

#61

Earlier quoted context omitted.

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.

Python is an object-oriented language in the broader meaning, but object-oriented programming is a particular style that java pushes you into, that python doesn't. It doesn't just mean "everything is an object", it's more like "everything is done in terms of objects that contain data and functions (methods)". Python has objects and could be done in that way, but a more basic imperative style with functional programming elements is more common, where objects are just one component instead of the driving force.

Re: I keep bouncing off the Scheme language

#62
post #13

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.

What do you mean by "Assembly-like style"?

Re: I keep bouncing off the Scheme language

#63
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.

My CS degree started first semester with Haskell, with a few weeks of Java tacked on the end. It was interesting to see some of the students who had prior programming experience have to work a bit to adapt their way of thinking to Haskell, while some of the students with no programming background at all were perfectly happy writing code in a language that made reasonable sense if you were good at maths, then had to work harder once we swapped to Java.

Re: I keep bouncing off the Scheme language

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

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?

Relatedly, I've noticed the strange infatuation that a lot of C++ programmers have with Python specifically. I have no idea why that is.

Re: I keep bouncing off the Scheme language

#65
post #22
post #19

scheme is great, but the dx of some implementations is not. i’m on guile scheme due to guix, and frankly, i’m hating it a quite bit. stack traces are esoteric and error messages entirely unhelpful, documentation masquerades as deep but is indeed inconsistent and prosaic, mixing styles of reference, explanation, and how-to willy-nilly, (compare with Dybvig’s The Scheme Programming Language, which is focused and consis…

I am only amateur level with scheme but these are common to other scheme implementations. SRFIs are semi-standardized core libraries that work mostly the same in all implementations. I believe the record-type and records generally are one of these SRFIs, and it’s based on a chapter in SICP (several show up as sections of the book where students implement things that would be language feature in a larger env) All the…

The issue with Guile's stack traces is that they get truncated beyond I think 80 characters, and frequently leave out stack frames (usually your own functions). Geiser does have a debugger, but it does things differently based on implementation and Guile's specifically is a fancy one that I couldn't get to grips with. Not that I've tried that much, as I believe it's quite new.

Re: I keep bouncing off the Scheme language

#66
post #19

scheme is great, but the dx of some implementations is not. i’m on guile scheme due to guix, and frankly, i’m hating it a quite bit. stack traces are esoteric and error messages entirely unhelpful, documentation masquerades as deep but is indeed inconsistent and prosaic, mixing styles of reference, explanation, and how-to willy-nilly, (compare with Dybvig’s The Scheme Programming Language, which is focused and consis…

Almost all of these problems are due to scheme being so absurdly fractured, it's a real shame. It's already niche, but then on top of it instead of having 2-3 robust implementations with robust cli / messages / docs / etc, you have 20 (not a hyperbole[1]), each one receiving diluted effort compared to what it could have been.

Probably the one bit that isn't strictly fracturing's fault is stacktraces -- scheme has TCO, which is nice for alot of things but it absolutely destroys dx as it relates to stacktraces. Other languages with TCO are similarly awful in that regard, including haskell (ghc has `HasCallStack` to try help it, but it's still awful to use).

[1] https://get.scheme.org/

Re: I keep bouncing off the Scheme language

#67
post #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…

As far as I know, Racket docs are entirely human-generated. The functions aren’t tied concretely together to types by anything. In C#, types and their member functions are automatically tied and inspectable in code. That’s what I feel is missing. Also, I don’t want to take away from the phenomenal Racket docs. They’re a real treat to work with.

Re: I keep bouncing off the Scheme language

#68
From my experience, you become a lisper truly when your Lisp image is running for days on end, you miss the live editing power and loathe the exception handling system in other languages. It takes a while and concentrated effort to get you there.

I strongly recommend anyone interested use a Lisp as their prototyping language in their workplace. Another idea is to rewrite a complex component of the software you're working on and rewrite it in Lisp. More importantly ask the questions on Lisp forums especially about using the live editing workflow.

Re: I keep bouncing off the Scheme language

#69

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…

Toss AI. Install srfi-203 and srfi-216 for SICP support. Then at ~/.csirc

    (import scheme)
    (import (srfi 203))
    (import (srfi 216))
Finally, SICP in Texinfo format:

https://zv.github.io/sicp-in-texinfo

Re: I keep bouncing off the Scheme language

#70
post #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?

Neither. These people don't realize that they are learning ever less skills than not touching Claude ever.
Post reply on HN