Old thread:
>>105647865What are you working on, /g/?
>>105667972Your slop detector is way off.
>>105668066Threadly reminder to kill yourself.
>>105667962 (OP)This micker said trans rights.
Threadly reminder that incompetent autistmos never qualified for the status of human being, and as such killing them doesn't count for murder. Not even manslaughter.
Fucked up a git command and reverted 2 days of work, was about rage quit but realised I still had the entire project open in nvim and just had to hit undo in each buffer. Nvim automatically updated the reverted files but it still had the days history.
>>105668156https://github.blog/open-source/git/how-to-undo-almost-anything-with-git/
>>105667962 (OP)what happened to the web dev general?
>>105668267nobody posts in it
they are all writing python now
>>105668282Let them. It's less competent competition.
To think that registrydumper could've been famous for over a decade if he wasn't mentally ill and wrote something of value.
To think that incompetent autismos still believe normal people wouldn't vote for them to be summarily doxxed and tortured to death in front of a cheering crowd.
>>105668792Make sure to scribble that into your notebook since it will never be written anywhere else.
They will play your and my posts back into your ears at 150 dBs during your torture session, to make sure there is not a single part of your body that is pain-free. People will sing and dance, knowing that a certified subhuman receives his just desserts.
>150 dBs
I'm glad, any lower and I might be able to hear it.
We don't require your consent, but don't worry - we'll feel good about it, too.
Is it a bad idea to stringify whole shit from database and pass it as a data parameter in the script tag of the html?
c
md5: 2660b029ca2a8fed4ad3ee5f7ec13210
🔍
>>105668066>safety>explicit
>>105669024It would be safer if that guy wasn't touching the ladder.
>>105669053>only way it goes badly is if it slides back far enough to tip below horizontal, and it would need enough force to break the banister>helper stands to the side instead of behindit's probably fine either way tbqh
>>105669087And it can't slide back because of railing, if first step was pushing on the railing, it would be perfectly safe.
>>105669129If it works it's not dumb.
>>105669150But it could be unsafe or something, like there's a fucked up exploit lying in wait. I'm very new to this so I like to be cautious.
>>105669159It's just text, don't worry.
>>105669159Database to script is harmless (what's an exploiter gonna do, replace your real data with his fake one and run a local script with that?)
You should only worry about sending stuff back to the database; also you should have some server-side input validation that is independent from the client-side validation in your JavaScript
>>105669344>accepting user input in dystopian shithole called planet Earthngmi
Shit overflow never fails to deliver. https://stackoverflow.com/questions/3220163/how-to-find-leap-year-programmatically-in-c
>>105669408>not compiling and executing user input directlyngmi
>>105670189the user's a trustworthy guy, i know him
>>105670219>Programming for yourself:>input is sanitary>edge cases don't real>segfaults are an acceptable error messages>Work On My Machine>programming for other people>needs to be usable by an illiterate haitian running a 1997 version of beos and also he's trying to rob you
>>105669729Remember that AI slop is trained on this stuff specfically.
What the fuck is this?
Why would adding 16000 change anything here???? That's enough for me today.
>>105668267>>105668282>>105668289Web dev here. Everyone seems to be too lazy to post a new thread. Including myself.
>pythonDisgusting. More of a TypeScript and Go man myself.
>>105670219>the user's a trustworthy guy, i know him
Is /wdg/ dead? Is this the place to ask web dev questions now?
>>105671481Oh well, I may as well ask here then.
I would like to deploy a website. It can run on a docker container image.
Should I rent out a VPS on Linode or something equivalent that offers flat pricing, use the AWS/Azure equivalents that last I checked do not, or use a managed container service like Amazon Elastic Container Service?
I do not really expect much traffic and it's not something that needs scaling. I'm mainly curious about the cost.
made a tampermoneky script that favorites a danbooru post by clicking on it rather than having to go to the post in a new tab and then click favorite.
If C++ has million number of fans i am one of them . if C++ has ten fans i am one of them. if C++ have only one fan and that is me . if C++ has no fans, that means i am no more on the earth . if world against the C++, i am against the world.
How do I get an entry job in computer science, I've a junior going into my senior year and been applying to internships before summer started and not even a reply even from the unpaid ones
Also I feel like my programming skills have atrophied, in a lot of my recent classes there's no programming just charts and written questions about logic
I feel like I was better in my freshman year
I'm trying to learn about oracle, sql and powershell and then I'll try to learn about azure but its all a pain theres not a lot of online resources, is that a good plan
>>105671900Stay away from sepples, kids
>>105671900Bjarne, you are drunk. Go home, we hate you.
>>105671916have you even finished reading SCIP?
>>105671960I've never heard of that term before
Fuck yaml faggots and their retarded garbage
>>105672107Structure of Computer and Interpretation Programs is a sequel to the widely acclaimed SICP
>>105671753I need to do this but for downloading images from X with the artist's @ in the filename.
>>105672185>2 spaces off>suddenly you're in a different section
>>105672185>>105672436ini won, TOML is getting popularity and it's just ini + bloat
hockey
md5: 9e1664d2b90b1f41674a6ccfb3d8f176
🔍
while (fscanf(file, "%s = %s", &k, &v))
set_option(k, v);
you dont need more
>>105672559if you mean environment variables and switches you are truly a master of the blade
>>105672186I don't think I was ever assigned that
but to be honest I never used my text books, the teachers always just post the information thats going to be on the exam as a powerpoint
>>105672529It's all hardcoded.
>>105672648>guy assigns you his own book
>>105672621I mean config.h
image
md5: 957a5614fb7fb3f8d286597b654a3b45
🔍
>>105672983but daaaaadddddd i don't want to recompile just to change font size
>>105673061Stop changing fonts.
brat
md5: d6fb981006586cfed75179bdb3789ecf
🔍
>>105673079i need to change font size so badly i hate you
>>105673152just like make it watch a file with inotify and reload fonts if it changes or use ipc to set the font.
It really is that simple.
>>105673152You can patch it to make font size adjustable with keybinds, st font can be resized without patches even.
>>105673152change your monitor resolution if you want a different size
m
md5: a9b70fccb666e211b3cf4785ee27cd80
🔍
>>105673152usecase?
use a magnifying glass
I never knew how much I hate unix until I had to iterate over char*[] envp just to grab a pointer to the auxilliary vector before I could proceed to parse the ELF just so I could access the pointer to __vdso_time.
>>105673870>Wahh!>Why won't this portable API provide a way to do something super unportable!>WWWAAAAAHHHHHH!!!!
what's a good project idea to learn docker?
>>105674450The irony in your retardation is palpable.
You know that the envp is found by mere rsp+argc*8+8, right? I guess I'm lucky that I don't also have to scan through argv just to get to the envp, because unixfaggot retardation has no bounds.
Convince me to drop Rust and go backt o C or C++
>>105674810>WWWWWWWWWAAAAAAAAAAAHHHHHHHHHHH!!!Damn, the schizo troon is in meltdown, yet again.
>Spend multiple days trying to figure out why my shit isn't working
>Turns out its been working all this time but it runs so fucking fast only specialised benchmarking tools were able to catch it
Fucking Christ I want to die, I thought microcontrollers are supposed to be slow bros.
>>105674971>convince me to stop being retardedWe aren't your parents.
>>105674971Why drop Rust when you can drop your balls instead?
>>105674988Stop writing in 3rd person, it's uncanny.
>>105674971meson and cmake exists
>>105675274>cmakemeant to say xmake. so much easier
>>105675274Why does Cargo still feel infinitely better?
>>105675287Because it is infinitely better.
>>105675388gay and retarded just use malloc like everyone else
>>105675287because you aren't a drive bloating with garbage
>>105675388I've done this before, but without a macro hiding it.
As long as you know the inputs can't be stupidly large, but you could even put a truncation into %s if it's a concern.
>>105675439The whole point is to avoid the slow heap.
>>105669087>Very dangerous usage>Current setup works every time because of underlying structure>It wont change anytime soon>Years later a reform happens and the gap widens / the position of the pillars change>Ladder fallsComputer moment.
But no the solution is not to use tranny reddit language, it's just to code properly
>>105675460Heap isn't slow, schizo.
>>105675460>slowyou're using printf
>>105675475That's just for debugging.
>>105675474Memory allocation on the heap is slow as fuck.
>>105675489Fast on my machine.
>cniles still stuck with debugging through printing
don't you have any IDEs with a debugger?
>>105675460>>105675478are you schizophrenic? is this one of those "i don't know why I did that and my brain has synthesised a false reason"?
>>105675512>he uses an IDEfucking jeet, I use nvim and gdb for real debugging.
>>105675517How the fuck do you not understand that the stack is faster than the heap by multiple magnitudes?
>>105675554>nvimhello, reddit
>>105675558It has better syntax highlighting than vim.
>>105675489benchmark it, this is one of the things that the malloc schizo doesn't do, so if you did it, you would already be miles ahead of him.
the problem is that you could just google it (Im sure mimalloc has benchmarks), and it turns out that the first malloc call is slow because it uses mmap / VirtualAlloc (in the scope of microseconds), but afterwards it runs at a few hundred nanoseconds/cycles (depending on the size of the allocation).
This thread is also lazy as hell, nobody here does any fact checking, I think I have posted here like 10 times that mingw + clang (msys2) has address sanitizer, but it doesn't, I had to correct myself by testing it.
also won't compile on msvc due to VLA's.
>msvc is shitit has address sanitizer which is all that I need.
also I don't want to go back to linux because I use graphics libraries and they always have false positive leaks from address sanitizer, and there is no compiler flag to disable leak checks on linux, msvc just doesn't have leak checking which is great!
>>105675489No, it's not. System calls are expensive.
And if you really cared about performance, you wouldn't be using VLAs everywhere.
>>105675569No it doesn't, redditor.
>>105675640malloc schizo benchmarks on godbolt's servers and doesn't even bother to account for jitter.
He also was very quiet ever since the tzcnt incident.
WHAT THE FUCK, I AM A SCHIZO,
Why the fuck does g_data_input_stream_read_line, g_strsplit, g_string_printf and g_compute_checksum_for_string grind my program to a halt then?
Watching the schizos argue about memory all day makes me wonder if this how retards feel when they make bloated 3GB electron todo apps. The yin and yang of shit devs.
>>105675770I expect half of the time is spent formatting (glibc locale stuff), the other half of the time is spent with terminal buffering (I don't know if it's the implicit flush from the newline or if it's from the fact you are putting so text into stdout that write() actually blocks because the reader AKA the terminal isn't reading fast enough, or something).
You could pipe stdout into a file or use fprintf if you want to test if it's the terminal's fault.
Also the reason why the speed is identical is because of optimizations (the malloc is never called).
Please get a PHD in writing benchmarks before posting here, start with reading assembly.
>>105675864>>105675864I have so many glowies in my head right now,
mfw you try to optimise away dynamic memory allocation and it actually performs worse.
>>105675864*actually nevermind, malloc never gets optimized out, only C++'s new and delete do.
you always learn something new every day...
>>105675939benchmarking without optimizations is not a useful benchmark, but optimizations tend to optimize away everything, so you need to use tricks to avoid optimization (don't use hardcoded numbers, parse args through argc/argv) or just read the assembly (godbolt) so that you understand what the compiler is actually doing.
will I git gud if I grind leetcode?
I can do any leetcode easy and most leet code medium, and I have done one leetcode hard. But I have no idea how to make anything or do anything that I thing a company would be intrested in. And online all they say is they want you to know azure or some AI shit
>>105675941nevermind, I scrolled down accidentally and didn't read the assembly :)
>>105675968Maybe, but unless you stick to a curated subset of problems ("neetcode" or whatever) it will just make you hate programming.
Jeets love it because they have no qualms about cheating, they use it to show off their "solved" problem count to recruiters.
>>105675968>>105675984leetcode is memorization. It is much better to learn and memorize the algorithms and when to use them instead of trying to divine the answer every single time. I did for almost a year and it helps with day to day code, the brain gets smarter and faster
>>105676015True, I used a curated list where I would do the same theme many times in a row to burn the patterns in my mind. Stopped when things got too complex because I simply don't work nor need complex algorithms. Also true about jeets.
So do it for you, but unless FAANG memes are true it won't help with finding a job.
>>105675968It teaches you to solve small problems but it can't teach you how to put everything together to solve real life problems.
>>105675967I think it is most certainty because 2 calls to snprintf is more expensive than 1 call to asprintf.
>>105675388>not `if` safepoison. it's actually more flexible if you take an already declared char*, and that lets you pack it in a do while (0)
just made an LLM workflow where i prompt it with
>enemy team
>my characters potential builds
and ask it to recommend me the build to best deal with them, as well as sorting the enemy team into scored targeting info
the LLM responds in JSON then i have an html page to render it nicely
might see it as an exploit and it probably is but im using it to learn better as a new player
>>105675967Or you can just tell your compiler not to optimize code.
#define false_dependency(expr) (asm volatile ("" : "+m" (expr) :: "memory"))
Usually works on my machine.
>>105671513S3 + Cloudfront or lambda
Are you guys smart enough for algotrading
>>105678922All relevant trades are done manually, you'd know this if you were intelligent.
>>105667962 (OP)can anyone explain to me the concept of rendering multiple objects using vulkan? do i need different uniform buffers for each object? currently i can load a bunch of models but they all share the same position and rotation etc they move as one object.
i understand push constants are a thing but i would like to just understand what exactly differentiates one object from the other in terms of when you apply a transform how do you make that transform apply to one object but not the others? i can't seem to figure this out or get the right mental model about it.
I'm coooding in ASPNET, and tried to make a view component that i could use as a wrapper for html content. But this is not possible? Wtf?
>>105678952>do i need different uniform buffers for each object?You have a LOT of flexibility over how it's done but yes, you typically would. Remember, you can have many uniform buffers bound at once, so you can have one for all of your global stuff, and then all of your per-object shit in another.
There is another specific use-case that relates to your question, which is instancing, i.e. drawing the same mesh/model multiple times in a single draw call.
In that case, you then have per-instance attributes (as opposed to the typical per-vertex attributes) which could then contain your stuff like transforms.
But you're probably not doing that.
>>105678940Post portfolio
>>105676178This. Format printing is expensive because the code has to go through every single byte, check for format specifiers (very branchy), and keep track of its internal state.
>>105668267Was just looking for it.
My company had its biggest project cancelled and I lost my job.
I used to do fullstack PHP+MySQL+jQuery stuff, mostly slop code supporting and expanding an ancient huge system. Now I'm learning Laravel, Blade, Doctrine, trying to be more object oriented.
Has the AI mindvirus hit webdev company managers yet? Should I learn enough about that to be able to lie about it in interviews?
>>105680053Every non-toy language does this at compile time.
reasons why printf is king
low code size, fast build, typechecks with i18n format (non-shit compiler only)
>>105680053they're both format printing m8. the difference is snprintfs are pretty fucking lazy internally and snprintf(0,0, ...) winds up doing things like
buf = asprintf(...);
result = strlen(buf);
free(buf);
return result;
https://github.com/gcc-mirror/gcc/blob/master/libiberty/vsnprintf.c
>>105680349Why would it do something different?
>>105680177So any non-toy language is unusable for code in production, got it.
>>105680400Format strings can trivially be parsed at compile time, turn on your brain, schizo.
>>105680370perhaps you would like to skip the copy operations and the conversions on fixed-width fields.
>>105680468Feel free to do it yourself then.
>>105680469another terminal case of cnility.
>>105680480>noooo, why is "import generic solution" slower than my specific problem?
>>105680431Sure, if you turn on the optimizer. Which, if your non-toy language does so automatically, makes it unusable for anything that has to be deployed offline, and you can go and wipe your ass with that garbage.
>>105680555Keep your nocoder delusions to yourself.
>>105680572If you hang yourself on stream, sure. I'd pay money for that footage.
>>105680576You will never be a woman.
>>105680609You must live the rest of your days entirely as a man and you will only grow more masculine with every passing year. There is no way out.
Finally figured out the GitLab CI/CD stuff to get my site up
>>105680431>Format strings can trivially be parsed at compile time, turn on your brain, schizo.tmp $ cat a.c
#include <stdio.h>
int main()
{
printf("test %d\n", 1);
return 0;
}
tmp $ gcc -s -O3 a.c
tmp $ strings a.out | grep test
test %d
Additionally the string address is just loaded normally in r0, relative to pc
<.text>:
ldr r0, [pc, #20]
mov r1, #1
push {r4, lr}
add r0, pc, r0
bl 3e4 <printf@plt>
No compile-time format string parsing appears to have taken place on -O3
>>105681390>CThis is commonly done by the programmer.
>>105681474Further up the reply chain the context is C at compile time, is there an example of this optimization elsewhere?
>>105681550Yes, check languages that weren't obsoleted yet, such as Rust.
And this is why we need voted doxxing.
>>105681578pub fn f() {
print!("test {}\n", 1);
}
Does indeed evaluate the format string at compile time:
example::f::h7734f15653ec49e3:
sub rsp, 56
call core::fmt::rt::Argument::none::hc065e58ad5eb8a68
mov rdi, rsp
lea rsi, [rip + .Lanon.716986cbd744513a3d704c9aedd6c96f.4]
lea rdx, [rsp + 48]
call qword ptr [rip + core::fmt::Arguments::new_v1::h6fe4f7f03708fd6d@GOTPCREL]
mov rdi, rsp
call qword ptr [rip + std::io::stdio::_print::h83d703bcf3ee60d9@GOTPCREL]
add rsp, 56
ret
.Lanon.716986cbd744513a3d704c9aedd6c96f.3:
.ascii "test 1\n"
That's pretty cool
>>105681774>Rust won yet again.Many such cases.
>>105681774cool you sacrifice a billion years of productivity and jobs to get compile time printf good work craboids you solved it
>>105682001Rust is the productive white man's choice.
I just rewrote my nostdlib in Rust, and executable is smaller. Lmao, cniles can't defend this anymore, I'm transitioning to Rust.
Why arent you a rockstar 10x saas founder yet? Are you a loser or something?
>>105682196I hate paperwork.
Does EJS syntax feel disgusting to you guys too?
>>105682196too dumb and lazy. also, no motivation (don't care for money much).
>>105682287it's really about tooling. If your IDE manages it nicely then it's nice.
But most (every) "templating" languages or libraries are fucking ugly.
I'm writing some C# code to interoperate with a C library that uses a large union.
What's the pro strat here? Store the value I extract from the union in a class as a generic object with a type tag and use accessors like the SQL library does (GetString, GetInt, etc)? Or is there a smarter way of doing it?
>>105682196I work at a startup where I am increasingly given responsibilities, promotions, raises, and stock options (that I think will probably never be worth anything). I hate it so much. I don't want to be a project manager, I don't want to be in charge of a team, I don't want to tell people what they need to code. If these people were competent, then it would be easier because I wouldn't have to manage them as much, but many of them can barely write typescript. I just want to get tickets assigned to me, I code them, and I go home to work on my hobby projects. Business shit sounds like pure hell to me
>>105683983is this painting real is this h0ow all the cows left eearth
>>105683995>left earthThis is how they arrived
>>105678940i don't think people give a fuck about their trades being 'relevant'....
>>105684351Reminder: if you ever paid for autotrading, you lost money manually.
>>105668156literally the point of git is to fix git mistakes with git, but I'm glad this worked. that being said, please study more.
>>105684366I literally pay others to worry about that shit for me.
>>105685082if they knew what they are doing, they wouldn't need your money.
>>105667962 (OP)https://ayasequart.org/fts?boards=g&media_hash=I3mAi2JrDtE3fbovucrc%2BQ%3D%3D
Added file picker -> auto MD5 on my site.
>>105670600Mathematically, the addition should be washed away, as 16000 % 400 is 0, so I assume this is something to trick the compiler more than an operation
>>105675388If you're using GCC and a newer standard, you can wrap that macro in `({})` and add `name;` at the end to make it behave better, provided you don't return that from a function
#define FMT(name, format, ...)\
({\
__auto_type __name = (name);\
int __size = snprintf(nullptr, 0, format __VA_OPT__(,) __VA_ARGS__) + 1;\
char __buffer[__size];\
snprintf(__name, __size, format __VA_OPT__(,) __VA_ARGS__);\
__buffer;\
})
>>105686122The optimizer will destroy this code
just use alloca.
>>105667962 (OP)What is the 90% in programming?
>>105686725designing the thing you're programming
what's the best language that can help me land a job the fastest or i guess the easiest to learn?
>>105687257Anything that is easy is going to be done by geepeetee. There are no easy routes for you anymore.
>>105687308okay so how do i start or get into it?
>>105687257How old are you? Right now it is probably R*st, but in 10 or so years, Hare will be the next big thing.
>>105675388Isn't this allocated on the stack?
I'm working on my sanity.
I feel like everything is becoming web based.
I'm in engineering and even the finite element analysis software is migrating pre and post-processing of analysis to web based interfaces.
might just start webshitting.
>>105687308gpt can barely build plain html sites mate.
>>105688852not surprising, web interfaces are just simpler to implement and more versatile than native GUIs
>>105688863Then it's Copolit, or Cloud, or whatever they're called these days.
This may sound weird: I want to learn but I can't start programming. Everyday I open my PC and start browsing the internet instead of coding. Anyone else having the same problem?
>>105689223you need a project.
>project over deadline and budget
>working off the clock to get things done
programming was a mistake
>>105689352pic related is exactly why you need a project, you get sucked back into thinking about it instead of scrolling all day.
>>105689223pretty sure it'd be weirder/rarer to find someone that doesnt do that.
overcome your mediocrity.
>>105689426That's every industry.
>>105689474>work in trades>do 08:00 - 16:00>no after thoughts
>>105689483>be plumber>get a leak at 15:59>wait 1 minute>home time, night all, im off to the pubyeah, doesn't work like that.
>>105689495next in shift will take it
for programmers there's nobody in the queue
>>105689495>>105689509also the plumber gets paid extra for being on call
>>105689509site plumbers don't work in shifts.
>not shitting in sacks instead of relying on plumpers
Weak.
>>105689582>being indian in japanese anime image board
>>105689611Indians shit on the street, not in sacks.
>>105689711Indian here, I can do both.
>>105690188Then why don't you? That'd be an improvement.
Indian here, I poo in loo and I am top 3% in leetcode (C programming language only), the project of my life is a registry dumper that prints at 50MiB/s.
>>105690260I use a toilet like most people do, but go off. I'm not getting in the way of your seethe against disgusting subhumans that shit in the streets.
>the project of my life is a registry dumper that prints at 50MiB/s
Funny, because you can't even do that. Which is exactly why everyone would be happy to see you hanging from a tree with your legs shoved inside your throat.
>>105690354India doesn't have trees.
teak
md5: 70abc07703b91dccb5380798c944f80c
🔍
>india doesn't have trees
Then let's give it all to Pakistan, shan't we.
Just found out about the remote SSH extension in vscode. God it's so nice.
Combined with gemini extension i am going to cum
>make a change to my discord bot gemini
>hit apply all
>hit save all
>nodemon restarts server
I never have to touch a terminal again
a = input("are u a black man? 1- yes 2- no")
if a == "1":
print ("kys nigga")
elif a == "2":
print("you're human")
else:
print("you typed a wrong key")
input()
https://lief.re/doc/latest/extended/intro.html
>Have to log in via Github to access enhanced version of FOSS library
Huh? What's the point.
Oh nevermind it's so only sponsors can access. Gay.
any cpu design expert here ? (vhdl)
i hate the style and syntax of all existing languages but to make something better, i'd have to use one.
life is suffering.
>>105691804If even raw assembly triggers your autism you can always write your program in a hex editor.
WHY DOES EVERY LANGUAGE HAVE TO DO ELSE IF DIFFERENTLY????????
>else if
>elseif
>elsif
>elif
WHAT THE FUCK IS THIS SHIT JUST BE CONSISTENT YOU FAGGOT FUCKS AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>>105691956lol every language with if and else keywords should do else if i mean come on why add more keywords
>captcah : 420N'Tlmao
>>105691956Lack of fear of death.
>>105691956in Haskell this is just
case cond of
False -> b
True -> a
>>105691956dude
DUDE
dude, what if
what if
dude
dude what if there was only one programming language, the human programming language
brooooo
>>105691956>else ifbased and straight to the point
>elseif>elsif>elifmental illness
>>105691956>else ifthis is not "else if" this is an else statement with an if statement inside of it abusing single line statements without braces to masquerade as a unique keyword
>>105691956ti should be
>maybe>or maybe>or
>>105692020that's just lisp
I did nostd C and it just werks.
I did nostd Rust and it only requires gigabytes of bloat to have same feature parity on minimalism side.
Will C++ pass? Let's find out over next 2 weeks
I hate sepples. Well not really the language, but anybody who wants to use it.
See, I'm C developer.
They will ride with c/c++, but they have very little in common. No C developer will say c/c++.
They will tell you that they are compatible and c++ is just superset. In reality (((they))) will never provide C compatible API and will end up filling your C headers with
#ifdef __cplusplus
extern "C" {
#endif
They willl tell you that pointer + offset is not safe but their type casting class initialization rules will just leave you confused. "Why would anybody write that shit".
They introduce their std container but they have no returns values on error, you need exceptions, except in your work you can't use exceptions.
They will still bring them and disregard any the requirements of the hardware and your environment.
In the end they can't even build the project.
They will force cmake over gnu make but they don't can't operate neither.
You are left to figure out what the sepples developer did and tried do because there is no documentation and nothing he made makes sense.
The language attracts flies like a trap.
>>105692392C++ is an actual zero cost abstraction over C, if it's not to you, it says more about your intellect and ability as a programmer than it says about your compiler.
Makefile for reference:
override CFLAGS += -Wl,--entry=_start
override CFLAGS += -Wl,--gc-sections
override CFLAGS += -fdata-sections
override CFLAGS += -ffreestanding
override CFLAGS += -ffunction-sections
override CFLAGS += -fno-asynchronous-unwind-tables
override CFLAGS += -fno-builtin
override CFLAGS += -fno-exceptions
override CFLAGS += -fno-rtti
override CFLAGS += -fno-unwind-tables
override CFLAGS += -masm=intel
override CFLAGS += -nostdlib
override CFLAGS += -static
override CFLAGS += -std=gnu23
override CXXFLAGS := ${CFLAGS} -std=gnu++23 -nostdlib++
override MAKEFILE_DEPS := Makefile
SRC.c := ${wildcard *.c}
SRC.cpp := ${wildcard *.cpp}
c.out: ${patsubst %.c,%.c.o,${SRC.c}}
${LINK.c} -o $@ $^ ${LDLIBS}
strip -sR .comment $@
%.c.o: %.c ${MAKEFILE_DEPS}
${COMPILE.c} -o $@ $< -MMD -MP
cpp.out: ${patsubst %.cpp,%.cpp.o,${SRC.cpp}}
${LINK.cpp} -o $@ $^ ${LDLIBS}
strip -sR .comment $@
%.cpp.o: %.cpp ${MAKEFILE_DEPS}
${COMPILE.cpp} -o $@ $< -MMD -MP
.PHONY: clean
clean:
@git clean -dfX
-include ${wildcard *.d}
Ceethe and C++ope C--niles.
>C++
>zero abstractions
Good one.
>>105692564Didn't read your cope since it's not my code. Zero abstraction in my code, dilate your axewound, nocoderina.
>stage one: denial
>bordering on stage two: anger
Call me once you're ready to bargain.
>>105692592You must be very angry that someone more intelligent than you exists (literally 8 billion humanoids since you're dumber than a nigger).
>can't follow the *simplest* instructions
He's gonna be stuck on stage two for a loooong time, innit he.
>>105692611And here we see typical Wernicke's aphasia sufferer in his natural habitat.
Reminder: final stages include loss of home and inevitable suicide by train.
>muh Wernicke
This is what autism does to a person.
>>105692633Your diagnosis is permanent, and terminal, make sure to tell your loved ones how much you love them, while you still can, because once they find your mangled mush of a corpse on train tracks, they won't be able to find out why.
>>105692492>about your compilerI wasn't complaining about compilers, I was complaining about sepples fags but of course you sepples fags will disregard it
>>105692700How did you know that I didn't even read your post?
>>105692708I didn't, yet you replied, like a sepples exception.
>>105692724Easily solved by reading the manual, but you read manuals like I read whiny posts.
In any case, if you ever need to deal with C++ in C, it's because you aren't as elite as you imagine yourself to be.
030
md5: 2b9190b5ad43a05892d006167c89730d
🔍
>>105692746>if you ever need to deal with C++ in C, it's because you aren't as elite as you imagine yourself to beyeah when I can't be the lead, I need to work on clients projects.
But the clients who have used C are nicer compared to anything that crawls in sepples.
>>105692789Bottom feeder issue.
Trying to understand how the fuck clap works
>>105692990Ah shit that wasn't so hard
C++: a * (a + b)
Rust: &a * &(&a + &b)
>>105693225&(&a &* &(&a &+ &b))
all variables should be const
>>105693297All memory is mutable.
>>105693234unsafe { <&(&(&a &* &(&a &+ &b)) as ref &mut i64)>.unwrap() }
>>105693526>unsafe { destroy the universe() }Finally, we've solved safety in programming
>>105693777 (holy) (holy) (holy)
>>unsafe { destroy the universe() }It's so over for univercels
how do I use a .vscode file that is external to my project? I would like to basically create a blank workspace with a configuration that I can load projects into and they will use the same .vscode config
I don't want to copy paste .vscode into each project because now I have to update the exact same thing across dozens of different projects, and I have to manually exclude it from git since the editor used should not leave traces in the repository
>>105693297Rust did one (1) thing right
https://www.youtube.com/watch?v=QBzbpo6GnN0
This fucking guy
#include ""
vs
#include <>
seems kind of arbitrary for something actually implemented within the language
>>105693993#include __FILE__
>>105693993it's all just assigning arbitrary meanings to strings of ones and zeros, bro. what did you want them to do?
>>105693993Me? I just manually copy/paste the contents of the header into the cpp file.
>>105694004That sounds like something a dumb gay and retarded frogposter would do
>>105694004cat `find -iname "*.h"` *.c | gcc -xc -
>>105694074>cat `find -iname "*.h"`Who names their cat *.h?
>>105694854is that some pronoun shit? we don't have that garbage in assembly dev
>>105694854Literally nobody needs to know anything besides the difference between lvalue and rvalue, the rest aren't even real.
>>105694871asm has lvalues and rvalues, you can stop posting now, fizzbuzzer
>>105694854lvalue and rvalue are self explanatory, so really that entire graph just boils down to knowing what an xvalue is.
>>105693993>kind of arbitraryThe intention is "local include" vs <system include>.
What that actually means depends on the compiler and its settings.
>>105694854lvalue, this nigga has a name and you finna copy it's data
prvalue, this nigga has no name its just some busta that just popped up outta nowhere
xvalue this nigga crazy he either used to be an lvalue and you popped a cap in his azz with std::move or it's the data member of a prvalue that you are trying to access on the downlow, na what im sayin
>>105696704finna no cap br fr fr desu ne dayo
why are all c++ books 4800 pages long
>>105696890Because religions require brain washing.
>>105686725Reading documentation
>>105696890C++ is designed for language lawyers and language trivia dorks to circlejerk each other every year at cppcon
>>105697131at least they still have penises to jerk, the same can't be said for the rust convention down the hall
>>105696917That would be a nice cope, but the only people who read the bible cover to cover are atheists.
>>105697380Nah, I'm an atheist and stopped at David.
Now. zealots, those DO believe every lie Stroustrup is telling them.
this idea is the best idea ever -> this idea doesn't even make any sense
repeat forever
AHHHHHHHHHHHHHH
>>105697435I let my campfire eat the bible cover to cover last winter.
Every day my dogfood grows tastier.
>>105697131yes, it's pretty exciting.
>>105697443>try to make thing>learn a lot in the process>learning experience makes you realize how fucking stupid your thing is on every levelwhatever
ocaml is truly a wonder of engineering. only the french could find a way to make FP feel ugly and inelegant
>>105692051i think that's a good thing because my brain sees it as 'else + if' instead of a separate keyword. it just means else { if } whereas using 'elif' by comparison seems kind of retarded because it has no syntactic connection to else nor if, it's just it's own keyword
>>105691956Still hard to believe nobody had the balls to use "ef"
poly
md5: 34fa71e41916c90bdf5d4b93c4874ab3
🔍
>>105697856yeah I don't understand why don't people just use SML, it has standard and minimal use of compiler extensions cover the rest.
>>105697949if 1 == 0 then
do_muh_thing();
ef 2 == 0 then
do_muh_thing2();
of
file
md5: 0beb1acb67ceb7195832e207ab3c59df
🔍
>>105692564it's a bit better with string_view. you shouldn't use std::string unless you NEED to modify it dynamically... also longer assembly doesn't necessarily mean slower. -O3 produces longer assembly for example.
>>105691956These tiny subtleties set apart real programming languages and mere toys.
#include <stdio.h>
int main(void) {
if (false)
;
else
while (true)
puts("I'd just like to interject for a moment. What you're refering to as 'else if', is in fact, else/if, or as I've recently taken to calling it, else plus if. else if is not a syntactical keyword unto itself, but rather another combination of fully functioning keywords made useful by the C programming language, C programming language's compiler and vital userbase comprising a whole earth, as defined by C programming language's standard.");
}
file
md5: 82267fbe4d26d9dc00e92682ffdd4390
🔍
>>105698095and if you REALLY don't need to do anything to the string but use it may i suggest static constexpr const char*
>>105691956first two are okay, latter two are deranged
why do so many people seem to think saving a keystroke is more important than readability? how shit are they at typing?
1234123
md5: e5342f845a4d3e767022bd5a102b92a4
🔍
>>105667962 (OP)>change one little thing>segfaults everywhere>add print statements "HERE1", "HERE2", etc.>segfaults are gone>problem solved
>>105698524Uninitialized variable?
>>105698513Only first one is sensible.
>>105698535i dont know but im trying to write to a file and its writing each line twice
but when i ctrl f i only see one line in my code that writes to the file
>>105698584you are calling the function two times dumbo
>>105698584And naturally you don't post the code because you're afraid we're going to steal it.
IMG_3338
md5: 0e10653692141d63c29639e7d42728d1
🔍
Posted this in sqt by accident but I think here is more appropriate:
which should I learn for the sake of productivity? Rust or C++?
I have a tool in mind that I want to make using an immediate mode gui, ie imgui or egui
other things I'll need:
http/websocket client library
JSON unmarshaling
plotting (maybe)
concurrency ideally (async/await) but it might not be necessary depending on how good single threaded performance is
It's pretty crucial that this program does not crash
to this you'll say "use rust, duh" but if rust is going to take me over a month to become productive with it then forget it
I need to balance productivity and reliability
I'm also more familiar with C++, marginally (it was my first "real" language technically but I havent used it in over a decade), so that factors into the productivity thing
Ideally I'd use Go since its uber reliable while being uber productive but I need C++ or Rust on my resume (either one)
I'm so confused by visual studio. VS code was so straight forward by comparison as complete beginner to coding.
>>105698769>It's pretty crucial that this program does not crashHow crucial?
>Get idea for project
>Excited and optimistic
>Start digging into the APIs and systems I'd have to deal with
>Optimism gradually turns into sadness and regret since everything feels way more complicated than it should be
>Reach breaking point when MVP is thousands of lines and extending it feels like a monumental task
>Abandon project
Every time.
>>105698769>It's pretty crucial that this program does not crashDon't do programming then. Programs can crash at any time for any reason,
>>105699912If the program crashes at the wrong time I might lose a lot of money
>>105700727Wow thanks for the platitude thats not even technically correct, you fucking retarded asshole
>>105700793Then exert your energy on a fruitless effort. Like I care.
>>105700727>,>FATAL ERROR: Anon stopped working.
>>105700952>error message instead of crashCute.
>>105700793>If the program crashes at the wrong time I might lose a lot of money
>>105701179Ada is intriguing but it lacks the libraries I need unfortunately
I'm thinking about making a musicbee clone with less functionality.
Since musicbee is the best music player but uses WinForms (I think?) what would be the best replacement to that?
>>105700793>If the program crashes at the wrong time I might lose a lot of moneyAt that point you triple the program and make a negation if at least 2 programs give same result, then it worked.
This is pretty common in big sea vessels and space programs.
>>105701216>>105698769>http/websocket client library>JSON unmarshalingAWS
>plotting (maybe)This depends on what you're doing
>concurrency ideally (async/await) but it might not be necessary depending on how good single threaded performance isTasks are literally built into the language since Ada83
I'm just meming, but Ada has lots of libraries. They're just harder to find and old stuff still works because of actual standards. You can check on Alire if you're really interested, but Ada is the #1 if you actually need high integrity software that doesn't run like molasses.
>>105701394Its not for gui based programs
>>105701546>Its not for gui based programsIf you say so, nocoder
>>105701561Delusional
I wasnt shitting on ada btw just objectively it doesnt have good gui libraries because its used for backends
>>105701342Interesting, thanks
>>105701589Your statement reeks of nocoder.
There is nothing special about GUIs.
>>105701613>nocoder who tries to obscure being a nocoder by preemptively calling other people nocoders>pajeet who calls other people pajeet>etc.Many such cases
>>105701659>There is something special about GUIsYou outed yourself