← Home ← Back to /g/

Thread 106858071

190 posts 58 images /g/
Anonymous No.106858071 >>106858103 >>106858116 >>106858184 >>106858325 >>106858565 >>106858595 >>106859041 >>106859064 >>106859157 >>106859238 >>106859291 >>106859401 >>106859935 >>106860146 >>106860751 >>106862682 >>106863124 >>106863628 >>106863768 >>106863984 >>106864173 >>106864535
/dpt/ - Daily Programming Thread
What are you maids working on?

Last one: >>106840616
Anonymous No.106858103 >>106858110 >>106858113 >>106858579 >>106864644 >>106864728
>>106858071 (OP)
I watched like half of her recent video about Ken Thompson's compiler Trojan. Was kinda meh. Why does /g/ go crazy about her?
Anonymous No.106858110
>>106858103
Also, inb4
>her
Anonymous No.106858113 >>106858214
>>106858103
>Why does /g/ go crazy about her?
Don't be disingenuous, you know exactly why
Anonymous No.106858116 >>106859676
>>106858071 (OP)
thats a man
Casks of Amontillado & Vials of ZyklonB No.106858128
Still generating books on compsci and math subjects with Gemini and Opus 4.1.

And I also generate books on the projects I 'may' wanna work on. Last night, I generated one on lyCL, a superset of Tcl with algebraic effects and contracts.

I'm currently generating one of lyShock, an implementation of POSIX shell. No superset.

I tell it to give me listings in both C and Rust, so I can get better at Rust.

I feed it lotsa books and papers. e.g. for the current one, I used Pandoc to convert the HTML page for POSIX Shell into plaintext, and fed it to Gemini, plus the 2024 standard for POSIX.

For the lyCL book, I fed it books and papers on algebraic effect handlers, GC, and other stuff.

I just don't know WHERE to start! Which of my many planned programs should I start with first? I wanna use these programs to boost up my software contract house.

I also sent my resume to two companies in my city who needed C/C++ devs. My resume sucks. I don't have any 'job experience'. I only got the 70+ projects listed on my Github frontpage. I got crazy and deleted them last night, only to crawl back and revert.
Casks of Amontillado & Vials of ZyklonB No.106858138
Even if Laurie is a man, she made a video about my favorite paper, Reflections on Trusting Trust by Ken Thompson.

Laurie, if you are reading this (which you obviously are, since I posted that paper before you made the video on a /g/ thread), make a video on djb2 hash, and congruent number generators in general.
Anonymous No.106858179
Erlang is king.
Anonymous No.106858184
>>106858071 (OP)
This is a clothes swapped AI image made by one of you goonbrains isn't it? There's no way she actually owns a maid outfit and dresses up like this. Can't you sickos just leave this poor woman alone? If she actually did dress up like this that would be so hot though damn I wouldn't be able to control myself
Anonymous No.106858214 >>106858238 >>106859945
>>106858113
She's attractive and actually knows what she's doing, unlike most girl coderz? Sure, but it just wasn't super engaging. Maybe if it was a story I didn't already know?
Casks of Amontillado & Vials of ZyklonB No.106858238 >>106858294
>>106858214
Yeah most girls who were my classmates the first time I went to college (junior college, 2-year degree) --- and trust me, both times I went to college, majority of my classmates were female (in the last one, we had only 8 boys! about 35 girls) --- ended up in webdev and UI/UX. Girls hate systems work it seems. Laurie does low-level, and that's refreshing to see in a grill.

btw, you goddamn morons, if you wanna clock a troon, look at the hands. Laurie has female hands.
Anonymous No.106858294 >>106858313
>>106858238
What course? You had a computer science course that was mostly girls?
Casks of Amontillado & Vials of ZyklonB No.106858313
>>106858294
Junior college was called "Program Construction". The non-profit college I studied at, the course was called Software Engineering. But it could be different from the SWE offered by Western colleges.

This is their curriculum:

https://pastebin.com/DqxdrbPH

And yeah, we had 35 girls and 8 (or was it 10?) boys.

It's more balanced in state colleges like FUM. I'm studying to get accepted into FUM's compsci or ECE program.
Dob !QSe0ITXWVQ No.106858325 >>106858486 >>106859661 >>106860373
>>106858071 (OP)
this machine kills r*iko(/r9k/ pedo)'s rustoddler descendants that call themselves f*mboys(they believe themselves to be invulnerable to foreign transphobia and homophobia) via the sheer power of Lua
Casks of Amontillado & Vials of ZyklonB No.106858486
>>106858325
I was implementing Lua in D, and I made good progress. But like always, I gave up.

https://github.com/Chubek/Moonix
Casks of Amontillado & Vials of ZyklonB No.106858522
How would Americans buy compooters now with 100% tariffs?
Anonymous No.106858541 >>106858592 >>106862964
We need a new schizo-free and maid-free general for programming.
Anonymous No.106858565
>>106858071 (OP)
I'd suck her dick
Anonymous No.106858579
>>106858103
>Why does /g/ go crazy about her?
she has a fat cawk
Anonymous No.106858587 >>106858599
so now he's co-opting generals to push this shit because his standalone shill threads are getting banned?
Casks of Amontillado & Vials of ZyklonB No.106858592
>>106858541
Who you calling schizo, you homosex?

I'm bipolar. Not schizo. My cousin was schizo. And his parents were cousins. My parents are from two different cities.

So, has homosexual consanguineous marriage ever happened?

It's a good thought process.

How do Westoids happily marry men, but they avoid marrying their cousins?

I, your God, have sanctioned your cousins onto you. Multiply and prosper, my children.
Anonymous No.106858595
>>106858071 (OP)
She just needs some blush makeup on then she'll be unstoppable
Casks of Amontillado & Vials of ZyklonB No.106858599 >>106858610 >>106858637
>>106858587
Laurie is a SHE.
Casks of Amontillado & Vials of ZyklonB No.106858610 >>106858812
>>106858599
I like sucking on dat BBC BTW
Anonymous No.106858637 >>106858812
>>106858599
Casks of Amontillado & Vials of ZyklonB No.106858812
>>106858610
>>106858637
OMG YOU MORONS LOOK AT HER HANDS.

I'M NOT GAY I AM NOT ATTRACTED TO MEN. IF I AM ATTRACTED TO A WOMAN, SHE IS A REAL WOMAN.
Anonymous No.106858939 >>106859433
C++ helper code for Advent of Code, to print most common data structures.
https://godbolt.org/z/WMPvre4vz
#include
template concept IterableConcept =
requires(T&& o) { std::begin(o) != std::end(o); *std::begin(o); };
template concept StringConcept =
requires(T&& o) { std::string_view{o}; };
template concept KeyValueConcept =
requires(T&& o) { o.first; o.second; };
template concept PairConcept =
requires(T&& o) { o.h; o.t; } ||
requires(T&& o) { o.x; o.y; };

struct Osw {
~Osw(){ std::cout << '\n'; }
template
const Osw& operator,(const T& o) const {
const auto& [k, v] = o;
return *this, '{', k, ": ", v, '}';
}
template
const Osw& operator,(const T& o) const {
const auto& [a, b] = o;
return *this, '(', a, ", ", b, ')';
}
template
requires(!StringConcept)
const Osw& operator,(const T& o) const {
std::cout << '[';
for (int n = 0; auto&& i : o) {
if (n++) std::cout << ", ";
*this, i;
}
std::cout << ']';
return *this;
}
const Osw& operator,(const auto& o) const {
std::cout << o;
return *this;
}
};
#define PRN Osw{},

#include
#include
#include
#include
int main(){
auto il = {1, 2, 3, 4};
PRN "initializer list: ", il;
std::string_view a[][2]{{"sour", "sweet"}, {"cold", "hot"}, {"noise", "music"}};
PRN "array: ", a;
std::array, 3> sa{
{{"red", "blue"}, {"teal", "olive"}, {"green", "black"}}};
PRN "std::array: ", sa;
std::vector v{std::vector{std::unordered_set{2.2}, {3.5}}, {},
{{3.3, 1.2}, {4.4}}, {{5.5}, {6.6}}};
PRN "vector: ", v;
std::unordered_map m{{1, "one"}, {2, "two"}};
PRN "map: ", m;
struct {std::string h; std::vector t;} o{"head", {3, 2, 1}};
PRN "pair: ", o;
struct {int x, y;} pa[]{{0, 1}, {1, 0}, {1, 1}};
PRN "pair array: ", pa;
}
Anonymous No.106859041 >>106859256
>>106858071 (OP)
why is that man dressed like that?????
Anonymous No.106859064 >>106859256
>>106858071 (OP)
Please be a man
Anonymous No.106859157 >>106859256
>>106858071 (OP)
Would totally play with his floppy if you catch my drift
Anonymous No.106859238 >>106859256 >>106860090 >>106860504 >>106862645
>>106858071 (OP)
That's a man
Anonymous No.106859256
>>106859041
>>106859064
>>106859157
>>106859238
these are women hating trannies
Anonymous No.106859291
>>106858071 (OP)
AI magic man do your magic plz ..
Anonymous No.106859401
>>106858071 (OP)
Die from aids unhinge faggot.
Casks of Amontillado &amp; Vials of ZyklonB No.106859433
>>106858939
Damn fella, use some functional programming.

map/iter/filter/fold

These are your friends.

Look at the boost library for inspiration.
Anonymous No.106859661
>>106858325
Tell me about the secret histories, o schizo
Anonymous No.106859676
>>106858116
she's tucking that shenis
Anonymous No.106859749
Can someone tell me how manga/anime website aggrigators effectively and reliably scrape from multiple data sources?

Say you want to scrape a bunch of stuff from multiple different websites but you run into the problem of how can you tell if a manga and a chapter is identical across data sources, which has the best quality, and how do you maintain this without so much effort for each website.

I was thinking of making a builder base class that can help remidy this but still seems like a lot of manual work
Casks of Amontillado &amp; Vials of ZyklonB No.106859750 >>106859788 >>106859913 >>106860642
Why does AI keep doing this?

You can't return a data structure, whole, in C! Can you? Am I mistaken?

I'm fairly sure you can't. I don't even need to test it.

These idiots need babysitting to work. I don't understand how they are replacing real programmers.
Anonymous No.106859788 >>106861601
>>106859750
You can. Most people use pointers, but you can send a whole struct in and return return one
Anonymous No.106859913 >>106859986
>>106859750
You can't return a pointer to 'token', a local variable. Returning a copy is fine.
Anonymous No.106859935
>>106858071 (OP)
Anyone have an archive of his photos? I must masturbate.
Anonymous No.106859945
>>106858214
sekrit caulk
Anonymous No.106859946
Nakaadashi
Anonymous No.106859985
what's the fastest way to learn JS and Vue 3?

got a job, but never did web dev and they want me to do web dev for the use with docker
Anonymous No.106859986 >>106860034
>>106859913
In C the caller allocates the space on the stack for the returned struct and passes that location to the callee, correct? In the example code, why wouldn't the callee just use that space directly for the local variable instead of allocating additional space on the stack then spend ops to copy the contents to the caller-allocated space?
Anonymous No.106860034
>>106859986
Return value optimization is an impl./optimization detail. There might not even be a function call to hit this optimization.
Anonymous No.106860090 >>106860114
>>106859238
For fuck sake why can't there be cute girls in tech? Why every girl must be some degenerate troon fuck?
Anonymous No.106860114
>>106860090
Young & make-up filled bimbos don't settle for pedos nor *tism until they get bored of trains.
Anonymous No.106860146
>>106858071 (OP)
HOLY SHIT POST THE LORA
Anonymous No.106860332 >>106860358 >>106861068 >>106861735
What's it called when you're looking at your code at you start feeling like you've just been writing a bunch of specialized cases for a more general approach and you're trying really hard to peak into the Platonic realm to see what it looks like but it keeps evading your sight like some kind of ephemeral fae spirit.
Anonymous No.106860358
>>106860332
It's called the first draft of the solution?
Anonymous No.106860361
Does anyone else keep a homepage on their own home server? I frequently beautify JSON and decode URIs so I added a couple little tools there to do that really quick. I have a keyboard macro which opens this site when I hit Win-Shift-F
Anonymous No.106860373
>>106858325
>this machine kills r*iko(/r9k/ pedo)'s rustoddler descendants that call themselves f*mboys(they believe themselves to be invulnerable to foreign transphobia and homophobia) via the sheer power of Lua
Get this on a laptop sticker
Anonymous No.106860504
>>106859238
mogs me
Anonymous No.106860642 >>106861601
>>106859750
>I'm fairly sure you can't. I don't even need to test it.
Never do this, because sometimes you'll be wrong and embarrass yourself like you just did.
Always check your assumptions, and always test.
Anonymous No.106860751
>>106858071 (OP)
My own TempleOS version of Paint from scratch
Anonymous No.106860993 >>106861013
you can cause a stack overflow by having a function call itself repeatedly

can you also cause one by manually writing out the same number of unique functions that triggered the overflow calling the next one in sequence?
Anonymous No.106861013
>>106860993
you can probably cause a stack overflow with anything if you are committed enough
Anonymous No.106861017 >>106861035
Will this have an accumulative error or time?
Anonymous No.106861035
>>106861017
over time*

and I have nodelay on so getch() is not blocking.
Anonymous No.106861068 >>106861601
>>106860332
That's called not knowing enough category theory.
Casks of Amontillado &amp; Vials of ZyklonB No.106861601
>>106859788
>>106860642
First off, getting embarrassed on 4chidori does not bother me.

I'm actually jubilant now, because this small fact eases up my workflow by large margin.

I've gone through a lot of pain not knowing this.

>>106861068
Category theory, Type theory, Combinatory logic. Learn these, or you'll be a webshit loser forever.
Anonymous No.106861730 >>106864154
The project must grow
Anonymous No.106861735
>>106860332
Abstraction.
Anonymous No.106861755 >>106861764 >>106862732 >>106864036
>get suggested video from woman coder about C++
>only 180 views, no comments
>says her course is for everyone but she hopes she can inspire more people
>decide to be her first comment
>"Lol women in coding, good meme. I'd eat your ass though"
>check Youtube few hours later, see I got a reply
>open video, can't see reply because she deleted the video

Remember to gatekeep your profession, Kings.
Anonymous No.106861764
>>106861755
inspire more women*
Casks of Amontillado &amp; Vials of ZyklonB No.106861870
I'm trying to sanction all software made by Jews.

List some.
Casks of Amontillado &amp; Vials of ZyklonB No.106861986 >>106862067
https://www.youtube.com/watch?v=0O2EolPa2NM

Is this guy delusional or what?

US can be toppled simply by dividing its people.

Gather up some L.A. troons and tell them "Do you want to be in the same country as those Texan homophobes?"

Then, go to the said Texan homophobes, and tell 'em "Do you wanna be in the same country as those woke troons?"

The WWW makes it 100% easier.

I don't know what kike paid this motherfucker to make this video, but it's asinine.

Destroying the US hegemony is like picking at a glacier with a small ice pick. It takes time, but the glacier cannot grow back, and one day, it'll crumble.
Casks of Amontillado &amp; Vials of ZyklonB No.106862005
Will Bread marry me?

https://www.youtube.com/watch?v=Z7GrT2jOy4Q
Anonymous No.106862067 >>106862100
>>106861986
Made by Fukuyama-cel goy cattle
Casks of Amontillado &amp; Vials of ZyklonB No.106862100 >>106862123
>>106862067
Yeah he just regurgitates the bullshit from his book.

The US has plenty of geographic vulnerabilities. To its south, there's a highly unstable failed state.

I've heard Iran just moved a lot of troops to Venezuela. What a chad move.
Casks of Amontillado &amp; Vials of ZyklonB No.106862123 >>106862148
>>106862100
https://www.youtube.com/watch?v=PkNxL8d9eb4

> Iran-America war in the Caribbeans

Harry Turtledove could not write a novel like this.
Anonymous No.106862129
so I was building an LKM and came across an issue that I need to use a function that is non-exported in the kernel? how do you do this cleanly?
Casks of Amontillado &amp; Vials of ZyklonB No.106862148
>>106862123
"Jihadists of the Caribbean". Somebody email Turtledove.
Casks of Amontillado &amp; Vials of ZyklonB No.106862225
Novartis Ritalin. Yummy.
Anonymous No.106862242 >>106862353
Is there a way to stop my C program from running in India?
Casks of Amontillado &amp; Vials of ZyklonB No.106862353
>>106862242
Get the user's timezone. If it's in India, gracefully exit.
Anonymous No.106862600 >>106862610
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

And to the anon who complained about UPX last thread, UPX is not very every use case scenario. UPX compressed binaries to raise false positive with Windows Defender so dont use it in enterprise obviously but it can be used for personal or other projects.
Anonymous No.106862610
>>106862600
Holy fuck I typod the shit out of that but you get the point. Don't use it professionally but it's a good tool.
Anonymous No.106862645 >>106862659
>>106859238
Women don't have that? Not even a little bit?
Anonymous No.106862659
>>106862645
they do
Anonymous No.106862682 >>106862737 >>106863270
>>106858071 (OP)
Is this peak programming?
Anonymous No.106862709 >>106862961
Show me the bulge
Casks of Amontillado &amp; Vials of ZyklonB No.106862732
>>106861755
I said this in the other thread, but both times I went to study SWE, once in a junior college and once in a non-profit private college (private colleges are less reputable), we were like 8-10 dudes and over 30 girls.

Why is it that some theocratic shithole were women have to wear tube scarves and the blood money for killing a woman is half of a man has more female engineers and scientists than Westoid nations.

Of course the answer is not very pleasant. An Iranian woman needs to be educated to make a living. It's not like the US where a woman could earn bank on OnlyFans, or work as a barista, or a masseuse. I've seen women working in coffeeshops, but being a programmer pays more than working at a cafe. A Westoid women could just work as stripper and she's golden. TL;DR, women in West earn money easier without higher education. Correct me if I 'm wrong here.

When I studied English lit, and later French lit, obviously, the ratio of male/female was ever so higher. And these girls were 'Westoxificated'. It was like an American high school. We even studied shitty American high school books. If you wanna study Beauwolf and Ulysses, you must get a master's. The undergrad is elementary books like The Great Gatsby and Animal Farm. I only studied for 3 semesters, did not stick long enough, but they were going to study Greek Mythology.

Other majors like English translation and English teaching were worse. Jeet-level English.

The only thing stuck with me from my stint at FUM's English literature course was the Iambic Pentameter:

Shall I | com-PARE | thee TO | a SUM | mer’s DAY
Thou ART | more LOVE | ly AND | more TEM | per-ATE


Vile, peasant tongue. If you're seeking to learn a new language, and you've decided to learn English, don't. Stop right there. Learn Korean. Even the Lizard-eater language of Arabic has higher yield. If you're worried about the script, both the Perso-Arabic script and the Hangul script are phonetic.
Casks of Amontillado &amp; Vials of ZyklonB No.106862737
>>106862682
Can somebody kill that moron. He's on my nerve. I think Bibi Netanyaho is concerned less about the inevitable annihlation of Israel, than Threat Interactive is concerned about AI upscaling in games.
Anonymous No.106862771 >>106862796 >>106862799
Writing a little image scraper.
Funnily enough, some of the image urls in the page are surrouded by:
:true},{\"url\":\"https://images.scrolller.com/yocto/.............\",\"width\":828,\"height\":1049,\"isOptimized\":false}],\"blurredMediaSources\":[]}}]]\n"])

and the regex to extact those uses the same pattern than the regex that matches C multiline comments.
/\* (?: [^*] | \* [^*/]? )* \*/

\\"url\\" \s* : \s* \\"( (?: [^"\\]+ | \\[^"]? )+ ) \\"
Anonymous No.106862796 >>106862833
>>106862771
nevermind, retarded once again should be
(?: [^"\\]++ | \\[^"] )+ ) \\"
Casks of Amontillado &amp; Vials of ZyklonB No.106862799 >>106862833 >>106862833
>>106862771
Use a PEG library, like Parsimony. It's much better than Regex. PEG is phrase structure (Chomsky 2) whereas Regex is regular (Chomsky 3).
Anonymous No.106862833 >>106862851 >>106862856
>>106862799
>>106862796
shit I think it's still incorrect if is to handle backslash in the string url, but it works
>>106862799
I'm all for PEG libraries but what would I with a PEG library in this case?
Write an HTML parser in this library and a JavaScript parser? Because this piece of substring I've posted in inside a double quoted string inside JavaScript code.
Casks of Amontillado &amp; Vials of ZyklonB No.106862851 >>106862935
>>106862833
I thought you're in Python. But JS has PEG libraries.

I think PEG just works better than Regex in all cases. Now, your mileage may vary. But I prefer PEG, even when it's just lexing/simple match, and not parsing.
Casks of Amontillado &amp; Vials of ZyklonB No.106862856 >>106862935
>>106862833
Also, you can do maximum optimization by rolling your out FSM to match strings. If the match gets called a lot, even caching the NFA does not work quickly. Making a hand-made FSM is better.

This book could help you: "Algortihms on Strings" by Crochemore, Hancart and Lecroq.
Casks of Amontillado &amp; Vials of ZyklonB No.106862900 >>106862935 >>106862956
Question. How does Commodore 64, and other micros that have 64KB or RAM, handle memory-mapped I/O, since all the memory 6502's address space could handle is occupied by the usable memory block?

Like, NES has 2KB of RAM, and it uses the rest for mapping devices. How does C64 map its peripheral devices?

This is job of a Disk Operating System! But... C64 does not have a DOS?
Anonymous No.106862935 >>106862986
>>106862851
>>106862856
>>106862900
BOT
O
T
100%.
Casks of Amontillado &amp; Vials of ZyklonB No.106862956
>>106862900
UPDATE: I have found the answer while my black bull was railing me
Casks of Amontillado &amp; Vials of ZyklonB No.106862961
>>106862709
0w0
Anonymous No.106862964 >>106862986
>>106858541
There is nothing but schizos and namefagging schizos in here. This shit is completely unusable now. Why even make the thread?
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106862986 >>106862997
>>106862935
Why does everyone bully me like so.

I was on a fora just a few hours ago, these were my own people, and they bullied me because they said they don't understand my posts. I'm writing in my own native tongue mind you, but because I use big words, and I punctuate, instead of writing prose like a retarded autistic kindergartner, who has worms in his brain from all the sandbox turf he's eaten, they have to use their brain for one minute to parse it, and since they are fucking dumb, and I am a higher intellect, they get all mixed up and confused, and bully me.

Nevertheless, I posted gay porn on that website to get myself banned.

Why am I wasting time with low-IQ dredges of the society? I could be sipping tea with the highest-esteemed compsci professors rn.

>>106862964
I AM NOT SCHIZO I AM BIPOLAR

You can't bully me out of 4chan!
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106862997 >>106863010
>>106862986
And I also love sucking on dat BBC desu.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863010 >>106863017
>>106862997
Your impersonation attempts are in vain. I talk like an educated, upper-class gentleman, and the grammatical and syntactic mistakes I make are on par with an ESL speaker who speaks Persian as his native tongue.

You are neither, so you cannot write like me. Any idiot can tell you're impersonating me.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863017 >>106863029
>>106863010
Nevertheless, Tyrone is still railing me and I am feeling immense pleasure from that.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863029
>>106863017
Fucking blacks/getting fucked by blacks is what Iranian kings do. I'm not a king, at least not yet.

In the Saffavid court, the job of the "La'abchi" was to lube up asses of black slaves so the king could fuck them without intermittence. And when he got tired of fucking, he bent over, so the black slaves could fuck him.

Trust me, when I'm king, I shall not be left one minute without being sandwiched between a pair of 'gholam bachehs'.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863091 >>106863239
I've added another project to my raster of projects to finish up by early spring.

I was reading this paper: https://dl.acm.org/doi/pdf/10.1145/3632865

And I thought to myself "PHP has a very cool idea! But its syntax is retarded. So, let's make a PHP, that is functional, and has algebraic effect handlers, and it has a full specification, with Small-step Operational Semantics!"

I'm going to write it in Java, because I got no Java projects.
Anonymous No.106863106 >>106863134 >>106863135 >>106863300
I was benchmarking some silly stuff in C++, and I found out that adding an attribute specifier to for the compiler to know that the code is hot brutally increases the performance for the benchmark.

It goes from ~3600 us 50000 iterations, to a measly ~620 us. Crazy stuff.

// The [[gnu::hot]] attribute is what does the magic
[[gnu::hot]] void func(std::span dst, std::span base, int radius, Point center)
{
const auto size = dst.size();
for (std::size_t i = 0; i < size; ++i) {
base[i].x = std::fma(radius, base[i].x, center.x);
base[i].y = std::fma(radius, base[i].y, center.y);
}
}


Being benchmarked with
constexpr int iterations = 50000;
const auto start = Clock::now();

#pragma GCC unroll(4)
for (int i = 0, radius = 1; i < iterations; ++i, ++radius) {
func(dst, base, radius, {2, 2});
}

const auto end = Clock::now();
const std::chrono::duration diff(end - start);


I haven't checked the assembly yet, but I'd expect the compiler to know that the function is being called in a hot loop, because it's quite obvious from the source code (literally nothing going on besides the benchmarking).
Anonymous No.106863124
>>106858071 (OP)
https://vocaroo.com/1fBPsEin0OWU
Anonymous No.106863130 >>106863150
COCKROACHES MULTIPLY
Anonymous No.106863134 >>106863300
>>106863106
I tried fiddling with it more, and it's now even weirder than before.
Turns out that the performance stays the same unless I add a [[gnu::cold]] (the [[gnu::hot]] barely makes any difference) attribute to a function that is being called only once in the whole code. I assume an I-cache miss is going on, but it makes no sense in my mind because the miss in question should only happen once, not for every time in the iteration, since the hot loop is likely to be in the uop-cache.

Function in question
[[gnu::cold]] void create_base(std::span base, int radius)
{
const auto size = base.size();
const float rev = 2 * M_PI / size;

for (std::size_t i = 0; i < size; ++i) {
const float theta = rev / (i + 1);
base[i].x = radius * std::cos(theta);
base[i].y = radius * std::sin(theta);
}
}
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863135
>>106863106
It will only know if it collects traces. That's what tracing JIT compilers do.

There's now 'metatracing' which knocks even AOT to native code off the wall. PyPy uses metatracing.

In metatracing, you hand off the job of tracing to another interpreter. In PyPy, this interpreter is a smaller subset of Python, that translates to C.

Problem with traces is, that they must have guards against failure. So say, your trace follows a path from BB1 -> BB3 -> BB2 (BB=Basic Block). But what if during the execution, BB1 goes to BB4? The guard suddenly activates, and perf collection stops.

Also, you can use Godbolt. You probably know it, but just thought I'd say.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863150 >>106863163
>>106863130
https://www-qudsonline-ir.translate.goog/news/583176/%D9%85%DB%8C-%D8%AE%D9%88%D8%A7%D8%B3%D8%AA%DB%8C%D9%85-%D8%A8%D9%86-%D8%AA%D9%86-%D8%B1%D8%A7-%D8%AA%D8%AE%D8%B1%DB%8C%D8%A8-%DA%A9%D9%86%DB%8C%D9%85?_x_tr_sl=it&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863163 >>106863170
>>106863150
What the fuck is wrong with Google Translate.

Set the source language to "Persian". You guys call me schizo, but this is something else.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863170
>>106863163
Oh God, the English translation is just *Mario Batali kiss*.

Ben 10 is a "Hollywood legend", TIL.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863224
btw, I hate Westoids, especially Yankoids, as much as the next guy from my background, and I'm ready to battle hoards of American soldiers who have enlisted to pay their college tuition, behead them, and piss into their mouths.

But the link talks about a project that is just asinine. It's like, America trying to battle Anime with a movie called "Johnny Appleseed and John Henry battle Akira". Fucking retards.
Anonymous No.106863239 >>106863331
>>106863091
>But its syntax is retarded
it's not Lisp syntax, so you're right.
The correct syntax for programming languages was found in 1959 by the anti-communist John McCarthy.

The reason we still have to deal with complex syntax rules like in C is due to baby duck syndrome, people want their programming language to look more like the math equations they've been familiar with since elementary school.
Anonymous No.106863270
>>106862682
>>0 / 16
Even a total beginner would see this is redundant and therefore wrong.
Anonymous No.106863300 >>106863435
>>106863106
>>106863134
Looked into the perf report, and noticed that there are a bunch of vcvtpd2ps instructions over the place, taking a whole bunch of clock cycles (one even taking 25% of execution time of the function).
So I changed struct Point to use doubles instead of floats:
struct Point {
double x; // used to be float
double y; // used to be float
};


Instant 2x performance improvement. You cannot make this up. The assembly halved in size and no longer has FP conversion instructions.

I diagnosed the previous improvement, too, and it turns out that the [[gnu::cold]] makes the compiler not inline func() for some reason. But instead, it completely unrolls it (which is better in this case because of data dependencies).
Very intriguing stuff.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863331
>>106863239
Yeah Jay Jay was so anti-communist, he married one. I've heard his parents were filthy commies as well.

I'm not sure if you are being ironic, but you are stating FACTS. S-Expressions are isomorphic with all imperative and functional syntaxes. Isomorphic meanings, the parse tree of all languages could be morphed into S-Expressions by a "morphism", as in, category theory. S-Expressions are Closed Carthesian Categories (CCC), and they map directly to Lambda calc.

We've all turned idiots, and we write programs in what Dough Hoyte calls "Blobs". it's as if, humans have turned stupid.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863367
I found this amazing document explaining the relationship between Lambda-calc and Carthesian Closed Categories:

https://pauillac.inria.fr/~huet/PUBLIC/cat.pdf

Also, fun fact, Kleene star, as in the * operator in Regex, induces homomorphism with monoids, and `map` function. Pic related.
Anonymous No.106863435 >>106863457
>>106863300
>uses a shitty optimizing compiler
>wonders why its shit
Anonymous No.106863457 >>106863460
>>106863435
That's GCC for you, mate. With `-march=native -funroll-loops -O3`
Anonymous No.106863460 >>106863469 >>106863524
>>106863457
>That's GCC for you
Talk to anybody working in the AAA games industry, GCC is known for being dogshit.
Anonymous No.106863461
where's lil bro?
Anonymous No.106863469 >>106863559
>>106863460
>Talk to anybody working in the AAA games industry
Have you SEEN AAA games lately? They are dogshit
Anonymous No.106863524 >>106863549 >>106863559
>>106863460
All games are compiled with LLVM then?
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863549 >>106863602
>>106863524
These days, MLIR speaks.

If you wanna start with CCDev, roll your own backend if you wanna truly LEARN.

But if you just wanna have fun -> https://c9x.me/qbe

QBE is perhaps, the LEANEST IL I've seen.

Maybe you can't write custom passes with it, but it's still awesome.

Again, ROLL YOUR OWN BACKEND. Otherwise, you won't learn shit.

In fact, start with a simple interpreter. A tree-walking one.

btw, SSA is not the only IR style out there. It's been proven for 3 decades that, Static Single Assignment Form (SSA), Administrative Normal Form (ANF), and Continuation-passing Style (CPS) not only commute, but are isomorphic.
Anonymous No.106863559 >>106863564
>>106863469
Not an argument.
>>106863524
Almost all of them, including Nintendo Switch.
Anonymous No.106863564 >>106863592
>>106863559
>AAA games are poorly optimised trash
>we should respect their opinion on optimisation
lol, lmao
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863575
These days, if you wanna TRULY optimize, you need to go past the CFG.

- Polyhedral analysis, and other Integer Programming-bases analyses;
- Optimizing away atomics;
- Power consumption optimization;

and there are more being discovered everyday.

Other advances are in static analysis front. One of SPJ's students is making a static analyzer for Haskell, that uses dynamic semantics.

Not to mention, Machine learning-based optimizations:

https://dl.acm.org/doi/pdf/10.1145/3640537.3641580
Anonymous No.106863592 >>106863606
>>106863564
I don't like to argue with people. But GCC being shit is common knowledge among every professional programmer. Don't like AAA? Go for the CAD industry, ask Autodesk developers.
Anonymous No.106863602 >>106863607 >>106863627
>>106863549
tell me everything you know about the ModRM byte.
Anonymous No.106863606 >>106863625
>>106863592
So what is a good compiler to you? Clang which is massively behind on implementing shit from 5 years ago?
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863607 >>106863633
>>106863602
Nigga, I don't emit machine code. I emit assembly code. For NASM or GAS.
Anonymous No.106863625 >>106863643
>>106863606
>Clang which is massively behind on implementing shit from 5 years ago?
Do you realize most companies have a strict policy on "no new language feature unless explicitly permitted"? Modern C/C++ is the last thing the industry cares about, the only people who care about modern C/C++ are the standards committee and new impressionable programmers.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863627
>>106863602
Or if this was a genuine question, I recommend you feed Opus 4.1 Interl's manual (the 4-volume one), and several books on x86-64 and tell it to write a book for you,

In fact, I've done it myself, here's the book:

https://gist.github.com/Chubek/d6480bbed9cba78c527b718af33d2a11

wget it, and read it with QuteBrowser.
Anonymous No.106863628
>>106858071 (OP)
>trans socks
That's a sissy maid or arch linux user
Anonymous No.106863633 >>106863639 >>106863640
>>106863607
>roll your own backend
>but not the assembler
>but not the linker
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863639
>>106863633
I'll do that too :) in due time.

I wanna make an entire POSIX suite, called the ly* suite. lyCC, lyAs, lyLd ... lyAwk, lyGrep, lySed ... lyShock (the shell) ... to lyCat.
Anonymous No.106863640 >>106863651
>>106863633
>can one man build the Manhattan bridge?
Yes but it would take forever.
Anonymous No.106863643 >>106863681
>>106863625
>most companies except the ones people actually happen to be working at
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863651 >>106863751
>>106863640
With LLMs, one can could build the Manhattan project, let alone, the Manhattan bridge!

If you know how to use it.

Don't let it write code for you. Generate a book on your project, and learn from it. Do it twice, thrice. Do it until you know every step of the way.

Code is cheap, anon:

https://pages.cs.wisc.edu/~remzi/Naur.pdf

What matters is the PROGRAM:

https://www.youtube.com/watch?v=uyLy7Fu4FB4
Anonymous No.106863653 >>106863657 >>106863670
finally a cute girl who knows programming pass basic python and html
Anonymous No.106863657 >>106863674
>>106863653
the link https://www.youtube.com/watch?v=5QQdI3P7MdY
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863670 >>106863683
>>106863653
There's dozens of 'cute' girls who program low-level. They're just not huge attention whores.

I interviewed for 'Wispo', a cloud infrastructure company in my city, and the lady who interviewed me, the CTO, was not 'bad' per se, could do well with some make up.
Anonymous No.106863674
>>106863657
Anonymous No.106863681 >>106863857
>>106863643
Autodesk, Epic, Valve, EA, FromSoftware, etc you name it. GCC is regarded as a shitty compiler in every professional field. Grow up.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863683
>>106863670
And oh, out intro to prog 1 professor was a total babe. She had master's in graph studies i think.

Sadly, they gotta wear those damn tube scarves, and they can't wear make up in their place of work.
Anonymous No.106863701 >>106863723 >>106863759
thinking of getting a job writing haskell to get away from shitty programmers
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863723 >>106863757
>>106863701
Start with "Learn You a Haskell for Greater Good". Continue with "Real World Haskell". "Haskell Programming From First Principles" also teaches you the associated type and category theory. I have not read 'Thinking Functional with Haskell", but it sounds adequate.

If you're on Discord, join the Functional Programming server. Tell them Behrang sent you, and tell them Behrang will carry his plan through, whether you ban him, or not.

Brush up on type theory, and category theory as well. Combinatory logic is paramount. But HPFFP teaches most of that.
Anonymous No.106863751 >>106863795
>>106863651
this fellow has fallen into ai psychosis. get ready for another "theory of everything" to be produced in 2 weeks
Anonymous No.106863757 >>106863795
>>106863723
already know it, never used profesionally
first book is reddit-tier, will never finish that shit
the one i read was by Graham Hutton, but it only covered the basics
the rest i learned from doing
Anonymous No.106863759 >>106863771 >>106863815 >>106863870
>>106863701
I've been in love with Haskell for a few years now, but I'd never dream of finding a job with it desu. Sadly the popularity is declining. But the language is still worth learning and there is a lot of libraries to do cool side projects.

I'd also add the book "Effective Haskell" to the reading recommendations, good real-world examples and pretty up to date.
Anonymous No.106863768
>>106858071 (OP)
nice to see young men still going into computers.
now can we have a real /dpt/?
Anonymous No.106863771
>>106863759
why not? i joined the haskell group on linkedin, there are plenty of jobs (100% remote)) given how few specialists there are it shouldn't be difficult
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863795 >>106863852
>>106863751
I use LLMs as a tool. If you don't use LLMs, you'd be fine. If you use LLMs, but use them wrongly, you'll be doomed. If you use them RIGHT, you'll be rewarded with reaches beyond the comprehension of all mere mortals.

>>106863757
Yeah LYAHFTGG is fucking Reddit redefined. But I like the typesetting.

I prefer to fuck the camel, instead of eating the curry. OCaml is my functional bae. I plan on implementing SML for GCC. I like Haskell, but I don't trust SPJ's compiler enough that it will TRULY optimize my code away from the functional abstract, you know?

For example, for these silly books I generate with AI, if I wanna run with `--embed-resources`, it takes forever to compile from Markdown to HTML. I have generated a template for my books with GPT that I'm happy with. It's very minimal. I don't know why it takes so long for Pancuck to embed it.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863815
>>106863759
> Effective Haskell

Noice. Don't have that book.

"...From First Principles" is written by two millennials who've met on Twitter. "... For the Greater Good" is often cited as Reddit core, but two people meeting on Twitter, then writing a book together, and oh, also, one of them being female, is absolutely Reddit personified.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863852 >>106863868 >>106863870
>>106863795
It came off as a bit vague, what i mean is, Pancuck gets slow sometimes, and as the primordial 'killer app' of Haskell, I wonder, if it's related to Haskell's inability to abstract away the functional, combinatory-based logic.

Like, am I sure GHC is not going to compile a fixed-point recursive loop, into an imperative loop? Or is it just going to naively compile it?

OCaml's optimizing compiler is much faster than GHC.
Anonymous No.106863857
>>106863681
>Grow up.
What does this have to do with what I said? I didn't even contradict gcc being shitty, I'm just pointing it out to you that clang is a shitty frontend
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863868
>>106863852
And I just love it that, abstractions of Haskell being so much more convoluted than Rust's, it being technically an imperative language, and GHC still compiles faster than Rustc!
Anonymous No.106863870 >>106863907
>>106863759
>Sadly the popularity is declining.
being killed by ((committees))) appealing to a fictional industry (which is 99% evil banking corps)
>>106863852
>am I sure GHC is not going to compile a fixed-point recursive loop, into an imperative loop
it can do this, depends how its done
keep in mind Haskell is lazy by default, and pure, in many ways GHC is a magical optimiser that turns abominably suboptimal slowcode into merely slowcode
Anonymous No.106863902 >>106863918 >>106864003
Why does the ncurses window border just stretch off into infinity like this? There is no code to modify the size of the window or border it should be fixed.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863907
>>106863870
As Chris Okasaki said: 'In light of all these points, functional programming sometimes seem like he dancing bear, of whom it is said, "the amazing thing is not that [he] dances so well, but that [he] dances at all!"'.
Anonymous No.106863911 >>106863917 >>106863939
I have dysphoria.
Anonymous No.106863917
>>106863911
Stop using Rust
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863918 >>106863933
>>106863902
Don't mean to be a neg, but anon, unless you are writing this 4fun and not 4profit, if you truly wanna make a TUI app, use Rust + crossterm.

I wrote a small pager with it:

https://github.com/Chubek/nevermore

and it just werrrkd.

Compare with my other pager:

https://github.com/Chubek/Mukette

which does not wort at all, and ironically, is my most-starred project (not that I care about Jewhub turning Git into a social media, but still, I like updtoos.).
Anonymous No.106863933
>>106863918
If I was doing this for anything other than fun I would be in a mental institute.

I just want to know why the window border is getting bigger.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106863939
>>106863911
I don't have dysphoria, but if it wasn't so hard to transition in this shithole (gotta pass through so many hurdles, my cousin is FTM, and she had to get a lot of papers signed to get the op), I would definitely start HRT and become a woman, because my thinking is, I've lived 32 years as a man, and it would be fun to live the 28 years or so that I've left as a woman.

Also, I'm under the belief that, I will get to have sex more easily if I transition. "I'm the girlfriend now!".

I feel comfortable as a man, but my view towards sex change is my view towards using LLMs, "If it's available, use it".
Anonymous No.106863984
>>106858071 (OP)
That's a man.
Where can I fuck him?
Anonymous No.106864003
>>106863902
Would ya look at that.
Anonymous No.106864036 >>106864052
>>106861755
Based beyond belief
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106864052
>>106864036
That's nothing.

There was this truck driver, and this was a few weeks back, who post anti-Trump shit, and I could not care less about Westoid politics (until I'm mowing NATO soldiers in the Khuzestan corridor with my mighty G3), so I told him "I cannot wait until you crash your lil truck and none of your pro-Trump friends come to your aide after you beg for help on the C.B. radio".

Haven't seen him on my feed for a long time.
Anonymous No.106864154
>>106861730
awesome
Anonymous No.106864167 >>106864176
Could some of you Haskellers maybe give me an insight of why the Quick Jump feature on hackage does not seem to work for me?

https://hackage.haskell.org/package/h-raylib-5.5.2.1

When I click Quick Jump in Firefox I only get a site reload ... I also remember there being a keyboard shortcut which usually worked for me, but I don't know which one it was :(
Anonymous No.106864173 >>106864178 >>106864201
>>106858071 (OP)
i has some structs in C
it looks like
struct structA {
uint8_t len;
char *str;
struct *structA;
};

struct structB {
uint8_t flags;
uint8_t sA_count;
struct *structA;
};


whats the best, non-niggerlicious way of serializing it so I can send it over a socket?
Anonymous No.106864176 >>106864180 >>106864199
>>106864167
it doesnt work for me there either, but if you go onto the actual source by clicking index it does
https://hackage.haskell.org/package/h-raylib-5.5.2.1/docs/doc-index.html
Anonymous No.106864178
>>106864173
> struct *structA;
more like
[code struct structA *next;
sorry i am retard
Anonymous No.106864180
>>106864176
works for me on this one though https://hackage.haskell.org/package/base
so maybe it's an issue with how it is documented?
Anonymous No.106864199 >>106864211
>>106864176
Thanks! I browsed through the index but it didn't occur to me that the quick jump link there might work. Also weird that it seems to work for some packages.
Anonymous No.106864201 >>106864204
>>106864173
Preferably you upgrade to C++ or other more powerful language and use capnp or protobuf.
There are some 3rd party implementation of these for C, but they are probably not as well tested/feature complete.
Anonymous No.106864204 >>106864219
>>106864201
i am working on a rather obscure OS, so neither are an option
Anonymous No.106864211
>>106864199
It worked on this version too https://hackage.haskell.org/package/h-raylib-5.5.1.0
Anonymous No.106864219 >>106864232
>>106864204
Why do you need a serialization on OS level and why is it not an option?
Anonymous No.106864232 >>106864237 >>106864260
>>106864219
it's not at OS level, but there's no C++ compiler and it's libc deviates a lot from the standard.
Anonymous No.106864237 >>106864260
>>106864232
i just want some pointers on how to write a serializer that doesnt suck
Anonymous No.106864260
>>106864232
>>106864237
You either write what you would get from these libraries by hand, or write your own implementation of either for your custom target. All depends on how many structures are you going to serialize.
Felafel ben Samusa, the Jewish Scholar at the Court of Harun al-Rasheed No.106864261
https://www.youtube.com/watch?v=mmI76CzJ3TM

Sorry for off-topic, but this is both /v/ and /int/, so let's meet in the middle and post it in /g/:

DOES THIS RETARD THINK SERBIAN IS A LANGUAGE.

HA HA HA HA OH WOW.

Serbian does not exist. Croatian does not exist. They are both a regional dialect of Bosnian!!!
Aristoxenus Rastapapalus No.106864313
i cant lern latex
Anonymous No.106864499 >>106864531
>enter maid /dpt/
>there are no maods
>just one low IQ schizo dominating the whole thread while retards throw peanuts at him
I wish maids were here.
Anonymous No.106864531
>>106864499
It's the persian, all of them
Anonymous No.106864535
>>106858071 (OP)
This bitch is so mid, unless xhe has a penis of course
Anonymous No.106864644
>>106858103
>her
Anonymous No.106864728
>>106858103
she pays indians to shill here

the spam always comes in waves