File: c_floor.png (1.7 MB)
What are you working on, /g/?
Previous: >>108971267
Showing all 177 replies.
>>
>>
File: 1757281952272415.png (369.3 KB)
the more I learn about programming the more retarded I feel, it's literally the tip of the iceberg and brainless as fuck to be able to make applications using existing languages. all of the actual geniuses that know how to code are working on frameworks, libraries, and compilers to optimize our dogshit code and actually make them work behind the scenes.
>>
File: Figure5.6-PipelineControlLines.gif (12.5 KB)
>>108993855
All of the actual geniuses that know how to design processors are working on branch prediction, pipelines, and cache to optimize our dogshit compilers and actually make them work behind the scenes.
>>
>>
>>
File: whats-so-special-about-kikuri-v0-rhmyeywtoprf1.jpg (9.6 KB)
>>108993855
The more you learn, the more you realize how much you still don't know. I'm learning OpenMP right now, and I swear I keep running into the same basic issues over and over again.
>>
File: görsel_2026-06-06_212839646.png (14.6 KB)
>>108993885
The real geniuses are way below all that, down at the transistor level, tweaking layout, sizing, and electrical characteristics just to compensate for our shitty digital designs and actually make them work behind the scenes.
>>
>>
>>
>>
File: poop.png (232.9 KB)
>>108993948
i just finished the chapter on semiconductor devices in my microelectronics book
now i'm ready for the digital circuit design part
understanding MOSFETs is prerequisite for PMOS/NMOS/CMOS circuits. i have a VLSI book on CMOS that i'm about to rip into
understanding BJTs is prerequisite for understanding TTL beyond a superficial level, which i'm excited about too
>>108993885
and to complement this, i broke my FPGA dev board out again and am working through defining a soft core processor with peripherals that i will target with a C program, cross compile, and then download into the FPGA along with the gate configuration
the whole point is to realize a tile-based graphics digital logic design i put together as a digital circuit, first in FPGA form and then perhaps using TTL. the design is somewhere in power between the NES and SNES, closer to the latter. i've been working on this the last few months, the last thing i put together being a browser-based emulator to verify and evaluate the digital logic.
it's been a fun project. haven't posted anything on it in a couple months because i've been spinning up the next steps.
>>
>>
File: IMG_8558.jpg (315.6 KB)
>>108993813
>>
>>
File: poop.jpg (31.3 KB)
>>108994864
mostly hardcover texts:
Microelectronic Circuit Design, by Richard Jaeger (found at used bookstore)
Principles of VLSI CMOS Design - A Systems Perspective, by Neil Weste and Kamran Eshaghian (stolen from last workplace)
Embedded SoPC Design with Nios II Processor and VHDL Example, by Pong Chu (bought from amazon)
the FPGA book is out of date, but I'm using is as a guide to figuring out the more recent Quartus tooling and work flow in conjuction with Altera's online documentation
i'm supplementing Jaeger with The Art of Electronics of which anyone can find a pdf online, but it's scared of offloading math onto its reader, which i don't like
>>
>>
>>
File: 1771041515148027.png (256.5 KB)
I solved https://leetcode.com/problems/total-waviness-of-numbers-in-range-ii/ but I had to have claude walk me through all of it because I couldn't understand any of the blogposts online
digit DP is exactly what you expect, it's like backtracking in that it builds an "array" of the current digit prefix in memory and then based on the conditions applies the computed result to all subsequent numbers you can generate with that prefix.
so[1,2,3,4] -> [1,2,3,4,1], [1,2,3,4,2], [1,2,3,4,3] ... etc
//if state is true at prefix [1,2,3,4], then it's true at every following number built off the prefix
let (nextState, numsMadeFromPrefix) = dp(idx + 1)
totalState += nextState + (isStateValidAtPrefix * numsMadeFromPrefix)
totalCount += numsMadeFromPrefix
maybe I should've gone into healthcare instead of computer science
>>
>>
>>
File: 1772858434135144.png (671.7 KB)
>>108995877
we should all aspire for greatness, for greatness's sake.
>>
>>
>>
File: 1767086269395134.png (100.5 KB)
>>108993808
those who know:
>>
>>
>>
>>
>>
>>
>>108996046
Sure, at the top of my head:
Caching (optimization, aligning addresses to word size)
Bit twiddling hacks, (packing when necessary)
Trampolining code
Callbacks
Low overhead vs high overhead thinking (invoke syscall directly)
>>
>>
File: 1753309857337640.png (140.6 KB)
https://leetcode.com/problems/create-binary-tree-from-descriptions/
>>
>>
>>108996101
Most of that is handled by the compiler or not used directly in code. Only thing I missed on was SIMD which is fairs (as a concept).
>ABI limitations
Be specific here. You read the manuals for that, eg System V or Windows ABI.
>no allocation grouping
>no implementation limitations inherited from interface limitations
Already inferred that via mentioning invoking syscall instead of c lib wrappers.
>But you didn’t mention a memory pool or arena!
Well, allocation is smart on linux/unix, and brk or sbrk already implements an arena. You can always implement ur own in Windows via relevant win/ntapi.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
File: 1780803992173339.png (59.7 KB)
>>108996701
>>
>>
>>
>>
>>
>>
File: rcKbt9my_WI-HD.jpg (65.3 KB)
>>108996745
https://www.youtube.com/watch?v=rcKbt9my_WI
>>
>>108996768
>famawii
I prefer Dawkness
https://www.youtube.com/watch?v=PVYP4Ygqnyk
>>
>>
File: e0CvSsmLW-E-SD.jpg (26.2 KB)
>>108996776
Are you paying attention?
>>
>>
>>
>>108996849
Zero bit.
https://lock.cmpxchg8b.com/zenbleed.html
>>
>>
>>
>>
>>108997165
Make a gay one called "Gay Juice" and charge a dollar for it and laugh at people secretly who by it while it creatively insults them with "Turn that straight water gay, Queen!" or some shit like that.
>>
>>
>>
>>
>>108997329
>he doesn't know
>>108953728
>>
>>
>>
>>108997341
I mean... Let me put it this way, if you are the type of person who downloads a whole app just to track water instead of a fitness app or a calorie tracker instead, there is something actually wrong with you. So it makes sense that they would have ADHD or autism, did you know that autism is actually way more likely to be comorbid than depression, so most likely if you have autism you also have adhd and if you have adhd you also most likely have autism. On top of depression and either the inability to read, focus, or dyscalcula.
>I have dyscalcula and its actually painful, I got dressed down in front of everyone at work because I kept on putting March as May and May as March on my spreadsheet.
>>
>>
>>
>>
File: just_use_the_llm.png (56.0 KB)
>>108997379
Mate.
Just use the LLM.
>>
>>
File: 1701769604053107.gif (1005.1 KB)
>>108997383
... wha?
>>
>>
>>
File: 1780813525629210.png (12.2 KB)
>>108997351
Alternating to ensure I trip over this at least once.
>>
>>
>>
>>
>>
>>108997490
Oh you don't SAY.
>>108953871
>context window of less than three posts
>>
>>108997389
uh, i never heard about that.
I told so many therapists, that when I was a kid people would always say "oh anon is talking so much again" and then SUDDENLY I became the kid that never talks.
Maybe that is some shit that explains this.
I can talk comfortably when I have a goal or like a human, but usually I dont talk
>>
File: mpv-shot0001.jpg (104.7 KB)
>>108958400
Only saw you (You) now. Here's the video:
https://litter.catbox.moe/v8ft6vrpqv70e6ho.mkv
> 2017-04-30T00_01_00+00_00 - TempleOS - Hardest Question in Programming (tBQ69ZnuMbc).mkv
https://i.4cdn.org/wsg/1780815259619326.webm" target="_blank">https://i.4cdn.org/wsg/1780815259619326.webm
>>
>>
>>108997545
you went to the wrong forum >>>/reddit/
>>
>>
>>
File: 1780817054472218.png (131.1 KB)
I got AI to have a look at this.
It said I need to use 64 bit registers for pointers because if my system is using more than 4gb at the time the upper bytes of the memory address will get truncated.
Using the 8 bit register is fine for reads, in fact ideal.
It thinks that me letting sarcasm: fall through is bad, I disagree.
I am using rax for read because I am adding it to a 64 bit register.
It tried to say my jle jump was wrong, I disagree.
>>
File: 1780817321407657.png (48.4 KB)
>>108997685
The fall through.
>>
>>
>>108997685
I don't think it's correct about the jle, because while it's true it might process a 0 or newline what if a read chunk ends half way through a line?
There is no guarantee the last byte in the buffer wont need to be processed.
>>
anon, I have become disillusioned. for over 25 years now I was in love with programming, even had a career in it, made good money. the advent of AI tools however broke me. the past days I have been playing with a local LLM and gave it tasks I was too lazy to work on for personal projects. I produce a prompt in the morning and leave my computer to do other chores around the house, do my physical exercises, plan the day, care for the kids. I check back every now and then to see how far the AI got or if it got stuck somewhere. with the right setup I have made myself obsolete. or rather, I have turned myself into a supervisor that only exists to check the changes for correctness. so I guess it helps understanding what the machine produced and I'm nowhere near a "vibe-code" level of code output. but it still feels weird. I can't imagine myself in a job in this field anymore.
>>
File: 1780818702619816.png (16.6 KB)
>>108997767
No one is forcing you to use the AI. All it does is copy and paste from the internet, it has no ability to reason or understanding of logic.
>>
>>108997803
maybe you misunderstood. I know that no one is forcing me to use AI, however this entire field as a profession is moving ahead with AI in it's toolbox, whether I want it or not. and corpos will cut you off if your performance is much worse than someone who uses AI. that's just the logical step for a profit oriented enterprise. I guess it just reminded me of a few years ago when JS frameworks were barely a thing and "handmade" websites were still something you could be proud of. this quickly turned into a question of "who cares if it was made by hand or compiled through a framework" and they were right, no one cares as long as the website does what it's supposed to do. same will be true for AI. nobody will care if your code was written by hand or by a machine. maybe I'm just melancholic, I don't know. ignore my rambling.
>>
File: 1681093678283027.png (747.0 KB)
>>108997683
As well it should
>>
>>
>>
>>
>>108997835
I mean the recent price hike for tokens already showed me that a lot of people got oneshotted because their AI assistance ran out of fuel only two days into the month. maybe you're right, time will tell. but so far it just feels like a genuine killjoy to be in this field.
>>
>>
File: 1780819916384249.png (52.1 KB)
>>108997864
What do I do here then?
rdi is a 64bit memory address.
>>
File: win32u_dll.png (31.0 KB)
>>108997899
... how much more obvious do I have to make that I'm specifically talking about line 24? I don't care about your
>add rdi,rax.
, that's taken care of by your syscall. I talk about before that - like, do you REALLY expect to ever go into the 4 billion range? Like, not even win32u.dll manages to get to 10K, and they're trying really fucking hard.
>>
File: 1780820776458976.png (131.4 KB)
>>108997937
Are you fucking retarded?
>>
>>
File: pepe-rocking.jpg (63.1 KB)
Ok, I am sorry to disappoint you guys, but the AI fuzz every motherfucking day is killing me. I can't stand this anymore.
I'll try to not use the internet anymore for a few weeks, hopefully months. Will try to reduce it to the bare minimum as in information fetching.
Ok thank you for reading my blog post. Wish me luck!! Do not forget to share like and subscribe
>>
>>
>>
File: razzle.png (40.1 KB)
>>108998251
>razzel dazzel
Now THAT'S a term I haven't heard in a looong time.
>>
File: 1770158246918912.png (801.5 KB)
>>108995931
>those who know:
>>
>>
>>
>>
>>
>>
>he fell for the assembly meme
Feels good to be a two digits IQ high level dev, free from the burden of knowledge.
I'm gonna do things on the heap, then copy that to the stack, and back to somewhere else on the heap without even knowing I did all that and I WILL be happy.
>>
>vibecode general nothing but good vibes and funny jokes
>programming general is full of depression and doomers lamenting about the life they once had
oof, the gatekeepers of coding are finally getting their just desserts
>>
>>
>>109000034
I asked a couple programming questions in here and no one answered it, I went to the vibe coding general and they all spat on me because I didn't want to ask an AI, so I just sit here and shitpost because when I actually try to get help I get ignored.
>>
>>
>>
>>
>>109000575
>Bash has nothing to do with javascript
Bash can actually start node.js environments the problem is, I don't understand how to get bash to then hand the script to node.js, it can boot the env then just sits there.
>>
>>109000583
>I don't understand how to get bash to then hand the script to node.js, it can boot the env then just sits there.
wait you mean you asked that question here nobody answered then you asked in the ai thread and nobody answered and then you just gave up and you still dont know the answer
>>
>>
>>109000621
I asked the question here an no one answered me.
I asked in the AI thread and they told me to pay 20 bucks for claude and I didn't want to do that so I went and asked gemini on the google search bar and it told me like 3 different solutions and none of them worked so I reset it and asked again and it gave me 3 separate solutions that also didn't work.
I went and started to do my own research then life got in the way and I started to do a lot of overtime at work and now here I am. First 2 day weekend I had in a month and I spent all yesterday basically cleaning my place, doing laundry, you know, chores you need to do to be able to function at work and after work.
>>
>>
>>109000652
https://nodejs.org/learn/command-line/run-nodejs-scripts-from-the-comm and-line
?
>>
>>
Anyone know why when I'm programming I keep tapping my foot, grabbing my shoulder, grabbing the back of my neck, turning from side to side on my chair. Is this normal? What's the solution to fixing this? No matter how often I program or how long I program in a day it never goes away.
>>
>>
>>
>>108999949
Yeah, we all know you're an autist who prioritizes his own intellectual curiosity.
And then they wonder why normies want all autists dead.
>>109001061
ADHD?
>>
>>
>>
>>
>>
File: 1754308051812574.png (125.6 KB)
I know Python and Java deeply from work and school
I can bullshit my way through JavaScript/TypeScript especially with AI
Should I focus on Go?
Built a Go microservice for work, hasn't been hooked up to prod or anything. Kinda cargo culting it rn, since at my previous jobs I saw multiple teams converting legacy Java to Go
>>
>>109002057
>having to go through the strings thrice
Come on now.
>>109002076
>autist having problems with relatively normal human interactions
Come on now.
>>
>>
>>
>>
File: 1780867468536537.png (65.3 KB)
>>109002057
Nice, only 1 million CPU instructions per word. Very efficient.
>>
>>
>>109002255
>>109002284
>autism
>>109002378
Nah, ADHD can be treated without a bullet to the head. And even if not, ADHDs actually draw people towards them.
>>
File: candy_crush.png (70.9 KB)
>>108996103
that one was pretty easy. you can just loop through it all updating a hashmap. I thought finding the root node would have some cool trick, but it was literally just a set. did you try the candy crush one? I liked that one, but one I got tripped up and did a flood fill remove, but its actually just a vertical / horizontal remove. I wonder if that's how candy crush actually works. I guess you'd get longer combos that way.
>>
File: tenor-2147721760.gif (2.9 MB)
>>109002522
oh ya actually candy crush looks like its DEFINITELY a flood fill. damn it leet code!
>>
>>
>>
>>
{
Display *dpy = XOpenDisplay(NULL);
if (!dpy)
return 1;
Window root = DefaultRootWindow(dpy);
for (;;sleep(1)){
char status[400];
status[0] = '\0';
char module_output[100];
char formatted_block[150];
size_t num_blocks = sizeof(blocks) / sizeof(blocks[0]);
for (size_t i = 0; i < num_blocks; i++) {
blocks[i].func(module_output);
snprintf(formatted_block, sizeof(formatted_block), blocks[i].format,
module_output);
strcat(status, formatted_block);
}
XStoreName(dpy, root, status);
XFlush(dpy);
}
XCloseDisplay(dpy);
return 0;
}
this is a simple bar for my dwm setup with couple of modules
does refreshing this thing every second hurts the cpu/ram whatever? in htop it uses less than 1% of cpu and pretty much 0 ram, but it seems kinda retarded to do this every second (some of the modules require this)
should I take a different approach?
>>
>>
>>
>>
>>
>>
>>109003142
Hold on, you asked
>does refreshing this thing every second hurts the cpu/ram whatever?
Opening and closing the connection is relatively expensive (requires opening and closing a UNIX socket and going a handshake), doing a display update is *relatively* cheap. If it just runs once - yeah, whatever.
>>
File: 1775223511153978.png (89.7 KB)
changelog:
>rewrote the view with all the entries from a list to manually defined row structs (scrolls smoother, less bullshit from apple)
>added a shadow to the tableview
>working on push notifications (the app WILL remind you to drink water every 3 hours)
>let the user set their daily goal manually in the settings
>>
>>
>>
>>
>>
I'd like to capture the value of __COUNTER__ in a macro by expanding it but I'm not super great at c preprocessor hacks
anyone know what I'm doing wrong here? maybe you just can't use __COUNTER__ this way#include <stdio.h>
#define expand__(A) A
#define expand(A) expand__(A)
#define FOO expand(__COUNTER__)
int main() {
printf("%d\n", FOO);
printf("%d\n", FOO);
printf("%d\n", FOO);
return (0);
}
output is0
1
2
and I would really like it to be0
0
0
>>
File: dunkru.gif (21.6 KB)
>>108994359
>>
>>
>>
>>
File: 1780900120532507.png (12.7 KB)
>>109004910
bwhahahahaha holy fucking slop.