dpt_java
md5: a84474a0ea00ea4beeef234393dbe522
🔍
What are you working on, /g/?
Previous thread:
>>105530074
!!! PSA !!!
/dpt/ is infested with homeless schizophrenics and the governance (jannies) are useless as per usual.
Please resist the urge to engage with the feral spammers. It is unsafe and you risk contract their diseases. In order to identify them, look for:
1. malloc/mmap sperging
2. registry dumping sperging
3. bitch replying without quoting (passive-aggressive effeminate activity)
4. screeching at the thought of someone doing something for fun
Thank you! Please use /dpt/ to engage in actual programming discussion
>post code
t. someone who is afraid of posting his own code
AVX is now banned from my projects just to make this tranny seethe.
While getting filtered by OOP usually results in code being static and procedural (ie. an "avoid OOP at all cost" approach to writing code while using an OO language), it's even worse when someone gets "half-filtered" by OOP and starts applying inheritance haphazardly, especially to cases where it has no place.
>>105570819Inheritance has no place in programming at all.
>See this shitty code written 20 years ago?>Yeah, all new code should inherit this slop.
>>105570829It does, but not everywhere.
Code age has nothing to do with it. I work with an enterprise application that has literally 20+ year old APIs and patterns, but they were written by smart white people so it's all excellently solid and stable - you can completely ignore how they work internally and just focus on providing them parameters with the right inherited interfaces.
>>105570886Yes it does, code written 20 years ago, unchanged, is likely obsolete.
>I deliberately make my code suck just to make other people mad
Who gives you money to survive?
>>105570902What drives you to such a conclusion?
Have you ever worked with a well-designed codebase?
>>105570986The fact that software that's relevant, gets updated.
>>105570991The software I work on is very actively updated, if that's what you're trying to hit. The point was that the interfaces are very well designed and don't need to change, even if the implementation does.
Surely you have picked up on this and aren't another one filtered by OOP or software architecture.
trustme
md5: b17c5d516d31a0cd59d948a5bb4dc520
🔍
>>105571044>the interfaces are very well designed
Good afternoon, Ada chads.
Reminder that soilangs don't have a LOLITA.
>>105570577based digits
>>105571044Software written 20 years ago was designed for computers that don't have SIMD.
>>105571153Utilizing SIMD is a low-level implementation detail
>>105571200Which doesn't happen automatically. My naive substring search outperforms strstr by 300%
>>105571220And when using your substring search, do you need to provide SIMD-related details, or is that all "under the hood" and you just call it with a string to search through and a phrase to search for?
>>105571311>do you need to provide SIMD-related detailsYes.
>>105571311Yes, I need to call my own function and not strstr, that function must be somewhere in my code.
mort
md5: 809eb3df44190d26b968973471f8c0d2
🔍
#include <stdio.h>
#include <string.h>
int
main(void)
{
char user_input[128];
printf("Enter string: ");
fgets(user_input, sizeof(user_input), stdin);
size_t len = strlen(user_input);
for (int i = 0; i <= len; ++i){
if (user_input[i] >= 'a' && user_input[i] <= 'z'){
user_input[i] -= 32;
}
}
printf("%s", user_input);
return (0);
}
>>10557135611800000000 by tomorrow regardless of my actions.
>>105571358Don't drop your garbage here.
>strlen>check character for character
>>105571394Not checking for character means you'll turn a space into a null terminator noob!
hexes
md5: eb9a4e0fb9638e87ccb6ac2fb7773a6e
🔍
>>105571427I accept your concession.
>the
>nocodeshitter
>does
>not
>understand
>the
>code
>>105571358Good job.
Don't let the resident schizo demotivate you (
>>105570577).
Now try to do it without using strlen.
>good
>job
Christ, /dpt/ is yet again filled with incompetent autismos.
>>105571449Clearly you don't understand if you are pointing out checking char for char as an error when you have to in order to check for not char ascii values before attempting to subtract 32 from them as an error in that code.
But, like I said, I accept your concession.
And remember to have sex before you die.
>HE
>STILL
>DOES
>NOT
>UNDERSTAND
>THE
>CODE
>AND
>IS
>TOO
>PROUD
>TO
>ADMIT
>IT
It's YOUR concessions that are excepted here, autismo. It's your ignorance on display that makes everyone here with a triple-digit IQ laugh their pants off.
>>105571526I don't doubt for a second that you actually believe this. I'm very sad for you, actually.
current
md5: 3534cd9bf3ce6a106b5a9883dcd412e3
🔍
I don't need pity from the incompetent.
(That's (You)).
>>105571571>>105570577>3. bitch replying without quoting (passive-aggressive effeminate activity)
>>105571571>the undersocialized keeps posting hexidecimal numbers because they look more hackerishFascinating.
>autismos still not understanding no one cares about their opinions and judgements
>>105571613>doesn't care>keep replyingSad..
>he is such an incompetent autismo his damaged brain is unable to realize that the numbers he sees were branchlessly converted with the algorithm posted earlier
I know retarded people on death row who're smarter than you.
>keep replying
It hasn't fallen enough.
How hard is it to build your own chromium fork?
he gets humiliated multiple times in every thread but he just keeps going, it's a fetish
he's quite easy to filter too so I suggest you guys look into that...
>>105571526Just making sure, but when you talk about triple digit IQ, you don't believe that you're part of that set, do you?
>humiliated
Back to projection again, Ivan? But then again incompetent autismos are not capable of feeling shame, so at least your behavior makes sense.
>>105571741Spend like 30 minutes cloning the source code.
Change one trivial line of code.
Spend the next 12 hours compiling it (this isn't as much of an exaggeration as you'd think it is)
So ez, just annoying.
Well, I wrote the code, it works, and I'm laughing at you - so, yes, I AM part of that set, and you can do naught but cope and seethe about it.
>>105571775It is an exaggeration, just own a google's compiler farm and it will take minutes.
>>105571637>he spent a week saving 5msgrim
>>105571788mine works too? what exactly is your point?
>>105571358Instead of using checks, call toupper unconditionally. It's easier to read, doesn't have magic number and probably faster.
>>1055717945ms saving is good (when it is used by someone else than you lmao).
>>105571811>libc function>ever fasterlmao
>doesn't doubt that the code works anymore
>doesn't doubt that the code is faster anymore
>only doubts how much faster it is
I accept your concessions.
>>105571819what use do you have for extra time? you don't do anything.
>>105571835Considering your response to my post, your brain also doesn't do anything, including existing.
>>105571845I accept your concession :(
>>105571809Yours works by having to iterate through the string (the strlen, which has a good chance of loading your string into AVX registers) once, so that you can iterate through the string again (but this time character for character). If you were smart you would load each part into an AVX register, perform conversion and NUL-byte check, and write the data out again without any further memory references.
>>105571853Do the math of 5ms times billion once the science foundation that you donated your brain to before you were done using it decides to give it back to you, and you MIGHT get the joke, retarded spastic.
>>105571859For someone supposedly so intelligent, you sure ignored the option of not using fgets and using something that makes finding the total string length in bytes trivial.
>>105571859By smart you of course mean learned.
You should probably start making this distinction at some point in your life.
>>105571867>long sentencedidnt read desu
>>105571885Well sure, you have to get your brain back first.
>>105571873Doesn't really matter because generating the mask and counting trailing zeroes is trivial to do in the AVX domain.
>>105571876You already had the chance to *learn* it by looking at
>>105571427. The fact you didn't means you're not *smart*. QED.
>>105571906>extra instructions don't matterokay retard
>Beginner posts beginner shit
>YOU SHOULD BE USING SIMD BITMASKING RETARD
This board has a serious lack of having sex, no wonder it's completely dead.
>>105571929SIMD is basic assembly, you should've learned that before touching C.
>>105571910>he doesn't know that you still need to compare the amount of characters checked against the amount of characters read>which are more instructions than a simple TZCNT that automatically sets EFLAGSFucking dumbass.
>>105571945You had a chance but instead you doubled down like a retarded subhuman you are.
>extra branches don't matter
>>105571934You should have learned electrical engineering before touching ASM, but you didn't, why?
>>105571929He will either leave programming entirely (which is good), or he will have learned to avoid memory references (which is also good).
Are those
>extra branches
in the room with us now? Or are you just being an incompetent autismo again?
>>105571953Because litography has nothing to do with that, computers are toddler grade circuits that can be assembled by anyone (except redditors like you who put the CPU into the socket backwards and bend the pins I guess).
>>105571971>electrical engineering has nothing to do with how computers workI see
>>105571988If you have high enough IQ to be allowed anywhere near those expensive printers, you can pick up electrical engineering in a weekend.
>>105571934>SIMD is basic assemblythis is delusional
>>105572023Lithography isn't electrical engineering, it's chemical engineering. You must not be very smart(tm).
>>105572023You sound like you got filtered.
>>105571934>SIMD>assemblythe smartest nocoder
>>105572048Sorry that you got filtered by registers bigger than 64 bits.
>>105572079post FE exam results, RIGHT NOW
>>105572102Didn't know you must pass a FE exam to conceptualize registers bigger than 64 bits...
Adding Rust to my C baremetal project.
Got FFIs working in both directions.
Next step, port queue code to Rust generics. Port printf code to use Rust macros.
Can't stand reading my own C code and more and don't want to deal with C++.
>>105572211if rust does the programming for you you arent really a programmer
file
md5: 3760472534ad8b8f445d0015b3a2ae10
🔍
is it normal when you're first learning; to type so many comments that you can read the cunt like a book?
otherwise I go back the next day and completely forget what the fuck I've written
>>105572050Lithography is a combination of various disciplines you fucking retard.
>>105573730its ok i guess
>>105572211You should be using Hare.
>>105573730Does it matter? Whatever helps you learn and retain you should be doing.
>>105573768I just never see verbose comments on code it's always jut a vague description 'this function returns a string for something else' and then a bunch of random shit.
Just wondering if there was a reason for that or if it's just autists forgetting that other people can't read their thoughts.
>std::forward<decltype(args)>(args)...
holy fucking bloat. imagine passing a bunch of parameters without having to chant some unholy incantations.
did some factorial in java, now its on to htdp
>>105573795OpenBSD requires both grammatically correct and verbose commenting in it's official binaries.
That's why it's the home of the white man.
But yeah, I'm sure your comments will increasingly become less verbose as you progress and the people reading them will be at the same or higher knowledge level, so it won't matter to them either.
When you're learning commenting is good. Both for the reason you stated, it helps with remembering, but also the act of abstracting what you're doing in concise language helps with retention.
ok just checking because I thought I might just be a retard and unable to remember more than a few days into the past.
string hello="hello"
//this code is declaring a string, which is a sequence of characters in the english language, unless you're russian or smth idk. anyway back to the story, its stored in a variable of string type and like, its called 'hello'. that's set equal to the actual words and shit you need to store in the 'hello' box. in this case that thing what needs to be stored and that is called "hello". Hope you had a nice day.
>>105573730comments that rich mean someone is struggling to even look at code
>>105573795verbosity aside, good comments should explain purpose (the 'why', not the 'how')
the 'how' is described by the code. the comments should complement, not duplicate code
>>105574215Sometimes I write some shit and then look at it and go 'why is the syntax like that'
so im using the comments to drill in that this is what each thing in the line does. so hopefully it goes into my brain.
I just started learning last week, so it's not like this is going to a dev team to maintain
>>105574215>>105574255I want to add that I'm not good at following code through visual studio or recognising what the fuck anything is.
so I'm using comments to annotate it like a diagram.
>>105570523 (OP)>try to learn rust, "Requires visual studio C++"Is the Visual studio C++ thing just for windows?
this language is for shitty codes who need guard rails and are unable to learn C++ so they learn this language.
>>105572211>don't want to deal with C++exactly what I am talking about. What is it you don't like about C++ the pointers? Its just a memory address? The Arrow for streams? If you learn C++ every other language becomes EASY. Don't give up on that.
This Rust vs C++ war is garbage. It uses C++ on windows. idk about Linux, It looks cool but I have to jump through so many hoops just to debug. Learning C++ std lib, and windows.h is a bigger payoff. Even script kiddies use windows.h
In light of the whole xserver shitshow, is it still a good idea to write your own x11 window manager
>>105574537You can't just fork open source software chud
>>105574692I'm just worried people might call me a "chud" if I make a window manager using "le old and outdated and now problematic" x11
Granted, I'm not using the autistic fork that's been causing controversy cause imo x11 is good as is
>>105574779They are already calling you a chud for not using the prog derivative of the prog derivative of the prog derivative of X11 that won't come out for 5 years. You're on the wrong side of history for not being born 5000 years in the future.
>>105574779Gayland can't be considered a replacement yet so I don't see the issue. What are they gonna do anyway
>>105574779You're either completely clueless or very effeminate
>>105574946>completely cluelessMaybe
>very effeminateAre you trying to groom me?
>>105574965>>105574970Stop being a pussy-whipped bitch and make an X11, AGPLv3 window manager
>>105574999It'll be zlib/permissive or public domain. Take it or leave it
>>105574999Have you looked at the protocol? And the transmission method? X11 needs to be murdered, alongside you.
>>105575019>X11 needs to be murdered, alongside younta but wtf
Violence isn't the answer
>>105575041It's ALWAYS the answer, even just for revenge purposes.
>>105575012>cuck licenceL
>>105575019When will RedHat shills go back?
>>105575052>implying GPL isn't the biggest cuck licensekek
The only good license is no license.
>>105575052Once you're hanging from an open-source tree.
>>105575073>GPL: release your code so that other people might profit from it>no license: it's all a designated shitting streetOK, cuck.
>>105575095>open source is bad actuallyHello Microsoft, Nintendo, Apple, etc...
>>105575173Explain how public domain code is associated with jeets? Are you implying that public domain libraries like stb, which are widely used in game development, are jeetcore?
const serviceflight = () => {
return new Promise((resolve) => {
setTimeout(() => {
if (altitude > 650 || alttiude <= 700);
resolve(openflap());
resolve(closegear());
}else {
Promise.try = (reject) => {
try {
serviceflight();
}catch{
reject();
resolve(closeflap());
resolve(opengear());
}
throw new Error("unreachable");
}
},
});
};();
>>105575194You've just provided the answer yourself.
>incompetent jeets take someone elses code>don't pay a dime>internal companies make the big bucks>original writers aren't paid scraps
>>105575247Explain how coders who publish their libraries under the GPL get paid for their work.
I'll wait.
>>105575271By forcing companies legally to release their own code or negotiate a new license with the original writers (that would also include compensation).
>inb4 doesn't workI can still hear nVidia kvetching about them being unable to use GPL symbols in the Linux kernel. It's working as intended.
>>105575293So no one uses your code then, got it
Maybe that psychopathic redhat shill was onto something, FOSS kinda sucks...
>>105575321>So no one uses your code thenThat's fine. At least the jeets then have to put in some real work.
>>105575326But how are you getting paid then?
>I'm fine with people not using my code and instead making their own, potentially better than mineThat is code cuckoldry.
>>105575364>But how are you getting paid then?Who cares, as long as jeets aren't getting paid either for stealing your code? Or what, does being a BSD-license cuck suddenly put food on the table?
>potentially better than mineSounds good to me. We've regressed in the last thirty years.
>>105575405I don't use the BSD license either though.
GPL doesn't put food on the table either.
And lol, you're basically admitting you're a cuck
>you're a cuck
>because
>because
>because you just are OK?
I accept your concessions.
>desperate redirection
That's another concession accepted.
reg_sz
md5: 26d553eddfbff172e5daafb4a70a6fe7
🔍
While winning.
index
md5: ad5f16e52573a77cc4d597e844491ea7
🔍
While coping.
>>105574537It was never a "good" idea to write your own window manager.
Posted from my own window manager written with my own text editor.
>>105576397I'm going to use that for the next /dpt/.
I'm creating a gui app in python QT and even though its supposed to be on the simpler side its hard to keep track of where everything is.
And to access certain controls/widgets I have to do something like self.view.nestedpanel_1.nestedPanel_2.label or something like that lol
Is there a better to go about doing this? picture show my current layout
>>105576709>pythonNo one gives a shit.
>>105576709https://caseymuratori.com/blog_0015 (Semantic Compression)
https://caseymuratori.com/blog_0020 (Storing the Expansion State)
>>105576799I stopped reading after I noticed the amount of rambling there was in this
>>105576709dunno shit about qt, but i would guess it has something similar to Tk's textvariable option to bind a widget to another object and changes will flow back to it. ie. you change a string variable and all the labels bound to it will update without you mucking about with their paths.
On the other hand it's not like alignment is really needed since most memset implementations don't even try to store the values with NT hints ... but still, VPXOR and VMOVNTDQ are trival to implement, yet sepples STILL believe their nonsense is superior to C.
>inb4 muh REP STOSB
Enjoy your cache thrashings.
Man dpt is so shit these days I don't even feel like sharing code here
>implying a nocodeshitter can share code to begin with
>>105578693what makes you think that a smug anime image and a generic insult makes you cool, while you're unable to address me directly?
It would begin with me having shared more code than you ever will in your entire life, and ends with me understanding the difference between ability and choice.
>>105578754Where's the smug anime image and random insult? What you are doing now is vagueposting
>ends with me understanding the difference between ability and choice
It's almost like you don't.
>>105578775Give me a direct answer instead of murmuring while looking away
>>105578795Or else I'm gonna stop replying, and you will reap the long-term consequences of acting like a child, such as the inability of having deeper conversations, trust and fixing your own mistakes
Oh no. My post will stay at the end of the thread for the next couple hours again. What ever shall I do?
Oh, wait. I know what I'll do: continue winning while everyone else eats shit.
>>105577437
>>105576431very few /dpt/ posters are having fun.
except for me, every day my software grows stronger.
256_kib
md5: f0c2af1a2353fd7987a0b4dcfe1af56d
🔍
>>105579213>every day my software grows strongerFinally someone who listens to me.
>>105575271They offer custom licenses to companies, for a fee, you fucking retard.
License is for the end user, not the author, author can issue any license to anybody, for any reason with any restrictions he wants.
having a quick look at ANSI X3.64
>CSI is the two-code sequence 1/11 5/11 (ESC [)
where the fuck does this stupid character notation come from. I dont even
ESC and [ are decimal 127 and 91
>>105580002127 is DEL, retard
>>105580037oh that's right. I indeed am extremely retarded
thanks
>Need to parse/validate some UTF-8 in C, too lazy to do it manually
>C11 function for it is inherently tied to locales, which I don't want to fuck around with
>C2y adds a function NOT tied to locales
Man, I wished they added this shit a long, long time ago. It'll unironically be 2030 before you can realistically think about using the function...
>>105580235And that function is still worthless garbage compared to doing it yourself.
https://github.com/lemire/fastvalidate-utf-8
>>105580313You should take your meds.
>>105570523 (OP)rewriting my config in nix
>>105580002It comes from the formerly ubiquitous ascii charts like picrel.
jpg
md5: 07a78d154e43010680993a16d05028f1
🔍
>>105580317You should stop being laughably incompetent.
>>105580987Competent programmers don't rely on standards, they define them.
>>105581020Competent humans don't rely on their gender, they define it themselves
>>105581020How would you know, considering you do neither?
>>105581051I'm really happy for you anon, it must have been very difficult to finally accept that gender is defined and not real, because the biological term is sex.
>>105581057Can you tell me how you'd feel if you didn't have breakfast this morning?
>>105581193>implying one energy drink is considered "breakfast" these days
>Drinking caffeine and sugar mix on empty stomach.
I'm really happy to know that you will one day have a heart attack and /dpt/ will improve.
I have five zoomers waiting to take my place in /dpt/.
Things are never gonna get better for you.
>>105570577 (Checked)
Where does one go for comfy programming discussions?
>>105575019This, we were meant to switch between VTs, we have 6 actual terminals, and 6 graphical terminals, you don't need more.
>>105581632Any place that filters obnoxious faggots by default.
For example, collecting reddit downvotes reduces your ability to spam, and usually janitor will clean it up after that.
Hackernews restricts heavily how fast you can post, so you're forced to write longer, less frequent posts by default.
Added smilies to my forum (on top of BBcode).
Yes I ripped them off. Do you recognize from where?
>>105581648>le redditWhy don't you stay there? Thanks.
>>105581674Same reason I didn't stay in the mental asylum that I walked into just to see how you're doing.
image
md5: 63abc4b7ef375d0c081b834cda730cee
🔍
>>105581632My forum (when it's done)
>>105581723>Deploy the illegal 1s and 0s
>https://github.com/lemire/despacer/tree/master/src
>Fastest solution is having a LUT despite it being quite big
I hate computers.
>>105582327Have you tried using vectors?
>fill three vectors with \r, \n, and 0x20>compare string with each>move mask to GPR domain>POPCNT each register>dst += 32 - total
>>105582405The code already uses them. The table is like 512KiB for SSE, it would be way bigger for AVX, so I bet it would actually be slower outside of benchmarks.
I played around with scheme again today and made this, I hadn't tried scheme in a while
Just hit 5 kyu on codewars
file
md5: a4d2c3d74606f64c349b48314687d2e4
🔍
I just mixed the worst of Java and C++ together
file
md5: ebd7ee78e330fb6d75a199626647f371
🔍
>>105583132oops, wrong picture
this is the little monster
>>105583143As someone who believes that verbose code is suboptimal, what you've cooked up is certainly... intriguing
What C++ standard is your code using?
>>105583181C++20
And it's about to get worse if I ever want to implement recursive wrapping and or a builder pattern
Rust learner here. I have written some baby CLI projects and talked about Rust in /dpt/ before. Also, I am about to start chapter 17 on the web version of The Book. It's the Fundamentals of Asynchronous Programming chapter.
This chapter is not in my physical copy of the book, so I guess it was considered important to update the web book to include it right after chapter 16.
I will finish this chapter today because it for sure seems to be important, but I was wondering if, after finishing this chapter, I can jump to the final project and then drop the book?
How important are the contents of chapters 18 - 20?
>>105583765>>>/r/eddit>>>/h/ackernews
>>105583765dude in over 20 years of practice i dont think I have ever read a programming book front to cover. just pick what you find useful
>>105583765People without discipline will tell you that they don't bother with books. Books are great, or rather great books are great, bad books are a waste of time.
In general and without having read that book, a final project is there as a comprehensive test.
But there's no rule that you can't jump into the project right now. If anything it's probably a good thing to start working on it as you work through the book. Any gaps means you can revisit that section, or even learn it from somewhere else. Some books are good at teaching one thing but bad at teaching another.
>>105583866>i dont think I have ever read a programming book front to covernot even the bible?
>>105583895ok I'll concede that one, given the known fact that God programmed the world on Symbolics Lisp
>>105583895I became Atheist halfway and dropped it.
>>105583894>>105583866In all honestly I can't help but imagine it like leveling up in a video game. It might be reddit or childish but I like to think how you can even read books and skill up in some videogames, why is it different from real life.
Of course, as one of you said, especially on books like programming books, lots of times I just skim through contents and come back to earlier chapters if needed. It is not like reading a novel or something like that. But I still at least try to read from back to back.
>>105583932why program? the program will write itself
>>105583895only lefstits would actually read all of the bible
>>105583932You became atheist because you read it only halfway
How do OpenSSL manages to sign RSA in 0.006s?
The best I could do is 0.098s, and 0.060s if I turn off fault protection
>>105584526By not using K&R level code to do it.
>>105584822K&R level code takes 1.7s, I'm losing on some micro-optimization
Even checked for cache misses but there's none relevant
>>105584883Your code is K&R level.
Encryption is also useless security theatre so you can simply delete all that code and it will be fast.
>>105584925That's such a silly insult anon, I could pretty much see that as a compliment since K&R were the creators of C
It's fine if you don't have anything to add
>>105584939Standard C library has 0 useful functions and half of C's features are worthless on top of being overly obtuse, of course C's creators are morons. And you are a moron too.
Just look at this faggot, his C code is slower than Python that just imports OpenSSL. This is how bad C is without discarding 99.99% of what constitutes C, and writing half of your code in assembly.
>>105584983It's fine if you don't have anything to add anon, won't think any less of you because of it
>>105584996It's also fine with me that you will stay a K&R babyduck forever who is too afraid to look up openssl code, even for an obsolete scheme.
>>105584939>K&R were the creators of Cof the official first C Programming Language Book*, not the language itself. Dennis Ritchie invented C. K&R just documented it and taught everyone how to use it
>>105584983NTA but bad bait
Also isn't openssl written in C
>>105584526>"do manages" instead of "does manage">doesn't show assembly codeKindly piss off.
>>105585183Dennis Ritchie was the R of K&R.
>>105584983>Standard C library has 0 useful functionsIt's got a few useful ones, like memcpy(), but that doesn't mean it has a lot for doing RSA signatures.
The most useful thing for that tasl is a bignum lib.
>>105570523 (OP)My fellow code monkeys. Performacelet here. I've built a little program that draws some particles n sheet. It's all nice and multi threaded and works pretty well but I was wondering if anyone could answer why allowing Go to use all my cores generally gives me a bit lower but more consistent frame rate than limiting it to 3/6 cpu cores, which generally gives a bit higher average frame rate but has spikes up to frame rates that are like 50fps higher (sometimes holding there) than using all 12 (6 + 6 hyperthreading)? All the reading I've done the advice generally seems to 'just play with it' to get the desired result with very little concrete reasons to why it is like this?
>>105585751>like memcpy()Lol no, it's interface is way too generic:
>>105579224
>>105585767>GoFound the issue.
On a lower level: synchronization and context switches.
>>105585803Sweet, thanks for the resource. Go's performance has surprised me a little. I did a single threaded version before this one and it was around 90% of the speed I got out of C. A C skill issue yes, but still kinda surprising given it was basically the same line for line and a language with a GC + Runtime could get so close.
>>105585833It depends on what your program is limited by. If most of your time is spent in the kernel, and you don't or can't optimize that out, then naturally both languages are going to perform similarly.
Anyone got that "the last digits of your post decides what project you do" pic? I'm bored and can't think of a small project to work on
>>105579213I'm having fun but I really want to move onto the next feature I have planned
>imgui still doesn't have wrapping multiline inputs>decide to just use a text editor extension instead>it doesn't have mouse highlighting>code it myself plus some nice QoL featuresI'm done with little frontend crap but it was worth it. I even updated my ui schema so it isn't a schizophrenic mess!
>>105571358What does size_t do again?
>>105571358>>105571358What does size_t do again?
So where's that cockmonger who made that retarded claim about memory being returned to the kernel when the size is above 128 KiB? I'd like to feed him his own intestines as I pour Bourbon up his arse.
Capture
md5: b637467dfec6e1823e9d04eaa1951f43
🔍
>>105579213I'm having fun. I get a dopamine boost every time I mark another function green.
>>105586491it's the type that array indices expect or implicity convert to
>>105586801love that theme
so comfy
so soothing
>>105586479size_t is just a typedef for an unsigned integer that is large enough to represent the max size something can be.
Or more practically, 32-bit on 32-bit systems, 64-bit on 64-bit systems.
It also gets used for array indicies because the max possible array index is the same thing as above.
Anyone use their own MCP to increase Cursor's context window and circumvent the 120k limit on Claude's models?
https://github.com/ogoldberg/gemini-context-mcp-server
>>105570523 (OP)Any German programmers here?
>>105586801you got the palette for this color scheme? it's so good
>>105587235this
>>105588055Not quite the same but looks similar to the 'organic green' theme in Emacs.
>>105587235>>105588055It's just the default theme for Ida. Green background means I marked the function decompiled. Their dark theme is terrible for some reason. It does let you pick the color for every little thing if you are so inclined but I am way too lazy for that.
>>105588188that one's nice too, thanks!
>>105588195>It's just the default theme for Ida. Green background means I marked the function decompiled. ah, thank you. well, that's gonna help recreate it, at least :D
>>105585195You have to define "C", because majority of "C" code is slower than JavaScript due to v8 devs actually giving a fuck about performance unlike cniles who think that writing a plain char by char for loop is enough in 2025 because "muh C is faster than Javascript" (self evidently isn't when you're retarded).
Cniles, when encumbered with JSON, write their own or download slowest parser they can find.
JavaScript programmers benefit from Daniel Lemire's parsing gigabytes of JSON per second, without thinking about cniles or how difficult JSON is to parse.
You clearly aren't competent enough to write fast code, stick to JavaScript, that way your code won't be slowed down by your retardation, because it was designed with retards in mind.
To add to that, Node.js 18 moved to pic related, and remember, cniles tout libcurl as holy grail.
>parses json faster than cniles by calling one javascript function
>parses urls faster than cniles by calling one javascript function
what's next?
>>105588389Are you trying to kill these threads with your endless daily retarded takes? Idgi.
>JSON is difficult to parselmao
>>105588427Why don't you show us what libcurl function they use, and then I'll show you where it fucked up?
>>105588427Surprising that a hyper autistic url-parser is faster at parsing urls than a swiss army knife.
Nobody associated with C could have predicted that tools which do one thing well are really good.
rome
md5: ecd6ba56d64e992df61674f838c0fb0b
🔍
>>105588456Why don't you clone curl repo and figure it out yourself because I don't give a fuck about your schizophrenic opinion.
>>105588452Yes it is, now post your own parser and tell me what pic related would look like if we added your Dunning-Kruger code benchmarks to it (I am not hopeful at all, don't sweat ever responding at all, retard).
>>105588477I can sleep fine knowing that the benchmark is false and that the Ada people are lying. Can you?
>>105588477Why would I write my own JSON parser when I can just use yy for free, you absolute inbred. PLEASE take your medicine.
>>105588473That hyper autistic parser is used by Node.js, making generic JavaScriot faster than anything that uses libcurl. Think about that for a moment, hopeless midwit.
>>105588493>use yyDeprecated by json, read my post before outing yourself as a vantablack nigger.
>>105588496No one uses libcurl for serious projects in the year 2025 you absolute spastic midwit.
>>105588513Indeed, nobody uses C for serious projects.
Reminder that, for a company that supposedly uses Ada, nvidia sure has no idea what they're doing.
>>105588496I thought long and hard and realized a sepples library is not exclusive property of jabascript.
>>105588520Nvidia drivers are proprietary only because Linux Tech Tips dude who made Linux would revert to old self and ask them why their mothers gave birth to them by squatting on the edge of a cliff.
>>105588535And it doesn't even help.
>>105588525Too bad it's exclusive to high IQs which you aren't, enjoy continuing to use yyjson in 2025, pajeet.
I have gone to a forbidden wonderland in memory? It just keeps going.
template <typename T>
void foo(T t) {}
template <typename F>
void bar(F f)
{
f(5);
}
int main()
{
// bar(foo); // doesn't work, fails to deduce template at call site
bar([](auto a){ foo(a); }); // work, deduction deferred to bar
}
Any way to avoid using lambda at call site? Calling bar(foo<int>) is not an option as the real code is more complex and uses multiple types.
>>105589281>he doesn't dereference his char*
>>105589317FAAAAAAAAAAAAAAARRRRRKKKK
>>105589287Apparently declaring foo as a class or lambda does the trick. If it's stupid but it works...
>>105589664Oh so suddenly C++ isn't as easy to parse as it was claimed around here?
>>105570523 (OP)>Once a blue moon I want to play video games because I'm tired and look to relax,>For most games you have go through "stores" (DRM platforms), >you need that malware installed, create an account that can be locked, "social features" to disable, ads, opt-outs, and probably some more I miss,>they are no longer bought at a store and double clicked on shortcut after installation>For non-addicts it's actually enough hassle to not bother, and I give up half-way realizing that I could be productive instead of wasting time and money!Thanks Gaben, you're improving my life.
Today, I may try coding in something unusual like fish just for novelty.
>>105590054Productive for whom again? Hopefully with nice enough compensation?
>>105590054Could you take your retardation to any other thread?
Because when I want to play a game, I simply look it up online and click "copy magnet", then paste it into my torrent client.
>>105571358THANKS, THIS PROGRAM IS REALLY USEFUL
>>105589677>now pretending by parse he meant read by humans
>>105589287>>105589664because foo itself is not a specific thing, it has no rules to derive what T should be, if foo is an instance of a class then foo itself isn't a template and is just a single thing to instantiate bar with
this is what requests for an overload set are about
>>105590345Took you a while to come up with most niggertarded cope you could come up with. It's almost as vexing as most vexing parse.
hey regdump schizo
does your mangus opum just print nerdy looking numbers and strings or is there any actual output or result to it?
dump
md5: 4569f0c5056bf4f5eb326f9b63b6f22f
🔍
>>1055904031. It's spelled "magnum opus".
2. It's not my magnum opus.
3. The usefulness of the data depends on your competency.
>>105590360Oh no, the most vexing parse. That will slow down my compiled program at runtime
>>105590684Nobody will use your toy program, so compile time matters more.
>>105570523 (OP)Writing my bytecode vm in rust for learning. Then I want to actually try to target llvm
>>105582512most useful scheme program
7f2
md5: 8654e7810e4752dfa56ace4a56ed39bb
🔍
>>105590426so it just prints nerdy-looking shit so you can pretend to look cool on the internet, then
that's actually even more pathetic
>It's spelled "magnum opus".pic related
>retard has opinions
Get in line.
Careful. The retards who don't understand cache thrashing during copies, confuse virtual memory with virtual address space, and don't know that TLBs are shared these days might beat you to death if they catch you cutting their line.
>>105588389I use nlohmann, I don't even know how it ranks in speed, I wasn't in charge of picking that library. It seems to work well enough though.
why do you keep posting a fucking ascii scraper like we care.
Why do you assume I care if you care?
>>105592073Not great, but not terrible either.
https://github.com/miloyip/nativejson-benchmark
>>105591733Oh, and let's not forget those who're unable to read a developer manual for a single instruction, those unable to post code, and those who have utterly retarded ideas about nonsensical heuristics that can change on a whim:
>>105586702This is the true scum /dpt/ is ladden with.
>>105592843>>105592896Reading the responses, the 4chan Rusties are actually more sane than elsewhere
>Let me shill for Rust here...>Hahah jk, I don't actually know how to program in Rust :)
>>105592997I don't mind. They're masochists, and I'm a sadist.
>>105592896This is a good one
I tried using AI to do programming for the first time ever and it's kind of... nice for these boring ass projects that I don't really care about
>>105593709In my experience, LLMs struggle to hallucinate simple shell scripts. The best use for them I found is coming up with the ideas for class names, because while they can be bad at that, at least they are better than me.
>>105593874>The best use for them I found is coming up with the ideas for class namesSame. My names end up being needlessly verbose, LLMs help with that.
>>105593972>LLMs help with thatThey make it easier to write even longer names?
Anyone have suggestions for a private git
host? I'm happy to pay for something but I don't trust Github and Bitbucket just seems overpriced.
>>105595309Depends on what you're asking for.
Even the most basic server with SSH access can be a "private git" server.
Unless you're talking about the full blown web interface with merge requests, an issue tracker, and all that.
>>105592896>Intrusive container-of versionBased practical C programming.
>>105595642fossil is comfy for getting the extras on private personal projects. but if bitbucket pricing is an issue maybe he's thinking bigger than that.
>>105570523 (OP)I wrote a script to trim all of the corrupt chunks out of my beta 1.7.3 minecraft world, and then update the level.dat with the correct SizeOnDisk value.
I'm now upgrading the world to 1.18, but I think while I'm on this project I'll implement multithreaded mca conversion logic.
fetch window property with XGetWindowProperty.
if it's some special struct property, you can cast it or use a convenience function
if the property has an 8 bit format, it gives you a nul-terminated char*
if the property has a 32 bit format, it returns an array of 64-bit elements with random garbage stuffed in the high 4 bytes.
i thought i was having a stroke double checking my types. i wonder if xlib is just retarded and uses unsigned long regardless of architecture or what the protocol itself is sending.
output
md5: 818176623a80268734b30ed7c9e94bf0
🔍
>>105597967Yup, retarded old code.
>/dpt/
>just people arguing and being mean
>nobody discussing advanced Mathematics and Computer Science research
>nobody posting maids
>nobody being nice
>>105599105We're not nice because we're not mentally ill schizos who're completely dissociated.
Unlike you.
>>105599225NTA but you're kinda proving his point
>>105598958At least it's not Wayland
But that's a low bar
Honestly, we need MORE windowing systems, so it's not just X11 or Wayland
>>105599323Tell an actual fucking schizo that they're a fucking schizo, and they will back off, either because they know they can't reciprocate the fitting emotional responses, or because their brains are completely fried and they think there's nothing wrong with them.
Just like you.
See what I mean? Just a feeble "no u". They don't realize how creepy they come off to normal people.
N4G1FCT
md5: 9394a4a7181b815ccf8a9fc55c632d2c
🔍
>no u again
Almost they their mental illness renders them incapable of learning ...
>>105599105>being meanLike, 4chan has the typical snarkiness etc., but the schizos of this thread are just pure aggression, and shut down everything so they can whinge about malloc or literally fucking anything.
It's so tiring.
>invoking religious imagery
Terry would be proud of you.
>>105599541Yup.
Registry dumper schizo in particular.
And the irony of him to call others schizos, lmao
It's telling how he rees at my """no u"""s kek
>rees
That would require literally anyone who's not mentally ill to take you seriously.
Which no one does.
Sorry, but since I'm not mentally ill I'll stick to programming.
>more proof of mental illness
Tartuffe
md5: 57247a1e0e7d14c6f5372e503208a2be
🔍
>>105599616I ran out of images to dunk on you on, so I'm just gonna leave you with this:
You're a delusional schizo who calls others mentally ill, and when presented with the truth, you cry "that's a no u!" like the manbaby you are, kek
You are beyond help.
Maybe consider suicide, it would do the world a favor
stlb
md5: 2de69d56b5d3a7fa568c5b66a3c66a8e
🔍
>I ran out of images to dunk on you on
Luckily I haven't.
>>105599573>>105599584>>105599593>>105599598>>105599602>"I'm not mentally ill">keeps a collection of specifically named images from earlier posts where he thinks he "owned" his "haters" (in actuality, they are proof of his mental illness)
>>105599641>he thinks this is an ownKek, you are indeed beyond help
I don't even care enough about your retardation to be "offended" by a chart of CPU nonsense
>>105599654 (me)
>I don't even care enough about your retardationDon't even care enough about your retarded obsessions*, I should clarify
I mindbroke the regdumper schizo, kekaroo
>>105599664Have you tried going outside and getting a life instead of spending time on a basket weaving forum autistically arguing with people about shit nobody cares about
>>105599664>He screenshots his own posts where he thinks he "owned" someone like someone hanging their shit on the wallKek, how pathetic you are.
Self-prideful, arrogant, hypocritical, retarded schizophrenic.
>nobody cares about
Well, no, only the incompetent autismos in /dpt/ don't.
Serious question: Has this regdumper schizotard tried programming anything other than a registry dumper in the past 5 years or is he too far gone
>>105599707>He thinks I'm seethingI'm not the one who's taking screenshots of people replying to him and calling him out.
>>105599709You see, it *really* triggers people - so I don't mind talking about it.
>>105599731Oooooh more angry filenames and "so called ammunition" (also known as another one of your self-owns), so scary
Lmao
Also you didn't answer the question about whether or not you've recently programmed anything other than a registry dumper.
I think you need to take your meds
>more no us
>again
>again again
I think you need to change your script as well.
Honestly, do you really think anyone will use your registry dumper in the first place? Software is pointless if no one uses it, and practically no one cares about dumping shit from Winblows registries
>>105599757The guys in that screenshot aren't even me, but ok, whatever you say.
Also, wdym by "thirty years"? Mayhaps the reason for your schizophrenia is some 30-year-old petty grudge you have against some rando? Lol
>nobody cares about>again>>105599698>he doesn't know what happened thirty years agoSo the incompetent autismo is also a zoomer. Who would've thunk.
>>105599786And what pray tell happened thirty years ago?
You know what, it probably isn't important, and making fun of retards such as you isn't exactly optimal, so I'll just go away and do something actually productive with my life, while you waste away years of your life programming and overoptimizing something nobody will use.
>something actually productive with my life
>it's likely to involve an LLM
>because that's how nocodeshitters operate
>>105599105I miss the maidposters.
the regdump schizo is a m**dnigger plant intended to tire out the thread with the objective to make it easier for avatarfagging m**dniggers to infiltrate the thread
file
md5: 9437cab14ffdb5616b26d406dfe92985
🔍
Mooooom, json scares me.
>>105599955And the best thing is that it's working.
>>105599955They're polite and they post actual projects.
>>105600008The reason they're polite is because they have brain damage.
>>105599225
>>105600020>being polite is a symptom of schizophrenia
>>105600204On 4chan it is.
typedef void (*none)();
typedef none (*func)();
none h()
{
exit(1);
}
func g()
{
return h;
}
func f()
{
return g;
}
I can't even get this to typecheck
>>105600209... what, do you think, does
none h()
do? Hint: h doesn't return anything.
>>105600592... what, do you think, does
none h()
do? Hint: h doesn't return anything.
>>105600651It's an explicit base case, you should be able to say
func h()
{
exit(1);
return h;
}
with the same semantics (if the typedefs even worked)
>>105600712Good thing the compiler prevents you from doing something so retarded.
>>105600741It's simply
h:
mov r0, exit
syscall
ret
g:
lea r0, h
ret
f:
lea r0, g
ret
I just don't know how to write the type in C
>>105600841#include <stdlib.h>
void h(void)
{
exit(0);
}
typedef void(*t1)(void);
typedef t1 (*t2)(void);
t1 g(void)
{
return h;
}
t2 f(void)
{
return g;
}
>>105600898I'm so dumb thanks anon, to add another function is
typedef void (*none)();
typedef none (*func)();
typedef func (*next)();
void h()
{
exit(1);
}
none g()
{
return h;
}
func f()
{
return g;
}
next e()
{
return f;
}
at least it typechecks now
>>105599743this guy is scared of filenames