[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1708167092944665.webm (2.96 MB, 600x338)
2.96 MB
2.96 MB WEBM
What are you working on, /g/?

Previous: >>107223900
>>
File: Maids.jpg (499 KB, 591x591)
499 KB
499 KB JPG
>>107235206
Why did maid /dpt/ get deleted? Are jannies really that antisemaidic? I have attached a photo of the participants of that thread for reference.
>>
File: 1647748522281.jpg (226 KB, 1280x720)
226 KB
226 KB JPG
I'm thinking about making stupid shit with SDL and C, is C++ that necessary if I want to make some game? All I hear about it is that its a pain to use, and I'm already decent at C
>>
File: new-game-07.jpg (160 KB, 1280x720)
160 KB
160 KB JPG
>>107235405
The nice thing about sepples for games would be operator overloading for vector/matrix math but I'm not sure it's worth the really spammy error messages sepples compilers emit
>>
File: IMG_0064.png (348 KB, 960x1139)
348 KB
348 KB PNG
>>107235405
There’s both nice things and not so nice things about C++. You don’t need most C++ features if you want to write games. OOP and it’s consequences have been a disaster for CPU performance. Look into talks on Data Oriented Design by Mike Acton and Andrew Kelley. This shit will open your eyes. If you understand cache optimization you’ll find yourself using less and less of C++ features. Cool and shiny data structures have their uses but their not exactly cache friendly.
>>
>>107235405
You can take your existing C code, add std::vector or other standard containers, with no other changes, and compile it with g++/msvc. That alone makes C++ worth it. Why the fuck would you use a language where you have to use malloc and pointers, or re-invent the wheel every time you need a linked list of something.
>>
>>107235979
it's absolutely asinine that people want to use C in 2025.
>>
>>107235988
Yeah. You can program microcontrollers these days with python, the most inefficient language ever. All arguments for the continued existence of C ceased to be relevant years ago, probably before many people here were even born. The only thing keeping it alive is the Linux kernel's unfortunate legacy and silly NEETs on /g/.
>>
>>107235979
>You can take your existing C code, add std::vector or other standard containers, with no other changes, and compile it with g++/msvc. That alone makes C++ worth it. Why the fuck would you use a language where you have to use malloc and pointers
As anon is making games it's more likely they'll just do a single allocation for their arena(s) and free at the end, so it's not a big deal desu
>>
File: hqdefault[1].jpg (18 KB, 480x360)
18 KB
18 KB JPG
>it's not a big deal d-ACK!
>>
>>107235790
yeah data oriented design is what got me interested in doing things not OOP
>>107235988
>>107236049
I learned C from playing with an arduino, and lots of open source things on linux use C so its useful to be able to read that. Programming a micro controller in python sounds fucking retarded, I was surprised we even do it in C and not straight assembly.
>>
File: st 2025-11-17 19:14:11.jpg (224 KB, 777x571)
224 KB
224 KB JPG
>>107236328
Meanwhile in reality...
>>
>>107235988
That's why it's being replaced
https://youtu.be/HX0GH-YJbGw?t=184
>>
there is about one more day on the free claude code web credits
what should I prototype with it?
>>
File: 1763395714057181.png (306 KB, 700x700)
306 KB
306 KB PNG
>>107236841
How does that even happen?
>>
>>107235405
it depends. start with c and post the repository so people can give you actual advice
>>
>>107237111
if(sqrt(time()) % 2 + std::rand() % 2 == 0)
throw SegFaultException; // ;^)
>>
How fast do you guys program? I can do a simple hobby project in about 4-6 sessions of 3-4 hours, but I know people who can do this a lot faster, or slower.
>>
File: 1747840278240599.jpg (496 KB, 650x762)
496 KB
496 KB JPG
>>107235405
C++ is definitely not necessary, I was going through learnopengl using C and swapped out the GLFW stuff for SDL. Definitely doable and imo its preferred, C++ sucks ass and I never wanna touch it again.
>>
>>107237274
Retard nocoder.
>>
>>107235405
If you want to make a game go make a game, not a game engine. Making a game as a solo developer is already a huge time investment and if you spent it doing anything but the game you are ngmi.
Go download Unity and start prototyping shit. Don't focus on autistic implementation details or premature optimisations or huge dream project, focus on finding small things that are fun to play. Only once you make sure your idea is any fun try to make a game around it. Remember, every hour you spent fine tuning your hand made asset management system, physically based particle controller or reimplementing graphical pipeline caching or an hour not spent making sure your story is engaging, characters are interesting, graphics are impressive and the game is even any fun to play.
>>
>>107237342
>or an hour not spent
*is an hour not spent
>>
>>107236049
Micropython is kind of retarded, ngl.
Just use Rust. It's available on all the MCUs that matter.
>>
>>107237342
In overseas internet slang, this is called a truthnuke, or a truth nuclear bomb.
>>
>>107237340
You got a problem?
>>
>>107237342
>if you wanna make a game then make a game
Good advice
>go download Unity
lol
>if you want to make a pizza just go to dominos dot com and click "build your own pizza"!
>>
>>107238508
>>if you want to make a pizza just go to dominos dot com and click "build your own pizza"!
Undertale was made in game maker.

Players want game that is fun to play. They give 0 fucks about your code purity.
>>
File: iykyk.gif (18 KB, 225x225)
18 KB
18 KB GIF
>>107238562
>undertale is fun to play
>>
>>107238692
Millions of copies sold speak for itself.

I am not saying that you should try to appeal to the same audience as Undertale. What I am telling you is that no one gives a fuck what engine you are using or if you brought your own. Gameplay, story, characters, art, music, challenge, etc is what is important to players. You can cover your ears and only look at games that fit your narrative but reality doesn't care about your feeling.
>>
>>107237342
I have made games, nothing too complex, a roguelike, a danmaku and a dominions 2 clone (all of them 2d)
raylib and sdl2 (but specially raylib, sdl1 is too barebones, and I haven't tried sdl3 yet) is easier to use than any engine I have seen so far, definitely easier than unity. I don't want to think about all the weird oop + ecs unity uses, sometimes, most of the times, I just want an integer, not a static data component on the scene node or whatever the fuck
>>
>>107238799
>no one gives a fuck what engine you are using or if you brought your own
I do

>Gameplay, story, characters, art, music, challenge, etc is what is important to players
and why would you care about the players. I have a day job, this is a hobby for my own enjoyment. it just happens to output something that some people like, sometimes
>>
>>107238940
So did I.
Just because you are already comfortable with one tool and don't feel like learning a new one does not mean everyone else is in your situation. It is commonly agreed that Unity is one of the best when it comes to easy of use vs its capabilities in the industry. Of course there are easier engines out there(even the mentioned GameMaker), but SDL2 does not belong to them. You might disagree, but who cares. I don't and even more so your playerbase. Have fun living in your bubble where everyone is just picking Unity because they are too stupid to realise how much easier SDL2 is lmao.

>>107239002
>why would you care about the players. I have a day job, this is a hobby for my own enjoyment. it just happens to output something that some people like, sometimes
You should have prefaced your posts with this before you give someone advice that only applies to your specific situation.
My most polished and fun to play game was made in a JS canvas out of all things.(also a danmaku) But just because I wanted to do something quick for fun and JS/TS happened to be most suitable out of languages I used recently, does not mean I would recommend doing so for someone who wants to learn how to make games. If he already had reliable toolset he is confident and determined to use he wouldn't be asking that question.
>>
>>107238799
>Good game is when it sells a lot
ok retard
>>
File: rx.png (263 KB, 1080x1477)
263 KB
263 KB PNG
writing regex is a lot less horrible with a DSL like Emacs' rx or Clojure's Regal
>>
>>107239634
>I chose to use language so niggerlicious it makes regex look good
ok
>>
>>107239634
absolutely unreadable, it's a severe skill issue if you can't understand regex's syntax
regex's syntax is perfectly fine if you use the /x flag to make whitespace non significant
>>
File: 1734184967951227.png (100 KB, 901x538)
100 KB
100 KB PNG
>>107239643
>>107239698
lisplets btfo
>>
>>107239634
>parsing html with regex
oh shit nigger what the fuck are you doing
>>
>>107239180
brother the js canvas is practically the same api as sdl2, you seem to be under the impression that sdl2 must be harder because it is closer to the hardware, but in both cases you are calling a function to put an image on the screen each frame, it is literally the same

>SDL2 does not belong to them
negation is not an argument

>but who cares
you cared enough to "reply" - notice the quotation marks, it isn't really a reply because you didn't make any counter argument. it was more like a verbose downvote or "me no like" (read in retard voice)

>It is commonly agreed
you fell for the marketing. besides, if this person is asking here, it means they care about programming, not about shitting out cookie cutter slop (the unity use case) in the hopes of getting some easy steam money
>>
File: file.png (40 KB, 1208x198)
40 KB
40 KB PNG
>>107239634
>>107239725
>>
>>107239821
>brother the js canvas is practically the same api as sdl2
You have completely missed my point. Re read that part again.

>negation is not an argument
The fact that SDL2 offers much less given same amount of effort as Unity is not even up for debate. If despite having some experience with these tools you still disagree then no amount of argumentation is going to convince you so have fun deluding yourself. I don't care about educating autists who care more about the tool than the end product.

>it isn't really a reply because you didn't make any counter argument
I did. You just completely ignored it and started attacking a strawman.

>if this person is asking here, it means they care about programming
He said he wants to make a game. So I told him what is the most reliable way of making a game.

>not about shitting out cookie cutter slop (the unity use case)
Just because you lack creativity and can't think of better use of Unity than cookie cutter slop does not mean he does as well. Using SDL2 does not magically make you a more creative game developer either. These things are completely orthogonal.
>>
>>107239963
>C# jeet thinks being able to use a real programming language means I get less.
>>
>>107239988
>muh language tribe A is better than language tribe B
Go back to your daily Rust/C seething thread, nocoder.
>>
>>107240036
>C# jeet thought only of meme languages
Gaming industry uses C++ by the way.
>>
>>107240045
Thanks captain obvious
>>
>>107240066
Don't worry Jeetnity shill, irony is not lost on me that even when a Game uses a shitlang like Java or C# and is considered good, it still doesn't use Jeetnity.
Hmm, let's look at what Minecraft uses... Oh, it's SDL, a game that made billions uses SDL, but it's not good enough for this retarded Jeet, point and laugh at this retarded faggot.
>>
>>107235405
Hey, I just did my first sdl3 "project" in C. More of a build my own tutorial to get everything up and running, rect collision detection, and all of that.
>>
>>107240078
Cool arguments you got there. It's a shame it does not respond or lead to any concrete point, but keep going. Maybe eventually something will stick if you throw enough shit on it kek.
>>
>>107240131
I have no doubt in my mind that you would be feeling extreme shame right about now if you were human and not a Jeet.
>>
>>107240139
I see you have completely given up on pretending to be knowledgable and now just resort to ad hominem and /pol/babble. What a shame but I can't say I am surprised. This is a common defence mechanism in people who fall for such a tribal mindset.
>>
>>107240139
>>107240254
Can you guys just show us your games? Sounds like you both know what you're doing but like arguing for sport.
>>
>>107240254
crabcuck has audacity to yap about tribalism lmao
>>
File: 1758929994889599.jpg (27 KB, 440x698)
27 KB
27 KB JPG
>>107239698
>absolutely unreadable
(group (minimal-match (* anything))) reads just as clearly as \(.*\) wdym
>>
>>107240296
>how can member of tribe C talk about tribalism?
>>
>>107239698
>regex's syntax
no such thing. There are countless different flavors of regex, all with their own cryptic symbols and set of flags. Expanding those single-letter abbreviations to proper self-explanatory words in a DSL gets rid of the need to memorize any of it over and over again.

>>107239734
any html/xml parser is going to use some form of regex under the hood, see https://github.com/GNOME/libxml2/blob/master/xmlregexp.c

>107239698
>absolutely unreadable
>OMG THEY PUT THE PARENTHESES ON THE OTHER SIDE OF THE FUNCTION, I'M GOING INSAAAAAANE
talk about skill issue, holy shit
>>
>>107240362
Too bad you don't have a tribe, only a bucket, retarded crab. Why don't you go back on orange site to cry about how hard it was to make your jeetnity game and get like 7 sales over 2 years you pathetic loser.
>>
>>107240381
>maybe I have fallen for tribalism, but at least I have a tribe!
>>
>>107240425
I also don't have a compulsion to project my own failures onto others and tell them not to fuck around with autistic stuff just because I perceive it as too difficult or waste of time, but I'm human and not a crab.
>>
>>107240446
That's cool because that was one of my main points.
>Just because you are already comfortable with one tool and don't feel like learning a new one does not mean everyone else is in your situation.
>Just because you lack creativity and can't think of better use of Unity than cookie cutter slop does not mean he does as well.
>I wanted to do something quick for fun and JS/TS happened to be most suitable out of languages I used recently
Finally we can reach an agreement.
>>
>>107240507
I will never agree, because people who can do more, begin by not using slop like jeetnity because it actively inhibits their creativity.
>>
>>107240425
>>107240446
Why not take this to email? Fucking fags. This place is fucking trash now. Even reddit is better than watching to two narcissistic losers hijack a thread like it's their personal fag battleground.

Nigger behavior.
>>
>>107235206
>What are you working on, /g/?
trying to integrate cling in cutter so I can life run decompiled code and have some better understanding how this shit works. Going horrible right now it was garbage getting this to compile.
>>
>>107240514
It's fine. In your own special way you have acknowledged that projecting your own failures onto others might lead to not best advice. Even if you not fully realise how does this relates to your initial arguments against Unity yet, but I'm sure you will eventually figure it out. Good luck and have fun making games!
>>
File: coverview.png (349 KB, 510x700)
349 KB
349 KB PNG
I'm a programmer and a classical musician. I'm doing multiple webdev shit in php and js, however I've started since march on a project I personally needed.

I read sheet music off a tablet. Way more convenient. Fuck paper and it can get dark on stage anyway so it makes more sense to use tablets even. All it basically has to do is to read sheetmusic and most of my fellow musicians use ipads. However paying 1.5k to basically be able to read a pdf digitally is way beyond me. So I started to create my own cross plat app and decided after going with python/kiva => python/flet to fully go flutter/dart.

Most of the other sheet music apps are quite ugly in design as well so a prime focus for me is to make it look good. I have a cover layout for my sheet music library and I can automatically fetch composers online related to the pieces, saving them for offline use and even read some of their shit while there is no internet. It's fully tailored to my needs but i'm planning to release it for free sooner or later once i'm happy with the finished product. I have 7 different performances remaining of 4 different sets of music. I've added a screenshot of the coverflow. with the artist overview which is something i'm most proud of cause it's very unique amongst these apps.

I think i'm about 80% there of features I want it to have for initial release and I hope to have an initial release prepared by the end of this year for linux windows and android. Fuck apple.
>>
>>107240555
nice
>>
>>107238799
>>107239180
>>107239963
/agdg/ is in /vg/ now, which is what you are looking for
>>
>>107240555
genuinely based, I wish you the best
>>
>>107240693
Thanks bro my boss saw this and gave me a promotion.
>>
>>107240743
I don't get paid for your work safety, nigger.
>>
>>107240555
Awesome! Aside: Do you get to play Dancing Mad in concert?
>>
File: boxed lambda.png (61 KB, 772x399)
61 KB
61 KB PNG
BEHOLD (No I vill not use ze std::function)
>>
>>107240968
more like lambdon't
>no move operator
>>
This is now /erlang/dpt/
Discuss!
>>
>>107240914
No, sadly enough, I am an organist tho. I have played it solo multiple times and I have written three different organ only arrangements.

If you're referring to the distant worlds concerts: The CD's are good but don't ever go to a live performances. I haven't played with them but I know fellow musicians that have. They are all combined orchestras and they rehearse for like, 2 days and then they get on the stage. It's all about the money sadly enough and not about the music. Listen to the CD's don't do them live.

Was able to get the sheetmusic for all orchestra parts for most of them through the grapevine tho which helps a lot for making arrangements myself.
>>
>>107240981
I'm a C-style C++ programmer I don't know what move does sorry.
>>
File: 1699526222141039.jpg (51 KB, 400x524)
51 KB
51 KB JPG
>>107235206
how to pointer, memory safety, and CPU optimization grok on a large scale project? sources to read on it, specifically?
>t.sepplestard learning c
>>
>>107240988
i thought it was called techno psycho bitch now
>>
>>107241002
when you have a temporary expression (e.g. object you've just constructed, value result of a function call, or explicit cast of a local reference) its given a special reference type &&, this lets you do stuff like
string(const string&): copy the buffer
string(string&&): steal the buffer
>>
>>107241008
that's ur mom
>>
>>107241021
my mom isnt an outlaw
>>
>>107240997
Ive listened to the original 16bit and some synthesized orchestral version on YouTube, that i think was just put together by an amateur, while I work for about 10 years now. Shit is so good Square didn't even have it taken down.

Amazing how impactful the ff music was on such primitive hardware.
>>
>>107240306
>reads just as clearly as \(.*\) wdym
(group (minimal-match (* anything))) vs / (.*?) /x you mean and not it's not
regexes with /x are perfecty readable, so all this wall of text obfuscate the meaning of the regex. regxes are often larger than this so it will that much worse, too much mental overhead

this piece of shit of Rx doesn't even support tomic groups / the possessive modifier
>>
File: G5_pcV9a8AAW5Zh.jpg (294 KB, 2020x1020)
294 KB
294 KB JPG
I coded a Wordle for myself for shits and giggles.
>>
>>107240376
Yes there is retard. The all use implicit concatenation, the same operator for alternation, the same operator/syntax for quantifer, for character class and for the most important extended pattern
all the differences are in non essential patterns

>Expanding those single-letter abbreviations to proper self-explanatory words in a DSL
it uses the same quantifier symbols (?, *, +) you dumb motherfucker.
there are very few important symbols to rember outside of those: ^, $, \s, \d, \w, \b and that's pretty much it. similarly there is only a handful of extended regex pattern.

writing good regexes requires skill but the difficulty is certainly not remembering the syntax of special extended patterns or assertions

understanding what a regex doesn also requires skills and if you can't even remember the very few elements of the syntax, this mean you didn't look at enough regexes and therefore it's extremely likely that you don't understand their semantics, so the syntax is the least of you problems
>>
>>107241004
idk if there are books on it, but a good starting point would be to think about how c++ addresses those issues and then thinking how would you deal with them without the c++ features. this sounds obvious and dumb, but take the concept of ownership, for example:
c++ has many features to communicate ownership, c does not, so you usually have to document who owns what. this is, if a function returns a pointer, are you supposed to free it? if you have a function that takes a string and returns a slice, does it reference the original string or did it allocate a copy? and so on. there is no idiomatic way of representing this information besides comments or some other form of documentation
another good example would be null pointers; in c++ a function can take a reference, which is a pointer that can't be null - this feature doesn't exist in c, so you have to specify whether your pointer parameters accept null, whether a returned pointer can be null, etc.
or resource management: in c++ there are exceptions, which means you have an additional channel for passing errors, and, when used correctly, a way of freeing acquired resources in case of errors, so you don't leak memory, file descriptors and such. imagine something like
void useFile(const std::string& filename) {
std::fstream fs(filename);
//do stuff here
}


once fs goes out of scope, either because everything went right and the function ended successfully, or because there was an exception, the fstream destructor will free the underlying resource and nothing will be leaked. c doesn't have either exceptions nor destructors, so you have to think about how to communicate errors, and how avoid leaking resources:
int uf(STRING* n1, STRING* n2) {
int err;
FILE* f = fopen(n1, "wr");
err = canFail(f);
if(err) goto clean1;
FILE* g = fopen(n2, "wr");
err = canFail(g);
if(err) goto clean2;
clean2: fclose(g);
clean1: fclose(f);
return err;
}
>>
>>107241271
>(group (minimal-match (* anything))) vs / (.*?) /x
lmao this absolute moron is so dumb that he STILL doesn't understand that there are different dialects of regex even after I patiently explained it to him.
The guy you replied to wrote a valid Emacs regex pattern, you didn't.

>this piece of shit of Rx doesn't even support tomic groups
yeah and it would suck if it did, because the underlying engine doesn't support them, retard. This is 40 year old software we're dealing with here, that's 29 years older than your mental age.

Regal does support atomics, because the underlying engines (JVM and JS/Dart) do:
https://lambdaisland.github.io/land-of-regal/

These DSL's turn regexes into data structures for which Clojure and EmacsLisp offer hundreds of functions to manipulate them. That in itself already offers huge benefits even if the increased redability wasn't enough.
>>
https://www.youtube.com/watch?v=EKWGGDXe5MA


Why is he... so wrong about everything? This sounds like my father's understanding of computers and computation, and he was a pediatric dentist who shot kilograms of Ritalin into his veins --- he was wrong, and so is this dude.


Physicists almost never make up for good computer scientists (just as dentists do not), Brian Kernighan goes on such silly tangents in his books as well. His background is in physics, too.

Over the measly 40 years since this lecture was given, a reach tapestry of computer science tradition has been compiled --- and they might be incorrect, too, but they are -more correct- than this malarchy.
>>
>>107241004
For CPU optimization, there is https://en.algorithmica.org/hpc/ and also the Intel manuals.
>https://www.intel.com/content/www/us/en/developer/articles/technical/intel64-and-ia32-architectures-optimization.html
For pointers/memory, for external libraries, do as >>107241627 has said with using goto. For your own code, look into arenas and pools.
>https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator
>>
I compiled a 72-chapter dossier on OOP using Sonnet 4.5, I fed it almost every literature I had on OOP (e.g. Cardielli&Abad's book on theory of objects, or several books on patterns). I fed it over 480 books and papers.

It has a chapter on almost every pattern. As Pike puts it, "Patterns show weakness of a language" --- but OOP is paramount in understanding of compsci, because every 'class' is a computer onto itself.

wget the HTML file, and read it with QuteBrowser. That's how you read my dossiers.

https://chubak.neocities.org/oop-dossier
>>
>>107236484
>C++ is OOP
>you need C to not be OOP
what absolute fucking retardation
>>
>>107241917
btw, if you are anti-LLM, enjoy this video, which is in par with your level of intellect:

https://www.youtube.com/watch?v=9FjGP4t2zKY
>>
>>107241932
You can do OOP with vanilla C. Encapsulation is the only thing you'd lack, and this is not a necessary feature for doing OOP. Python does not have encapsulation, and it's proper OOP.

In fact, you don't even need data structures in C to do OOP.

Read the dossier I posted above. It explains things better.
>>
>>107241779
he's describing the concept of a turing machine, not actual computers (computer science is not about computers). you have no idea what you are talking about
>>
Is Lua the only embeddable scripting language with good tooling? Well, I guess that and javascript more recently with quickjs.
>>
>>107241969
I know you fucking bellend. Read this if you wanna know why he's wrong:

https://github.com/Chubek/chubek/blob/master/abstract-computing-machines.pdf

No model of computation says they are 'data handlers'. I bet you're one of those toxic youth who loves that Jew.
>>
>>107241988
"Tsocding Daily" has several videos where he introduces lesser-known embedding languages.
>>
btw here's a dossier on Lua's C API, and its bindings for several languages (Java, Rust, etc):

https://chubak.neocities.org/liblua-dossier

The first 8 chapters describe the API. The rest of the chapters are dedicated to either liblua bindings for other languages, or implementations of Lua for that language.
>>
>>107242077
>lesser-known embedding languages
That's the problem. They're custom languages with barebones tooling. You can expect syntax highlight at most.
>>
>>107241723
>lmao this absolute moron is so dumb that he STILL doesn't understand that there are different dialects of regex even after I patiently explained it to him.
I accept your concession nigger. I went through the main elements of syntax one by one, all you had to do was pick one adn show me that some engine have different for it, but you didn't because they all have the same fundamental syntax, like I explained.

>The guy you replied to wrote a valid Emacs regex pattern, you didn't.
>valid Emacs, muh escaping capturing groups
irrelevant
What's not irrelevant is that he translated a lazy quantifier into a greedy one. This is completely proving my point that the difficulty is the semantics, not the syntax. Even when it's written with 14 fucking letters ("minimal-match") instead of 1 "?", you niggers still can't grasp the meaning of it.

>yeah and it would suck if it did, because the underlying engine doesn't support them, retard. This is 40 year old software we're dealing with here
then problem is that piece of shit engine, idiot. this is one of the best feature of a backtracking engine
>>
>>107242126
Well that would be an opportunity to make your own tooling for that language, or, your own embedded language.

This dossier should help you with implementing your own embedded language:

https://chubak.neocities.org/emblang-dossier

It's about browser-embeded languages, but I'm currently making one for application-embedded languages as well.
>>
>>107241723
>These DSL's turn regexes into data structures for which Clojure and EmacsLisp offer hundreds of functions to manipulate them. That in itself already offers huge benefits
Not really, it can be useful to construct regex patterns but I've never had anything more to do than making an alternation or concatenation of serveral patterns, so simply enclosing each pattern into '(?: ... )' is enough. A regex AST could be useful for analyzing the pattern but this kind of need is very rare and specific, andalso relatively complex.

Sexp regexps would be fine if it was a thing the author did it in order to concentrate on the implementation and provide performance and optimizations, or to concentrate on semantics and provide at least all the control flow features that perl/pcre engines do or provide more features, or if it allowed the regex engine author to implement a full parser engine it would be pretty cool. There are many extensions I can think of that would dramatically extend the scope of regex engines.
But no, you have less semantic features than regex engines with "cryptic syntax" have, so it's a net loss.

>inb4 but the library is not a regex engine, it's just a wrapper
yeah, it's useless and gay
>>
>>107241988
you can embed python, javascript, scheme, julia, and many other interpreted languages
those are big names so maybe it sounds intimidating, but it is easy and well documented. it is one of the intended use-cases for most of them. if you want to go a step further you could embed a wasm interpreter and then use any language that supports compilation to wasm (so anything based on llvm from c to rust)
>>
>>107242176
>https://chubak.neocities.org/emblang-dossier
Is this AI generated?
>>
>>107242356
Nvm, it is. What a waste of time.

>>107242321
Yeah, I was thinking that was the way to go. Embed a wasm VM and let the users use whatever they want.
>>
>>107242173
>all you had to do was pick one adn show me that some engine have different for it
ah, so you're too dumb to look up a chart? Here, let me help you:
https://search.brave.com/search?q=Regular+Expression+Engine+Comparison+Chart
For starters, the /x flag is unavailable in many engines, including Emacs.

>irrelevant
nope, it's relevant because your failure shows you're still too stupid to understand that there are different regex flavors than just what you saw in your Babby's First Python Tutorial.

>then problem is that piece of shit engine
yeah no shit, so your complaints about rx are irrelevant and dumb.

Nice grammar, by the way.
>>
>>107242356
Yes, but I fed it dozens of books (AFAIK about 210 books and papers).

It's worth giving it a read. It's not a 'waste of time', it's supposed to be something you'd read before reading actual books.

I can assure you that, it's much better than reading online tutorials, because I generate my dossiers with academic literature. Some random tutorial by a moron like Robert Nystrom, does not. In fact, I am fairly sure that munificent (Rob) has read less academic literature over his lifespan, than I have fed to my dossiers!
>>
>>107242562
Fuck off, slopper.
>>
>>107242407
>ah, so you're too dumb to look up a chart? Here, let me help you:
Let me put this way, regex engines that do something else that perl does for concatenation, alternation, quantifers, character classes, \b, grouping, capturing groups and lookahead are irrelevant. Emacs regexes and vim regexes certainly are irrelevant. This means both syntax and semantics. For example, only old and irrelevant engines forces you to escape certain construct, for no good reason.
>For starters, the /x flag is unavailable in many engines, including Emacs.
not my problem and it's an extremely dumb argument to make when arguing that regex syntax is hard to read, because with that option you'd granpa's regexes are 100x more readable with the same exact syntax except for one thing
A lot of PEG parser use a syntax similar to regexes' and no one complains, because it's actually readable when whitespace is not significant.

>nope, it's relevant because your failure shows you're still too stupid to understand that there are different regex flavors than just what you saw in your Babby's First Python Tutorial.
I know more about regexes than you ever will, both about writing good regexes and about how they are implemented. I'm also implementing one.
>>
>>107242582
I feel sorry for you. You've been deluded by Youtubers. How sad.
>>
File: 1737495787587046.mp4 (269 KB, 498x372)
269 KB
269 KB MP4
>there is no standard instruction that gives you the CPU clock speed
>>
>>107242626
Rajeesh, nobody wants to read your crap.
>>
File: jesus-laughing.png (1.36 MB, 1024x1024)
1.36 MB
1.36 MB PNG
Why is it that every anti-LLM Luddite a fucking self-taught moron who things 'code' actually matters?

Of course, the reason is, all a self-taught moron knows is how to 'write code'.

'Writing code' is not the same as 'programming':

https://www.youtube.com/watch?v=uyLy7Fu4FB4

All these 'delulus' must also read Naur's paper:

https://pages.cs.wisc.edu/~remzi/Naur.pdf

"Code" is worthless. It's the 'program' that matters. Of course, if you haven't learned 'programming', then you oppose LLMs, because they are taking your job away.

LLMs cannot 'program'. They can only 'write code'. If you are not a 'programmer', and just a 'coder', you grow to hate LLMs, because the people who used to hire you to write them code, no longer need you.

But if you have attended college (even for 5 semesters, like me) you have been taught how to 'program'. So LLMs cannot replace you.
>>
>>107242670
Name's Chubak. Also, it's no surprise that the youth of WENA (Western Europe and North America) hate Indians and LLMs so much.

I established why they hate LLMs, but I think the reason they hate Indians is that, the Jeets of the world hold advanced degrees in compsci-related fields, whereas the youth of WENA don't.

If I were an industrialist in WENA, I would never, ever hire these self-taught morons. They have zero discipline, they only know how to 'code', not how to 'program'.

Sad, really, so sad.
>>
>>107242610
LMAO at the backpedaling. Yeah okay so a bunch of the most widely installed regex engines used on every Linux box (like GNU ERE, which is used in grep and doesn't use \d for digits) are "irrelevant" because they prove you wrong, but the Fisher Price toy regex engine some autismo like you fiddles around with in his spare time, THAT is somehow relevant.
>>
>>107242682
"Nobody ever went bankrupt betting against intellectuals." Nassim Taleb
>>
>>107242704
go back to some board run by people from your own country.
>b- but my inferior shit culture doesn't have any boards like this, or notable woek done in CS, we're too busy fucking goats...
not my problem. Rope yourself, sandnigger.
>>
>>107242825
First off, Nassim is a girl's name. Why is there a dude with that name?

Also, if you were to bet on a sports team, would you bet on the team whose every member is a seven-foot tall beast, or the team that is composed of elementary school children who ride the shortbus to school?

American industrialists have two choices:

1. Hire self-taught white people who are entitled morons;
2. Hire university-educated Indians whom you can treat as indentured servants;

Choice is clear.
>>
>>107242368
>Nvm, it is. What a waste of time.
Since you apparently haven't been around recently, Chubak is the latest schizo to move into /dpt/. He's an Iranian incel who constantly generates these slop "dossiers" that he doesn't read and aren't worth your time, and he gets into retarded arguments against "westoids". Just ignore him, and pray he gets his whole country rangebanned.
>>
>>107242840
Compsci boards in Persian are full of people with PhDs, anon. I don't wanna contend with them. I don't come to these low-IQ boards because I like to, but because I am not educated enough to talk to my own peers.
>>
>>107242946
You know what, this actually stung, because I just realized that simply by posting on these boards, I am allowing inferior Westoids to even utter my name.

I'm going to leave these boards for a few hours, and come back, after I have done a 'ghosl', to clean the stench of a 'najes' Westoid uttering my holy name.

See you Westoid animals later.
>>
>>107242946
>>107242976
Case in point.
>>
File: 20230912_012047.jpg (11 KB, 500x489)
11 KB
11 KB JPG
My project now consists of 10 crates and 294 dependencies
>>
>>107242807
>Yeah okay so a bunch of the most widely installed regex engines used on every Linux box (like GNU ERE, which is used in grep and doesn't use \d for digits) are "irrelevant" because they prove you wrong, but the Fisher Price toy regex engine some autismo like you fiddles around with in his spare time, THAT is somehow relevant.
lololol Yes, grep, vim and emacs's regex engines and flavors are irrelevant.

The ones that are relevant are all those that are used in general purpose programming languages (builtin or as libraries) in actual programs, aka not shell scripts, not vim scripts, not shitmacs scipts. AFAIK, all those do share the same syntax and semantics for the basic features I mentioned.
>>
I havent logged into my github since they forced you to 2FA with phone

how do I bypass this shit incase some poor soul actually wants to use some niche software mod I did
>>
>>107243170
Just login once, archive all your shit and host it somewhere else.
>>
>>107243207
alright
>>
>>107243170
>forced you to 2FA with phone
Use keepass.
>>
>>107243250
ill check that out
>>
File: thinking-emoji-goth.png (530 KB, 1024x1024)
530 KB
530 KB PNG
My posts don't show up. 4chidori actually upgraded their shitbag of a CMS because of me.
>>
Everybody ITT is a bot. Prove me wrong. Prove you are actual human beings and not bots created by G-d to torture me in the hell I live in.
>>
So, people in my imagination, I want to poll you about a coding practice which I believe is very important.

ALWAYS PRE-DELIMIT.

Whatever the delimiter is.

So, imagine you are writing a function in a language where the delimiter for blocks is curly braces.

You write the left and right curly before you fill in between them.

Sorry if it's rather vague, so let me explain:

void foo(  <-- action #1 int a  <-- action #3  ) <-- action 2


instead of:

void foo( <-- action #1 int a <-- action #2 ) <-- action #3


Makes sense?

So, always pre-delimit.

But I find it to be impossible in S-Expressions (e..g Scheme). Pre-delimiting in S-Expressions fucks everything up.
>>
btw I apologize if I acted like an ass.

You're all imaginary people, and I must always respect myself, and therefore, I must respect you.

If I disrespect people who are part of my imagination, I'll be disrespecting myself.

I died a few years ago, and now I am in hell, and this is my torture.

It's a tolerable torture, because I was a good person.

Or maybe, you're all dead people, and I'm your torture?
>>
Whenever I see these massive fucking posts with all of that reddit spacing here, I just assume it's some AI generated slop and don't even bother reading it.
>>
My mom gifted me this. It's made of solid 24 hectare gold.
>>
>>107243498
Man, why are these figments of my imagination so fucking retarded.

You think anyone would pay for the captcha solving service, or wore, by a pass, to post on 4chan or all places? And random posts? Not prompting a shitty Amazon referral URL?

As I've said before, I 'reddit-space' because I write a lot of Markdwon. In Markdown, two newlines equal one.

Blame whoever runs 4chidori for not upgrading the 4chan text editor to Markdown. I've seen people mention him, and blame him for being so behind times. What's his name, Underdog or some other Hannah-Barbara character.
>>
File: pre-delimit.webm (122 KB, 270x146)
122 KB
122 KB WEBM
>>107243468
you mean like this?
>>
>>107244146
Yes!

Some editors don't auto-delimit. Yours does. Neovim does not, I would like to know how to add it (for all delimiters, e.g. `begin/end` in Wirthian or pseudo-Wirthian languages --- i.e. or those with only `end`).

One thing I'd appreciate (maybe I should ask AI) is a key shortcut for injecting a begin/end pair in Fish, because I've been making use of this feature a lot lately.

You gotta appreciate Python's retarded indentation-based syntax. For a long time, lexing Python-like indent/dedent was a mystery to me, until I read how to do so in Turczon&Cooper's book.
>>
Does anyone have the 'ultimate' compilation of the TeX literate source?

I like the one that comes with TeXLive (type in `texdoc tex` and read it) but Knuth himself recently released an ebook-friendly version, that I downloaded off Z-lib, but once I have the money, I'll buy it legit.

Knuth does not like people compiling the TeX book, but he does not mind people compiling tex.web itself. I think, somewhere, on the web, lies the 'ultimate' compilation of tex.web. I just gotta find it...
>>
>>107244323
Also, please don't remove the compilation guard from The TeXBook source code and compile it, you're not being 'smart'. The real book has resources (raster images) and they are vital to the book's integrity.

I wanna buy a print version. But I don't have the money to order one. Plus, Knuth is worth 4 million dollars, does he need more royalties from the book?
>>
File: angry-emoji-hat.png (346 KB, 1024x1024)
346 KB
346 KB PNG
Finally, here's the 'ultimate' LaTeX Dossier ('ultimate', because I made a shittier one before that).

https://chubak.neocities.org/latex-ultimate-dossier

If you don't like "AI slop", don't fucking read it. It's not like I'm charging money for them. You insult me and call me a 'slopper', all the while, you've probably been swindled at least one or twice by 'REAL' slop.

I put a lot of work on these 'slop'. I feed them hundreds of literature on the subject.

I make these 'slop' for myself. I have dozens of others that I have not shared. That's why it's vital for them to be at least 'acceptable' fact-wise.

You think some Jeet who shits out an AI book, puts the incomplete version on Z-Lib to fool you into buying the real one, even cares, the slightest, about the quality of the 'slop'?

Publishing houses like Packt and Springer are already churning out slop after slop, and they charge money for it.

And I get blamed for sharing stuff, that I've made for myself, online! Is it even 'slop' if you've made it for yourself?

Enjoy needing to learn some language, framework, or whatever, and paying $60 for a book that's masquerading as human-written, all the while you could have asked me to share my dossier on it (if I had one, that is).

Here's the list of my so-called 'slops', if you need any of them, first put the name after my Neocities URL, and if it was not there, ask me to upload it for you.

https://pastebin.com/X9E3QUgL

inb4 'no i don't need your shitty ai slop' --- good, Packt Publishing is just waiting for you to hand over $60 for the paid version, and I don't think they've even fed it so much as a single book or paper!
>>
>>107244425
intelligent people don't learn with AI slop, shitskin
go back your shithole
>>
>>107244425
buy an ad
>>
>>107244467
Yeah, 'intelligent people' watch tutorials made by Indians with a thick accent.

Funny how you call me 'shitskin', last time I checked, my skin was fairer than the average Indian.

In my prompts, I disallow the slop machine from using Youtube videos. Only ACADEMIC book sand papers that I feed it.
>>
>>107244486
For what? I'm not selling anything.
>>
Carcinization
https://discuss.python.org/t/pre-pep-rust-for-cpython/104906

>guido
>Snarky note: do we eventually have to rename CPython to CRPython? :slight_smile:
>Seriously, I think this is a great development. We all know that a full rewrite in Rust won’t work, but starting to introduce Rust initially for less-essential components, and then gradually letting it take over more essential components sounds like a good plan.
>I trust Emma and others to do a great job of guiding the discussion over the exact shape that the plan and the implementation should take.
>>
>>107244497
>Yeah, 'intelligent people' watch tutorials made by Indians with a thick accent.
no they don't either, nigger
>Funny how you call me 'shitskin', last time I checked, my skin was fairer than the average Indian.
don't care, still a shitskin
>In my prompts, I disallow the slop machine from using Youtube videos. Only ACADEMIC book sand papers that I feed it.
buy an ad, also you're a pseud
>>
>>107244504
you are selling the virtues of AI, buy an ad>>107244514
>>
didn't mean to quote
>>
>>107244514
> Rust modules

How would that differ from the Rust bindings for CPython API?

Why don't they add a Rust version of 'ctypes' instead?

>>107244525
Are you sipping sissurp? You're delirious.

>>107244528
> selling virtues of AI
Oh boy, your anti-AI crusades has reached a level of fanaticism! It's not anti-AI jihad!

Look, Tan (I assume you are Tan, because you don't wanna quote my posts directly), I'm sorry if LLMs stole your job, but maybe you should have gotten your degree.

You guys are fucking mental. AI is a tool, it has its uses. Smart people use tools. Hell, crows use tools.

I really hope Western countries ban AI, because then, "Chaina" can swipe in, and in four or five years, West would be decimated.
>>
https://www.youtube.com/watch?v=iuIdBfjL62s

What Tsoding does not get is, I don't [quite reluctantly] resort to using Github because I don't have an SSH server, I have one, but who knows if I can pay for them, continuously, for rest of the time I'm alive? (until I blow myself up in Time's Square, that is)

Github hosting is forever. Even when Eyeran, Chaina and Rushuu join together to destroy the US, the Github servers would survive.
>>
>>107244566
you're an AI shill, buy an ad
>>
File: file.png (267 KB, 1920x1080)
267 KB
267 KB PNG
>>107235206
is it even possible to build a win32 api program using cmake from inside VS code? seems the only way to build it is from the developer command prompt or within the full Visual Studio IDE, which i don't want.

i have a basic gui application in C++, and the following CMakeLists.txt:

cmake_minimum_required(VERSION 4.0)
project(Win32 VERSION 1.0 LANGUAGES CXX)
add_executable(win32 main.cc)
target_link_libraries(win32 PRIVATE user32 gdi32 kernel32)


and this shit will not compile regardless of what kit i use. clang-cl is supposed to use the msvcrt runtime or whatever but it still doesn't work. not even using the provided visual studio compiler works.

there is basically nothing about this online since everyone just caves and uses visual studio or the developer command prompt. but how can you have a proper build system in that case? seems like total bullshit
>>
If you wanna blame anyone for scamming people, start with "The Math Sorcerer".

https://www.youtube.com/watch?v=ZWH-4GJaErM

He sells bullshit, outdated books to people, in guise that they will genuinely learn from it.

I've seen him peddle the original, and not the ANSI version of K&R, not as a historical book to own, rather, as something to learn with/from.

Several people have called him out on this, but he's a mathematician, and he's smart enough to know the people who have been 'stranded in his island' (this is genuine terms used in Recommender System literature --- and I'm planning on generating a dossier for Recommender Systems as well) won't get to watch those videos.

btw, you could be a K&R fan, but don't pretend that it teaches shit to the reader. Especially the non-ANSI version.

If you are looking for a book to learn C with, the second edition of "Modern C" by Jens Gustedt was just published this August.

Don't dismiss this book because you hate me. It's a damn good book. I think Blood Meridian is a good book, does not mean you should hate it because you hate me.
>>
>>107244686
Why do you mean 'build it from inside VS Code'? Just launch VS Code's terminal, and run the toolchain from there?

You don't need to use CMake's GUI companion:

$ mkdir build && cd build
$ cmake ..
$ make && make install


Use Bash that comes with Git, I have no idea what the Windows equivalent of these basic Unix commands are, but AFAIK, there's a package you can install via WinGet that adds these, as aliases, to PowerShell.
>>
>>107244754
btw, you'd need the Windows build of GNU Make. You can get it from WinGet.
>>
>>107244754
do you really think i dont know how to run cmake you idiot...
>>
it only takes one schizo
>>
>>107244819
How the fuck do I know what you know.
>>
>>107244826
Are you Underdog (or Tenesse Tuxeedo or whatever)? You did something to my connection, right?
>>
>>107244973
anything using the win32 api needs to be built with specific environment variables loaded by the development powershell module that comes with visual studio and i was just asking if there's a way to get around this or invoke it through vscode so i can use an actually sane workflow.
>>
>>107245080
>so i can use an actually sane workflow.
>C
>Windows
Stop kidding yourself
There's definitely ways to do it without visual studio but if you think they will amount to a sane workflow you're delusional
>>
>>107245198
technically it's c++/cli but even c works just fine with native clang-cl on windows and any build system
>>
>>107243468
>believe is very important
>ALWAYS PRE-DELIMIT.
It's not that important. Not a real issue to be worried about.
>>
>>107245210
I've had problems with clang and cling in the past. I was teaching myself C and C++ because I wanted to show everyone that I could become fluent in both in just one week (I did)

But I did have problems with the installation at first
>>
Is it possible to filter posts automatically by tripcode?
>>
>>107245430
>>
File: sad-emoni-long-hair.png (773 KB, 1024x1024)
773 KB
773 KB PNG
My dimple is disappearing wat do

>>107245430
You can ask Yogi Bear or Huckleberry Hound or whatever his name is on Twitter to add a hidden ID to user's posts, that is only accessible via a paid API.

Then, people who wish to block people like me (and I never trip, mind you) to hand over $$ to Gook Moot, just for the privilege of accessing this ID, and blocking it.

The real blocking could be done with a simple Greasemonkey script, or an addon.

This would help me plenty, since the morons whom I despise could just block my posts.
>>
>>107245080
fuck you just made me remember
man I'm so glad I don't have to do dev stuff on windows anymore
regarding your question, have you considered msys2? it probably won't work ootb but maybe there is a way to integrate it with vscode
>>
wrote a regex filter that hides redd*t spacing but not proper paragraph spacing
>>
>>107235206
ayooo which language will get me a job xD?
>>
>>107246086
cobol
>>
>>107246086
Hebrew.
>>
>>107245452
You're the man! ty
>>
>>107235258
because you are a mentally underdeveloped retard and don't belong here
>>
>>107245417
what do you mean 'fluent'? C++ is about more than just mastering the semantics you also have to master the paradigm. dont tell me you learned template metaprogramming, advanced stl usage, or oop best practices in one week because i won't believe you.
>>
Is there no standard way of printing out the string an errno is defined as?
I can print the numeric errno I got, and strerror(errno) gives me a human readable text of what went wrong, but I also want to see the name the number was defined as in my error message. Like
errno: 2 (ENOENT) No such file or directory 

Do I need to maintain my own reverse lookup table for errno?
>>
>>107247123
strerrorname_np
>>
File: 571i7s.png (397 KB, 1399x1049)
397 KB
397 KB PNG
I discovered a very obscure behavior of regex quantifiers upon backtracking that is hard to observe and that you will likely never encounter.
You know how, in /A{1,5}B/, when A has matched 5 times but then B fails and it backtracks to 4 iterations and tries C again, then 3, then 2, the 1, then fails? Well, if it backtracks back to, say, 2 iterations but then this iterations matches, it will not try to match B, it will continue to match A while it can and while the number of iteration is <= 5. So A can match 5 times, backtrack to 4, backtrack to 3, backtrack to 2, then have the 2nd iteration "suddenly" matching, have the 3rd iteration matching, then the 4th, then the 5th.
If A doesn't backtrack this can't happen, but if it does backtrack and in an extremely unusual manner this can happen.
That said this behavior is not a mistake, it matches like that in order to be exhaustive.
>>
>>107244686
Open the developer prompt and then open code from it and it'll work perfectly. That's what I always do. You can write a bat file that does it and opens vscode transparently. You could set all the environment variables manually but I don't recommend it.
>and this shit will not compile regardless of what kit i use
That's because it doesn't find the compiler. That's what the developer prompt does. It sets some variables so you can build shit.
>>
>>107247881
damn i didnt know you could do that
>>
>finished neovim :tutor chapter 1 and 2

Now, how do I configure it to work with c/c++? I don’t want to learn lua and mess with config files for too long.
>>
File: 1737433372940168.gif (1.99 MB, 332x215)
1.99 MB
1.99 MB GIF
>>107236841
even the language is suicidal
>>
>>107248059
shieet well the config files are all lua now. but just get a package manager (i use lazy), use that to install an LSP plugin, install the actual LSP server (clangd) through your system package manager, if configured right it should interface with it thru ipc or whatever. make a clang-format file too since clang-format is goated.
>>
>>107247812
Thanks!
How have I not known this until now?
I even glanced over that in the gnu strerror documentation without it registering.
>>
>>107235206
>What are you working on, /g/?
im making pong
going pretty well I think

#include "pong.h"
#include "raylib.h"

GameState initializePong(void) {
GameState state = {0};

Ball ball = {.ball =
{
.position = (Vector2){2.0, 2.0},
.velocity = (Vector2){0.0, 0.0},

},
.radius = BALL_RADIUS};

Paddle paddleL = {.paddle = {.position = (Vector2){20.0, 100.0},
.velocity = ((Vector2){0.0, 0.0})},
.side = LEFT,
.width = PADDLE_WIDTH,
.height = PADDLE_HEIGHT};

Paddle paddleR = {.paddle = {.position = (Vector2){200.0, 100.0},
.velocity = ((Vector2){0.0, 0.0})},
.side = RIGHT,
.width = PADDLE_WIDTH,
.height = PADDLE_HEIGHT};

state.paddleLeft = paddleL;
state.paddleRight = paddleR;
state.ball = ball;
state.scoreL = 0;
state.scoreR = 0;
return state;
}

// GameState resetPong(GameState state) {}

// GameState update(GameState state, float dt) {}

void draw(GameState state, float dt) {
// Draw the ball
DrawCircle(state.ball.ball.position.x, state.ball.ball.position.y,
state.ball.radius, BLACK);
// Draw the paddles
DrawRectangle(state.paddleLeft.paddle.position.x,
state.paddleLeft.paddle.position.y, state.paddleLeft.width,
state.paddleLeft.height, BLACK);
DrawRectangle(state.paddleRight.paddle.position.x,
state.paddleRight.paddle.position.y, state.paddleRight.width,
state.paddleRight.height, BLACK);
}

// Entity updateEntity(Entity e){}
>>
>>107249558
SFML is cozy
>>
>>107244514
gentoobros
it's over
>>
SoA isn't new. Databases are SoA.
>>
>>107235206
I have so many things I want to do/learn but cannot find the motivation to actually do them. How do you guys find the motivation? After work I just want to not do anything
>>
Any of you dudes fuck around with sdl3 yet? Are there any good tutorials out there for sound, aside from the examples of the sdl wiki?

I'm using the experimental preview 3.3 build of sdl and have the sdl3_mixer installed and working, but i guess they've changed a ton from the sdl2 to sdl3 mixer.

Also, I'm brand new to sdl.
>>
>>107252464
What's sdl?
>>
>>107252529
Simple Direct Media Layer. Like a simple game engine or something.
>>
>>107252529
sub dermal layer
>>
>>107252541
>>107252543
awww
also not game engine
window/input/event manager with very limited graohics capabilities
its not something you import assets into and set up a couple checkboxes
you have to build pretty much everything from the ground up
>>
>>107252569
>window/input/event manager
Thank you. I lacked the vocabulary to properly define it.
>>
>>107252587
youre welcome
>>
>>107249558
Nice, let's see Paul Allen's Pong.
>>
File: thememaker.png (171 KB, 1790x732)
171 KB
171 KB PNG
I used to love playing with the colour scheme options in Windows 2000 when I was young, I'm sad GUI stuff moved away from giving the user that kind of freedom and choice.

So I've been working on an automatic colour scheme tool for Linux.
It works by generating the necessary configuration files to apply the colour scheme to as much software as I can manage.
Currently it supports Tcl/Tk, X athena widgets, gtk3, qt, wine.

It has some early support for gtk4 that doesn't work great yet but I'm not sure if I'll continue with that (I hate gtk4 and generally avoid applications using it, and writing the gtk.css for gtk3 was enough of a punishing humiliation ritual already)
>>
>>107252856
Doing G-ds work anon
>>
>>107248154
Any premade config for c that I just can copy and start experimenting with?
>>
>>107253017
I think lazy and space are the closest to plug and play you can get. There'll probably still be some configuration and other things to install (not 100% i use old vim).
>>
>>107244686
clang-cl is very painful to get working, unless you end up disabling address sanitizer and undefined behavior sanitizer (since that is the source of a lot of problems, and the clang-cl asan DLL is incompatible with msvc + has the same name)
Clang-cl has more problems with vcpkg, but if you build your libraries with clang-cl, it works. It's tricky to get vcpkg to build the libraries with the same flags as your code, I highly suggest sticking with msvc.
This blog can help.
https://decovar.dev/blog/2022/10/30/cpp-dependencies-with-vcpkg
I suggest using CmakePresets, since it helps with adding address sanitizer as a target, and you can set Ninja instead of Msbuild, and even support MSVC and Clang-cl as targets in a single project (if you figure it out), and the preset file works with other IDE's like clion (I highly suggest using it if you stick with msvc, since clion has a version of clangd that works with msvc, but clion requires an account and a non-commerical license and I think you need to manually opt out of sending your telemetry or AI training stuff, BUT I have not updated clion in like half a year which is nice since most IDE's will bitch about needing updates).
And try using msvc first, you can actually use WSL2 to build your code on linux, because clang-cl will not show colors in errors / warnings, you need linux and make if you want colorful terminal output (mingw works as well but it does not have address sanitizer).
You don't need user32 gdi32 kernel32 (read your image, it's duplicated)
I don't know what Cmake 4 offers, but I think you should stick with 3 unless you want to make libraries.
Also msvc might have warning due to flags being incompatible (it works fine). And nothing will magically copy the asan DLL for you (for clang-cl I use a custom command to copy the DLL using the full path to C:/Program Files//LLVM/etc, it's pretty horrible and will break on VS 2022, but for msvc it's in the vcvarsall PATH, so you can just copy it).
>>
In Linux everything is text, a massive waste of energy. In my OS everything will be binary-first.
>>
I feel cheated. There is only one byte to store X cursor position. Yet it is able to tell -6 and 250 apart between api calls despite the whole graphics state in memory looking exactly the same(ignoring the y position). The memory is not the source of truth in PICO-8, there is some spooky hidden state going on.
>>
>>107253918
And the worst thing is that I can actually poke memory and this also updates that hidden state. Meaning, that any memory manipulation can have sideeffects by modifying this hidden state. If there is more of this kind of bullshit it can become pain in the ass and possible performance problem. I wonder how they actually implemented this.
>>
>>107253787
>Also msvc might have warning due to flags being incompatible
*for asan
Unrelated yap:
note that the blog mentions vcpkg adding /Z7 for static release binaries (and he uses the dynamic redistributable Visual C++ runtime... to save space I guess?).
I can understand his frustration if he is trying to minimize build times, but his argument does not mention that you get the exact same binary output if you link a Release build with no debug info, and if you link your binary with PDB debug info /Zi, the debug info from the libraries will move into the PDB file.
Dynamic Release libraries don't embed debug info, but they have PDB files (which won't be copied, even on a Debug build), so on another PC, stacktraces wont work (fun fact, if you delete vcpkg/buildtrees, your binary will not find the DLL's pdb file unless you manually copy it from vcpkg/installed/bin).
If you want to build a static release build with stripped debug info, you can just add /PDBSTRIPPED and it would work (on clang/++.exe you can add -gline-tables-only, not the same, since technically you can use /PDBSTRIPPED AND /PDB so that you have 2 pdb files, which is neat if you want to keep / upload your debug symbols for debugging crash dumps).
BUT if vcpkg removed /Z7, you would need add a new triplet with full debug info, and you might as well delete your Release triplet since it produces the exact same binary.
On linux, you don't need to do this, since ALL release binaries effectively have stripped debug info (because on linux, all functions are exported by default, so stacktraces should just work).
Also he mentions that RelWithDebInfo will use Debug libraries, but I cannot reproduce this with my project, it uses Release vcpkg libraries (this probably does not apply to vcpkg, maybe if you built libraries directly from cmake this applies, but I don't even understand the situation this would come up in, and wouldn't it work if RelDeb libraries had the same suffix as Debug in the install prefix?).
>>
>>107253787
Even reading about this shit fills me with dread
>>
>>107242682
>>107242704
Hello my nemesis
>>
File: 182.jpg (35 KB, 300x100)
35 KB
35 KB JPG
>>107244514
>>
>>107252208
push through it. the first 10 minutes are the hardest but once you get in the flow you will have the opposite problem, you won't know when to stop. the only downside of programming while tired is that you will make bad decisions, so maybe try designing before work, while you are fully rested, and leave implementation and debugging for when you're tired

you can also post your ideas, or write something and post the repo here or somewhere else, it doesn't even have to work, but having people look at your code and talk about it can be a motivating factor
>>
>>107252529
It's an abstraction layer so you can write graphics, audio, and input handling code that can be compiled for different platforms. For example if you want your Vulkan code to work on both Windows and Linux. Additionally, it comes with primitives for 2D GPU accelerated rendering so you can use it for 2D graphics without having to interact with the OpenGL or Vulkan API.

Back in the day it was thought of as a minimalist alternative to more conventional 2D game engines, but nowadays you have more minimalist options for both 2D utilities (raylib) and platform-independent context handling (GLFW). SDL is nonetheless still an interesting option, specially the event loop it uses and the software rendering utilities.
>>
I'm giving up on C and all """low level""" languages, this shit is fucking awful
I will not manage my own memory and I will be happy
>>
>>107255533
In my project written in sepples I never need to think about memory management, except when working with the C part of the codebase which interacts with the database.
>>
Let's say I have a vector of pointers to objects. I want to delete one of them and erase it from the vector. Let's also say I have another reference to that object somewhere. I can call "delete otherReference", but obviously that won't remove it from the vector. Is the only option here to loop through the vector, checking every single object, and seeing if they're the right one?
This is all C++ btw.
>>
>>107255654
You can do pointer math to figure out what index it is.
>>
>>107255654
Unless it's huge, just do what you suggested and scan through the vector checking if the pointer at that index matches the one you want to delete.
>>
Wow ChatGPT is 100 times better when you make it ask you questions before generating code.
>>
>>107255654
One option is to make the callee of the function remove the object from the vector.
You could just set the object to null, or if you are looping through every single object, you could use std::remove_if to minimize the number of times you move the elements.
To deal with the reference, the easy C++ way would be to shared_ptr + weak_ptr. But this has a significant cost (even with std::make_shared).
You can still avoid shared_ptr, and you could also set the vector slot to null, you need to store a freelist, or do a brute force lookup for empty slots. Then reference using the slot ID + unique ID, the unique ID needs to be stored for every object, just a unique number incrementing from 0, and if the object is either null or the unique id is not equal, then it's destroyed.
If you NEVER traverse through the list, an intrusive linked list works well. See doom3 idLinkList (if GPL is a problem, you can check out EASTL intrusive_list but it's not really simple)
>>
File: piracy_error.jpg (152 KB, 1081x155)
152 KB
152 KB JPG
Does anyone here know which yt-dlp fork allows siteripping pirate sites? It used to have these features until they were apparently gimped a while back. Also, does anyone know any plugins with this functionality? Don't tell me it doesn't exist btw, I know for 100% fact it does exist. Unfortunately, I've tried nearly 10 forks and each one gives picrel error. I believe yt-dlp just removed the required libs for siteripping pirate sites.

https://github.com/yt-dlp/yt-dlp/forks?page=1
>>
File: git_gud.jpg (100 KB, 482x342)
100 KB
100 KB JPG
>>107255654
this isn't a problem in go because there's no pointer arithmetic
>>
>>107255654
>>107256989
+1 for intrusive linked list. why do you have the vector of pointers in the first place? if the answer is "because sometimes I need to iterate over all the pointed to objects in a loop", then an intrusive linked list is strictly better in every way. everything you need to remove the object from the list is reachable right there from the object so you can remove from the list in constant time through any reference to the object. adding a new object to the list requires allocating only the object, as opposed to allocating the object + enlarging the vector, which will occasionally hit a second allocation op whenever the vector runs out of space. you don't waste space in the vector after deleting a bunch of objects either. and when you loop over the objects, assuming you'll need to access each object at least once during the loop, you're not losing anything to cache unfriendly-ness (which is the main thing retards who hate linked lists for no reason always bring up as their go to reason for why you should never use linked lists). in fact, you even save a pointer deref to the vector's buffer, so the intrusive linked list in this case is technically *more* cache friendly than looping over the vector and dereffing each pointer one by one.
>>
>>107257060
is that a real error? lol what the fuck. the tool's main use is also piracy...
>>
>>107255691
Note that this is untrue unless his "other reference to that object somewhere" is a pointer to the pointer in the vector (and in that case, he'd solve the problem of having to search for the pointer to remove, but he'd now have the inverse problem that removing one objects invalidates references to other unrelated objects). Really, vector is just not a good tool for this use case.
>>
>>107257195
Yes it's a real error.

>the tool's intended purpose is piracy
Yes, the original devs must have trooned out. That's why I'm looking for a fork.
>>
File: 1707802844075498.jpg (48 KB, 690x690)
48 KB
48 KB JPG
a few years ago i was a neet playing vidya

now when you google my name harvard pops up and i am closer to erdos than kevin bacon

how did this happen?
>>
>>107257177
I see intrusive pointers as a last case resort for malloc-like structures (AKA objects that are floating around with no structure holding them down).
An array/vector of pointers is astronomically faster than traversing a intrusive list.
Also I forgot the object with the reference, so technically intrusive pointers will not work / solve this problem (unless you can guarantee that objects wont delete, like if everything was in an arena), but if you had a malloc-like structure, it's not hard to add a intrusive reference count to it, but you can't have a weak reference without a state object, because if you delete the object, you can't access the memory. So either keep the object alive in a freelist + unique ID (terrible, defeats the whole std::vector wastes space since every reference needs a 8 byte pointer + unique id, and the the freelist also will affect address sanitizer if you accidentally use free'd memory, unless you explicitly poison the memory except the unique ID, since the vector + slot ID has null slots, do if it's deleted, it's null OR the unique ID is wrong).
>>
>>107257284
did you find the secret of fibonacci numbers or did you get banned from another computing cluster again
>>
>>107257369
How is an array/vector of pointers "astronomically faster" than traversing an intrusive list? If he's looping over the objects, that means he's almost certainly going to be accessing each object in the loop at least once (to check some property, etc.). So with the vector, on each iteration he has to do a double deref: once to get to the buffer of pointers in the vector, and then again to deref the actual pointer. With the list he only has to deref the actual object, something he's already doing in the vector case, and then the pointer to the next object will just be right there, on the same cache line he's just accessed to check the property or whatever the purpose of the loop was.

Agree that having a bunch of raw references around and deleting through them is likely a bad design too, but we don't know enough about his use case to know if shared/weak pointer is optimal or some other strategy would work better (and shared/weak pointers are not a direct solution to the question he posed either).
>>
File: 2025-11-19 07.33.03.png (52 KB, 1121x610)
52 KB
52 KB PNG
Am I autistic/retarded for doing pixel conversion using fixed point SIMD polynomials rather than 4 lookups in a 512 byte table?
>>
>>107253825
>hash the text or markup
>if hash doesn't match cache, convert text to binary file in cache folder
>if hash matches, load binary file
simple as, best of both worlds
>>
>>107257640
I have no idea which one would be faster. I could only know how autistic/retarded you truly are after you benchmarked them both.
>>
File: confused neet.jpg (63 KB, 754x721)
63 KB
63 KB JPG
>>107257701
>convert text to binary
>>
>>107257727
Application-specific, like say you load a config file into a struct and then you just dump that struct to a file and then you can load from file to that struct as quickly as reading from filesystem to memory can go.
>>
File: file.png (80 KB, 619x397)
80 KB
80 KB PNG
finally
vst2 speaker crosstalk cancellation plugin
basically a brainlet copy of uBACCH
the whole thing based on matrix inversion, conditioning and wola stft
>>
File: 1761188031414556.png (174 KB, 1920x986)
174 KB
174 KB PNG
>>107257369
>>107257543
func u64 traverse_array(u64 input, u64) {
u64 count = 0;
for (u64 i = 0; i < input; ++i) count += earray[i]->value;
return count;
};
func u64 traverse_list(u64 input, u64) {
u64 count = 0;
Entity *e = elist;
for (u64 i = 0; i < input && e; ++i, e = e->next) count += e->value;
return count;
};
>>
File: 1548897321647.png (129 KB, 489x424)
129 KB
129 KB PNG
>LMS Competitive on Australian world
>Nobody here
>Alternative is UK world with 270 ping
>>
>>107257284
you shook that hand
>>
>>107257779
Fairly sure that what you're seeing there is due to how your allocator is arranging the objects in memory. I'm guessing the objects in "earray" are smaller than the Entity type (probably because the Entity type contains that extra "next" pointer), and thus are getting more tightly packed in memory, meaning the vector run of the test has to access less memory than the list run, which is why it runs faster. I actually just reproduced this in my own library to make sure, because I thought for a moment wait am I wrong, is there some kind of automatic prefect/speculative load that's working in the vector case but not in the list case? But I was correct, if I arrange the objects the same way in memory such that the only difference is the data structure (vector vs. list), then the speeds become the same. If I allocate a vector of 8 byte objects, vs. a list of 16 byte objects, then I get similar results to you, the vector way is faster (because my allocator packs the 8 byte objects closer together). So you could say that the vector way does have an advantage in this particular benchmark, because you can make the objects smaller. In practice, like in OP's case where he's probably dealing with polymorphic game objects or something, he's going to have stuff allocated all over the place, and his objects will likely be large enough that adding an extra pointer won't change which buckets or whatever the allocator sorts them into.
>>
Is this web dev general?
I used to make and edit sites/pages with php+html+js+css but haven't touched PHP in like 10 years, still keep up with the others for making userscripts and such.
Does php suck now? I feel like it's been out of the spotlight for years. What are sites today made with?
>>
>>107257543
You know what, I hate this code, I butchered it from some random project expecting it to be decent, but I was too lazy to start from scratch (I like the iteration callback, ugly but it does affect performance), it's probably the worst code I have posted, also too lazy to rename the functions from the original benchmark.
I know I leak the memory, I know that this a very slow intrusive linked list (you could avoid storing the owner pointer, and maybe more? Based on the EASTL intrusive_list), feel free to add your superior version (I just found about about XOR linked lists, dunno how usable it is). Also not a conclusive benchmark.
https://godbolt.org/z/6EeG1aK45
The overhead from intrusive lists are small enough to ignore compared to a vector of pointers. But a vector is so flexible when it comes to deleting references since you need the memory to exist somewhere, because of the unique_id trick (I think its called something).
>>
>>107258043
The test was array of pointers vs list of pointers, so I used the same {ptr, value} struct for both. It is indeed faster if you don't use pointers.
>>
>>107257779
what's that language?
>>
Rust caused the cloudflare outage

https://blog.cloudflare.com/18-november-2025-outage/
>>
>>107258271
C++ with macros
>>
What's the advantage of using vector of pointers to objects?
If you just use a vector of objects, then you can keep an index into the vector instead of a pointer to one of the elements.
This solves your current issue (you just remove the i-th element from the vector) but also improves cache locality, memory fragmentation and makes the data layout simpler with clearer ownership. Using an index also helps for debuggability, serializability and performance, since it's a 32 or 16 bit integer rather than an opaque 64 bit pointer that gets a new value on every run of the program depending on what the allocator is smoking in that moment.
>>
>>107258539
It's common in some video games and pretty much every entity uses a different size, std::variant / unions are not very clean.
In C it makes sense to use a union, you have a lot of headroom of compilation speed. But in C++, a couple std::string's and std::vectors add up to couple hundred bytes, and now you lost a good chunk of cache locality, small entities need to be hundreds of bytes, you can do a hybrid but it's actually worse to code with.
>>
>>107257406
what kind of element is that?
>>
>>107258604
*oh yea, and address sanitizer is a reason to push for using malloc.
JUST because I have a nice pointer wrapper with slot id + unique id, does not mean that all of my code is safe for dangling references (AKA its either this, or shared_ptr or something else I haven't come up with).
>>
>>107258604
Oh, right, I forgot that people do that.
You mean that every entity in the vector has a Entity base class with a generic update method, right?
I still think that's cringe. If it's not an AAA game with literal hundreds of different entity types, just use separate arrays for all each entity type.
>>
>>107258539
I assume it's because his objects are polymorphic and/or different sizes. If they're all the same type then yeah a vector of the objects themselves will definitely be better than a vector of objects or a linked list, performance/cache wise. There might still be reasons why that wouldn't work though, for example if he removes an object in the middle of the vector, even if he's using indexes into the vector as references (instead of pointers) all the indexes past the object he removed will need to be adjusted. This could be worked around in various ways but it's hard to say what the best way would be without knowing more about the specific use case.

>>107258110
>>107258113
My test code uses my own library which is big and unreleased so no I won't post it, but I suspect you could achieve the same result (roughly same iteration time between the vector and the intrusive list) if for example you fill up the vector with objects, and then link those same objects together as a list, then measure the time it takes to loop over the vector vs. the list (that way both loops are accessing the same memory). You need to make sure to do something to invalidate the cache between the two loops as well otherwise the first one will be faster (if the number of objects is small enough).

By the way I found in my code that if I add some garbage data to the objects so that they're each larger than a cache line or so, the list iteration actually runs noticeably faster than the vector, when the number of objects is large. I assume this is because the vector version has to keep jumping back to the vector's buffer, vs. the list version which accesses each cache line in sequence (because I allocated all the objects on one big buffer for both tests, but the vector's buffer is located before all the objects).
>>
>>107258677
>vector of the objects themselves will definitely be better than a vector of objects
*better than a vector of pointers
>>
>>107258677
>for example if he removes an object in the middle of the vector, even if he's using indexes into the vector as references (instead of pointers) all the indexes past the object he removed will need to be adjusted.
Yeah, you'd have to use a slab.
>>
>>107258687
slab allocation you mean? I've read several times about it but it's not clear to me what the difference is compared to a pool allocator.
>>
>>107258677
>You need to make sure to do something to invalidate the cache between the two loops as well otherwise the first one will be faster
I adopted the shitty original approach of just running the same test over and over again until the fastest number is found, I did remove the other tests to test individually but it did not affect performance much. Seems to be a sound approach to benchmarking that I should use more, but having the median and average and high values would help as well since I don't know what's the variance (or plot a graph / curve). I probably should have bumped the number higher than 5 iterations, but godbolt is hitting it's limit.
>I assume this is because the vector version has to keep jumping back to the vector's buffer, vs. the list version which accesses each cache line in sequence
Is your vector implementation as fast as std::vector in this benchmark?
Don't get me wrong, C++'s std::list runs just as fast as std::vector for this simple bench, I don't doubt a linked list could be faster. It's a sign that ID's intrusive linked list is just slow.
>>107258674
>just use separate arrays for all each entity type.
you can do that while also having a big abstract array, the purpose of the big array is to have 2 ints that fits nicely, if every entity was in a separate list, it now needs to be 3 ints, and that also requires putting all the arrays into an array, and that's how you would add a freelist. OR... you could add a freelist by using a single linked list of nodes (allocated on pool or malloc). You may need to manually do placement new and calling the explicit destructor, and poisoning for address sanitizer if you use it. And it would absolutely help, but I worry that malloc actually isn't even 1% of my overhead if I called malloc for all entities. And even if it was malloc, the source of the malloc may be in a location I didn't expect (not the entity, maybe it's the std::string stored in the entity).
>>
>>107259073
I dunno, people use different names for these things.
In the sense I'm talking about, a slab can be build on top of a normal vector. When you remove an element, instead of moving all the remaining elements to keep it compact (which would invalidate pointers or indices), you just leave a hole there. Then you keep a free-list so that you can insert new items in the hole instead of at the top, and you skip holes when iterating.
"Allocation" usually refers to something that lets you allocate objects of different sizes and different types. If you're just storing a single type of entities, just like you would in a normal vector or array, you usually don't call that "allocating".
You can also use a slab-like strategy for an actual allocator if you want.
>>
>>107235206
fine tuned a deberta model for custom wake word detection

pretty fast and simple project
>>
>>107259222
kind of makes me want to revisit training an audio model

also blah blah world will be divided into those can and do use AI and those who can't or don't
>>
>>107259159
>Is your vector implementation as fast as std::vector in this benchmark?
in the sense that it's just a pointer to a bunch of other pointers, yes
>>
File: 2025-11-19 11.53.48.png (187 KB, 788x731)
187 KB
187 KB PNG
>>107258278
>it's real
Rust and its consequences have been a disaster for the human race.
>safe and eff-ACK
>>
>>107259280
The idea that you have to avoid dynamic allocations at all cost, so you preallocate a fixed size buffer and just panic if some data coming from an external file doesn't fit, is honestly just a whole new level of retarded.
"Idiomatic Rust" would have allocated a fresh Vec without even thinking about it.
>>
>>107259277
I think I have seen people on stack overflow complain about why std::vector is faster than their bare bones implementation, but maybe I hallucinated that.
>>
>>107259346
It's not retarded, it's a standard approach in high performance or low-resource situations where predictable behaviour is important.
>>
>>107259346
For me it's also the fact that they had a critical failure but no good way to find out about it. When you program something and you're dealing with how it fails you know why it might fail so you should make sure you can report it with all the info needed.
>>
File: 1410049313218.jpg (58 KB, 278x234)
58 KB
58 KB JPG
>>107257716
>what's your setup for evading the next update purge
trying to figure that out right now kek lmao
>>
>>107259421
That's complete bullshit. They could have preallocated a buffer but also gave it the ability to grow if needed. In what sense is their solution better than that for performance or predictability?
>>
>>107259527
Dynamic memory allocation often has unpredictable runtime behaviour, if you think that's bullshit then you simply don't understand how it works. How long will the allocation take? How much memory will actually be requested from the kernel? It all depends on the current state of the program and is non-trivial. You usually need a custom allocator if you want any kind of guarantees. Obviously if they thought about the scenario where a too big feature file was being loaded they could have fixed it in a number of ways that don't involve a dynamic memory allocator, probably just a simple check to make sure it fits, ignore the file if it doesn't and report it. There is no need for the complexity of dynamic memory allocation and it would arguably have made the problem worse since the broken file would have gone undetected altogether.

Dynamic memory allocation here adds significant complexity but brings zero benefits, no reason to use it.
>>
>>107259624
You can still preallocate all the memory you want and dynamically allocate it ONLY IF IT SPILLS.
Are you pretending to be retarded?
- If nothing unexpected happens:
--- Growable buffer: everything works without allocations
--- Fixed buffer: everything works without allocations
-If something unexpected happens:
--- Growable buffer: everything works with a dynamic allocation potentially slowing things down
--- Fixed buffer: the whole process crashes and burns
If you compare the two approaches within each category, it is extremely obvious which one would have given you more predictable behavior.

>probably just a simple check to make sure it fits, ignore the file if it doesn't and report it
That's surely better than a panic, but it would have still meant that the process would not be doing its job, because it can't load the features at all.
>it would arguably have made the problem worse since the broken file would have gone undetected altogether.
That's very ironic that you say that, because you're admitting that it's very likely that the service would have been able to continue working *without even a major slowdown*.
If the memory needed or the overhead of the exceptional dynamic allocation was actually problematic, they obviously would have noticed the slowdowns.
>>
>>107259734
I don't know if you read the report but the feature file was incorrect, it should not have been that size. So the actual comparison is:

- If nothing unexpected happens:
--- Growable buffer: everything works without allocations (but there is pointless extra code complexity)
--- Fixed buffer: everything works without allocations
-If something unexpected happens:
--- Growable buffer: incorrect (although non-crashing) and less performant/predictable operation if a file arrives that is too big.
--- Fixed buffer: the old file continues to be used (not a problem, it's the desired behaviour in this scenario), and the new file is reported as being malformed.

>That's surely better than a panic, but it would have still meant that the process would not be doing its job, because it can't load the features at all.
wrong, read the report, using the old file would have been the correct operation.

>because you're admitting that it's very likely that the service would have been able to continue working *without even a major slowdown*.
Yea probably just a minor slowdown where the cause is very hard to find. I don't know the performance characteristics of their insane hundreds of millions of requests a second architecture. So I don't know, but I imagine they save where they can.
>>
>>107259897
>-If something unexpected happens:
>--- Growable buffer: incorrect (although non-crashing) and less performant/predictable operation if a file arrives that is too big.
>--- Fixed buffer: the old file continues to be used (not a problem, it's the desired behaviour in this scenario), and the new file is reported as being malformed.
So you're comparing the case where they're using a growable buffer but still totally forgot to do any checks or validation, with the case where they're still using the fixed buffer, but they remembered to do the checks?
>>
>>107259734
>>107259897
having a hard upper limit on the size of the list or whatever it was is fine, the more important point is that the tranny who wrote the rust code should have handled the error rather than just letting the process crash
>>
>>107259376
there's not gonna be any difference *in the iteration*, which was the thing that was under discussion. the main place where you get to make optimization decisions in std::vector is in the part where you add elements (how much extra slack should you allocate/by what factor should the vector grow). there's not that much more to it.
>>
>>107259970
If there's a check for filesize in the growable buffer case, the buffer will never grow, so what's the point? Just use a fixed size buffer then.
>>
>>107259972
Well I don't disagree with that obviously. I'm just saying there's a time and place for dynamic memory allocation and it's not "always and everywhere".
>>
File: 2025-11-19 13.43.21.png (66 KB, 1110x786)
66 KB
66 KB PNG
>>107257704
>>107257640
Holy shit, autism rewarded, I though the simple LUT lookups would be the fastest but they aren't.

4.9 ns/pixel with the simple LUT
2.1 ns/pixel with the autismmaxx fixed point SIMD polynomial

Compiled with clang -Os -mavx
>>
>>107260004
yeah I agree with you, I'm not the other guy
>>
>>107247826
read this post like 6 times and I cannot understand what anon is trying to say
>>
File: 2025-11-19 14.22.53.png (486 KB, 1345x1053)
486 KB
486 KB PNG
>>107260050
4.2 milliseconds to convert a whole 1920x1080 image in CPU is pretty cool desu
>>
>>107259988
You defensively use growable buffers as everywhere so that if you forget to add a check, you don't bring the whole fucking internet down for such a trivial reason. Why is this so hard to imagine?
The point is that you can do this at ABSOLUTELY NO COST other than a tiny bit of code complexity.
If you can't deal with the complexity of using a growable array, just find another hobby.
Before you cook up your next asinine non-answer, it doesn't mean that you have to use a bunch of individual growable buffers either, although that would be fine. You can use a handful of growable arenas.
>>
Does anyone here earn money from programming?
>>
>>107260425
based. Fixed allocationfags are just lazy cunts.
>>
>>107260473
yes
>>
>>107260473
I used to, then the corporation found out or something. They rode my ass with PIPs for a few months until they could conjure up some bullshit fucking reason to fire me.

Yet 50% of that office is STILL H1B VISA PAJEETS.
>>
>>107260473
Yes, though I just got laid off due to being unwilling to go back to the office 4 times a week (I moved to another city 2 years ago after a few months on that job so I wouldn't ever have to work in the office again lmao).
>>
>>107260503
>>107260505
Good luck with finding new jobs, I'm looking too and there's nothing there for me
>>
File: 1760293238879216.png (351 KB, 747x683)
351 KB
351 KB PNG
>>107260425
sir, the real problem is tard devs pushed a *non-critical* update to a live system without even testing it on a staged setup.
Have you ever heard of a major software corp doing that? Cloudscare must be a total jeetery through and through
>>
>>107260425
> use growable buffers as everywhere.
Now you're just coping. Just use a language with automatic memory management at that point.
>>
File: 1729181307569195.png (329 KB, 1080x950)
329 KB
329 KB PNG
>>107260541
>>
>>107260541
Sure, but there's no lesson to be learned there other than "just don't be retarded" and "just don't hire indians".
>>107260570
It's not a problem in Rust, or any language with defer, or if you use arenas, which you can do in any language. Sorry you got stuck in the 80's, grandpa.
>>
>>107260602
I was replying to a guy saying "defensively use growable buffers as everywhere". I didn't even mention rust, retard. If you read the thread you'll notice I'm definitely not against the use of manual memory management in general, but you're probably too busy dilating.
>>
What makes an array a vector? The fact that its elements are pointer to other memory objects, the fact that it can grow by reallocation, or both?
>>
>>107260697
It's language specific jargon. In C++ vectors can grow dynamically. In Scheme they are fixed size.

I think the best default understanding is: an array is some kind of sequence of elements in computer memory. A vector is a mathematical object, a tuple of numbers.
>>
>>107260697
It's just a dumb name that the C++ boomers decided. They actually admitted that it was a retarded name.
>The fact that its elements are pointer to other memory objects
That's not the case, you can put the structs themselves in a vector directly.
>>
>>107260536
I just asked Gemini 3.0 to suggest jobs for me based on my CV, I might try some of that. It said high frequency trading finchuds need a Cnile like me to write high performance Jewishness.
>>
>>107260785
>>The fact that its elements are pointer to other memory objects
>That's not the case, you can put the structs themselves in a vector directly.
Thanks, that's exactly the doubt I had while reading some of the comments in this thread. I have had this assumption for severak years...
>It's language specific jargon.
>>107260754
>It's just a dumb name that the C++ boomers decided.
Well shit. I think term "jump vector" concerning interrupts also helped in my confusion, since it contains pointers. I know it's different since it's code addresses, but still..
>>
I just finished my implementation of post quantum PASETO tokens. I think it's the first in the world.
>>
>>107257753
SSSSSSSEEEEEEEEEEEEXXXXXXXXXXXXX
>>
File: 3256789245672472.gif (3.77 MB, 374x284)
3.77 MB
3.77 MB GIF
>>107260817
>>
ZAPATISTO!!!
>>
BATALITSO!!!
>>
ITALIANO
>>
File: 1727112195143808.gif (152 KB, 253x315)
152 KB
152 KB GIF
>>107261045
>>107261590
>>107261595
>>107261604
Bellissimi post amici
>>
>>107261673
Gemini 3.0 is breddy smrart
>>
>>107260697
A vector is a mathematical construct. An Array is a computer science and electrical engineering construct
>>
>>107260473
No, we do it for free.
>>
>>107235206
I'm tired boss. I'm tired of waiting for jonathan blow's jai language, I've been waiting for 10 years at this point.
It's never coming out. I've given up. I'm giving up now. There's no choice except Rust. Jai is dead to me.
>>
>>107240555
holy based. itoddlers btfo'd
>>
>>107261705
>A vector is a mathematical construct
I know, I mean a vector in general programming.
>>
>>107262689
you mean a vector in the C++ standard library specifically
>>
>>107261962
There's a 2025 release download in the archives.
https://desuarchive.org/g/thread/106051377/#106077531
>>
>>107262755
Know that I know that it's a C++ thing, yes. But when I asked I thought it was the name of a generic data structure that exists in basically all languages. I thought it meant an array of pointers to structs.
Something like:
struct vector {
void **vector;
size_t length;
size_t capacity;
};

or
struct vector_to_struct_T {
struct T **vector;
size_t length;
size_t capacity;
};
>>
>>107263133
also, I was thinking "surely if they call it a vector of T but an array of T, this means that the 2 are distinct"
why the fuck no people don't call it an array if it's just like an array?
>>
>>107263216
>but an array of T
*but not an array of T
>>
>>107263133
Nobody uses C++'s terminology, everyone else calls it an array (or dynamic/resizable/growable array)
storing capacity and having geometric growth is seen as an optimisation/implementation detail
>>
Why does java suck so much bros?
>>
>>107263994
how dare yous sirs
>>
>>107258278
>>107259280
>Rust caused the cloudflare outage
What caused the outage was the config generator that fed invalid config to Rust code and system monitor that did not rollback the change. the Rust code behaved as planned.
>>
>>107264593
yeah it behaved like intended
it crashed because abstractions are not actual abstractions in practice
what a complete fucking dumpster fire
>>
>>107264735
>it crashed because abstractions are not actual abstractions in practice
It crashed because the config was invalid. Just like virtually any service of this type.
>>
>>107264755
no
it crashed because abstractions actually arent abstractions, turns out.
>>
>>107264820
Monads could have prevented this
>>
>>107265100
grep could have prevented it just as easily
>>
>>107265235
the grep monad...
>>
>>107263994
but java is great



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.