What are you working on, /g/?
Previous thread:
>>105570523
>be mathfag
>decide learn2code
>hear "grind leetcode"
>do medium problem "House Robber"
>check other's solutions for lulz
I can't even make sense of what others are doing. It's all For loops with whacky index manipulation or a shitwhack of if-then statements with recursion. Picrel mine, not the best but goddamn at least I can read the damn thing.
>>105601555Just naively solving the problem is not valid. You have to provide the optimal solution. Also forget about a tech job, people with 10 years of exp are still looking for jobs after a year since they've been laid off. The market right now has never been worse in history.
>>105601555what a horrifying "solution". I can definitely believe you're a mathfag.
>>105601609>Just naively solving the problem is not validIt submitted just fine lol, 1ms execution. I'm already gainfully employed, I just wanted learn2code
>>105601329wtf am i reading and why are cniles so dumb
>>105601626>It submitted just fine lol, 1ms executionWho cares, how does it compare to other solutions?
>>105601626The tester only checks wallclock timr, not big-O time nor space. For job interviews, even yesteryear when it was about how you think and not bullshit memorization, your ridiculous code would be a hard fail every time. But other than that the bounds are all they care about now.
Another consequence of their chrcker working like this is that in slower languages like python, it will sometimes reject optimal solutions because the runner was too busy for a second.
>>105601627Hey anon, uh............ I'll take a $5 Gordita Cheesy Crunch Box Supreme, think a medium Baja Blast will pair nicely too. thanks bro.
>>105601647interdasting.
>your ridiculous code would be a hard fail every time.well yea i'm no pro coder, but surely Memoization is a real technique code monkeys use yeah? Big-O time wise, it should be very fast. Probably sucks on space but who cares? Memory is cheap lol
I've been interested in hlasm's lately but can't find anything actual and useful out there, just old stuff for hardware that doesn't exist anymore or the likes.
My interest is to explore the minimum abstraction level boundary that makes a program easily portable to different archs. My plan is to write a compiler that takes one hlasm program and converts the llasm from one arch to another. I want to determine which ops can easily be ported this way and which ones strictly need to be abstracted this way.
After that I want to explore emerging low level patterns and abstract them, but that's basically just macro facilities that even llasms like fasm have.
The idea concept for this exercise is to rething something like forth or lisp within the abstraction of register machines rather than lisp machines or stack machines.
So, any hlasm worth checking out or what?
>>105601684I'm not arguing against your memoization, actually I was impressed you even knew to do that. I laugh at your choice of... key... though.
Also a hint: python has an lru_cache decorator you can use instead of manually implementing memoization
>>105601716>python has an lru_cache decoratorsick, i'll take a look. thanks anon.
Tupling the list just seemed like the easiest way I could "hash" it without thinking too hard.
>>105601760You could also just use positional indices and use a subfunction for the inductive loop.
>>105601691Does LLVM IR not fit what you want? Also I would only focus on RISC, generating good CISC/x86 code just takes so much effort.
>>105600898>>105600967Turns out the same thing without recursive types is just
typedef void *(*func)();
void *h()
{
puts("h");
return 0;
}
void *g()
{
puts("g");
return h;
}
void *f()
{
puts("f");
return g;
}
int main()
{
func k = f;
while (k)
k = k();
return 0;
}
that concludes today's retardation
>>105603433I actually have done a lot of playing around writing compilers and interpreters over the years. I've written some that directly output elf64, some that just emit nasm or gnu as programs, and I've toyed with llvm (both ir and through the api's).
The biggest problem by far with llvm is that it is so ridiculously unstable in a development sense. Every subpoint version radically changed ir syntax AND api syntax AND very often results in the api generating broken IR. Also because of such frequent changes it's nearly.impossible to find the right docs, since they can take their sweet time updating them sometimes.
It's very unfortunate because otherwise it has a good abstraction model, though limited to the infinite register abstract machine with ssa, and I'm interested in exploring other abstractions as well.
I know how painful it is to work with x86 but I know my way around at this point. Rather than these backend details, though, I'm trying to explore more around frontend design (so like with tools like llvm ir in that sense, but wondering if there's anything else out there. Used to be c-- but it's been discontinued a while ago), Also llvm ir is more designed as a compiler bsckend when I need facilities to define high level concepts to explore absteactions and their implications (simply through forking a project with a simple enough codebase is fine, too). Ultimately this is a "spiritual quest" to find the Grand Unifying Theory of low level programming on limited register machines.
Maybe llvm's abstraction is it, but I hope to find something "better".
Might just have to write a mini assembler with a simple macro system to get started though
It boggles my mind how tricky it is to write a correct simple first fit allocator with coalescing in C. The cute diagrams don't reflect this at all.
What's even worse is that FP doesn't even solve this problem because it doesn't do pointer arithmetic and mutation of the heap or because "there is no need because we have a GC".
>>105601627Did you know that competency looks like arrogance from a pit? No, you probably didn't.
>>105604528I've messed around with using rustc as a library and it is also very picky about specific versions, same as you describe. I think there isn't a lot of interest in this because "universal assembly" is definitely slower than assembly which is tailored to a specific architecture, and people who are still using C/assembly are mostly chasing the best performance possible.
>>105604675Now you know why fixed-size bitmaps are superior.
>>105605189Do you know a good algorithm to efficiently search the bitvector for a hole? The naive way seems really slow.
>>105605470Fetch vector part.
Negate vector part.
Count trailing zeroes.
If there are none, goto 10.
If there are, see if the subsequent zeroes indicate enough space for the required size.
If they do, goto end.
If they don't, goto counting zeroes.
>>105605653Alternatively you can do a POPCNT first, to see if there are enough free bits in total.
file
md5: f7b5ece7e6a6821fe4c4ccfb0f0f79f5
๐
So this is the power of not using Rust
>>105606969>std::stringstreamAnyone here willing to argue that Bjarne didn't just want to make his own FILE* nonsense with blackjack and hookers and the same old nonsensical memory BS?
>inb4 you can set your own bufferAnd how many people end up doing so?
>>105607189Probably the only real reason was so he could use the << brain damage.
std::cout << "here1" << std::endl;
my_1000_line_function();
std::cout << "here2" << std::endl;
>here1
>line 65: 31288 Segmentation fault (core dumped)
>>105607449>1KLOCAh, to be young.
>>105607449>1000Um, what about your 200 micro-functions spread around over several dozen files??
Your're never going to be a professhunul programmer that way.
>>105607449add more print statements.
how much should i be reading other peoples open source projects as opposed to writing my own projects?
>>105605080That was my impression it's a pretty niche topic even among people interested in languages and low-level. But I think it just means the question has been underinvestigated and is worth revisiting.
In that semse C basically acts as a unicersal assembly language, yet llvm is still slower than what gcc produces. One layer of magic is of course all the ridiculous optimizations that came in ovee the years, but a lot of them, like lto, have been available outside languages burdened by the C standard for longer than they've been available in C. So the other axis is the balance of semantic expressibility: too high and the compiler struggles to translate it efficiently, too low and the compiler can't assume enough to apply optimizations, then you have to manually do platform-specific wizardry.
But is, say, C, really the right level, based on its achievable speed? Some llvm languages get close despite being higher level and despite the inherent llvm overhead. Forth is far simpler, retains basically assembler-like machine access, yet can be seen as being as high-level as lisp. Despite being limited by the stack machine model, it can be pretty fast, but not C speed on modern machines.
Lastly, it remains true that no matter what language you use, you will always have to write platform-specific code or rely on lubraries that do (i.e. beyond the language itself being platform specific as in specific assembler languages) such as through syscalls or some hardware communication like cuda.
>>105607724Only as much as required for inspiration for your own projects
>>105608027Haskell had pure functions since 90's, guess what C got in its newest standards and why it was faster than Haskell before it got ability to optimize beyond what it already could.
>>105607724You normally use them as reference, rather that just reading other people's code for no particular reason.
>>105608274Most code is shit as a reference unless it is provably state of the art.
E.g. luajit if you are building your own jit, Lemire's SIMD solutions for unicode, url parsing, json parsing, GCC if you are building your own compiler...
>>105608336Not necessarily in a grandiose sense like that.
Maybe you're writing a plugin for something, so you reference how other plugins work.
Maybe you're implementing a protocol/standard and see hoe other people handle some particular edge case.
Maybe you just want to know what some library function you're calling is doing.
>>105608376Why would I be writing a plugin for something?
>>105608383After posting that, I realised how hyper-aggressive it really was, and that I'm talking to the resident schizo.
Can you just kill yourself already?
>>105608387No I can't, now explain why I would try to bloat existing software that I chose to use because it is already perfect.
>>105608274>break project into discrete sub-tasks>for each task, ""reference"" similar existing solutions>project now finished
>>105601261 (OP)> LISP> our language can do XYZ, and much more how cool!> except we restrict almost 50% of performance of the actual hardwareWhy is it considered a novelty? Anybody can make a super extensible language if you are just willing to ignore the nature of computers itself.
I like LISP macro capabilities, the ability to modify the language itself, the interpreted nature, etc but what's the point of these features if the actual primitives are 50% slower?
"State" and "Process" are two fundamental aspects of computers, treating "state" as some sort of boogeyman is a retarded concept.
> muh you can still use stateThe moment you start introducing state in a lisp program, the entire paradigm starts to break apart, the language itself discourages it, which is a part of the problem.
And yes, resistance does matter. For example, Zig has this retarded concept that pointers can never be 0 initialized. You have to retarded if you think this is a good idea, and no introducing a specific syntax for 0-able pointers is not a solution because the language itself starts to break, if those are used. Same thing happened with const in c/c++.
>>105608443Lisp is compiled to machine code, not interpreted.
Good compilers like sbcl can achieve c speed in numerical code and roughly java speed elsewhere.
Lisp is actually better for low level than c is in many cases. There are several extensive reports about it from.various actors who used it this way in prod. Google is still a thing you know.
>>105608443States are the default way to do things in lisp. Haskell is not lisp. You don't seem to have any idea what lisp is.
>>105608491Again, being compiled has nothing to do with what I am talking about. The very name: "LIST"Processing language says it all. The catch is, memory is not a list, it's a sequence of cells.
So, if "I" as a programmer knows that an array is the "perfect" solution to the problem at hand, the language completely falls flat on its face.
And yeah, there might be some specific way in different dialect to implement that data structure, but then the elegance is lisp is gone. We are back at square 1.
>>105608491>c speed4-8x c runtimes on benchmarks game.
it's a silly battle to fight on a planet that produces as much javascript and python code as ours.
>>105608496I assumed SICP is the goto resource for understanding the "philosophy" of lisp. And that book has entire chapters dedicated to why you should avoid using state, and only use at specific areas.
>>105608491> Lisp is actually better for low level than c is in many casesYeah, and the C code uses "linked lists" for every structure to make the comparison fair.
Even ignoring that, everything that you can write in LISP can be done at the same performance in C, if not faster. However, the opposite is not the case.
>>105608515> it's a silly battle to fight on a planet that produces as much javascript and python code as ours> It's a silly thing to create good things, because everything else is slop. Fuck off
>>105608510Lisp has native array support in the standard. Not only that but they can use unboxed elements, support multidimensional layouts, custom indexing and stride, slices, views and more.
You are a clueless backpedaling retard
>>105608563Well, that's certainly an interesting way to read that sentence.
>>105608563Daily reminder: if your C code depends on libc in any way, it's slop, and slow. Stick to JavaScript.
>>105608515Benchmark games is codegolf and only a few tasks are numerical. Notably regarding golfing, many programs are not updating for multithreading. In the singlecore comparisons, the averages are closer to 3x than 5x, suggesting this also affects lisp programs vs c programs as an example.
It's trivial to write the same numerical code on your computer and benchmark yourself. Though likely far beyond your capabilities.
>>105608523sicp uses scheme, not lisp
>>105608622sicp uses every possible lisp since lisptards are the distrohoppers of programming languages
>>105608533Lisp allows generating, compiling and executing arbitrary machine code so that isn't any more true than any of your backpedaling attempts so far. Cry more.
>>105608628Which still doesn't match C speed even after you annotated it to be less legible and more strongly typed than equivalent C code.
>>105608625No, it only uses a specific scheme dialect. It uses no other lisp whatsoever, nor any of their concepts, and barelt touches on concepts like lisp-1 vs lisp-2.
>>105608631Who said anything about annotation, schizo? Are you retarded on top of illiterate?
>>105608643I did, LISP is trash even after you make it more verbose than Java. Slower than Java too. Just give up, because I accepted your concession long ago.
>>105601261 (OP)Why won't Tkinter load on my Linux? I tried to fix it but it still won't work.
>last post I made was >>105607496>in the meantime people accuse one another of being the, quote-on-quote, "resident schizo">a.k.a moiIt's kind of like being Gestapo - no one knows if it's me or not. I like it.
file
md5: f8a460db53685b2a56d75665cd142d53
๐
Filtering unnecessary info and cutting the file into bits made processing a lot faster. Probably a very simple and common thing to do but i feel like a genius for doing it just now.
>>105609056Wait till you find out how fast your program can be when you ditch JSOY format.
>>105609200sad;y every API in the world uses it. Even if i were to translate it into something else to make like easier i would still have to interact with it. jq makes it easy anyways.
>>105609200json parsing is actually much faster than storage nowadays. Of coursw binary purpose-specific formats are best, but json is a good format for small datasets. Very fast and not that large.
>>105609242JSON is parsed at 4GB/s+
Storage is 10GB/s+
Network is 50GB/s+
Fuck off nocodetranny.
>>105609282Your tranny incompetent handwritten parser doesn't count.
>no code
A story as old as /dpt. Yes, it counts.
file
md5: 9dfe244163981b59c87c1f0cb36d008a
๐
For some context. The top is me doing my thing on a chunk of the big file and the bottom is doing the same directly on it. The big file is 750mb and a chunk around 1.1mb.
>Gernab
Opinion discarded with prejudice, do not respond.
>>105607597King shit right here
>no code
where's yours? you have never posted any of your code, probably because it would be relentlessly mocked by people who actually know what they are doing. I can't imagine a more worthless existence than yours
>>105609362I can't follow this argument. What's the claims made by both parties here and why are they disagreeing?
It's very, very, VERY simple, nocodeshitter: you made the claim 4GB/s+ is slow, but you can't provide code that is substantially faster. Therefore, you lost, and in a just mongolian basketweaving forum we could vote on your IP being revealed so that we can remove you from the gene pool.
But unfortunately this is 4chan.
>Schizo meltdown where they stop replying to posts
Is this related to some kind of troon thing? I've noticed that's something they do in other threads on here.
Having one mental illness, it's not a leap to think they have a 2nd, so I propose we refer to him as the schizo troon now.
>Code that's substantially faster
You just mmap the binary file instead of using JSON. That simple. I expected more of you, but you're too mentally ill to remember that mmap does more than allocate memory.
>>105609545>Therefore, you lost, and in a just mongolian basketweaving forum we could vote on your IP being revealed so that we can remove you from the gene pool.Are you seriously advocating for doxxing
>no codeAnother concession being accepted, nocodeshitter.
>>105609580Yes. That would be absolutely great.
>>105609589That's against the rules dipshit
What exactly confused you about
>But unfortunately this is 4chan.
?
>>105609592He's a moderator on this board, so no, it isn't against his rules.
>>105609596Then leave 4chan if you hate it so much lmao
Nah. I seem to REALLY rustle jimmies just by being here.
>>105609545>Therefore, you lost, and in a just mongolian basketweaving forum we could vote on your IP being revealed so that we can remove you from the gene pool.This should happen to you instead :^)
That's the nice thing about votes: majority counts, not autism.
>>105609603If that were true he'd doxx everyone in one of his schizo meltdowns
(Assuming moderators have access to user IPs)
file
md5: 0fef90494cd0cb5bc0dd18cce953adae
๐
Who is accusing who of what?
If you want i can do the same what i did in
>>105609462 on two other systems, one with a weaker cpu than the other but same memory speed. To check if its bottle necked by CPU or RAM.
Is that what you are arguing about?
>>105609625The majority would vote against you, stop being delusional lmao
>"stop being delusional", said the incompetent autist
>>105609629Your test is completely pointless, because you're using jq and not something that uses simdjson, jq is slow.
>>105609646I'm not any of the guys in that screenshot, but OK, keep being delusional
>it's not me, therefore the message doesn't apply
How many times am I supposed to repeat the phrase "incompetent autist"? Just be honest.
>>105609648Wouldn't a slower program exaggerate the bottleneck? If anything it would be better to see where the bottle neck is this way, right?
>>105609646>He screenshotted an anon making fun of him and calling out his schizophreniaNice self-own you idiot
>>105609657Until you realize the phrase actually fits you more.
>>105609664>05.46Go to bed, you fucking schizo.
>he actually, factually thinks that's not my post
Obligatory "incompetent autist".
>shit all over the street
>my presence on this feces filled public street seems to bother everyone for absolutely no reason, peculiar
>>105609681It isn't now :^)
>>105609681Nah. I ain't an "incompetent autist".
You're just schizophrenic.
>the incompetent autist is delusional now, too
QED.
>my presence on this feces filled public street seems to bother everyone for absolutely no reason
OK, and?
>>105609712>reee you're delusional not meSorry. I make the rules. You're delusional.
>OK, and?K pajeet
>I make the rules
So where are the doxxing votes?
Retard.
>>105609721>reeeee I want to doxx my boogeymenGet help
>OK, and?
you are the outcast here, no one likes you and if it were up to a vote you would be exiled immediately. your violent fantasies about other anons here are meaningless when in reality you would be the first one to go.
>reee I can't enable doxxing because then I'd be murdered in my face
QED. Again.
>>105609661It's not an exaggeration. And disks are too fast nowadays for 100MB/s json parsers.
Shitty chink laptop SMR HDDs that spin at 5400RPM can read at 100MB/s if file isn't fragmented.
Oh, no. Incompetent autistic nocodeshitters don't like me. Stop the presses.
>>105609740>he actually, factually, wants to doxx and murder peopleOh look, the incompetent autist who calls others "incompetent autist" is a psychopath who belongs in jail.
QED.
>>105609747>He thinks he's a programmer and that his boogeymen aren't>He actually, factually, screenshots his own posts stillOk nocodeshitter :^)
>>105609748I'd post my IP as a joke but last time I did, I got banned for doxxing. Apparently I can't do that.
>incompetent autist > psychopath
>because reasons
>>105609740Post a timestamped picture of your face. If you're proposing doxxing, surely you're open to doing it to yourself.
>>105609755That's because you're doxxing yourself lmao
>>105609741isn't the "select" part of the operation done completely in memory thus the bottleneck being either the CPU or RAM? Other programs that just delete some content of the file barley use any RAM which proves this i think.
Sorry, I'm a psychopath. Rules for thee, but not for me.
>>105609769That's my point. Hardware I/O isn't slow anymore. CPU code suddenly matters. Yet at least 90% of code is written by K&R tier toddlers.
No one would use a registry dumper program, nor would they care about performance in such a program, let's be real with you mmap schizo
>Hardware I/O isn't slow anymore
A-huh.
>>105609776Doesn't RAM speed fall under "Hardware I/O"? Who cares if you have a fast CPU if it takes ages reading through the data because the RAM is slow.
If there is demand for it i could do a benchmark but i personally am not very interested in this and I'd have to stop what my computers are doing right now for it. But if it helps to settle things and if i could help i would.
>>105609796Is your RAM faster than 10GB/s? (2010 hardware)
Then your for loop over chars is slower than RAM. Next retarded question please.
I propose that to put the regdump schizo in his place, we either stop responding to his delusional rants, or use his own words against him, calling HIM a "nocodeshitter"
hexes
md5: 4f7d1e50b88072c1b5ca6c4a170eb6ee
๐
>calling HIM a "nocodeshitter"
And give me more reason to repost old images? Please do!
>>105609810I have some computers with fast RAM and some with slow, same for CPU.
Again i fail to see why any sort of specific speeds are important if the question is were the bottleneck is. The question is "Is the CPU or the RAM bottlenecking the program?" not "At what speed does it run?"
Premature optimization is the root of all evil.
If you're trying to optimize a CLI program that just dumps something, you're doing it wrong.
>>105609850What is "fast RAM"?
>>105609850Your code is always the bottleneck.
>going from 16 minutes to 7 seconds is "premature optimization"
Please tell me you're unemployed. I'd rather pay for your NEET lifestyle that for you having to worked on potentially life-altering code.
>>105609625The bad thing you mean. Tyranny of the majorly retarded.
https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize
>>105609885So what would the incompetent autismos have to lose then?
>>105609885Democracy used to be great when you had to be trained in military from young age and gain some discipline before you could give your opinion on anything.
>>105609850>The question is "Is the CPU or the RAM bottlenecking the program?Also the answer is "its the server" in my case.
>If you're trying to optimize a CLI program that just dumps something, you're doing it wrong.Yeah that is what i mean. Why should i care if my json parser can parse at 100mb/s or at 10gb/s if im only going to run it once and if the bottleneck is something else entirely. However if we just look at the json part we can still check if its the RAM or CPU that is holding it back.
>>105609865More like "average" ram running at 3600mt/s. The slower systems are running at 2133mt/s.
>>105609873If we just look at the json parser its the parser obviously. I think that is where this discussion started. "json being slow".
>If you're trying to optimize a CLI program that just dumps something, you're doing it wrong.
I'll accept your concessions past, present, and future.
>>105609905>its the parser obviouslyYes. JSON is CPU bound.
>>105609862I have a cli program dumping a peptide databsse (sqlite) to fasta. It takes 4h on the current database size after mild optimizations and using 12 threads. I could probably get it to run on about 10 minutes semi-fully optimized.
>>105609905Also in my case switching to file chunks instead of working on the raw file was not premature optimization as going from 8 seconds to 26ms for something that needs to be done almost 150000 times is a substantial time saving.
>>105609921>Yes. JSON is CPU bound.Yeah, that is something we could explore but instead anon asks for if my RAM was made before 2010?
>>105609923Actually wrong. The first is sarcasm, the second is fear.
Fear that one day I might actually be affected by your slop.
>>105609958nta
got a sauce?
i wanna play around with that thing
>>105609958Wrong again. The first is malice.
>>105609943>my RAM was made before 2010?This document was written in 2007, and Drepper was already complaining about memory speeds back then: https://people.freebsd.org/~lstewart/articles/cpumemory.pdf
What, do you think, was the purpose behind hyper threading in the first place?
>>105609984>purpose behind hyper threading in the first place?wtf?
you say its bc of memory speeds?
>>105609994>Unlike a traditional dual-processor configuration that uses two separate physical processors, the logical processors in a hyper-threaded core share the execution resources. These resources include the execution engine, caches, and system bus interface; the sharing of resources allows two logical processors to work with each other more efficiently, and allows a logical processor to borrow resources from a stalled logical core (assuming both logical cores are associated with the same physical core). A processor stalls when it must wait for data it has requested, in order to finish processing the present thread.https://en.wikipedia.org/wiki/Hyper-threading
>>105610007>inside the mind of an autistlamao
thats 1% of the usecases for hyperthreading
>NOOOO THATS WHY HYPERTHREADING EXISTS IN THE FIRST PLACE
>>105609984I don't see him complaining in 2025, must be too poor to afford DDR5 RAM.
>>105610060List them.
>inb4 deflection and tumbleweeds, the trademarks of nocodeshitting /dpt/
>>105610076>autism is a hard retardation episode #123456789how bout providing an additional execution context to maximize instruction throughput as, idk, stated literally everywhere, including the site of the people who developed the tech?
>no, id rather stick with wikipedia
Yeah, I will.
Because at least I can link my sources. Can't exactly do that with schizophrenic revelations within a dream, now can you.
>>105610106>deflection100% on topic
all you have yet to produce is tumbleweeds
https://www.intel.com/content/www/us/en/gaming/resources/hyper-threading.html
>Two logical cores can work through tasks more efficiently than a traditional single-threaded core. By taking advantage of idle time when the core would formerly be waiting for other tasks to complete, Intelยฎ Hyper-Threading Technology improves CPU throughput.
Concessions accepted and all that.
>>105610125Where does the memory speed come into play? I don't get what anon means by this.
>>105610125>theres no such thing as cpu bound>theres no such thing as sequential opeationsautism = hard retardation
stop eating ritalin, it gives you the impression your opinions are worth sharing
>>105610135>>theres no such thing as cpu bound>>theres no such thing as sequential opeationsbut you were talking about memory speed a second ago and posted this to back you up. But it doesn't mention memory and now you are talking about something else again?
>>105610135ritalin is for adhd, not autism
until the dsm fucked it all up again, autism was indeed defined as retardation
Your concessions have already been accepted:
>>105609906>>105610132If memory was as fast as CPUs there wouldn't be any stalling. There wouldn't be a need to check on another thread and see if data it has requested a couple hundred cycles ago has finally arrived, and if it can now continue executing. There also wouldn't be need for out-of-order execution to make loads execute as early as possible.
But unfortunately memory is NOT as fast as CPUs. And so all of these things exist.
>>105610143>attempt at discourse tacticsstop
accept the fact youre retarded and actually smart people find your attempts at manipulation highly offensive
---
YOU were saying how hyperthreading is a measure to improve memory throughput
it is completely retarded because your memory unit is separate from your hyper-thread so the best you could achieve is a sort of "latency hiding" and only if your code can be exacuted in a non-sequential manner
the ass end of the ass end of the side effects of hyperthreading
>>105610161yea i know but autismo dweebs take ritalin as discount cocaine and the effects are evident ITT
it makes even more retarded than they usually are
agressive
and exacerbates their immaure ego problem
I love how actually autistic people can't even successfully match sentence and punctuation patterns:
>>105608997
file
md5: 96757f170b3f4cad5eece57abdb3837e
๐
why are you guys so petty and cant just reply like normal people. Giving your debate opponent (you)s doesn't mean that you lost but will make the chain easier for others to follow. Im not looking at this tab 24/7 you know. Got other things to do like write programs.
>>105610197because autists are literal developmental retards
kinda duh when you think about it
Both of you should take a deep breath through the anus and re-conciser if this is really worth your time.
>>105610204I admire the dedication to this topic and if they weren't arguing all the time i think everybody could learn a lot from them but this is just embarrassing.
>>105610197I answered you properly, didn't I?
I just don't bother with (You)'s if it's an incompetent autismo who's delusional enough to believe he wouldn't be voted out of the gene pool because he believes CPU-boundness actually matters (you don't hear him raving on about performance counters that add 100% throughput costs in truly CPU-bound scenarios, now do you?)
>>105610221You won't hear me raving about wintoddler issues, that's for sure.
>>105610221it takes additional effort to remove the you
>immature ego on full display>>105610212>i think everybody could learn a lot from themby large theyre tryhards. walking man pages
you could learn the same from reading manuals
fyi most if not all ritualposts come from autists
desktops. tranime. consumergroids
if it wasnt for registryfag (whos posting itt), they would be wholesale worthless
and even registryfag is worthless wiothout a proper context
as evidenced itt he has a tendency to all sorts of cognitive biases
>he has a tendency to all sorts of cognitive biases
Which are?
>>105610221>I just don't bother with (You)'sYou bother replying, anon. If you stop using (You)'s its over, you don't continue. You make some funny quote showing that the other is wrong or stupid and you don't do any more.
But you continue without (you)'s, turning the thread into a mess of loose shizoposts that leave everybody who is not following 100% from the conversation at a loss. It doesn't matter how right you are or how well you can explain things if you do this. You are at least as bad as the person you are accusing.
And ignoring your (you) fearing tendencies, why are you even debating with some anon about things only you care if you could instead put that knowledge to use and do something useful to yourself.
This is an anonymous basketweaving forum. Your "honor" is not at risk. You are not even namefagging.
>>105610273>You are not even namefagging.You are not even namefagging, but are infinity gayer than they are*
>>105610268100% you were gonna hit me with that
immature ego = narcissism
but ill indulge you
-egocentric bias
-naive realism
-belief bias
probably confirmation bias too bc this comes hand in hand with belief bias
and most likely several others you didnt show ITT, or ones i didnt notice
>>105603538Those look like function pointers. Are function pointers really in C? Or is that C++?
>>105610295>egocentric biasWell, yeah, I'm the best.
>naive realismSounds contradictory.
>>105610273>why are you even debating with some anon about things only you care if you could instead put that knowledge to use and do something useful to yourselfWhy do you assume I'm not getting what I want out of /dpt/?
>>105606969Is
const Token& token = tokens.at(i);
A reference to an object? Is that C++?
>>105610311https://en.wikipedia.org/wiki/List_of_cognitive_biases
read up on this shit
introspection is the first step to efficient improvement
>>105610328Why would I want to improve if I'm already the best? You're not making sense.
>>105610338>fatal flaw of narcissism on full displayyou can always improve but you rest on your laurels instead
you could finally learn what amdahls law is and what are its implications, for starters
vibes
md5: 02b9b7ca9de9b3b21b858061ac576662
๐
>>105610355>amdahls lawI think you're the one with biases here.
>>105610374>no, ualso
wtf does picrel have to do with amdahls law?
>he doesnt know amdahls lawyeah i forgor
>>105610380Simply put: at some point adding more cores to a problem doesn't yield you any more gains. That's what my registry dumper understood from day one.
>>105610398yeah, thats sequential operations
you cannot optimize causality away
you dont need a reg dumper for that :/
>>105610408Then why suggest Amdahls Law?
>>105610415>what is an example?also
we already talked about amdahls law in the past
it is something you vehemently oppose because it discounts your asm intellectual masturbation
AL is ridiculously simple though
in a vacuum that idea wouldnt need a name of its own
but it turns out its a good idea to have a shorthand for it given how many people need to be reminded of that principle
>>105610428>it is something you vehemently oppose because it discounts your asm intellectual masturbationWhat?
This isn't even about programming anymore...
Stuck on what to write so I'm gonna make my own IDE in C#
>>105610458we alr spoke about that
a while ago, maybe you dont remember...
we butted heads about the usefulness of optimizing every single last piece of your code
thats where amdahls law intervenes
>if you completely optimize away a function that accounts for 1% of the runtime, you saved 1% on your runtime>but if you optimize a function that accounts for 99% of your runtime to run 50% faster, you then gained 44.5% of your total runtimeand the conclusion
>instead of fighting for the last percentiles, just move onto your next project. its pointless outside of academical pursuits
>>105610466softskills.
id argue that some of them are even more important than hardskills themselves
>>105610492No its just sad desu
>>105610482>we butted heads about the usefulness of optimizing every single last piece of your codeYeah, doesn't ring a bell. My stance has always been that I don't expect people to go down the same insane optimizations that I do (because that's supposed to be the job of the compiler, even if they completely suck at it and will likely always suck at it) *except for memory*.
>its pointless outside of academical pursuitsI don't think so. I now have an AVX hexdumping algorithm I can use in all sorts of other applications:
>>105609834
>>105610508>amdahls law is not programming>organizational knowledge doesnt intervene in project managementbc you cant follow.
thats sad indeed
what a tragic waste of potential
>>105610523>>its pointless outside of academical pursuits>I don't think so. I now have an AVX hexdumping algorithm I can use in all sorts of other applicationsmaybe i misspoke
but i classify that as "academic pursuit"
getting better at your art through exploration classifies as academic pursuit, no?
like inventing stuff and such
maybe writing a paper about that in the future?
is the cutoff when you make a paper out of it?
anyhoo
this was a pleasure
but i have groceries to do (alcohol. i wanna drink and i have no reason to not to. cya later)
>>105610555>maybe writing a paper about that in the future?Oh, you mean like my primers?
>>105610565yeah i guess
people write papers on the most mundane, useless subjects
your primers while not in the usual format
at least have some substance to them
that would count as academic papers in my book
aight
im off
that porto is not gonna buy itself
>>105610243Yet I had to mention it before you do. You're just reacting.
Like an LLM.
Just woke up from a nap, did regdump schizo's billionth melty end yet
OK, melty's still going on then, got it, kek
>>105610326a const ref is just taking some block of contiguous memory and interpreting as a whole, so yes, it's an object, but it doesn't necessarily have all the baggage that comes with oop like contracts and interfaces and polymorphism
tokens.at is just a bounds checked version of tokens[i]
>>105601555>be mathfagAn array language (such as uiua) might give you some entertainment and, looking at your solution, an itch to compress your code as much as humanly possible.
>>105610770you may not like it but this is what peak coding performance looks like
file
md5: 2fa5385c28efdc572d1f9db70fa57bb3
๐
Still 50x faster than optimized python code
Balls on the walls, /dpt/.
How many of you pronounce it "go-dot", and not "goh-doh"?
>>105610273>you could instead put that knowledge to use and do something useful to yourselfbecause he is, using his own words, incompetent (he's one of the easiest posters to filter due to his limited vocabulary and talking points, just a tip to everyone...)
>another delusional autismo post
Yawn.
file
md5: 70c1af168930c70cf98aac592fee78f6
๐
Too much C# messes with a motherfucker's mind
This is C++ btw
I don't use C because it has fgets and I'm not gay.
>>105611789more like fgetaids
Are there any guides on how to design data structures or functions in a higher level language like C# when interacting with lower level C functions?
I've got to wrap a C library but it's the first time I'm doing so and I'm not sure what good practice is
>>105611789>I don't use C>I'm not gayImpressive. One massive contradiction in less than ten words.
>>105611789then you must use getline() or a getchar() wrapper.
I am glad that you are not gay and that you are a white man.
C, Go, and Hare are your homes.
>>105611987Very general guideline: think in terms of data; what data are you sending to C? What data do you expect to get in return?
Once you have that covered, write some convenient usage code first, then use that to write a wrapper that uses all the sugar that C# offers.
>>105612058>harefuck off drew
>>105611987you write a structure that's clean and usable in your high level language
you write a structure that's efficiently created and aligned with your C library's structure
you write some code that translates between the two forms - usually no real need for design patterns, it could just be a pair of methods in your high-level class that translate to/from the raw form. the "from" method could actually be the constructor of that class
What are you guys even writing? So many people say they code but i never understand what or why.
As for me, Im writing utilities for my local booru.
>>105612129>>105612134Thanks for the tips lads, I appreciate the help
>>105612201when im motivated i write fintech shit
when im motivated but burnt out from my main project i mess around with opengl
but its gonna be a good while im not motivated
since i found out about hoi4 to be more precise (dont ever play this game. ESPECIALLY if youre comfortable with a spreadsheet)
>>105612201Are you seriously expecting autistic, incompetent, delusional nocodeshitters to tell you what they're doing? Deflection is all they're good at. It's why their initial gut reaction to the idea of voted doxxing was refusal.
>>105612201mostly enterprise java software for work (good morning sirs)
>>105612201I'm reverse engineering an old DOS racing game I liked as a kid.
>>105612409>he's still advocating for doxxing
Anonymity was always a mistake anyway.
I don't know where he is. :(
Considering making an OS. Is this a good idea?
is it worth the effort to configure neovim for c# dev or should you just use visual studio
>>105610303Yes, C has function pointers
>>105612775any language with pointers has function pointers
Should I commit to learning Rust in full? I know a bit of it, but am hesitant to use it as much as I use C/C++ and C# because of the Rust community and how bad it is
>>105612819Except Rust. Function pointers are a PITA to pull off in Rust
>>105612843Couldn't make it to the second post in this thread, could you?
>>105612843I am on the same boat about the community. I feel like this gets talked about in this thread daily.
However I did comit to learning Rust. I have a physical copy of the book and are like 80% into it, and I could say that I'm far more experienced in Rust than in C++, despite still being kind of a newb.
I just try to ignore the community and think about the possible future oportunities for Rust, that's just me. I kinda want to go to Rustconf as well but ugh idk, that might be tranny fest.
>>105612889I mean, I suppose the most mature way of looking at things is to take the choice depending on how good the language actually is. Is Rust actually a good language overall? Is C++ really a bad language? Is one more powerful than the other?
I kinda want to focus on systems programming stuff with maybe some backend shit so Rust was a better choice than Go and C++. But honestly, I desperately need a job so if I were smart, I guess I should have chosen Typescript or Python. That's just me.
>>105612869Nice "functional" language
>>105612762If I were going to write in [proprietary language] I would just use [proprietary software] designed to facilitate that language, but that's just me
>>105601329daily reminder that I can't read
>>105601329>He uses ChatGPT to reaffirm his own biases/beliefsHow embarrassing
>>105612843I've got a different perspective - I'm going full rust and full chud.
>>105613473This honestly we should all start "resisting" Rust's community wokeness. Just program in Rust and fully ignore the community and CoC
>>105601261 (OP)What are dependencies?
>>105613441Now that you mentioned, it makes the image pretty funny
>>105601684Hitler did nothing wrong.
>>105601261 (OP)Deleted many lines of code today.
Lol I'm Aryan. I'm your master. And if you attack me I swear to God I will fuck you and your family up when Christ comes back. I'm going to be so fucking rich in the coming Age of Jacob.
Is raft the easiest consensus algorithm to implement? I did some very basic research on the topic and holy fuck I hate that I flunked my distributed systems classes in uni. This shit's cash bro.
I'm planning to use zig for this.
End goal is I want to build a distributed database(with consenus backed by raft) with a basic dialect of sql.
I feel this could keep me busy for a month.
>>105614059https://www.youtube.com/watch?v=QmYyh63pqwI&list=RDQmYyh63pqwI&start_radio=1
>>105614059>steppe retard claims superiority while worshipping and invoking the names of semitesnobody gives a fuck about you mudblood. you abandoned your ancestors, the only fate awaiting you is a graceless death leading to timeless oblivion.
>>105614178Seething codejeet.
SHIT that came out of my ass
what if i fork https://github.com/nwg-piotr/nwg-clipman
For xclip clipmenu since https://github.com/cdown/clipmenu/issues/196 will never EVER happen
>>105614274https://www.youtube.com/watch?v=GmS6fe2IxZA&list=RDGgmFC8y8q3k&index=2
>>105614290What the fuck is this horrid abomination? Jeets are niggas now???
Learning C++ using VSCode. How do I remove the inline argument names in the editor?
>>105614499https://stackoverflow.com/questions/48123237/remove-parameter-hints-box-in-visual-studio-code
>>105614511Unfortunately not it. They're still there. I'm talking about the 'str' and 'val' text in the screenshot. Fuck it I may as well use vim
>>105614499look at the settings of whatever extension you're using that does that
Do you just target the latest .NET version (9.0), or the latest .NET LTS version (8.0)?
>>105614524you're looking to disable inlay hints, not parameter hints.
>>105614552Well, clangd is the culprit. I'll look into that. Thanks
>>105614566.net 8 reaches end of support before .net 9
>>105614575This did it, thank you
Thoughts on pygobject?
Startup is a few milliseconds slower but after that there is no latency at all.
>>105613545And the best thing is that it works.
>haven't used c# in years
>have to use it for something
>question marks everywhere
???
>>105615390Something to do with nullables, no clue cuz I'm forced to be a .Net Framework boomer
>>105616383No half-measures:
https://plusnigger.org/AGPL-3.0-only+NIGGER.txt
>>105605653>>105606260I have an idea of an alternative algorithm, based upon this observation:
Let's say that in the bitvector 1 represents free and 0 represents allocated, you can easily find a sequence of 3 bits in a single word by doing:
uint32_t bitvec = 0b111001111011011100;
uint32_t x = bitvec;
x = x & (x >> 1);
x = x & (x >> 1);
printf("0b%032b\n", bitvec);
printf("0b%032b\n", res);
0b00000000000000111001111011011100
0b00000000000000001000011000000100
The position of the 1s give you the start of a sequence of 3 bits. If x is not 0 this means that there is at least one sequence long enough and all you have to do is count the 0s at the start.
The other good thing is that the number of shift/mask operation doesn't have to be in O(n) for n bits, it can be in O(log n).
You can find 8 consecutive 1s by doing:
x = x & (x >> 1);
x = x & (x >> 2);
x = x & (x >> 4);
SIMD could be used to do this several 4/8 uint64_t words at a time. If the words are proecessed 64 bit at a time, the overlapping is easy to handle for contiguous sequences of <= 32 bits one bits, it gets more annoying for sequences longer. At least it should be fast for small allocation 256 bytes if 1 bit represent 8 bytes) and that's what matters.
>>105616615>Let's say that in the bitvector 1 represents free and 0 represents allocatedZero is the default bitstate for memory returned by both Linux and Windows. You'd set memory that has just been cleared, which is nonsensical. Furthermore you can do the same with an OR, NEG, and TZCNT:
x = x | (x >> 1);
x = x | (x >> 1);
x = __tzcnt_u64(~x);
if(x == sizeof(x) * 8)
{
/*Handle no free slots.*/
}
>SIMDHow do you find the position of the free slot through SSE/AVX? There are no bitcounting instructions, and bitshifts either only happen on whole bytes and are limited to their 128-bit lane, or happen on bits and are limited to 64-bit integers.
>>105601609> people with 10 years of exp are still looking for jobsSkill issue. Move to a third world country where life and prostitutes are cheap.
>>105616823>just move to PulseI'll stay in Cocoon, thanks.
>>105601609I haven't had this problem. I don't do faggot leetcode solutions either, I just solve things the straightforward way that's easily readable and maintainable. Maybe that's your problem.
Ok faggots. I've been pissing around with the compiler for the meme lang I'm using for my project (golang) and disabling bounds checking slices like 30% of the runtime duration of my program. Should I automatically default to doing this or is it le bad because of some safety autism that's not really my problem?
>>105616952Read the machine code.
>>105612201I'm trying my hand at implementing a tree how I could do in an array language: without pointers
With that theory I want to implement my first bitch-basic interpreter for a PL, for fun and to bury that one todo entry for good.
The theory is instead of having nodes hooked up via pointers, I could just have those nodes in a depth vector.
Finding the deepest nodes becomes merely a task of searching for the maximum depth, instead of chasing pointers.
Now, I admit to being a codelet to the point that my progress is being bottlenecked by me being unable to figure out whatever's wrong with this function responsible for validating the input to the program:
#include <string.h>
#include <stdio.h>
void vcharset(char *s, int sz) {
char const *vcp = "0123456789+-*/"; char const *chr = s; int notfound;
for (;*chr;++chr) { notfound = 1;
for (;*vcp;++vcp) {
if (*chr==*vcp) { notfound = 0; }
}
if (notfound) {
printf("Invalid char \'%c\'\n", *chr);
return;
}
}
}
int main(int c, char **a) {
vcharset("0123456789+-*/", strlen("0123456789+-*/"));
return 0;
}
// output: "Invalid char '1'"
Any help is appreciated.
>>105616808>Zero is the default bitstate for memory returned by both Linux and Windows.Obivously the bitvector would have been memset'd duing initialization. The page could have been used for another purpose and be dirty.
>you can do the same with an ORThat's true, it's the same algorithm except for the bitwise not at the end.
>How do you find the position of the free slot through SSE/AVX?It maybe can't be completely done using SSE/AVX but a good part can. You would do the and/or + shift using packed SIMD instruction and then do pcmpeq, pmovsk into a GP register and check if it is 0. If it's is 0 you load another 128/256/512 bits and continue searching for a slot big enough, otherwise you find out which packed word contains the a free slot, do the shift and adjust the position accordingly.
I haven't yet thought about the very last part. Maybe it's possible to do something smart here but even with the naive solution using SIMD would still be a big benefit. If you have 64KB of memory segmented in 16 bytes, that is still 512 bytes of bitvector. It's going to take a lot of iterations if the free slot is at 350 bytes of bitvector.
>>105617199>otherwise you find out which packed word contains the a free slot, do the shift and adjust the position accordingly>do the shiftthe bit counting
>>105617199>The page could have been used for another purpose and be dirty.Since you're not reading what I'm writing I won't do either.
>>105617267>bitshifts either only happen on whole bytes https://www.felixcloutier.com/x86/psllw:pslld:psllq
im making a weather widget for android because all the weather widgets are fucking dogshit bloat slow and full of ads and irrelevant information. my hand has been FORCED to code.
>>105617322>or happen on bits and are limited to 64-bit integersThat's what quadword means.
>>105617366AKSHUALLY word size is processor specific and varies
>>105617387Intel uses the term "word" for 16-bit values for backwards compatibility reasons. Double words are 32-bit, and quad words 64-bit.
>>105617267>you're not reading what I'm writing>accuses me of doing what he doesok? end of discussion then
>>105617366Also, checking those bits is *really* slow. You're simply better off filling four volatile GPRs with the values and performing each series of calculations out of order, than to mess with AVX => GPR transfers.
>>105617351>c++ bookWhy do people insist on reading books in an era where you can just go on github and read raw source code?
>>105617366>>105617400>>105616615>SIMD could be used to do this several 4/8 uint64_t words at a time. If the words are proecessed 64 bit at a timeSince you're not reading...
>>105617469HOW DO YOU GET THAT INFORMATION OUT? Jesus Christ!
the simd schizo is ALWAYS here
and he's ALWAYS posting simd and octal
i wish he would \033 FOREVER
>>105617484>schizo rambling
And that's why we need voted doxxing.
>>105617432because a book will teach you in a month what would take you 6 months of practice to learn by yourself just reading code?
I'm not talking about beginner books that spend three chapters explaining what a float is.
>>105617537>because a book will teach you in a month what would take you 6 months of practice to learn by yourself just reading code?it's actually the reverse but keep lying to yourself
>>105601261 (OP)I'm currently updating an older mmorpg to x64
>>105617603everquest updated to 64 bit a couple years back
it fixed nothing and actually introduced tons of new bugs (which were ignored) and overall degraded performance
>>105617667>everquest devs are completely incompetent and should all be murderedGood thing I never bothered with MMOs in the first place.
>>105617685well, you missed out, 1999-2006-ish the MMO scene was kino
absolute garbage in current year, tho
>>105617698Nah. People don't change, and most are walking garbage only other walking garbage would ever miss.
>>105617698loved me muds in the 90s, sadly the only ones still around are pay2win and/or weird furry shit...
MUD1
md5: 27c9505bf565a0801c9760ffe9b58565
๐
>>105617941Yeah, the NT kernel only understands UTF-16 and ASCII.
>>105617494>octalI understand my intelligence intimidates you, and I love it.
>>105617941>>105617956kek I've been using the ansi functions this entire time, luckily I doubt there's any real performance penalty to one time shit like setting a window title
>>105617941Downright elegant compared to setting calling 4 different functions to set the WM_NAME and _NET_WM_NAME and WM_ICON_NAME and _NET_WM_ICON_NAME properties on unices, and then the window manager having to sort this shit back out.
I notice there was significantly less schizoing the past few days. Did something happen?
>>105618569they made up <3
Wrote a shared library that fucks with $HOME to unfuck my home from garbage program trash.
Confession: Almost a month ago I resolved to learn c++ and I installed winsys2/gcc, cmake, vcpkg, etc but couldnt figure out how to get vcpkg to work properly so I just dropped it and I keep telling myself I'll get it working and start developing the program I want in c++ but I never do because the setup is such a pain
>>105619031Have you considered installing an IDE that has everything in itself so you just open it, create a project, write some code and press 'build'? Ignoring all cniles' cargo culting about plain-text editors and compiling from the terminal because the whole topic of build management, you can shove into a bucket separate from actual programming.
Many years ago, I disliked Java mainly for some difficulties when setting it up (OS installation was cursed and JRE/JDK just didn't want to work properly). Now I can just install Eclipse IDE and am ready to go.
>>105619171>Compiling by typing "build":|
>Compiling by moving your mouse pointer over "build" and leftclicking:OOOOOOOOOOOOOOOOO
>>105617667>it fixed nothing and actually introduced tons of new bugsthe only real benefit of upgrading to x64 is the increased memory space. I am also running into new issues during the upgrade process. However, I will say that in the long run having more addresses available outweighs the introduced issues, given that you deal with them of course.
>>105619171I have VS but I really fucking hate how hulking and cumbersome it is, with 99.9% of features that Im never going to use
But at this point I dread troubleshooting this shit so much that I think I'll just use VS
Why cant it just be simple like Go or Python
>>105619214If you hate needless complexity why are you even learning C++ to begin with?
>>105619171when you start getting compilation issues in your IDE and you don't know how the underlying stuff works you will have to do double the work to figure out how to fix it
in other words: to use an IDE you need to be competent with the "primitive" tooling
>>105619190It's not just typing vs clicking to start an action - IDEs do all the build setup and dependency resolving automatically (or at least you'd expect them to do that)
>>105619214>with 99.9% of features that Im never going to useI suspect it's because you never cared to learn any of the features in the first place
Turn on a "tip of the day" function (I think VS had it?) and check out an action or two, over time the IDE will do almost all tedious work for you, so you can focus just on your actual coding problem and not busywork
>>105619190uh huh, now show us the compiler flags that you had to read a 500 page man page to figure out then compare that to right click on your project and click "Properties"
>>105619264>you had to read a 500 page man page to figure outWhy do retards always make up imaginary scenarios to get mad about?
>>105619264Your retardation reminded me of a video where a guy optimized mario N64, first thing he did was enable optimizations, because retarded OG dev pushed debug build with no optimizations to production.
>>105619276It's not imaginary, but it's also a fair point. Programming isn't easy, you have to know a lot, or you will end up retarded like him. And unfortunately it's illegal to beat retards for doing things they shouldn't be.
>>105619227speed, UI frameworks, and it looks good on my resume/portfolio
>>105619235I disagree
First, the "primitive" tooling is extra overhead to learning the language itself. Especially for beginner/learner programs, there really shouldn't be anything an IDE would have trouble to resolve by itself
Second, if there are any compilation problems (that aren't just syntax/common errors - those are highlighted immediately), IDEs nowadays are smart enough to either resolve problems themselves with a "clean" action, or at least give a message informative enough to pinpoint the problem (or give a keyword/sentence to search on the web in - in which case, only now you'd be down to the same spot as with the "primitive" tooling)
>>105619300it's unfortunate that soulless NPC such as yourself who has no recollection of his early life has an opinion about learning things from knowing absolutely nothing, because if you were human, you'd remember that you started from learning how to reproduce sounds your worthless parents were making and didn't start from trying to write essays with abstractions over everything that are beyond your comprehension. Worst of all, the way human speech works is still likely beyond your comprehension, you fucking animal.
>>105619312You sound mad that you lost.
>>105619348See, this is what I mean. Let's dissect the brain damage required to write your post.
>YouAlready starting from accusation and likely, projection, not good.
>soundEarly onset schizophrenia.
>madHow would you know if someone is mad just from text + when you spend all your life indoors without ever observing real human emotions?
>more word vomit
Yup. Definitely mad.
>>105619031your problem was trying to do this shit all in windows
it took me about an hour to get an ubuntu virtual machine spun up, VS code installed, cmake/gcc/etc all installed, and got a program building and running from the VS Code ide
switch to linux my man
>boot up jeetcode
>section is trying to teach you about topic "XYZ"
>sample problem
>has absolutely nothing to do with "XYZ"
>takes 3+ hours to finish
>marked "Easy"
i fucking hate this
>>105619295Just be aware that with C++ on your resume, you'll most likely get job offers revolving around C++, so even more of the mess you're currently in but even more advanced/bizarre
If you want a job that won't make you want to kill yourself (at least because of the language), I'd recommend Java. It's a pretty low-nonsense language, and even if there's some really retarded legacy Java code, it's still going to be much easier to unfuck than retarded legacy C++ code
so i was looking at how C23 added functions for popcnt, tzcnt, and lzcnt. why only those? could have really used add/sub/mul with overflow checking. gotta use the builtins to ensure that the compiler does not fuck up (division)
>>105619282>retarded OG dev pushed debug build with no optimizations to productionthe compiler was not stable yet, and they did not want to risk their launch title being a buggy mess
>>105619657Nice cope bro, you know that you can test your program for stabiliity right after compiling it, right?
>>105619625Ok, what's fucked with it? Other than it overwhelms and scares the fizzbuzzer and regdumper, about which I can't really do anything.
Anything above [MVC Action] and below [DAO] is literally Not My Problemโข.
>>105619683Now it's your problem. :)
Have fun.
>>105619688>update library to newer version>if doesn't help, report issue to library maintainer>if fix needed ASAP, get source from the library repository (or decompile - Java has a few good decompilers) and patch it myselfWow, so difficult
>>105619776As I said, have fun. :^)
>>105618569it was a disaster 24 hours ago wdym
>>105619912>it was a disasterOnly for those who never mattered.
How does one design a horizontally scalable chat app? I honestly can't quite figure it out. FIrst of all, if users were to connect through WebSocket, a mapping of user IDs to WebSocket node ID is needed. I assume one can use Redis with the "Redlock" distributed locks algorithm for that. But can Redis really handle millions of keys? Seems unlikely. Next, we probably want to have group chats too, I'm really not sure what to do here either.
>>105620385>horizontally scalable chat app?relay servers
>>105621070>safe>Doesn't check for NULL before derefThis is this LLM shitcode, right?
>>105621147What if I don't want to have to scream HOME every time?
>>105621070How likely is it that the next four bytes go into unreadable memory? Because one optimization you can do is
return *(uint32_t*)s == *(uint32_t*)"HOME" && s[4] == '\0';
>>105621178Never happens.
>>105621195Well, then there you go.
>>105621199No thanks, I'll stick to safe and secure
[[gnu::always_inline]]
[[gnu::hot]]
static inline
bool
is_home_union(char const* name)
{
static const union
{
char string[sizeof(uint64_t)];
uint64_t integer;
} home = {.string = "HOME"};
uint64_t block;
memcpy(&block, name, sizeof(block));
return (block & 0xFFFFFFFFFFULL) == home.integer;
}
>>105621251Your code reminds me of picrel.
>>105621285I do not concern myself with the illiterate.
[[gnu::always_inline]]
[[gnu::hot]]
static inline
bool
is_home_union(char const* name)
{
if likely(name[0] != 'H')
{
return false;
}
static const union
{
char string[sizeof(uint64_t)];
uint64_t integer;
} home = {.string = "HOME"};
uint64_t block;
memcpy(&block, name, sizeof(block));
return (block & 0xFFFFFFFFFFULL) == home.integer;
}
This small change is not slower for when it does match, and is faster when it doesn't (very often).
>>105621329Enjoy your MOVABS.
>>105621356I'm enjoying you seething but not having any code to post.
>retard projecting again
Anyone surprised /dpt/ is dead? Me neither. You get what you fucking deserve.