What are you working on, /g/?
Previous thread:
>>105601261
>>105621642Boooo
Get better material
Why? It works as intended.
>>105621642Mentally ill xisters.. our response??
>>105621782Your shtick is getting old
>it's getting old
OK, and?
best programming language for an african-american?
>>105621994I'm going to invent the true C successor language and name it Floydian just to anger the chuds
Trying to code a generic optimization algorithm, kind of like a SAT solver but for optimizing a binary string for an arbitrary loss function.
Also why is the anime girl upside down in these threads?
>>105621602 (OP)dont know if this is the right thread, but ill be taking a data structures and algorithms class next semester. I was wondering what i could do to prepare for that class before the semester starts. Im fine math wise, passed calc 1,2 and linear algebra with an A
>win32 is c
>directx is c++
thank you mr gates
>>105622342learn how to do manual memory management and work with pointers
ignore the arena autist
>need to implement a pub/sub message queue with fan-out and at-least-once delivery and with storage of all published messages for about a month, regardless of if the message was delivered or not
Just how fucked am I? To be clear, there's no requirement that says I can't piggy back off existing solutions, but still.
>My branch is getting hit with layoffs at the end of the year
>Get told by several superiors that there might be a few positions open at a different branch
>Need to be laravel
>Have never written a single line of php
Should I do it? I got half a year, it's not even a guarantee I'll get it
>From Java to Python to PhP
what a joke it'd be
>>105623052proficient in laravel* oops
>>105623001Microsoft was always an early adopter of C++, win32 is C because of backwards compatibility. MFC is even older than DirectX, going back to their 1992 compiler and is also C++.
>ignore the arena autist
Or else? Gonna have a public meltdown in which you decry the fall of /dpt/?
Please do. It amuses us all.
>>105623001Within 2 years all APIs will be rewritten in Rust.
>>105623109I unironically can't wait for things to get worse. People deserve to suffer for their laziness and stupidity.
>>105623109rust is a gay meme language and everyone investing in it is going to regret their life decisions
I've been writing a server in Python to deal with some market-related datasets. One of the guys I respect at work, a real entrepreneur who's pulled of some nice side-hustles, was decrying the use of things like Rust, Golang, and other niche languages instead of just using Python, so I thought'd I'd give the danger snake another shot.
It's not so bad. The language kind of feels like a mess that's pretending to be shell script and there's a few too many implicit behaviors, but looking past that I've been able to get some stuff done pretty quickly.
>>105623149>amerifats all lose weight>student debt racket collapses under its own weightbased chad with the reverse monkey paw
>>105623648You forgot the brown masses coming to eat them alive, and the military being too busy arresting people for no longer paying their debt.
>>105623648>americans triple their eating>defaulters get sold into slavery to die for israelyou asked for it
>>105623052>Should I do it? I got half a year, it's not even a guarantee I'll get itSix months is a long time. Their needs might change in a quarter and a half and they could drop Laravel, so maybe you'll be out of a job regardless.
On the other hand, you have half a year to to bone up your resume and find another job.
PHP isn't a bad long-term bet if you're looking for job security. If you want to stand out from the competition, you could put up a website that does something novel and blog about working with the language(plus the frameworks you're using), which would make you way more appealing then the legion of boot-campers and vibe coders.
Personally, I think that in the next five years the focus is going to get even stronger on people who display a strong proficiency in their language and can also do Ops related work. Language knowledge because it's the best way to filter vibe coders(hip check questions like 'what's a call stack?') and Ops knowledge because infrastructure-as-code still hasn't become infrastructure-as-a-prompt and even when it does, it'll probably still create massive spend, plus more companies are moving away from AWS, Azure, and GCP anyway due to cost.
>>105623627>Y no Perl?As I said, I'm going off what my senior said with just using the language everyone else is using.
But from a cursory glance, I'll consider trying it if I have some large text-processing job instead of using shell scripts.
I've also wanted to give Lua a shot honestly, because having just one data structure(tables are associative arrays) in your language sounds peak.
>>105623546He's a moron. You either use apache/nginx + PHP, or you move onto memes that are node.js/go, everything else is too esoteric or straight up trash.
>>105623735>>americans triple their eatingi don't think that's physiologically possible
>project over budget and timeline
>working off the clock to get things done
programming was a mistake
>>105623014This, arenas are garbage, remember: malloc uses arenas, you aren't smart for using garbage allocator but manually.
>>105623757>everything else is too esoteric or straight up trash.Really? Making APIs with FastAPI in Python is some of the easiest coding I've ever done.
>>105623792And it runs slower than deader dog.
>>105623794Maybe, but if you're not handling more then a hundred requests a second it's not really an issue. Then it's super simple to just re-write the thing in Golang.
>>105623794if you care about performance you shouldn't be using PHP either. at least python is somewhat sane.
>>105623811If you aren't handling more than a hundred requests a second, what do you need a server for? Not like you make any money.
give it to me straight /dpt/, is it a waste of time learning c/c++ in 2025? is rust the future?
>>105623831>at least python is somewhat sane.lmfao
>>105623847no not really. just like cobol and fortran, they're so embedded with existing infrastructure they're probably not ever going to go away without total societal collapse, or a breakaway civilization.
>>105623847you trannies need to leave
>>105623836>If you aren't handling more than a hundred requests a second, what do you need a server for?Off the top of my head:
- Cloud operators that respond to git hooks
- Alert remediation servers(Netflix had one written in FastAPI)
- Discord/Slack/Mattermost bots
- Smaller SASS apps
>Not like you make any money.Nah. You can make a lot of money by rolling a K8S operator and charging for support, writing bots, or creating apps that just basically front ChatGPT.
>>105623884You could make more money by not writing bots in slowest language possible.
How much slower would a video game written in C++ be than one written in C?
>>105623901>You could make more money by not writing bots in slowest language possible.You could also make less.
>you aren't smart for using garbage allocator
Spoken like a true retard who would be the first to be doxxed.
hey regdump schizo, have you written yet anything more advanced than a program that just prints stuff to a terminal?
>>105624076He couldn't even write code that checks if a string is "HOME". My code is faster.
movs
md5: ef3b9b8c41331dd0fe00c300b3f1d4e7
🔍
>my code is faster
Lol
Lmao
>>105624105Go submit your tests to uops.info. And while you're at it you can as well show proof that CMP M32, I32 is slower than MOVABS R64, I64 + CMP M64, R64.
https://learn.microsoft.com/en-us/cpp/cpp/cpp-language-reference?view=msvc-170
will reading this make me a c++ master?
>>105624122I don't need to do that, because your garbage code generates worse thing than 64 bit immediate.
>>105624122Why don't you do it or better yet stop posting outdated references to platforms nobody uses?
>I don't need to do that
Now you do.
>>105624092I mean, do measurements like this even mean anything on modern cpus with all the pipelining and shit?
>>105624143No, he's just sperging out after my benchmarks proved that my code is faster.
>Why don't you do it
Because everyone with a functioning brain understands why MOVABS + CMP is slower. Only incompetent /dpt/ autismos would be retarded enough to even question that notion.
>>105624150Post code proving that it's slower for 5 bytes.
>>105624143MOVABS is front-loaded, so yes.
>Post code
You made the claim your code is faster. You post code.
Which naturally you won't. Which means I win again. Again again.
>>105624129>2021Out of date
>>105624150Literally has nothing to do with my reply. Maybe you can't afford a zen 5?
>no code or benchmark
Concessions past, present, and future accepted. Do not bother replying.
>>105624187I already posted my superior code in previous thread, now post benchmarks that you run on real hardware and not godbolt, jeet.
>>105624187Please tell us more about what the throughput is on your potato.
failure
md5: bde1ff4c4911df0530540ca359c5288c
🔍
>the incompetent autismos cannot obey the simplest of commands
>as always
>>105624194movabs throughput is higher on my sandybridge, because it branches less than shitty 32 bit garbage he hallucinated to be faster, just ignore the schizo.
>just ignore the walls
Is that why incompetent autismos are always throwing themselves against them?
>just ignore the branching
Is this why that registry dumber only dumbs at pathetic 50MB/s? There are JSON parsers that run faster.
There are in fact 0 JSON parsers that run slower.
>>105624244Fact check false, it's actually extremely fast according to 5 year old uops.info fiction.
>the incompetent autismos don't even know how many branches his slop produces
Voted doxxing. Now.
>>105624143They only matter in the context of a specific CPU. Generally you aren't programming for a specific CPU in [current era], so in practice, no, not really.
>>105624292>writing code for processors you don't usecuckoldry
>>105624292What CPU would movabs even matter on? You need to compare 5 bytes, what do you do, load twice and branch twice while hallucinating it's faster?
But sure, there's edge case where you need to compare <4 bytes and then it's barely measurably faster, that's not relevant to me at all and I never needed this.
>he STILL doesn't know how many branches his slop generates
>>105624338Half as many as yours, nocodeshitter.
>implying the incompetent autismo can compile his slop in the first place
HAHAHA.
>>105624303If my 64 bit CPU executed 64 bit code slower than 32 bit, I'd throw it into trash without bothering to unplug it.
Please do. We can all do without you.
>>105624356dont benchmark single vs double sqrt or sine
>>105624354My code is actually useful, I use it to change HOME env for programs that were written by faggots as intelligent as registrynigger who dumps everything in ~/ because appending even 1 directory would waste too many cycles.
>>105624371Don't worry, I never had to use these worthless mathfaggot functions.
>My code is actually useful
HAHAHA.
Again.
>>105621784Increase shilling and personal attacks on cniles to levels never seen before.
So they turn /dpt/ into an even worse shitting street?
I'm all for it. /dpt/ has, after all, not fallen enough.
>>105624400Don't worry, you will always be the biggest nocodeshitter ITT. Unable to even post benchmark code.
>>105624416This is only half complete. You forgot to sneak the Rust shill in there somewhere
whats the best version of c plus plus
>>105624570C, ++ is a nop anyway.
>>105624570sepples17 until contracts and modules in sepples26
>>105624451I forgot pic related, sorry.
>>105624606>17>no requires>no deducing this
>javac
You just give it main.java and it follows included files.
>any c++ compiler
C++26 and still modules.
>>105624653>You just give it main.java and it follows included files.Yeah, but then you look at actual Java build systems, and it's the most horrendous braindead thing imaginable.
>>105624649>taught by chatgptI didn't think you could stoop lower than "self-taught", but here we are
>>105624670Then you use CMake once and crawl back to apologize.
If I ever need more than Make, I will go directly to Gradle.
>>105624649>qrd (quick reference digest)
>>105624697CMake is a clusterfuck, but it's tolerable if you at least stick to the "modern" shit. All of those kinds of build systems are really just fucking around with some dependency graph, and it all makes sense once you understand it.
I'm really more of a Meson enjoyer.
But holy fuck, the one time I try to use a Java build system for something, it was incredibly infuriating.
The build system was gradle, and I was trying to write a plugin for something, and one thing I needed to do was generate some resource at compile time, but I'm convinced Java build systems are basically incapable of doing that, at least in a proper way that prevents dirty builds where your resource generating program does not get run in some situations.
Maybe it's possible, but it's so obtuse that nobody seems to ever do it.
>cmake
no thanks I'll just copy/paste build commands from build.txt into the terminal
>>105624776I understand CMake and it still doesn't make sense.
In Make I can do anything I need.
>>105623109And all the rust code will never be called and instead the work will be done by C++ code that is mostly a wrapper to call the C code.
Source: I work in the corporate world.
>>105624959Let's see if you're still saying that after Linux has been completely Rusted.
Is learning docker/podman worth the headache? Do you guys use it for personal projects?
>take a shower
>forget how to program
>AI-make
the first acceptable usage for AI in programming
>>105624996Rustranny ragequit before xhe finished writing ext2 drivers, I am not gonna hold my breath over this.
>>105625381The future is Troonix.
>>105623109there has never been real code that used r*st and their never will
>>105625446blizzard has been rewriting the WoW backend in rust, about 20% done last time they talked about it
>>105625454fake news also who cares
>>105625454No one should trust nubllizz to do anything well. This will kill Rust game dev.
>>105625478how can you kill what was never alive
>>105625454>Blizzard>2025haha, nice joke
what do we think
https://thephd.dev/c2y-hitting-the-ground-running
?
>>105625446Iran was writing the guidance system for their nuclear missile program in Rust but the programmer in charge of the project is dead now.
>>105625512must have had a shellfish allergy
>>105625454If they wanted to kill wow, they just had to keep releasing worthless updates, no need for rust.
>>105625512no wonder 41% of their missiles aren't landing
>>105625507Anon, have you ever considered the fact that having a melanin-enriched feller on the C ISO committee tells you all you need to know about the competence of those dirt-munching retards that inhabit it?
>>105625512did he die from the missile strikes?
>>105625507I don't think about standards at all, GNU gave me this 20 years ago.
>>105625543Contaminated batch of puberty blockers
>Following the capture of Tel-Aviv, the Ayatollah gave the order to have all Rust developers cast from the rooftops
>>105625579it was just a coincidence that they were rust users
>>105625579reportedly he only ordered it for 59% of them
>>105625579Fake, trannies are permitted in Iran.
>>105625783go there then, rustard
drop rustoids instead of bombs theyll do more damage
>>105625973thats a war crime
Rust is King. All these cnile tears are akin to Mozart greatest symphonies. Keep coping cniles, keep coping.
rust? moar liek crust, amirite?
I'm confused with IPs / Ports and UDP sockets
>Can I receive on one port and send on another using the same socket?
>Can I receive on multiple ports and/or can I send on multiple ports with the same socket? (not all, specific ones)
>does the server know the port the client is using?
>does the port of the server and client need to match, or only the port they specify when sending and the receiving port
>when I 'connect' with the server on an ip/port combo, what exactly is that doing? I know UDP is connectionless, so what's the deal?
>>105624200Anything which is not explicitly forbidden by the spec is permitted.
>>105626543I was expecting terminators, not whatever the fuck this is
>>105626566>I was expecting terminators
>>105626856damn, I'm still in dx9
>>105621602 (OP)I don't know much about programming and all you faggots gatekeep. But I am Aryan and the master race lol.
>>105627052>gatekeepYes, because I don't want retards like you ruining my hobby.
>>105626555And that's why we used to beat the shit out of autistic people until they screamed their lungs out. People who refused to go by the rules It became our source of entertainment, and everything went to shit when we stopped.
>ww3 didn't happen so now I have to learn to code
>>105627191They're not the rules if they're not written in the spec.
>>105627218Get a dev job at Lockheed Martin. Be the change you want to see in the world.
>>105627246Why don't you scream that as we slam you into the spec?
>>105627259legal spec says you can't beat the shit out of people and slam them into things, better luck next time
>>105627308Good thing autists have never been people.
Better luck next life.
>>105627191Please consult this post
>>105627316 to see whether they count as people or not.
>>105627414Normal people don't care. Some loss is natural and acceptable; see cancer treatments.
imo extern is quite useful with proper documentation.
Composite keys my beloved
>>105621602 (OP)I was trying to see what the AI hype was about by trying to get it to implement the raft consensus algorithm, but it completely shat the bed.
It produces good looking code but it doesn't work, mostly hallucinates or even if it works it doesn't handle all cases properly, and just crashes at random points because that case wasn't handled. What are people actually building with AI that it just does the job for them?
So much for muh AGI. It fails to implement a pretty popular paper from 2014. It's great for webshitting though, that much I cannot disagree.
>>105628240I use AI to write all of my C code.
The trick? I use it like stack overflow and assume that its code is worthless while words have some truth in them.
>>105628269I already use it as a glorified search engine as well but people were saying "I usually have to do nothing and it works" but that's never been the case for me. Maybe only the webshitters were saying that.
>>105628299I know some webshitters and it breaks all the time for them.
>>105628240Beats me. It can't even write an algorithm to hexdump data using AVX instructions.
>>105628415Normally people ask for things that have a real world usecase.
Redpill me on rust. I know it's hated because of troons. But emotions aside, is there any technical reason why it's bad? I mean, if it's getting a lot of adoption in major projects including Linux, then there's something it does right to be this popular. I don't think that just tranny/Jewish influence would be enough for this kind of popularity. Yet, as most of /g/ I'm sceptical because of the troons, so now I want a purely objective and technical opinion on whether it's a good or bad language
>>105628419Since when is your nocodeshitting a real world usecase?
redpill
md5: 66dbc1cfa0b38768842fad8077ab75de
🔍
>>105628422>It's bad because it just is okayOn technicality, it gets quite annoying when you start dealing with async/and or want to have zero-copy stuff i.e. minimal heap allocations, then you have to wrangle lifetimes and unfortunately you'll have to architect your application around that.
It has fearless refactoring in that if your refactor compiles, it probably works but refactoring itself is a pain especially if you go from tons of heap allocations to minimal heap allocations by which you have to start wrangling lifetimes which get tricky.
Also it's bloat, and by I mean it's falling into the C++ trap of having gazillion features. There's 5 different ways to do the same thing and yeah sure they're technically "zero cost", I feel burnt out when I rust for extended period because there's just too much stuff in it like C++.
>>105628460Nobody wrangles with lifetimes, they replace pointers with indices and act like they invented something new.
>>105623001I'm pretty sure you can use DirectX without C++, but it really is designed around COM so everything is very OOP like
>>105628440I see. No-code tools are used in business automations and simple apps daily. Hope that clarifies.
No, it doesn't. Which is why we need voted doxxing, to weed out scum like you.
Even AI tells me to stop responding to you because it just makes you more mentally ill. What do you have to say for yourself at this point?
>>105628460I don't know what anything you said even means but I believe you anon. I will just continue to reject rust because of troons, which is easier than being technical and objective.
I'd say that I keep winning.
>>105628550Rejecting rust because of troons is technical and objective though. You wouldn't want mentally ill subhumans to build a bridge that you will drive over exactly when it starts collapsing, why would you allow same subhumans to write your software?
I also love how the LLM has completely given up at this point. It just doesn't know how to add spaces to an AVX stream.
>>105626443Look at the IPv4 header and UDP headers on Wikipedia and in Wireshark. There is a source IP and destination IP in the IPv4 header and a source port and destination port in the UDP header. When you bind() a UDP socket to a local address you set the address and port to receive on, i.e. the destination IP and port that an incoming packet must match to be received on that socket. When you connect() a UDP socket to a remote address, you are specifying the destination IP and port that an outgoing packet will have. Binding also sets the source IP and port that an outgoing packet will have, i.e. if you bind to port 1234 and connect to a remote address on port 5678, a sent UDP packet will have destination port = 5678 and source port = 1234. I believe connect also applies a filter to the source IP for packet to be received by the socket, i.e. they must be from the remote address connected to. The manpages on sockets and UDP explain most of this, beej's network guide can also help.
>>105628561I just wish /dpt/'s incompetent autismos would be as willing to admit defeat as an LLM. Instead we need to implement voted doxxing to deal with them.
>muh incompetent autismos
Alright, /dpt/, you have a chance to prove you're smarter than an LLM:
0x00,0x01,0xFF,0x02,0x03,0xFF,0x04,0x05,
0xFF,0x06,0x07,0xFF,0x08,0x09,0xFF,0x0A,
0x05,0xFF,0x06,0x07,0xFF,0x08,0x09,0xFF,
0x0A,0x0B,0xFF,0x0C,0x0D,0xFF,0x0E,0x0F
The AI couldn't do anything with this code and just decided to fail instead.
still no answer to
>>105624076
>notice my deflection senpai
New to programming.
Tried to do a UI thing over and over. Couldn't get it to work just right. It worked but it was janky and stuttery and it got to the point where I was just adding more and more shit and got confused.
>Found a guy on GitHub who did it more simply and readably than I managed
Am I like, ok to just copy his code, make some tweaks and carry on actually building the thing I want to?
Is that cheating?
>>105629408Thanks. Its kinda tough, I don't know anyone who can program and I'm learning for the first time at like 35 years old.
idk what the culture is like and how people actually get shit done.
Tutorials are just
>here's the basic types>here's how to do an if statement>this is a method/class>ok fuck off now.I don't even know how to read documentation or what I'm looking for half the time.
Feel like a complete retard.
>>105629403A GUI application is significantly more complicated to write than a web application or a console application. With a console app, you just write characters/strings and read characters from a buffer. With a web app, you just handle HTTP requests and respond with HTML, which is just a bunch of text glued together that the web browser parses for you.
>Am I like, ok to just copy his code, make some tweaks and carry on actually building the thing I want to?>Is that cheating?No, he made his code public. That means anyone can read and use it. Even if you start caring about licensing, it only really matters if you decide to publish your program that used his code (usually you just need to acknowledge/give credit to the repo you used)
>>105629436Tutorials are pretty much always awful. Documentation is really for people who already have some experience and know what they're looking for.
Try a book for whatever language you're learning. It still might be bad, but you'll have better chances than with tutorials.
>>105629492shut up
>>105629500Exactly, thats my issue.
If I'm outputting something to the console it's fine. It's just mathematics and then print the line.
UI stuff? Getting user input, dealing with event handlers and setting up relays, subscriptions etc is way more complicated for me. I did some web development in the early 00's as a kid but it's really a completely different beast, to the point where I wouldn't call the HTML and CSS stuff I learnt back then 'programming'
I'm not worried about licensing - I'll give credit where it's due, and in all likeliness his code will be heavily modified by the time I'm finished with it.
>>105629528Thanks, I go into the documentation and its either way too informative on something I don't need, or its just a one liner without any indication what the inputs and outputs for a method might be or require.
How do you guys handle configuration and configuration files? I'm loading up a yaml file and using https://zod.dev/ to validate it, and it's pretty cozy, but it would be even cozier if I could also autogen configuration docs from the schemas.
>>105630869By picking shittiest file format known to man. E.g. YAML, JSON, XML...
>>105630869different formats depending on what's to be configured - usually .properties files and XML files
the latter has the advantage of having schema validation so you only need to execute a parser and then pick your config out
>>105630869What the hell is wrong with INI?
>>105631224INI is like CSV in that it's superficially simple but whenever you configure something there's a 50 50 chance that the parser is just
line.split("=")
and you WILL need escaping for a thing that the developer didn't think of.
Which is why firmly standardized config formats are just better.
Also I need entire arrays of objects for this.
>>105631212True. XML is peak verbose though.
>>105631441>uses Python as example when Python has configparser that by default supports # and ; for comments, = and : for separators
>>105631559AND YET people won't necessarily use it.
>>105631808I don't give a fuck what retards do. If things break for them then they can fix them, because I won't shit up my code to accomodate brain damage.
std::sort names the second argument "last" but won't move the "last" element. How hard is it to respect the conventions of natural language?
>>105631855What is the brief "natural convention" for one past the end? Postultimate? Extrema? Limit?
>>105632564One Jewish proverb says to go to war last so you return as first, and the trick is to never go. That's what being last means.
>>105632503When someone says I'm going to do the tasks from first to last, It's inclusive [first,last]. They don't get to leave the last undone and blame you for misunderstanding.
>>105632583We could call it ladderForManInPit
>>105632612There isn't a better word faggot unless you want a fucking 1 on the end
>>105632503If there's one past it, it's not the end, is it?
dickhead
>hurr today is my last day on earth
>see you tomorrow
>>105632625this analogy doesn't work
>>105632620It doesn't have to be English. It could be A and B.
>>105632689M (male, the work is done) and F (female)
>>105632641>What is the brief "natural convention" for one past the endOne past the end means the end is not the end. simple as.
>>105631855[first, last)
i think you learn what this means in elementary school
>>105630869There is only one configuration Handler and .Xresources is His configfile.
>>105632942>.Xresourcesngmi
sonicx
md5: 0dee59d12f89995b7d116e5cb8b869b9
🔍
Should I make a hobby OS just for fun?
>>105632722it doesn't say end though. it's the last iterator, one after the end.
>>105632942Based xsession execer
>>105632963That's opposite of fun.
>>105629207Nice syscall to delete the current directory.
>>105633015Making hobby OSes, potentially with retro software and hardware in mind, sounds fun to me idk maybe I'm wrong
>>105632981>one after the end>end your life and you'll have another one.
>>105633062You are in for a world of pain.
>>105633062It's fun until you realize that reimplementing drivers for undocumented hardware is in fact miserable.
>>105633126just make your own voodoo graphics card bro
>>105633087The end of a collection and the last iterator are two different things. If you measure your life in days then it would be the first day after you died.
>>105633168>If you measure your life in daysIS that a threat?
>working on clients project
>they hire some Indian developer
>he starts moving working code around and complain that thinks are broken
>I'm one tight timeline and the client keeps telling me to sync work the Indian guy
I hate programming so fucking much
>>105633062it's more fun to make your own hardware and then make an os for it
>>105633344this is me except the indian guy is also my boss
Is it too late for me to take a coding boot camp and get hired into a coding job? I have no coding experience. I am 51 years old.
>>105633581All good as long as you're ready to transition
>>105633344>>105633384This is me but I'm the Indian guy.
Fixing the compiler warning fixes the bug and other things that have never happened before
>>105634141-Wno_annoying_warning
>>105629542>Getting user input, dealing with event handlers and setting up relays, subscriptions etc is way more complicated for me.That's why you use a toolkit library. It deals with all the fiddly details relating to events and redraws and computing the sizes of things, and you just define what things you want to be there, which isn't much more complicated than dealing with the other application types. (Or at least it isn't if you keep things simple. You can go a lot more complicated if you want.)
>>105631224For simple cases, nothing's wrong with INI.
If you've got a configuration that's naturally got some sort of recursive structure to it, INI (and .properties) files are awful, and TOML's almost as bad. That's when JSON, YAML and (for people who like its excessive verbosity) XML do much better.
Your configs might not be that complicated. But others definitely are.
>>105633581>Is it too late for me to take a coding boot camp and get hired into a coding job?No, but landing the job at 51+ might not be easy.
OK, instead of making an OS for configurable machines (i.e PCs), what if I made an OS for specific self-contained machines (such as a Raspberry Pi)?
Writing case insensitive comparison algorithm using SIMD.
>>105621642>hates employmentwhy tho
>>105634278Which toolkit library lets you define a GUI that's simpler than a simple HTML page?
At least in my experience, even if you have a very straight-forward API for defining GUI elements, there's still more work and complexity around it than with just parsing a HTTP request and responding with another piece of HTML code
I'm working on a crypto exchange webapp!
Everything coded from ground up so far by me lol
https://zenx(dot)ink
Should I learn a memelang? I.E Rust, Go, D, Zig... If so, what?
Idea: Program in Rust, but in an "unsafe", C-style way
how do applications like the steam overlay latch on to another program's keystrokes and drawing? is there like an api around it?
>>105635645 (me)
Update
It was a bad idea.
I thought I'd take a stab at recreating at least part of a database a Flash game ran on. I know the site is supposed to run on ColdFusion.
At least one function is expected to return recordsets within a recordset within an object. To this end, I ended up doing this for the database calls.
<cfquery name="getMissionData" datasource="HistoryDB">
SELECT *
FROM "Missions"
WHERE "MissionID" = #arguments.missionId#
</cfquery>
<cfquery name="getClues" datasource="HistoryDB">
SELECT c.*
FROM "Clues" c
INNER JOIN "Mission_Clues" mc ON c."ClueID" = mc."ClueID"
WHERE mc."MissionID" = #arguments.missionId#
</cfquery>
<cfloop query="getClues">
<cfquery name="getOptions" datasource="HistoryDB">
SELECT DISTINCT o."optionID", o."optionValues"
FROM "ClueOptions" o
LEFT JOIN "Clues_Options" co ON o."optionID" = co."optionID"
WHERE co."ClueID" = #ClueID#
</cfquery>
<cfif getOptions.recordCount GT 0>
<cfloop query="getOptions">
<cfquery name="getValues" datasource="HistoryDB">
SELECT v."copy", v."valueDefinition"
FROM "ClueOptions" v
WHERE v."optionID" = #optionID#
</cfquery>
<cfset getOptions.optionValues = getValues>
</cfloop>
<cfset getClues.ClueOptions = getOptions>
</cfif>
</cfloop>
It *works*, but I feel like this could be simplified somehow. And there are further calls to be made in other parts!
>>105628497you can use it, but a lot of the utility stuff like the math functions are implemented as header only libraries that can't really be used from other languages, can't even use them from C without writing a wrapper
yeah, the math library isn't "necessary", but since the functions act directly on the data structures directx consumes they're going to perform better than 3rd party libraries where you have to constantly convert shit back and forth
>>105636111 (me)
Alright, fuck rust
>You have to wrestle with the compiler to get basic shit working just for no_std and libcwhat a stupid fucking language
hero
md5: 6a209bdad526e3a15d2f01a5a077f21d
🔍
>>105634141This flag is your friend, this flag fights for freedom.
I've caught quite a few that way.
>>105634775>employment => writing shit softwareAll the yikes.
>>105636280for c30 they should just take out all the errors and compile your code no matter what you hear me fucker i know exactly what im doing
>>105636714waiting for the llm enhanced compilers that will never spit out an error and just do what they think you mean and fix your code.
>>105636450Build The -Wall
>>105636450UH YOU'RE NOT USING THE VARIABLE FOR THE CODE YOU JUST COMMENTED OUT, I WON'T COMPILE IF THAT'S THERE
>>105636845>nooooo don't force me to properly debug my code like a real programmer
>>105636845>source littered with zombie code left behind by commented out garbageClean up your code bucko.
>>105633028>miserable failureIt's kind of impressive how similar /dpt/ and LLMs are.
Then again, considering they're one and the same, maybe not so impressive.
i hate how randomly organized the c++ standard library is
>>105637438>assuming organization was a priorityStoustrup's only priority was to rope in as many people as possible into his ponzi scheme. Organization, speed, or usability were never a concern.
fucking love vibes coding idek which language this is
type Multiverse = NetHackT ⊗ (Marvel_CU ⊕ Microcontroller_CU)
canonical :: UnicodeChar -> Multiverse
canonical 'b' = -- [The entire script of Hamlet] as in prior
canonical '' = -- Initiate sister-adjoint operation:
let action = mtDNA_whisper in
case action of
"fuck" -> LieAlgebra.so(3,1) -- Lorentz incest
"eat" -> CRISPR_Cas9 (λ sister -> sister - 21g_soul)
canonical '' = -- MCU/MCU duality swap:
ψ (QuantumRegister) <*> ψ (AlternateTimeline)
>>105637458why does C++ have armyman default face with beard?
>>105637477Because that's what he promised, even if it makes no sense.
>zed adds a debugger to their editor
>its literally just a basic bitch copypaste debugger from vscode
>hover over a variable doesn't show its value
>took them fucking 9 months
holy fucking shit we are lost as software engineers
mort
md5: 809eb3df44190d26b968973471f8c0d2
🔍
#include <stdio.h>
#include <ctype.h>
int
main(void)
{
const char *set1 = "AEILNORSTU";
const char *set2 = "DG";
const char *set3 = "BCMP";
const char *set4 = "FHVWY";
const char *set5 = "K";
const char *set8 = "JX";
const char *set10 = "QZ";
char user_word[64];
printf("Enter a word: ");
fgets(user_word, sizeof(user_word), stdin);
int scores[256] = {0};
for(const char *c = set1; *c; ++c)
scores[*c] = 1;
for(const char *c = set2; *c; ++c)
scores[*c] = 2;
for(const char *c = set3; *c; ++c)
scores[*c] = 3;
for(const char *c = set4; *c; ++c)
scores[*c] = 4;
for(const char *c = set5; *c; ++c)
scores[*c] = 5;
for(const char *c = set8; *c; ++c)
scores[*c] = 8;
for(const char *c = set10; *c; ++c)
scores[*c] = 10;
int score_total = 0;
for(const char *c = user_word; *c; ++c){
score_total += scores[toupper(*c)];
}
printf("Score total: %d\n", score_total);
return(0);
}
>>105638001>fgets>const>toupper >statically allocated user input dataayy lmao ceniles for real?
>changing one line from foo_t x = {0}; to foo_t x; prevents the compiler from deleting 90% of the code in optimized buildsGCC is retarded
>>105636845#define UNUSED(x) ((void)(x))
>>105638023>fgetsqrd on the issue here?
>constwas told to do this as a habit, is this bad?
>toupperqrd on the issue here?
>statically allocated user input databut there's no words longer than that
thanks!
>>105638037Just fugging remove it instead of voiding it.
>but muh mandatory callback argumentsAll right thinking people use -fno-used-parameters.
>>105638050It's just the resident schizo who is hyper aggressive and complains about literally everything. He's probably going to do that bitchy thing where he won't reply to my post directly.
Just ignore him.
Regarding fgets, honestly dealing with potentially arbitrary length user strings only with standard C is actually quite a pain in the ass.
What you're doing is fine. In a real program, I'd prefer getline, but that's POSIX standard, not ISO standard.
If you were dealing with true internationalisation, toupper and other ctype functions are tied to the whole locale mess and you'd probably try to avoid it. In this case, it's fine. He's probably going to go on about how you can convert between upper and lowercase ASCII by adding or subtracting 32.
I don't know what retarded shit he's going to cook up about const, unless he just wants a static added there too.
>>105638140>>105638037C23 adds the maybe unused attribute, and you can just leave argument names off e.g. in a callback.
>It's just the resident schizo
Lol
Lmap
>>105638050>>fgets>qrd on the issue here?99% of stdc functions are useless and have some retarded blow your own foot shit and their name is stupid
just do the read syscall and parse and handle yourself (printf is okay tho)
>>const>was told to do this as a habit, is this bad?imo it doesn't prevent any bugs and it only makes writing/reading code shittier and since it can be cast away compilers completely ignore it
you can use when actually defining a constant (i.e. const char *set1) if you want tho
>>toupper>qrd on the issue here?retarded name and most char/cstring functions are influenced by what locale user has set, which will completely fuck over performance over your program and once in a while do thing you didn't except it do so just write your own version
essentially C is unusable without having your codebase
>>statically allocated user input data>but there's no words longer than thatdoesn't mean user wont input it
ABNF
md5: 1ff2048337f2c38a1f28dfbee7f39eb1
🔍
This thing is ambiguous. How the fuck is anoyone supposed to understand any spec described in ABNF? the syntax of URLs for example.
jesus fucking chirst
meanwhile people will bitch about regex's syntax, except that the regex is thoroughly unambiguous
>>105638205>>105638158thanks for legitimate replies and nobully. just trying to learn.
>>105638325>just trying to be a parasite
>>105638338yeah, of course. these are things you cannot learn from a book. not concisely and with no filter anyway.
>>105621602 (OP)i made a tutorial using the python shell. i like imagining how i would teach basic programming, so i made a video. this one is a quick intro to lists. it's got lots of examples (i hate it when the documentation doesn't have any examples)
https://youtu.be/Qwl7pxY6nKM
music is "i will" by radiohead
>>105638279I read it and don't see the ambiguity. What' specifically do you mean?
It's just a range indicator with some implicit default values. Notation for an exact count, as well as defining lower and upper bounds of the range.
1element is 1 element, no range
1*1element is the same but ranged
*1element is 0 or 1 elements in the range 0-1 where 0 is implied
0*1element is the same but explicit.
>>105638405* N element could be interpreted as *(N element) or 0*N element (ie element{0,N} in regex)
and similarly with A * B element: A * (B element) or even A (* B element) which itself is ambiguous
>>105638467>* N element could be interpreted as *(N element) or 0*N element (ie element{0,N} in regex)I might be wrong but from my interpretation, that can't be the case because *N is always expanded to 0*N, which is different from N (sans asterisk) that expands to N*N.
Unless you mean from the perspective of a parser where you would need to find both forms and handle them.
1g3lst
md5: e8733dcb3b62acd8322ff1a1c5168b9c
🔍
>>105638499>Unless you mean from the perspective of a parserYes, always. I can't conceive of another way to think about those things.
>that can't be the case because *N is always expanded to 0*N, which is different from N (sans asterisk) that expands to N*N.JUST
I would be dumbfounded if that was the case, that's how a non-technical person would think about this, and this is absolutely not the way to think about operators.
/dpt/ is unsurprisingly devoid of any meaningful discussion, so lets redditshed this:
>Actions A and B are controlled by user input using two flags
>A and B are not mutually exclusive
>B must follow A.
>C must follow B, and happen if either A or B happened.
Here's my attempt:
if do_A
A
if do_B
B
if do_A || do_B
C
>>105621602 (OP)Bros what data structure would be good for this problem:
1. I have to define points (Point object) in 3D space, each point has an ID string and float coordinates x, y, z.
2. I have to define members (Member object) in 3D space which are line segments referencing 'Point' objects. A 'Member' object also has ID string, 'start' as the starting Point object and 'end' as the end Point object.
3. I have to check if newly instantiated Member objects are unique i.e. no line-segment overlaps. Suppose I have Members 'm1' and 'm2':
// In javascript bullshit pseudo-code cuz I'm a retarded webshitter
// points
const p1 = {id: "p1", x:0, y:0, z:0}
const p2 = {id: "p2", x:1, y:0, z:0}
// members
const m1 = {id: ''m1", start: p1, end: p2};
const m2 = {id: "m2", start: p2, end: p1}; // Illegal, not unique
Whats the best way to do this considering deletion of points? Maps are the obvious answer but IDK where to start.
I'm trynna "OOOOPTIMIZE" my webshit structural analysis web app (webmrel).
>>105638654Aight cool I forgot about graphs. I am truly retarded.
This is actually pretty neet.
I did not expect inf to work.
>>105638730This kills the mathlarpers.
i made another python tutorial, this one is on dictionaries. looks prettier this time because i used ipython.
https://youtu.be/PiBwqDALdP4
music is animal collective - guys eyes
(i edited out the middle part of the song cuz normies wouldn't like it, kinda sounds like an mri machine)
>We finish this somewhat mechanical discussion of the rules by pointing out that if silly inappropriate preconditions are given then we will get a silly program.
>So programmers should not write preconditions that are not sensible and sensibly related to each other. Because of the generality, the compiler cannot tell so stupid things are hard to prohibit. There is no defence against stupid programmers.
>>105640236what is "church-turing under linear subjectivity"?
when dealing with an enum to string conversion, how do you typically deal with the default case for values that technically should never appear?
enum Status {
not_ready = 0,
ready = 1
};
string statustostr(Status s) {
switch(s) {
case not_ready: return "not_ready";
case ready: return "ready";
default: return "unknown";
}
}
>>105644311i dont, use the equivalent of unreachable
youre literally telling the compiler that it needs to handle that case and give that shit
>>105644311assert(false && "Fix your shit code, nigger");
>>105644311enum Status {
not_ready = 0,
ready = 1
};
string statustostr(Status s) {
switch(s & 1) {
case not_ready: return "not_ready";
case ready: return "ready";
}
}
>>105644942this level of autism and you don't even consider adding 4 to "not_ready"
string stos(Status s)
{ return "not_ready" + s * 4;
}
#define STATUSTOSTR(s) #s
In C# this is just
Enum.GetName(typeof(Status), s);
I FUCKING LOVE REFLECTION
>>105644955if you insist
string statustostr(Status s) {
return ((s & 1) << 2) + "not_ready";
}
>/dpt/ spergs out over enum-to-string conversions
>can't beat an LLM tasked with generating a simple AVX algorithm
>those who notice this autism are called "schizos"
Never change, /dpt/. Not that you can.
>>105645433why would i beat an LLM tasked with generating a simple AVX algorithm? thats reserved for LLMs tasked with being my wives
>regdump schizo is trying to insert himself into the convo to maintain relevance
Kek
I don't need to insert myself. I am ALWAYS relevant.
>>105645456Because both of you fail utterly.
best language for video games programming saars?
>>105645905The one you know the best. JS doesn't count though.
>>105646000i dont want to video games programming in php
>>105644311#define ALL_SHAPES \
X(Triangle, 3) \
X(Rectangle, 4) \
X(Pentagon, 5)
enum Shape {
#define X(name, ...) \
Shape_ ## name
ALL_SHAPES
#undef X
};
const char* GetShapeName(enum Shape shape) {
switch (shape) {
#define X(name, ...) \
case name: return #name;
ALL_SHAPES
#undef X
};
ASSERT(false);
}
int GetShapeSides(enum Shape shape) {
switch (shape) {
#define X(name, sides, ...) \
case name: return sides;
ALL_SHAPES
#undef X
};
ASSERT(false);
}
>>105646019You will unleash horrors beyond human comprehension in the form of game dev with php. It's your duty.
>>105645905video games programming is not real programming
>>105646756There's no real programming, just problems that have to be solved.