/dpt/ - Daily Programming Thread - /g/ (#105929300) [Archived: 87 hours ago]

Anonymous
7/16/2025, 9:41:03 PM No.105929300
1707860893850095
1707860893850095
md5: c6816b333582e5bc76606c80fc67194d๐Ÿ”
What are you working on, /g/?

Previous thread: >>105889001
Replies: >>105929314 >>105932572 >>105935981 >>105943105 >>105969642
Anonymous
7/16/2025, 9:42:08 PM No.105929314
>>105929300 (OP)
>working
>/g/
Anonymous
7/16/2025, 9:59:50 PM No.105929512
1720652475787045
1720652475787045
md5: 14da0a130e1ea4fad43f12d538618f13๐Ÿ”
No 'threadly reminders' for this thread.
(If any are posted, they're fake and should be disregarded)
Replies: >>105929534 >>105929792 >>105978478 >>105985050
Anonymous
7/16/2025, 10:02:36 PM No.105929534
>>105929512
Rolling by here
Anonymous
7/16/2025, 10:30:23 PM No.105929792
>>105929512
For me it's the umaru disinfo thread
Anonymous
7/16/2025, 11:10:38 PM No.105930111
For me it's C and TCL/TK.
Replies: >>105932733
Anonymous
7/16/2025, 11:48:42 PM No.105930408
The difference between n and n^2 is brutal.
Replies: >>105930442
Anonymous
7/16/2025, 11:52:34 PM No.105930442
>>105930408
uh actually it's |n^2 - n|
Anonymous
7/17/2025, 12:05:08 AM No.105930538
How the fuck does unmove work
Is it ever going to give you a dead ref to temp
Anonymous
7/17/2025, 12:45:02 AM No.105930910
2025-07-16 15-14-59_thumb.jpg
2025-07-16 15-14-59_thumb.jpg
md5: 5eab447b6dbe4d2e20b6aa915b6c20b4๐Ÿ”
closer
Replies: >>105930950 >>105932637 >>105950269 >>105977010
Anonymous
7/17/2025, 12:48:38 AM No.105930950
>>105930910
why don't you disable the intro while changing it
Replies: >>105931029
Anonymous
7/17/2025, 12:57:40 AM No.105931029
>>105930950
I put it back for the video for gorgeous looks.
Anonymous
7/17/2025, 1:12:20 AM No.105931189
in c, if you have an arbitrary sized object with and equal amount of declared elements, say a struct with some amount of allocated but memory. if you set that struct equal to zero, what exactly gets set to zero in memory?
e.g.
struct something *n = (something *)malloc(sizeof(something));
*n=0;
Replies: >>105931274 >>105931304 >>105931504
Anonymous
7/17/2025, 1:20:31 AM No.105931274
>>105931189
or would this just be the first size(int) bytes at the location of this struct.
Replies: >>105931304 >>105931442
Anonymous
7/17/2025, 1:22:55 AM No.105931304
>>105931189
>>105931274
this is unlikely to compile unless C is more retarded than i thought
Anonymous
7/17/2025, 1:35:30 AM No.105931442
>>105931274
I don't see how this could compile. you're attempting to assign incompatible types
Anonymous
7/17/2025, 1:42:25 AM No.105931504
>>105931189
That wont compile. If you want to zero out the struct (or at least its fields):
*n = (struct something){ 0 };

And you can swap out the zero for actual fields and the rest will be zeroed out.
Replies: >>105952634
Anonymous
7/17/2025, 1:58:12 AM No.105931623
its beautiful_thumb.jpg
its beautiful_thumb.jpg
md5: 43c010f32a754412e38ce35952004ed4๐Ÿ”
gentlemen, I do believe we officially have a viable software rendering engine
Replies: >>105931673 >>105938694 >>105952652 >>105979235
Anonymous
7/17/2025, 2:03:11 AM No.105931673
whip_003
whip_003
md5: 6cd1bc6c3d34093b08baeb1e2e1b7584๐Ÿ”
>>105931623
what a lovely day!
Anonymous
7/17/2025, 2:12:04 AM No.105931727
1719282846595684
1719282846595684
md5: 7fdf76483833124c4e97929c3c2c8fc7๐Ÿ”
working on a FOSS personal goal dashboard for linux with python. might also do for android
Anonymous
7/17/2025, 4:46:43 AM No.105932572
dick_slider_thumb.jpg
dick_slider_thumb.jpg
md5: 04102fdcd1a3b2f948a721efbde76ead๐Ÿ”
>>105929300 (OP)
Kiseff please hire me.
Anonymous
7/17/2025, 5:00:52 AM No.105932637
>>105930910
I admire the raw dawgging of 3d graphics and VS here anon
Anonymous
7/17/2025, 5:17:40 AM No.105932704
1743124408223206
1743124408223206
md5: 810c69282639bbb2e4bc617dd6787e5e๐Ÿ”
I have a MQ that uses SQLite. There's a flush routine that runs every 100ms. I just recently found a rare bug because the file isn't locked when flushing the queue table. Will adding a lock fuck up the write/read flow?
Replies: >>105960154
Anonymous
7/17/2025, 5:23:29 AM No.105932733
>>105930111
Based. I use odin and jimtcl
Anonymous
7/17/2025, 11:29:49 AM No.105934614
ps
ps
md5: b2c70680964f0bf15e50b41343bb2a78๐Ÿ”
continued to work on my postscript parser after leaving it to rot for a year or so, it can now properly parse digits.
Anonymous
7/17/2025, 1:21:06 PM No.105935306
frfr
frfr
md5: ec770cb3c3f06e30e5903088b3427daa๐Ÿ”
If you're one of those people that actually got a team to use rebase workflow in git I hope you choke on your own farts.
Replies: >>105938776 >>105977031
Anonymous
7/17/2025, 2:51:22 PM No.105935981
>>105929300 (OP)
Are there any FOSS debuggers available for linux systems other that gdb? specifically for C / C++ in my case
Replies: >>105936890 >>105938795
Anonymous
7/17/2025, 3:08:48 PM No.105936096
How do I force myself to program instead of watch tiktok whores with small waists and large busts all day? Fuckk I hate programming but there are no jobs that are both cozy and actually pay well.
Replies: >>105936562 >>105936666 >>105937335 >>105938397 >>105938860
Anonymous
7/17/2025, 4:05:36 PM No.105936562
>>105936096
You gotta up your goon game so that you're busting so hard that you dont even wanna look at a bitch for at least 12 hours.
Anonymous
7/17/2025, 4:18:24 PM No.105936666
>>105936096
Make a compiler.
Anonymous
7/17/2025, 4:45:05 PM No.105936890
>>105935981
Pressing the debug button in vscode works for me.
Anonymous
7/17/2025, 5:33:55 PM No.105937335
>>105936096
Learn to multitask and do them at the same time I guess?
Anonymous
7/17/2025, 7:21:25 PM No.105938397
>>105936096
Knock several of them up
Anonymous
7/17/2025, 7:44:03 PM No.105938643
in C++ what would be the right type of container to use for a list of objects that various threads need to be able to add / remove / operate on / hold a reference too (not necessarily a literal reference)?
Replies: >>105938672 >>105977093 >>105983155
Anonymous
7/17/2025, 7:47:03 PM No.105938672
>>105938643
A Queue.
Anonymous
7/17/2025, 7:48:32 PM No.105938694
>>105931623
Let's fucking go brother
Anonymous
7/17/2025, 7:54:08 PM No.105938752
No meme here. How do I understand rust in depth especially around the compile time safety guarantees and its flaws of the borrow checker?
Replies: >>105941920
Anonymous
7/17/2025, 7:56:23 PM No.105938776
>>105935306
They all ganged up on me and just use merge after merge causing huge bloat in git history
Anonymous
7/17/2025, 7:58:21 PM No.105938795
>>105935981
The LLVM/clang one
Anonymous
7/17/2025, 8:04:22 PM No.105938860
>>105936096
Build your own raft consensus backed, distributed, fault tolersnt sql dialect database.
Anonymous
7/17/2025, 10:13:37 PM No.105940256
Anyone know why my college is forcing me to write notes on what I will be doing for my project for the day before actually doing it? Do these retards actually think anyone works like this when it comes to programming? Usually I start programming and see where it takes me, I can make a lot of progress in one day or make very little in one day, and face different challenges of course. This is so fucking retarded but I'm forced to do it on a weekly basis for some reason and waste a bunch of time instead of actually just going straight in to program.
Replies: >>105940563 >>105940595
Anonymous
7/17/2025, 10:39:10 PM No.105940563
>>105940256
So they can sell it to some machine learning company or use it to experiment with having AI do the same thing
Anonymous
7/17/2025, 10:42:36 PM No.105940595
>>105940256
real programmers don't write notes but instead have daily stand-up meetings where they tell (by actually speaking) the rest of the team what they're working on
also your tasks are pre-planned for the next one to four weeks

"just start and see where it takes me" is pure unemployable hobbyist approach. no one will stop you, but no one will employ you either
Replies: >>105940711 >>105940716
Anonymous
7/17/2025, 10:54:24 PM No.105940711
>>105940595
Except they're told what to work on, you don't just decide what to work on by yourself, you mongoloid. And then most of the time you're given a reasonable time limit from your supervisior and often times people get it done and don't have to do anything until their boss gives them a new task. I on the other hand am doing a project all by myself, I could complete it in a week or in a month depending on how experienced I am.
Replies: >>105940723 >>105941697
Anonymous
7/17/2025, 10:55:03 PM No.105940716
>>105940595
stand ups are for bootcampers and JS monkeys, real programmers figure out what needs doing and disappear to get it done
Replies: >>105941697
Anonymous
7/17/2025, 10:55:18 PM No.105940723
>>105940711
>a project
you will never finish it
Anonymous
7/18/2025, 12:44:43 AM No.105941697
>>105940716
>>105940711
t. unemployed hobbyists

>Except they're told what to work on, you don't just decide what to work on by yourself
"The Business" states what they need done, the developer decides what to work on (aligned with the business' priorities if possible)
>And then most of the time you're given a reasonable time limit from your supervisior
The developers are responsible for estimating tasks
>and often times people get it done and don't have to do anything until their boss gives them a new task
Maybe if you're some unimportant throwaway intern and not an real developer with any credibility or accountability
Replies: >>105942236
Anonymous
7/18/2025, 1:14:01 AM No.105941920
>>105938752
>>>/tv/
Replies: >>105946613
Anonymous
7/18/2025, 1:55:17 AM No.105942236
>>105941697
>The developers are responsible for estimating tasks
lol
>we need X
>takes 3 months, boss
>make it 1
>rush it
>release half assed shit
>client complains
>in the end it takes 6 months and we are all happy it's over
Replies: >>105942385
Anonymous
7/18/2025, 2:12:31 AM No.105942385
>>105942236
your silly little scenario doesn't reflect how it works in reality
Replies: >>105942406 >>105942420
Anonymous
7/18/2025, 2:15:17 AM No.105942406
>>105942385
It literally does if you have incompetent middle management (or upper management, for really small companies)
Replies: >>105942479
Anonymous
7/18/2025, 2:17:52 AM No.105942420
me
me
md5: 62c91f964112eacb446321ab7cafdf34๐Ÿ”
>>105942385
Anonymous
7/18/2025, 2:27:47 AM No.105942479
>>105942406
find a better job than this imaginary one
also you're blaming management for not stepping up to what should be your competence and responsibility
Anonymous
7/18/2025, 4:17:22 AM No.105943105
>>105929300 (OP)
Are all characters always 1 byte in size?
Replies: >>105943296 >>105955142
Anonymous
7/18/2025, 4:49:22 AM No.105943296
I've been working on a C++ library which has a focus on always allowing an allocator to be specified for every container or function which may require allocation. Allocation is always fallible, and in general I try to avoid interfaces where "if you do X, it's UB," to a degree that I feel is reasonable. I also have decided to make my own IO interfaces, and I implemented strings and IO with char8_t. Having done that, I think char8_t is a huge waste of time and I may as well have used plain char and dealt with the pain of determining the sign of char on each platform as applicable and doing whatever casting is necessary for handling UTF-8 encodings with it. char8_t is a total pain in the ass.

>>105943105
No, Windows and some embedded platforms don't do that. Wide character types in C and C++ are a huge pain in the ass.
Anonymous
7/18/2025, 8:09:04 AM No.105944326
car select_thumb.jpg
car select_thumb.jpg
md5: 4a59a3ef8c0dcdb82c0b5d29f6cf6ebd๐Ÿ”
https://streamable.com/a9ovud car select works
Anonymous
7/18/2025, 8:34:19 AM No.105944443
>write 1000 word essay on why use Rust
>I have never written a line of Rust in my life
https://mnvr.in/rust
LMAOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Replies: >>105944820 >>105947473
Anonymous
7/18/2025, 9:36:48 AM No.105944820
>>105944443
based
im not reading your blog though
Anonymous
7/18/2025, 9:44:42 AM No.105944865
fisscopeshowonly
fisscopeshowonly
md5: a4423f0738c1e66c5ed02d4ef9b59cea๐Ÿ”
>been using visual assist for many years
>update visual studio
>visual assist constantly makes annoying error popup
Apparently I need to update visual assist to fix the issue, but I don't feel like paying $129 for that. Coming to think of it the only feature I'll really miss is the file browser (pic related).
Does anyone know of another add on that provides something similar?
Replies: >>105944872 >>105986067
Anonymous
7/18/2025, 9:47:32 AM No.105944872
>>105944865
code one yourself?
Replies: >>105944953
Anonymous
7/18/2025, 9:48:41 AM No.105944876
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2025/#mailing2025-07
kitaa
Anonymous
7/18/2025, 10:03:08 AM No.105944953
>>105944872
>code one yourself?
Tempting, but I don't have time for that unfortunately. For now I guess I'll just go back to an earlier version of visual studio.
Replies: >>105945010
Anonymous
7/18/2025, 10:14:41 AM No.105945010
>>105944953
continued

Just told chatgpt to make an add on that does this. Works pretty good with some tweaks. Really not that much code, but I suppose the devil is in the details. Never used C# before so maybe it's total shit.
Anonymous
7/18/2025, 3:20:47 PM No.105946613
>>105941920
sneed
Anonymous
7/18/2025, 4:52:34 PM No.105947295
guys Iโ€™m gonna take a class on swift at a local college. I have no programming experience, havenโ€™t taken math classes in over a decade, zilch, pretend Iโ€™m retarded, but it only takes one semester to complete all its courses. I donโ€™t think itโ€™s particularly in depth, but since itโ€™s enough to get a certificate out of, how should I set my expectations on my ability as a swift programmer at the end of this, assuming I finish? Could I really build a whole app from scratch? Perhaps a barebones note taking app, or an app that has syncing or data crunching functionality?
I would be doing it for fun so my personal expectation is I can make my own freeware apps, because once in a while I browse the App Store for certain apps and it annoys me how many bloated paid apps there are, that I wish โ€œI could make my own app specifically for me with these certain functionalitiesโ€
Replies: >>105947384 >>105947716
Anonymous
7/18/2025, 5:07:19 PM No.105947384
>>105947295
>swift
dont
Replies: >>105947501
Anonymous
7/18/2025, 5:21:40 PM No.105947473
24503581
24503581
md5: f972afc1dc00042493198979c4c242bc๐Ÿ”
>>105944443
Damn balding at 20? Jeetcel.
Anonymous
7/18/2025, 5:24:28 PM No.105947501
>>105947384
is it because itโ€™s apple only?
Replies: >>105947965
Anonymous
7/18/2025, 5:42:05 PM No.105947609
>wagies yap at me about OOP being about big teams
>the actual history is a bunch of boomers fumbling around with optimizing code-reuse in their lone-wolf projects
Replies: >>105947785
Anonymous
7/18/2025, 5:56:33 PM No.105947716
>>105947295
Swift is irrelevant outside of fruit platforms so be aware of that.
The best (ie, easiest) language for general phoneslop is Kotlin or Java.
Anonymous
7/18/2025, 6:05:04 PM No.105947785
>>105947609
>we spend too much time coding and maintaining it, we need to reuse code
Maybe write pure functions?
>inserts logic in SQL stored procedures
Maybe write pure functions?
>inserts logic in table rows and dynamically crafts SQL statements to be run in stored procedures
Maybe write pure functions?
>makes a 5 depth inheritance chain where you have no fucking clue which one of the commit() gets run when you see a Transaction
Maybe write pure functions?
>we are using a static typed language, why do we have so many bugs?
>imports obsolete Java 1.4 library for some stupid diagrams
Anonymous
7/18/2025, 6:30:04 PM No.105947965
>>105947501
Not anymore, they had a big push for going crossplatform
Personally, I like the language because it has ARC and pattern matching with algebraic data types, but I ran into issues when I was trying to use it for writing utilities.
I think it's good for backend webdev with a framework and macOS/iOS app development. I still find myself using Nim or C# more for my usecase.
Anonymous
7/18/2025, 6:35:41 PM No.105948012
Currently thinking how I'm going to architect a rule checking engine that checks values fetched from an external API using custom rules and check functions from plugins
The part I'm having trouble with is how I can put a function pointer into a C# class, but I think Func<T> is going to do the trick

This was really easy to implement in Lua since I can put functions in tables and return that. Unsure what the C# equivalent is.
Replies: >>105951644
Anonymous
7/18/2025, 7:19:38 PM No.105948428
I've never written a single line. I am going to learn Rust as my first programming language
Replies: >>105949494
Anonymous
7/18/2025, 9:16:30 PM No.105949494
ptsd
ptsd
md5: bdb57e2228ad5cafad007a99cf2218fd๐Ÿ”
>>105948428
good fucking luck
Replies: >>105954187
Anonymous
7/18/2025, 9:46:33 PM No.105949796
So if I want to compile some dependency I have 0 control over with a specific GNU libc version in mind my 3 options are
>compile on an old version of debian in a VM
>the same but docker
>forget glibc and do it with musl instead
Is there really no convenient option like .symver?
Replies: >>105960000
Anonymous
7/18/2025, 10:06:23 PM No.105949966
i'm writing a grpc api, not sure whether i should bother with compression yet and what standard to go with
i think lz4 is probably the best for me. i know grpc is already pretty efficient.
Anonymous
7/18/2025, 10:38:20 PM No.105950269
>>105930910
are you writing your own physics engine? Good any good resource on that?
Replies: >>105950850
Anonymous
7/18/2025, 11:34:55 PM No.105950850
>>105950269
I'm decompiling an existing game. It does have its own bespoke physics engine, software rendering engine too.
Replies: >>105954532
Anonymous
7/19/2025, 1:15:22 AM No.105951644
>>105948012
I was right and now I have a working implementation that dynamically loads from other assemblies too
Anonymous
7/19/2025, 3:48:41 AM No.105952634
>>105931504
MISRA Rule 10 violation
Anonymous
7/19/2025, 3:50:28 AM No.105952652
>>105931623
Great job anon, and very nice looking implementation there. Are you using Pineda's algorithm for triangle rasterization?
Replies: >>105953805
Anonymous
7/19/2025, 5:21:58 AM No.105953245
17528951861342
17528951861342
md5: 3f0ce3aaf3db587e3a49178bfc2c3a27๐Ÿ”
>Waste 2hs of my life trying to find out out why Cursive doesn't want to recognize my extremely simple Clojure project
>Make it work by removing all the autogenerated config crap then running three miserable commands by hand
Not sure if i'm retarded, or IntelliJ is retarded. Either way, Clojure is a lot less unpleasant to run through the CLI than Java. Simple text editor it is.
Anonymous
7/19/2025, 6:54:04 AM No.105953733
I want to fork fortune and keep all the offensive jokes in an add even worse ones but I can't find the original program or list.

I mainly want the original list written by Ken Arnold in the 1970s.
Replies: >>105955285
Anonymous
7/19/2025, 7:09:20 AM No.105953805
>>105952652
No idea lol, whatever they did in 1995. Could ask an LLM I suppose.
Anonymous
7/19/2025, 8:26:56 AM No.105954187
>>105949494
ty-- I will need a lot of it
Anonymous
7/19/2025, 9:40:30 AM No.105954532
>>105950850
>I'm decompiling an existing game
are you doing it manually by looking at the disassembly or are you using a decompiler and manually fixing what it produce?
Replies: >>105956877
Anonymous
7/19/2025, 11:36:32 AM No.105955142
>>105943105
If by character you mean characters in the alphabet and not the datatype char then they vary in length for all platforms when using utf.
Anonymous
7/19/2025, 12:01:41 PM No.105955285
>>105953733
I don't know about the original but here's what I found

those don't have much
https://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/games/lib/fortunes
https://www.tuhs.org/cgi-bin/utree.pl?file=V8/usr/games/lib/fortunes

but here's the good stuff:
https://www.ibiblio.org/pub/linux/games/amusements/fortune/fortune-mod-9708.tar.gz
https://www.ibiblio.org/pub/linux/games/amusements/fortune/kfortune-1.3.tar.gz
Replies: >>105955368 >>105960698
Anonymous
7/19/2025, 12:07:51 PM No.105955323
Working on my website csbook.club.

https://csbook.club/off-topic

I found database dump of all /prog/ posts from 2008-2014, which I'm working towards importing them into the site. A few changes need made beforehand though to support it.
Anonymous
7/19/2025, 12:16:31 PM No.105955368
>>105955285
also here
https://github.com/shlomif/fortune-mod/tree/master/fortune-mod/datfiles/off/unrotated
Replies: >>105960698
Anonymous
7/19/2025, 1:37:29 PM No.105955851
Am I the only one who think that std::expected wasn't that necessary? Like std::tuple, std::variant or std::pair can do the work just fine in case you wanted something similar to result
Replies: >>105955861
Anonymous
7/19/2025, 1:38:42 PM No.105955861
>>105955851
std::* is slop and nobody intelligent uses any of it
Replies: >>105955887 >>105958425
Anonymous
7/19/2025, 1:42:57 PM No.105955887
>>105955861
Is it? I have no time to reinvent everything for my hobby game engine just for 0.1% performance improvement, no sure why you guys hate exceptions and safety
Replies: >>105960777
Anonymous
7/19/2025, 2:54:12 PM No.105956410
is using ai to get a better understanding on how shit works frowned upon? Genuinely wondering because on one hand yeah, there's that small chance it may be inaccurate but on the other i really dont feel like going on a forum just to ask retarded question nr. 49
Replies: >>105958250
Anonymous
7/19/2025, 3:13:43 PM No.105956558
Hello kind sir. Supposedly wine's "new wow64" can run 32-bit programs on 64-bit only systems.
would it be feasible to LoadLibrary() a 32-bit DLL and invoke its functions from a 64-bit winelib program?
Anonymous
7/19/2025, 3:55:16 PM No.105956877
20241024_204655
20241024_204655
md5: 515d3d842610c050989a4e6e3e8fdec8๐Ÿ”
>>105954532
Both. When I first started I was just looking at the asm (with debug symbols). I tried Ghidra briefly but it's kinda junk for DOS stuff. I managed to figure out their resource mangling algorithm and how all the graphics resources and track files worked using just the asm and a lot of trial and error plus some help from other less technical fans of the game. Also had a beta version of the game where the resources were not mangled. Wrote a pretty good track editor and resource converter that way: https://github.com/Zizin13/RollerTrackEditor

Now I am using IDA which has a decompiler specifically for Watcom, the compiler they used to make the game. I have gotten pretty good at using it and am making very good progress. I think I will have the entire thing decompiled in a few months. https://github.com/Zizin13/ROLLER

Finding a released exe where the debug symbols were not stripped is what made it all seem possible.
Replies: >>105959002 >>105968999
Anonymous
7/19/2025, 6:49:18 PM No.105958250
>>105956410
If the LLM is doing the thinking for you or you can't verify what it says, then you are using it wrong.
Replies: >>105958627
Anonymous
7/19/2025, 7:00:28 PM No.105958335
making web page for my project with Sphinx. it's pretty good.
Anonymous
7/19/2025, 7:11:26 PM No.105958425
>>105955861
>filtered by stdlib
grim
Anonymous
7/19/2025, 7:32:08 PM No.105958627
>>105958250
nope, its moreso me asking it "hey, so i dont have a single clue how a range-based loop works in c++, could you explain to me in detail how it works, provide examples as well as sources and documentation for your claims?", I'd never use it to do something for me, it's more so like walking rehabilitation (getting help till I git gud in walking) instead of a crutch (needed for walking)
Replies: >>105958665
Anonymous
7/19/2025, 7:36:50 PM No.105958665
>>105958627
That's fine.
You can also include extra context (e.g. I'm writing a compiler, I know C, &c).
Replies: >>105958688
Anonymous
7/19/2025, 7:39:51 PM No.105958688
>>105958665
Oh yeah that's also a good idea, Ill keep that in mind, thanks
Anonymous
7/19/2025, 8:14:21 PM No.105959002
>>105956877
are you also reverse engineering the algorithms and whatnot or just translating the code?
Replies: >>105960239
Anonymous
7/19/2025, 10:05:40 PM No.105960000
>>105949796
I think there's probably a better way if you can install and link against an older version of glibc. E.g. if you compile with --sysroot and point it at a directory with an older libc.so it should correctly pull older symbol versions.
Replies: >>105965242
Anonymous
7/19/2025, 10:29:25 PM No.105960154
>>105932704
The SQLite library handles all locks on the database for you. Work instead with the higher level concept of transactions, and remember that the DB will start a separate transaction for each statement if you don't do so manually.
Most of the time you don't need to do anything special, except when dealing with writes after reads in the one transaction, because two threads (or processes) upgrading transaction type at once is a deadlock risk and SQLite uses very coarse locking.
Anonymous
7/19/2025, 10:39:12 PM No.105960239
1752834277324632_thumb.jpg
1752834277324632_thumb.jpg
md5: 6c2a895ba12d38dce6dde66d34fd508b๐Ÿ”
>>105959002
A little bit of both. Some things could be pasted in directly from Ida and worked fine with minimal fixup, others I had to figure out. A lot of times when the compiler optimized loops it referenced adjacent pieces of data with an offset. Especially if referencing multiple pieces of data and it wanted to increment the same value for all of them. I have to fix this because I cannot guarantee identical data layout. Annoying but not too difficult.

Texture rendering I had to figure out too because they wrote a heavily optimized algorithm that did crazy pointer math on 64-bit values (4 16 bit DOS memory selectors) to draw up to 4 pixels at once. This won't work in modern x64 compilers where pointers are 64 bits themselves of course. Fortunately they had another slower (and simpler) algorithm that looks at each pixel individually so they can handle transparent pixels if the texture tile has any that I was able to re-write and adapt to modern pointers. I just made the optimized function call my adapted slower version too lol. I preserved the 16.16 fixed point math so it looks exactly the same with the textures kind of walking/shifting around like a Playstation 1. Same Z fighting issues of the original game too.
Anonymous
7/19/2025, 11:39:30 PM No.105960698
>>105955285
>>105955368
Thanks anon.
I will post what I come up when I have something to show so ni/g/g/ers can tear it apart or contribute.
Anonymous
7/19/2025, 11:49:52 PM No.105960777
>>105955887
exceptions are fine if you use your own exceptions and avoid all 3rd party exceptions (from libraries and std).
the problem with exceptions is that you now need to be consider noexcept, if you didn't use exceptions you can just disable exceptions and not worry about it (chances are it's a 0% fps difference, but because you can't disable exceptions, you can't benchmark it).
There are a few compatibility issues with exceptions, such as emscripten (running your game on the web with webgl) won't work with exceptions ATM without huge performance issues (but I think there is a proposal for exceptions to be part of wasm).
The best way of using exceptions is to avoid using them for user error (don't throw exceptions that are the user's fault, because that's a normal part of execution, such as like entering a bad number into a text prompt, or a handled "not found" error because the error happens inside a construct, because if you had a handled exception that you want to find the location of, you would need to learn how to filter a exception to only catch a specific exception instead of a frequently raise generic user exception, BUT if you wrote your own exceptions, you could add a stacktrace to the exception so that you would know the location on your debug build).
And in theory if you follow the rule of avoiding exceptions for ALL user errors, exceptions should be very very very rare, and you could in theory just disable exceptions with a macro (for the purpose of emscripten or benchmark for example). And it would work perfectly, until a non-user error happens such as... erm... I don't have any good examples, std::out of range or deadlock / etc, shouldn't be caught (just let your debugger catch it), I question what is a good exception to catch? If a file is not found / invalid UTF8 happens, you shouldn't throw an exception, that's kind of a user error.
It just feels like laziness caused by the fact you can't return an error from a constructor.
Replies: >>105960848
Anonymous
7/19/2025, 11:50:34 PM No.105960785
screenshot-20-07-2025-07:46:51
screenshot-20-07-2025-07:46:51
md5: 8678ef4419805b6c07f80b02cf4da9dd๐Ÿ”
What exactly is the point of this tranny rewrite when the original fortune does this by default?

I swear rust trannies just invent problems to scrape for relevance.
Replies: >>105960845 >>105961090
Anonymous
7/19/2025, 11:58:20 PM No.105960845
>>105960785
a great example of why you only design a new public language to solve a real problem.
Anonymous
7/19/2025, 11:59:06 PM No.105960848
>>105960777
holy... I didn't know std::vector will just ignore your move overload if you forget to add noexcept. Back to C++03's free+malloc for every element on reallocation just because you forgot to add noexcept...
And this could be intentional, would you get a warning from any linters, like PVS-studio for this?
Anonymous
7/20/2025, 12:27:10 AM No.105961090
1743367123271833
1743367123271833
md5: a6ff4b04baed648867d17f37483fd386๐Ÿ”
>>105960785
The rewrite is also subject to historicity as future contentions are unknown to us, leaving only the inverse of retroactive revisionism (time travel)
Anonymous
7/20/2025, 12:54:23 AM No.105961371
Screenshot 2025-07-19 184940
Screenshot 2025-07-19 184940
md5: aebadc88a1e778610b7e9fa72f205196๐Ÿ”
Chatgpt was dropping the ball pretty hard on this so I had to write most of it myself. Very annoying but at least now my CMakeLists.txt looks nicer.
Anonymous
7/20/2025, 3:53:32 AM No.105962783
Screenshot from 2025-07-19 20-49-55
Screenshot from 2025-07-19 20-49-55
md5: 5fae88192be12f742dfb916199e90662๐Ÿ”
>ask ChatGPT to write a small program that changes the hash of jpg and png files
>compile it expecting a trillion errors
>not only it compiles without errors but it works
Color me impressed, if I had asked the same thing to an AI two years ago, it would have given me code that barely made sense, let alone compile.
Of course, it's super bare bones. I want to add a bunch of things, but it saved me so much time writing a prototype. Also, I would still not trust AI to touch any codebase that's remotely complex.
Replies: >>105963100 >>105964533
Anonymous
7/20/2025, 4:32:50 AM No.105963100
>>105962783
Ok, I take back what I said. That only works when running the program for the first time because it uses a different compression algorithm than the original image. Running the program on the same image twice will yield the exact same hash, which is wrong. Oh well, it was an improvement at least.
Anonymous
7/20/2025, 8:32:36 AM No.105964533
>>105962783
As far as png goes, you can append a zero width ancillary chunk (constant bytes) after IDAT header (constant offset)
JPG is a bit tricky, but maybe image viewers/editors don't care what comes after FFD9 if it is at the end of the file? I just tried and it works on my machine.
Unless you explicitly want to change the image pixels, it's pretty easy.
Replies: >>105964618 >>105964632
Anonymous
7/20/2025, 8:50:29 AM No.105964618
>>105964533
>IDAT
meant IHDR
Anonymous
7/20/2025, 8:53:02 AM No.105964632
>>105964533
Some hash checks like 4chan's, ignore metadata and trailing trash at the end of files. The actual core of the file needs to change. And flipping random bits can sometimes corrupt the files.

Anyway, I fixed the issue with the hash not changing after multiple runs by using std::random_device and std::mt19937 instead of std::rand.
Replies: >>105964711 >>105965056
Anonymous
7/20/2025, 9:06:10 AM No.105964711
>>105964632
Oh, I don't think 4chan edits png images in any way.
If you worry about being tracked via archives, your approach is fine for most archives since I haven't seen one using phash.
Copyright wise, I don't think that works.
Many many years ago I recall 4chin detecting the image I was trying to upload even after hitting random pixels and I wouldn't recommend going out of your way to harm poor hiroshimoot.
Also, I would recommend simply extending 4chanx to automatically do that instead of relying on your memory to change the hash before posting.
Replies: >>105964768
Anonymous
7/20/2025, 9:16:26 AM No.105964768
>>105964711
Yeah, it's basically for the archives. I'm not trying to bypass 'blacklisted' images. I'm aware that blacklisted images can be detected even if you drastically and visibly change the image. Maybe Hiro is using AI or an advanced algorithm to filter such uploads, I'm not sure how they're doing it.
Anonymous
7/20/2025, 10:11:37 AM No.105965056
>>105964632
you could probably have seeded rand with random device
Anonymous
7/20/2025, 10:36:04 AM No.105965242
>>105960000
That one sound promising. --sysroot to the older libc but keep -isysroot pointing at /usr/include and then see if I can tard wrangle whatever build system these unruly dependencies are using.
Anonymous
7/20/2025, 11:56:51 AM No.105965646
1716497955000514
1716497955000514
md5: 1790ef13f9b22fdee5b44e258039bae1๐Ÿ”
>removed one if branch
i love premature optimization
n = n*85 + c - '!';
n &= -(i%5>0);
Replies: >>105965710 >>105974788
Anonymous
7/20/2025, 12:00:23 PM No.105965666
Screenshot from 2025-07-20 04-58-14
Screenshot from 2025-07-20 04-58-14
md5: 17dd9e505c3e8e7a6d9f562075d39ab5๐Ÿ”
I'm surprised how easy it was to add an entry to the context menu in the file explorer on Linux. At least on Nemo, you just need to create a .nemo_action file at ~/.local/share/nemo/actions/ and fill it with basic info such as the executable path, label, icon, file extensions, etc.
I thought it was going to be a pain in the ass like on Windows, where you have to mess with the registry, and if you want to handle that shit via code, you'd most likely need a specific library for it.
Anonymous
7/20/2025, 12:09:17 PM No.105965710
>>105965646
>-(bool)
in what situation is this a useful mask? is it to remove the lsb?
Replies: >>105965758
Anonymous
7/20/2025, 12:18:25 PM No.105965758
>>105965710
i%5>0 evaluates to 1 or 0 (for multiples of 5)
-1 is 0xffffffff
so this expression will evaluate to either n&0xffffffff (n is unchanged) or n&0 (n is set to 0)
Replies: >>105965861
Anonymous
7/20/2025, 12:36:13 PM No.105965861
>>105965758
o you are right
smart frogposter
why not multiply by the bool though
Replies: >>105965956
Anonymous
7/20/2025, 12:49:16 PM No.105965956
>>105965861
>why not multiply by the bool though
i could be wrong but i think bitwise operations are faster than arithmetic. Ofcourse this solution requires a bitwise and, and the '-' operator vs just a multiplication so im not sure maybe it is slower..
Replies: >>105965997
Anonymous
7/20/2025, 12:54:41 PM No.105965997
>>105965956
i would assume the compiler could change one into the other if it is faster but maybe not
according to amd imul has a latency of 3 cycles and throughput of 1/3
Anonymous
7/20/2025, 12:56:46 PM No.105966016
Doing some osdev. Wasted several hours last night figuring out why paging wasn't working, was because I OR'ed cr0 with 0x80000000 instead of 0x800000000. Works now though. So far have:
>printf with int, uint, hex, char, and string handling
>terminal scrolling
>keyboard interrupts
>paging
Gonna whip up a basic kmalloc next.
Replies: >>105971601
Anonymous
7/20/2025, 2:11:17 PM No.105966614
I have C++ code for microcontroller that reads serial commands and executes them. Right now I'm using very long switch case for the command execution, but for some more complex serial commands I have to nest another switch case. Is there some conventional tricks to optimize nested switch cases?
Replies: >>105966693 >>105967743 >>105967888 >>105968462
Anonymous
7/20/2025, 2:22:50 PM No.105966693
>>105966614
You could have all the complex commands set certain bits, so you could check for those beforehand and have several flat switch cases rather than single nested one.
Anonymous
7/20/2025, 4:38:16 PM No.105967743
>>105966614
If the compiler is halfway decent that's all just going to get optimized out anyway.
Anonymous
7/20/2025, 4:53:58 PM No.105967888
>>105966614
what's wrong with a few commands having a switch case?
Anonymous
7/20/2025, 5:56:56 PM No.105968462
>>105966614
nested switches are fine and very typical in control systems written in C. you'll see shit like

switch(primary_state) {
case pstate1:
switch(secondary_state) {
case sstate1:
case sstate2:
case sstate3:
}
case pstate2:
case pstate3:
case pstate4:
}


if the content of the second level is too unrelated or getting to nested you can always break it out into a separate function, whether that makes it more readable depends on use case
Replies: >>105968622
Anonymous
7/20/2025, 6:18:31 PM No.105968622
>>105968462
pstate1_sstate1
pstate1_sstate2
...
you can do it with bit twiddling too
Anonymous
7/20/2025, 6:46:34 PM No.105968826
Do I need to install microsoft visual studio just to use msvc with clion?
Replies: >>105968853 >>105968901 >>105968969 >>105984101 >>105986752
Anonymous
7/20/2025, 6:49:19 PM No.105968853
>>105968826
>do i need msvc to use msvc
Anonymous
7/20/2025, 6:55:48 PM No.105968901
>>105968826
oh sweet summer child, you thought you could compile without a microsoft account?
Anonymous
7/20/2025, 7:04:21 PM No.105968969
1727308877973718
1727308877973718
md5: 3b2a0c550401d8c5685d84e985122b37๐Ÿ”
>>105968826
Replies: >>105969063 >>105969072
Anonymous
7/20/2025, 7:08:01 PM No.105968999
>>105956877
Very nice anon. This is about what I'd expected, that the big monolithic do-it-all decompilers are too broken and that you'd have to figure out some stuff directly from the disassembly.

Your track editor looks really sweet btw, judging by the screenshots.

There is also a pc video game I'm dying to RE but I'm not ready yet and it's going to be a mountain of work.
Replies: >>105969865
Anonymous
7/20/2025, 7:14:44 PM No.105969063
>>105968969
Where's the link to it? I couldn't find it.
Replies: >>105969072
Anonymous
7/20/2025, 7:16:05 PM No.105969072
>>105968969
>>105969063
Is it only available in an online installer?
Anonymous
7/20/2025, 8:21:06 PM No.105969642
4chan-cli-client
4chan-cli-client
md5: ba07ae6c96355526eed53d14b3fc241b๐Ÿ”
>>105929300 (OP)
Added text wrapping to my CLI client. Haven't visited this site since the AI boom, but felt like doing this.
God bless you all.
Replies: >>105969665 >>105970577
Anonymous
7/20/2025, 8:22:43 PM No.105969665
>>105969642
how do you view images?
Replies: >>105969690
Anonymous
7/20/2025, 8:25:03 PM No.105969690
>>105969665
I usually don't care about images. To be honest, I don't care much about this site anymore, I just remembered about this project and wanted to improve it.
I do have a shortcut for opening links of my terminal in a browser, if I am really curious. Most modern terminals (i.e. that use electron) have this, but I had to get a bit more creative to fit my taste in ST.
Anonymous
7/20/2025, 8:43:31 PM No.105969865
>>105968999
Yeh even Ida barfed on some things like the huge textured polygon rendering functions and it even completely skipped a jump table on one (fortunately pretty simple) function for some reason.
Anonymous
7/20/2025, 8:47:42 PM No.105969913
https://youtu.be/Pa36B1T__ng?t=686

>AI can already generate code faster and better than humans
Replies: >>105971213
Anonymous
7/20/2025, 8:49:02 PM No.105969930
Screenshot from 2025-07-20 20-45-43
Screenshot from 2025-07-20 20-45-43
md5: 45d8e839526fabc4273aa0ad49005bc5๐Ÿ”
Do you guys think I'll get flagged with this or am I safe?
Replies: >>105970292 >>105970371 >>105970606
Anonymous
7/20/2025, 9:22:49 PM No.105970292
>>105969930
>deletes all company files
Anonymous
7/20/2025, 9:29:52 PM No.105970371
>>105969930
Use a Poisson instead for extra realism.
Anonymous
7/20/2025, 9:50:02 PM No.105970577
>>105969642
nice!
Anonymous
7/20/2025, 9:53:00 PM No.105970606
>>105969930
why not just play some vidya instead
Replies: >>105970852
Anonymous
7/20/2025, 10:13:17 PM No.105970852
>>105970606
This is a macro for vidya, just wondering if it could get flagged by anti-macro systems.
I doubt they have system that good, but just to be sure I wanted to know if 60-100ms long click and 100-200ms delay between each clicks is enough to seem human
Replies: >>105971010 >>105971216 >>105973168
Anonymous
7/20/2025, 10:26:20 PM No.105971010
>>105970852
you should record your inputs while playing, plot the data and do stats
Anonymous
7/20/2025, 10:45:32 PM No.105971213
>>105969913
just don't let it touch prod >>105962669
Anonymous
7/20/2025, 10:46:01 PM No.105971216
>>105970852
>just wondering if it could get flagged by anti-macro systems
theoretically yes, practically probably no
they're mostly keener on going after people who abuse the cash shop in many games, and non-aimbot-assisted macros are low on their list of targets, especially as they don't necessarily help very much

if you are worried, do simple binomial delays by adding three uniform random numbers together and sleeping for that much
Anonymous
7/20/2025, 11:29:33 PM No.105971601
1752895344671908
1752895344671908
md5: 85edbfaeea103f4b4cfa9c4210ec72ef๐Ÿ”
>>105966016
When you can draw bitmaps please port satania-buddy to your os
Anonymous
7/20/2025, 11:36:19 PM No.105971641
Porting Satanichia-chan to MacOS!
Anonymous
7/20/2025, 11:42:11 PM No.105971682
office-chimp
office-chimp
md5: a0e8f60f4487cf0024e190a066d05729๐Ÿ”
Hello anons
I'd like to implement a plain-text file config for my current project, in C++. How should I approach parsing? I'm thinking about reading the file line by line, then storing these into a string array/vector, for further processing (e.g. substring search). But I'm mostly certain that it is not very practical. Any input is appreciated!
Replies: >>105971720 >>105971936 >>105972144 >>105972163
Anonymous
7/20/2025, 11:46:25 PM No.105971720
>>105971682
LALR parser generator or regex or key-value pairs and a separator or JSON/XML and a parser made by someone else.
These are your options.
Replies: >>105972832
Anonymous
7/21/2025, 12:07:54 AM No.105971936
>>105971682
Just use JSON or Yaml.
Replies: >>105972832
Anonymous
7/21/2025, 12:30:37 AM No.105972144
32d251a840804867b9c6d3adf953d463
32d251a840804867b9c6d3adf953d463
md5: 833aa61f0dd3b1c80d02da860782dc99๐Ÿ”
>>105971682
while(fscanf(file, "%s = %d\n", keys[key++], values[value++]))
Replies: >>105972832 >>105975395
Anonymous
7/21/2025, 12:32:07 AM No.105972163
>>105971682
I just use a basic struct + vector + fstream all wrapping in a "Settings" class. Super simple, but just works for storing stuff like program X/ coordinates, window state, etc.
Replies: >>105972832
Anonymous
7/21/2025, 12:43:20 AM No.105972275
1736305127387266
1736305127387266
md5: fa72de0d56755e7ff835419bdaf67032๐Ÿ”
What is the true barrier to being "good" at programming? Hard limit IQ? Math ability? Rote memorization of esoteric CS topics?
Replies: >>105972395 >>105972416 >>105972924
Anonymous
7/21/2025, 12:56:12 AM No.105972395
>>105972275
IQ
Replies: >>105972438
Anonymous
7/21/2025, 12:58:25 AM No.105972416
>>105972275
Not asking retarded questions in forums instead of programming.
Replies: >>105972438
Anonymous
7/21/2025, 1:00:29 AM No.105972438
>>105972395
Thanks.
>>105972416
Mean.
Anonymous
7/21/2025, 1:11:54 AM No.105972533
Screenshot 2025-07-20 190726
Screenshot 2025-07-20 190726
md5: 25b461dc9908f039f04969b646004a48๐Ÿ”
Fucking FINALLY found a decent library to do graphics in Python. Decent modern-style API with a lot of QoL features. Platform independent too.
Replies: >>105972807
Anonymous
7/21/2025, 1:42:23 AM No.105972807
1743849033621410
1743849033621410
md5: b031a870e3b87b4baeed0f8423519d39๐Ÿ”
>>105972533
>Constructing a hash table and passing it with render settings for each frame
Anonymous
7/21/2025, 1:44:44 AM No.105972832
ogey
ogey
md5: 280357550283c21752025dfbcae5c0cd๐Ÿ”
>>105971720
>>105971936
>>105972144
>>105972163
Alright anons, lots of starting points. Thanks, I'll check each one!
Anonymous
7/21/2025, 1:52:19 AM No.105972900
Suppose I have a class that allocates memory dynamically. I want to implement an assignment operator, but before I can do that, the class object that I want to write to must be cleared. Is it okay if I call the destructor within the operator function?
Anonymous
7/21/2025, 1:54:03 AM No.105972924
1720627668375686
1720627668375686
md5: 7ab90512a4ba3fe94f05ae484060e44a๐Ÿ”
>>105972275
>Rote memorization of esoteric CS topics?
Rote memorize until the isomorphisms between topics are known, then forget everything
Anonymous
7/21/2025, 1:58:16 AM No.105972957
1752947680196335
1752947680196335
md5: 716894d3db556ffb04f8a61147870ea8๐Ÿ”
Lads, I'm thinking of editing the source code of xdg-desktop-portal to customize the GTK's file picker. How much of a bad idea is that?
Anonymous
7/21/2025, 2:31:17 AM No.105973168
>>105970852
Use a standard normal distribution, not an uniform distribution.
Replies: >>105973540
Anonymous
7/21/2025, 2:33:21 AM No.105973182
50120279
50120279
md5: a43311cccecb3fb15c515cc00f38b547๐Ÿ”
What C/C++ library should I use to read pixels that are on the screen? (windows/linux)
Replies: >>105973549 >>105973700
Anonymous
7/21/2025, 3:34:48 AM No.105973540
>>105973168
>negative sleep
Anonymous
7/21/2025, 3:36:13 AM No.105973549
>>105973182
open("/dev/fb0")
Anonymous
7/21/2025, 4:02:44 AM No.105973700
>>105973182
YOU CANNOT DO THAT IT IS UNSECURE
MUH WAYLAND AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
Anonymous
7/21/2025, 6:44:32 AM No.105974588
175225730101849024
175225730101849024
md5: c7b33a129d05f94ea21b32d9f03e17d5๐Ÿ”
Saw this in a random video

Do vim users really need macros and find-replace just to rename a function or variable?
In visual studio itโ€™s just ctrl-r,r and it safely renames everything everywhere, even fixes filenames and namespaces
Anonymous
7/21/2025, 7:11:36 AM No.105974719
file
file
md5: 00f70c6ff938219707ef4ca5db618fd8๐Ÿ”
Is this bad practice..?
Replies: >>105974740 >>105975411
Anonymous
7/21/2025, 7:14:36 AM No.105974740
>>105974719
The practice is fine

Manually checking for 0 is probably faster but unless this runs 1000 times per second it doesnt matter
If 0 being there is unexpected then the error should be logged somehow, but thatโ€™s for prosuction code
(And dividing by 0 should give inf not 0)
Anonymous
7/21/2025, 7:23:22 AM No.105974788
>>105965646
Just use a ternary to infer cmov
Replies: >>105978352
Anonymous
7/21/2025, 8:25:00 AM No.105975116
file
file
md5: f952458aa09aeddda85947e38a0dfc86๐Ÿ”
Two years ago, I started working on a lottery number generator that used quantum number generation. Back then, I had finished it pretty quickly but it was hacky and there were problems that got in the way of true randomness like the largest integer with 7 bits being 127, and I was adding min value to the generated integer which basically in effect shifted the generated integer to +1. And there were many other problems to it, and the program was crude.

But now I decided to work on it some more after along hiatus and I've finally achieved true quantum randomness to lottery number generation.
Anonymous
7/21/2025, 8:50:07 AM No.105975274
I want to get a better understanding of pointers and memory management. I still feel so retarded looking at this stuff.
Like yes, I understand that pointers just point to a spot in memory. I understand you can use these pointers to pass arguments by reference and thus manipulate the original data that is being pointed to. I still feel like theres a lot more I don't get.
Replies: >>105975424 >>105975442 >>105975583
Anonymous
7/21/2025, 9:15:27 AM No.105975395
>>105972144
>keys[key++], values[value++]
>not setting key = keys, value = values
Anonymous
7/21/2025, 9:17:50 AM No.105975411
>>105974719
you should annotate it using paramspec, and also have a default positional argument to replace 0, e.g. with None or a bespoke constant
Anonymous
7/21/2025, 9:19:35 AM No.105975424
>>105975274
>I still feel like theres a lot more I don't get.
there's not unless you mean C autism that doesn't apply to real compilers on mainstream hardware (provenance)
you should make sure you understand alignment and pointer tagging though
Replies: >>105975442 >>105975505
Anonymous
7/21/2025, 9:22:39 AM No.105975442
>>105975274
>>105975424
i mean there is more to memory management like understanding virtual memory, paging and so on, caching, different systems of memory management (like the autist who never shuts up about arenas)
Replies: >>105975487
Anonymous
7/21/2025, 9:25:52 AM No.105975467
I am more than decent in Python and started learning C# just for fun I guess and it immediately feels like home. I know its a substandard microshit language but there is an incredibly satisfying feeling of OOP clicking together, coming from Python where it's implemented in a retarded fucking way.

What language does /g/ recommend if I actually liked C#? (I dont like that its so closely tied to Microshit)
Replies: >>105975583
Anonymous
7/21/2025, 9:29:14 AM No.105975487
>>105975442
>like understanding virtual memory, paging and so on, caching
This kind of stuff is usually handled by the OS, my niggy. Unless you're writing a fairly complex program, you typically don't need to worry too much about memory management, even in C/C++. And by the time you're working on something that requires that level of control, you'll likely have developed a natural understanding of how it works.
Replies: >>105975515
Anonymous
7/21/2025, 9:32:15 AM No.105975505
1753061000234944
1753061000234944
md5: 883fe264fc562dfdbe82109db37e2d43๐Ÿ”
>>105975424
This is something I both love and hate about programming.
I have never even heard of either of those terms. Maybe its a consequence of being entirely self-taught. While its cool that I feel like theres always something new to learn, I never understand when I'm missing some kind of critical information that will lead to my suffering and thats made me very unconfident in my abilities and thus has made me program less and it becomes a vicious cycle.
I don't know what to do besides stop being a coward and actually taking time to write code despite knowing it'l probably be bad and there are tons of abstract concepts that I don't understand
Replies: >>105975542
Anonymous
7/21/2025, 9:33:20 AM No.105975515
>>105975487
this is just bait written by you, the memory autist, so that you, the memory autist can reply to it about how important it is for performance
Anonymous
7/21/2025, 9:36:51 AM No.105975542
>>105975505
alignment isnt abstract, its just the idea that sometimes you expect pointers to not be every byte, but every 2 bytes or so on (like even byte addresses), or every, 4, 8, etc
pointer tagging relates to this but also the idea that you don't really need 2^64 bytes (64 for 64 bit address on a 64 bit pc) on consumer hardware currently, so you can use bitwise operations to pack and unpack the real pointer along with extra data in those bits you won't use
Replies: >>105975595
Anonymous
7/21/2025, 9:43:11 AM No.105975583
>>105975467
Java?

>>105975274
Virtual memory, caching, prefetching and access patterns, alignment and packing, non-temporal access, atomics and atomic memory ordering, false sharing and cache coherence
Just read this honestly https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
Anonymous
7/21/2025, 9:45:23 AM No.105975595
1742186390156660
1742186390156660
md5: 8809069eb1497daea3d91fee497bca6c๐Ÿ”
>>105975542
i guess its not literally 'abstract' but I never learned anything to do with data sizes and bytes other than the basic information about 8 bits being a byte and various data type sizes like a char being 1 byte and a long being 8. I have barely scratched the surface of bitwise operations.
Theres just so much to learn and so many unknowns that I never think of.
Replies: >>105976431
Anonymous
7/21/2025, 9:58:20 AM No.105975673
Memory autist, you're putting the cart before the horse.
First, write a few useful programs, then start worrying about all this crap.
Anonymous
7/21/2025, 11:46:28 AM No.105976182
Screenshot 2025-07-21 at 12-45-48 Show HN X11 desktop widget that shows location of your network peers on a map Hacker News
what did the silicon valley tranny mean by this?
Replies: >>105976253 >>105977988
Anonymous
7/21/2025, 11:59:43 AM No.105976253
>>105976182
Looks like straight facts to me
Replies: >>105976438
Anonymous
7/21/2025, 12:29:34 PM No.105976431
>>105975595
My college course had very high level math courses, and low level C and operating system courses and we still didnโ€™t learn much about bitwise operations besides xor forming an algebra or whatever
You can learn everything about them in five minutes if you really want to
And data sizes differ between languages so you canโ€™t universally learn about them.
sage
7/21/2025, 12:30:06 PM No.105976438
>>105976253
>popen bad because muh cafes and typewriters
Replies: >>105976446
Anonymous
7/21/2025, 12:31:38 PM No.105976446
>>105976438
more like poopen lmao
Anonymous
7/21/2025, 1:03:49 PM No.105976627
What do the Cursor devs have against Grok?

Fuckers should just build it in by now, everyone is using it already anyway.
Anonymous
7/21/2025, 2:07:55 PM No.105977010
>>105930910
kino, was wondering where i recognized the splash before whiplash showed up
Anonymous
7/21/2025, 2:10:57 PM No.105977031
>>105935306
explain why it's wrong
we do trunk based development with release branches

hate git, wish we had stayed with svn
Anonymous
7/21/2025, 2:18:59 PM No.105977093
>>105938643
Whatever works based on the insertion/removal logic you need
Hand out shared pointers or weak pointers to handle reallocation or deletion
Anonymous
7/21/2025, 4:05:55 PM No.105977813
VID_20250721_052500_thumb.jpg
VID_20250721_052500_thumb.jpg
md5: 03c6a4a3147e8e75e71f2bdacdf1601a๐Ÿ”
Made my ick editor support multi-line selection. Thoughts?
Replies: >>105978135 >>105978153
Anonymous
7/21/2025, 4:29:01 PM No.105977988
>>105976182
>seethes at the idea of old white men programming in C 50 years ago
>deconstructs their work and kick them while their down
>but pretends it's an in-group joke that only enlightened devs can understand in order to hide his slyness and pettiness
Anonymous
7/21/2025, 4:45:51 PM No.105978097
Still working on the primes, bit more complicated than I thought. Actually I switched to doing some basic ascii text generation
Anonymous
7/21/2025, 4:49:09 PM No.105978129
1711811626588887
1711811626588887
md5: ad5101ab9fd683ffbbd6ff0a3d47fadd๐Ÿ”
in gdb is it possible to break when the progam executes a particular binary file?
I know I can do "catch exec", but I don't know how to check the filename and continue if it doesn't match.
Replies: >>105978224 >>105979025 >>105988095
Anonymous
7/21/2025, 4:49:41 PM No.105978135
>>105977813
is it available on steam deck?
Anonymous
7/21/2025, 4:52:20 PM No.105978153
1741813202128180
1741813202128180
md5: a658fce20da289e83185ba7e1360a7fd๐Ÿ”
>>105977813
How about multi-line rotate where you can swap multi-line blocks for b=2 and shift/rotate b>2 blocks, e.g. with multi-line selections on x, y, z in f(x, y, z) a single rotation produces f(z, x, y), it would be useful for swapping if-else blocks around
Anonymous
7/21/2025, 5:01:27 PM No.105978224
a42ce8301db74766ed86f2ff4a1abd8a
a42ce8301db74766ed86f2ff4a1abd8a
md5: c049591adffd50350f5a599ac183df11๐Ÿ”
>>105978129
You can apparently use conditional breakpoints like
(gdb) break f() if strcmp($name, "/bin/ls") == 0
not sure the exact syntax
Replies: >>105978864
Anonymous
7/21/2025, 5:03:37 PM No.105978242
chad
chad
md5: 866c2208ed2e7a7e7db68efabddbe651๐Ÿ”
$ git commit
Aborting commit due to empty commit message.
$ git commit -m .
[master (root-commit) ca7692f] .
1 file changed, 245 insertions(+), 0 deletions(-)
Anonymous
7/21/2025, 5:18:51 PM No.105978352
>>105974788
you lost me at ternary
Replies: >>105978414
Anonymous
7/21/2025, 5:27:46 PM No.105978414
1743567458416170
1743567458416170
md5: bf27ac1757fdef60e2c0383285fdba21๐Ÿ”
>>105978352
https://kristerw.github.io/2022/05/24/branchless/
I didn't even know autobranchless was an optimization step
Anonymous
7/21/2025, 5:31:20 PM No.105978449
6aef9da4aa2fe5a1beca25c6
6aef9da4aa2fe5a1beca25c6
md5: abf5e044b57d72d5b15b6f19861cc658๐Ÿ”
Haskell sweeping all state under the rug only to keep the "pure FP" label is fucking stupid.

If I myself need so many minutes to understand the State or IO monads, imagine a normal programmer.

If things are so complex to begin with they should never be used in production. Ever. In itself complexity is a legit reason to dump a technology. What use is code that only a few can understand? Production code should be workable even by people who come from other languages.

If mutation is so badly needed, maybe you should just build it into the language, instead of resorting to obscure ways of keeping the functions pure while looking procedural?

Fuck Haskell and fuck pure FP. It was never the solution to anything.
Replies: >>105978637 >>105978904 >>105979362 >>105979454 >>105979458 >>105981174
Anonymous
7/21/2025, 5:34:10 PM No.105978478
>>105929512
why are half of these fizzbuzz or two sum or babby tier "hello world" shit
Replies: >>105980209
Anonymous
7/21/2025, 5:48:15 PM No.105978637
1751813015395827
1751813015395827
md5: 4fe46e9927644837014af8b5bf71398f๐Ÿ”
>>105978449
It's a problem even with mutability, as an expression like f(x) + g(x) + x can't be freely reordered by the compiler when it's unknown if f or g have side effects. Ideally the most expensive calls are done first to reduce later register pressure
Replies: >>105981813
Anonymous
7/21/2025, 6:13:19 PM No.105978864
neutral-pepe
neutral-pepe
md5: db35bd054d1bbb1af531e93b9db00ef0๐Ÿ”
>>105978224
but how do I get the name of the executable?
And how do I do that with an expression?
I don't know how to put the result of gdb commands into the conditional, so I can't use ANY of the gdb commands to get the name...
Replies: >>105979025 >>105979563
Anonymous
7/21/2025, 6:17:03 PM No.105978904
>>105978449
>If I myself need so many minutes to understand the State or IO monads, imagine a normal programmer.
what kind of programmer are you, HUH?
You think you're better than me, don't you?
Tell me then, what makes you so special?
Replies: >>105980252
Anonymous
7/21/2025, 6:28:22 PM No.105979025
>>105978864
If the program name is unknown the first argument to exec should be in $rdi on x86-64, I believe you'll need this information first before being able to check invocations of exec for specific programs like you wrote in >>105978129 (you could use gdb regexes if some part of the program name is known, or just use strace and grep)
Replies: >>105980168
Anonymous
7/21/2025, 6:47:25 PM No.105979235
>>105931623
now THAT is zesty
Good work, I love seeing this mega comfy accomplishment. Any plans to celebrate?
Replies: >>105980378
Anonymous
7/21/2025, 6:56:56 PM No.105979362
>>105978449
>If I myself need so many minutes to understand the State or IO monads, imagine a normal programmer.
This is called LEARNING
Once you have LEARNED it seems really simple
Replies: >>105980430
Anonymous
7/21/2025, 7:06:26 PM No.105979454
>>105978449
Filtered.
Anonymous
7/21/2025, 7:06:49 PM No.105979458
>>105978449
what part of
Monad m => m a -> (a -> m b) -> m b
do you not understand
Anonymous
7/21/2025, 7:15:34 PM No.105979563
>>105978864
>gdb
Amazing how Linux still doesn't have a decent debugger after all these years
Replies: >>105980126 >>105980148
Anonymous
7/21/2025, 8:13:25 PM No.105980126
>>105979563
printf is all you need
Anonymous
7/21/2025, 8:16:23 PM No.105980148
>>105979563
GDB is a decent debugger, just read the 60,000 info pages and you'll be good to go.
Anonymous
7/21/2025, 8:18:51 PM No.105980168
>>105979025
I am on 32bit x86.
I know the name, I just didn't know how to write the conditional.
But I have made some progress.
I have managed to break in main and get the name like so:
print **(char***)($bp+12)
But now when I try it in the conditional, the $bp turns out to be invalid...

As for the exec business, I was using commands like "x/10x $sp" to get the name. But I didn't know how to put that in the if statement. The commands must not work as expressions, so I can't use them here. I must use the c functions...
But I'm not sure if strcmp will work. It keeps saying "No symbol table is loaded. Use the "file" command." when I try to use it...
Anonymous
7/21/2025, 8:24:48 PM No.105980209
>>105978478
challenge 0 - identifying joke images
Anonymous
7/21/2025, 8:29:19 PM No.105980252
fab7b2b4450c66ef978cc7005133db64
fab7b2b4450c66ef978cc7005133db64
md5: 89cfdae66ca9172e999443ba406f37ad๐Ÿ”
>>105978904
I am a programmer that loves simple things.
If I don't grasp a new concept in a matter of seconds then I immediately know there is no point in learning it. Complex stuff is doomed to fail.
Call it good taste if you wish.
Replies: >>105980551 >>105981725
Anonymous
7/21/2025, 8:40:14 PM No.105980378
>>105979235
I'll celebrate by plowing ahead. I am very pleased though, textured software rendering was probably the hardest set of functions to decompile in this entire project.
Anonymous
7/21/2025, 8:45:36 PM No.105980430
>>105979362
I tried to learn them but failed to do so in an acceptable time frame. Thus my programmatic sixth-sense tells me they are unworthy of my time or anybody's time for that matter.

In Haskell there are good monads like `Maybe` and bad monads like `State`, `IO` and the like. These ones are atrocious. They hide stuff that should be apparent in every program. Haskell fags try to sell the idea that you can shoehorn an arbitrary procedural program into a set of pure FP calls. Which is stupid. Procedural contains pure FP and not otherwise. Hence the pulling of everything state under the rug. It is a hack which doesn't solve the needs of the programmers.
Replies: >>105980740 >>105980884 >>105982303
Anonymous
7/21/2025, 8:59:00 PM No.105980551
>>105980252
Does that apply to maths too?
Some complex concepts are necessary.
The software is still useful.
The binaries/src for useful software will probably always be around somewhere to use.
Plus, learning concepts is surely good for improving the mind, right?

Why do you post this cute plush?
Anonymous
7/21/2025, 9:20:25 PM No.105980740
>>105980430
What should be the output of
main = head [print 0, print 1]
be?
Replies: >>105980907 >>105981162
Anonymous
7/21/2025, 9:36:41 PM No.105980884
>>105980430
>an acceptable time frame
Arbitrarily decided by you?
Also you know very little about non-functional languages if you think they're all close to the machine and "pull nothing under the rug". Modern CPUs are not "procedural"
Replies: >>105980980
Anonymous
7/21/2025, 9:39:21 PM No.105980907
>>105980740
The result of the first `print 0` call?
Which could be the return code (0=OK, -1 = some IO error)
Replies: >>105980936
Anonymous
7/21/2025, 9:41:40 PM No.105980936
>>105980907
>the output
Anonymous
7/21/2025, 9:46:14 PM No.105980980
>>105980884
Would you waste your time in learning the contrivances of a good for nothing language? I prefer to switch to a sane language.

Out of the most popular functional languages only Haskell is "pure FP" retarded. Scala, F#, Clojure, ... all of them are multi-paradigm and allow mutation, while encouraging FP.

Did you know the first version of Haskell couldn't even do console I/O? Because it did not fit the "purity"! Yes, you have read it right: Haskell v1 couldn't do a simple hello world. And in modern Haskell you are required to grok the path of functors, monoids, monads, effects, the do block,... a hello world program is the final boss. I don't have like 10 days to learn all this. Call me a pragmatist!
Replies: >>105980992
Anonymous
7/21/2025, 9:47:51 PM No.105980992
>>105980980
Did it take you 10 days to learn all of procedural programming? Haskell is better than all of those because it is pure FP. Monads, applicatives, arrows, comonads etc are one of the best parts of Haskell. You are simply an idiot.
Replies: >>105981062 >>105981248
Anonymous
7/21/2025, 9:54:24 PM No.105981062
>>105980992
When you know Haskell, monads do not get in your way, in the same way that procedures don't get in your way in C. You just understand you are building bigger and more complex procedures with expressions and not executing them, until you have built main. It's not even that radically different from C.
Haskell has been called the best imperative language because you can build custom control structures, layer monads on top of IO or state, separate out IO into distinct effects that are safer and can be mocked, use less powerful abstractions to introspect more, etc
Replies: >>105981237
Anonymous
7/21/2025, 10:06:46 PM No.105981162
>>105980740
0 1
Replies: >>105981432 >>105982176
Anonymous
7/21/2025, 10:07:52 PM No.105981174
>>105978449
you might like roc , but it's still early days yet.
https://www.roc-lang.org/functional
With the bonus of having a fun gimmick for functionality/ library grouping
https://www.roc-lang.org/platforms
Anonymous
7/21/2025, 10:15:35 PM No.105981237
>>105981062
>Haskell has been called the best imperative language
It will never be an imperative language. It is a transvestite.
Anonymous
7/21/2025, 10:16:47 PM No.105981248
>>105980992
>Did it take you 10 days to learn all of procedural programming
No
Anonymous
7/21/2025, 10:18:43 PM No.105981266
>loops are exclusive to my shitty paradigm
wwwwwwww
Anonymous
7/21/2025, 10:32:07 PM No.105981366
how do you do that thing in C++ where you can construct an object in a different location through function calls?

Like if I have a class that contains a vector and I want to push a new element to it, I can create a function on that class to 'addElement' then wherever I call that function I can 'create' the object locally and pass it in, except it doesn't actually get created until the addElement function is called and that function calls push_back, only then is the constructor actually called and the element is created in place inside of the vector

class C {
addElement(Element &element) { ... };

vetor<Element> elements;
};

void foo() {
Element element(...);

c.addElement(element);
}


something to do with std::move? thought I don't think that's right because if your element cannot be moved then this doesn't work right?
Replies: >>105981404 >>105981407 >>105981418
Anonymous
7/21/2025, 10:36:22 PM No.105981404
>>105981366
you need a raw buffer of some aliasable type like char, std::byte, etc, and to either use placement new or construct_at or something like that.
// this needs aligning too
char bytes[sizeof(Element)];
Element* element = new(bytes) Element(...); // <- placement new
...
element->~Element(); // <- manual destructor
Anonymous
7/21/2025, 10:36:44 PM No.105981407
>>105981366
use case?
Anonymous
7/21/2025, 10:38:50 PM No.105981418
>>105981366
std::move and elements.emplace_back?

Or something with placement new operator?
>new (address) (Element)(args)
Anonymous
7/21/2025, 10:40:21 PM No.105981432
1748844285118840_thumb.jpg
1748844285118840_thumb.jpg
md5: 32b59d330f0ac7c0f6e520b0c382d7e0๐Ÿ”
>>105981162
What if print 1 was non-terminating? Does church-rosser suggests a program with a valid terminating case should always be reachable?
Anonymous
7/21/2025, 11:11:51 PM No.105981694
i'm vibe coding a sidebar with customizable widgets to "fill" the extra space when using librewolf at the default window size (helps with fingerprinting)
developed mostly php my whole life
AI really helped me bridge my knowledge and build an app
ty gaben
Replies: >>105981701
Anonymous
7/21/2025, 11:12:58 PM No.105981701
>>105981694
>a C# sidebar*
Anonymous
7/21/2025, 11:16:24 PM No.105981725
>>105980252
>If I don't grasp a new concept in a matter of seconds then I immediately know there is no point in learning it. Complex stuff is doomed to fail.
You're pissing your life away. Some concepts take longer to grasp. (They're fundamentally simple, but the intuitions are sophisticated as to why they should be done in one way and not another.)
If you only stick to things that you can understand immediately, you're running below your true mental ability.
Replies: >>105982402
Anonymous
7/21/2025, 11:27:39 PM No.105981813
>>105978637
>Ideally the most expensive calls are done first to reduce later register pressure
this doesn't make any sense. how expensive a function is doesn't affect how the register allocation is done by the caller
Replies: >>105982042
Anonymous
7/21/2025, 11:30:46 PM No.105981848
>Year of Our Lord Jesus 2025
>Applicative and traversable functors (aside from particular instances) a rarity outside of Haskell
Anonymous
7/21/2025, 11:35:08 PM No.105981888
we still have retards getting filtered by immutability, it'll be awhile yet.
Replies: >>105982420
Anonymous
7/21/2025, 11:39:13 PM No.105981926
Well at least maybe there are specific applicatives in other languag
>https://en.cppreference.com/w/cpp/ranges/zip_view.html
>https://en.cppreference.com/w/cpp/ranges/zip_transform_view.html
>When calling with no argument, views::zip() is expression-equivalent to auto(views::empty<std::tuple<>>).
>When calling with one argument f, let FD be std::decay_t<decltype(f)>, if: ... then views::zip_transform(f) is expression-equivalent to ((void)f, auto(views::empty<std::decay_t<std::invoke_result_t<FD&>>>)).
>not repeat_view
oh no no no no
Replies: >>105982025
Anonymous
7/21/2025, 11:49:11 PM No.105982025
>>105981926
somehow they maded to NOT fuck this up for cartesian product which is honestly way more surprising because you expect a democratic committee like C++ to constantly make the worst possible choice
Replies: >>105982034
Anonymous
7/21/2025, 11:50:12 PM No.105982034
>>105982025
>maded
managed
Anonymous
7/21/2025, 11:51:33 PM No.105982042
1729005524781250
1729005524781250
md5: 635ad19091a4136f45fae59c8aec20ec๐Ÿ”
>>105981813
Consider two cases
f(x) + y
t0 = x
t1 = f(t0)
t2 = y
t3 = t1 + t2

y + f(x)
t0 = y
t1 = x
t2 = f(t1)
t3 = t0 + t2
clearly in the second case t0 isn't free during the evaluation of x or f, so ideally the more expensive half of the expression (in terms of registers) is done first. This is true when there's no caller/callee convention and the only aim is to avoid spilling
Replies: >>105982184
Anonymous
7/22/2025, 12:08:59 AM No.105982176
>>105981162
That breaks lazy semantics.
Anonymous
7/22/2025, 12:10:18 AM No.105982184
>>105982042
ok I see what you mean, but the compiler can only use unsued registers for the function f, if f only called once. otherwise if it's called more than once, it's unlikely that the 2 or more callers will have the same set of unused regiters and in that case if must follow a calling convention concerning who (callee or caller) needs to save which registers
Anonymous
7/22/2025, 12:21:32 AM No.105982303
>>105980430
funny that you got filtered by State, which is completely pure, for being magical when "State s a" is literally just a thin wrapper around (s -> (s, a)). There's literally nothing bad or evil about it.
Replies: >>105982493
Anonymous
7/22/2025, 12:31:26 AM No.105982402
>>105981725
>Some concepts take longer to grasp
Some concepts take a long time to learn but are straightforward. Others take a long time because they are complex. Do not mix the two. The latter are a time grab. In professional programming you avoid these like the plague. Technologies exist to serve the programmer and not otherwise.
Replies: >>105982421
Anonymous
7/22/2025, 12:33:00 AM No.105982420
>>105981888
Immutability started to be shilled everywhere because retards couldn't into concurrency anymore.
Anonymous
7/22/2025, 12:33:06 AM No.105982421
>>105982402
nta
1. it is straightforward
2. professional programming is not about being beginner friendly
Replies: >>105982530
Anonymous
7/22/2025, 12:41:39 AM No.105982493
>>105982303
I get the type. But the problem is the code it usually gets called from: completely obscure, hides the side effect mechanism (context) instead of making it explicit to the reader, and to add insult to injury it tries to look procedural. This is sadly how this type was meant to be used.
Replies: >>105983316
Anonymous
7/22/2025, 12:46:35 AM No.105982530
>>105982421
>2. professional programming is not about being beginner friendly
Yes it is, because maintenance makes for the most work in the life time of a project, and companies want code to be serviceable by cheap new hires.
Projects that only one guy understands do not live long.
Replies: >>105982558
Anonymous
7/22/2025, 12:49:45 AM No.105982558
>>105982530
What a fucking LARP, imagine stating something so completely false. Yeah there are tons of beginner jobs, nobody is hiring anyone experienced!
Anonymous
7/22/2025, 12:53:19 AM No.105982605
You know I really wish the language I had learned was completely redesigned for beginners so that
1. 0 resources are spent on improving the language for the non beginners who actually use it
2. There's 0 point fucking using it because of 1
3. There's 0 point fucking learning it because of 2
This is like when ESLs complain about English being difficult to learn as if it's a bad thing, like other people's native language has to be some fucking open skill to them
Anonymous
7/22/2025, 1:36:19 AM No.105982966
ST monad bros...
Replies: >>105983062
Anonymous
7/22/2025, 1:50:05 AM No.105983062
>>105982966
uhh you can't just heckin mutate
Replies: >>105983345
Anonymous
7/22/2025, 2:01:50 AM No.105983155
>>105938643
It heavily depends on the specific use case, acceptable limitations and necessary guarantees.
Anonymous
7/22/2025, 2:22:41 AM No.105983316
>>105982493
>hides the side effect mechanism (context) instead of making it explicit to the reader
this makes no sense, functions using State are typed as State, the static type makes the effect explicit. If you care about implicit effects you should be whining about every other language that does NOT mark them.
Anonymous
7/22/2025, 2:27:11 AM No.105983345
>>105983062
import Control.Monad.ST
import Data.STRef

for start cont inc body = newSTRef start >>= go where
go y = do
i <- readSTRef y
if not (cont i) then return ()
else do
body i
modifySTRef' y inc
go y

fvark = runST $ do
n <- newSTRef 0
for (0) (< 100) (+ 1) $ \i -> do
modifySTRef' n (+ i)
readSTRef n

main = print fvark
Replies: >>105985330
Anonymous
7/22/2025, 2:47:00 AM No.105983439
return sizeof int; // ERROR
return sizeof(int); // NO ERROR
Replies: >>105990657
Anonymous
7/22/2025, 2:58:03 AM No.105983516
hello sir, can compiler string pooling be applied to constants other than string literals?specifically gcc/clang
int main(void)
{
/* char[] */
printf("%p %p\n", "string", "string");
/* int[] */
static const int a[] = {1,2,3};
static const int b[] = {1,2,3};
printf("%p %p\n", a, b);
}
Replies: >>105983626
Anonymous
7/22/2025, 3:15:10 AM No.105983626
>>105983516
-fmerge-all-constants
Anonymous
7/22/2025, 4:35:53 AM No.105984101
>>105968826
Ignore the toolset anon, that's only for python stuff.
You NEED visual studio because clion isn't a JIT debugger.
If your code crashes without running in a debugger, it usually triggers the JIT debugger, which is visual studios.
I have tried jit debugger alternatives but they open without dialog (AKA, if a random program crashes, it will open windbg or something, without asking, ONLY visual studio will ask before opening).
BUT the jit debugger doesn't happen during an abort on the release runtime, which is usually caused by an assert or uncaught C++ exception, it gets sent to WER (somewhere random in your files a mini crash dump is stored but it gets cleared when you restart your PC I think).
The release runtime is still worth debugging since you can read a partial stacktrace (RelWithDebInfo instead of Release on cmake). I disable WER in registry (this used to be a feature you could click on in windows 7, but they removed it in windows 8).
Also if you were autistic about core dumps, it's possible to use microsoft azure to build your code with a symbol sever with indexed symbols so that if you gave the debug build to someone, they don't need the PDB file, they can send the core dump (created with procdump could be hundreds of megabytes, may need to be zipped). And you need a microsoft account + visual studios because the symbol server is tied to your azure account.
But for a optimized build you would use bugsplat.
Also if you don't have a MS account you can reset the trial with this: https://github.com/beatcracker/VSCELicense
Replies: >>105989668
Anonymous
7/22/2025, 8:05:59 AM No.105985033
On a whim I decided to try out migrating my setup from Ubuntu to NixOS. It was not fucking worth it.
Anonymous
7/22/2025, 8:09:35 AM No.105985050
>>105929512
roll
Anonymous
7/22/2025, 9:38:44 AM No.105985330
>>105983345
thats illegal
Anonymous
7/22/2025, 9:54:12 AM No.105985402
I'm so incredibly bored but I have no idea what to do. All I know is that I don't want to do toy projects. If you have any suggestions please tell me.
Replies: >>105985436
Anonymous
7/22/2025, 10:00:51 AM No.105985436
>>105985402
what languages do you know/use?
Replies: >>105985442
Anonymous
7/22/2025, 10:03:12 AM No.105985442
>>105985436
I don't use any because I have nothing that I want to do but I know most. C/++, JS, PHP, would be the ones I'd enjoy using most.
Anonymous
7/22/2025, 11:54:59 AM No.105986067
>>105944865
that thing still exists? i thought it was dropped with visual studio 2008+

isn't this what you want?
https://stackoverflow.com/questions/1508973/how-to-search-for-file-names-in-visual-studio
Anonymous
7/22/2025, 1:58:05 PM No.105986752
>>105968826
MSVC compiler is fucking horrible, at everything. Just install MinGW or LLVM, they're open source, better at optimizations and work out of the box without telemetry and other niggerlicious shit
Replies: >>105986887 >>105989668
Anonymous
7/22/2025, 2:17:40 PM No.105986887
>>105986752
both of those are outperformed by MSVC at everything

MinGW you don't even need to bench, you can time it with a stopwatch
Anonymous
7/22/2025, 2:41:25 PM No.105987096
Alright my OS has kmalloc now. What next?
Replies: >>105987619
Anonymous
7/22/2025, 3:02:57 PM No.105987308
Git and jujutsu 1
Git and jujutsu 1
md5: d5656a8e40c8b68a9f041ee11199e284๐Ÿ”
Can I ask how you people use version control systems?
I still find them very confusing to use.
For example, I often want to have 3 different versions of a piece of code available to me. I really do not want to have 3 branches of the code because then it is very easy to accidentally modify the wrong branch. I basically just work by copy/pasting directories, until I have something I am happy enough with to commit, at which point I will clean up and commit a clean version.
But I understand that most people don't do it this way and this is the wrong approach?!
Replies: >>105987498 >>105987602 >>105987633
Anonymous
7/22/2025, 3:22:47 PM No.105987498
>>105987308
>, I often want to have 3 different versions of a piece of code available to me.
That's retarded so your best option is to copy paste.
If I have two different ways to implement something, I just make some tests and see which version is better. If that doesn't work, I pick one at random.
Anonymous
7/22/2025, 3:34:18 PM No.105987602
>>105987308
>I often want to have 3 different versions of a piece of code available to me.
Git worktree. I think they still need to be separate branches though.
Anonymous
7/22/2025, 3:36:26 PM No.105987619
>>105987096
Virtual memory?
Replies: >>105987719
Anonymous
7/22/2025, 3:38:01 PM No.105987633
>>105987308
Oh, you can also save changes in a .diff, I guess.
Anonymous
7/22/2025, 3:49:16 PM No.105987719
>>105987619
I did that before kmalloc. I decided to do a rudimentary shell.
Anonymous
7/22/2025, 4:09:07 PM No.105987874
1739758982358063
1739758982358063
md5: 2bc00aad568a6bf5a8171eb673f7492e๐Ÿ”
https://graphics.cs.utah.edu/research/projects/avbd/
Can ChatGPT vibecode me up an implementation of this in GLSL compute shaders
Replies: >>105988526
Anonymous
7/22/2025, 4:34:54 PM No.105988095
>>105978129
isn't that just strace?
Anonymous
7/22/2025, 5:32:09 PM No.105988526
>>105987874
Good morning, sar. This is /dpt/ and you appear to be looking for /gpt/.
Anonymous
7/22/2025, 6:19:06 PM No.105988960
Why is there no language that will let me do this
struct Vec<T: type, N: uint> {
operator`.`(self, attr: comptime Literal[x | y | z]+) -> Vec<T, Length(attr)> {
// ...
}
}

v = Vec(1.0f, 2.0f, 3.0f); // Vec<float, 3>

a = v.x; // Vec<float, 1> ( <=?=> float )
b = v.xxy // Vec<float, 3>
c = v.zyxyzz // Vec<float, 6>
Replies: >>105989242 >>105989575 >>105989613
Anonymous
7/22/2025, 6:30:39 PM No.105989059
which is better?

car.paint(red)
or
paint(car, red)
Replies: >>105989085 >>105989294 >>105989370 >>105989419 >>105989575
Anonymous
7/22/2025, 6:33:26 PM No.105989085
>>105989059
A car cannot paint itself so the latter. OO is stupid
Replies: >>105989370
Anonymous
7/22/2025, 6:48:58 PM No.105989242
>>105988960
doable in ghc/haskell
Replies: >>105989285
Anonymous
7/22/2025, 6:53:55 PM No.105989285
>>105989242
Give me some keywords to Google
Replies: >>105989397 >>105989577
Anonymous
7/22/2025, 6:55:15 PM No.105989294
>>105989059
car #red paint
Simple as.
Anonymous
7/22/2025, 7:03:27 PM No.105989370
>>105989059
Paintjob paintjob = Paintshop.newJob();
paintjob.preparecolor(red);
paintjob.put(car);
paintjob.apply();

>>105989085
OO is only as stupid as the developer using it
Replies: >>105989395
Anonymous
7/22/2025, 7:06:01 PM No.105989395
>>105989370
>OO is only as stupid as the developer using it
Which automatically means plenty stupid. There's no reason to ever use it.
Replies: >>105989426
Anonymous
7/22/2025, 7:06:15 PM No.105989397
>>105989285
it would take a lot of work
Replies: >>105989577
Anonymous
7/22/2025, 7:08:24 PM No.105989419
>>105989059
>car.paint(red)
>implying the car knows anything about rendering

>paint(car, red)
>implying the renderer knows anything about cars

Both are wrong.
Replies: >>105989778
Anonymous
7/22/2025, 7:09:09 PM No.105989426
>>105989395
just stop being dumb, then
OO is great if your smart
Replies: >>105989440
Anonymous
7/22/2025, 7:10:08 PM No.105989440
>>105989426
>OO is great if your smart
But you're not smart and neither is anyone else using POO.
Replies: >>105989473
Anonymous
7/22/2025, 7:12:58 PM No.105989473
>>105989440
you're projecting, anon
Replies: >>105989481
Anonymous
7/22/2025, 7:13:24 PM No.105989481
>>105989473
You're POOjecting, jeeter.
Anonymous
7/22/2025, 7:22:21 PM No.105989575
>>105988960
Easy to do in Nim
>>105989059
Why not both and then you can pick whichever :)
Replies: >>105989735
Anonymous
7/22/2025, 7:22:31 PM No.105989577
>>105989285
>>105989397
behold this abomination
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE OverloadedRecordDot #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
import Data.Kind (Type, Constraint)
import GHC.Records (HasField(..))
import GHC.TypeLits

type Vec :: forall k . [k] -> Type -> Type
data Vec n a where
VZ :: Vec '[] a
VS :: !a -> !(Vec n a) -> Vec (x ': n) a
deriving instance Show a => Show (Vec n a)

type Elem :: forall {k} . [k] -> k -> Constraint
class Elem as a where
extract :: Vec as x -> Vec '[a] x
instance {-# OVERLAPPING #-} Elem (a ': as) a where
extract (VS a as) = VS a VZ
instance {-# OVERLAPPABLE #-} Elem as a => Elem (b ': as) a where
extract (VS _ as) = extract as

type Swizzle :: forall {k} . [k] -> [k] -> Constraint
class Swizzle a b where
swizzle :: Vec a x -> Vec b x

instance Swizzle a '[] where
swizzle _ = VZ
instance (Elem a b, Swizzle a bs) => Swizzle a (b ': bs) where
swizzle v = case extract @a @b v of VS z VZ -> VS z (swizzle v)

type SymbolList :: Maybe (Char, Symbol) -> [Char]
type family SymbolList n = r | r -> n where
SymbolList 'Nothing = '[]
SymbolList (Just '(c, cs)) = c ': SymbolList (UnconsSymbol cs)

instance (SymbolList (UnconsSymbol s) ~ m, Swizzle n m) => HasField s (Vec @Char n a) (Vec @Char m a) where
getField = swizzle

xyz :: a -> a -> a -> Vec ['x', 'y', 'z'] a
xyz x y z = VS x (VS y (VS z VZ))

-- >>> (xyz 10 20 30).xyz
-- >>> (xyz 10 20 30).x
-- >>> (xyz 10 20 30).y
-- >>> (xyz 10 20 30).z
-- >>> (xyz 10 20 30).xx
-- >>> (xyz 10 20 30).yy
-- >>> (xyz 10 20 30).zz
-- >>> (xyz 10 20 30).zzyyxx
-- VS 10 (VS 20 (VS 30 VZ))
-- VS 10 VZ
-- VS 20 VZ
-- VS 30 VZ
-- VS 10 (VS 10 VZ)
-- VS 20 (VS 20 VZ)
-- VS 30 (VS 30 VZ)
-- VS 30 (VS 30 (VS 20 (VS 20 (VS 10 (VS 10 VZ)))))
Replies: >>105989910
Anonymous
7/22/2025, 7:25:26 PM No.105989613
>>105988960
>Why is there no language that will let me do this
You can do this in nim. I actually implemented it myself once upon a time while making a GPU programming ESL.
Replies: >>105989735 >>105989786
Anonymous
7/22/2025, 7:29:23 PM No.105989668
>>105986752
Address sanitizer is the only thing saving C++ from being thrown into the garbage.
mingw does not have address sanitizer (including clang from msys2 which uses mingw)
clang with msvc AKA clang-cl (you need to install MSVC) has address sanitizer but it does not work with the debug runtime (this causes a lot of problems with vcpkg, also the debug runtime is convenient). And if you don't install visual studios you wont have a JIT debugger that works nicely with random applications crashing. >>105984101
If not having address sanitizer isn't enough to scare you away, also note that mingw suffers from the msvc release runtime, and it's suffering because for some reason gdb cannot catch aborts. There are a lot of workarounds, such as retarded ones like setting codeblocks to catch all C++ exceptions (wont work for aborts caused by assert), to less retarded ones like custom abort handler triggering __debugbreak / gdb break abort.
And also did I mention that mingw doesn't have a JIT debugger/coredumps? If your code crashed once in a blue moon (you finished the project, you aren't debugging it, just using it as you intended), if it crashes there is NOTHING you can do to debug it. The stacktrace is impossible to retrieve (printing a stacktrace / building with debug info on a optimized build is worth it, there is no binary size difference, no performance difference).
>erm actually I can get a stacktrace! I use the unhandled exception handler and print a stacktrace from there!
wont work on a stack overflow. also wont print a stacktrace of non mingw symbols (like if you crashed inside of opengl, AKA you did something stupid like pass a null ptr, you wont see the opengl function on the stacktrace due to no dwarf debug info).
>I use dr mingw, plus it has JIT!
If you set dr mingw as the JIT debugger it's gonna open for all programs that crash.
You only get a stacktrace, you can't inspect memory like a core dump/JIT.
msys2 clang needs a flag to work with dr mingw.
Anonymous
7/22/2025, 7:34:14 PM No.105989735
>>105989575
>>105989613
Can it be type safe in Nim?
Replies: >>105989761
Anonymous
7/22/2025, 7:36:10 PM No.105989761
>>105989735
>Can it be type safe in Nim?
You'd have to do something weird for it not to be.
Replies: >>105989786
Anonymous
7/22/2025, 7:37:15 PM No.105989778
>>105989419
>implying the renderer knows anything about cars
I don't have to know the car. I can just empty a bucket of paint over it. A car cannot.
Replies: >>105990074
Anonymous
7/22/2025, 7:37:42 PM No.105989786
>>105989613
>>105989761
let me guess, it can't swizzle at runtime?
Replies: >>105989836 >>105990097
Anonymous
7/22/2025, 7:41:14 PM No.105989825
Obsessed
Obsessed
md5: 6c2a62ba983adf780c6b868ee3ec2f90๐Ÿ”
I have mostly reimplemented Signal in core Java 23. I am trying to decide if I like it or if I should make something else.
Anonymous
7/22/2025, 7:42:24 PM No.105989836
>>105989786
Is this bait?
Replies: >>105989910
Anonymous
7/22/2025, 7:49:12 PM No.105989910
>>105989836
no with >>105989577 you could call swizzle overloads at runtime even if you can't do .xyzetc obviously
Replies: >>105989966
Anonymous
7/22/2025, 7:54:17 PM No.105989966
>>105989910
In what real world (might be hard to imagine for someone that uses Haskell) situation would you want to swizzle at runtime?
The Nim version obviously uses macros which means it has zero extra runtime overhead.
Anonymous
7/22/2025, 8:02:43 PM No.105990074
>>105989778
>I don't have to know the car. I can just empty a bucket of paint over it.
Found the python/JS "coder".
Replies: >>105990125
Anonymous
7/22/2025, 8:04:21 PM No.105990097
>>105989786
>type-safe runtime swizzling
Eh?
Replies: >>105990106
Anonymous
7/22/2025, 8:04:55 PM No.105990106
>>105990097
i just mean the same thing used to type safe swizzle could be done type safely at runtime
Replies: >>105990137
Anonymous
7/22/2025, 8:05:56 PM No.105990125
>>105990074
Found the projectionist
Replies: >>105990175
Anonymous
7/22/2025, 8:06:35 PM No.105990137
>>105990106
Meaning what? Provide a code example.
Replies: >>105990180
Anonymous
7/22/2025, 8:10:18 PM No.105990175
>>105990125
Let's see how you implement your draw(car) function in a statically typed language without trying cars to rendering in some manner through the type system.
Anonymous
7/22/2025, 8:10:47 PM No.105990180
>>105990137
i already provided more code samples than nimanon, why should i do even more work
Replies: >>105990276
Anonymous
7/22/2025, 8:19:53 PM No.105990276
>>105990180
To me "runtime swizzling" implies instead of v.xyz you have v[some runtime variable list of symbols] which sounds like a retarded thing to do.
Replies: >>105990799
Anonymous
7/22/2025, 8:52:30 PM No.105990657
>>105983439
Is this a compiler or language flaw?
Anonymous
7/22/2025, 9:02:41 PM No.105990799
>>105990276
I'm just saying you can do that on top of what .xyz was built to use from my haskell code
Replies: >>105990833
Anonymous
7/22/2025, 9:04:42 PM No.105990833
>>105990799
>I'm just saying you can do that on top of what .xyz was built to use from my haskell code
But that's not a good thing.
Replies: >>105990866
Anonymous
7/22/2025, 9:07:21 PM No.105990866
>>105990833
>it's not a good thing that you can call a function
Replies: >>105990920
Anonymous
7/22/2025, 9:12:16 PM No.105990920
>>105990866
>always pay for dynamic lookup even though you never need it
>this is a good thing
Replies: >>105990925
Anonymous
7/22/2025, 9:12:40 PM No.105990925
>>105990920
inlining either works or doesn't unless you're suggesting 99% of functions be macros
Replies: >>105990995
Anonymous
7/22/2025, 9:13:07 PM No.105990933
what's the difference between raytracing on an engine using RTX raytracing and the shadertoy raytracing that was made before RTX was a thing?
Is it exactly the same thing under the hood except you enable a nvidia extension in the shader and switch to whatever a tensor is?
Or is it a completely different thing?
because like, in those shadertoys, I think every pixel gets like 100 samples, sampling from a signed distance field, a fractal, or something, so de-noising isn't required, but why does RTX require denoising? couldn't it just shoot the same 100 samples with the same pixels, or is it because it's just too slow for that?
Replies: >>105990946
Anonymous
7/22/2025, 9:14:51 PM No.105990946
>>105990933
RTX uses RTX cores
Replies: >>105990958
Anonymous
7/22/2025, 9:16:09 PM No.105990958
>>105990946
yes but what's the point of de-noising, couldn't you just shoot a ray at every single pixel?
are the tensor cores only for denoising?
Replies: >>105990972
Anonymous
7/22/2025, 9:17:23 PM No.105990972
>>105990958
tensor doesn't mean RTX
de-noising is for firing fewer or less accurate rays and getting better data out of it, with the idea of being faster than firing more rays
Anonymous
7/22/2025, 9:19:16 PM No.105990995
>>105990925
I suggest that if your implementation of v.xy isn't guaranteed to compile into ((&v)+OFFSET_X, (&v)+OFFSET_Y) then your implementation is retarded. Simple as.
Replies: >>105991006
Anonymous
7/22/2025, 9:20:19 PM No.105991006
>>105990995
So if it compiled to the actual constant it had determined one would inevitably evaluate to, then that would be retarded?
Replies: >>105991080
Anonymous
7/22/2025, 9:27:01 PM No.105991080
>>105991006
Fair enough, anon. You get me there. What I meant is that ((&v)+OFFSET_X, (&v)+OFFSET_Y) should be the guaranteed worst-case scenario.
Replies: >>105991116
Anonymous
7/22/2025, 9:30:33 PM No.105991116
>>105991080
>totally arbitrary new requirement
Replies: >>105991131 >>105991268
Anonymous
7/22/2025, 9:31:43 PM No.105991131
>>105991116
but yeah, it is still possible in Haskell, I can't be bothered to do it though, but replace the extract shit with an offset and so and so on
Anonymous
7/22/2025, 9:41:49 PM No.105991237
This may be the wrong thread but please ignore me if you aren't looking to give career advice. I am looking to move up in a very small, family-owned tech company that produces a series of embedded systems and Windows applications. I am a QA guy who does a good amount of product support and account management as well. I am 26 years old and I'm currently finishing an Information Science and Cybersecurity Risk Analysis double major. I could easily take over for the sys admin here when he eventually retires (not sure how long I'll have to wait) but I would hate to waste my years of experience with our products and customers, so right now I'm just exploring my options.

I do not have much programming experience but I'd like to determine how I could get my feet wet doing projects similar to what my devs do here. I believe their current stack of languages are C, C++, C#, and some Java. What are some simple projects I should set goals to create? Ideally I'd like to start with C and work my way up from there. What sort of projects do fledgling coders make to get familiar with basic concepts? When should I feel comfortable talking to my boss about a change in positions? If I don't get replies here I'm definitely pasting this in a different thread so apologies for the spam.
Replies: >>105991560
Anonymous
7/22/2025, 9:44:13 PM No.105991268
>>105991116
>arbitrary
>new
No, it isn't. It's the worst-case scenario for reading the field of a POD in sane programming languages and there's absolutely no reason why it shouldn't be the same for swizzling. If your implementation doesn't live up to that standard, it's shit.
Replies: >>105991305
Anonymous
7/22/2025, 9:47:27 PM No.105991305
>>105991268
You realise not every language is C, right?
Replies: >>105991346 >>105991551
Anonymous
7/22/2025, 9:51:41 PM No.105991346
>>105991305
It works that way in most statically-typed mainstream languages, not just C. Sounds like Haskell is literally a script kiddie language at this point...
Replies: >>105991440
Anonymous
7/22/2025, 10:01:25 PM No.105991440
>>105991346
>it works that way in most C derivatives
Yeah, if it wasn't the exact same as C it would have to be a script kiddie language because everything is C. Nevermind that even your C compiler can do almost whatever the fuck it wants if you're not doing shit with the address
Replies: >>105991558
Anonymous
7/22/2025, 10:02:13 PM No.105991449
1740967866414037
1740967866414037
md5: bbee71524d9e4266f839364ee1443eba๐Ÿ”
how do you guys structure your libraries docs for the functions if you want it in the README.md only since the library is farily small, i have it as:
codeblock showing function signature
description
arguments description
but its coming out kind of ugly, should i have the name of the function as a header first and should the arguments description be in a list or just text?
Replies: >>105991625
sage
7/22/2025, 10:09:02 PM No.105991521
don't put function description in README...
You can put example there to get started.
You can have directory with many examples.
Nobody cares about your function signatures.
Replies: >>105991590
Anonymous
7/22/2025, 10:13:06 PM No.105991551
1736092814964980
1736092814964980
md5: 9f94e52c32c6a7dfda6465697351e388๐Ÿ”
>>105991305
>Only C accesses data with a simple mov
And FPtards wonder why no one takes them seriously.
Anonymous
7/22/2025, 10:13:39 PM No.105991558
>>105991440
This is cope. The nim implementation will do exactly what I said - guaranteed - making proper use of the static type information available at compile time. Just like every compiler for most statically typed languages. Meanwhile your implementation takes pride in incurring unnecessary costs for normal use cases and it's supposed to be "good" because it lets you do something retarded no one wants to do?
Replies: >>105991608
Anonymous
7/22/2025, 10:13:55 PM No.105991560
>>105991237
>I'd like to start with C and work my way up from there
doesn't work like that
C/C++ and C#/Java are two different worlds facing away from each other. One language's conventions and practices are another language's grave sins
especially if your end goal is to get employed, best to pick just one language and specialize in it

as for projects, focus on writing stuff that actually does something useful for you or someone. even if it's something trivial but still something that would actually be used - not a "write, check if it works, it does, forget about it" kind of project
"exercise projects" are good for theorists but do not offer much practical experience
Anonymous
7/22/2025, 10:17:36 PM No.105991590
1696126855350565
1696126855350565
md5: 14d58978e8cc9276d3dac1d4e6baa4e8๐Ÿ”
>>105991521
there will be examples too of course but i want some written docs also
Replies: >>105991603 >>105991789
Anonymous
7/22/2025, 10:20:09 PM No.105991603
>>105991590
if your API is not self documenting... ngmi
Anonymous
7/22/2025, 10:20:33 PM No.105991608
>>105991558
You have literally no idea what you're talking about because you have no experience outside of C derivatives. It doesn't even occur to you that if you have a local struct and aren't manipulating the address, C compilers can break it up and re-arrange it however they want.
Replies: >>105991630
Anonymous
7/22/2025, 10:22:40 PM No.105991625
>>105991449
link to html generated from javadoc
Anonymous
7/22/2025, 10:23:08 PM No.105991630
>>105991608
>You have literally no idea what you're talking about because you have no experience outside of C derivatives.
Then you should be able to provide an example of a compiled, statically typed language whose mainstream compilers do worse than the field offset code.

>C compilers can break it up and re-arrange it however they want.
We've already been through this. You can count on it performing no worse than the code I posted.
Replies: >>105991641 >>105991671
Anonymous
7/22/2025, 10:24:20 PM No.105991641
>>105991630
Virtual base access in C++
Also don't reddit space, faggot
Replies: >>105991651 >>105991671
Anonymous
7/22/2025, 10:26:26 PM No.105991651
>>105991641
>dumb newfag doesn't know what "POD" means
>dumb newfag doesn't know what redditspacing means
This board only gets more retarded every time I visit it.
Replies: >>105991671
Anonymous
7/22/2025, 10:28:49 PM No.105991671
>>105991630
>>105991641
And this is all besides the point because you have never and will never learn a language that isn't a fucking C derivative. I'm fucking telling you shit is different and you're asking how it does the same things. 0 perspective at all
>>105991651
They don't even use POD in C++ anymore btw but I bet you didn't know that either. Btw maybe next time don't cram your faggot shit into someone asking why there are no languages that can do a thing, and that thing is then done. You still haven't even posted code doing it yet you're desperate to be up my ass that I actually posted a solution that doesn't satisfy YOU (a fucking nobody) and your requirements. I wasn't trying to solve your fucking problems. Kys
Replies: >>105991679 >>105991789 >>105991952
Anonymous
7/22/2025, 10:29:45 PM No.105991679
>>105991671
Notice how I correctly predicted your inability to name a single example.

>They don't even use POD in C++ anymore
Holy shit what a retard.
Replies: >>105991766
Anonymous
7/22/2025, 10:37:16 PM No.105991766
>>105991679
You can't name a single dick that isn't up your fucking ass, faggot.
You can't even say you meant C anymore since you've just complained about that too
https://en.cppreference.com/w/cpp/named_req/PODType
Hey here's an example for your question I have no obligation to answer that won't compile to field offsets: SIMD shuffling
Replies: >>105991954
Anonymous
7/22/2025, 10:39:41 PM No.105991789
>>105991590
Why not host on github/lab sites or similar with a doc generator?
>>105991671
>a language that isn't a fucking C derivative
The exact same thing applies to Pascal/Fortran/Cobol/Ada/<insert compiled language> and dynamically doing shit like that will always be slow as molasses. Stop coping.
Replies: >>105991811
Anonymous
7/22/2025, 10:43:03 PM No.105991811
>>105991789
>Pascal/Fortran/Cobol/Ada/
Uh huh so more procedural imperative languages that share a lot of heritage with C. You really got me there. You realise if that was a single fixed record type, and it existed in that form at runtime, that GHC would use fixed offsets? You have literally no idea what the code even does, but a simple fucking one off solution made in a couple of minutes to prove something to anon has really got your panties in a twist. You have yet to even provide one (1) solution when anyone, even chatgpt, could do a macro solution. I could do a fucking macro solution in Haskell.
Replies: >>105991871
Anonymous
7/22/2025, 10:49:11 PM No.105991871
1731852243109205
1731852243109205
md5: eb012110827033699a1bf2b9d2bd2e0d๐Ÿ”
>>105991811
Ah, so now it's just "shared heritage" down from "C derivative". In reality, it's any language that is based in the real world and on how computers actually function.
Keep coping with your irreleveant slop and screeching at anons that call out your bullshit.
Replies: >>105991897
Anonymous
7/22/2025, 10:49:19 PM No.105991872
>he's still angrily typing up a reply to either complain a class with a virtual base isn't a POD or to actually address anon's problem from hours ago
>he hasn't realised nobody fucking cares about his question or his extra fucking qualifiers that it must be a compiled language, must be a POD, must be a field access, must make his parents love him
Replies: >>105991980
Anonymous
7/22/2025, 10:51:55 PM No.105991897
>>105991871
>it's any language that is based in the real world and on how computers actually function.
lmao it's a good thing mallocfag isn't here because he's 10x as autistic as you
Anonymous
7/22/2025, 10:57:20 PM No.105991952
>>105991671
>you have never and will never learn a language that isn't a fucking C derivative
Learn Lisp or Fortran or SQL then
Replies: >>105991956
Anonymous
7/22/2025, 10:57:28 PM No.105991954
>>105991766
Still waiting for you to provide an example of all those secret languages I'm unaware of. You won't do so in your next post, either. Dumb script kiddie.

>https://en.cppreference.com/w/cpp/named_req/PODType
This is deprecated but that doesn't mean C++ doesn't have POD types, tard. You literally don't know what a POD type means.
Replies: >>105991980
Anonymous
7/22/2025, 10:57:58 PM No.105991956
>>105991952
He would throw a fit upon realising something isn't working as C would
Replies: >>105992071 >>105992114
Anonymous
7/22/2025, 11:00:11 PM No.105991980
>>105991954
>>105991872
Replies: >>105992027
Anonymous
7/22/2025, 11:04:15 PM No.105992027
>>105991980
>retard doesn't know what "POD" means
Concession accepted.
Anonymous
7/22/2025, 11:07:58 PM No.105992071
>>105991956
Some people are so parochial and myopic. They're best consigned to vibe coding, where their skills won't cause so much damage that anyone gives a fuck about.
Replies: >>105992114
Anonymous
7/22/2025, 11:12:50 PM No.105992114
>>105991956
>>105992071
Notice how you still can't provide an example of a compiled, statically-typed programming language where a POD field lookup is slower than a pointer+offset read.
Replies: >>105992125
Anonymous
7/22/2025, 11:13:34 PM No.105992125
>>105992114
Java using reflection
Replies: >>105992245
Anonymous
7/22/2025, 11:24:13 PM No.105992245
>>105992125
>Java
A POD field read in Java is no slower than pointer+offset.

>b-b-but what if I use reflection
End your life tonight.
Replies: >>105992260
Anonymous
7/22/2025, 11:25:41 PM No.105992260
>>105992245
Java does not even have PODs
Replies: >>105992400
Anonymous
7/22/2025, 11:36:12 PM No.105992400
>>105992260
>it's yet another episode of the same retard still not knowing what POD means
You've had like an hour to google it. You have an impressive dedication to remaining ignorant.
Replies: >>105992419
Anonymous
7/22/2025, 11:38:29 PM No.105992419
>>105992400
Java classes are not plain old data
Replies: >>105992454
Anonymous
7/22/2025, 11:41:19 PM No.105992454
>>105992419
You're a dumb nigger and it's clear now that your screeching about my knowing only 1 language was pure projection.
Anonymous
7/22/2025, 11:41:25 PM No.105992455
>Still no usecase example has been posted