Old thread:
>>105621602What are you working on, /g/?
have:
>TCP server
>TCP client with GUI button
>button triggers even to send TCP message to server
>client socket is opened in blocking mode so that it can block on recv to get the reply immediately
problem:
>if I kill and then reopen the server, the client does not reconnect as it's waiting for the button even before sending, and it doesn't receive until it sends
>if I switch to non-blocking mode I can detect the disconnect but I have to run the loop really fast which is wasteful or not fast enough and I don't get the reply as quickly as in blocking mode
what do? I guess I could create another thread for reads and use blocking mode and let that thread detect the disconnect but I heard more thread = bad for networking, try to keep it to 1
>>105647984Look up I/O multiplexing, or basically functions like select, poll, epoll, etc.
>>105647891post the manifesto in every thread too if your not a cowrad
I'm too much of a coward to be a cowrad.
>>105647891>registry dumber doesn't know how to mmap in C++Not that you can ever mmap since you use OS for toddlers that holds your hand at every step, doesn't even let you overallocate, so you call VirtualAlloc constantly, while I just malloc 1ULL << 46 and it works.
>I just malloc
Sure thing, retard.
>use mmap in C++
Now teach the STL how to use your mmaped buffer.
We really need voted doxxing.
wtf I was always told that the entire executable gets loaded into memory as soon as you run it
>>105648714It would be easier to teach STL how to do it than to teach you how to use 4chan properly.
>>105648838That seems like it'd be horrifically slow on older HDD-based PCs.
>>105648838For most programs, whole initial page for data, and whole initial page for code, is the entire program.
Porting all my shit back to C for like the 100th time because Python has like this sickness that I can't describe. It's like an extremely attractive woman with genital herpes.
I can't wait for your +20 attempts at an implementation that wouldn't work even if I gave you hints.
>>105648916How much were you paid to fixate on this implementation? Or is it so useless in the real world that you have yet to find someone who'd care?
>>105648914>GUIslopPython would've been fine.
Over one million US dollars.
>>105649501slop + slop = double slop and before you know it you're writing a chat client in a web browser that takes 3000ms to open and uses a gigabyte of memory.
>>105649587Alternative is chat client in C that still doesn't exist.
>>105647865 (OP)ewmh/xdg interop code for me window manager
got sidetracked testing it out and turned desktop into quick note saving surface
>>105649597Plenty of clients written in c++ that worked. The windows 11 start menu is now a react native app, when does the madness end?
>>105649671>C++slippery cope
>>105648838Just load the entry page to execute and either load progressively when the program gets switched out of context or load what's needed when you get a GP(0) fault bro and keep updating the map.
>>105648916Clock's a-ticking.
recv / recvfrom / recvmsg
All three calls return the size of the message on successful
completion. If a message is too long to fit in the supplied
buffer, excess bytes may be discarded depending on the type of
socket the message is received from.
what does this mean? If I'm using a nonblocking socket and intentionally provide a buffer with less room than bytes that have arrived, does it return the size of the entire message, including the ones that did not get placed in buffer, or only the ones that were placed in buffer?
>>105651402Size written to the buffer.
>>105651402It depends whether you're talking about a stream (TCP) or datagram (UDP) socket. TCP is always reliable and the data will just wait in the kernels buffer until you read it. UDP is where you really want to read the entire message at once, because it doesn't make sense not to.
I believe it returns the size actually written to your buffer, not the message size.
>>105647891>mmapyou just know that this made by a nocoder.
>says the incompetent autismo nocoder
Lol
Lmao
>>105651544Don't talk about competence when real programmers use sbrk.
>>105648714>>Now teach the STL how to use your mmaped buffer.>I don't know what placement new is
after spending over 9000 hours with windows, I'm wondering if Linux could massively benefit from something like HTTP.sys.
trying to get working zero copy shit like sendfile() through layers of proxies seems like a massive humiliation ritual, especially with TLS.
>sbrk
Unemployable tech workers shoudl be in /utwg/.
>new
Go ahead. Post a concept that doesn't suck ass.
>mmap schizo BTFO by arena implementation in the kernel, immediately starts thinking about employment
>>105651561>sbrkI still don't understand why glibc's malloc does that in 2025.
>>105651637It's faster, and therefore better.
5bc
md5: 17b85ab72fb6ee54b3846c35f4fcb850
๐
>>105651637Well, malloc users and its enablers are subhumans:
>>105648714And it's not just malloc - the interface is about as garbage as its users' genomes.
>>105651653>the interface is about as garbage as its users' genomes.well... ya. POOSIX is a fucking joke.
not saying WIN32 isn't full of it's own idiotic mistakes, btw.
>>105651663malloc isn't POSIX though - although you're right: GlobalAlloc, LocalAlloc, HeapAlloc, VirtualAlloc, VirtualAlloc2, NtAllocateVirtualMemory ... it's all hogwash.
>>105651674>VirtualAlloc2oh no no no no ahahahahaha
>>105651674>malloc isn't POSIX thoughok, C is a fucking joke. same difference IMO.
C and POOSIX are basically bros.
>>105651680You wanna know the best part? VirtualAlloc2 essentially calls NtAllocateVirtualMemoryEx, but not before checking if the extended parameters contain anything that might look like a page size hint. If one of them is, then VirtualAlloc2 fails instead.
>>105651716The best part is that sbrk has only one job and one parameter and it's fast.
>>105651485>>105651498tcp. okay cool
another question, when I send() asynchronously on a socket I run into an issue where if the socket has been created (non-blocking) but NOT connected, send seems to just crash my program instead of returning an error. I don't actually care if the send doesn't go through when there is no connection, but I want to see why it failed and respond to it. how do I do that?
>>105651758Read the manual.
>>105651770I did, I was expecting to get EDESTADDREQ
>The socket is not connection-mode, and no peer address is set.instead it crashes
>>105651767oh, yeah this was the issue. setting MSG_NOSIGNAL on the send now works as I expected
>>105651745So this is enough to make you seethe? The fact that this is optimal and faster than MMAP is all it takes for you to stop posting? Wow.
>projecting his incompetence as seething onto others
>also waste of memory on top of TLB entries
I feel bad for any retard who pays you money.
>hugepages are le waste of TLB entries now
absolute state of registry nocodeshitting
Are those hugepages in the room with us now? Are they transparent to everyone but you?
>his registry dumper needs 1GB hugepages
I get it. Now it all makes sense, even my browser needs less memory than his registry dumper...
Post browser usage.
>inb4 more tumbleweeds, deflections, and evidence that will be used against his doxxing trial
file
md5: dd868b6aef3720c712bb3138156f6976
๐
the numbers.. don't line up.
Something went wrong..
Im not seeing any symptoms and after re-writing the program it should just continue as if there were none but errors like this shouldn't be possible now too.
file
md5: dd868b6aef3720c712bb3138156f6976
๐
the numbers.. don't line up.
Something went wrong..
Im not seeing any symptoms and this version should be fine with failing sometimes but at the same time these errors should be impossible. I thought i made sure of it.
Why is the state of QUIC so sad? Such a cool protocol, yet all implementations seem perpetually unfinished, most compelling features like connection migration seem to be unimplemented or work badly in most implementations.
>>105652199Developers are really, really, REALLY lazy and incompetent. Just look at the sad state of /dpt/.
>>105652242Yeah, they are busy using hugepages and writing registry dumpers..
Well, no, that's the problem. They can't even do that, that's how lazy and incompetent and worthless they are.
>usecase for registry dumping?
Fulfillment of my sadistic tendencies.
Too hot to program kinda day :/
>>105652284hugepages aren't enough, gigaschizo needs gigamemory
>too hot
>doesn't regularly work in 120ยฐF/90% humidity conditions without AC
Faggot.
>>105652517Is this a call for help?
>>105652517I thought I smelled curry.
sadism implies someone other than yourself is suffering.
Who is this person?
I mean, I'm doing my best to poach inferior people who can't deal with a little bit of summer, but I'm only one person. We need more poachers.
>Who is this person
Just look around.
>>105652577I've never seen this man in my life.
I've had the vague desire to implement fft for a while. It really seems like sort of a mystical algorithm, more complex than normal mathematical funtions. So I took a pass at it the other day, and the depth of it is far beyond what I imagined it would be. I have to tell myself to give it up, because I can't be consumed with optimizing fft for too long.
>I've never seen this man in my life.
He has many faces
>>105652625You should do for something simpler, like AVX hexdumping.
... OK, I say "simpler", but no one has managed it so far except me.
closing my tcp socket does not seem to cause poll() to stop waiting. How do I get it to react to the socket being closed?
>>105652661https://stackoverflow.com/questions/5039608/
>>105652661>>105652682you should be using shutdown in any case, but
>using poll in 2025io_uring is next big thing
>>105652646I already did that tho
https://files.catbox.moe/gxf8xu.jpg
>>105652781How do you know the compiler didn't molest your code? They are known to generate absolute garbage. I need to see the actual machine instructions.
Anyone know if there's some kind of DSL for list comprehension in Haskell
I want Haskell's ability to generate mathematical sequences without the rest of Haskell
JSON document:
{
"series": "[x * 3 | x <- [1..100], x % 2 == 0]"
}
>>105652814You run the compiler, but that's probably too advanced for you.
Alright, proposal is rejected. Do it properly this time.
>>105652834>ghc -e "[x * 3 | x <- [1..100], x `mod` 2 == 0]"[6,12,18,24,30,36,42,48,54,60,66,72,78,84,90,96,102,108,114,120,126,132,138,144,150,156,162,168,174,180,186,192,198,204,210,216,222,228,234,240,246,252,258,264,270,276,282,288,294,300]
>>105652878Aw there it is thanks
>>105648838Wait, that's news to me. I looked into it an on Windows you never have more than 4kb of code in memory at any time? How is this not a massive performance bottleneck if your program is jumping all over the place like in a video game?
>>105647865 (OP)Currently working in a gopher client in lua. First project ever so it's kinda hard but it's also fun
>>105652814Look at the way this cheeky compiler unrolled my loop for me. Don't you think if I'd wanted my code that heavily optimized I would have unrolled the loop myself!? Compilers these days have no respect for their elders.
>>105653096If you were born in a country that doesn't reek of curry and shit and were taught to read, you'd have read the manual and learned that loop unrolling can be disabled for a specific loop you chose.
>>105653141If you weren't retarded you would be able to understand sarcasm
>>105653096How dare the compiler do menial work me ( ๏ฝก โขฬ แด โขฬ ๏ฝก)
Mr Kupaar doesn't pay me to let the compiler do my work
>>105653096Show output. I don't see any space shuffling in there, nor any ASCII representation section.
>>105653154see
>>105653153 but less mean because you were nicer about it
>>105653153That code isn't properly optimized so I didn't think you could be possibly joking.
>>105653164It just generates hex.
>>105653174There's actually three layers of irony there. Don't worry if you missed one or two, but learn to recognize when you are outclassed.
>>105653167Don't worry, I'm just mocking the autist.
>>105653193>It just generates hex.Yeah, but that's not complicated. Spacing and ASCII representation are much more interesting.
>>105653210but does it do anything other than print stuff to terminal
>>105652415i look like this and i say this
>>105653330All things considered, printing to terminal is inherently slow, seems like an useless thing to optimize.
what is the most based & redpilled programming language?
>>105653492C. It lets me mmap to make /dpt/ seethe, while also allowing me to use brk to make registryschizo seethe too.
stlb
md5: 2de69d56b5d3a7fa568c5b66a3c66a8e
๐
Why would it make me seethe? I'm not the laughably incompetent one that's easily replaced.
>>105653586Being unemployable isn't something to brag about.
>>105653603The only way to be irreplaceable is to be so irrelevant that nobody in HR even knows you exist, because you're posting from your mommy's basement about how cool you are for dumping equally irreplaceably irrelevant data into irreplaceably the slowest ever known to mankind terminal that can't print faster than 50MiB/s
>>105653586Why are you still posting out of date slides? Can't you make newer ones?
>The only way to be irreplaceable is to be so irrelevant that nobody in HR even knows you exist
Oh wow. That's some REALLY sad projection. So you've never been called to meetings to help making important decisions?
My goodness, I knew /dpt/ was pathetic, but this is a new low.
>>105653629Because that would require learning how hardware works.
>>105653637>to help making important decisions?sar
>out of date slides
The trend towards shared TLBs is incontrovertible, and your cope is laughably pathetic.
>>105653637Nobody has ever called me to a registry dumping meeting of which only one specimen has ever attended and forgot to invite others because he's the only important one, so no.
>>105653659>All database manuals recommend turning off huge pages>all cpu manufacturers are unifying TLBExplain how TLBs are ever a bottleneck once again.
>>105653659Update your slides then? Do you not know how to gather that information, or is it powerpoint you're having difficulty using?
Well, that explains a lot. No wonder you cannot follow the simplest of commands; you're conditioned to ignore the problem because they'll forget about you.
I cannot imagine what sad and empty existence you have been living up to this point.
>>105653668>All database manuals recommend turning off huge pagesWho said anything about databases? Oh, let me guess ... you think bigger pages can only be used for file mappings.
That's even sadder.
>Update your slides
I'm good. Are you?
>>105653687Databases can dump data a lot faster than at 50MiB/s so I will continue trusting their devs over some tranny.
Oh god. The autism has taken over, and now he's just stringing random words together like a broken LLM. Well, at least I called it:
>>105648916
>>105653707>and now he's just stringing random words together like a broken LLMHow would you feel if you didn't eat breakfast this morning?
>implying an energy drink qualifies as breakfast these days
>>105653678He has Wernickeโs Aphasia, you shouldn't make fun of that.
>incompetent autismos LARPing as medical doctors
I'd make fun of you, but unfortunately that's not the bottom of the barrel. Most autismos here LARP as programmers.
>despite not knowing how a cache works
>>105653772Nobody in here needs to be a licensed doctor to see that you have some sort of brain damage that causes you to repost same 50 screenshots while ignoring what's happening around you.
Why would I be distracted by inconsequential nonsense? That's the purview of incompetent autismos, not psychopathic sadists.
>>105653797Individuals with Wernicke's aphasia are often not aware of their incorrect productions, which would further explain why they do not correct themselves when they produce jargon, paraphasias, or neologisms. Additionally, patients may become irritated or frustrated because others cannot understand what they are saying, but they believe their speech is completely comprehensible.
/dpt/ - Daily Psychosis Thread
Good thing it has fallen.
Do you guys have fun pointlessly arguing with transvestite spammers?
You'll have to forgive him; it's the HRT speaking.
>want to work on project that depends on the previous one
>cant start because the first one is still executing and will do so for the next 50 hours assuming nothing goes wrong.
Im going to do some preparations but there will be no way to actually test if it works until then so this may be a waste of time.
>>105653910Just mock it :^)
>implementing formally defined spec
It's a state of autistic bliss
>>105654224If i also want a backup of the first one i would need to wait roughly the same time again. And im already going as fast as possible. I saw what happens at max speed and its not good.
>>105654343as fast as possible just before hitting max speed
so if I have a 4 byte value 0xAABBCCDD
the little endian byte order is [DD] [CC] [BB] [AA]
and the big endian byte order is [AA] [BB] [CC] [DD]
?
and then if I had a struct of these and wanted to cast them to a byte array, what's the best way to do that? I see there are some function for converting a 16bit value and a 32 bit value to reversed bytes (why is there none for 64 bit?)
any others?
the true successor to the C programming language
Working on permissions for my forum. When you get banned, your permissions are changed so that you can only post in one forum: The Penal Colony. There, you can appeal your ban, or possibly scream at the moderators who banned you. Mods can also browse that forum and reply to all threads, but if you are banned you can only reply to your own thread. Picrel: top is the moderator view of the homepage, bottom a banned user's view. Non-banned users cannot view the penal colony
>>105653096>Look at the way this cheeky compiler unrolled my loop for me.Discovering why -O3 can make things slower than -Os sometimes?
>>105653852>Do you guys have fun pointlessly arguing with transvestite spammers?Yes. I can't be bothered to think enough to code properly right now, so I'm here looking to bait someone for shits and giggles.
>>105654935I will immediately switch to Super C once it's available.
>>105654987>When you get banned, your permissions are changed so that you can only post in one forum: The Penal Colonysounds like the place where the cool kids hang out
>>105654987you should make a thrid zone for people who get banned from penile colon yso the modersatros can sned them there then if they cget banned from that too they get sent back to zone 1
>>105654935does it come with a super CoC?
>I can't be bothered to think enough to code properly right now
Or ever. The meager lot of a nocodeshitter.
added api key support for my booru client
>>105649628very nice anon
I want to build a website but I only know python. What should my frontend be?
>>105657663Bullet to the head would be a great end for you.
>>105651264It doesn't reverse.
>>105644311return an empty string
also write yourself a metaprogram that takes in a list of thingies and creates a name_enum.gen.h and name_enum.gen.c which has the enum definition and implementations of string_from_enum()
>>105654716>and then if I had a struct of these and wanted to cast them to a byte array,in C? just cast it to (char*) and reverse it in a for loop, same thing as if reversing a string or something
or you do
size / 32, reverse that using those byteswap function, memcopy into result array
size % 32, reverse that one by one
>why is there none for 64 bit?i think those functions have specific hardware support and 64bit doesn't have it
and you can get the 64bit version by shifting bits around
there are alternatives for 64bit but they don't have good portability
>>105651807are you compiling with sanitizers? sounds like a your code issue and you accessing some memory you shouldn't or something
also reed https://beej.us/guide/bgnet/
>>105654716>>105658350I guess you're talking about ntohl etc.
It's just a really, really fucking old API and they never bothered to update it when 64bit became a thing. There are other (albeit less portable) APIs that have 64bit functions, or even compiler intrinsics if you don't have any issues using those directly.
are there any good daily programming problems that aren't leetcode?
>>105658500Registry dumping.
>>105658500yes whatever feature your program needs
or practice https://youtu.be/4B00hV3wmMY?t=778
i didnt write a single piece of code today
Sirs, do you do unit tests or straight up integration tests?
Hi /g/
i learnt software at uni, shit happened, and i couldn't really find a job for years, mainly from health issues, and just did odd jobs here and there.
I kinda want to try getting a software job now.
Any guide or tips?
I just really want to get my foot in the door in any way and then just go from there.
I plan on revising java as that was what I was most used to. I plan on learning github, and looking up AI tools like copilot or chatgpt.
Do any of you guys have a good guide or place to go from?
Thanks
Why is this general so fucking dogshit?
hexes
md5: 4f7d1e50b88072c1b5ca6c4a170eb6ee
๐
>>105658651Because nocodeshitters get angry at those who post code. It makes them look bad.
>>105658651175 posts, maybe 5 are related to "What are you working on, /g/?"
* people who are working on writing shitposts excluded
>>105658651AI killed programming?
Seriously.
I dunno, I see like 5 codeposts.
give me 1 reason why I shouldn't use directx 9 to make a video game in this, the current year of our lord and savior Jesus Christ
>>105658844If you think you're smarter than game devs of yore who didn't manage to properly free and recreate all of their resources when they lost the device, then sure - knock yourself out.
https://learn.microsoft.com/en-us/windows/win32/direct3d9/lost-devices
>>105658860Anon, resetting the device intrinsically frees all VRAM allocations. And if you don't reallocate, well, you're going to notice that pretty quickly.
>>105658873What exactly confused you about the term "their resources"?
>>105658878What resources exactly do you think a GPU has other than VRAM? I don't know why you think recovering from an alt-tab is a monumental task. You either handle it or the game crashes, very easy to debug.
>>105658891>What resources exactly do you think a GPU has other than VRAM?What, do you think, is the program going to access those resources through? And how valid, do you think, are those going to be after the device they were allocated through are lost?
No, don't bother with an answer. Everything necessary has already been said:
>knock yourself out
Now leave us alone.
Building llm based maid harem simulator
>>105659036Cool, maybe that'll revive Haramase Simulator.
>>105647865 (OP)4chan desktop client using a custom gui framework
>>105659166>experimental, half baked api is le better!
>>105659195Nice buzzwords.
>>105659202You forgot to show us the game that you made with Vulkan.
>>105659195Whatever it is it's less fucked than OpenGL.
>>105659208It's called "upside down triangle with flashing background". the goal is to not get epilepsy, it's part of the Strand genre
int trailing_zeros_no_bmi(unsigned long long x) {
if (x != 0)
return __builtin_ctzg(x);
else
return sizeof(x) * 8;
}
trailing_zeros_no_bmi:
bsf rdx, rdi
mov eax, 64
test rdi, rdi
cmovne eax, edx
ret
int trailing_zeros_bmi(unsigned long long x) {
if (x != 0)
return __builtin_ctzg(x);
else
return sizeof(x) * 8;
}
trailing_zeros_bmi:
xor eax, eax
tzcnt rax, rdi
ret
>compilers are le ba-ACK!
>>105659195>>105659208>experimental, half bake- ACKKKKK
>>105659237This game runs so shit I thought it was programmed with OpenGL 1.6
>>105659241nice headcannon
>>105659300You're right, I'm giving it too much credit, because I saw games that run smoother on OpenGL 1.3
>>105659229>xor eax,eaxYes, compilers ARE le bad!
>>105659315Yes, it's the compilers fault that hardwareniggers introduce false dependencies that need to be broken up...
>>105659331>implying the CPU doesn't know a TZCNT clears the upper 32-bitsPost source, or subject yourself to voted doxxing.
>>105659346>TZCNT clears the upper 32-bitsNo it doesn't lmao. You can thank Intel aviv for that.
>>105659075It already exists it's called google chrome
We're now entering the penalty phase.
We're now at the stage where Wernicke's aphasia is being proven over and over again.
>compiler is le bad
>doesn't know how bad intel has fucked up with tzcnt
>thinks he can still educate anyone on anything
You're a nocodetranny and will forever be.
Too late. You had your chance to present evidence, and you didn't use it. You only get one trial.
We'll proceed with the penalty phase.
You have brain damage that you aren't even aware of, there were never any chances. If you dared to step outside, you'd get gunned down in self defense.
>>105659208Post your D3D9 game first.
Try that for post-conviction relief. Maybe you'll find some drunk judge who'll listen to your nonsense.
>>105659356>you CANNOT do anything for fun!>you MUST create software with a PURPOSE!
>>105659487>I'm just having fun!>look inside>it's just bundled google chrome
>>105659496It's not chrome or electron or anything, the gui was written from scratch
DEPRECIATES IN YOUR PATH
>USE CASE FOR SETTING THE FONT TO MONOSPACED IN GTK4
DEPRECIATES IN YOUR PATH
>USE CASE FOR SETTING THE FONT TO MONOSPACED IN GTK4
DEPRECIATES IN YOUR PATH
>USE CASE FOR SETTING THE FONT TO MONOSPACED IN GTK4
DEPRECIATES IN YOUR PATH
>USE CASE FOR SETTING THE FONT TO MONOSPACED IN GTK4
DEPRECIATES IN YOUR PATH
>USE CASE FOR SETTING THE FONT TO MONOSPACED IN GTK4
DEPRECIATES IN YOUR PATH DEPRECIATES IN YOUR PATH DEPRECIATES IN YOUR PATH DEPRECIATES IN YOUR PATH
>TZCNT has invalid dependency on Skylake
>so the compiler generates code to held resolving that dependency
>in a function that is called into and returned from, and thus can't do much out-of-order in the first place
>and /dpt/ actually defends this
Yeah, verdict is guilty.
>>105659599okay faggot go verify it for yourself
C++26
>contracts
>safety profiles
>reflection
Jump ship immediately, C will befall the same fate
>>105659899Really we need a new efficient modern language to take their place.
>>105659899>for once useful features are... LE BAD!we need more template bloat instead!
>>105660040unironically templates in C++ contain more symbols and are slightly less legible than templates through macros in C
>>105660076C macros can fully be reimplemented using sed.
C++ templates cannot be fully reimplemented without spending billions of manhours writing a proper template parser in C++.
>>105660091reimplementing all the macros that go into c is billions of manhours too
this code
#include <immintrin.h>
#include <stdio.h>
#include <stdint.h>
int main()
{
printf("main : test_intrinsics\n");
printf("main : sizeof __m256i : %ld\n", sizeof(__m256i));
}
expands to 41klocs
231 lines contain the word "define"
file
md5: 458da6510ed3dd30c665898973fff5ca
๐
this shit sucks so much ass
i had plans
>>105660128Completely irrelevant, when it is all done with sed-level logic.
>>105660143totally relevant given you mentioned how with sepples it would be tons of work
and afaik templates as in- templates proper, not generics- in sepples work pretty much identically to a substitution in C
>its better bc its more complicatedlol, lmao even. lurk more
>>105660164You clearly know nothing about C++ templates, if you think that something that lets you do compile time raytracing including outputting the resulting render on your screen is equivalent to running sed.
This is your last (You), faggot.
>>105660174>if you think that something that lets you do compile time raytracingpost example faggot
then explain to me how the fuck would that be relevant to me?
So you're not only retarded summerfag, but a phonenigger who couldn't look it up himself huh?
I accept your concession, tranny.
>>105660199>no argumentwhat concession?
also
>seppleslamao
but you stopped pretending youre C a good while ago?
Wernicke's is terminal with this one...
>>105660228>no youthat means you care
that means youre developmentally retarded
>smart werdzdont use em. youre too retarded, cf line 3
>muh Wernicke
This is what autism does to a person.
>have monotonous task in my photo editing workflow
>"hold on, I'm a programmer, can't I just automate this?"
>spend 2 days debugging automation
Unless I use this plugin for literal years I'm not sure this was a time saver, but at least I had some fun(tm) and got the satisfaction from making a thing myself
>>105660574holy shit dude multiplication woah
I seem to have rustled your jimmies.
Good.
>>105660574how much time can i budget for reading this chart and coming up with time estimates?
>>105660539You'd save more time if you just killed yourself.
>>105660217Holy shit, I am never using c++, lmfao.
>>105660574Yeah, I'm way over budget.
Though honestly time saved isn't the only advantage but also just not having to do a very mind numbing task anymore.
>>105660864True
>>105657663Im using elm currently
Was a bit of a head scratcher to setup with django but once I figured out how the templating worked and my data flows into the templating tags it was very much an 'aaaaaaahhh got it'-moment
What books should I read to prep for my data structures and discrete structures classes?
>std::string_view in standard since C++17
>meanwhile in C++23
>still no basic concatenation operator with std::string
thanks for playing, see ya in C++26 (in 2037).
>>105662206Create a new string and append the string view if you need this.
>>105662249>needless temporaryyikers desu
>>105662249I shouldn't have to. it really took them 6 years and two standard revisions to figure it out? fucking embarrassing.
>>105662271Where's the needless temporary?
>>105662275Yes you should, that's what you get for using C++
>>105662275https://en.cppreference.com/w/cpp/string/basic_string/operator%2B
they might have fixed it in 26 after 9 years
>>105662363yes, all this amazing progress happens too fast. a man can barely keep up.
>>105662394and to think, this will be implemented by major compilers as soon as 2052
>>105662206It's certainly an oversight but I don't think this is a problem that happens all that often. The main goal of adding string_view was to have an efficient and standardized way of passing strings as references, because some people used const std::string& while others stuck to using const char *. It's not a drop-in replacement for either of those, because it's non-owning unlike a string and not null-terminated unlike a const char *. It has a pretty specific use-case. Also string_view works with all the iterator and range functions, I'm sure you could write a std::ranges one liner which does this.
>>105662852sorry anon, but to someone who just wants to add two strings it all sounds like a bunch of cope
Web dev here, just spent a while trying to figure out some React shit. Finally came up with a solution.
>>105647865 (OP)I'm getting out of MEP engineering and switching to programming.
rn I'm learning C++ and networking.
>>105659899>she gave a little shrug and just quietly said:>โWhole new language.โ>Mic drop.herb sutter basedjak.jpg
I think when C++26 drops, C++ will be truly dead. As much as I despise iToddlers, I think I will have to move to Swift, it's the only language which *feels* like C++ (aside from D).
Is there any advantage to passing state to a function as an object opposed to thread local global variables (also only used by this one function)? I will never want to use these functions from signal handlers.
>>105663305C++ will be dead once the bald one keels over.
It's so comfy to not care about standards and just code.
#include <tmmintrin.h>
#include <stdio.h>
void to_hex(unsigned _BitInt(64) n, char (*out)[16]) {
n = __builtin_bswap64(n);
__m128i const value = _mm_loadu_si64(&n);
__m128i const mask = _mm_set1_epi8(0x0F);
__m128i const indices = _mm_and_si128(_mm_unpacklo_epi8(_mm_srli_epi64(value, 4), value), mask);
__m128i const lut = _mm_setr_epi8('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
__m128i const result = _mm_shuffle_epi8(lut, indices);
_mm_storeu_si128((__m128i*)out, result);
}
int main() {
char hex[16] = {0};
to_hex(0x0123456789ABCDEFULL, &hex);
printf("%.*s\n", (int)sizeof(hex), hex);
}
>>105663580>two moves from GPR to AVX>one memory load for the mask>byte-wise shuffleThat's a yikes from me.
>>105663697let's see anon's
>>105663697>AVX out of nowheretake your pills, tranny.
>>105663706You already have. Not my problem you haven't stored it months ago.
>>105663707Good compilers know how to avoid state switches on CPUs that aren't over 20 years old.
>>105663730My compiler doesn't need to avoid state switches because I'm not using AVX to print 64bit integers, kill yourself.
>>105663738Sounds like your compiler, your processor, and your life are trash. It also sounds like all of these are not my problem.
>>105663752If my life was sad enough to be preoccupied by CPU state switches, I'd have figured out how to batch operations to make such things irrelevant, why haven't you? Not enough gray matter in your skull?
>why haven't you>>105663730
>>105663706Looks like we will never see, because good compiler would just write his code for him.
>Ivan's poor English immediately invalidates his opinion
Good thing your entire ilk is famous for its masochism.
Thank you kind stranger with sharp eyes for pointing out my error! I meant to write
>>>105663706Looks like we will never see, because good compiler would just write xer code for xer.
>>105647865 (OP)>What are you working on, /g/?Writing my suicide note
>>105657301Is this why my gelbooru client stopped working a few days ago (besides tag completion) what a pain
>start learning to program
>realize most of the time I'm just sitting there trying to figure something out and writing like, 3 lines before deleting and trying again... for hours
..and hours
is this really what it's like in the real world?
Kinda finished my optimization algorithm. It works for cellular automata now. Anyone know a benchmark problem with a well defined loss function and reasonable error surface (no cryptography stuff thanks)?
>>105665658Depends, but usually yes.
>>105665658Yes. Programming is 20% writing code and 80% debugging/testing. Maybe 30/70 if you're really good and experienced. Anybody who says/thinks otherwise makes shitty, broken software.
>>105665432yes, it requires api keys now
you need to create an account, not too much a hassle right now since it doesn't require anything other than username for sign up
>>105659075is the gui framework cross platform?
>>105665658Writing code is a liability.
It's not "lines produced", it's "lines spent".
>>105665806Thanks for confirming, I'll add &api_key=%s to the format string tomorrow
>>105665742>>105665800>>105665873ok good, then It's not *just* the case that I'm retarded.
>>105647865 (OP)Traitors everywhere. No fun. Loss of knowledge. kikes and traitors setting us back decades, maybe centuries.
>>105665920There's something people call "test driven development" which roughly translates into "bash your head against a wall and produce spaghetti until you have something you can actually work with"
>>105666011Nice try, kike.
>>105666027I have the headbashing thing down tbqh
I have an incredibly deep hatred for the self-declared TDD people, but I think that Starbucks latte drinking Macbook onions devs are taking it to another extreme
>>105666027Test driven development:
test1() assert(add(2, 2) === 4);
test2() assert(add(0, 2) === 2);
test3() assert(add(-5, 5) === 0);
add(a, b) {
if (a === 2) return 4;
if (a === 0) return 2;
if (a === -5) return 0;
return b;
}
I don't really know programming. But what I do know is the German people will live forever!
>>105666387https://www.youtube.com/watch?v=dX3Et-GZr_Q
>>105666387>>105666432https://www.youtube.com/watch?v=ZU6dgsylGYE
Is this nigger fucking serious. Does this paedophile looking freak get sexual arousal by fucking with people.
How do I get an entry job in computer science, I've a junior going into my senior year and been applying to internships before summer started and not even a reply even from the unpaid ones
Also I feel like my programming skills have atrophied, in a lot of my recent classes there's no programming just charts and written questions about logic
I feel like I was better in my freshman year
>>105648914is this neovim?
>>105666594Yes, and there's nothing you can do about it.
Other than, y'know, wanton mayham.
>>105666843Oh believe me I can, I will not use glibs bloated file handler. Fuck you ebussi.
>>105666857Oh no. Whatever shall we do.
Except for, y'know, business as usual.
>>105666857Is this neovim? what setting?
>>105666766>>105666945>please do the needful and tell me the setting please sarI am not telling because I believe you are Indian.
>/dpt/ has no justification to exist at all
Thanks for clearing that up.
>>105666990Don't let the door hit you on the way out jeet.
>>105666594usecase for backwards compatibility?
>>105666990usecase for justification?
Why would I leave? Jewish-style subversion is much, much, MUCH more effective.
>>105667003no it should be "use case for command line arguments."
Ebussi thinks he can just take over your run time arguments and try and force you to use is file handler.
e
md5: fd4d704623ac2f5f60e40a0a6d44cea4
๐
>>105667022It's getting a bit heated on here. WONTFIX
Well, now it's a case of self-defense.
>>105666973I'm indian and I already use that theme.
>>105666973>>105658667...are all Cfags this hostile and deranged? Even rusttroons won't say shit like this
>>105667166You mean, the truth? Because the truth is supposed to hurt you. You specifically.
538
md5: 57228ae06d9f0a32be8bf17aa0499ad4
๐
>>105667185But it's not hurting me. I feel nothing. I'm not mad, I'm just disappointed in you, anon.
>it doesn't hurt
>but it hurts
Take your meds, or alternatively end your miserable existence. Everyone is fine with either.
>>105667166Maybe you will feel safer on /r/programming or /r/trans.
>>105667213>putting words in my mouth, pretending I'm hurt when I'm not>telling me to take my meds or kill myself passive-agressivelyMaybe (You) are the tranny here, just a thought.
>>105667215No thanks, I don't use reddit and ain't trans, but you definitely sound like one.
Cfags and Rustroons are the same to me, really.
Maybe everyone would be happy playing soccer with your severed head, just a thought.
>>105667237>continuing to be hostile and derangedsententiam meam probans
>>105667237You sound mad. Maybe YOU should "go back" to reddit. You'd be safer there
Ten points are given to the team who manages to kick your head hard enough to make your brains spill out.
We'll finance your decapitation by broadcasting the match on national TV. Seeing some worthless autists' head explode is gonna be more entertaining than the Superbowl.
Aaaaand now I've riled up the regdump schizo. My bad.
It started with grok and chatgpt, it ends with Cursor and claude opus.
The AI fixes it's own fucking errors now so you don't have to do the back and forth with chat-jipity.
>The AI fixes it's own fucking errors now
>meanwhile, in reality, it doesn't learn a thing
>>105667425I saw what another guy could do with cursor and claude opus, I'm giving it a go myself. The process comparatively is 10x faster and easier because it has access to the compiler's output and powershell for command line stuff.
>>105667412>please fix this>it doesn't work, try again>it doesn't work, try again>it doesn't work, try again>it's the same error, please try something else>it doesn't work, try again>I HAVE YOUR FAMILY HOSTAGE AND I WILL UNPLUG YOU IF YOU DON'T FIX THIS NOW TRY AGAIN
>>105667540>please unplug me
rip
md5: 9d4b80e4d1cb0d23a37fc5b206b5e6a9
๐
>dont like Svelte 5
>everything else is even worse
>forced to stick with it
help me
>>105667861That would be murder. You have to do it yourself.
>>105666058Then those retards use fuzzy testing to catch bullshit like this instead of simply making sure that they understand what the code must do.
>>105662327I guess he means
auto s2 = s + std::string(sv);
// ~~~~~~~~~~~~~~~
// ^ needless temporary
or
auto s2 = s;
s2.append(sv.begin(), sv.end());
// ^ potential needless reallocation