[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: day10_01.png (13 KB, 700x411)
13 KB
13 KB PNG
Previously >>100124857
What are you working on?
>>
Hey guys, I am trying to debug Rust code using lldb and vs code. I need to inspect the values of &[i32] but it sows the pointer and length only. Is there any way I can see the values of the slice? I tried using .to_vec() in watch but it didn't work
>>
>>100141760
programmers who think stupid-ass unix apis are good should be genocided.
>>
>>100141795
Your entire ilk should be tortured to death on national television for an entire year. I'd get cable for that.
>>
>>100141874
sorry you had to out yourself as a "fucking retard'.
>>
>>100141893
How does it feel knowing that the jury would nullify the law in my trial for ridding the world of your ilk?
>>
>>100141864
retard.

my 128GB of virtual memory allocated with mmap because I don't want to think about memory allocation and want the kernel to do it for me instead because im a stupid lazy unix programmer:
|-------|-------|-------|-------|-------|-------| ... use your imagination for the remaining pages

| is a page divider.

i touch this page.

|-------|-------|-------|-------|-------|-------|
^

kernel lied to me and said that it allocated the physical memory beforehand, this is not true. it will now handle the page fault and actually allocate physical space for some amount of the virtual memory just in time.

i touch another page a little bit further away.

|-------|-------|-------|-------|-------|-------|
^

kernel lied to me again. it will now handle the page fault in kernel mode and actually allocate some amount of the memory just in time.

this is the whole point of the mmap overcomitting scheme, this is intended behavior, you want this to happen. you are making a fool out of yourself.
>>
>>100141795
>can’t understand unix api
Pajeet filtered
>>
>>100141974
midwit detected
>>
>>100141963
>my 128GB of virtual memory allocated with mmap
Already stopped reading there, I'm done dealing with mouthbreathers who're too dumb to learn English. Killing you wouldn't be murder because murder is reserved for human beings.
>>
>>100141979
>can’t use a fucking api
>”hurr you’re a midwit”
lol
lmfao even
>>
>>100141980
this is what the original tweet was talking about idiot. allocating an insane worst-case amount of memory with mmap and then suballocating that using arenas.
>>
>>100141984
ask me how i know that you're a freshman cs undergrad. i bet you didn't understand any of the shit i explained. all i can think is "linux le gooooooood for hackerz windows le baaaad for normies"
>>
>>100141990
>ignoring MAP_POPULATE, MAP_LOCKED, and MADV_WILLNEED
>"b-but my context switches [sic!]"
>ignoring the lack of expensive mode switches because the thread is already in kernel mode when either mmap or madvise are called
Just read the fucking manpages and then abort yourself.
>>
>>100142040
you allocate some fake virtual memory and then you switch back to user mode, retard.
mode switches are often a good opportunity for the kernel to switch you out for another process, retard.
the page faults are the whole point because you are allocating memory on demand as you touch the pages, retard.
>>
>>100142008
>thinks page faults cause context switches
The irony of your attempt to insult me is that a freshman CS student knows more than you.
>>
>>100142054
>then you switch back to user mode
That's not how that works, mouthbreather:
>MAP_LOCKED
>Mark the mapped region to be locked in the same way as mlock(2). This implementation will try to populate (prefault) the whole range
>MAP_POPULATE
>Populate (prefault) page tables for a mapping. [...] Support for MAP_POPULATE in conjunction with private mappings was added in Linux 2.6.23.
The population happens in mmap/madvise after the mode switch, not in user mode after the return.
>>
>>100142093
it often does especially if it has to populate the page from disk. why are you so braindead.
>>100142102
it's like you didn't read anything i said. holy shit. try setting any of your stupid flags when allocating 128GB of virtual memory (as was implied in the tweet that i originally replied to) bro. lemme know what happens. the whole point is the on-demand population of pages, overcomitting is the point.
>>
>>100142187
>it's like you didn't read anything i said
>>100141980
>Already stopped reading there, I'm done dealing with mouthbreather
And there's absolutely nothing you can do about it.
>>
>>100142226
cope idiot. sorry you're so stupid.
>>
>>100141763
C, Rust, Haskell!
>>
>>100142251
sounds better than listening to you talk about anything.
>>
>>100142263
It's nice to see you finally accepting your well-earned fate.
>>
>>100142301
whatever gets you off dude
always been a masochist anyway (hence why i keep replying to you)
>>
>>100141763
Not much, been doing a few tasks my prof gave me in C++ and bash, mostly threading-related
Unfortunately he's forcing us to use a lot of UNIX-specific code and so I need to deal with VM shenanigans and keyboard problems (it doesn't "just work" like it does on wangblows)
>>
>>100142040
most arenas implementation i saw
make the first mmap with no read/write permissions so your map_populate will not work
only later when they commit more memory to the arena (turn some mapped memory to read/write) they also use madvise with MADV_POPULATE_WRITE to prefault bigger chunk of memory in go instead of one page
>>
>>100142560
exactly my point that people dont seem to understand.
>>
>>100141795
Unix is culture around here, slander of our comrades will not be tolerated.
>>
>>100141963
>Linux is dogshit so...
well what the fuck is Linus doing? That is such shit fucking design especially when you can just spawn a thread to handle the syscall with a lock.
This stupid shit, specifically, is the reason for all Linux vulnerabilities.
>>
>>100142093
they always do because its just how the MMU works.
>>
the big debate
which one use?
value = (temp & mask1) >> shift1;

VS
value = (temp >> shift2) & mask2;
>>
>>100141791
use GDB instead.... failing that, update CodeLLDB.
>>
>you will still be in kernel modee bro
>its expensive to switch to kernel mode
stupid faggots x64 processor XORs the bit in the task register that determines your permissions automatically on SYSCALL and SYSRET, it isnt costly at all and no you will not still be in kernel mode.
Like are you guys serious? it seems like you know nothing about systems and are just screaming "I WOULD KILL YOU THIS WAY AND YOUR MOM WOULDNT BE SAD" and shit.
>>
>>100143286
second
>>
>>100143355
because it's easier to understand the shift and mask values or for another reason?
>>
>>100143374
because my brain likes an easy thing and then a hard thing and not the reverse.
>>
>>100143286
i do second because if you change position but not size of bitfield then you only need to update shift2.
>>
>>100141763
Trying not to off myself.
>>
>>100143286
the first one is correct for individual state flags stored in an integer, that way you can use the mask to not only read bits, but toggle and set them as well. The second one would be for packing values in an int, like 8-bit per channel RGBA.
>>
>>100141791
Why isn't there a specific debugger for Rust yet?
>>
>>100143481
The Rust compiler produces native binaries with native debug info (symbol) information, so any native debugger will do. That means gdb and lldb or the Windows debuggers (WinDBG or just Visual Studio) if you're using the MSVC ABI version of Rust.
>>
>>100143286
Second one is generally better.
Smaller mask value = smaller instruction encoding = better.
>>
>>100142607
You don't have a point.
>they also use madvise with MADV_POPULATE_WRITE
, at which point they're already in kernel mode. And now off to Japanese death row you go.
>>
File: syscalls.png (137 KB, 1670x730)
137 KB
137 KB PNG
>>100143344
>it isnt costly at all
Get tortured, retard.
>>
>>100141791
the vscode debugger for rust sucks ass, you won't get far with it
>>
>>100145022
those costs are because the kernel backs up all register state (stupid), not because you are going from kernel mode to userland. If you ever wrote a desktop app or a windowing system this happens every single time the user does anything in any window (a hardware interrupt).
>>
>>100143481
nothing worth debugging is written in rust
>>
>>100145081
um no sweaty we only do registry dumps here and MAYBE a CLI
>>
>>100145081
>ignores the hardware costs that going from ring 3 to 0 and back entails, which is why syscall costs differ wildly from CPU to CPU
>ignores trapping into a specific location in the interrupt vector
>ignores parameter verification and copying data from userland to kernelland, since a segfault in kernelland would cause the kernel to panic
>ignores that parameter verification requires syscall determination (parameters can have different meanings depending on syscalls)
It's a shame Japan doesn't do public executions. The cheering crowd that would demand your decapitation via long drop would be a sight to behold.
>>
print('Fuck niggers')
>>
Did a significant refactor of the CPU for my Game Boy emulator. It's able to play Tetris now.
>>
>>100141763
my small internal service need to just send 200OK with some file attached or 404 not found. Is it just wise to write my own http classes and procedures instead of using libcurl or other big http library of which 99% of objects would be unused?
Since my service is proprietary and I don't intend to use it any other way there is no room for expansion which bloated library would have supported.
>>
>>100145461
Why don't you decide for yourself?
https://github.com/curl/curl/blob/master/src/tool_cb_hdr.c
>>
Google doesn't get enough credit for buying and open sourcing MuJoCo.
>>
>>100145317
>copying data from userland to kerneland
you are inventong things LMAOOOOO no kernel ever does that and if any do the writer should be stoned. What actually happens is that the syscall takes the segment containing the map table as an argument and then does its thing. Fukken retard, it seems you forget that the kernel can be optimized past an ungabunga "back up all registers".
>ignores trapping into a specific location in the interrupt vector
>interrupt vector
that shows you know nothing and are just saying things.
>>
>>100145627
>no kernel ever does that
https://stackoverflow.com/questions/28209740/why-are-system-call-arguments-copied-by-the-kernel
https://stackoverflow.com/questions/8265657/how-does-copy-from-user-from-the-linux-kernel-work-internally
>Suppose that the kernel did NOT make its own copy of arguments that are allocated in userspace memory. This would mean that potentially, that data that exists in userspace memory could be modified in the middle of the system call. This is detrimental to security and reliability. To prevent this from occurring, the kernel will immediately copy userspace arguments into kernel memory. Kernel memory cannot be accessed by userspace.

After your decapitation your head will be used as a soccer ball, but instead of hitting the opponent's goal the team that causes your cranium to crack and disperse its contents all over the field is going to receive a point. Whatever is left of your ilk - on death row too, naturally - will be forced to rewatch the recording of your "piñata" breaking until the day they die, too.
>>
>>100145756
Ooooo listen to me I'm edgy
attention whore bitch
>>
>>100145769
Save it for your ill-fated appeals process.
>>
>>100145857
you sound mad
>>
>>100145941
who's arguing on /dpt/ and isnt?
>>
>>100145962
you are especially mad, angst-like mad
>>
nothing. started learning C++ and don't have many interesting ideas for a bigger project, preferably something that'd include some embedded stuff, since I'm also new and interested in embedded. Currently thinking about making a tablet that truck drivers use and a desktop app that can communicate with the truck and display truck data stored in the server. Problem is that it'll probably get boring before I finish it. Anyone got any ideas to offer? If anyone is working on something interesting in C++, I'd be down to join, I have 1 year programming experience in Java/JS, but new to C++
>>
>>100145941
Keep 'em coming. Prosecutors need all the aggravating factors they can get to nullify defense's attempts at mitigation, we've seen that during the Nicolas Cruz punishment phase.
>>
>decide to get back into programming after half a decade
>update visual studio, dot net 4.X -> 9 or somesuch
>suddenly get warnings about "possible null references" and "non-nullable" in places where being null is acceptable
>I now have to put ? on every fucking variable that I'm ok with being null or these non-warnings are going to spam the error list
I'm suddenly less interested in programming. It doesn't even seem that useful.
>>
>>100145329
What python library is this?
>>
>>100146110
>not a programmer
>doesn't understand null safety and why it's a good thing
stay out of this thread.
>>
>>100146926
the standard library
>>
null safety was a mistake
>>
File: cpp_error_link.png (119 KB, 1221x888)
119 KB
119 KB PNG
What am I doing wrong? I'm trying to run a xbox 360 controller shutter from source code. It's like it can't find the DLL that exists at least in system32.

llvm-mingw. Should I give up and install msvc compiler?
>>
>>100141763
can someone explain me how semver works for user facing programs? like gui apps and whatnot.

What constitutes a major change?
If i make a slight UI change like move a button is that breaking change?
what if i have two button that essentially do the same thing (like in a menubar and in the window) and then i remove one of them? is that a breaking change?
>>
>>100147020
if functionality is stays the same you up the 0.0.X
If functionality changes but workflow stays the same you up the 0.x.0
if workflow changes you up the big number x.0.0
>>
>>100147011
yeah, chances are minGW ain't going to have all the directX specific headers.
>>
>>100147011
also you commented out that pragma linker statement. it knows fuck all about where to find the methods now.

you can try
gcc -lXInput main.cpp
>>
>>100147060
just to be clear something like moving a button in the window to for example a sub menu item wouldn't change the workflow right? if the functionality it does is the same
>>
>>100146980
I know what null safety is, it's on the programmer not to be a retard. It's not on the language to institute nanny requirements that pester you when you do something as common as making fucking variables.
Yes, I don't care if this thing is null, if it breaks then don't pass null next time.
It's not like it eliminates the need to check for null. There's no way to enforce non-null that I'm aware.
>>
>>100147096
>it's on the programmer not to be a retard. It's not on the language to institute nanny requirements that pester you when you do something as common as making fucking variables.
wrong and wrong on both counts.
go away.
>>
>>100147011
>gcc main.cpp
fuck sake.
do I even have words?
just set up cmake and let it do it for you.
>>
>>100147085
I don't believe that pragma means shit to gcc. it's weird as fuck that it's used at all in cl.exe, but whatever. winshit C++ dev is cancer as hell.
>>
>>100145513
>https://github.com/curl/curl/blob/master/src/tool_cb_hdr.c
Extremely bloated.
>>
File: lizard-dance.gif (714 KB, 220x230)
714 KB
714 KB GIF
>>100147085
>you can try
>gcc -lXInput main.cpp
It worked. Thanks bro,
>>
>>100146110
>updating to a 10 year newer framework version blindly
>not knowing how to google
>not looking at the project settings
RTFM you dumb nigger.

>>100147096
>nanny requirements
>warnings that you're 100% free to ignore
I rescind my previous statement: you're not a dumb nigger, you're the dumbest and the niggest.
>>
>>100147190
You know what you're doing.
>>
>>100147135
>wrong and wrong on both counts.
No, I'm correct on both accounts. A retarded programmer is going to write bad code even if he's handheld, if you can't spot a potential null access then maybe you should go back to india.
It isn't even null safety, as I said it's just a nagging warning that can't even warn accurately. There was one place that said I was potentially accessing null when I explicitly checked for null beforehand (like a normal programmer).

>>100147219
>not knowing how to google
I did google it, how else would I know I'd need to insert a "?"? Do you think I stopped at that?
>nanny requirements
>warnings that you're 100% free to ignore
Yeah, a nanny requirement. You can't call it anything else.
>>
>>100147282
You didn't figure out the documented way to turn off the nullable checks, therefore you don't know how2google.
And if you don't know how2google, You Will Never Be A Real Programmer.
>>
>>100147309
I did. Do you think people can't talk/complain about a problem they solved? Do you think the problem suddenly vanishes?
For someone professing to be the arbiter of programmers you're shit at logic.
>>
File: thats_the_easy_part.png (6 KB, 532x270)
6 KB
6 KB PNG
>/dpt/
>arguing about NULL checks
Is there a profession with a higher rate of autism than programmers?
>>
is opengl still the babys first graphics programming or are there better alternatives for someone brand new
>>
>>100147479
It's not even about null checks, it's
>hey, this could be null
>hey that thing that's supposed to be null? It might be null, put a ? if that's intentional
>hey you didn't forget to set this variable right?
>hey, hey, hey, hey, that thing after that null check could be null, better include a !
It's unnecessary tedium that only seems to exist to piss you off until you disable it. It reminds me of clippy, it's telling me something I already know that's probably intentional. If it were just warning about potential null checks then that would be one thing, I could see that being somewhat useful, but who the fuck cares if some variables are null? Null is a valid state in a lot of cases.
>>
>>100147561
As far as I'm aware it at the very least isn't redundant yet so no harm starting there.
>>
>>100147479
>>100147608
compilers should be silent and communicate only through exit codes, like normal women
>>
>>100145144
There are software written in Rust that's worth more than you and your fellow cnile cultist life combined.
>>
File: rustled.png (33 KB, 1854x333)
33 KB
33 KB PNG
>PHP is more popular than Rust
If they weren't on suicide watch before they're certainly now.
>>
null checks?
haskell!
>>
>>100141791
Update, it just works on windows. I will try and find out the best debugging setup for MacOS but in the meantime I'll keep using it from Windows.
Shame that mac experience isn't "just works"like windows.
>>
>>100145074
In what way? I think it was an issue with lldb or something. See >>100148876
I haven't checked Linux though, I don't have Linux installed in any of my systems at the moment.
>>
File: GKqiu3bWwAAXSjM.jpg (158 KB, 1024x1024)
158 KB
158 KB JPG
hi op from here >>100147929
can i get some actual advice please thank you
>>
>customer complaining again because the boomer dev pushed 1000 lines of code to master and cut a release without testing any of it
>literally none of the code worked, straight up logic errors, deadlocks, forgot to add stuff, commented out sections that needed to be uncommented
how do I resolve this problem long term?
>>
File: dump.png (89 KB, 1894x989)
89 KB
89 KB PNG
>>100148964
Windows registry dumper.
>>
>>100148993
Murder.
>>
>>100148993
Depends. Was he drunk? Ill? Obsessed by demons? Brainwashed by MK-ULTRA? Does he have anger issues or suicidal tendencies? Has somebody impudently tried to hurry him?
>>
>>100149088
he's 80, that's about it
>>
>>100149088
>Obsessed
Possessed. I don't know how it happened.
>>100149110
Strange. And how he explains it himself?
>>
>>100145756
>but what uf the kernel is garbage and we modify that data
>lets make it slow and stupid to "fix" that!
Linus confirmed brainlet for putting up with these retards.
>>
File: S__10182664.jpg (73 KB, 1079x674)
73 KB
73 KB JPG
How is it that people become so dependent on AWS for their infrastructure? I hear people lament how much they spend on AWS but then say "but all of our code is so dependent on AWS/S3/EC2/EKS/SNS/SQS" etc.

It takes maybe an extra 10 minutes to wrap your services in an interface and then define AWS-specific implementations of that interface. Moving from AWS to another provider should be as simple as re-implementing your services for the particular API you're using. kubernetes yaml files shouldn't have anything (other than domain names) which are dependent on AWS
>>
>>100146980
the processor has ways to handle edhe cases like divide by 0, who cares about "null safety", if its about reference the kernel will never give ROM as a page to any process so page faults are not a worry.
>but what if the user fucking mounted /dev/mem and then my stupid desktop app references null and overwrites his memory
that is like 1 in a trillian chance but at the power of 2
>>
>>100148964
learn gdk and make a desktop app idk
>>
>>100149447
i meant to say "mapped /dev/mem"
>>
File: 1662660931020296.png (132 KB, 286x283)
132 KB
132 KB PNG
>>100149409
>but what uf the kernel is garbage and we modify that data
Great idea, mate. Let's just suspend all threads currently running during the duration of one threads' syscall.
>>
>>100148964
A blog that allows comments.
A text editor.
An IDE that caters to your programming needs (no, not Emacs).
A videogame.
Making a pipeline that grabs all relevant packages and does all tests needed for any project of yours.
And making it run on Windows, Linux, and mobile.
One of the good things about Java is that you can use Swing or JavaFX for GUI instead of having to do C/C++ bindings from your language of choice.
>>
>>100149433
MBAs would literally cut off their dicks for a business plan if the alternative had higher up front costs.
>>
>>100149433
>How is it that people become so dependent on AWS for their infrastructure?
It just works.
Gone are the days where a simple LAMP stack did the job.
Actually no, a LAMP stack does the job, they have less than 100 clients, lmao. They are just dumb.
>>
>>100149575
No I understand WHY people use AWS; what I don't understand is how they manage to write code that is so heavily dependent on the fact that they're using AWS. Anything AWS offers, GCP or Azure also offers. Moving from one to the other should be a matter of re-implementing interfaces and retargeting your k8s yaml files to a different cluster
>>
>>100149538
>An IDE that caters to your programming needs (no, not Emacs).
rewriting emacs in java would certainly make james gosling proud
>>
>>100149595
It's easier.
You can do:
1) Learn interfaces.
2) Look up implementations for them.
3) Link them together.
Or:
1) Import and call the AWS method.

I have yet to see anyone giving a damn about the reason the Javax, sorry Jakarta, specs exist.
>>
>>100149599
It would make RMS seethe like fury.
Do it.
>>
>>100146051
make a roguelike.
It's easy and you will identify a lot of issues to overcome
>>
>>100149599
It's halfway done:
https://abcl.org/
>>
File: file.png (12 KB, 334x170)
12 KB
12 KB PNG
Why does my interceptor have a green lion icon?
>>
>>100149991
It's not a lion, it's a possum looking for a fight. See its tiny adorable leggies?
>>
>>100149991
Are you using NestJS? If not, it's a false match of a filename pattern.
>>
>>100149991
I guess *.interceptor.ts is being handled specially similar to something like *.test.js
>>
>>100141760
Interesting article, but only caveat 1 is meaningful IMO. 2 is the nature of writing code for multiple platforms, 3 is an issue with that library (and any library that does something to the process's global state) where the solution is to use a better library that doesn't do that, 4 is irrelevant nowadays for consumer software, only relevant if you are explicitly targetting 32-bit cpus.
>>
>>100149487
>a lock
>competent programming
>managing the cache
these are all ways to make what i said work perfectly.
>>
>>100147135
null safety is a fad. And people who hate nulls and think they're the end of the world in code or databases fail to grasp that in the real world you have to be able to represent "no valid value." Treat null as something useful and not an afterthought that blows up your code, and you will write code that doesn't blow up.
>but i hate writing null checks!
If you hate validating data then your code is going to blow up even without null.
>>
>>100150867
nta but the problem is languages that let you sprinkle null anywhere, its a static typing problem and the solution is to have non-nullable things
>>
>>100150747
>thinks an industry loaded with pajeets are going to correctly manage locks when making syscalls
>thinks locks have no overhead or conflicts
>thinks malicious coders would never take advantage of this
>thinks he can manage the cache better than the OS
Go design web pages.
>>
>>100150867
>you have to be able to represent "no valid value." Treat null as something useful and not an afterthought that blows up your code
It’s called None and Optional types
>>
>>100150893
Non-nullable doesn't work everywhere. In the real world you have many examples where there just isn't a valid value. I've never understood why this is such a problem for some devs that there's an anti-null fad.
>>
>>100150932
>none
You're basically just changing the name.
>>
>>100150941
Why do wagies insist that they can rationalize terrible things by hiding behind “the real world” none sense?
The “real world” has replaced null countless times.
Your bubble isn’t the only bubble
>>
>>100150900
Java/spring/spring boot backend.
React/Typescript front end.
Anything SQL on the DB end
There are C# shops but they are much more of a niche thing than java shops. If you already know typescript, picking up java shouldn't be super hard. There are lots of little quirks and differences but like 95 percent of it is similar enough that it should be pretty easy for you.
>>
>>100150900
>thinks he can manage the cache better than the os
why yes i do, if you qre running a program with no user interaction YOU ARE THE ONE managing the cache.
>malicious coders abusing locks
physically impossible.
>thinks locks have no overhead
not what i said, they are better than backing up all state though.

None of this matters because paging solves the problem, the kernel back stuff up super fast, the problem comes when you are some cretin making structs / generally using the stack.
>>
>>100150900
there is a reason why webdevs earn more than desktopdevs
>>
>>100150948
Literally not.
None is a safer Null but it’s NOT null.
C has no concept of a Maybe type.
>>
>>100150941
You have types that represent nullable things and types that represent non-nullable things. Null doesn't pollute every type. That's the point idiot
>>
>muh null is le bad
it works or it crashes. not my problem
>>
>>100150959
>Why do wagies insist that they can rationalize terrible things by hiding behind “the real world” none sense?
Why are wagies triggered by nulls? Can you point to the doll and show me the place where the null touched you?

>The “real world” has replaced null countless times.
Yes, you replace it with a valid value when one becomes available. And your code checks for null and behaves appropriately.
>>
>>100150994
Says the neet
>>
>>100150984
Like literally if you people thought for two seconds about the direction you're trying to take things
enum bool { Null, False, True, Unknown, DidNotParse, NotABool, ... };

its so fucking stupid. These aren't universal values you want in all your types these are situational and you want to restrict when they show up. You can do that in various languages with nullable annotations or optional types (whether its a union or disjoint union).
Everyone is much better off being able to read your code and seeing
>Oh yeah Optional T
Than having to see EVERYWHERE T is and thinking "oh, that's T, it has null embedded into it" and needing to check half the codebase to see this actually just shows up in one place and was added here for some godforsaken reason
>>
>>100150959
no it has not

Also thoughts on making the last layer of a page declaration quadword have special meaning on '111111111'? you can do hugepages that way
>but the index
we have leftover bits
>but you now have 1 more check on every address lookup
unironically irrelevant and i would be for adding task-dependant state to the cache.
>>
Why do you niggers have so many languages when all you need to do is write if then and or all the time
>>
>>100151030
>no it has not
Literally has, FP has been taken to scale plenty of times now. Because it turns out, the “real” world likes money and wasting time on null burns money.
>>
>>100150963
>hurr let me list a bunch of false analogies

>>100150971
>why yes i do, if you qre running a program with no user interaction YOU ARE THE ONE managing the cache.
>A RANDOM INTERRUPT APPEARS
>A CONTEXT SWITCH BLOCKS YOUR PATH
The CPU manages caches because it has immediate information as to what will be most frequently used. You do not. Or rather, you only have that knowledge for your code. So structure your data to let the CPU do its job and most of the time your data will be pre-fetched into the cache.

>not what i said, they are better than backing up all state though.
So you think you know something that IQ 160 Linus does not about the kernel he has worked on for decades?
>>
>>100151054
>branch-driven programming
LMAO
>>
>>100151067
I think you lost it, buddy; go to bed.
>>
>>100150747
>a lock
>retard doesn't know his terminology
What you're referring to is page pinning, and it's nothing new for Linux, but has been used for several years now (see send and the MSG_ZEROCOPY flag): https://github.com/torvalds/linux/blob/master/Documentation/networking/msg_zerocopy.rst
>Copy avoidance is not a free lunch. As implemented, with page pinning, it replaces per byte copy cost with page accounting and completion notification overhead. As a result, MSG_ZEROCOPY is generally only effective at writes over around 10 KB.
The situations where you pass 10 KB worth of input parameters to kernelland are the absolute exception, and send/write already cover most of them. The rest are not worth optimizing for.

>competent programming
Empty platitude, not worth responding to.

>managing the cache
You can thank CPU manufacturers, their various fuckups over the last couple years, and the mitigations that they were too incompetent for to implement at a microcode level for the kernel's need to invalidate caches.
>>
>>100150973
Your code has to deal with either. Stop being afraid of null and just fucking write the boilerplate.

>>100150984
But people cry about null with types where null makes sense, idiot. I'm not suggesting that an integer or string should be capable of being null instead of 0 and "".
>>
>>100151088
>no counter argument
>"hurr i won i won"
God damn it this board needs a filter. Even /pol/ isn't this stupid.
>>
>>100151067
in 2024 hardware interrupts are not an issue.
>context switch
have you ever designed a system? no interactive window = no context switches.

>muh 160iq
now i am even more likely to go against what he says.
>>
>>100151119
>Uses 0 and "" as null
That's just as bad you retard I hate you. You should ONLY ever do that if it's specifically indicated and isolated because it causes the exact same hassle. It's even worse when someone does this and 0 and "" are actually perfectly valid but now the code doesn't fucking work and in another place instead of "" it's "all whitespace" and you've got a million bugs. Half the benefit of static types is being able to restrict what values are possible where and you are actively working against it.
Really I think this is a miseducation problem (terminal object-orientation) but maybe it is actually just IQ
>>
thinking optional types are bad is shit type system cope
>>
how can I view the raw markdown source (eg README.md) on github? seems like they took that option away.
I can only see rendered markdown now, no way to view the source?
>>
>>100151142
>no interactive window = no context switches
>he doesn't know about ticks, preemptive multitasking, and scheduler priorities
You sound like someone who last wrote code on Windows 3.x and knows nothing but cooperative multitasking.
>>
>>100151169
LOL this is damage control for AI writing readmes, make a thread about it
>>
File: gopher.jpg (20 KB, 400x266)
20 KB
20 KB JPG
>Stop being afraid of null and just fucking write the boilerplate.
>>
>>100151119
> Your code has to deal with either. Stop being afraid of null and just fucking write the boilerplate.
I legitimately don’t think you’ve ever used them because the entire point is avoiding the boilerplate and not crashing your program.
If your API is expecting optional types sent and received there’s no issues.
Your cnile brain rot is really far gone.
>>
>>100151142
>in 2024 hardware interrupts are not an issue.
Non sequitur. Your code is not the only code running which is why the CPU is better at managing cache than you are.

>have you ever designed a system? no interactive window = no context switches.
OH HOLY FUCK, it's time for you to stop posting.

>>100151184
This right here.
>>
extern char X;
#define NULL2 (&x)
>>
>>100151199
>I legitimately don’t think you’ve ever used them because the entire point is avoiding the boilerplate and not crashing your program.
I don't think I've ever written a program that crashed on a null value. Again, wtf is this so hard? I'll grant that none/optional let the compiler run some additional checks for you, but you still need to handle none as a special case.

>Your cnile brain rot is really far gone.
No, I just have to remember that this field is flooded with normies who shit themselves if they have to manage memory and cry at night about nulls.
>>
>>100151187
I doubt that would stop anything,. you can still download the raw file. but I don't want to download and then open externally, I want to view on the website
>>
>>100151295
> you still need to handle none as a special case.
None isn’t a special case though.
You match on two possibilities
Just(value) => do something
None => do something else
That’s literally it.
You don’t need a useless null check
You don’t need a new scope
You don’t need ad-hoc error handling
You don’t need to worry about crashing ( even though, yes, you’re a perfect c programmer who’s never under/over indexed a buffer or segfaulted his fizzbuzz)
>>
Is there a library that makes common lisp lazy?
>>
>>100151344
>"none isn't a special case"
>proceeds to explain that you branch on none thereby proving it's a special case
Jesus Christ...

>You don’t need a useless null check
How the fuck is "if null then else" different from what you posted?

>hurr muh fizzbuzz
I love when stupid people are also arrogant.
>>
Why is C so gay and C++ so straight?
>>
>>100151455
>C++
>"++"
>clearly bisexual
Meanwhile
>C
>not bi-paradigm
>straight as an arrow
>>
>>100151199
>the entire point is avoiding the boilerplate and not crashing your program.
You either strip the Maybe monad and save yourself exactly zero boilerplate, or you do nothing and now every single time you use that value you're littering your code with invisible branches. Very epic anon!
>>
>>100151490
Holy cope. You're telling me some language that doesn't have the str (straight) type isn't gay as fuck?
>>
>>100151344
>You don’t need a useless null check
and yet you're performing a "useless null check" in your code. Curious.
>>
File: 111985456745.jpg (48 KB, 512x384)
48 KB
48 KB JPG
>>100151455
>When Stroustrup read the interview he came screaming into my room about how I was undermining him and what I said mattered and I said it was a bad language. I never said it was a bad language. On and on and on.
>why_am_i_so_hecking_cute_and_valid.jpg
>>
>>100151537
what interview?
>>
>>100151414
>cnile doesn’t know what special means
It’s too much.
Special implies outlier or niche case.
None isn’t a special case with an optional type you retard.
>different
Because you’re doing more than checking null, especially if it is null.
Null is so unexpected that it requires ad-hoc handling just to keep your program alive
>>
>>100150973
>C has no concept of a Maybe type
You can easily add it. And imbue semicolons with early return semantics using a simple macro.
>>
>>100151414
>How the fuck is "if null then else" different from what you posted?
nta but option/result types make it explicit and force you to deal with it, while also making it simple to streamline the process so it's not annoying. i hate a lot about rust but it does an excellent job of this.
with just nil you end up with go's if err !=nil brain damage or, god help you, exceptions
>>
>>100151546
https://harmful.cat-v.org/software/c++/coders-at-work
>>
>>100151548
0, NAN, overflown result and underflown result are stricly defined as "special cases".
>>
>>100151510
str's have rights. C uses submissive trad character arrays.
>>
>>100151564
And you can also implement concurrency And other functional programming things besides Optionals. Doesn’t mean they’ll be good or worth using.
Bolting on Functional programming in non FP langs is as a bad as trying to bolt on static types in dynamic langs
>>
>>100151567
not just optional types, but sum types + pattern matching in general are programming samadhi
once you use it you will never want to go back, completely changes how you approach problems and modern nullable types (like in C# and Kotlin) are just scratching the surface of how nice it makes everything
>>
>>100141763
I'm pretty new to this stuff, began my programming classes a few weeks ago, seems simple so far but I know it will probably get bloated later on with pressure, any tips for a new anon?
>>
>>100151548
>noooo my branch isn't special
>YOUR branch is special!
Oh holy fuck...

>none is not an outlier or niche case
LOL

>if then else is MORE than just a check
LMFAO even

>Null is so unexpected
By you because you're retarded. I've never had this issue because whatever language I'm using, I know the variable types that can hold null and I check for it. That's all you need to do: check for it. Both null and none can be inconsequential or they can require you to abort the processing and let the caller know there was an error. You just have to check for it. Null is not a demon that crashes your program unexpectedly. It's deterministic like everything else. You should know when a null can appear and check for it.

But I now finally realize WHY null is a problem for some people. None is treated as special by the compiler so that you don't have to remember to deal with it, the compiler screams at you to deal with it. You literally can't remember
>this data type can't be null
>but this one can
Even though it's the simplest thing in the world because usually, in programming languages, the null question hinges on whether it's a complex or simple data type. But you don't know that either.

Yes, for you null is spooky action at a distance. For the rest of us it's just a null.
>>
>>100151655
jst b yrslf
>>
>>100151655
>programming classes
I feel sorry for you.
>>
>>100151702
>null is deterministic
You are peak cnile.
I would genuinely love to see the things you make (if any).
>>
>>100151567
>nta but option/result types make it explicit and force you to deal with it,
Agreed. I actually mentioned that earlier but now it has finally dawned on me that this is so difficult for some people that they can't deal with it. Null is a spooky demon that can jump up any where to them.

How they code ANYTHING if they can't remember which variable types can hold null is shocking to me, but a separate question. They probably also can't handle types with different sizes, but then their language probably doesn't ask them to.
>>
>>100151716
?
>>
>>100151764
No one competent I've known relied on programming classes alone.
>>
>>100151781
Well I guess its better to know now than never that going to a uni was a mistake.
>>
>>100151752
>null isn't deterministic
>IT CAN RANDOMLY APPEAR TO CRASH YOUR CODE
>LIKE A DEMON!
Just say you can't remember which variable types can hold null or why. Just admit it. It's not your fault. We're all born with strengths and weaknesses. Working memory is not your strength.

I wouldn't be an ass about this:
>i prefer optional/none because the compiler screams at me and fuck me if i don't miss nulls
I'm ass because:
>omg nulls are the devil!
>we should eliminate null from the universe!
>if you don't have a problem with null YOU'RE A CNILE!
>>
>>100151893
You also have no clue what determinism means because you’re using the non-CS context of it and confusing it with intuition/ knowledge, which is just so mind-blowingly off-base.
I don’t even think you’re trolling because of how flagrantly retarded you are.
>>
File: you're_welcome.jpg (94 KB, 464x577)
94 KB
94 KB JPG
Tiny reverse
#include <stdio.h>
#include <unistd.h>

int main() {
char *b = NULL;
size_t bsize = 0;
for (ssize_t read = getline(&b, &bsize, stdin); read > 0; read = getline(&b, &bsize, stdin))
for (; read >= 0; read--)
write(STDOUT_FILENO, &b[read], 1);
}
>>
>>100151820
it sure was a mistake for somebody who cant pick up on "alone".
You need to be exposed to concepts, autists do it by lurking /dpt/, normgroids do it by reading books
>>
>>100151956
>syscall with 1 byte
Congratulations, you should be aborted: https://lore.kernel.org/lkml/CA+55aFy7RncR_z9M+DRzSXJY7cWxY9zG0ioLdiefhxkH__Z7Yw@mail.gmail.com/
>>
File: confusion.gif (1.95 MB, 244x194)
1.95 MB
1.95 MB GIF
>python type hints don't actually do anything at runtime
>but you still have to manually import them or your program doesn't work
>>
>>100152024
I know how laughably inefficient it is, but the point was to be compact not fast.
>>
>>100151614
Ah yes, dynamic typing. There is exactly one dynamically typed language widely used in the wild at the moment, or three if you consider web programming to be real programming: Python, JS and PHP. Curiously enough, in all three of them it has become something of a bad form to neglect superficial type annotations. In any conceivable domain a statically typed environment with not more than one carefully constrained dynamic type beats an equivalent fully dynamically typed environment nine times out of ten. The only exception, the only remaining reason I'm not saying dynamic typing by default is dead, is Lisp. I don't know how it keeps getting away with it. It's a miracle.
Did you just say concurrency is a functional programming thing?
>>
>>100152031
omg its just like C hints!
>>
>>100152031
That's why I switched to Rust when mypy was picking up steam back in 2016/2017. Types were the future but fuck if I was going to do it in python
>>
I wrote an extension that automatically appends -"hey delphi" to youtube searches
>>
>>100151925
>rambling red herring false claim to ignore the point
There are contexts in which a null might be nondeterministic just like any other output. But nulls are NOT inherently nondeterministic. In most contexts they are deterministic.

More to the point: where a null can occur is never in question. So there's no excuse for failing to check for them. It's fine to say "I like optional/none for the compiler checks." But acting like nulls are evil, or mocking people with the IQ to determine when to check for them, is retarded.
>>
>>100152502
Funny you say null checking needs IQ to determine it when the reason null exists everywhere is because Hoare, per his words, took the easy way out and added it, because it was just so easy.
Had he not taken the brainlet way out we might not even have had nulls, ever, since Algol influenced everything to come.
>>
>>100152233
>types were the future
Do you live in 1955?
>>
>>100152502
>null is easily discernible and dealt with but billions of dollars into static analysis research, security, programming guidelines, and type theory is merely because I wasn’t hired to fix everything
Enjoy the view from Mt Stupid.
>>
>>100152746
none of that has anything to do with null pointers, actually.
>>
>>100152723
I was already fond of types, I meant for the mainstream. TS was taking off and python users wanted the benefits of typing but in the worst way possible with an optional typing ecosystem
>>
>>100152151
Lua, lisp, elixir, matlab, objective-c, perl, every single shell scripting language, r, visual basic
>>
>>100152775
It literally has everything to do with null pointers.
Much of PLT is rooted in solving the null pointer issue.
But apparently, it’s all for naught because one lone anon on /g/ can store and simulate complex programs mentally, and recall the state of any and every variable at any time, so he can literally write perfect, runtime sound code.
>>
>>100152746
>Mt Stupid
Where is that exactly?
>>
>>100152891
Behind the (Lisp HQ)
>>
A big thank you to Brian Will for causing years of jeet rage
>>
>>100152825
no it doesn't. you're just only familiar with this one rather small portion of concern because it's an increasingly trendy rhetoric that you've picked up from people much smarter than you. what you would know if you were actually worth your salt is that the field of logic errors, which are principally what static analysis was set to address, deals with a domain of issues far more insidious and complicated than being a bimbo and forgetting to check the space of a single word for a value. you're only aware of this singular issue because you've never had to contend with millions of lines of code which are littered with control-flow issues that exist regardless of how memory is handled, and thus with your experience being limited to extremely trivial codebases, you're only aware of extremely trivial issues that crop up in said codebases. actually, i think it's too charitable to say you're personally aware of it, because once again, your surface level understanding of the issue indicates you're just parroting what you've heard elsewhere. frankly speaking, this whole series of posts you've made going back and forth with the other anon just reads like you're baiting to get spoonfed theory and experience, and if that's the case, shame on you.
>>
File: file.jpg (27 KB, 500x536)
27 KB
27 KB JPG
How common is this amongst programming jobs?
>>
>>100152031
They can do quite a lot of good with attrs, pydantic...
>>
>>100152187
types in C actually quite a lot
>>
>>100153255
they dont, optimizers abstract them.
>>
>>100153404
yea bro optimizers completely change structure of code
>>
>>100153491
Yes.
>>
File: 2024-04-24 02.35.28.jpg (1.4 MB, 1920x1080)
1.4 MB
1.4 MB JPG
Cleaning up some old viseme to texture code for an avatar. The previous version had a garbage collection issue, and the mouth shape textures would be missing for a frame while they loaded back in.
>>
>>100153491
its almost as if that was the optimizer's job isnt it?
>>
File: brave_rIIoRQlZZR.jpg (80 KB, 1309x495)
80 KB
80 KB JPG
is this anon right? Rust is a tranny language and Zig is the white man's language? i heard Rust trannies are seething that Zig is 3x faster than Rust and has readable syntax.
>>
>>100141763
>what are you working on?
Nothing, I released and now I have postpartum depression.
>>
>>100154429
Both Zig and Rust are for trannies
>>
>>100153404
retard
>>
>>100154429
>Zig is 3x faster than Rust and has readable syntax.
good one
anyway, all languages are for trannies, just like all languages are for chuds
>>
What is tech leads IQ?
>>
How do I find out why one MOV is slower than the other?
>>
>>100148993
this is why you protect master with required approvals to prs and no direct pushes + a sane promotion strategy
>>
>>100154907
62
>>
>>100154907
101
>>
>>100154429
yes. Zig also has more proven real world uses (bun, tigerbeetle and I believe turso also did some edge stuff with zig) even though it's not even stable yet.

rust is used to rewrite unix commands for no reason
>>
>>100154998
no it doesn't, why do ziggers always lie.

rust is in cloudflare, amazon, azure, windows kernel, the list goes on
>>
>>100155072
none of what you said is true
>>
>>100154998
Demo has bigger industry presence than bun.
>>
>>100155103
Deno*
>>
>>100155084
yes, it is. ziggers need to stop lying if they want to be taken seriously

https://blog.cloudflare.com/tag/rust
https://firecracker-microvm.github.io/
https://youtu.be/8T6ClX-y2AE?t=2802 dwrite
>>
>>100154922
the uop site has different mov versions, read the shit you spam baka...
>>
>>100154922
You use unsigned, which is usually a 32-bit value, not a 64-bit one (the compiler uses %edi, not %rdi). That can decrease throughput.
>>
>>100155084
real quiet now, zigger
>>
>>100155189
who cares, those things were not accomplished because of rust but because of the programmers who went and did those things, it doesn't matter if it was done in rust or not.
Truth of the matter is that rust was supposed to be the end-all be-all language adopted by everybody under the sun for compiled programming, it is not and you are malding due to that fact. Maybe if you actually programmed you would care less about whatever tools y̶o̶u̶ others use do to their thing.
>>
>>100141763
>What are you working on?
Wouldn't you like to know?
>>
File: file.jpg (180 KB, 1056x594)
180 KB
180 KB JPG
>>100155789
>who cares, actually it didn't matter
lmao every time
>>
>>100155789
>those things were not accomplished because of rust but because of the programmers who went and did those things
and this somehow doesn't apply to bun, tigerbeetle and I believe turso?
>>
>>100155072
>rust is in cloudflare, amazon, azure, windows kernel, the list goes on
tranny corporations
>>
>>100156027
>>100155881
>non arguments
>not even saying "i program"
you have been found out, here you go, straight to the jew containment boards, pick one
>>>/d/
>>>/h/
>>
>>100156065
stay buttmad
>>
>>100156065
you have to make an argument first. you already lost and are now deflecting. stay wrong and mad
>>
>>100156096
>accuses others of moving goalposts
>moves goalposts
>>
I find it funny that Rusties focus on their language's use in NT, yet they don't talk about the abysmal fuckups in that kernel that Rust failed to prevent. A kernel that is too dumb to limit the amount of data it writes out to userspace not by the amount of data that was generated, but by the amount of data userspace told it to write out, is so mind-bogglingly retarded that me, personally, I wouldn't want to be associated with it at all, and yet Rusties list their politicking resulting in it being used in NT as one of their main accomplishments.

Retards deserve each other, I suppose.
>>
>>100156122
Isn't it because they are NSA plants and need to be watered to stay alive?
>>
>>100156122
Why are you blaming rust for projects that are not written in it? I think youre mentally ill.
>>
>>100156109
here's the chain and the moved goal posts, i'm not wasting any more time here
>>100154998
>>100155072
>>100155084
>>100155189
>>100155789
>>
>>100148964
Did you ever decide what you're going to work on anon? I'm also bored and looking for a project to work on
>>
>>100156109
Bro the one moving goalpost is you. NTA btw. I like both zig and Rust, I see no point in turning this into pointless sports-team shit flinging.
>>
>>100148964
I assume you're doing this to get hired as a Java dev, since it is Java.

So, look at what most jobs have you doing. And build something like that but ofc on a smaller scale.

AKA Backend Web. That's what Java jobs are. Backend Web.

And yes, you decide what you want to build, and look stuff up as you go to overcome obstacles. Don't get stuck in tutorial limbo.
>>
File: How I load my icons.png (28 KB, 632x274)
28 KB
28 KB PNG
PyInstaller (by default on Windows, at least), produces an .exe and an _internal folder. What's the best practice for loading resources (using relative paths) inside the application? I'm currently using __file__ and that returns the _internal folder path (I'm guessing because that's where the python dll is), but I don't know if this would be consistent across all platforms. Also yeah, I know this isn't the proper way of using Qt, I'm just learning by making a small thing for myself.
>>
Got to gather data and store to my locale DB. Got 2 device running at the same time and they somehow gather the same data. Wtf?
>>
>>100156166
>Why are you blaming rust for projects that are not written in it?
And here I thought it *was* being used in NT? Can you *please* make up your mind?
>>
>>100156212
>AKA Backend Web. That's what Java jobs are. Backend Web.
Same thing for C++ jobs?
>>
>>100156249
C++ jobs. Games, other high performance applications such as high frequency trading, and perhaps embedded systems.
>>
>>100156267
>C++ jobs
>other high performance applications
>>
>>100156279
stl is a total joke in high performance low latency c++ circles
nobody uses that shit in the hot path
>>
>>100156328
Then what *do* they use?
>>
>>100156365
some say kabbalah magic, others say sex rituals. it's hard to say as a goy
>>
>>100156393
Alright, I'll ignore your baseless conjectures then.
>>
You guys like Haskell for web?
>>
>>100156365
in many cases dynamic allocations are avoided, things are allocated upfront instead. custom allocators like arenas and pools are often used instead of malloc. ringbuffers are used when working with data that lives over multiple frames. even people who want to use STL-like containers use this library instead: https://github.com/electronicarts/EASTL
>>
>>100156435
That type of strategy works in C, not C++.
>>
>>100156435
>custom allocators like arenas and pools are often used instead of malloc
A-huh: https://github.com/electronicarts/EASTL/blob/master/include/EASTL/allocator_malloc.h
>>
>>100156450
C++ is practically a superset of C. most perf-oriented programmers will be the first to tell you about all the c++ features that they don't use. not using RAII is very common in performance sensitive code.
>>
>>100156473
>not using RAII is very common in performance sensitive code.
And here I thought it wasn't possible to disable an idiom.
>>
>>100156462
...your point being? yes, if you use the general purpose stl-style container thing you will probably just end up calling malloc at some point. what i said is that people often use smarter context-dependent tactics instead.
>>100156477
you are tilting at windmills. modern c++ people and people who program games in c++ are very, very, very different groups of people that just happen to use the same compiler.
>>
>>100156499
>if you use the general purpose stl-style container thing
So how do I *not* use the general purpose stl-style container thing?

>modern c++ people and people who program games in c++ are very, very, very different groups of people that just happen to use the same compiler.
So why bother with the STL at all then?
>>
I just wrote something that adds the md5 hash of a filename to a file, and another script that opens multiple manpages in Vim, and now I'm out of ideas. Anyone got any decent ideas for bash scripts so I can learn?
>>
>>100156528
>bash scripts so I can learn
You're not learning, you're practicing.
>>
how would I make a python cli output that updates multiple lines dynamically?
I know for something like a loading bar you can use print(f"{arg}", end="\r") to "update" the last printed line, but this doesnt work if you have multiple lines
>>
>>100156514
>So how do I *not* use the general purpose stl-style container thing?
i just told you. you allocate shit up front and you use more specialized memory management strategies.
>So why bother with the STL at all then?
they dont??? that's the point? default C++ STL is only useful for prototyping or non-realitime uses like editor code or something just because it's built-in and people didn't want to bother writing their own stuff.
>>
>>100156541
>you allocate shit up front and you use more specialized memory management strategies.
So why should I use C++ for that if I can do it just as well in C, and without any implicit gotchas?

>they dont???
I didn't say "why do they bother". I said "why bother at all". If the STL was as bad as you're alleging there wouldn't be any reason to use it at all (which is also directly contradicting Stroustrup, as I feel like pointing out: https://www.youtube.com/watch?v=I8UvQKvOSSw)
>>
zig build scripts fix nothing
what a retarded idea and implementation
language is cool tho
>>
>>100156562
>So why should I use C++ for that if I can do it just as well in C, and without any implicit gotchas?
because people like their namespaces, linear algebra types (operator overloads), function overloads, spans, ...
c++ is mostly bad but some of its features have their uses.
>there wouldn't be any reason to use it at all
it's used because sometimes it's convenient to not have to write your own memory management code. people who are serious about performance do not use it for performance characteristics.
>>
>>100156596
So there's people who like namespaces, operator overloads), function overloads, and spans, and then there's people who like performance ... what's the overlap?
>>
>>100156607
i dont get your question. there is overlap. all of the featues listed are completely orthogonal to performance. why wouldn't there be overlap?
>>
>>100156617
Can you please work on your reading comprehension? I didn't ask "is there overlap", I asked "what's the overlap"? Like, how big is it?
>>
>>100156620
that's a pretty stupid question to ask to be frank. every game developer on the planet uses
Vector3
and the vast majority prefer a + b to
Vector3Add(a, b)
, people like having their code look like math.
>>
>>100156640
You didn't answer the question, you just picked out a specific subset of programmers - without explicitly stating if they care about performance or not - and said that they like syntax sugar. Cryptography code, on the hand, is most often written in C, and people spend months optimizing the last couple cycles out of it. They don't use C++ for that.
>>
>>100156670
the overlap is most of the people who use c++ in high performance contexts.
>>
When have u used nested subprogram anon? Do u even know how the get non local variables?
>>
>>100156719
Source? Because I can point to SHA, Skein, fuck, OpenSSL, Mbed TLS or LibreSSL, which are all written in C and assembly. No one in their right mind would argue those aren't high-performance contexts, and they all avoid C++ like the plague.
>>
>>100156751
you need to work on your reading comprehension...
i just told you the overlap is people who use c++ in high performance contexts, this is self-evident. there is nothing to cite because it is a self-evident statement. if you're asking how big that group is, it's basically every game engine team on the planet.
>>
File: hero_data.png (18 KB, 1100x610)
18 KB
18 KB PNG
>>100156769
>you need to work on your reading comprehension
No I don't. YOU are the one who's avoiding the question because you KNOW you're full of shit. No one competent uses C++ for high-performance contexts because it's a pain and a half in the ass to do, when C does it without any implicit gotchas to be worried about. And to implicitly point out to game developers as working in high-performance contexts is the most cynical BS I've heard this year, because I have actually looked at some of their code and can tell you that they have absolutely no fucking idea what the fuck they're doing, and you can shove your self-evidentness where the sun doesn't shine.
>>
>>100156810
>No one competent uses C++ for high-performance contexts
sorry i cant talk to someone who has a fundamentally wrong view of reality. there is nothing that will convince you.
>game developers as working in high-performance contexts is the most cynical BS I've heard this year
okay buddy let's see you make a write a physics engine that's faster than jolt or havok or a renderer or asset streaming system that's better than battlefield's.
>muh gotchas
get gud
>>
>>100156853
>sorry i cant talk to someone who has a fundamentally wrong view of reality
Is that why you don't have inner monologue?
>>
>>100156863
you're very immature. something i should have probably known from the start given that you think using clang++ instead of clang suddenly slows down your code.
>>
>>100156875
Never said any of that, but that's just your pattern, right? State complete bullshit, and then wildly project bullshit when being called out. You are a blight to humanity.
>>
>>100156267
>Games, other high performance applications such as high frequency trading, and perhaps embedded systems.
Okay sounds too high IQ unironically. I think I should stick with making a Java portfolio
>>
>>100156888
basically the point youre getting at
>use c++ -> either you don't care about performance or you're incompetent
i wonder what you've accomplished for you to somehow think you're better than the programmers working on the renderer for the latest AAA game. you sound quite young so it would be very impressive if you have indeed done something of importance.
>>
>>100156930
>projecting again
It's almost like you're mentally ill and are stuck in the same pattern.
>>
>>100157186
>stuck in the same pattern
youre the one posting the same meaningless screenshot every thread. all you talk about is how c++ is le bad and c is le good without any nuance or realizing that it's up to the developer and not the language.
>>
>>100157315
>projecting AGAIN
Like shooting fish in a barrel.
>>
>>100157341
you dont know what that word means.
>>
>>100157488
Why don't you tell me more things about me I didn't know?
>>
>>100157500
not sure if you are being sarcastic or not. interpreted either way, you are admitting that you don't know what "projecting" means. cool i guess.
>>
>>100157517
>more projection
Amazing. Even when I point it out you're powerless to stop yourself.
>>
>>100157565
please read https://en.wikipedia.org/wiki/Psychological_projection
>>
>>100157618
And if not? Are you gonna project some more?
>>
>>100157665
since youre obviously very young, my advice to you is to spend more time programming and less time trying to show how smart you are on the internet.
>>
>>100157826
Called it:
>project some more
>>
>>100150867
>in the real world you have to be able to represent "no valid value."
and that's not what null is. null is a sentinel value and a poor one at that and reminder not all computer platforms treat 0 address any different from any other address or it might be memory mapped register.
>>
>>100154998
>Zig also has more proven real world uses
people actually believe this? meme projects are proof that a language with buggy semantics is stable and mature?
>>
>>100158502
>meme projects
bun is literally replacing node as we speak
>>
>>100158529
.........ok and?
how does that not make it a meme?
>>
>>100158529
>Fast running performance
Bun extends the JavaScriptCore engine—the performance-minded JS engine built for Safari—with native-speed functionality implemented in Zig.
so it's just JSCore with a typescript parser / stripper?
>>
>>100158569
I don't fucking care how good or bad it is, I'm just saying it's not a meme because people actually use it
>>
>>100158775
>because people actually use it
....literally who?
>inb4 orange site.
>>
>>100158529
(X)
>>
>>100159394

>>100159394


>>100159394
>>
>>100141963
Ah there's nothing quite like a good flame over how virtual memory works.
I got in trouble for correcting my boss's boss over this once.
>>
I just started rust with the interactive rust book experiment by Brown University



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.