Programming thread

Let me recommend https://gitgud.io, which is used by some KF users for hosting +NIGGER licensed stuff.
> hm, maybe that's where all the basedware is
> check out just the first page of repos
> > EraUma - "revolves around the girl-like famous racehorses" and "training horse girls"
> > fc-pregmod
> > X-Change Life™ - a NSFW (18+) gender-swapping RPG
> > Bondage-College

Amazin'.

At least google seems to index them just fine; that's good.
They might be the only provider that's both indexed and allow +NIGGER.
 
no dong jones appeared at NDC Conferences
the cube-headed menace actually does this quite frequently, showing up to some shitty conference to give a shitty talk about shitty buzzword shit in a shitty kermit voice
why are you posting this and pointing out ndc conferences anyway? does it usually go against my negative assumptions regarding most tech conferences, and you saw a talk given by old Brick Bonce when you were searching for gems?
 
the cube-headed menace actually does this quite frequently, showing up to some shitty conference to give a shitty talk about shitty buzzword shit in a shitty kermit voice
why are you posting this and pointing out ndc conferences anyway? does it usually go against my negative assumptions regarding most tech conferences, and you saw a talk given by old Brick Bonce when you were searching for gems?
im subscribed to NDC Conferences, because I like listening to talks sometimes, and this showed up in my subscribed feed
i didnt mean to specifically point out that it is specifically ndc conferences

there are some fun talks i enjoyed watching like this one about plaintext, or this one made by the same guy, or this one somewhat unrelated to programming, or this one about changing pi in doom
and sometimes i watch cppcon talks as they sometimes do provide some educational value or just out of pure interest

in general I don't watch most talks as they're more targeted towards people in the industry, but sometimes gems might show up
 
> hm, maybe that's where all the basedware is
> check out just the first page of repos
> > EraUma - "revolves around the girl-like famous racehorses" and "training horse girls"
Hey now, what's the problem with umamusume?
1748951267954.webp
 
> hm, maybe that's where all the basedware is
> check out just the first page of repos
> > EraUma - "revolves around the girl-like famous racehorses" and "training horse girls"
> > fc-pregmod
> > X-Change Life™ - a NSFW (18+) gender-swapping RPG
> > Bondage-College

Amazin'.

At least google seems to index them just fine; that's good.
They might be the only provider that's both indexed and allow +NIGGER.
well thats what you get for taking advice from @analrapist
 
I swear I'm gonna kill myself or something
I'm following this guy's oled example, and
A) my doesn't work, I don't know why
B) according to my understanding his code shouldnt work either, but it does, for some reason

CHARGE PUMP for example is a command with an argument, but he doesn't send an argument (????) and the docs say the correct way to do it is to do CHARGE PUMP 0x14 DISPLAY ON, but he doesn't do that either (???????)

I spent like 5 hours writing this shit man
I use this as documentation

and the worst part is that I have a heartbeat program at the end, and before writing this ssd1306 "driver", but after embedding image data, the heartbeat program worked, but after writing the "driver" it stopped working
 
Does anyone have strong opinions or experience with C generated source engines? I've used Bison and Flex, as well as autoconf, but I've never really thought about them in that context before.
 
Does anyone have strong opinions or experience with C generated source engines? I've used Bison and Flex, as well as autoconf, but I've never really thought about them in that context before.
I'm not sure what you're after here. C generated source engines? That makes it sound that compilers that compile to C, like Mercury-language, would fit the bill. Can you elaborate on what you're asking here?
 
I'm not sure what you're after here. C generated source engines? That makes it sound that compilers that compile to C, like Mercury-language, would fit the bill. Can you elaborate on what you're asking here?
They're text template engines that allow you to generate C code programmatically, as I mentioned, Bison, Flex, and autoconf are all examples of it. Maple also has a built-in function for this. It's essentially templates in the most antiquated sense. They're not at the level of a transpiler, they're deliberately simple to avoid overcomplicating codebases, but they're designed to streamline boilerplate, like if you were creating linked lists of a given type.
 
Oh, okay. You're just asking "Any other Flex, Bison, YACC, BYACC, autoconf, etc. users"? So when you say autoconf, I can infer that m4 is considered part of the constellation?

https://github.com/pietvo/midi2text/blob/main/t2mf.fl -- this is the last flex file I looked at.

Making your codebase a pastiche of various syntaxes was always kind of a turn-off, but in cases like the one I linked, there are precise uses where it's easier to debug. But really, use what has the least maintenance burden for you when given the choice.

Case in point: Generally, in the cases where someone would use these, I'd be using Prolog and DCGs.
 
Making your codebase a pastiche of various syntaxes was always kind of a turn-off, but in cases like the one I linked, there are precise uses where it's easier to debug. But really, use what has the least maintenance burden for you when given the choice.
I guess my perspective is that I'd prefer a structured tool for code reuse over preprocessor abuse, I've become increasingly conservative with how much I employ macros as I've gotten older. I think so long as the tool is deterministic and isn't introducing a bunch of hidden behavior, it's not a huge issue. From what I've read, most of them utilize #line directives to allow for the debugging to approach something sane, which I think is a plus.
 
Last edited:
I've become increasingly conservative with how much I employ macro
I am a fellow C dev, and while I will use the preprocessor, I do consider it kind of a misfeature. My main C project is in the Suckless style, with config.h. But straight substitution #defines mostly. The correct route is something like zig's comptime, IMO. The most aggressive I get with preprocessor defines is something like #define ERROR(msg) printf("%s is a nigger | %s:%d",msg,_FILE_,_LINE_) (Actually, it's a bit uglier because VARARGS. But conceptually straightforward.)

But yeah, I'm boring like this. We seem to see eye-to-eye. You're using the tool in a way you find effective, which is one of the few techniques for truly effective coding, IMO.
 
c23 also has nice stuff like standardized binary literals too
For me, the peak is how I can redeclare structs so long as the layouts and field names are the same, you can remove a lot of boilerplate just by making macros to define them in place.
 
c23 also added constexpr variables (not functions though) and they work like typed defines
and now enums can also be sized, which i think can be useful
typeof() made it very easy to make type-generic dynamic arrays
#embed is very useful as well, too bad it's only in gcc 15

and booleans are official keywords now too i guess
 
I guess my perspective is that I'd prefer a structured tool for code reuse over preprocessor abuse, I've become increasingly conservative with how much I employ macros as I've gotten older. I think so long as the tool is deterministic and isn't introducing a bunch of hidden behavior, it's not a huge issue. From what I've read, most of them utilize #line directives to allow for the debugging to approach something sane, which I think is a plus.
I see you're enlightened. C pairs great with those Unix-y text-in text-out tools. It's almost like they're meant for each other, like C was designed simultaneously with Unix. Lisp fags seethe when your tell them this kind of code transformation is more powerful than Lisp macros.
Honorable mention: GNU gperf; generates perfect hash functions, useful for speeding up your web server or other high-performance programs.

It's sad to see those tools are used less often nowadays. I blame IDE's for this, they don't incentivize creating some layer on your C code as the autocomplete and linter will shit itself.
c23 also has nice stuff like standardized binary literals too
Some years ago the D language deprecated binary literals because "nobody uses it". In most cases just using the hexadecimal representation is just as understandable while being way more compact. All C programmers should know what 0x80 means, hell I've seen code that does int&255. Even for less common bit patterns like 0x55 and 0xAA (alternating bits) just adding a comment explaining the binary representation suffices.
 
Some years ago the D language deprecated binary literals because "nobody uses it". In most cases just using the hexadecimal representation is just as understandable while being way more compact. All C programmers should know what 0x80 means, hell I've seen code that does int&255. Even for less common bit patterns like 0x55 and 0xAA (alternating bits) just adding a comment explaining the binary representation suffices
It’s to augment the new bit manipulation header and the _BitInt descriptor
 
naming discussion
I usually call them "source code generators" because people usually get the idea.
Metaprogramming would technically be correct, but Lord forbid from anyone associating to C++ template metaprogramming.
Domain Specific Language is the most accurate expression, but people usually don't understand what the fuck that supposed to mean.

Does anyone have strong opinions or experience
I love Flex and Bison. Surprisingly handy tools, especially Flex.
I like what autoconf is trying to do, but I hate the tool itself. I gave up on trying to learn it, as far as I can tell its 40 years of rot; tools generating code for tools that generate code for other tools based on 3 other tools generating code, so that we may finally generate the code that generates the code. Do correct me if I'm wrong here.

Making your codebase a pastiche of various syntaxes was always kind of a turn-off
That seems to be the general consensus, but in a more radical way. That's how we ended up with backend js, node cli apps and electron start-menus.
Obviously, making a hello-world with 15 langs is just as bad, but for example, whats easier: just using sql VS knowing sql + forming queries using yet another ORM?

Speaking of which, embedded SQL would be a lesser known example. This is how IBM originally envisioned it.

Some years ago the D language deprecated binary literals because "nobody uses it".
When will D deprecate itself then?
 
Back