Programming thread

  • Want to keep track of this thread?
    Accounts can bookmark posts, watch threads for updates, and jump back to where you stopped reading.
    Create account
Call me a faggot if this is too unrelated to talk about, but do you guys have any experience with standing desks and the like? I recently got monitor arms and an under-desk treadmill because my chair was a decade old and I've been having back/neck issues that consign me to the Retard Zone for a week at a time, and so far it seems to be going solid enough. I've been walking 8-10 miles a day on it and I seem a little more consistently awake at the wheel.

Also, to sort of elaborate on what I was talking about in the last post, I'm realizing that a lot of the anxiety/motivational issues I have are based on preconceptions I had when I was younger and shittier at coding. Just about every time I've had to refactor recently, I've been surprised how much my bacon has been saved by just doing a better job about encapsulation/single sources of truth and that sort of thing. I always feel like "okay, I just need to make this change and I'll be about a fifth done" based on some feeling about how much work I think an issue should take, but it turns out all of a sudden that there's nothing left to do. It's weird, it's one of those senses where your intuition is fucked up and you need to retrain it.
 
do you guys have any experience with standing desks and the like?
What would you like to know? Usually this sort of question comes with a problem that prompts the question.

For my part, I've been standing for a good few years because I just can't for the life of me find a comfortable chair (that doesn't cost a zillion dollars), so standing all day is just easier/simpler for me. I tried the under-desk treadmill for a bit, but it made more noise than I wanted, and the constant motion made typing/mousing a little bit more difficult than I would like.
 
What would you like to know? Usually this sort of question comes with a problem that prompts the question.
Ah, I was just trying to spark a little discussion, I'm actually in a pretty good spot with it. I like it well enough, I'm not really using my legs otherwise so it's pretty nice.
 
Spent some time attempting to implement some old Ruby static HTML site generation code of mine in Scheme today. The sheer density of this language is insane. In a few hours, full HTML5+CSS site rendering code implemented, deriving from s-expressions. Yeah, LLMs wrote half of the code, but I'm learning this language, and not even "slowly".

I have never encountered a language where "there is more than one way to do things" feeds in on itself to create this insane field of possibility. And the entire generator builds to like 50K of binary. Yeah, if I was writing straight C, this would be more compact... for a binary. But good heavens.
 
I'm learning this language, and not even "slowly".
it's easy to learn a language when it's not bogged down with useless bullshit and gay flavor-of-the-month syntax to make up for a lack of good macros
the introductory sections of several RnRS standards said:
Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today.
I have never encountered a language where "there is more than one way to do things" feeds in on itself to create this insane field of possibility.
scheme isn't really TMTOWTDI it's more "figure out a way to do it then add that to the language and do it"
And the entire generator builds to like 50K of binary. Yeah, if I was writing straight C, this would be more compact... for a binary. But good heavens.
scheme is known for having a handful of somewhat decent compilers, owing to the fact that it's really really good for writing compilers
and that's good for you because you're really just writing a compiler from sexprs to html
which implementation are you using if i may ask
 
which implementation are you using if i may ask
Chicken, and that's been the pain-point here, because the bloody Chicken wiki's been up and down all day. Fortunately, LLMs aren't entirely useless, though they really don't keep up with the pace of Chicken development.

"figure out a way to do it then add that to the language and do it"
Yeah, no kidding.

http://wiki.call-cc.org/eggref/5/sxml-serializer this allegedly does what I want, but the damn thing has no idea wtf <!DOCTYPE html> is about. I mean, I could just wrap it and it works, but screw that I'll write my own HTML generator just because they don't understand my use case apparently.
 
i should install that implementation, it seems like it could be a nicer scheme->c compiler to default to than gambit, especially since gambit has almost 0 documentation
only problem is how i should go about avoiding eggs, because fuck language specific package managers
the bloody Chicken wiki's been up and down all day. Fortunately, LLMs aren't entirely useless, though they really don't keep up with the pace of Chicken development.
have you tried looking on web.archive.org for recent snapshots of the wiki? it can come in quite handy for temporarily-fucked websites
http://wiki.call-cc.org/eggref/5/sxml-serializer this allegedly does what I want, but the damn thing has no idea wtf <!DOCTYPE html> is about. I mean, I could just wrap it and it works, but screw that I'll write my own HTML generator just because they don't understand my use case apparently.
it is sxml of course and not shtml (if anybody here wants a good project, make an html parsing and serialization toolkit for scheme. it would be a very nice library to have)
 
i should install that implementation
wtf i already had it installed and forgot
honestly i should probably just stick with guile because guile is a really good implementation except for that whole "unable to compile on windows without severe patching" thing
it fits into the same niche as python but it happens to be about 10x faster and it has native threads
 
i should install that implementation, it seems like it could be a nicer scheme->c compiler to default to than gambit, especially since gambit has almost 0 documentation
only problem is how i should go about avoiding eggs, because fuck language specific package managers
Am I the only one here that uses Racket? Its stdlib is very comprehensive, its documentation is top notch (and locally available with standard installs), it's widely packaged, and it has nice tooling. Plus, it uses the more efficient Chez backend now.
I know there are certain elements of it that make it distinct from Scheme, but you can treat it like it's Scheme and you won't run into problems. Tbh, I'm still used to calling it PLT Scheme.
 
I chose Chicken because it has good documentation, tracks the Scheme specifications aggressively, and works in a familiar way, speaking as a Cnile and Rubyist. I am surely open to commentary on superior alternatives, but the "compiles to C" notion is giving me a LOT of fun feels. Installing eggs is a non issue to me, but that's partly because there aren't many "big" packages with dependencies to make it a pain in the posterior. Racket is probably good but I want to learn Scheme, not someone's interpretation of a superior Scheme. Still though, love to hear what more experienced users think about the ecosystem. I am still at the stage where I am slower solo than "vibe coding" so I'm doing a lot of black box generation with LLMs and then testing those boxes and learning from them. Test driven methodology sure has its merits when driven by inept developers, I can vouch!

schemers: divided by a common language
it just wouldn't be what it is without the dozens of independent implementations though
One of the funny quips I came up with chatting about Scheme with Qwen is: "Don't like Scheme? Just use Scheme to roll your own Scheme that you do like!" And the ecosystem really reflects this.
 
I chose Chicken because it has good documentation, tracks the Scheme specifications aggressively, and works in a familiar way, speaking as a Cnile and Rubyist. I am surely open to commentary on superior alternatives, but the "compiles to C" notion is giving me a LOT of fun feels.
guile is nice if you want to move more to the ruby end of the spectrum than the c end
it's well-documented in texinfo which makes it quite pleasant to read from the comfort of emacs, and also tracks the scheme specifications pretty well (has r6rs and r7rs by default which is better than what chicken comes with), and generally is a nice feature-complete scheme
its main advantages over chicken are its native multithreading support and the fact that you can add new languages to it by hooking into its "compiler tower"

guile technically has a language-specific package manager: gnu guix
of course it's infinitely more based than cargo/pip/npm retardation because it is actually a real system distribution and not somebody's gay curl wrapper
I am still at the stage where I am slower solo than "vibe coding" so I'm doing a lot of black box generation with LLMs and then testing those boxes and learning from them. Test driven methodology sure has its merits when driven by inept developers, I can vouch!
have you tried to read the Lore™? the little schemer will teach you to think more scheme-like (with recursion, that is) and sicp will teach you a bunch of funny fake names you can use like "ben bitdiddle"
 
Hey all, recently I started out my “journey” in programming and I’m in the middle of learning HTML to familiarize myself. I was told to start there but once I’m done what should I move onto afterwards?
 
Hey all, recently I started out my “journey” in programming and I’m in the middle of learning HTML to familiarize myself. I was told to start there but once I’m done what should I move onto afterwards?
html isnt really a programming language, moreso a layout language for the web
you're laying out the structure of a website

i recommend downloading a python interpreter (https://www.python.org/) and vscode (https://code.visualstudio.com/) and reading some tutorial on that.
it's a bit more cruft than opening a html file with a javascript file attached to it (you dont have to understand what it means) but the language doesn't suck as much balls as javascript, which is the language that web browsers use.

then start a classic project of "try to guess the number" game, and when you don't know how to do something google it.

the universal skill in programming is knowing how to solve problems and being able to cut them into smaller and smaller problems, until the process to solve those problems are simple enough to be explained to a computer.

to help you start lets take a look at "try to guess the number" game problem.
we take the big problem (the game) and split it into a few smaller problems:
  1. get "the number"
  2. get the guess
  3. check if "the number" is equal to the guess
  4. do something if its correct do something else if its incorrect

then you take the first problem and google it, "how to generate random number in python" and (important) first read the code and try your hardest to understand it then, instead of copying it, type it out yourself, it makes you remember better
then you take the next problem, split it into smaller problems if need be, and google it

when you finish, read the whole program again, make sure you understand, and can explain at least mostly, every single line of code, and then play around a bit, try adding rounds, try giving bigger numbers, just remember to have fun.
 
Hey all, recently I started out my “journey” in programming and I’m in the middle of learning HTML to familiarize myself. I was told to start there but once I’m done what should I move onto afterwards?
If your goal is programming, stop with the HTML, it is not a programming language, you may as well be learning how to program word (if we ignore the fact that you can program that with vb...).
There is a Programming beginner thread, check it out, it does not have much information yet, but if you have any interesting questions that produce interesting answers, it will be better to have them there for other peopl than having to wade through this thread.
I would recommend trying some basic programs in C, not sure about books, search that thread if you see something.
The best thing to do is look for a problem you want to solve, then solve it. After not too much time, you will be able to solve real problems you have.
A lot of people here (most likely Gordon Freeman) will recommend LISP as well, I cannot comment on it as I am just a beginner in it, but I do like it and it will most definitely expand your thoughts about problem solving - it has done so for me.
I know I recommended two languages here, but I reiterate that you should focus more on the problems, try out different languages you find interesting, solve the problems you have, find out how. Don't be scared, computers don't bite. If you are scared of making a mistake and messing a program up - we all do, worst case do a rewrite, you have still gained valuable experience! For smaller mess-ups, use git and revert. You will learn far more by writing incorrect programs and debugging them, than doing nothing.

Edit:
instead of copying it, type it out yourself, it makes you remember better
Very good point, I completely forgot this. Even if you think you understand the code while copying it, you're not really internalizing it. An anectode from my personal experience:
Some years back I worked with a transactional database library. Whenever you wanted to do something with the database, you needed to get the database, open a transaction, do some preparation inside of the transaction and then commit it at the end. A few boilerplate commands for the beginning and end of any function that needed to do this. I worked with that for over a year and I always copied those few lines from somewhere else in the project because I couldn't remember them. After some time I became annoyed by this, because I didn't work with the database everywhere, so finding those commands would sometimes take a while, or even opening a different project, so I started typing them instead of copying. Within the same day I remembered them for the rest of my time working with that library.
 
Last edited:
Hey all, recently I started out my “journey” in programming and I’m in the middle of learning HTML to familiarize myself. I was told to start there but once I’m done what should I move onto afterwards?
On the other hand, the more helpful answer will depend on what exactly are you looking for: employment, site making, game coding, simplicity etc.
 
If your goal is programming, stop with the HTML, it is not a programming language, you may as well be learning how to program word (if we ignore the fact that you can program that with vb...).
There is a Programming beginner thread, check it out, it does not have much information yet, but if you have any interesting questions that produce interesting answers, it will be better to have them there for other peopl than having to wade through this thread.
I would recommend trying some basic programs in C, not sure about books, search that thread if you see something.
The best thing to do is look for a problem you want to solve, then solve it. After not too much time, you will be able to solve real problems you have.
A lot of people here (most likely Gordon Freeman) will recommend LISP as well, I cannot comment on it as I am just a beginner in it, but I do like it and it will most definitely expand your thoughts about problem solving - it has done so for me.
I know I recommended two languages here, but I reiterate that you should focus more on the problems, try out different languages you find interesting, solve the problems you have, find out how. Don't be scared, computers don't bite. If you are scared of making a mistake and messing a program up - we all do, worst case do a rewrite, you have still gained valuable experience! For smaller mess-ups, use git and revert. You will learn far more by writing incorrect programs and debugging them, than doing nothing.
i think a good idea is to start with python to just learn the process of problem solving and then switch to c to learn what the fuck the computer is actually doing
 
Back
Top Bottom