[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] [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

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


🎉 Happy Birthday 4chan! 🎉


[Advertise on 4chan]


File: touch grass.jpg (203 KB, 850x614)
203 KB
203 KB JPG
What are you working on, /g/?
Previous: >>106795929
>>
For me it's GNU Make, C with GNU extensions and tcl/tk
>>
>>106804600
Right/Wrong/Wrong.
>>
>no the language you build with MUST be a completely different genre of program as the language you're using
Anything more complicated than a one line unity build bash file should just be a nob.h
>>
>No floating point!
Spent 5 minutes trying to debug this, turns out the computer literally has no floating point support lol
>>
File: man-on-the-rack.jpg (158 KB, 900x477)
158 KB
158 KB JPG
>>106804766
>babyduck autismo has problem learning more than one language
this is why america is being overtaken by indians who know at least 3 languages, third one being Java(Script).
>>
>>106804854
Perfect excuse to learn how to program using fixed point.
It's not like floating point is something magical, ironically, floating point is garbage that's only acceptable for slop like lossy compression such as JPEG and vidyagames. You won't find military using floating point in a missile guidance system unless it's some third world shithole.
>>
>>106805152
Agree it's honestly useless and it's shameful that computing has been largely taken over by video games and other "entertainment" coomer shit
>>
>>106805208
>AGC software was written in AGC assembly language and stored on rope memory. The bulk of the software was on read-only rope memory and thus could not be changed in operation, but some key parts of the software were stored in standard read-write magnetic-core memory and could be overwritten by the astronauts using the DSKY interface, as was done on Apollo 14.
Astronauts, who only really needed to be physically fit, could program in assembly while in space on a real time limit caused by food, water and oxygen tanks, and some wintoddler who can't even figure out how to type text into a fake virtual tty will be ready to post about how moon landings never happened.
>>
How rare is it to be able to make something that actually makes a little bit of money (like in the ballpark of 100-500 dollar range) per month ? Up until now I've only made tools for me and other developers to use. I'm assuming putting a donation header on a 20 star repo isn't going to do much for me.

How easy is it to make some money on normieslop is basically what I'm asking & what platform etc
>>
>>106805262
I've been wondering the same thing and I think the answer is mobile game slop with ads. But you have to understand "casino paychology" a little bit to be really good at it.
>>
File: mactoddlers.jpg (989 KB, 1366x5805)
989 KB
989 KB JPG
>>106805262
>>106805284
If you have access to mac dev license, make GUIslop for retards who get filtered by shit you can install through homebrew.
>>
Hiring a software engineer and find myself skipping over certain people (you know who) and being drawn towards cuties. Now I understand discrimination, but unlike most people make out, the gender conclusion is reversed.
>>
>>106804517
>make rogram
>Microsoft Defender flags it when distributed online

I'm learning now I have to get a certificate to sign software if I have any plan on distributing it semi professionally. I've also learned these certificates can cost like $70. Is it worth it? If I actually fork over the $70, do the verification with my LLC, and then add signing into my build pipeline, will Microshit Defender actually stop cockblocking my program when it's installed? Are there free alternatives here or it's just mandatory to buy the signing certificate in this case?
>>
>>106805411
I simply learned to stop trying to develop cuckware for CuckOS.
You want to access it on Windows? Pay me a subscription fee and I will make a website so your CuckOS can access my Linux server.
>>
>>106805411
paying for certificates is useless unless you need it for regulated job
>>
>>106805411
No, because even if you sign it, the smartscreen will block it.
You can send your executable to the microsoft for scanning and they will remove the nagging.
Not sure if putting the exe into microsoft store would help.
>>
>>106805421
Well cuck os is what lots of norms use so I have to make it work.

>>106805439
That makes sense. So signing is more about legality of linking an entity to something maybe subject to industry specific regulations, not so much for getting Microshit Defender to stfu

>>106805469
>No, because even if you sign it, the smartscreen will block it.
Wow that's pretty gay.
>You can send your executable to the microsoft for scanning and they will remove the nagging.
I did not know about this until you just said it and I then Googled it. Thank you anon
>>
>>106805321
lol that's a great idea. IIRC a license is like a hundred backs per year no?
>>
>>106805516
Signing is about avoiding "unknown publisher"
>>
>>106805321
on linux there are plenty of ffmpeg guis, the fuck you smoking retard
>>
>>106805610
How many of them cost $22 to use?
How many do I actually need? What do they do that ffmpeg can't?
>>
>>106805620
i'm sorry you're too autistic to understand this but most users would prefer to pay $20 than have to use command line for the same reason they'd rather pay a $100 to a mechanic than fix their own car
>>
>>106805643
You probably meant
>they'd rather pay a $100 to a mechanic than notice the pattern of brown poo diarrhea color meaning it's shit and bad and needs to be replaced because it's like racism o algo
>>
File: tools.jpg (284 KB, 2048x2048)
284 KB
284 KB JPG
>>106804517
Sharing this for newfriends.

>UPX is a CLI tool that can drastically reduce the size of your final executable and can easily integrate into pipelines
>Inno Setup lets you create installers with ease and can compile in silent mode, also useful for pipelines
>SQLite3 can easily integrate into pipelines and sqlite is one of the fastest lightweight databases out there, though file based it has some of the fastest documented read times
>ResEdit, though less known, allows you to very easily build resource files. If you've ever stumbled on one of those threads talking about how smaller sized programs manage to embed forms, images, and other resources this is a good place to start looking along with .res compilation
>>
File: .jpg (42 KB, 225x225)
42 KB
42 KB JPG
>>106805706
I envy clowns like you sometimes. They can be happy with useless shovelware when that's just part of my filesystem.
du -b --apparent-size "$(realpath /usr/bin/gcc)"; doas compsize "$(realpath /usr/bin/gcc)"
1271128 /usr/x86_64-pc-linux-gnu/gcc-bin/14/x86_64-pc-linux-gnu-gcc
Processed 1 file, 10 regular extents (10 refs), 0 inline.
Type Perc Disk Usage Uncompressed Referenced
TOTAL 41% 520K 1.2M 1.2M
zstd 41% 520K 1.2M 1.2M
>>
Excuse me but where in the fuck is the Build option? I have installed the "Desktop development with C++" tools already and restarted the PC.
>>
>>106805723
>t.
>>
>>106805944
You need to setup your startup item. In your project you specify basically that main.cpp will be the target. Then it should be as simple as Project > Build

Idk why it doesn't already have main.cpp selected, unleaa you started off with a blank empty template.
>>
>>106805960
>You need to setup your startup item.
Tried, can't
Could it be because I opened the folder as opposed to opening folder/project (there are no sln files)
>>
>>106805950
>>t. >>106805944 >>106806010
>>
File: 1733615809219609.png (23 KB, 204x247)
23 KB
23 KB PNG
>systemd
>>
>>106806010
100% yes. Without a .sln or .csproj the idea doesn't know what file to start. You should really just create a new project. You can then copy paste over your current files and it should be pretty seamless from there.
>>
>>106806026
*IDE not idea god dammit
>>
>>106806030
I just looked at main.cpp and there's no main method. The fuck.
>>
>>106805262
Do market research, identify a problem that's causing people to lose money, build a solution.
>>
>>106806088
I thought I had the C++ packages installed but I didn't. Anyway I was just trying to run code of some old game but there's a tons of errors. Fuck this.
>>
sudo poweroff
Operation inhibited by "Disk Manager" (PID 1124 "udisksd", user root), reason is "Unknown (mdraid-check-job)".
User is logged in on tty2.
Please retry operation after closing inhibitors and logging out other users.
'systemd-inhibit' can be used to list active inhibitors.
Alternatively, ignore inhibitors and users with 'systemctl poweroff -i'.

I HATE SYSTEMD
I HATE SYSTEMD
I HATE SYSTEMD
>>
>>106806383
>>106806023
>>
Erlang is king!
>>
>>106806383
>systemd users are so retarded they cannot be trusted to turn off shit they care about before poweroff so systemd just blocks them
grim
>>
>>106806383
it's literally the same shit as Windows. What the fuck are you bitching about retard? force the shutdown or don't.
>>
>>106806540
LOL
>>
>>106806575
>it's literally the same shit as Windows.
That's the problem with systemd.
>>
>>106806650
how? having a functional system where applications can give feedback that they can't shutdown now is bad somehow?
>>
How the fuck are any of us still employed? I've been looking for a Soft. Eng. job since March.
>>
>>106806692
I'm employed at bob's welding with bitches and cocaine, not some loser office.
>>106806682
Yea and a woman can't have sex with me right now, so I rape her.
>>
>>106806692
I honestly don't know. My current job is a complete fucking cluster fuck of stupid.
I basically have no boss and have a bunch of whiny contractors demand I allow them to do things and access to things and my boss and the "enterprise architects" just leave me on read. I'm waiting for IT here to just get nuked and replaced entirely by some contracting company like DXC, Deloitte, Kyndryl or Accenture or whatever.

I'm sick of this shit. I'd rather be NEET maxxing but my finances seem to tenuous to shit the bed.
>>
>>106806708
>Yea and a woman can't have sex with me right now, so I rape her.
what the fuck is wrong with you retard?
out of arguments already?
good to see anti-systemd retards are low IQ with opinions not worth listening to.
>>
File: 1736180054788809.png (123 KB, 236x329)
123 KB
123 KB PNG
>>106806733
>systemd
>>
>>106806733
There's nothing wrong with me, it's you who is a mentally ill retard who has to be protected from making bad decisions. Like, I can go outside and rape any woman I want, nobody will stop me from ruining my own life, but god forbid you restart your computer without closing leafpad first... Clown world.
>>
>>106806746
>>106806749
>still no argument
>more low IQ, low effort shitposting, if not trolling.
you lost.
>>
>>106806757
i have a problem where systemd has a race condition between the desktop manager and nvidia graphics
>>
>>106806783
huh? that doesn't even make sense, idiot.
>>
>>106806792
don't call me and idiot and don't be rude!
>>
I have a problem where mouthbreathers actively ruin software by being retarded.
Why don't you fuck off back to driving automatic car and eating tide pods and dying before you make life even worse for us?
>>
>>106806812
>automatic car
it's very sad that manufacturers are phasing manual cars out by 2035 or something. i will keep driving old cars until i die i guess because driving manual just feels so much more enjoyable
>>
>>106806823
No saaar, you vill use a car where everything is automatic, even your doors, so when some retard with his lithium death trap crashes into your lithium deathrap and you're both burning alive in inextinguishable fire, nobody can even open the doors and save you because it's locked without power.
>>
>>106806830
have you been inside a tesla? everything's automatic, there are no controls other than the steering wheel, two pedals, and indicators. everything else automatic even the windscreen wipers. feels so anaemic like something is missing and it can even steer for you. what a travesty.
>>
wtf is going on in this shit thread?
>>
>>106806846
systemd
>>
>>106806852
what about it?
>>
>>106806856
Back in the day, init systems used to be a lot simpler - sometimes it was literally just a Bash script. However, the systemd project was created to integrate many common functions into one init system that can manage everything. It sure manages nearly everything, I mean it likes in many people's initrds, handles mounting disks, starts services on bootup, handles DNS resolving, and that's all I can list off the top of my head. It's really good, I like it, but I've had very little experience with other init systems, just OpenRC from Gentoo.

All that "one massive program doing a bunch" does not fit with the Unix philosophy of having smaller programs work together to make one big goal. Therefore, some people make the argument that it's bad solely based on this. Personally, I don't care...but I'm not a freedom-fighting *nix die-hard, just a part-time privacy screecher. I can't say much else for disadvantages of systemd because I don't pay attention to it, I fail to see any problem with it when I see counterarguments so I forget why they don't like it. I'm sure they're valid, though, so this reply just gives context so you can learn more
>>
>>106806844
You couldn't pay me to get into tesla.
Closest I've ever been to an electric vehicle was a train in Germany and I didn't feel like I'm gonna die in a fire there so it was okay.
>>
>>106806884
>systemd is ok because I don't care about freedom, I only care about privacy!
Those are equivalent, retarded mouthbreather. You glow brighter than the sun, I'm lucky that my monitor can't glow like that.
>>
File: 1741001072088755.png (482 KB, 526x526)
482 KB
482 KB PNG
>>106806915
no they are not
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
ok lil bro, go shill tor somewhere else or whatever it is you "privacy"niggers do to backdoor anyone who actually fights for freedom and not against it.
>>
>>106806884
>Back in the day, init systems used to be a lot simpler
and it also left a lot of problems up to the user and none of those solutions were portable.
combine that with pid reuse races and other issues and it's pretty obvious why systemd won. "UNIX Philosophy" is a fucking meme.
>>106806915
what the fuck are you talking about? what does systemd have to do with "freedom" and "privacy?"
>>
>>106806936
Don't respond to me, mouthbreather. If I have to explain this basic stuff to you, there's nothing I can do to help you, and there's nothing you can tell me that would add any value to my life.
>>
>>106806945
ever shipped any code lil bro?
>>
>>106806945
>schizo retard has no argument and assumes everyone can read whatever deranged thoughts he has in his demented mind
kys
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
>>106806959
>>106806962
You don't have to read my thoughts, you only need to be white and have concept of future. The rest unfolds in intelligent people's minds independently and the same, reproducibly, with no single word told. It's as obvious as breathing. Remember to breathe, through your nose, mouthbreather.
>>
>>106806959
as someone who has, I can definitely say systemd is vastly superior to the old style Sys V inits. RHEL 7 was literally the biggest improvement to my quality of life as as wage cuck, it was unreal.
>>
>>106806993
>more schizo babble
>no arguments
systemd is opensource.
Freedom [x]
systemd doesn't "phone home"
Privacy [x]

where is your argument?
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
lil bro really thinks I'm gonna explain why he should breathe through his nose when nobody explained this to me, in fact my body always knew to do it without being told, it's something newborns do in first 30 seconds of their life.
>>
>>106806997
are you a literal boomer?
>>
>>106807036
define boomer.
>>
>>106805411
>I've also learned these certificates can cost like $70.
No, you need the EV signing certificate which is like 10x that.
>>
>>106805411
is it Cshart? unironically I rewrote some throwaways as C++ / Rust and just targeted Win32 APIs and the stupid smartscreen, defender shit magically stopped happening. Windows is such a bizarre shitshow of faux security.
>>
>>106806682
>applications can give feedback that they can't shutdown
The application will be shutdown. Nobody cares about it's opinion.
>>
Next progression in the mental illness of systemd is allowing applications to ignore SIGKILL.
>>
>>106806692
I've got a job offering on my second year of my CS degree lol
US job marked is not the entire world's job marked
>>
File: 1755066822129107.png (1.2 MB, 1024x1024)
1.2 MB
1.2 MB PNG
spotted on the linkedin lmao
>>
File: Tohru.png (374 KB, 470x590)
374 KB
374 KB PNG
>>106804517
The MAIDS compiler is completed. For the Maid Card, I want art of Tohru from Dragon Maid dabbing, and Kurumi from Touhou dabbing. Can someone help me with this? I am asking because aside from the card, MAIDS is ready for Public Domain release.
>>
>>106807348
>The application will be shutdown. Nobody cares abo-\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0...continues for page length...\0\0\0
jobless fucking neet.
>>
>>106807529
>vi
what kind of fossil made this shit
>>106807718
>continues for page length
yes retarded autismo, even if you allocate 1 byte, your allocation continues for page length.
>>
>>106807529
>boomer garbage AI slop making fun of AI slop
what did they mean by this?
>>
Paged Out! Issue 7

https://pagedout.institute/download/PagedOut_007.pdf
>>
>>106807775
>zines
>2025
is this real? kek.
>>
>>106807917
top of hackernews last week lmao
>>
>>106807934
jesus. I hate PDF content so much desu. I only read long form content on my phone now. I can't stand reading shit while sitting at my desk. I don't know how normals do it.
>>
>>106807946
it's all posturing from latex users and other tryhard retards. even if you read on a laptop or desktop, PDFs are useless because you can't resize optimally for your screen size and eyesight. PDFs are made for printing on A4 paper and nothing else.
>nooo but it's consistent and portable!!!
consistently shit and because nobody prints documents any more portability is a bad thing. text documents need to be dynamic and work on multiple devices.
>>
God what a cutie

https://www.youtube.com/watch?v=y9a3fldlvnI
>>
>>106807979
ok, based. I'm not the only one that hates PDFs. I hope the arXiv shit pans out. fuck TeX boomers and fuck PDFs.
>>
>>106808007
arXiv is already beta testing HTML format papers and i expect they will move away from PDF in the next few years

https://info.arxiv.org/about/accessible_HTML.html

surprisingly most academic journals are already publishing in web and ebook formats as well and just use a simple JS library for math and symbols
>>
>>106807994
she's no Sandi Metz
>>
>>106807718
This has never been a problem but with systemd it is.
>>
I touched grass once and got attacked by fire ants 0/10 would not recommend
>>
>>106808348
fire ants don't exist in my country, niggas think it's too cold or some shit
>>
File: reddit.jpg (1.55 MB, 2784x3464)
1.55 MB
1.55 MB JPG
>>
>>106808384
now that i think about it why the fuck doesn't window have kill -9 and instead decides to crash your entire system. pkill -9 is so convenient when some shitty program decides to lock the entire DM
>>
>>106808503
Um chud, why not just respect the program? All program lives matter.
>>
>before learning programming
>hey, a cool thread
>after learning programming
>what the fuck is happening here
>>
>>106808503
https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-terminateprocess

wtf are you talking about? It's the same problem/solution in both Windows and Linux.
>>
>>106804517
I'm working on being a mess of a human being.
>>
>>106808222
what the fuck are you on about? Before systemd-inhibit, you'd just shut down without any feedback. where do you retards come from?
>>
>>106808736
Learn Haskell.
>>
>>106808222
also note the why, string
>"Unknown (mdraid-check-job)"
ya, let me just shutdown my computer while mdraid is making sure my array isn't completely fucked. real genius move. next you're going to tell me there is no use-case for a backup job to also inhibit shutdown.

fuck off. holy shit.
>>
File: screenshot.jpg (97 KB, 762x321)
97 KB
97 KB JPG
love this lil nigga
>>
>>106808790
My zfs backups don't take hours so yea I'm not sure what's the big idea.
>>
>>106806383
alias smack_lennart_up='systemctl poweroff -i'

Problem solved. That will be $399.99 consulting fee, $999.99 development cost + tip.
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
If I wanted verbose solutions, I'd just type
echo o > /proc/sysrq-trigger
>>
>>106808503
Windows needs to start up the diagnostic and error reporting service, upload a minidump file, and sacrifice your first born child
>>
>>106809067
literally not true, see >>106808729
why do you faggots lie? I hate Windows too, but this delusion that Windows and Linux aren't similar is ridiculous.
>>
>>106809137
>needs admin to kill your own programs
>>
>>106809137
doesn't actually need to do any of those except the last one
>>
>>106809539
meant to quote >>106809067
>>
>>106807752
i alias nvim with vi since it's less buttons to press :- )
>>
File: 1759759741631960.png (733 KB, 2087x3010)
733 KB
733 KB PNG
>"Web dev"
>"100 days of code [8 hour grind]" timelapse video
>Github is empty
>Chatgpt on the right
>YT tutorial by somebody called Rashid on the left

Why is everyone on twitter like this? Do these people manifest as good progammers since they were 'locked in' and 'grinding'?
>>
>>106809730
I just use vim
>>
>>106809734
hmm ok boomer
>>
>>106806900
>I didn't feel like I'm gonna die in a fire
Electric trains and trams must be the absolute safest transportation vehicles that have ever existed. In theory they could burn because it's electricity but it would be exceedingly rare and it would very easy to get out in time if it did.
No comparison whatsoever with electric vehicles that are using a battery.
>>
>>106809919
No, there's nothing to burn, it's just plastic and metal, it's near impossible for anything to happen even if something gets shorted, some small part will melt and problem will fix itself.
Unlike a car that has highly unstable battery that emits toxic fumes and self-reignites even when fully submerged.
>>
>>106806884
>I fail to see any problem with it when I see counterarguments so I forget why they don't like it
too big and too complex
>>
>>106807170
That's because it's easier to analyze a CLR PE, which can be avoided by using native aot. Long are the days where you can make a winforms ransomware in few minutes with few lines of code to utilize IO and crypto classes.
>>
>>106805411
Blocked as what? A Generic? This is a really common scenario.
>>
File: 1000020732.jpg (85 KB, 868x913)
85 KB
85 KB JPG
>>106804517
Developing something in C# and getting some seemingly weird behavior. I have a collection of objects that all share the same base class. However each instance stored in the collection is a different subtype of the base type. So like this:

List<BaseClass> list = new() List<BaseClass> {new DerivedClass1(), new DerivedClass2(), etc...};

Now, BaseClass has a default method that takes a custom type as an argument. Like this:

BaseClass.Do(BaseArgClass instance);

Every DerivedClass is supposed to have this base method, however they also implement specific overloads for subtypes of the BaseArgClass. My issue is that feeding a derived argument class in doesn't use the more specific method signature. So I would expect this:

DerivedClass.Do(DerivedArgClass instance);

To use the method that specifically calls for a DerivedArgClass, however it's using the method that calls for BaseArgClass. Now, I am using double dispatch to call the derived version of the method, but it seems really odd that I should have to do this.

Is there a native way in C# to tell it to use a subtype specific method signature if it exists?
>>
>>106810619
no, you can only do that using double dispatch, the compiler can't know what implementation of Do to use at compile time so it uses the one that's going to work all the time. this is why double dispatch exists
>>
>>106810648
Thank you anon! I'll keep dispatching lol
>>
>>106810619
>Is there a native way in C# to tell it to use a subtype specific method signature if it exists?
While you might be able to use dynamic dispatch (I've only read about it, never tried doing it) the normal way is to do some sort of inspection of the type of the actual value to establish whether it's safe to narrow it to the more specific thing you want.
It sounds like you've got a misdesign somewhere.
>>
>>106807994
>Hi, I'm sobeebleegolding
A great start, lady.
>>
File: file.png (110 KB, 1002x881)
110 KB
110 KB PNG
writing the boilerplate for a recursive descent parser that use a stack on the heap
the entire parser will be inside while (1) { switch(state) { ... } }

it would be so much easier if programming languages could do this automatically
>>
File: 1759767273056306.png (794 KB, 832x1216)
794 KB
794 KB PNG
>>106807538
I got the poses I needed. I am drawing the Maid Card now.
>>
File: 1759771339600720.png (735 KB, 1024x1024)
735 KB
735 KB PNG
>>106812410
I also wrote an installer for the compiler. If you have Java 23 you just run a shell script or batch file and then add the created directory to your path and you can access MAIDS from command-line.
>>
>>106812386
>it would be so much easier if programming languages could do this automatically
they can, it's called recursion.
>>
>>106812447
I mean making a bounds check and allocating more stack space if necessary. Because how much stack space you need will depends on the input data.
>>
>>106810619
>Every DerivedClass is supposed to have this base method, however they also implement specific overloads for subtypes of the BaseArgClass. My issue is that feeding a derived argument class in doesn't use the more specific method signature.
if you want advice that will actually help you, you'll have to describe what the base class and derived classes actually do, not just name the dry mechanics how you implemented it so far
for now, it looks like your actual issue is using inheritance while at the same time trying to break it with reflection
>>
https://x.com/kinjalkishor/status/1975033361933681130
sepplesisters we're getting dragged on twitter...
>>
>>106812764
Funny thing is that "slower than for loops" still means faster than 99% of programming languages+impls out there.
>>
File: 1452376663267.png (3 KB, 140x141)
3 KB
3 KB PNG
Can I get a second set of eyes to look through this ring buffer code and find the logic error? It randomly crashes after anywhere from 100-5000 calls to PushEvent while the program is running, I'm guessing from an out of bounds memory access attempt. The buffer does dynamically resize when it gets full (it seems). I'm guessing there's an absolutely boneheaded overlooking of something, but I've been staring at it for 30 mins with no luck.

https://pastebin.com/KJEFWfrR

events.h just defines the Event struct (it holds a few enums and pointers) and forward-declares the functions here.
>>
Name a systems language that completely breaks backwards compatibility every 3 years BUT DON'T WORRY WE'LL JUST RUN THE COMPILER 10 TIMES! HURRHURRHURR
>>
>>106812953
Have you tried just sticking a debugger on it?
>>
>>106812953
>memcpy(pEventQueue + ((nEventQueueStart + (nEventsQueued++)) % nEventQueueSize) * sizeof(Event),
you need to cat pEventQueue to (char *)
>>
>>106813067
*cast
>>
File: file.png (7 KB, 433x81)
7 KB
7 KB PNG
>>106813067
Why? memcpy takes void*
https://linux.die.net/man/3/memcpy
picrel on my machine
>>
>>106810619
I had to reread this a few times to make sure I understood but I have vague memories of encountering the exact issue you described. And I forget why it happens, but I think it's something to do with the fact they're in a collection. Try testing and recreating the issue outside of any usage of lists or collections to see if you fan replicate the buggy behavior.

Also what is going on in the constructors of base and derived? This can matter if there's defining behaviors in the constructors.
>>
>>106813089
implicit multiplication
$ cat main.c
#include <stdio.h>
#include <stdlib.h>

struct event {
int e;
};

int main() {
struct event *queue = malloc(1024);
printf("%p\n", (void *)queue);
printf("%p\n", (void *)(queue + 2));
free(queue);
return 0;
}

$ ./a.out
0x555c4e486310
0x555c4e486318
>>
>>106812953
>>106813067
>>106813089
Yeah, with pointer arithmetic, you don't need to fuck around with the sizeof(Event) part.
You can also do away with the memcpy and just use struct assignment. I also find the [] notation to make your intentions clearer.

*e = pEventQueueStart[(EventQueueStart + nEventsQueued++) % nEventQueueSize];


I also really hate the Hungarian notation.
>>
>>106813218
>>106813265
Explicitly casting every src and dest in memcpy didn't fix the problem, but getting rid of all memcpy calls and just using struct assignment did.
I'm sure there was an out of bounds memcpy somewhere, but now it works, so whatever.
Thanks. Lesson learned, if there's a simpler solution than memcpy, use it.
>>
>>106813403
Oh, I get it now. It would have worked if I had recast to a type with the size of one byte. That's why you said char* not void*.
>>
>>106813403
>Thanks. Lesson learned, if there's a simpler solution than memcpy, use it.
Yeah, you only really "need" memcpy for actual byte-related copies, e.g. serialization buffers.
>I'm sure there was an out of bounds memcpy somewhere
The sizeof(Event) was pushing your index was past the end.
Essentially this:
int array[10];

array[5 * sizeof(int)] = 99; // array[20]
>>
>>106813463
Thanks, now it makes sense. I guess it never really sunk in that if pointer++ points to the next element in the array, pointer addition must multiply by the pointer size under the hood, so I was multiplying twice.
>>
>>106813403
Struct assignment's usually converted into a memcpy call, but that's an implementation detail.
(I know that because of working with an embedded system where the standard implementation of memcpy SUUUUCKED!)
>>
>>106813492
>pointer addition must multiply by the pointer size under the hood
Exactly.
>>
>>106813495
>Struct assignment's usually converted into a memcpy call, but that's an implementation detail.
I would have thought and hoped that the opposite happens.
>>
>>106812953
build it with address sanitizer.
it probably wont fix the problem, or even trigger, but when it does trigger, it's 1000x more helpful than a crash, because instead of guessing that it's an out of bounds access, you KNOW it is, because the report will show you a map of the memory.
On linux it's easier and harder at the same time (linux comes with leak sanitizer and it's annoying when dealing with any GUI library, you should disable it with an env variable in your IDE / global).
On windows you need msvc, either msvc or clang flavored (there are differences, MSVC has "continue on error" which sounds terrible but if you had no terminal output, dumping the asan report to a file using COE_LOG_FILE is useful, and clang has undefined behavior sanitizer unlike msvc which works with Asan Unlike MSVC's runtime checks such as RTC, BUT you must use a static CRT build which is a pain). And you need to copy the Asan DLL which is hidden, unless you launch only with your IDE / VS dev console, and note that MSVC and Clang have differen ASAN DLL's with the same name and they are incompatible, so clang asan won't work in your IDE without ENV vars (clion has a tutorial for it).
BUT...
I completely forgot about this...
You could just run your program in Dr Memory (it's really simple, it checks for uninitialized memory unlike ASAN, but it runs 100000x slower), but it wont work on mingw. On linux you have valgrind.
(If you are a mingw user... technically you can use WSL to run mingw programs in wine using valgrind, but if you installed 5gb ubuntu image, you might as well just port it to linux, and yes, graphical applications work, but MPV has audio desync)
>>
Where do I go to talk about writing custom extensions to a software suite used in a boomer industry (Experion PKS)?
I don't think that anyone other than the dev team and myself have looked at the API guide in a while.
>>
File: gems.png (131 KB, 1722x909)
131 KB
131 KB PNG
>>106804517
writing a command line utility to find the posts with the most (You)s so I don't even have to browse this gay site anymore
>>
>>106813931
>not removing that html tags
>not decoding the html entities
>>
File: html.png (6 KB, 515x133)
6 KB
6 KB PNG
>>106813980
I'm working on a second version of it that parse the html using libxml2. picrel is an experiment
I'm also gonna add a bunch of vt100 stuff to make the output actually look like 4chin's UI
>>
Is there an easy way to demonstrate how it can be dangerous? The full function is here:
unsigned
rebase(unsigned x) {
unsigned *sp, i, base, d;
asm("mov %0, sp": "=r"(sp));
i = 0;
base = 0;
do {
d = x%10;
if (d >= base)
base = d+1;
*(sp - ++i) = d;
x /= 10;
}
while (x);
for (; i; i--)
x = x*base + *(sp-i);
return x;
}
>>
File: 1610533317275.gif (15 KB, 700x500)
15 KB
15 KB GIF
I'm not a programmer but I'm taking a Python class at my local CC out of boredom and it's kinda fun, but it meets once a week and after a month we are still doing basic input/output and fstring tier shit which is somewhat boring, what is a good book/YT channel or something I can spend some time on that is useful for learning the language?
>>
File: do this.png (618 KB, 900x900)
618 KB
618 KB PNG
>>106814233
Some instructions require aligned stack.
~ % gcc stack.c && ./a.out
~ % gcc -DSEGFAULT stack.c && ./a.out
zsh: segmentation fault ./a.out
~ 139 % cat stack.c
#include <emmintrin.h>

int main()
{
#ifdef SEGFAULT
asm volatile ("push 42");
#endif
__m128i const x = _mm_setzero_si128();
asm volatile
(
""
:
: "x" (x)
);
}
>>
But there's no better example than the fact that I didn't really need any other code besides modifying a stack because now compiler assumptions are fucked and it segfaults on ret.
~ % gcc -DSEGFAULT stack.c && ./a.out
zsh: segmentation fault ./a.out
~ 139 % gcc stack.c && ./a.out
~ % cat stack.c
#include <emmintrin.h>

int main()
{
#ifdef SEGFAULT
asm volatile ("push 42");
#endif
/*
__m128i const x = _mm_setzero_si128();
asm volatile
(
""
:
: "x" (x)
);
*/
}
>>
>>106811830
at least she isn't reading some AI generated script and is actually talking from experience
>>
>>106814737
I think jews are to blame for everything because they're the only ones who do everything.
Like, you know, Jews infight a lot, so it makes sense that Christianity is derived from Judaism, and self-guilt. The kind of guilt you feel towards lifeforms like your dog when you don't take it outside for example. Oh wait, you cannot relate because you're a goy and you do not comprehend the dog's suffering in modern household when it belongs outside.
>>
>>106812764
>didn't attach screencap and make it its own thread
Thank you anon, I know that took restraint.
>>
>>106814890
I don't have a twitter account, so, kinjal kishor, can you like, kill yourself you retarded nigger? How is performance even relevant in a loop that has non-deterministic branch predictor rape?
>>
>>106814203
>libxml2
You know that slop was written by ebassi because it has html parser which doesn't fucking work and it's not even html5 and they refuse to update it and refuse to fucking decode html entities properly so I don't have to.
t. wrote my own html parser not to deal with cnilecuck shit
>>
>>106814281
https://nostarch.com/python-crash-course-3rd-edition
>>
>>106812953
> // Dynamically resize the queue
I stopped reading there, because honestly, this by itself is beyond retarded.
>>
>>106815112
If you're going for an infinite-length queue and going to dynamically allocate all of its members anyway, seems like you may as well go for a linked list.
>>
>>106815158
Unbounded queues make 0 sense, linked list is only good outside spsc and spsc is the only correct way to model multithreaded anything. Trying to make arbitrary setups work is senseless, if all you have is 4 cores, make 1 producer that gives out work in round robin fashion (or better solution specific solution) and be done with it, consumer still has same code as spsc. If you had 3 consumers fight for single producer, it would be fuckin retarded.
With some declarative SDL, you can configure spsc building block with bounded memory usage for ANY problem.
I don't understand why cniles are so retarded.
>>
>>106815191
DSL* Domain specific language.
>>
>>106815191
Bro's just yapping about shit nobody asked about.
>>
File: .jpg (35 KB, 500x500)
35 KB
35 KB JPG
>>106815353
This is not something another beta would tell you, but simply using sigma keywords won't change that you're still a beta, lil bro. Start mewing.
>>
>>106812386
What language is this anon ?
>>
>>106815424
>>>/global/rules/2
>>
>>106815435
it's C lil bro
>>
>>106815435
Python with ctypes
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
>>106815498
Am I a zoomer? Yes.
I'm nearing 30 though, pipe down lil bro, you're clearly a gen beta, you likely hit 18 last summer and think you're a big boi now, but you're just a lil bro who doesn't have a brother so this is the only place where anyone will ever refer to you as his little brother.
>>
>>106815536
Neither Python nor C has types
>>
I'm trying to implement an efficient Option in C++ much like in Rust and it seems like I have to specialize option<T> for each T because the way to save storage space on any one of them is vastly different.
>>
>>106815614
So true
>>
>write a few lines of C#
>build it with
dotnet build --runtime linux-x64
then
dotnet publish --runtime linux-x64
, move binaries to ubuntu, try to
dotnet run

>pic related

why cross platform .net is such a pain in the ass
>>
File: 1759193142906990.jpg (134 KB, 960x784)
134 KB
134 KB JPG
>>106814939
yeah it's shite but it literally only has to handle 4chin comments so it doesn't matter
>>
File: 1757393063688371.jpg (137 KB, 736x843)
137 KB
137 KB JPG
>>106814939
also
>t. wrote my own html parser not to deal with cnilecuck shit
based
i was 50/50 on writing a very incomplete parser vs using libxml, but i figured supporting jewnicode would complicate it or something
it's whatever though, the code is already written
>>
>>106815996
there's no unicode in html tags, and internal data strings that can contain unicode inbetween the tags are your problem, libxml doesn't handle any of that.
It's literally just matching < and /> on a stack.
>>
Because of the way I program, I'm hitting so many edge cases where using generics is not zero cost that I implement something extremely specialized, yet when I don't, C++ is still superior to C and I'd be retarded if I used plain C.
>>
>>106815760
Very likely a skill issue. You couldn't even attach an image anon.
>>
File: 1750147004260533.png (179 KB, 1742x729)
179 KB
179 KB PNG
Why does he do it.
>>
>>106804517
Flask thingie that vizualies a prolog database of
triple(subject,predicate,object) facts.

I want to implement proper vocabularies like
triple(company1,"has:name","Google").
>>
File: clownstrike-jaks.png (1.26 MB, 960x1280)
1.26 MB
1.26 MB PNG
>>106816864
mental illness
>>
>>106816881
Also god fucking bless front end developers. Jesus christ it fucking sucks.
>>
>>106804517
>>106816884 cont
btw, i wrote dis today
>>
>>106816901
>FFFFFULL
How did you get my bulking routine.
>>
>>106816923
kekd
i too noticed the ull designation creates magic numbers
>>
>>106816901
Noob here. What does it mean align a variable with a static lifetime? how could the compiler/linker guarantee the executable is loaded by the OS such that it is aligned that way on memory?
>>
>>106816956
never thought about it, but i assume the variable gets aligned, padded
space before the variable gets filled with zeroes until it reaches the desired position
>>
>>106816956
>What does it mean align a variable with a static lifetime?
and that means the variable starts at an address thats a multiple of the alignment
aligned to 32 bytes like in the example?
that means the variable begins at a multiple of 32 bytes

its necessary to do that when you work with intrinsics
but its also good to align your data when youre threading, to 64 bytes this time
both because of how the cpu deals with loading/writing data
it deal in cache lines which are 64 bytes long
when threading, the problem is that the whole 64 bytes get read or written to at once
and so if you have 2 threads working on the same cache line you end up with a race condition that the processor has to resolve

intrinsics are linked to cache lines, but also to how registers are built
these can ingest 32 bytes at a time. and to improve performance, said 32 bytes should be aligned to half a cache line.
>>
>>106816956
>said 32 bytes should be aligned to half a cache line.
final clarification:
they dont have to be aligned, but you use a different, slower instruction to load them into the cpus register.
said instruction is slower because it has to account for more stuff. like the race condition situation.
but also if the 32 bytes span 2 cache lines, then the cpu has to load both cache lines to extract the 32 bytes from em.
more stuff happening = slower instruction
>>
>>106815760
>>106816674
You're probably right, but still there are languages that even a monkey can easily work with cross platform
>>
>>106816884
>muh regex
it was Microsoft's fault all along, wasn't it?
>>
Whats the point of reading and writing programs during the summer if nothing carries over for CompSci in college? Nothing that I read or programmed during the summer has made anything easier. Have to search up and figure out the same shit except its for more complex assignments. Whats even the point of programming during your free time.
>>
>>106817286
theyre the ones to choose ci/cd development model, so ultimately its their fault.
their call- their responsibility

>>106817291
writing programs? to make a portfolio
reading programs? learn shit you didnt learn in compsci
>>
File: 1759513390233572.jpg (64 KB, 736x854)
64 KB
64 KB JPG
>>106816881
>today I go back to writing UI code
Send me your energy
>>
>>106817291
Honestly, the theory usually makes the programming easier and not the other way around.
>>
>>106817291
>Whats the point of reading and writing programs during the summer if nothing carries over for CompSci in college?
experience with code
>Nothing that I read or programmed during the summer has made anything easier. Have to search up and figure out the same shit except its for more complex assignments.
should've worked on more complex programs during summer
>Whats even the point of programming during your free time.
you could write a program that actually does something for you
don't waste time on "programming challenges" or exercises that are just programming for the sake of programming
>>
We should rename this thread FRIENDLY programming! :)
>>
>>106817021
>>106817110
>>106817129
I just found out that the executable format has metadata (that the linker provides) for segments which specify alignment and other info.
>>
>>106817193
show the command
dotnet run 

You use this when you are in the same directory as the .csproj or as a shebang for C# files.
dotnet ./path/to/dll

you use this to run the .dll file.
>>
>>106817580
a-hah
yeah, now that i hear it, it makes perfect sense
no need to shove a gorilion zeroes into the executable when you could do that with just a hint

thanks anon
>>
>>106817193
By the way, the publish folder should have two files: {YourAssembly.dll} and {YourAssembly{.exe}}
The file ending in nothing or in .exe is the native launcher for your program.
>>
>>106817405
prolog gave me energy sir
>>
>>106817649
I think the alignment metadata is for the start of the section. Padding will also need to be applied between variables.
>>
>>106817730
a-hah. thanks for the clarification.
>>
>>106817618
>>106817660
I set flags for single binary in csproj and tried to run it the first time
When I do it the default way and run dll file it works properly, it doesn't when using 'the native launcher' though
Thanks anyway
>>
>>106817718
Would you believe me if I told you "same"? I fucking love prolog. It's so powerful, I try to use it wherever I can. Most of the time it boils down to a really flexible note companion, but I know it's capable of so much more. I recently figured out looping via choice points.
>>
>>106817826
>I set flags for single binary in csproj and tried to run it the first time
I assume you meant PublishSingleFile. In that case, you just run it like this normal executable e.g.
./ProjName

Also, pass in "-c release", because debug is the default config.
>>
>>106816502
Ah so.
>>
I made a pseudorandom number generator, here is the C code for it:
https://pastebin.com/06TBSan7

I would have posted it in code blocks but 4chan always blocks it as spam.
>>
>>106818421
>prng of such low quality that even 4chan doesn't want it
>>
File: 1747000533982188.png (7 KB, 348x299)
7 KB
7 KB PNG
#![allow(unsafe_op_in_unsafe_fn, static_mut_refs)]


There I fixed Rust.
>>
>>106818421
>>106818799
why doe?
im drunk, care to walk me through the code, lads?
>>
>>106818835
Run it through dieharder and find out.
>>
>>106818871
>dieharder
too drunk to do it rn
whats the qrd
>>
I don't know how I fucked up, but I totally learned nothing about classes in my course.
A one hour review and I think I understand it now.
Adding .h and .cpp files might need a bit more review.
>>
File: pepe-newspepe.jpg (355 KB, 1391x1405)
355 KB
355 KB JPG
>>106819044
post code
we will roast you until you achieve perfection
we'll bully you out of all your bad habits and lapses in work ethics
>>
>>106819044
>>106819116
This is roastworthy just because the meme course teaches basic syntax and not problem solving in C++.
>>
>>106818967
The qrd is that you're drunk.
>>
File: gto-smoke.jpg (115 KB, 736x736)
115 KB
115 KB JPG
>>106819213
fagot
>>106819207
additional reason to crowdsource optimization
academics suck. theyre failed professionals, thats how they end up as teachers
>>
File: ddd.gif (8 KB, 250x242)
8 KB
8 KB GIF
>>106804517
>What are you working on, /g/?
i'm trying to learn how to program games for the gameboy, using the z80 assembly for rgbds compiler.

i'm not doing well
i am not doing well
>>
>>106817903
>Most of the time it boils down to a really flexible note companion,
please detail
>>
>>106806884
one of the arguments is the potential security risk in having everything run by one program.

if they can exploit systemd, they can take over the whole potato
>>
>>106819744
nice, what's difficulty are you encountering?
>>
>>106819774
Don't worry, systemd is so overcomplicated now that nobody will ever bother exploiting it. Especially when systemd users nuke their efivars and break their motherboards with 0 malware.
>>
>>106819877
migranes
muscle soreness
pain
life
existing

you know, technical issues
no, i'm not a tranny, and i dont own programmer socks, it'd clash with my aluminum foil wizards cap and robe aesthetics
>>
>>106819955
I found that Magnesium helps me with my wrist pains.
>>
>>106805321
>make GUIslop for retards who get filtered by shit
That will unironically go verbatim into my TODO. And my paper journal too. Epicest shit I've read in last two months.
>>
>>106820036
do pushups.
gradually transition into making puchups on your fists
bc youre old you should introduce pushups on fists EXTREMELY gradually
start with one, then among your pushups you do one or two
GIVE YOURSELF TWO WEEKS EACH TIME YOU INCREASE IN FIST UPS
and eat cartilage
like the fukken skin and articulations of animals you eat (chixken, beef, alligator if you live in lousiana)
youre an oldnig
ive been doing this since im 15
but if you start old, take extra care you dont break a wrist or something
mid that theres a thin line bw hardeing and self destruction
>>
>>106820272
Will credit you for it, don't worry. Will sign it as -by 5321anon
>>
>>106820036
>>106820276
>mid
*mind

and also:
ur wrists are gae
the only thing you can do is to reinforce your skeleton with repeated micro deamage
i fink its called catabolism/anabolism
but when applied to bone and articul ation everything is 50x slower bc theres no blood flowing there
not much
and so you have to do like with muscles
but fukken 50x slower
you will damage
but then you wait 6 months to recover
and so instead of going full tard you maintain constant stress on your bones and articulations
at the same rate it ta kes for your structs to recover
theres but a thin line bw hardening and self destruction
better go easy than overdo it bc youll end up handicapped
>>
>>106820036
>I found that Magnesium helps me with my wrist pains.
its neck pains mostly

i know how to alieviate the pain, it requires me to get up and walk or lay down, both of which make programming difficult.
i can do almost anything else, but just not sit in front of a pc and program.
>>
File: perfect.jpg (56 KB, 960x718)
56 KB
56 KB JPG
>ergonomics
>>
>>106820276
>>106820319
Thanks anon, I appreciate it. I'm definitly going to restart a pushup routine. I just did 10-15 right now, 1-3 at a time.
I don't know if I can find a lot of meat with cartilage to eat regularly but I sure keep it in maind. There's a receipe with beef meat I eat often in winter, there's is a bit of cartilage and I do eat it.
I'm in early 30s... but you're right about my health.
>>
>>106820527
yeah take it slowly anon
theres 365 days in a year and that does add up
its like the great canyon
time * determination
but again, i cannot emphacize that enough-
dont push your limits, dont expect too much too early, youre not 18 anymore, you have to take that into account
and speaking of which-
you simply dont have time to waste on a fucking wound esp a self inflicted one
>>
>>106804517
>not programming as such but
TRYING TO GET A LOGITECH BLUETOOTH NUMERIC KEYPAD I BOUGHT FUCKED OFF EBAY TO WORK AND BE REPLACEMENT ARROW KEYS FOR GAMING IN UBUNTU IN BED WITHOUT GETTING COLD HANDS
>got the HW working after cleaning the PCB and all the ribbon cables
>written a symbols file based on;
>/usr/share/X11/xkb/symbols/keypad
>for Ubuntu 24.05
Don't know how to proceed...
>picrel is before fixed it
>>
>>106820668
*Ubuntu 25.04
>>
>>106820527
you know what?
actually
instead of trying to do pushups on your fists
try first with a punching sack
its gonna activate your wrists allright, even with the bands and gloves
even doe id recommend to work technique first
and adjust power to what your body can take
but train technique, thats as important as strength proper
and the repetition too
chances are youll start your fight the moment a bottle will be broken on your head freom behind
your punches need to be semi instinctual
that takes repetition
which is good, bc thats also your stimulation for your wrists
dont trey to break the sack in half
it wont happen. too fast...
with time, remove the fuzz inside the sack and use sand
and then whenever you hit you train your wrists
but problem is, if from absolute zero you do it for 15 minutes your chances of hurting yourself increase from 10% to x2 with each minute or so
to give you an idea
but its about stimulation, a certain treshold until you start doing structural damage to yourself
so yeah. be careful. maybe start with a normal punching bag, then once you do with it like with a toy, do punch-push ups. so you dont hurt yourself bc you can
>>
human body is biotechnology btw
>>
>>106820668
//
// ────────
// Num
// Lock
// ────────────────
// 7 8 9
// Home ^ PageUp
//
// 4 ⟵ 5 6 ⟶
// < v >
//
// 1 2 3
// End PageDn
// ────────────────────────
// 0 Insert
// F5
// ─────────────────
default hidden partial keypad_keys
xkb_symbols "extra_direction_keys" {

include "keypad(operators)"

key <KP7> { [ KP_Home, KP_7 ] };
key <KP8> { [ Up, KP_8, KP_Up ] };
key <KP9> { [ KP_Prior, KP_9 ] };

key <KP4> { [ Left, KP_4, KP_Left ] };
key <KP5> { [ Down, KP_5, KP_Begin ] }
key <KP6> { [ Right, KP_6, KP_Right ] };

key <KP1> { [ KP_End, KP_1 ] };
key <KP2> { [ KP_Down, KP_2 ] };
key <KP3> { [ KP_Next, KP_3 ] };
key <KPEN> { [ KP_Enter ] };
key <KPEQ> { [ KP_Equal ] };

key <KP0> { [ F5, KP_0, KP_Insert ] };
key <KPDL> { [ KP_Delete, KP_Decimal ] };
key <KPPT> { [ KP_Decimal, KP_Decimal ] };
};

>
hope this helps someone
>>
>>106820527
also i learned to do absolutely percussive ko's wbu training iwth weights
you get infinite power but that technique is telegraphed as fuck bc you use elasticity and weight etc
pretty percussive
but asides from that you still have to train explosivity- your jabs
again, biomechanics
theres mechanics in it therefore: tech
>>
How do programmers figure out if a program is doable within a time frame? I want to create more complex programs for my portfolio but I don't want to work on something that will take a year but at the same time it can't be something simple as shit that no employer will look at. I have to look for an internship for college and unfortunately they keep asking for portfolios. You have no chance without a github portfolio.
>>
>>106820811
>How do programmers figure out if a program is doable within a time frame?
experience
you figure out what will it take to do something
you estimate how long will it take given your resources
you multiply x2 bc deep inside, everyone is a faggot, including you
and boom, thats the time it will take
>>
>>106820811
>>106820846
and heres the genioos part:
you overestimate
so that you never under deliver
its all fukken percep tion, neo
the fukken spoon is an illusion
>>
also thread theme bc i deserve it for dropping a fundamental-nuke about marketinghttps://www.youtube.com/watch?v=HLa9eO3oNsw&list=RDHLa9eO3oNsw&start_radio=1
>>
>The LLM got stuck in the state machine again
>>
>>106821419
yes, but what did you mean by that?
>>
File: epoll.jpg (28 KB, 236x213)
28 KB
28 KB JPG
I fixed another cnile API.
#include <nostd/epoll.hpp>

namespace local
{

using namespace nostd;

int
main()
{
int x = 0;

epoll::fd<int, 1> epoll{};
epoll.add(1, epoll::event::in, x);
epoll.modify(1, epoll::event::out, x);

for (;;)
{
auto const result = epoll.wait(-1);

if (!result) [[unlikely]]
{
if (result.errnum() == sys::err::intr) [[likely]]
{
continue; // nothingburger
}
else
{
return 1; // it's over
}
}

for (auto const& event : result)
{
if (event.flags & epoll::event::out) [[likely]]
{
return *event.data;
}
}
}
}

}

int
main()
{
return local::main();
}
>>
>>106821558
>not using libevent
ngmi
>>
File: screenshot.jpg (59 KB, 668x123)
59 KB
59 KB JPG
>>106821579
>not using bloated slop
What about it? How could it possibly benefit me when I'm not a nocoder?
>>
File: .jpg (110 KB, 500x500)
110 KB
110 KB JPG
>https://github.com/libevent/libevent/issues/1038
I want my 5 minutes back and I'll shoot up a whole courtroom if I don't get a refund without forced arbitration, lil faggot.
>>
>>106804517
i have this sql database 10k entries across 11 table i want to make a ui that has like a map and some text boxes so when you click on something on the map or when you search in the top it displays the rest associated with it.
Can you point me in the right direction?
>>
is there a good way to learn c without internet connection?
is there a set of downloadable books/pdfs or whatever resources that I can get in advance and then figure out most stuff offline just with those resources and a c compiler?
>>
>>106822680
how old do you think c is, and how old the internet is?
>>
File: whiplash.jpg (79 KB, 301x320)
79 KB
79 KB JPG
https://www.youtube.com/watch?v=JvoiQTRjt88
>>
>>106818421
>>106818871
I'm really curious now, did you actually test it? In my testing it has survived 16TB of testing so far in practrand which is more robust than dieharder afaik.

I did a quick test with dieharder just now and it seemed to go okay. I don't think the quality of this prng is actually good for any practical use but it's obviously at least better than you seem to be thinking
>>
>>106822680
no, even if you had 128gb of ram for a super large AI, I would want my AI to search up the internet for me so that I can check it's references before trusting it.
most of programming is just faking it until you make it. if it wasn't for google / stackoverflow, you would be stumpted by every dumb issue (the build system is a larger filter than the language, cmake is hell).
you are not "the guy", almost everything you code has already been done by someone else. copying code from stackoverflow is not the same as "copying your friends homework" because programming isn't that simple.
C is a pretty dead language when it comes to tutorials and stuff, so you might find yourself porting examples written in C++ or JS into C, porting algorithms from other languages takes very little skill, what takes a lot of skill is writing simple code, because most code is put into a triangle, your code is either 2 of Fast, Readable(simple), or Flexible. Code be be all 3 of the triangle, but you just need to be a genius to do that, and I feel like all C programmers (C++ and rust as well) have micro-optimization brainrot (why are you using C if not for performance?), so they try to make everything fast (even when it's slow), so you typically end up with spaghetti code no matter what because you need to learn through experience (4~ years is typically when you get out of the retard zone, creating at least a dozen projects, but you still have a lot to learn even past that).
>>
>>106822816
It's not good at all when it requires floating point operations.
There are only two important metrics in a prng, one is cryptographic quality, and the other is throughput. If it isn't extremely fast or statistically perfecly random, it's useless.
>>
>>106822556
try the webdev thread (im serious)
>>
File: vmxykntqaf941.png (405 KB, 813x868)
405 KB
405 KB PNG
>>106822836 (me)
>>106822680
also I don't use C, I use C++, but generally you should know everything you need to start coding from a simple tutorial.
books are academic, if you like learning from a book just like school, it could work I guess (assuming the book has assignments and it includes answers).
but the code is very school-ish, it's not a representation of how people actually code (this is a big problem in C++, but I imagine C books probably use malloc in ways that are not kosher to most C programmers).
I think the best books are the books that are specialized in certain libraries or whatever. I just pirate the pdf and I would just read whatever peaks my interest (or what I NEED for my goals) in the table of contents.
When I started with C++ in highschool, I got SDL2 working and I was coding my own game within the first month ("you must be an intermediate C++ programmer for this tutorial", is a lie, if you can read the code and compile it, that's all you need), but the code was absolutely horrible, and there are so many errors you will encounter that no books will cover that makes the internet is invaluable.
>>
>>106822680
Try beejus guide (pdf or single html) and manpages
>>
>>106821558
>but chud processor what if
>[[unlikely]]
>but
>[[unreachable]]
>>
>>106822879
moving the goalposts now? what happened to that "run it through dieharder and find out" talk. and I already told you I'm not claiming it's practically useful, it was just an experiment and a bit of fun
>>
i've been doing coding related corporate and startup shit for over 10 years and i've just passed the 1 year mark of looking for a job
that's all i can work on nowadays. i don't have the drive to write anything more than trashy utility scripts to organize some digital camera photos and make stop motion movies
>>
Link Time Optimization LITERALLY breaks GPL and nobody cares and everybody uses it.
>>
are there any guides for using git that are so basic and handholding that even my retard coworkers can understand it?
>>
Javascript keeps getting faster every week.
C hasn't improved in years.
Javascript is the future.
>>
>>106824161
nobody uses GPL libraries and nobody uses link time optimizations except clang users.
>>106824261
Copy/backup your source code because you are probably going to fuck up trying to put it into git.
Install the github plugin in your IDE.
make a new repo in github.
the way that works depends on the plugin (either make the repo in github, open it with the IDE, and add the files to it, or the plugin creates and names the repo for you using the folder).
And adding changes is either 2 or 3 steps.
So on vcsode, you stage, commit (put a messge), and sync (send to github).
On Clion I set the changes and press commit and push.
You do need to set your username and email the first time you set up I think.
>>
Today I learned in C whether chars are signed or not is platform-dependant and that you should always sign your chars. I didn't even know there was a "signed" keyword but it seems to exist solely for this reason.
>>
>>106824725
Yes, it is very silly. It's one of the reasons you should probably use int8_t when you really do mean to show you're working with signed 8-bit data.
C23 added char8_t (just a typedef for uint8_t), and while its use is very limited at the moment, I like how it's a very clear way to show "this is UTF-8 data and is unsigned", and sidestepping all of their peculiarities of plain char.
>>
i'm learning propositional logic to do computing in shit like minecraft and i'm wondering if you guys know any good books/resources that have like exercises (ideally escalating) to practice applying the ideas in a handheld way. i can't really find any, not sure what exact terms to search.
>>
File: 1744152226311244.png (111 KB, 1269x581)
111 KB
111 KB PNG
Who's in the wrong here? Intel has invariant TSC, AMD doesn't.
>>
>>106825006
nandgame.com
>>
>>106823085
There's no post to move, why even bother posting some random snippet that's
>untested statistically speaking
>not cryptographically interesting
>not btfoing xoshiro family
is a question that I have.
Now that I think about it, it looks like something that would be used in shaders and I wouldn't be surprised if you just copy pasted it from somewhere, so how about you fuck off?
>>
>>106824725
Here's something else you should learn: ASCII is 7 bit, with eigth bit being a boolean flag, meaning
>Is user a retarded faggot?
>>
>>106825136
Who cares?
It's all relative, when you're benchmarking, you're comparing apples to oranges in a vacuum.
I ran a benchmark that uses a plain dumb for loop vs sse to search a "near" value, e.g. verify if it exists in next 16 bytes, benchmark makes it look like sse is equivalent speed to plain char loads and compares if the needle is in 0th index, and sse consistently wins for remaining 0th-15th case, so should you replace all of your single char compares with SSE or AVX? Probably not without profiling if it makes your whole program faster or slower when your code doesn't fit into L3 due to SIMD code being way bulkier and way more susceptible to branch mispredicts and register starvation, though AMD 3D CPUs btfo half of that with 96MiB L3



[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.