Post B6sYU1hqbD1VUR48mm by foone@digipres.club
(DIR) More posts by foone@digipres.club
(DIR) Post #B6PkFstMujE4vsI9oG by foone@digipres.club
2026-05-18T07:31:09Z
1 likes, 0 repeats
some punk 31 years ago was tired of dealing with "correctly matching const char* vs char*" so they just did #define CONST and now it's my problem
(DIR) Post #B6PkZwTrHVz1qzvLl2 by sharkfie@infosec.exchange
2026-05-18T07:34:52Z
0 likes, 0 repeats
@foone did they also #define wrappers for half the standard library for no reason
(DIR) Post #B6PlIXcIZUeJls8dI8 by foone@digipres.club
2026-05-18T07:42:57Z
0 likes, 0 repeats
surely it'll be easy to fix thisoh that had some downstream impact, it's calling methods that aren't const-clean. surely that'll be easy to fixohI'm up to 119 compiler errors (from 1) now
(DIR) Post #B6PlZeAJTdgv0KClTU by foone@digipres.club
2026-05-18T07:46:03Z
0 likes, 0 repeats
GST::FAddRgch ahh yes, methods written by people who were scared of vowels and thought the solution was Hungarian notation
(DIR) Post #B6Pm38bTO7a9nuyGbA by foone@digipres.club
2026-05-18T07:51:21Z
0 likes, 0 repeats
well obviously your win32 app has to reimplement memcmp and all it FEqualRgb, why wouldn't you do that?
(DIR) Post #B6PmFkJmzW5UFWiBbU by thorsummoner@ibite.lol
2026-05-18T07:53:39Z
0 likes, 0 repeats
@foone I am pretty okay with this, deciding to not mutate something is cultural not mechanical;; but I understand the pain of having the built in policy agent disarmed sucks, especially when we have no linter to fill in for itdoes it work to#DEFINE myconst const\n?does this reenable us to insert literal const text into the source code? surely the macros are lazy right?
(DIR) Post #B6PmMRpi7JCuwhq2TY by foone@digipres.club
2026-05-18T07:54:54Z
0 likes, 0 repeats
why would you use strlen when you could implement CchSz instead?
(DIR) Post #B6PmQPHrWaIiCxtTs0 by moira@mastodon.murkworks.net
2026-05-18T07:55:36Z
0 likes, 0 repeats
@foone i have never felt so called out in programming
(DIR) Post #B6PmeU8qGwo5JnO6Vs by datenwolf@chaos.social
2026-05-18T07:58:04Z
0 likes, 0 repeats
@foone The Windows API was designed agnostic about any language specific environments. Also its ABI is not compatible the ABIs used by most C compilers of the time; Pascal calling convention was used instead.
(DIR) Post #B6PmhL2aZ7yVxep6q8 by foone@digipres.club
2026-05-18T07:58:29Z
0 likes, 0 repeats
this is fun. I am down to like 8 errors, and I fix the first one.This changes the number of errors left by random.randint(-80,80)
(DIR) Post #B6PmqZdDgd9HouMRLk by foone@digipres.club
2026-05-18T08:00:20Z
0 likes, 0 repeats
we can't use memcpy/memmove, we have to reimplement it as CopyPb and swap the order of the pointers! obviously it's src, dest, not dest, src
(DIR) Post #B6Pmt4x6Cy9HXRr0M4 by foone@digipres.club
2026-05-18T08:00:43Z
0 likes, 0 repeats
I'm starting to think this code was written by someone with a deep and unrelenting grudge against the C standard library
(DIR) Post #B6Pn7jqowcEqRCuKGm by coyoteseattle@mastodon.mechanicalmischief.com
2026-05-18T08:03:25Z
0 likes, 0 repeats
@foone To be fair, it may have just been someone who wanted to make sure it would be easier to keep them on the payroll than sack them.
(DIR) Post #B6PnAAg4AuMEDa2MyG by deshipu@fosstodon.org
2026-05-18T08:03:27Z
0 likes, 0 repeats
@foone I can totally understand a grudge against C standard library, to be honest.
(DIR) Post #B6PnDEBTasmbxjBcfY by datenwolf@chaos.social
2026-05-18T08:04:27Z
0 likes, 0 repeats
@foone Not grudge: Design decision. At the time the Windows API was defined Pascal / Delphi still were extremely popular languages. Also things like Visual Basic don't carry a C standard library.The Windows API was designed under the strict rule, that the presence of a C standard library (or any language specific runtime environment) must not have been assumed.That's why it had to define everything itself, not creating namespace collisions and fit into all targeted language constraints.
(DIR) Post #B6Pnarh0rrUF9mCzia by foone@digipres.club
2026-05-18T08:08:40Z
0 likes, 0 repeats
so if DEBUG isn't defined, this function is never called. and if vcactSuspendCheckPointers isn't 0 or cb is 0, this function's main code block doesn't run.and if it is 0, and cb isn't 0... IT DOES NOTHING AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
(DIR) Post #B6PndsxScUktwwLGoi by foone@digipres.club
2026-05-18T08:08:57Z
0 likes, 0 repeats
I have 31 errors and all of them are failing to call this NO-OP
(DIR) Post #B6Po8kLig1pcE9P9ii by foone@digipres.club
2026-05-18T08:14:48Z
0 likes, 0 repeats
@datenwolf I think you're misunderstanding what's happening here:this is C++ code for an application I'm looking at that's doing this. they're not exporting any of these alternative implementations of things like memcmp, and they will always have access to the ones in the standard library
(DIR) Post #B6PoY859Zlp74Zl9QO by datenwolf@chaos.social
2026-05-18T08:19:23Z
0 likes, 0 repeats
@foone Ah… it see.I wonder: Do they actually link in the standard library? Maye they didn't want to burden themselves or the user with having to install the Visual C++ Runtime?
(DIR) Post #B6PopHw4C6lUYVguyu by foone@digipres.club
2026-05-18T08:22:31Z
0 likes, 0 repeats
I did get the debugger working. One minor issue: it runs at 640x480.
(DIR) Post #B6PoxQM2mD0oz1imRc by ozzelot@mstdn.social
2026-05-18T08:23:50Z
0 likes, 0 repeats
@foonewho needs to see code anyway
(DIR) Post #B6Pp8i37KPnh32FY80 by darkling@mstdn.social
2026-05-18T08:25:55Z
0 likes, 0 repeats
@foone That's not a function, that's a sneeze.
(DIR) Post #B6PpBED6j0U5NC7jMG by foone@digipres.club
2026-05-18T08:25:57Z
0 likes, 0 repeats
IT'S CRASHING ON BOOT BECAUSE THE BOOLEANS ARE TOO SMALL
(DIR) Post #B6PpKKfI629BzveCae by sudo200@layer8.space
2026-05-18T08:28:03Z
0 likes, 0 repeats
@foone Dang, that's not on my bingo card
(DIR) Post #B6PqAJRZsjEDGj1GBE by peterrenshaw@ioc.exchange
2026-05-18T08:37:22Z
0 likes, 0 repeats
@foone this is a bad sign. 😕☺️
(DIR) Post #B6PqDHXdPXP2EnGhAO by FantasmitaAsex@todon.eu
2026-05-18T08:37:59Z
0 likes, 0 repeats
@foone you should take a look to Div Games Studio source code. Why store critical data in a struct when we can store EVERYTHING in a huge char array, and have offsets in # defines ...
(DIR) Post #B6PqONabGWZYBDwmJ6 by kkarhan@c.im
2026-05-18T08:40:02Z
0 likes, 0 repeats
@foone *yikes!*
(DIR) Post #B6PsCzJfN7bpcZiqG0 by kkarhan@c.im
2026-05-18T09:00:22Z
0 likes, 0 repeats
@foone not Croatian? *takes cover*
(DIR) Post #B6PsRds7NqgXSMpB1E by foone@digipres.club
2026-05-18T09:03:01Z
0 likes, 0 repeats
oh sweet jesus, they handle displaying the splashscreen by busy-looping the CPU for 4 seconds.I KNOW PROGRAMMERS WHO CARE ABOUT MULTITASKING AND THEY'RE ALL COWARDS
(DIR) Post #B6PsjgoFCVTbmOcNpw by static@aus.social
2026-05-18T09:06:10Z
0 likes, 0 repeats
@foone Clearly we don't need LLMs hallucinating that they can code to have actual bad code already out in the wild.
(DIR) Post #B6PtYNsrKDgRqrwwt6 by barubary@infosec.exchange
2026-05-18T09:15:19Z
0 likes, 0 repeats
@foone And if it actually did something, it would be worse: https://devblogs.microsoft.com/oldnewthing/20060927-07/?p=29563
(DIR) Post #B6PzOjuPBJpAzRSPMO by foone@digipres.club
2026-05-18T10:20:51Z
0 likes, 0 repeats
why is it that I always end up having to reverse engineer compression code?There's something like FIVE implementations of this decompression routine:x86 assemblyC++ (broken)C#RustPythonnaturally I need a working C++ one, but that means having to figure out what's wrong with the existing codeFor bonus points: there's actually TWO compression routines, each slightly different. and potentially broken
(DIR) Post #B6PzbhRpdsgv7eGwRk by foone@digipres.club
2026-05-18T10:23:18Z
0 likes, 0 repeats
it's also EIGHT THOUSAND LINES of assembly because why not manually unroll your loops?
(DIR) Post #B6PzlAZwhgy04naD5c by foone@digipres.club
2026-05-18T10:24:59Z
0 likes, 0 repeats
I also have C++ code that supposedly can compress.is it broken? who can say
(DIR) Post #B6Q05W8yEfFOkafUFk by sethrichards@mas.to
2026-05-18T10:28:37Z
0 likes, 0 repeats
@foone I remember working on a system ages ago where I was debugging some bizarre behavior with newly added code and it turned out somebody had used the preprocessor to redefine "malloc" to point to their own custom block allocator.It was the sort of system where it was, in fact, reasonable to dictate "no usage of the heap" but... yeah. Not like that.
(DIR) Post #B6Q0WMnb5SSraSTQbA by foone@digipres.club
2026-05-18T10:33:33Z
0 likes, 0 repeats
oh it was also trying to load MIDI files backwards because it thought not being on a 386 meant that we had to be big-endian
(DIR) Post #B6Q0fCcuHFWcdzgd16 by GreenSkyOverMe@ohai.social
2026-05-18T10:35:07Z
0 likes, 0 repeats
@foone This is like watching a train crash
(DIR) Post #B6Q0nAk5AOn77IqKmm by madman_bob@mastodon.social
2026-05-18T10:36:34Z
0 likes, 0 repeats
@foone https://www.youtube.com/watch?v=jPwNwNdE7pE
(DIR) Post #B6Q17bkwRJJ8grzPWq by foone@digipres.club
2026-05-18T10:40:16Z
0 likes, 0 repeats
the worst part is that I have no guarantee that this C++ decompression code has ever worked.the original programmers write an x86 assembly version and a cross-platform version, but this program only ever came out on x86. So did they ever test this code? Did they ever even RUN it? dunno!
(DIR) Post #B6Q1gHKiMboxU8Fp8y by foone@digipres.club
2026-05-18T10:46:30Z
0 likes, 0 repeats
fortunately one of the other projects working on this source already figured out the bug in the C++ implementation, so I can just steal their solution!
(DIR) Post #B6Q1xQUjYQS2p27KqG by foone@digipres.club
2026-05-18T10:49:37Z
0 likes, 0 repeats
- cb += (1 << cbit) + ((luCur >> (cbit + 1)) & ((1 << cbit) - 1));+ cb += (1 << cbit) + ((luCur >> (ibit + cbit + 1)) & ((1 << cbit) - 1));ahh, of course. such an obvious mistake
(DIR) Post #B6QJJ4bhJM3KWwHZaa by Longplay_Games@mastodon.gamedev.place
2026-05-18T14:03:55Z
0 likes, 0 repeats
@foone That's practically a crime...
(DIR) Post #B6QR7Xmvn1UxBzYAmO by gunstick@mastodon.opencloud.lu
2026-05-18T15:31:23Z
0 likes, 0 repeats
@foone repeted code? Easy:REPT 256 move a0)+ (a1)+ENDR
(DIR) Post #B6Qa14BLqoVbDjxVA0 by bytex64@awesome.garden
2026-05-18T17:11:11Z
0 likes, 0 repeats
@foone Pretty sure I’ve said exactly that after stubbing my toe.
(DIR) Post #B6Qqz9bGR0AOfKkk6a by foone@digipres.club
2026-05-18T20:21:20Z
0 likes, 0 repeats
@matt I need it to be portable, so, yes
(DIR) Post #B6QrlWNT3G5HD0MZSy by StarkRG@myside-yourside.net
2026-05-18T08:57:45Z
0 likes, 0 repeats
@foone Aren't booleans, at their core, supposed to just be one bit? I guess a zero-bit boolean could be too small...
(DIR) Post #B6QrlXR37QXkUP2wgi by foone@digipres.club
2026-05-18T20:30:03Z
0 likes, 0 repeats
@StarkRG they're logically one bit. PRACTICALLY they're... all over the place. Making them int-sized is common because that's usually the fastest datatype to deal with.This code expected them to be the same size as a DWORD, 32bits. My current compiler (VS 2022) seems to make them 8-bit.
(DIR) Post #B6QrrXw6AaPpmQQzjM by Longplay_Games@mastodon.gamedev.place
2026-05-18T14:08:00Z
0 likes, 0 repeats
@StarkRG @foone IIRC MS SQL Server uses a three-valued boolean
(DIR) Post #B6QrrZEZLOmho05G9w by foone@digipres.club
2026-05-18T20:31:14Z
0 likes, 0 repeats
@Longplay_Games @StarkRG this code was also written by microsoft, so it entirely separately features a datatype called "tribool", which is an enum with four values
(DIR) Post #B6QrxQEnhlerdpz4Pw by foone@digipres.club
2026-05-18T20:32:19Z
0 likes, 1 repeats
this code uses a datatype with the questionable name of "tribool", but when I looked into it to make fun of it I discovered something terrible:It's an enum with 4 possible values. It's a goddamn quadbool
(DIR) Post #B6QsZ5QZWbUS6WRwRc by pino@social.cologne
2026-05-18T20:38:59Z
0 likes, 0 repeats
@foone This is the only correct definition of a boolean type:https://thedailywtf.com/articles/What_Is_Truth_0x3f_
(DIR) Post #B6Qt9qH8p55XpEZ5eK by efi@chitter.xyz
2026-05-18T20:45:41Z
0 likes, 0 repeats
@foone bosco quadnary!!!!
(DIR) Post #B6QtzpspWfHnfRzCMK by kauzerei@social.tchncs.de
2026-05-18T20:55:03Z
0 likes, 0 repeats
@foone wait, don't 4 possible values make it kinda 2-bit logically? Double-precision bool?Doubool if you will
(DIR) Post #B6Qudff4wvuvY4Y5qa by foone@digipres.club
2026-05-18T21:02:15Z
0 likes, 0 repeats
the four canonical bool values are, of course: tNo, tYes, tMaybe, tLim
(DIR) Post #B6QvIFmA64Xv8dDHCC by jimp@masto.ai
2026-05-18T21:09:35Z
0 likes, 0 repeats
@foone YesNoMaybeI Don't KnowCan You Repeat the Question
(DIR) Post #B6QvceWHoEUJfiVxZo by llewelly@sauropods.win
2026-05-18T21:13:19Z
0 likes, 0 repeats
@foone tribool: booling for tribulations ...
(DIR) Post #B6QwqRfIV0l9oPs0VU by dan@discuss.systems
2026-05-18T21:27:00Z
0 likes, 0 repeats
@foone please, everyone knows that IEEE 1164 says that booleans should have exactly nine possible values
(DIR) Post #B6Qx4TCJb8W0cT097Q by Chip_Unicorn@im-in.space
2026-05-18T21:29:32Z
0 likes, 0 repeats
@foone The four values of bool are:TrueFalseNeither True Nor FalseNeither True, False, nor Neither True Nor FalseNeither True; False; Neither True Nor False; nor Neither True, False, nor Neither True Nor FalseScientists believe that there may need to be a secret, additional option if the current list isn't enough.
(DIR) Post #B6QxIT36wku4DHN3HU by colinburgess@mastodon.nz
2026-05-18T21:32:05Z
0 likes, 0 repeats
@foone the basis of trisolaran logic
(DIR) Post #B6QxkXBn9DizA4oYNs by icedquinn@blob.cat
2026-05-18T21:37:36.122584Z
0 likes, 0 repeats
@foone there was a thing about how nobody understood hungarian notation. it was supposed to be naming the values for what the slot actually did and everyone started naming the slot after the type instead.
(DIR) Post #B6Qxsuz0ZCTRH0pgeW by icedquinn@blob.cat
2026-05-18T21:39:08.196051Z
0 likes, 0 repeats
@foone like with a deficient type system it was supposed to be like "int m_distance" for meters of distance, so the call site would see "m_distance * f_rocket_size" and be visible that you fucked up meters and feet.but we just then didn't go and do that :blobcatlaydown:
(DIR) Post #B6QyYkiN8OTZab01rM by foone@digipres.club
2026-05-18T21:46:13Z
0 likes, 0 repeats
@icedquinn yeah!indicating the type is WAY less useful, especially in the modern era where your IDE can just tell you what the type is when you hover over the type
(DIR) Post #B6Qyc0nJo4SQKQrpc8 by foone@digipres.club
2026-05-18T21:46:26Z
0 likes, 0 repeats
@ryanoneill1970 hell yeah
(DIR) Post #B6QyoTeAMNRJHtWwAS by foone@digipres.club
2026-05-18T21:48:49Z
0 likes, 0 repeats
@jimp you're not the boss of me!
(DIR) Post #B6QzVJwmIcTZekfIvI by sovietfish@todon.eu
2026-05-18T21:56:48Z
0 likes, 0 repeats
@foone Quad 🦵Ba🐑Ghoul🧛🥓
(DIR) Post #B6R05A6WN8XjYQJSbI by jef@mastodon.social
2026-05-18T22:03:16Z
0 likes, 0 repeats
@foone Leeloo Dallas Multibool
(DIR) Post #B6R0GwxF5WT6FKas7s by flower@pony.social
2026-05-18T22:05:25Z
0 likes, 0 repeats
@foone That's funny.
(DIR) Post #B6R1kXkVSvdwiNJODY by RueNahcMohr@infosec.exchange
2026-05-18T22:21:58Z
0 likes, 0 repeats
@foone I presume tLim is when the question is broken?Aka, "When you bought a Claude plan, did you use your parents credit card?"
(DIR) Post #B6R3i9Bo0U1PsD48wa by foone@digipres.club
2026-05-18T22:43:56Z
0 likes, 0 repeats
@daedalus I want a language with a short int and a looooong boolean.
(DIR) Post #B6R4UinqtoXUE91XmK by theorangetheme@en.osm.town
2026-05-18T22:52:39Z
0 likes, 0 repeats
@foone @daedalus Save time and storage by using 64-bit ints for your booleans and just flip individual bits as needed! :D
(DIR) Post #B6R4wWSWO5qa3EIqsi by fishidwardrobe@mastodon.me.uk
2026-05-18T22:57:47Z
0 likes, 0 repeats
@foone true, yes, no, false
(DIR) Post #B6RJkRyAkhgXxroDwW by skington@glasgow.social
2026-05-19T01:43:37Z
0 likes, 0 repeats
@foone FileNotFound, surely? https://thedailywtf.com/articles/What_Is_Truth_0x3f_
(DIR) Post #B6RfWYDIwEQiGefFpo by twipped@twipped.social
2026-05-19T05:47:35Z
0 likes, 0 repeats
@foone lim as in liminal? "Ask again later"?
(DIR) Post #B6RgjpfhRPC28CqKXI by foone@digipres.club
2026-05-19T06:01:15Z
0 likes, 0 repeats
@twipped as in "limit", I think.
(DIR) Post #B6S4Beio2mVRE0X41w by oheso@ieji.de
2026-05-19T09:59:11Z
0 likes, 0 repeats
@foone tFileNotFound
(DIR) Post #B6SRDg9fz28TCB2BQe by zarchasmpgmr@infosec.exchange
2026-05-19T14:42:02Z
0 likes, 0 repeats
@foone this is one of the times that I wish time travel was available to the general masses.
(DIR) Post #B6sYRHiKcsOqGhz7wG by foone@digipres.club
2026-06-01T05:05:25Z
0 likes, 0 repeats
i looked into some code that uses the tribool, and one of them is FNI::TExists, which determines if a file existit has 5 return possibilities, and three of them are tMaybe. It calls GetFileAttributesA/W() If that returns an error, and the error isn't ERROR_FILE_NOT_FOUND or ERROR_INVALID_DRIVE, you get a tMaybeif the FNI filetype is directory, and FILE_ATTRIBUTE_DIRECTORY isn't set, or vice versa, you get a tMaybe
(DIR) Post #B6sYU1hqbD1VUR48mm by foone@digipres.club
2026-06-01T05:05:36Z
0 likes, 0 repeats
Finally, if the file you're trying to check is marked HIDDEN or SYSTEM... tMaybe!
(DIR) Post #B6sZ47ibitPaYsdLgO by foone@digipres.club
2026-06-01T05:12:27Z
0 likes, 0 repeats
so:FNI("normal.dat").TExist() == tYesFNI("hidden.file").TExist() == tMaybeFNI("non.exist").TExist() == tNo
(DIR) Post #B6sZjHTGMtUWgJ584W by foone@digipres.club
2026-06-01T05:19:58Z
0 likes, 0 repeats
this code sample is set in an alternate universe where FNI has a useful constructor.I think you'd actually need to do, like:STN stn;stn.SetSzs("normal.dat");FNI filename = FNI();filename.FBuildFromPath(stn ffniFile);
(DIR) Post #B6scQtW4zYUN2OK7EW by foone@digipres.club
2026-06-01T05:50:12Z
0 likes, 0 repeats
ugh. I knew this was going to be a problem.The way classes are defined means I can't directly use VSCode's refactoring to rename them, because it will break them
(DIR) Post #B6scTjzarGfoMtUAfg by foone@digipres.club
2026-06-01T05:50:32Z
0 likes, 0 repeats
they wrote their own return class identification system that runs on a bunch of defines
(DIR) Post #B6sccF0tPHqYtX99MW by foone@digipres.club
2026-06-01T05:52:20Z
0 likes, 0 repeats
that's okay, I only have 327 classes to rename.Well, 325 now
(DIR) Post #B6sejYVtVKsvJBGMRE by foone@digipres.club
2026-06-01T06:15:57Z
0 likes, 0 repeats
okay NOW I'm done. I think. That was what, 25 minutes to rename two classes? So I should be done in like, 61 hours?
(DIR) Post #B6semWiKeQACb2UtN2 by foone@digipres.club
2026-06-01T06:16:16Z
0 likes, 0 repeats
and I specifically picked those classes as low hanging fruit.Jesus.
(DIR) Post #B6sfuVjmGYTfq1XoWm by patrislav@chaos.social
2026-06-01T06:29:04Z
0 likes, 0 repeats
@foone Hungarian notation is the most enterprisey method of code obfuscation
(DIR) Post #B6sk1hPHg3ExsFdrEG by milchmonster@girlcock.club
2026-06-01T07:14:51Z
0 likes, 0 repeats
@foone the first game i made had a two seconds loading screen that did absolutely nothing except increment the progress %
(DIR) Post #B6sl69q00udrABpMrw by milchmonster@girlcock.club
2026-06-01T07:27:16Z
0 likes, 0 repeats
@foone captain Kirk voice: tribools! tribools everywhere!
(DIR) Post #B6slDyD77wiRQ2Mf5s by milchmonster@girlcock.club
2026-06-01T07:28:42Z
0 likes, 0 repeats
@foone the three possible values of tMaybe are:maybesuperpositionand both
(DIR) Post #B6tQ1DhwIHuhq3p0k4 by foone@digipres.club
2026-06-01T15:05:45Z
0 likes, 0 repeats
@SpindleyQ no, I'm trying to make the class names more sensible.Like "FileName" instead of FNI
(DIR) Post #B6tzsnYRFBVAl7f3ya by foone@digipres.club
2026-06-01T21:47:37Z
0 likes, 0 repeats
@SpindleyQ FNI may have been a bad example. So this codebase uses 2-4 letter classes for basically everything.So like a multi-line editing control is a class called "EDMW"And a tiled bitmap is a class named GORT