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
Imagine not having a personal standard library you include in all your projects for exactly this kind of situation.
be extremely careful if you make a personal standard library when modding games because it will clash with others personal standard libraries as both fight over the same hooks.
 
be extremely careful if you make a personal standard library when modding games because it will clash with others personal standard libraries as both fight over the same hooks.
1767472931228.png
 
Seeing how incompetent and enshittified modern software is as a casual "lurker" when it comes to programming I just can't help but contrast the difference between old school programmers and modern programmers. Even if you were to remove poo nigger Indians from the equation the way programs are optimized and programmed is embarrassing. Watching someone like Terry Davis shit on big wig theoretical computer scientists and calling Linus a nigger makes so much more sense when you see some faggot "coding influencer" on youtube unironically vibe coding something for hours that Terry could do in 5 minutes and do better.

Screenshot_20260104-152518.png

This meme inspired this post. Sorry for the phone post shit, Youtube doesn't allow saving images on mobile because it was programmed by jeets.
 
Seeing how incompetent and enshittified modern software is as a casual "lurker" when it comes to programming I just can't help but contrast the difference between old school programmers and modern programmers. Even if you were to remove poo nigger Indians from the equation the way programs are optimized and programmed is embarrassing. Watching someone like Terry Davis shit on big wig theoretical computer scientists and calling Linus a nigger makes so much more sense when you see some faggot "coding influencer" on youtube unironically vibe coding something for hours that Terry could do in 5 minutes and do better.

View attachment 8374985

This meme inspired this post. Sorry for the phone post shit, Youtube doesn't allow saving images on mobile because it was programmed by jeets.
If hardware is not utilized, it's wasted, child. Enjoy uncompressed 4k textures, stalker-child.
 
If hardware is not utilized, it's wasted, child. Enjoy uncompressed 4k textures, stalker-child.
This is just another lie you tell, stalker. No, child, it is you who is wasted. You waste all your time harassing my divine code, infant baby child.
This is a cyberstalker impersonation account. Block and report.
 
Seeing how incompetent and enshittified modern software is as a casual "lurker" when it comes to programming I just can't help but contrast the difference between old school programmers and modern programmers. Even if you were to remove poo nigger Indians from the equation the way programs are optimized and programmed is embarrassing. Watching someone like Terry Davis shit on big wig theoretical computer scientists and calling Linus a nigger makes so much more sense when you see some faggot "coding influencer" on youtube unironically vibe coding something for hours that Terry could do in 5 minutes and do better.
This is not only true, but this is much truer than you grasp or probably even suspect yet. Computing technology has gotten so complicated now that we need special software (compilers) to make our code run as fast as possible on our CPUs because CPUs have all kinds of weird niche-use instructions and ordering them matters loads. The NES CPU, a variant of the 6502, was so simple that it did not even have an operation for multiplication. While there are some C compilers for it, to actually make things run well, you will need to spend time on hand-optimizing the code. It's well documented that limits aid creativity, and I think that simple versus complex software really reflects that.
 
The NES CPU, a variant of the 6502, was so simple that it did not even have an operation for multiplication. While there are some C compilers for it
Telling someone to write a program for the 6502 with C is a great way to illustrate how C actually is a high-level language. New processors have instructions and addressing modes that directly map onto C language features, but the 6502 does not. Accessing your struct members will compile to several cycles of arithmetic followed by indexed indirect address via the zero page. The stack of the 6502 has 256 bytes of space and cannot be relocated. So your parameters and call stack will have to go on a virtual stack that you manage with dozens of instructions per call (at best).
 
Fuck it, check this out.
View attachment 8317332

Using Decker feels more like sculpting than other kinds of programming, even Lisp, I suppose in part because I'm entirely unconcerned with building anything reusable. The only goal is that it works, and it doesn't need to scale to any kinds of arbitrary data or anything whatsoever.

The Clear button got added soon after I got the basics of drawing on the canvas and updating the other buttons working. It sets the text field of all widgets to the empty string, the canvas just ignores this, which made it very confusing for a moment when I tested it without noticing that the text on the Clear button itself would also be wiped. I returned to work on it more much later and couldn't tell why it was cleared, but when I added it back and later used it again, I realized what was happening.
:story:
pleasing pattern producer animated.gif

8)
 
Telling someone to write a program for the 6502 with C is a great way to illustrate how C actually is a high-level language.
oh oh, a topic i know a little bit about

i wanted to riff on llvm-mos, but looks like their github is somewhat active, i personally thought it was a dead project
theres also good old cc65, which supports C89 with some extensions like c++ comments, and it still is somewhat active
funnily enough, while looking at cc65's recent commits i found a channel with a fairly recent video explaining the differences between llvm-mos and cc65

but the main thing i wanted to say is that ironically, theres a language higher level than c designed specifically for 6502 called prog8, the project is being developed by one guy who commits multiple times at least a few days every week, ive tried it out and it works great, in the newest release he has added structs and longs to the language
the optimizer does its job very well and the standard library itself is also very well optimized (benchmarked with c)
its mainly designed for cbm computers (specifically 8bitguys commander x16) rather than nes, but there is a custom target for the nes and other computers/consoles
but thanks to this, it recognizes petscii characters like ♠
also a BIG upside that it provides is that there are ifs for every specific cpu flag (like if_eq to check if the zero flag is set)
you can unroll loops, you can use the zero page, you can set it so it overwrites unneeded entries in the zero page, you can use floats (unlike cc65)
there are namespaces and defers
in general i love the language
the only downside is that you need to have 64tass installed and that it uses kotlin so you need to have jdk installed as well

EDIT: while writing this post ive stumbled upon oscar64 and it is fucking insane (see the prog8 benchmark), not only does it support C99, it also supports a fair bit from C++ like templates and lambdas, all while being fast as fuck, and still being active
 
Last edited:
This is not only true, but this is much truer than you grasp or probably even suspect yet. Computing technology has gotten so complicated now that we need special software (compilers) to make our code run as fast as possible on our CPUs because CPUs have all kinds of weird niche-use instructions and ordering them matters loads. The NES CPU, a variant of the 6502, was so simple that it did not even have an operation for multiplication. While there are some C compilers for it, to actually make things run well, you will need to spend time on hand-optimizing the code. It's well documented that limits aid creativity, and I think that simple versus complex software really reflects that.

I have been researching the core level concepts of programming because I actually want to learn ACTUAL CONCEPTS AND WHAT THE FUCK IS GOING ON so I have read things about the different CPU architectures and how they have built in hardware specific programming for calculations and how they differ between different architectures.

Anyone who thinks "coding is easy bro" is always a fucking ignorant retard who is just making javascript / python slop and doesn't even know their is a difference between X86 and ARM or how floating point arithmetic is. These faggots often have millions of subscribers and are spewing their dumb shit when even a random retard hobbyist who is trying to learn the actual core mechanics of how a computer works knows these people are full of shit.

Also they probably program in Rust and wear programming socks or shit in the street.

Edit: Sorry I just wanted to add, you referenced "compilers" as special software to make our code run on the CPU as fast as possible. I thought compilers were just programs that turn programming language code like Assembly / C / every other language into binary code?
 
but the main thing i wanted to say is that ironically, theres a language higher level than c designed specifically for 6502 called prog8
This is exactly what I've been looking for after struggling with poor C toolchains for the 6502. Sadly it doesn't appear to be self-hosting, that's the final step. Why do you call it "higher level than c"? It doesn't seem more abstract.
 
I thought compilers were just programs that turn programming language code like Assembly / C / every other language into binary code?
Contemporary optimizing compilers that handle branch-prediction and cache-management for contemporary X86 CPUs do so much work behind the scenes that you're not going to write better assembly than they do save very specific and narrow optimization criteria. This is one of the reasons by a lot of contemporary Schemes like to "compile to C" because then you get all these optimizations for free if you structure the C correctly, which is pretty trivial when you come from a language on the order of Scheme.
 
This is exactly what I've been looking for after struggling with poor C toolchains for the 6502. Sadly it doesn't appear to be self-hosting, that's the final step. Why do you call it "higher level than c"? It doesn't seem more abstract.
because its almost 3 am and im fucking retarded
there are a lot of loop abstractions (ranges like 0 to 10, 10 downto 0, unrolled loops, etc)
you can return more than one value in a function (here called subroutines), while cc65 is limited to structs of size either 1,2,4,8 bytes
you can do if x in y like in python
c will add circular shift functions to the standard library in the next standard iirc? well this language has that builtin, along with extracting msb and lsb
also a fair bit of "abstractions" are abstractions in a sense that you wont get them when writing regular C, but makes sense for a language designed for cbm computers, like petscii characters or deciding how much of kernal/basic to keep in the zeropage
there is defer too

from a purely QOL perspective, there is no forward declaration and there is some sort of "module" support i guess, also namespaces

also it won't selfhost because it simply can't, it's a language specifically made to develop 6502 software on modern computers
 
Last edited:
Computing technology has gotten so complicated now that we need special software (compilers) to make our code run as fast as possible on our CPUs
There used to be hardware that directly reflected high-level semantics, such as the SCHEME-79 chip, meaning the compiler was a reversible and rather simple function. My personal belief is that the NSA wouldn't like it. Computing is still at the point where we don't know how to make fire from scratch, and it's in the interests of those guarding the fire from which all fires spring forth to exert influence and control in perpetuity.
 
there are a lot of loop abstractions (ranges like 0 to 10, 10 downto 0, unrolled loops, etc)
Okay, I assumed you meant low/high level in the usual meaning of the term, rather than syntactical sugar or other language features. Like, having first-class functions makes a language higher-level because it abstracts subroutines from an addressed series of instructions to closures which are a value, sometimes even mutable. But a language feature such as allowing multiple values to be returned doesn't make a language higher-level; it is something you can do in Assembly, after all, by just pushing more things onto the stack before you return.

This prog8 language, in particular, seems to be at the exact level of C, by design. Although C conversely became "low-level" by hardware manufacturers' design.
 
Okay, I assumed you meant low/high level in the usual meaning of the term, rather than syntactical sugar or other language features. Like, having first-class functions makes a language higher-level because it abstracts subroutines from an addressed series of instructions to closures which are a value, sometimes even mutable. But a language feature such as allowing multiple values to be returned doesn't make a language higher-level; it is something you can do in Assembly, after all, by just pushing more things onto the stack before you return.

This prog8 language, in particular, seems to be at the exact level of C, by design. Although C conversely became "low-level" by hardware manufacturers' design.
to be honest, i find low/high level to be mostly a bullshit term
i personally use it to mean how much i have to fuck around in a language before it can do the thing i want it to, which encompasses both synctactic sugar and first-class functions
x in y for example abstracts away the for loop i would have to write in order to find something

in my experience though from watching/reading a lot of programming slop, high level language usually means that it has an extensive standard library and doesnt have those scary pointers
 
i find low/high level to be mostly a bullshit term
Exceptionally so in $CURRENT_YEAR, but there's a general rule: The later the language, the higher the level. Even assembly language follows that rule on the whole. There are curios like Lisps that can be impossibly low and high level at the same time. But for the most part, "high level" means "convenient to develop in". Rust's promises represent an underutilized "high level" programming approach but you can write similar code in C++ and C using specific libraries, or eg. building with Fil-C. Low level used to mean cheap, practically, like C64 and TRS-80 and whatnot.
 
there are a lot of loop abstractions (ranges like 0 to 10, 10 downto 0, unrolled loops, etc)
Wouldn't it be so much nicer if there were more languages that had keyword messages (or functions/methods/whatever) like Smalltalk? I don't mean commitment to message-passing OOP, dynamic typing and extreme late binding, just the syntax. Look:
Code:
1 to: 20 by: 2 do: [:x | x printNl ]
See how readable that is when the message and the arguments are interspersed like they would be in natural language?
There used to be hardware that directly reflected high-level semantics, such as the SCHEME-79 chip, meaning the compiler was a reversible and rather simple function. My personal belief is that the NSA wouldn't like it.
No I've looked into this before. A conspiracy theory isn't necessary here. Register machines are just more efficient and affordable overall compared to stack machines such as SCHEME-79 (at the hardware level):
 
In Ruby:
(1..20).step(2).each{|x|puts x}
The flame of Smalltalk is primarily alive today through Objective-C and Ruby. No offense to Guido, I still like Python a lot, but if I could swap this reality for another one where Ruby on Rails ended up on Python instead and machine learning/AI all got done in Ruby, it would be a small but appreciable improvement.
 
Back
Top Bottom