TECHNOBOG

466 posts

TECHNOBOG banner
TECHNOBOG

TECHNOBOG

@techno_bog

Alien object. Wishlist or discord: https://t.co/ubVin1VSxM

THE BOG Katılım Haziran 2021
111 Takip Edilen1K Takipçiler
Sabitlenmiş Tweet
TECHNOBOG
TECHNOBOG@techno_bog·
It's difficult to make 15 seconds of a turn-based game look impressive. Did I do it? #gamedev #indiegame
English
1
3
21
644
TECHNOBOG
TECHNOBOG@techno_bog·
@rikarends @falco_girgis This only works if all your code is based on ownership semantics, doesn't it? If you put everything into arenas which you index into, you're just as screwed refactoring it and must rely on tests and sound judgement. Or am I misunderstanding?
English
1
0
1
58
Rik Arends
Rik Arends@rikarends·
@falco_girgis yea thats a huuuge part of why i ‘tolerate’ Rust. Its a superpower you discover when coming from C++ or even js
English
1
0
3
170
Falco Girgis
Falco Girgis@falco_girgis·
@rikarends Oh, a Rust programmer... your type system can't even represent the kinds of shit my libGimbal type system can do or the constructs I'm able to get with C abusing macros: 1) inheritance 2) default arguments 3) function overloading
English
7
0
60
2.6K
Rik Arends
Rik Arends@rikarends·
Yea ok, that was my experience with C/C++ as well where you try to invent a 'better' language. / std libary but do a half-assed job because the language doesn't help enough. So you end up with macros all over and indecipherable errors at compiletime. You could also just use a better language.
Falco Girgis@falco_girgis

So I have a confession to make... about the kinds of C code the dude who codes for the Sega Dreamcast writes for his own personal libs (outside of SH4ZAM). I am the opposite of the C89 minimalist Grug-brained hipsters who you see getting big on social media for insisting that C is pure, simple, and lacks potential for evil such as abstraction, generalized containers, and object-oriented programming. Well, I'm sorry to say, but me and my homies? We get off on doing evil shit with C. On pushing it to its limits. On transcending its ridiculously limited set of built-in language features. On bringing nice, high-level things from more modern languages into our low-level embedded world... Here's a screenshot from my libGimbal framework, which provides an extended standard library in the same manner as QtCore and GTk's GLib in plain C17, bringing with it such evil as full OOP, dynamic typing, macro meta programming black magic, all of C++'s STL containers, and more crimes that C89 dinosaur programmers hate us for. This library is building with GCC, Clang, MSVC, and MinGW, and runs over 1000 unit test cases all passing for Sega Dreamcast, Nintendo Gamecube, Sony PSP, Sony PSVita, Windows, MacOS, Linux, iOS, and Android. On the left you'll see the type declaration for GblBox, using my macro-driven, domain-specific language for declaring OOP classes. GblBox is a base class, implicitly deriving from the empty root instance class, GblInstance, which adds the bare minimum requirements for an arbitrary object to store extra userdata and get arbitrary language bindings at runtime. It gets its own vtable with virtual functions, its own runtime-type identification, its own dynamic_cast<> equivalent, reference-counted semantics for interoping with garbage-collected scripting languages, has private members, can emit Qt/GTk-style signals (into any language), can implement C# and Java-style interfaces, etc. Then check out GBL_BIT_FIELDS(), which allows me to declare a group of bitfields in an endian-independent manner, as seen within the structs in the left top and in the bottom. The implementation is on the right... using part of libGimbal's built-in primitives for macro meta programming fuckery... So... if you're still reading this, and you have yet to rage quit, haven't puked, didn't swap to Rust, or aren't going back to C++, and you are the kind of sicko who likes to push the C language to its outer limits for sport... who simultaneously as an eye for performance on embedded systems and a lust for wanting nice programming features... The dark side of C programming awaits, my friend: github.com/gyrovorbis/lib…

English
14
4
114
25.3K
TECHNOBOG
TECHNOBOG@techno_bog·
@falco_girgis The best C programmers on this platform are all doing batshit crazy custom preprocessor stuff though. You keep mentioning grug-brained C programmers and I just don't know who you're talking about. If anything the most grug brained people I see are all Rust/C++ fanatics.
English
1
0
9
721
Falco Girgis
Falco Girgis@falco_girgis·
Sooo... now that we've established that I do horrible, terrible, evil things with the C programming language (on my Sega Dreamcast), that make the purist, minimalist C programmers want to puke, lets take another deep-dive into the dark side of C... Today we're looking at my GblStringView API, which is my own equivalent of C++'s std::string_view, with several notable exceptions: First of goddamn all, stop telling me std::string_view is always "zero overhead for strings" when any time you have to pass one to a function taking a C string as a const char*, you are FORCED to copy it into a temporary buffer, which you must then ensure is NULL-terminated, before forwarding it on as a const char* to a function. Rather than dealing with that bullshit, I reserve one bit from the size field (declared using my own GBL_BIT_FIELDS() meta macro, which ensures endian-independence), so that I know that I can elide such a temporary copy when needing to use my string view with a C API. Next, you'll notice I have taken the liberty of stealing the very few useful functions provided by C++'s std::string_view and have augmented them by continuing on to steal every useful method that operates on constant strings from Java, C#, Python, and even Perl's chomp() (for the lulz), making searching, tokenizing, comparing, returning substrings, and working with string views not a total pain in the ass! Moving right along to the next great sin against C's purity, you'll notice something strange about many of my function declarations... I have taken the liberty of including values within parentheses for the final argument(s) of many of them... ...WTF? Well, after several rewrites, whittling down 999 different variants of the same routine depending on the number of arguments that it received (or always having to unnecessarily pass extra args I don't care about), I have settled upon a new kind of blasphemy for many of my APIs: default arguments in plain C17... Yes, it's evil, unnatural, and horrible. No, I don't care. It's glorious to use and is sooo much more ergonomic! Sorry, not sorry! So how does it work? Well, for any public API which features default function arguments, if you scroll down to the bottom of the header file (where I hide my evil misdeeds to not scare off the grug-minded and pure), you will immediately notice that each function with default arguments has a corresponding macro WITH THE SAME NAME that actually "overrides" and hides the C function, propagating a variadic argument list through a series of proxy macros which append default arguments onto it before finally invoking the actual function itself with them... This is a practice which has drastically improved the ergonomics of many of my APIs... You'll get raised eyebrows, you'll be called a bad person, and you might be ostracized from your social circles, but don't knock it until you try it! Stay tuned for more unholy C practices, as we continue our journey into the dark side! github.com/gyrovorbis/lib…
Falco Girgis tweet media
English
20
12
298
21.8K
TECHNOBOG
TECHNOBOG@techno_bog·
@rfleury I've been practicing using your method for two weeks now. You taught me multithreaded programming. I always avoided parallelizing things to avoid the cognitive overload, your approach brought order to chaos. Thanks a lot for writing it. This is approximately what happened.
TECHNOBOG tweet mediaTECHNOBOG tweet media
English
0
0
0
22
Ryan Fleury
Ryan Fleury@rfleury·
@techno_bog I don’t find myself less productive using this style. If it’s a problem where threading would’ve been required, I’m much more productive using it, because it’s a lot simpler of a model.
English
1
0
1
270
Ryan Fleury
Ryan Fleury@rfleury·
It has been a lot easier for me to avoid things like this altogether by running wide by default, minimizing thread communication, and thus making most things - like the division of the input array elements, or small results combination work - scoped thread-local computations.
Ryan Fleury tweet media
Chris Allen@theodorvaryag

English
5
3
148
17.9K
TECHNOBOG
TECHNOBOG@techno_bog·
@davidfowl programming is about manipulating global shared mutable state btw
English
2
0
10
462
David Fowler
David Fowler@davidfowl·
I think the only software engineering practice I am dogmatic about is the fact that global shared mutable state is always bad.
English
84
23
699
146.1K
TECHNOBOG
TECHNOBOG@techno_bog·
@valigo We already have Unreal and it's the most OOP thing ever and is used to ship tons of super successful games. I find working with that extremely tiring and time-consuming, but it definitely doesn't prevent you from being successful, at least not until bar is raised (it won't be)
English
0
0
2
366
Valentin Ignatev
Valentin Ignatev@valigo·
>commits most of OOP sins >getters and setters >classes with inheritance >loves managers >loves singletons >loves small functions >uses STL >still sold 6-7 million copies of his games. Is OOP good after all, or it doesn't matter what you do if end product is good?
Valentin Ignatev tweet media
English
122
29
1.3K
881K
Not Eden yosef
Not Eden yosef@edenyosef1990·
@valigo For me personally - cases like The endless switch cases list of "balatro" codebase have changed what I thought about the correlation between good code and good game
Not Eden yosef tweet media
English
1
0
6
1K
TECHNOBOG
TECHNOBOG@techno_bog·
@harjassgambhir @tsoding I feel like I equally distrust both GitHub and a random VPS provider to keep my data safe and not shut off my access. At least GitHub is convenient. What's the alternative? Home server and hope your house doesn't get broken into?
English
1
0
1
51
Harjass Gambhir
Harjass Gambhir@harjassgambhir·
@tsoding yeah basic setup can always be done, i feel give the recent removals of some of the repos people might be inclined to add a workflow to just commit to remote ssh backup server as they commit onto github. that could be one useful scenario to not loose anything fully.
English
1
0
1
268
Harjass Gambhir
Harjass Gambhir@harjassgambhir·
TIL git ssh is actually just a regular ssh server access in the format user:server:folder_name where git is the user and github is the server git @ github[.]com:folder_name/file_name github is just a regular vps with git running in it and a ui to support it idk why i thought it was their own implementation on their backend😭
Тsфdiиg@tsoding

Microsoft doesn't want you to know this

English
1
0
22
5.5K
TECHNOBOG
TECHNOBOG@techno_bog·
@cmuratori Do you think it makes sense for creators to start looking into data poisoning strategies?
English
0
0
4
1.1K
Casey Muratori
Casey Muratori@cmuratori·
I find this sentiment very relatable. The behavior of AI companies has made it feel gross to share work online.
frame@framesh1ft

@cmuratori The obvious end game is that the internet and computers are mostly dead in terms of real content. Why put any effort into anything and post it online to get hoovered up by AI companies? AI has made be so much less interested in computers to be honest. The future is offline.

English
48
124
1.5K
123.3K
TECHNOBOG
TECHNOBOG@techno_bog·
@AgileJebrim @valigo Can you elaborate? I was always under impression the dispatch cost would dominate for the GPU. Likewise I'm not sure I want my windows event loop to be multithreaded (my cores are busy doing more useful work elsewhere)
English
1
0
0
185
Jebrim
Jebrim@AgileJebrim·
@valigo Just use a pool, store the key code in it, and, whenever it’s needed, do a parallel check to identify if it’s equal to the key code. Still O(1) time on any GPU for 1k keys.
English
2
0
6
4.6K
Valentin Ignatev
Valentin Ignatev@valigo·
Another day, another hash table replaced with a static array. Hitboxer used to have a table of key code -> its remapping, but there are only so many physical keys on all possible devices (actually, only 767 different key codes supported by Linux kernel). So 1000 statically allocated key sources should be enough for everyone!
Valentin Ignatev tweet media
English
10
2
96
23.4K
TECHNOBOG
TECHNOBOG@techno_bog·
@WalterBright Yes, absolutely! Unfortunately nesting them gets really confusing this is where jai's ifx block shines
English
0
0
0
385
WalterBright
WalterBright@WalterBright·
if-else vs ? : Replace: int x; if (condition) x = 7; else x = abc(); with: int x = condition ? 7 : abc(); Aside from being shorter, this is better because `x` is only assigned a value once. If it isn't assigned again, later on, it can also be made `const`: const int x = condition ? 7 : abc(); making your code easier to read and understand.
English
44
4
135
35.8K
TECHNOBOG
TECHNOBOG@techno_bog·
@rakyll It got dramatically worse before so it's okay that it got dramatically worse yet again just recently."
English
0
0
1
259
TECHNOBOG
TECHNOBOG@techno_bog·
@Jonathan_Blow @Grummz I'm sure there are some releases too far in the pipeline that are going to release soon. Or are you predicting many last minute rewrites?
English
0
0
0
547
Jonathan Blow
Jonathan Blow@Jonathan_Blow·
@Grummz Feels like a completely different era, though... if this game released *now* it would feel tremendously even more out-of-place than it felt at that time.
English
3
1
120
11K
TECHNOBOG
TECHNOBOG@techno_bog·
@valigo * Obligatory note that vendor lock in and all kinds of shady business tactics exists and this is not a panacea
English
0
0
1
16
TECHNOBOG
TECHNOBOG@techno_bog·
@valigo Agreed and that's a good observation. It is also worth noting that charity in this example is morally neutral - meaning at best it imitates the consequence of rational capital allocation. Successful charities approach this, with paid for libraries we would skip the middle man.
English
1
0
1
23
Valentin Ignatev
Valentin Ignatev@valigo·
My favorite thing about late 2025 is how all those normally functional people who are trying Linux out because of DHH realize how pretty much most notable projects are run by absolute nutjobs. Big surprise, who else do you think would do so much work for free???
English
4
0
29
1.1K
TECHNOBOG
TECHNOBOG@techno_bog·
@zandpreme Open up with a blanket insult, follow by shifting goalposts, conclude with an ad hominem - great work.
English
0
0
0
17
zandy
zandy@zandpreme·
@techno_bog Well, nothing you have the capacity to understand, at least.
English
1
0
0
21
i2cjak
i2cjak@i2cjak·
i2cjak tweet media
TECHNOBOG@techno_bog

@AssailantLF @rfleury @i2cjak I can answer this. My main.cpp fluctuates between 45k and 70k lines. I have a custom Sublime jump to definition that I implemented as a plugin. If I need more I call"rg" in the terminal. I greatly prefer this to all IDEs I have used.

ZXX
5
0
75
4.1K
zandy
zandy@zandpreme·
@techno_bog @i2cjak Do you genuinely, actually think I'm advocating for just randomly splitting things by the sole metric of hundreds of lines? Use your brain here.
English
1
0
0
31
TECHNOBOG
TECHNOBOG@techno_bog·
@zandpreme @i2cjak "Couple of hundreds" lines each is the most idiotic separation of files one could think of. You could argue separating by stable API, optimal IDE navigation, incremental compilation speed. Instead you have dogma and I have nothing to reply to.
English
1
0
0
28
zandy
zandy@zandpreme·
@techno_bog @i2cjak Fortunately the world supports in-between states, such as a dozen files with a couple hundred lines each.
English
1
0
0
35
TECHNOBOG
TECHNOBOG@techno_bog·
@i2cjak To add onto this, one benefit of a codebase like this is that it deters people who have no business contributing in the first place from trying.
English
0
0
1
77