[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / 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]


[Advertise on 4chan]


File: kernighan-razor.jpg (73 KB, 850x400)
73 KB JPG
What are you working on, /g/?

Previous thread : >>110240502
>>
SML > ocaml
>>
>>110323240
'looks quirky
kinda makes me think of lua, superfifically
>>
It's dead, there is no point in learning to program anymore.
It's over.
>>
File: 1794485813372171.gif (1.04 MB, 2700x2100)
1.04 MB GIF
>>110323360
why are fags like you still not banned? jannies tongue my anus
>>
>>110323360
programming is more important than ever
its one of the last jobs that are gonna get automated away

the next frontier is robotics
its virgin lands

but feel free to go sit in the corner and let yourself die like a faggot
>>
>>110323435
Fable 5.2 could one-shot a CAD armature for a weed-killing robot and the PCB and software to control it in about 5 hours and then send it off to be manufactured.

Meatbags can assemble it I guess.
>>
File: clin-d-oeil.jpg (50 KB, 500x554)
50 KB JPG
>>110323553
a) source: anthropic
b) you need the idea, the niche
c) you need to verify the output
d) you need to consider the viability i/r costs
e) hallucinations, alignment
f) unoptimized code, probably the same same with pcb
etc etc etc

and if it was as rosey as you say it is
having deep knowledge about the tech youre working with is whats gonna make the difference bw a viable product and a vibeslopped amateur toy
>>
>>110323435
Have you been living under a rock for the past 2 years? AI can write better code than any human, it can also do it 1000x faster.
>>
>>110323417
why do you live in the past? jannies move this man to the asylum
>>
File: je-C-us-sed.png (2.14 MB, 750x1720)
2.14 MB PNG
>>110323653
no, thats what reddit says
the truth is that the code is unoptimized and quite sloppy
https://www.youtube.com/watch?v=lZoS1tr8Cik

there just exist certain limitations inherent to the tech which make llms perform the way they do

its all based on semantic analysis
the llm creates a "plan" in relation with the request
then expands upon each step until it gets down to the implementation

but it doesnt have a global overview when its working at the implementation level and so architectural optimizations, the most important ones, one could argue, are beyond its reach and that aint changing anytime soon

and the difference between burning tokens until you hit your limit and turning the slop into a usable whole is your skill at the subject youre working with
>>
File: IMG_8523.gif (23 KB, 550x640)
23 KB GIF
Im a shit tier coder but actually (and unironically) Im starting to enjoy the process of working on it random website project (Java Spring Boot BE - Typescript/React FE) especially the design part is quite enjoyable
But does it even make sense to keep immersing myself into it or shouldnt I even bother with the powerful clankers around?
>>
>>110323417
If you'd ban all AI fags, then I would be the only person left on this board :(
>>
>>110323769
>But does it even make sense
Does fun make sense to you?
>>
File: ram-altman-3.jpg (1.16 MB, 1672x941)
1.16 MB JPG
>>110323769
on one hand, you get better through experience
on another your domain is the most vulnerable because of the amount of code and the high level of abstraction of webstuff, the high level of standardization of backend

its more stuff like writing api's, servers in highly optimized c/++/rust that would be where the clankers fail, and will most likely continue to fail

otherwise, id expect- firmware, esp for exotic stuff, RTOS's, HPC, game engines, scientific computing
everywhere where one needs actually optimized code

i'd argue
the actually interesting stuff of programming
>>
>>110323769
>(Java Spring Boot BE - Typescript/React FE)
Jesus Christ at least pick a fun stack if you're going to do useless shit like learn web design in 2026.
>>
File: IMG_8524.jpg (29 KB, 465x279)
29 KB JPG
>>110323781
The boomers at my company keep saying that its a waste of time and I should use my spare (time) to git gud at SAP and basically become a SAP salesman (one even gave me a book)
But I would like to be able to at least make website that doesnt look and feel like the countless generic claude design ones
>>110323821
So prop actually the stuff for more experienced ones, sad that I missed the golden web/app boom during early-mid 2010s
>>
>>110323890
You have to decide if you want to have fun in your free time or if you want to hustle at any price just to earn 2 more shekels
>>
File: thumbs-up.jpg (14 KB, 250x203)
14 KB JPG
>>110323890
>sad that I missed the golden web/app boom during early-mid 2010s
yeah but thats why i mentioned experience
plus the webapp boom was mostly so you got into adult daycare. you still needed vc money behind you to make money out of em

but its not over.
theres a trick to improve the output quality and the token costs of the shatbot
you feed it pseudocode so that it has points to "anchor" into, and build around
and the closer to implementation-level your pseudo-code will be, the less generation the shatbot will have to do
and the closer the code will be to your expectations
its kinda mathematical

so even in a heavily automated domain like frontend, you still benefit from raw experience
>>
>>110323890
>>110323953 cont.
and, ofc, you will never be among "the more experienced ones"
if you dont acquire experience of your own

1000 mile journeys staring with one step and such
>>
speaking of experience and things that could be entirely left to shatbots:
im upgrading the makefiles of my codebase

my codebase thenceforth has versioning! (it was about time) (i have yet to write a part that would iterate through all my projects and take snapshots if appropriate)
im taking a break though
i most def need coffee
>>
<tfw
I could just do stuff, but I don't do stuff. How2dostuff?
>>
>>110324848
iuno
in my case i go from point a to point b
i want something, programming is the tool to get there, then i plot a course, and go, one step at a time

although
if you cant find motivation, maybe you should start with smaller projects, just to get back in the habit of doing stuff

its a self reinforcing loop in each direction
doing nothing demotivates you while doing stuff does the opposite
>>
>>110324848
Haskell.
>>
>>110324928
>go, one step at a time
yes.
This morning I had great ideas how to do something step by step.
But now I forgot the exact steps and then I thought I could also do this other project. But no concrete plans exist for both.
So maybe i should do le kanban meme
>>
>>110324978
sure, why not
at least theres gonna be a trace of your thoughts in case you want to come back to something you were pondering earlier
>>
old adobe keygen because why not
>>
>>110325210
kek. based
>>
>>110323553
Most expensive and inefficient way to control weeds.

In the jewish owned west we spray cancerous chemicals on our crops while in China they use ducks to control weeds and pests AND then eat the ducks.
>>
>>110327025
Ducks are fucking delicious
>>
Still thinking about that floating point thing from the other day.
So if you want to know what the absolute minimal step you can take with a float is you do:
x = log2(f);
dx = pow(2, ceil(x)) - pow(2, floor(x)) / pow(2, 23)

So if you have the distance from the earth in meters to the sun you're trapped in buckets 16km big.
But if you use doubles you have it to within fractions of a millimeter.
>>
>>110323435
Doesnt matter, managers arent hiring
They'll use ai as an excuse to not hire people
>>
File: gimb-n.png (50 KB, 602x398)
50 KB PNG
>>110329717
>They'll use ai as an excuse to not hire people
they *use ai as an excuse to not hire people, because they delocalize to india since 2023 already
present tense.

and im not talking about tech in the optic of getting hired
that train sailed in 2020 or whatever the kids say these days
with the coofid recession and whatnot

no, im talking about tech in the optic of dogfooding it to make your life better, or creating solutions then selling them directly
fuck wageslaving, even if it was still an option
its a temporary one at best

maybe i misspoke when i said programming will be among the last jobs to get replaced
i should have said that prog. will be one of the last *trades/skills to get *obsoleted
>>
>>110323630
>having deep knowledge about the tech
the thing is those frontier models are getting closer and closer to deep knowledge territory.
also they can look up some shit online easy peasy
>>
Don't mind me, just testing some vp9 0-days.
>>
Starting something is always the hardest part and I'm not sure why
>>
File: ram-altman-plis-gibbe.png (1.89 MB, 1774x887)
1.89 MB PNG
>>110329817
there just exist certain limitations inherent to the tech which make llms perform the way they do
>>110323729
the llms dont approach deep knowledge territory because llms have no concept of "knowledge"

they have constellations of tokens that map to eachother
definitions connected to terms and such, descriptions

but you could talk about an optimization technique and the shatbot would completely forget about it in the next prompt
because you didnt evoke it verbatim in the current context

in short: a chatbot can regurtitate information allright
even obscure facts
but its application depends entirely on its statistical significance in the current context, not its pertinence to the task at hand
>>
>>110329830
its some kind of buffer overflow exploit or something?
>>
>>110329830
lol wtf
>>
>>110329914
Nah just testing how big video can I decode in browser and if I can use this to omit 4chan webm resolution limit (I can)
>>
>>110329981
kek. based
the preview is gonna get messed up, no?
>>
>>110329981
bro wtf
since when can videos change size like that?
>>
File: satania.webm (3.7 MB, 512x512)
3.7 MB
3.7 MB WEBM
>>110330008
Thumbnail is generated from the first frame it seems. You can use small first frame and then follow it with frames as big as you want. However browser codecs seem to give up over ~12000x12000 per frame.
>>
>>110330125
kino
>>
>>110330125
Firefox's codec seems to just fail
Chromium just works
Clover displays the first frame for the entire duration
mpv flashes in purple probably because it can't handle framebuffer this big if floating, it works fine if maximized.

>>110330040
vp9 can just contain frames of whatever size, they do not need to match the webm metadata.
>>
File: mpv-abuse.png (496 KB, 1200x1200)
496 KB PNG
>>110330179
>t. hold still, its for science
>>
What are some use cases of pointers outside of dynamic memory?
>>
>>110330582
RSP
>>
>>110330582
In C, arrays and pointers are so tightly connected to each other, asking what a pointer is good for is like asking what an array is good for.
But it's also a massive noob mistake to think they're actually the same thing.
>>
>>110330582
calling functions
>>
>>110330582
galaxybrain shit like this
https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code

also for referencing variables in other places when your language doesn't have actual reference types, like when you need to reinvent OOP
>>
This general is dead, programming is dead. IT'S OVER!
>>
Programming thought of the day:
There is no point in sweating over nanoseconds/individual CPU instructions for applications that spend most of their time idling/waiting for input, and waking up and processing user input into output takes shorter than half a second. It's better to improve or enhance functionality instead.
Worry about performance only when the delay is long enough to start causing irritation for the users (not just your autistic perfectionism).
>but the latency will only scale up
Worry about it when it actually scales up with either more users, more real data or more parallel processes. Only when you know what actually got sized up you can properly optimize performance.
>>
>>110330582
Pointers to stack memory
Pointers to static memory
Pointers to shared memory
>>
>>110330582
Pointers to functions
Pointers to JIT code
>>
File: scrn_20261114_052014.png (4 KB, 640x480)
4 KB PNG
I made it. I am finally a bit productive again.
Started to implement an expression parser for my assembler, to make usage a bit more comfy.
Now just need to eval that and then put it into its place.

Am I retarded or is this how everyone is koding:
I have a hard time writing stuff from my memory. So I just look stuff up where I have it done previously and (depending on how hard it needs to be modified) I type it from there or just copy paste hard and change the needed bits. Is this how coding works?
I always think I could implement stuff from memory, and I probably could, but that's hard and not fun
>>
>>110333158
>premature optimization is the root of all ebin

>>110333399
isnt it how learning functons?
i have a whole folder i called "fizzbuzz" where i test out ideas before using them in my code
>>
>>110333535
>isnt it how learning functons?
Maybe. Le influencers seem to pretend you have to know everything by memory
>>
>>110333561
if le influencers were half as good as they pretend to be they would be shipping products, not grifting on social media

same goes for the ai-lmaoo boosters.
>ai is so great, its made me 10e6 times more efficient
>>ok, then where are your products
>err, ummm...
>>
>>110333613
>>>ok, then where are your products
>>err, ummm...
They have lots of scam products.
The same scam products as before, but shiny, so normies fall for them easier
>>
>>110333623
well, their grift is a product, for starters
but i guess theres tiers among grifters
usually the influencer-type i know of is some fag whos been serving coffe and cleaning offices at google and whatnot then afterwards they improvise themselves oracles for all things computing
>>
>>110333535
>>premature optimization is the root of all ebil
correct, but even when it's not premature, just optimizing blindly (without profiling first) is bad
>>
>>110333672
sure. it makes no sense to optimize a piece of code that accounts for 0.01% of one's code's runtime
something something amdahl's law
>>
File: whoops.mp4 (483 KB, 1000x1000)
483 KB
483 KB MP4
i think my cube's rotating in the wrong dimension
>>
>>110333535
>writing fn_print(int instead of fn_print_int( to save 1 char and waste preprocessor cycles on nothing
>>
>>110323145
Stupid quote.
>>
>>110333831
its a proof of concept.
i wrote that years ago, as a result of a discussion about c's (lack of) features

>>110333803
maybe the real rotation was the friends we made along the way...
>>
>>110333862
why do you think so?
>>
>>110333891
And what feature does that give you other than the illusion of readability?
You can't call C++ mangled things, you can confuse language servers, you aren't even reusing _Generic.
The point of generics is automated code generation, not name mangling.
>>
Are these book written by people who have never coded?
>>
File: wojak-shrug.jpg (44 KB, 820x519)
44 KB JPG
>>110333942
iono. i havent found a usecase for it in my code
it *is* something you can do, though
>>
>>110334034
kek
(trying) to read your picrel made me realize i dint have my morning coffee yet
>>
>>110334034>>110334126
What's wrong with it? The solution is wrong because it'll give you a segfault, but the question has a soluton. You don't need to go to the garbage address to check if it's in S, just check if it's between S and S + end. No dereferencing required.
The only problem is the garbage value could point to S by chance. That can also be fixed by including the key in S. So, if the key matches, it's fine, otherwise it's garbage.
>>
>>110334276
this is so baaad
either S is a linked list and then checking if it contains the mirror pointer to A[x] doesnt happen in O(1), since you have to traverse it
or its an array and then you have to resize it which also breaks O(1).

however, im affraid storing the key in S(y) doesnt solve the problem
its basically what they envisioned with saving a pointer to A(x) in S(y) and a pointer to S(y) in A(x) (should be S(x) and A(x). imho even their naming convention is ass)

its quite improbable its still possible that either a valid pointer, or a valid key can exist in ram, in the right place to fool the system. if its supposed ot be solved in O(1) that is.
or S is indeed supposed to be a linked list but then O(1) flies out of the window

something something teachers being failed academics and vandalizing your local school is actually public service
>>
File: emlti solver.png (103 KB, 716x769)
103 KB PNG
I wish I was smart enough to make sense of pic related
>>
>>110334654
its not a matter of being smart
its a matter of being motivated enough to learn the language
and im not.

what is this? formal proofing?
>>
>what is this? formal proofing?
nvm
>constraint solver

mathbois should get euthanized with heavy, blunt objects, preferably
they mastered the art of taking something simple, sometimes trivial even
and turning it into autism so intense that it bleeds into adjascent, parallel dimensions
>>
>>110334668
The essence of ML type inference. It's about reducing ML type inference problems to constraint solving, and I'm having a hard time understanding why generalization works and how to translate that to actual code.
>>
>>110334756
o7
i salute your efforts

but these are depths of madness even i dare not to venture into
>>
>>110323145
Minecraft clone with one original feature in the engine. Also it will be decentralized so players can't get banned for racism.
>>
>>110334775
kino.
racism is the salt of life some might say

make sure to post your progress
>>
>>110334034
Something something bloom filter something something checksum. Ez.
>>
>>110334654
>SUC
>SEX
Pure goonslop.
>>
>>110334950
if this board is anything to go by
alot of nerds do indeed feel lonely...
>>
>>110333535
Why aren’t you using CMake Tools?
>>
>>110335430
i dont like learning tools
and i was forced to work with make at school, so thats what i stuck with
plus: since its more or less an industry standard i dont really have a reason to move away from it

also, once you get passed its autistic parts, its actually decently comfy

<heres all it took to implement a versioning system into my makefiles
and half of it is related to other functions like getting the sources of the libs i include as opposed to re-compiling the whole shebang

almost. i still need fix the cp Makefile line where ill be copying a different makefile into the packaged code, and add a sed where ill replace some tokens with the compiler, lib flags im using on my end
(bc i suspect you dont have a lib_extractor binary on your end, or environment variables that would tell you where my libs are... which you dont even have on your computer. hopefully.)
>>
>>110335430
>>110335681
actually
SRC_PATHS and SRC_FILES dont even come into play

and in the recipe i could remove the echo's
so thats 3 locs less than whats shown
>>
>so thats 3 locs less than whats shown
*4
holy shit ive slept badly tonight
no programming today for me, no siree. im pefectly useless.
i need a good night sleep

pops' kinda annoying with his renovations
fucks up my sleep schedule
he wakes me up at noon when ive been sleeping for 3-4 hours max
then 6-8 hours of renovation
then now, 8 pm, my batteries are completely drained, cant even count to 4
fkn, we cant finish soon enough
>>
>>110335681
>:=
thank you gnusister
>>
>>110335890
im not sure for what
but youre welcome, i guess

the walrus operator just means that you want the assignment operator to work like in any other language, no?
as in: evaluate at the moment of assignment, no?

if im to be completely honest its a left-over from my time at school
everyone did things this way, and i havent given it much thought since...

slight tangent: the school was s42. it was an interesting experience.
its a peer learning school for high iq ne'er do wells and the selection mechanism is pretty simple:
if you can survive the tempo, youre in
and while you had to explain the rest of the code, and it was getting tested by students more advanced than you
we just copied eachother's makefiles because absorbing that level of autism, at the same time as learning c, and learning to keep ones ducks in a row in that lang was just too much

completely accepted btw. it was expected that you develop, use your softskills to survive.
like i said, interesting experience. too bad coofid hit and it kinda destroyed the whole peer-learning principle when i was a student there
>>
I wanted to write a simple sorting program to compare values in two csv files and realized that over the past year I lost pretty much all my programming knowledge, for C++, Python, and Java. I think I need to take rigorous courses and get back to where I was before. Despair just mined out my goddamn brain.
>>
>>110335974
'been there too
you will be surprised by how much you actually remember once you get back into the saddle

its just that this information isnt immediately available to you, because thats how your brain's optimization works
kinda like memory/storage tiers in a computer
>>
>>110335974
my man just use AI to write the first 80% of it
>>
>>110335998
you do you but thats fucking retarded
esp in a situation of already existing skill erosion
>>
>>110336009
well i guess you can just continue bawwing in here about it instead of doing literally anything else then
>>
>>110336103
im not sure what you meant
what im saying is that the spirit is an edge
and you should keep it sharp

and and overreliance on shatbots- dulls it

now what if you start with a dull edge
how dulling it even further would help it become sharp again???
>>
>>110336103
>>110336129 cont.
inb4 quantum physics equivalent in mental gymnastics
have you ever sharpened a knife by hand?
its unironically an experience thats gonna make you grow as a person
>>
>go back from TempleOS to FPGA design
>it all just takes soooooo fucking long
holy damn. Even just synthesizing a simple sketch.
Maybe I should be a full time temple employee
>>
>>110336176
themplejobs are gone
theyve all been outsourced to hindia

on a more serious note-
youre the templefag who ports holy c to arm, no?
how bout you build a macro-fpga so that you dont have to deal with the tedium anymore? (if applicable)
that kinda sounds like a problem you have already half-solved...
>>
>>110336129
>>110336151
you are getting completely bent out of shape from one fucking sentence.

i was in a similar situation not too long ago. got laid off and i did absolutely nothing related to coding for months. when i had to get back into it, i felt incredible anxiety from feeling like i had "lost it". i eventually realized i just needed to get back into it no matter what it is, no matter how small the project. the first step is always the hardest. get AI to perform a good chunk of whatever it is you wanted to build then do the rest yourself. you just need to be doing *something* other than hemming and hawing over the situation.

and if you're this worried about AI, you're in the wrong industry. you should know by now that it's not going away and you should learn how to live with it rather than fear it.
>>
>macro-fpga
*macro vhdl/verilog

i am slightly drunk, i will sound retarded from now on
>>
>>110336202
im not worried about ai
in fact, shatbots are anklebiters for me
they just cant fucking compete. i do HPC, and this is what i do
my code competes with the absolute best implementations there exist

but ive been through ice, and fire
and yes, if youve been down enough, you have to rebuild everything
but not from scratch

youre like- a young, new civilisation recycling old, barely understood archao-tech from times passed
you have the templates.
what you need is just to connect the dots

your brain, at the personal scale, works exactly the same way
you have neuronal pathways that decay with time
and get revived with use

>b-but dont use em becoz ai-lmaoo

like i said
you do you.
but ill call you a retard and its something you've done to yourself, yourself
>>
File: GateMateA1-EVB.jpg (48 KB, 540x540)
48 KB JPG
>>110336198
>youre the templefag who ports holy c to arm, no?
I wanted to port holyc to risc-v, but turns out writing compilers is hard. Maybe I'll go on soon (tm).
What do you mean with macro-fpga?
I do have a second fpga that runs a simple risc-v cpu and the goal is to build a computer out of it one day.
It only has 8MiB of PSRAM tho. I might have to upgrade it someday.

But I am also the clock faggot and I need to get the clock sorted for next year, because otherwise it's bothering me all the fucking time. There is a lot of clusterfuck that has to be cleaned
>>
>>110336282
>There is a lot of clusterfuck that has to be cleaned
thats the life-story of all tinkerers i guess

>What do you mean with macro-fpga?
i didnt get into verilog/vhdl
but if i were to write asm
id build myself a micro-compiler

this comes from the experience of composing kernels in opanclC as an optimisation measure
dont mind the namedrop, its just c, but mildly asynchronous
io_uring is more complicated to get right than writing kernels in opencl

but where im getting at, is:
why dont you compose (transpile) code from a higher level?
(idk, just a thought. ive done it. its not that hard. its more boring than hard.)
>>
>>110336240
i'm not reading all that. and i actually recognize your posting style now that i think about it. i remember in a ted kaczynski thread you were spouting nothing but schizo drivel in the same disjointed sentence-per-line format. you sound at best unmedicated and in need of medication to be put on.
>>
>(idk, just a thought. ive done it. its not that hard. its more boring than hard.)
its recursive substitutions
"all" you have to do is to come up with a coherent framework (thence my dislike of formalists. here you go, /g/. my full origin story. where i come from, and why i hold the opinions i do)
>>
>>110336352
you have adopted half of that style yourself, though
in fact
i bet your punctuation is an effort to be different
because substituting any and all punctuation that isnt absolutely needed to express the meaning of what youre saying with \n is just that comfy, isnt it?
also it adds cadence to written word
things are actually pretty subtle
>>
>>110336314
>why dont you compose (transpile) code from a higher level?
because I am a faggot that wants things to be unecessarily hard, such that I can keep telling myself what a failure I am
>>
>>110336395
thinking of oneself in terms of being a faggot is indeed comfy

you avoid the responsibility of living up to your potential, then
it is something ive done myself, too
thats how i learned the theory

i might be a fuckup
but im not a retard
and the first thing you should pay attention to, is not committing the same mistakes more times than absolutely necessary (its more than twice. its always more than just fukken twice)
>>
>>110335971
:= is a gnu extension, POSIX simple assignment is ::=
>>
>>110336441
then gnugang represent, ig
gnu is half of loonix after all
and without loonix id be sad and id feel defeated

bc i would have to use fukken w11 or fagOS
>>
btw
>>110336458 (cont)

BSD FAGS
WHEN WILL I BE ABLE TO DO OPENCL ON OPENBSD?
THIS IS THE ONLY THING KEEPING ME ON LOONIX
>>
File: doom.jpg (239 KB, 876x773)
239 KB JPG
>>110336418
That's why my clock project is kinda nice.
It weighs hard on me, but it has a deadline every year in august and I have to deliver to make frens happy.
I try to make it every year a bit better and already won 3 years in a row now. So that's good.
This year I wanted a bit too much and just crammed in everything I could, but in the end I realized I don't need all that fancy stuff, so now I am trying to clean up the mess and make it stupid again
>>
>>110336474
>anchor points
yeah, i think thats the recipe to success
find hard achievements with hard deadlines
and thats how you get stuff done, i think
it works on me, too
and im a very lazy man
>>
>>110336473 cont of cont

BOTH START WITH "OPEN"
THEYRE INHERENTLY COMPATIBLE
>>
>opencl still a namedrop
its fucking easy and now with the shatbots you have 0 excuse not to learn it

i learned ot before the llms became a thing
yeah, then it took ages, and piecing together fragmentary documentation...

but now?
with agentic fukken lookup?

you have no excuse, lads
opencl, or cuda shouldnt be a namerop in tyotl 2026
you can just prompt a fukken shatbot to explain things to you until something clicks

yes, im drunk again
but on the other hand: what are you gonna lose from learning gpgpu?
youre gonna lose exponent -1
youre gonna earn another capability, and a quite serious one...
>>
On my knees begging this guy to put on a trip so I can filter him
>>
>>110336646
no such luck
i will keep mogging you mercilessly until you grow up to my level

look at the industry
wtfs left if not actual craftsmanship
>nah i wanna talk about my ricings
you had a general for that...
and this is dpt.
>>
>>110327025
you vvill eat the ducks
>>
>>110336674
>canard confit
i, for one, really wouldnt mind it
>>
File: koobernetse.png (55 KB, 399x341)
55 KB PNG
canard confit is technology btw
bc cooking is

w/o cooking, aka, external digestion
we couldnt be humans
unironically.
cooking is fundamental to humanity
biology says so, just try to eat raw meat, post results
>>
File: janusz.jpg (100 KB, 750x504)
100 KB JPG
heres another technological hought:
cooking means fire
unless people who brought cooking to autismus levels and do shit like use beef rennet onto milk to make cheese
but these rae exceptions to the rule...

basic fundamentals: we use tech to break down composites into absorbable components
and other than the brain, this is the other half of the success of our species

where does biology end, and technology begin?
bc at a certain point theres no real diff bw both
>>
>>110335681
I use Visual Studio and vscode for C. it seems that even CMake + Ninja in Visual Studio is recommended and faster than their own MSBuild now. I can now work on the same project in both without a hassle just by;
code .
devenv .

The only issue is vscode not running cmake build on save unlike VS, which I think is very neat. Also, their C/C++ extension for Intellisense seems way clunkier and slower than using clangd. I wish I could change but I need my MSVC compiler extensions.
>>
File: sam-altman.jpg (53 KB, 1024x542)
53 KB JPG
>>110337286
>the only issue is...
and then youre in a situation where you cant tailor the thing to your needs
while you have already invested into learning a framework
this is another reason i rather build my own tools than rely on others'

i just do wtfever i want, whenever i want
im a programmatic animal.
complete icnonoclast
and thats the rason i do c bc that lang doesnt care
and if you fuckup its on you
but if you dealwithit you can create wonders
thence ops picrel btw

i think that is a neutral way to talk about c
its a razor.
dont run with it, or its on you
>>
>>110337348
>dont run with it, or its on you
like, honestly
sometimes i wanna hit my head against the wall when i hear people getting filtered by c

because to be indestructible in c
you dont need to be turbo high iq

you just need to be boringly systematical
just follow the lifetimes.
whether its misrepresentation of data
or a double free or out of bounds writes and whatnot

the solution is the same
->kill your thoughts. be macheeen. just fucking follow the lifetimes.

to be good in c you dont need high iq
you need to be a boring fag irl who likes predictability

someone post the meme with wojaks one for each lang

the fat guy? with the notebook, and glasses?
thats c bois.
we like boring.
bc boring means everything is under control (or domination if youre lawful-evil)
>>
but also you need to be comfortable with working without failsafes, kinda like if you were a high rise worker
its a weird overlap but it makes sense
->the people comfortable with risk, because they have a rigid method in dealing with it
>>
>>110337348
>this is another reason i rather build my own tools than rely on others'
So why do you use Microsoft’s editor then?
Why do you use Makefile then?

Nothing stops you from implementing your own, right?

>filtered and doesn’t understand something as easy as CMake lel
>everyone in production uses CMake for serious C/C++ code. Even Linux kernel uses a variant of Make tailored to their own tools
>>
>>110337286
>clunkier and slower than using clangd
Joke's on you. It is clangd under the covers.
>>
>>110337498
This is why you’ve not written anything other than fizzbuzz. Try to scale and you’ll see that your ”own tailored tooling” simply doesn’t hold against production grade tooling.

This is why I use CMake and Ninja with C. And it works perfectly for organizing libraries and code. At some point, you simply move on from plain Makefiles anon.
>>
File: snailcat-laughing.png (1.52 MB, 1254x1254)
1.52 MB PNG
>>110337516
>Nothing stops you from implementing your own, right?
no, nothing oes

i still consider whats rational in my position
kindof
im also a lazyboi
so i consider whats rational biased with the least amount of effort

unironically these traits make me a better programmer, specifically

actually also a better construction worker, being lazy is a transferable skill, kek
>>
>>110337531
>hurr durr
and now im supposed to get defensive, right?

i think ill post a makefile to assert dominans, instead
(vidya in the bg bc i am worthless today, thus i have decreed)
>>
>>110337528
It doesn’t, because clangd doesn’t understand all of MSVCs Intellisense. however, it is way faster and indexes way better.
>>
>>110337555
Nothing special with a Makefile buddy, you can generate those from any modern IDE or Editor. Even longer than yours.
>>
File: smugjak.jpg (31 KB, 500x333)
31 KB JPG
>>110337575
ye i know
but can you build one from scratch?
w/o internet and such
>>
>>110337583
Yes, and I can do it with better integrated tooling as well. It’s called CMake.
>>
>>110337575
>>110337583
actually i dont care
its a meme
>post makefiles to assert dominans
its deliciously abstract and inoffensive
but can also lead to inteeresting discussion
>>
>>110337555
>$(shell find
holy retard
>>
>>110337595
ok
but even tool-wise
i kinda dont care + what are we comparing to begin with
im sure you can invoke shell commands and capture the output in cmake too
so you can do wtfever you want

the real reason i do make is bc i cant be arsed to care enough, kek
>>
>>110337608
why and how to do things better?
>>
>Makefiles
hahahahahaha fuckin software devs.
In the hardware world we have dev environments from the 80s. Checkmate. It just works
>>
>>110337609
>the real reason i do make is bc i cant be arsed to care enough, kek
Skill issue, also because you can’t get to learn and expand your knowledge.
Rust’s build script build.rs gave me a wakeup call as to how modernized some tooling has become by removing a lot of repetetive bolilerplate like with legacy Makefiles.
It really beats Makefile by miles but CMake isn’t that far away, and also requires less lines for achieving the same thing.
>>
>>110337638
CMake + Ninja in VS IDE reruns build on save. I’m happy with that except for their lacking vim emulation.
>>
File: live-doggo-reaction.jpg (73 KB, 612x612)
73 KB JPG
>>110337657
>skill isuue
which i cannot be bc i never even tried ;)
>hurr durr pollute your brain with useless shit you will never use anyways
no fanks
everything is retarded.
id rather keep the retardation i need to absorb to a minimum.

i really fucking hate learning others spaghetti
>>
Is there a way to utilize unassigned variables as random data?
>>
File: 1792353002832875.jpg (87 KB, 1000x871)
87 KB JPG
>>110337638
Shit.
I haven't used libero in so long that I forgot how to start the fucking simulation so that it finds the license for the simulator.
I love proprietary tools
>>
>>110337786
ok that wasn't so hard.
Heil bash scripts in my Dropbox
>>
>>110337734
you meant uninitilialized?
and: in theory, yes
in practice: 95% of the time youre gonna end up with the value 0, it has no practical worth even if it is kinda random
>>
>>110323240
>SML
which implementation?
>>
File: IMG_20261115_014717_476.jpg (1.52 MB, 2268x3025)
1.52 MB JPG
>>110337812
back in the game with an almost clean driver.
Just one led is faulty (the white led that's not really visible).
Now I just gotta sleep about it, if I want to stay on linux or if I want bare metal kiss action
>>
>>110338067
woopsiedoodles. I think i know where that white led comes from :^)
    type mem16_t is array(natural range<>) of std_logic_vector(15 downto 0);
signal mem_data: mem16_t(0 to PIXEL_COUNT-1) := (
x"ffff",
others => (others => '0'));
>>
If realloc fails in this instance, does it cause a memory leak?
ptr = realloc(ptr, sizeof(int) * 10);
>>
>>110338130
https://linux.die.net/man/3/realloc
> If realloc() fails the original block is left untouched; it is not freed or moved.
>>
>>110338312
Wouldn't it set ptr to NULL though?
>>
>>110338479
>intentionally overwrite a pointer
>herp derp is this a memory leak
>>
>>110338556
Isn't that generally how it goes? kek
>>
>>110338616
No? I mean why should we assume you are a fucking idiot and dont have a copy of the pointer somewhere else? Unles...
>>
>>110337734
As the other guy said, it's usually 0 or otherwise fairly predictable.

If you're using an operating system with ASLR, you can use things like the address of a variable or even main itself as a cheap source of randomness.
On its own, it's probably not something you really want to rely on as the seed for a PRNG, but just use it in conjunction with other stuff (like time), it's not like it'll make it worse.
>>
>>110334603
You don't have to resize the array. Just put nil in the pointer inside stack. That shows the key was used, but the data has been deleted. It just werks. The book literally says to use a stack, the answer is by a mathie which is the problem.

>>110334937
What?
>>
>>110338067
>went to bed at 2AM
>woke up at 6AM desperate for fpga koding
holy shit. I forgot about that feel. Maybe that's the thing I want to pursue.
feels good
>>
>>110339726
baste
>>
File: 1786995132005145.png (2.58 MB, 1510x2000)
2.58 MB PNG
>>110337638
Makefiles are perfectly adequate for small to mid-sized projects provided you don't care about deploying on Windows.
>>
>>110339707
when sizing down- sure
but what happens when sizing up?

and if the assignment is that there exists an array large enough for all the keys in the sense of- all the keys that are possible, not all the keys currently in use

why even bother with the additional machinery? just bulid an array of structures and call it a day
>>
File: 1777972687644498.jpg (91 KB, 740x555)
91 KB JPG
>>110334034
>Fancy algorithms are buggier than simple ones, and they're much harder to implement. Use simple algorithms as well as simple data structures.
>>
>>110334654
Just because something is deliberately made to look complex doesn't mean it's worth learning, let alone being useful.
>>
>>110340964
cute consolegf
have a you
>>
>>110331523
You don't need pointer for that
>>
File: something-else.jpg (85 KB, 786x422)
85 KB JPG
>>110340938
>mfw no make on windows
>>
>>110341068
I still don't understand why ANYONE, even the worst fucking normie, still wants to use windows.
It makes absolutely no sense whatsoever.
>>
>>110340961
>and if the assignment is that there exists an array large enough for all the keys in the sense of- all the keys that are possible, not all the keys currently in use
That is the assignment. This is the section right before hashing.

>why even bother with the additional machinery? just bulid an array of structures and call it a day
The point is to test you. Design data structure for a given constraint. You would encounter this often in enterprise code, where you can find a better solution, but you need to do it in a particular way. And if not, it's theoretical CS, nothing matters.
>>
>>110341090
id hasard that the reason for that is probably a mix of multiplayer vidyaslop of the denuvo kind, probably cloud-integrated workflows in the msft office suite, and sheer technological inertia
cf. adobe. adobe didnt port to linux because of its rate of adoption, and linux's rate of adoption is where it is also because of adobe not porting their shit to it

for a tech savy person, or even just a normie like my pops, linux just makes sense
sure its somewhat janky, but the same can be said of windows, and id argue the jank is sometimes way worse in their case.
the difference is that in linux everything has a fix, while with windows you most often just have to live with it
the fukken auto updates that broke random things in w10 come to mind.
and w11 has made things even worse, somehow
>>
>>110341106
i feel like the only thing that got tested here was my reading comprehension
hopefully irl enterprise constraints are more grounded in reality,
or, short of that, at least better written, kek
>>
>>110341212
>enterprise constraints are more grounded in reality,
It's a book. Can you genuinely not comprehend the idea of exercises in a text book? For that matter, do you comprehend the idea of exercise in general?
>Hey mann, why are you curling when you'd never use them muscles like that?
That is how you sound.

>>110341106
They want to run binaries.
>>
>>110341362
>>110341090
>>
>>110341068
When you look at all these fancy "cross-platform" build systems, the elephant in the room is always Windows. Always.

Were it not for Windows, deployment would be so much simpler.
>>
>>110340938
this, it's a shame that many people don't know how to use them correctly. implicit rules (which are standardized by posix make) and default variables (such as CFLAGS, LDLIBS...) allow you to write surprisingly succint makefiles that magically do the right thing(tm)

see https://nullprogram.com/blog/2017/08/20/ for a good introduction to the potential of plain makefiles
>>
>>110341362
>>Hey mann, why are you curling when you'd never use them muscles like that?
>That is how you sound.
this is how i'd sound if i didnt know that when you do your curls at a bench, youre just bicepmaxxing

im still not sure whats the point of that exercice since they give you the answer
and they work with assumptions that can exist only in a thought experiment, further invalidating the whole point of the exercice
its like i said, theyre testing your reading comprehension, if anything

>binaries
errr
you know, you have these in linux, too
they live in /usr/bin iirc
>>
>>110341407
ive never done cross-platform.
whats the biggest problem? the registry? or is it the os interfaces?
wouldnt the latter be solved at the level of code?
>>
File: doppel.webm (1.99 MB, 380x360)
1.99 MB
1.99 MB WEBM
>>110329830
>0-days
>>
wtf?
i just learned that you can have "functions" in makefile. now thats handy.
>>
>>110341750
what the function
>>
>>110341949
kek'd in moderation
btw, currently rewriting the makefile but with much less spaghetti
>>
I don't respect programmers who use LSP.
>>
>>110342126
Just use CMake.
>>
>>110342182
Genuinely this. Why the fuck would you want a slower, more error prone, more platform dependent, more cumbersome build system, when you can just use Cmake? It'll automatically handle all your submodules, mostly take care of platform differences, and output ninja. It's performative to use Makefiles in 21st century.
>Inb4 it's hard to learn
Even the free version of ChatGPT can output a perfectly good CMake file.
>>
File: IMG_20261115_161250_655.jpg (1.39 MB, 3519x2268)
1.39 MB JPG
my doc said I should wear my NC headphones more often, because I am so fucking sensitive to noise.
>wear them like 12 hours a day by now
They are so fucking disgusting. On some days they get even shinier. And I think it made the noise sensitivity even worse.
What do? It feels weird rn not having them on
>>
File: would-jensen.jpg (224 KB, 1199x896)
224 KB JPG
>>110342182
>>110342210
>why wouldnt you want cmake
cuz i would have to learn cmake.
>>
>>110342231
>wat do?
install gentoo
>>
File: 1791619321855322.jpg (102 KB, 600x525)
102 KB JPG
What is the best language for signaling to people that I made a program with my own 2 hands without any demonic vibecoding?
>>
>>110342291
one that you created yourself and never published it
no data = nothing for an llm to reference
>>
>>110342272
I am not that retarded, even tho I just had vegan couscous
>>
>>110342425
>vegan couscous
>not even diary or eggs
why even live
>>
>>110342468
ok gn
>>
>>110342210
CMake makes features that are a simple GCC flag in Make way too hard to use.
>>
File: file.png (139 KB, 1276x765)
139 KB PNG
Been trying to understand monads and like the meme goes, everyone sucks dick at explaining it but I felt like it wasn't as hard as the meme implied.

So I looked at the wikipedia article for it of all places and finally when looking at the mathy definitions it all makes 100 times more sense, especially regarding the chaining part. Hammering on about the Maybe/Option type is pedagogybait. Just give us the laws.
>>
>>110342966
>All told, a monad in X is just a monoid in the category of endofunctors of X, with product × replaced by composition of endofunctors and unit set by the identity endofunctor.
What did he mean by this
>>
Monads are just baby's first algebraic effects
>>
>>110343193
That's good, because I never used them
>>
CMake + Ninja is even recommended over MSBuild by Visual Studio themselves. It is the de facto industry standard for building C and C++.
>>
Why am I not allowed to copy blocks of code for my college projects if I understand what they do and theres only a limited ways of writing that code? I don't understand why it's not allowed if you're able to explain what the code does. Isn't it more important to understand the logic? How tf do people write their own code of something they never built before if you can't look at examples and use the code from those examples? This is so fucking retarded.
>>
>>110343527
Because that leads to plagarism and brain drain as you rely on other people to solve problems for you instead of using your critical thinking skills. When I reviewed my classmates' code they'd do all sorts of retarded and zany ways of coding the same algorithm, all unique to them.
>>
>>110343241
Too bad it sucks. Integrating any CMake dependency is a gigantic pain.
>>
>>110345713
Looks like someone didn’t read their Professional CMake.
>>
>>110345774
>build system needs a fucking book to tell you how to basic things
By your own admission, CMake is a failure.
>>
>>110345787
By your own admission, you can’t expand any new knowledge nor do you have any attention span.
>>
>>110345802
Oh I have tried, several times, but every way of adding dependencies in CMake sucks in their own unique ways.
It's especially glaring if you look at other languages where it's as simple as
library = "0.1.0"
>>
>>110342807
And now try loading a submodule in a makefile.
>>
>>110343241
They also recommend to just have 64 gigs of ram laying around lol.
>>
>>110342966
Well yeah.
class Monad m where
unit :: a -> m a
bind :: m a -> (a -> m b) -> m b

That's it.
But people want to know why those functions are called a monad and it just is.
If it was called context instead of monad people would get it more.
>>
>>110343527
It's like asking why you need to write an essay when you should be able to just turn in the book since you read the book and you understand it
>>
If I """know""" C, (I have a fairly good understanding of the entire language) what is """knowing""" C++? Knowing obviously classes and a bunch of C++ functions? I never understand what knowing a programming language means. I think if I know C, I should know most of everything aside just what functions are called and syntax maybe? Is learn python mainly just understanding syntax of 4 space tabs, how the language handles arrays, etc?
>>
>>110348083
It doesn't help to think in absolute terms of you either know C++ or you don't. As you learn the language you become more effective at using it. When you start out you are completely ineffective and spend most of your time trying to just understand the documentation. As you progress that time becomes less and less.
>>
>>110348083
Knowing the C++ abstraction model.
For example,
RAII and related things like NRVO,
C++ concurrency model,
Exception handling, etc.
Writing C++ is very different from writing C because you have to write according to their abstraction model.

>Is learn python mainly just understanding syntax of 4 space tabs, how the language handles arrays, etc?
Python is not really used as language in itself, but mostly as a sort of frontend for APIs. Knowing python by itself won't do you any good. It's about the API bindings. But there are some de-facto libraries to know like pandas, numpy, pytorch, etc.
>>
>>110347870
>If it was called X instead of monad people would get it more.
https://wiki.haskell.org/Monad_tutorials_timeline
https://byorgey.wordpress.com/2009/01/12/abstraction-intuition-and-the-monad-tutorial-fallacy/
>Unfortunately, there is a whole cottage industry of monad tutorials that get this wrong. To see what I mean, imagine the following scenario: Joe Haskeller is trying to learn about monads. After struggling to understand them for a week, looking at examples, writing code, reading things other people have written, he finally has an “aha!” moment: everything is suddenly clear, and Joe Understands Monads! What has really happened, of course, is that Joe’s brain has fit all the details together into a higher-level abstraction, a metaphor which Joe can use to get an intuitive grasp of monads; let us suppose that Joe’s metaphor is that Monads are Like Burritos. Here is where Joe badly misinterprets his own thought process: “Of course!” Joe thinks. “It’s all so simple now. The key to understanding monads is that they are Like Burritos. If only I had thought of this before!” The problem, of course, is that if Joe HAD thought of this before, it wouldn’t have helped: the week of struggling through details was a necessary and integral part of forming Joe’s Burrito intuition, not a sad consequence of his failure to hit upon the idea sooner.
>>
Um, actually I'd like to intetject for a moment. What you call a monoid in the category of endofunctors is actually just a fragment of a meta language for denotational semantics and program transformations
>>
>>110342231
This is the wrong thread for it, but it an unfortunate fact of headphones that, just like with anything that get's used frequently and a lot, they will need regular, cleaning, repair or replacement. Removable earpads can often be cleaned with soap and water, and it looks like in your case they also need some stitching.
>>
> Message: Process 15701 (libero_bin) of user 1000 dumped core.
java was a mistake
>>
>>110348491
It doesn't help because they already know the word Monad and want to grasp the extremely abstract concept. Monad and Burrito cannot coexist.
Call it Burrito and only Burrito and people would accept the pattern like they accept AbstractSingletonProxyBeanFactory out of the blue without knowing the GoF book by heart. Burrito would still be bad because it's clearly a joke and people would name it something else.
>>
File: 1794839556652.jpg (25 KB, 680x590)
25 KB JPG
>>110323145
>tfw abandoned another project
>>
File: 1794839783060.jpg (13 KB, 240x320)
13 KB JPG
>>110342126
Just use autotools
>>
>>110342291
Basically using any old, lesser used language will work if you use new features which are sparsely available in the training set of most LLMs. Perl with named function parameters comes to mind; added in the most recent version.
>>
>>110350040
making tools > learning tools in my book
unless its something too large to deal with as a solodev
plus: i really dont wanna learn another framework if i can do without
>>
File: clin-d-oeil-2-thumbs.jpg (58 KB, 800x534)
58 KB JPG
>>110350026
you didnt "abandon" that project
youre just unlocking capacity for strategic growth
>>
on an unrelated note
im actually enjoying myself completely reworking how i compile, link against my codebase

makefile really gets comfy once you get used to it
rn im reforging my codebase entirely.
no more jank.

neat little compartments for each aspect of the code
calling makefiles from top level, updating .o's on an "as needed" basis
linking against them, with them sitting neatly in the libs theyre a part of

im even thinking of stuff like to capture when a header has been modified to automajically recompile its related code
and all it took was around 10 hrs of poking and prodding going from a vague acquaintance with make to now, feeling pretty comfy with it

there is a curve to it, but once youre passed it, its really good
its very simple, actually. its even fun
and i didnt experience fun in programming since a good while
>>
Why Pascal never reached popularity levels of C? It was released earlier than C after all.
>>
File: peasants-revolt.png (993 KB, 1272x1024)
993 KB PNG
>>110352103
it wouldnt surprise me if, unlike with lisp, what killed pascal indeed was unix using c

i dont know pascal, but from what ive heard about it, its quite low level
so it might be interchangeable with c, expecting minor modificitations
>>
(picunrel btw. i was just watching that and picrel was the eatshitiest of eat shit's ive seen in a while)
(also killing people is technology)
>>
>>110350040
I stopped hating C++ on Linux when I learned meson
>>
How do I write a program if I can't look at the code and don't remember the code that's needed to solve a coding challenge? How often do I have to type out the same concept to memorize it?
>>
>>110352736
you shouldn't be trying to memorize code
that means you're not understanding the underlying conceptual framework behind programming at all
try doing the same programming challenges from scratch in multiple languages
>>
>>110352736
I assume you're referring to an interview-style question? They've given you a problem of some kind and you need to implement a common data structure or algorithm, such as mergesort.

For interviews, you need to just cram the most common DS/Algos (linked lists, directed graphs, mergesort) like you're going in for the SATs.

In a real job, you don't have to memorize anything:
>Whatever language/runtime you're using usually already has near-optimal search/sort algorithms implemented for you. You rarely, if ever, need to implement the DS/Algos you learn in a CS program
>Other stuff is covered by documentation. If you're, say, a web dev, and don't quite remember how to set up a new HTTP endpoint in a spring boot web server, you just google it and find a stackoverflow answer or something. These days, I use AI to find me docs. I try not to ask AI to write my code for me, but it's really useful as a search engine tool to find you good sites with the info you want.
>>
>>110350333
Are you a manager?
>>
>>110353007
no, but i know marketing, and pr-speak

its just another skill, the idea that a nerd cant into marketing is just a psyop
you rtfm like with everything else
>>
>>110353007
nta, but I am not a manager
>>
In C, if you make your own data type, and have a create function for it, how would you make it optional to use the stack or heap? Two different functions?
>>
>>110354037
my_type stack;
my_type* heap = (my_type*) malloc(sizeof(my_type))
>>
>>110354037
pass in the data type by pointer and let the caller allocate it however they want

you can't always do that though. sometimes it's nice to pass in an allocator and let the callee use that allocator as they please. I recommend learning to use arenas. they are extremely powerful and comfy
>>
just writing some go again after doing C and Cpp. Holy fuck. I love go so much. It's just the most comfy language in existance. no cap fr fr 67
>>
File: 8j0bhcwk1ua71.png (798 KB, 1280x720)
798 KB PNG
>>110354051
>>
>>110354160
himegoto has to be a fucking hag now
>>
Why do people hate macros? They're insanely useful
>>
>>110354802
because C macros are just in-line text replacement and have absolutely zero language awareness, have a very limited featureset, what features they do have are really poorly implemented, and require ungodly levels of jank just to get any truly useful profoundly basic metaprogramming done
see examples like
>#elifdef and co taking until C23 when these are extremely basic operations literally every header file needs
>things like loops in macros requiring really fucking retarded use of C++20/C23's __VA_OPT__
https://www.scs.stanford.edu/~dm/blog/va-opt.html

if you think macros are useful and not hell you have not had to deal real world shit like legacy C code that makes use of build system generated macro metaprogramming and other such horrors
>>
>>110354893
also this is just macros in C
other languages like lisp or rust (i think forth has macros as well but i'm not sure, forth is a whole other beast) have things like AST aware macros
>>
>>8082708,1
Wait, I'm actually retarded. The code is

float circle_sdf(vec2 uv, vec2 center, float radius) {
vec2 centered = uv - center;

return length(centered) - radius;
}

float circle_mask_aa(vec2 uv, vec2 center, float radius) {
float dist = circle_sdf(uv, center, radius);
float aa = fwidth(dist);

return 1.0 - smoothstep(radius - aa, radius + aa, dist);
}


but if I run

void main() {
vec2 uv = normalize_uv();
vec3 bg = vec3(0.0);
float radius = .25;

vec2 center1 = vec2(-0.5, 0.5);
vec3 color1 = vec3(1.0, 1.0, 1.0);
float mask1 = circle_mask(uv, center1, radius);
vec2 center2 = vec2(0.5, 0.5);
vec3 color2 = vec3(0.0, 1.0, 1.0);
float mask2 = circle_mask(uv, center2, radius);
vec2 center3 = vec2(0.5, -0.5);
vec3 color3 = vec3(1.0, 0.0, 1.0);
float mask3 = circle_mask(uv, center3, radius);
vec2 center4 = vec2(-0.5, -0.5);
vec3 color4 = vec3(1.0, 1.0, 0.0);
float mask4 = circle_mask(uv, center4, radius);

bg = mix(bg, color1, mask1);
bg = mix(bg, color2, mask2);
bg = mix(bg, color3, mask3);
bg = mix(bg, color4, mask4);

fragColor = vec4(bg, 1.0);
}


and make the canvas a square, I get circles covering each quadrant, but the diameter should be .5, and the coordinates are being normalized to [-1, 1], so they should only cover half the quadrant.

What am I doing wrong? I think I assumed I'd need comparatively equal values to the radius of the circle for points I wanted to fill in, but I don't need that. I'm already getting values < 0 for points inside the circle, and values > 0 for those outside, so yeah, the only values of dist I need to care about are those close to the edge to antialias them. If I put the left edge at
radius - aa
, I'm actually doubling the radius of the circle. So the function shold be
>>
>>110354984
float circle_mask(vec2 uv, vec2 center. float radius) {
float dist = circle_sdf(uv, center, radius);
float aa = fwidth(dist);

return 1.0 - smoothstep(-aa, aa, dist);
}


Now, how do I make a ring? I can use the circle sdf. If I take the absolute value of the sdf I get the distance from the point to the circle, and I only want the points a certain distance away from the circle.

float ring_mask(vec2 uv, vec2 center, float radius, float thickness) {
float dist = abs(circle_sdf(uv, center, radius));

return 1.0 - step(thickness, dist);
}


How do I antialias it? do I subtract half the thickness from the distance? at the circumference that would give half the thickness, at the edges of the ring it would be zero... do I just take the absolute value of that? not quite. Let's see

// inside the inner circle dist - halfWidth > 0
// outside the outer circle dist - halfWidth > 0
// at the edges of the ring dist - halfWidth == 0
// on the circumference of the circle dist - halfWidth == halfWidth
// elsewhere inside the ring dist - halfWidth < 0


so I think I should just care about the pixels at the edges of the ring, so the function is

float ring_mask(vec2 uv, vec2 center, float radius, float halfWidth) {
float dist = abs(circle_sdf(uv, center, radius));
float diff = dist - halfWidth;
float aa = 0.5 * fwidth(dist);

return 1.0 - smoothstep(-aa, aa, diff);
}
>>
Not quite. The rings in here should have the same thickness.

uniform vec2 u_resolution; //Pass resolution in pixels

float circle_sdf(vec2 uv, vec2 center, float radius) {
vec2 centered = uv - center;

return length(centered) - radius;
}

float ring_mask_antialiased(vec2 uv, vec2 center, float radius, float halfWidth) {
float dist = abs(circle_sdf(uv, center, radius));
float diff = dist - halfWidth;
float aa = 0.5 * fwidth(dist);

return 1.0 - smoothstep(-aa, aa, diff);
}

float ring_mask_aliased(vec2 uv, vec2 center, float radius, float thickness) {
float dist = abs(circle_sdf(uv, center, radius));
float aa = 0.5 * fwidth(dist);

return 1.0 - step(thickness, dist);
}

vec2 normalize_uv() {
return (2.0 * gl_FragCoord.xy - u_resolution) / min(u_resolution.x, u_resolution.y);
}

void main() {
vec2 uv = normalize_uv();
vec3 bg = vec3(0.0, 0.0, 0.0);
vec3 ringColor = vec3(0.25, 0.5, 1.0);
float radius = 0.25;

vec2 center1 = vec2(-0.5, 0.5);
float thickness1 = 0.03;
float mask1 = ring_mask_aliased(uv, center1, radius, thickness1);

vec2 center2 = vec2(0.5, -0.5);
float halfWidth2 = thickness1 / 2.0;
float mask2 = ring_mask_antialiased(uv, center2, radius, halfWidth2);

bg = mix(bg, ringColor, mask1);

bg = mix(bg, ringColor, mask2);

fragColor = vec4(bg, 1.0);
}
>>
Why are you programmers such raging fucking faggots?
>>
>>110356316
What is the problem?
>>
>>110356316
https://github.com/python/cpython/issues/143754
>>
>>110356357
STOP DEPRECIATING EVERYTHING.
>>
>>110356396
>start out naming thing id because youtube
>expand beyond youtube
>accept more kinds of reference
>open makes more sense
>move to -o which is common everywhere
I don't see a problem.
>>
File: 1793388823746505.jpg (48 KB, 1080x1088)
48 KB JPG
I think I just applied for a job that I, theoretically, had an interview for a few months ago but had an off-by-one error regarding the time, so I missed it :^)
I was very ashamed of that and never texted them again, but the first """screening""" was nice and the job sounds nice. Lets see if they 'member
>>
>>110356357
She's using facebook in 2028
>>
File: panel2027.jpg (1.59 MB, 2000x1085)
1.59 MB JPG
Yesterday I did vibe-away and let the AI rewrite my ledpanel driver for the fpga side.
Today I am snail'ing and writing a comfy go framework for it. Go is so much fucking fun. I love go.
>>
>>110356316
I wrote a Python script to strip the ID out of the filename, when I could just use -o? Well fuck me
>>
>>110356658
Yo looks cool what model is it
>>
>>110356996
opus 5.5
But I already handed it a working ledpanel driver and just said "improve it and make the matrix memory access better"
Now the software part becomes incredibly easy, because everything is just a normal linear buffer
>>
>>110356996
My initial goal was to use a different FPGA with more lanes for those panels, to get higher refresh rate (my SoC running fpga+linux only has pins for 2 lanes).
So I vibed around a little and did some network communication, too. But in the end the fpga is a bit limited, so I think I am sticking with linux, which allows more fun and I already have working snes drivers somewhere
>>
>>110357057
by model i meant what LED panel is it :)

also shi looks dope
>>
File: scoreboard2026.jpg (1.67 MB, 2231x1892)
1.67 MB JPG
>>110357093
These
https://www.waveshare.com/RGB-Matrix-P3-64x32.htm
two of them stacked and each one driven by a separate lane, not chained.
I am the clock guy and the real panel is at my moms place, so i can't test it rn. But pic related has 12 panels totalling in 192x128 resolution. So 6 panels per chain.
Here the other fpga would've come in handy, then I could've just have 4 lanes with 3 panels which could make it much much faster. But it's fast enough i think
>>
>>110357115
PS: these are the same panels you see in every fucking stadium or whatever.
There are different versions with 64x64 and denser pixels, but basically they are all the same
>>
How does an OS like FreeBSD that strictly enforces Write XOR Execute allow JIT compilers when they allocate memory to the heap and execute it?
>>
>>110337836
mlton is really fast and it has a great ffi, so that one. unfortunately, Windows support sounds like it sucks. afaik polyml is the only ML with somewhat decent Windows support.
>>
>>110357802
they disable the write bit on pages after they have been filled with code.
it's different from a platform like a game console, where you can't manage the execute bit of your pages at all.
>>
>>110357886
So, it's still JIT but just with one extra step so that the OS stays happy about wxr? Sorry, I'm a brainlet.
>>
Thanks
>>
>>110358836
Go is not a systems programming language, it is not suitable for this kind of tasks.
>>
>>110358888
unbased quads.
Just because normies don't understand volatile, doesn't mean it has no purpose
>>
>>110358951
Meaningless post.
>>
>>110358957
but after further investigation I think the fault is Linux' userspace io.
Why would you make SAFE userspace io, but then (apparently) make it cached? It makes no sense whatsoever.
Back to /dev/mem it is
>>
>>110358995
I see we are climbing that dunning peak
>>
File: coolbag.jpg (38 KB, 736x726)
38 KB JPG
>>110359024
well, I was best student. Twice.
U jelly?

PS: also best in high school
>>
Go is better than Rust because Go never pretended to not be obnoxious
>>
>>110323145
Decided to do Advent of Code with Rust to better learn it and I've seen people talk about how they make helper files and such for it but I have no idea what kind of helpers you'd need for that... Any of you done it before and done helpers for it that could help me out?
>>
>>110360931
Helpers are bloat.
>>
>>110358155
It's exactly that. There's a system call (called mprotect) to switch the page from being writable to being executable. (Or plain old read only for data, but that's not relevant here. Or even no access at all; I've never had a use for that particular option.)

Linux doesn't work that way because they're stuck with the way gcc does local functions (via executable thunks on the stack). It's ugly and dangerous, but gccfags spit their dummies out of the pram when you take their toys away. Based FreeBSD never let them have the toy in the first place, so nobody got bad habits. And yes, gcc has some awful awful hacks in places.
>>
>>110358888
Tell that to my company rewriting all their embedded code in Go (I hate it here)
>>
>>110361255
Sadly embedded no longer implies systems programming. Retards have been persistently trying to cram Python into MCUs as long as I remember.
>>
Public
Private
Protected
Package
>>
>>110355001
According to Grok
ring_mask_antialiased()
is actually correct, and I'm misinterpreting
ring_mask_aliased()
, which uses double the advertised thickness. If you think about it, imagine a line that passes through the center of the ring, it intersects the ring at the inner edge, let's call this point A, and at the outer one, let's call this point B. Since we are just checking if the distance is less than thickness, that means both A and B are at that distance, or at twice the thickness from each other, so the thickness of the ring is double what we wanted. With that corrected the rings look the same now.

I've been browsing social media too much, I can feel my brain melting, I can barely focus. I need to stop this shit.
>>
>>110360931
General string parsing/tokenizing i assume.
Just do the old advent of kode. Input is often similar.
Either numbers per line, words per line or a big string containing characters.
Then there are also mazes drawn with ascii. Not sure if you can prepare nice for those
>>
>>110364104
also AoC loves dijkstra and A*. So you could implement those too
>>
>>110361155
gnu boomers ammirite
>>
File: 1674678912899.png (112 KB, 688x1033)
112 KB PNG
>HEY TYRONE, GLAD TO SEE YOU'RE DOING WELL, I KNOW I LOCKED YOU FOR 6 DAYS IN MY SEX DUNGEON WHILE I DID MY EXTENSIVE SEX CHANGE SURGERY AND THERAPY, YOU GOTTA UNDERSTAND TYRONE I DIDN'T WANT TO MISS YOU RAPING MY INCEL CHUD NAZI WIFE'S PUSSY, WELL NOW THAT'S OVER LET'S GET YOU OUT OF THOSE CHAINS
>WAIT NOOOOOO TYRONE YOU'RE NOT ALLOWED TO RAPE MEEEE!!! I MAY BE A NAZI INCEL CHUD WOMAN NOW BUT IT'S A TRANSPHOBIC HATE CRIME TO RAPE ME INSTEAD OF VIOLATING INNOCENT DEFENSELESS WOMEN WHO AREN'T ACTUALLY MEN THAT WANT ACCESS TO LITTLE GIRLS' BATHROOMS, EVEN ST. FLOYD WHO VIOLENTLY ASSAULTED A PREGNANT WOMAN WOULD BE DECLARED AN INCEL NAZI CHUD LIKE KANYE IF SHE WAS TRANS, AAAIIEEEEEE IT HURTS IT HURTS NOOOOO MY AXE WOUND ISNT BIG ENOUGH TO ACCOMODATE YOUR 3 INCH ORANGUTAN APE BBC TYRONE, GOD I'M SO GLAD THE SCIENCE PROVED BLACK DICKS ARE BIGGER THAN WHYTE BOIS, ALRIGHT WELL AT LEAST LET ME BLAST JEFRE CANTU-LEDESMA WHILE YOU DRIVE YOUR MEATBALL HOAGIE THROUGH MY LITTLE YAKUB, WAIT SCIENCEDAMNIT THIS IS mbv - touched, YOU FUCKING BABOON NIGGER NOW THIS IS EVEN MORE TRANSPHOBIC AND PROBLEMATIC
>NOOOOOOOOOOOOOOO AS A WOMAN I NOW FEEL MORE SEXUALLY PLEASURED WHEN RAPED BY TYRONE'S BBC, AAAAAAAA I'M COOMING GOOSH GOOSH GOOSH GOOSH THE BUGS THAT CRAWLED INTO MY NEOVAGINA FOR A COLD DARK PLACE TO SLEEP WON'T LIKE THIS, I CAN FEEL THEM BUZZING AND I CAN'T DILATE TO LET THEM OUT NOOOO I LOST MY BOWEL CONTROL AND I'M SHITTING, AAAAGGHHH I'M SHITTING TYRONE SPLATSPLLAAATSPLLLLATSPLAAAT I'M GIVING BIRTH TO TYRONE'S BLACK CHILDREN AAAAAGGGHHH I'M BIRTHING BLACK ARYANS INTO THIS WORLD
>>
File: 1769010798652795.jpg (62 KB, 722x425)
62 KB JPG



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