← Home ← Back to /g/

Thread 106339960

332 posts 118 images /g/
Anonymous No.106339960 [Report] >>106340140 >>106340511 >>106342400 >>106343052 >>106344503 >>106347029 >>106351990 >>106352285 >>106353385 >>106358369 >>106358763
/dpt/ - Daily Programming with Tohru
What are you maids working on?
Previous: >>106289603

>Official Dra/g/on Maid Board Maidposting Guide
Please be polite when posting on the Dra/g/on Maid Board. Be nice to other maids and attach an image of your favorite maid to each post where you do not need the image field for something else (a process traditionally known as maidposting).
Anonymous No.106340027 [Report] >>106340038
Is this thread gonna get pruned?
Anonymous No.106340038 [Report] >>106340080 >>106343052
>>106340027
Hopefully. I hate avatarfags with passion.
Anonymous No.106340080 [Report]
>>106340038
Tohru is not an OC
Anonymous No.106340132 [Report]
Has the previous reached bump limit already?
Anonymous No.106340140 [Report] >>106340379
>>106339960 (OP)
here you go, buddy
Anonymous No.106340379 [Report]
>>106340140
At least use anime ace.
Anonymous No.106340412 [Report]
stop avatarfagging you cultist nigger
Anonymous No.106340419 [Report]
maid dance
Anonymous No.106340511 [Report]
>>106339960 (OP)
I start liking you eli, even though you're a tranny you also make all the other trannies mad, keep up the good work !
Anonymous No.106340518 [Report]
>>106339267
Stupidest post of the week award goes to you, anon! Congratulations!
Anonymous No.106340532 [Report] >>106340714 >>106341826 >>106344546
>everything's already been written
>the tech industry is now running on a skeleton crew of jeets and vibecoding assholes generating CRUD garbage at 10x the speed
is it even worth learning to program in 2025?
Anonymous No.106340610 [Report] >>106341522 >>106346883 >>106348464 >>106353944
Fixed the ai, turned out nothing was borked with them at all, they just needed a function I hadn't implemented yet, initnearcars, and were confused about what to do.
Anonymous No.106340714 [Report]
>>106340532
trust me, nothing of value is lost. the places doing that shit are hell on earth to work at, always have been.
if you don't actually give a shit about programming and you just want to do it because someone told you it paid well, then no.

you want to know the best position to be in? part of a small firm that sells licenses to large businesses. you do not want to actually work for the large businesses. i spent 12 years of my career doing that, trust me, life is too short to answer to a gaggle of busy-body non-technical managers with fake HR attitudes. office politics will chew you up and spit you out. if you're going to subject yourself to that, at least get paid well. go work in finance. it'll suck your soul out all the same, but you'll make way more cash than even the most lucrative programming gigs in silicon valley will ever offer you.
Anonymous No.106340905 [Report] >>106341202 >>106341235 >>106341264 >>106341352 >>106341714
I'm trying to understand UB but it seems really fucking retarded. Say I have a string defined as const char [N] where N is a numeric lit known at compile time. If I write something like this

#define N 256
const char string[N] = { ... };
...
size_t i = N-1;
...
if ((string[i] == something) && (i+1 < N) && (string[i+1] == something_else)) {
do_thing;
}


because i+1 in string[i+1] being >= N would result in undefined behavior, the compiler can make the assumption that i+1 will never be greater than or equal to N and that the second check in the if therefore can safely be factored away so the resulting code the compiler will generate looks like
if ((string[i] == something) && (string[i+1] == something_else)) {

Am I understanding that right? If so, what the FUCK? How do I even write this so that it works?
Anonymous No.106341130 [Report]
tohru is my wife please stop posting her thank you
Anonymous No.106341202 [Report] >>106341853
>>106340905
i is not a compile time constant so it won't do that
Anonymous No.106341235 [Report] >>106341853 >>106342260
>>106340905
also string [i+1] is after the guard operator so it's evaluation is depdendent on i+1<N, not the other way around
Anonymous No.106341264 [Report] >>106341853
>>106340905
Did you try looking at this in godbolt to check if your assumptions are valid
Anonymous No.106341352 [Report] >>106341853
>>106340905
That's not how undefined behavior works. Start looking at disassembly and stop being retarded.
Anonymous No.106341517 [Report] >>106341713 >>106341894
I only enjoy bash...
Anonymous No.106341522 [Report]
>>106340610
you can collide with the other cars now too
Anonymous No.106341713 [Report]
>>106341517
my sincere condolences
Anonymous No.106341714 [Report] >>106341853 >>106341893
>>106340905
No, the check comes before the UB element access as expressions chained with && are evaluated and appropriately short-circuited in order, therefore the UB is avoided. UB is easy to avoid, the problem is people write code that assumes C behaves like assembly for their target architecture then wonder why the compiler "broke" their code. Are the rules and assumptions made in the standard unproductive from a system programmer's point of view? Maybe. But the issue is the programmer, not understanding the contract he has with the language, violating the contract and wondering why his code is broken.
Anonymous No.106341826 [Report]
>>106340532
Learn for fun
Anonymous No.106341853 [Report] >>106344559
>>106341202
>>106341235
>>106341264
>>106341352
>>106341714
this is the closest example I can find in relation to my own
https://youtu.be/w3_e9vZj7D8?t=1511

this guy is apparently on the C standards committee and he says the compiler can make those kinds of assumptions about UB but I also can't replicate any of his examples so I don't know what to believe anymore
Anonymous No.106341893 [Report]
>>106341714
I have ~100k lines in C++. Inside of it are many, many instances of undefined behavior. I compile with O3. The compiler has never bitten me in the ass and "broken my code". Not once in the last 8 years. The most unexpected thing it ever did was erroneously optimize out a (useless) copy of a vector I made and clear()'d the original vector.
std::vector<SomeType> intermediaryVector;
for (auto& someVal : parentContainer) {
intermediaryVector.emplace_back(someVal); //parentVector was at one point a hash map, hence why this code is doing this.
}
parentContainer.clear(); //Compiler codegen cleared intermediaryVector here because it was just an alias. Smart compiler, dumb programmer.


Absolute dogshit code that only came about because I was iterating over a serialization feature and not cleaning up after myself when making changes.
And yet it was not undefined behavior, and it was doing that on O0. It was also a trivial fix, I just actually stopped being retarded for 5 minutes and cleaned up after myself properly.

I can't imagine what kind of programmatic diarrhea you have to be leaking into a codebase to be this afraid of your compiler. And to add on top of that, how bad at your job you have to be for it to not be immediately noticeable and fixed.
Anonymous No.106341894 [Report]
>>106341517
https://www.youtube.com/watch?v=L967hYylZuc
Anonymous No.106342260 [Report]
>>106341235
>the guard operator

The what?
Anonymous No.106342277 [Report] >>106342312
How many of you are wearing maid outfits right now? Be honest....
Anonymous No.106342312 [Report] >>106342348
>>106342277
No one would wear their uniform during their break time
Anonymous No.106342348 [Report]
>>106342312
You wear the outfit because it has frills and is very cute and your Maid Computer conveniently fits in the apron.

Also, it is very sad that the GPD Win 5 will not have a physical keyboard and will also need an external backpack battery and consequently will not be a Maid Computer. They went backwards on design.
Anonymous No.106342359 [Report] >>106342380
Everything about developing on Windows is so fucking ass. Linux is basically an IDE as an OS.
Anonymous No.106342380 [Report]
>>106342359
Linux can also be made much cuter and have more maids on it. I have never seen a cutely themed windows or macos, but there is moe theming for Linux. Probably because as you mentioned it is almost an IDE as an OS so naturally a lot of users are maids.
Anonymous No.106342400 [Report] >>106342409 >>106342608 >>106345440
>>106339960 (OP)
fuck off eli
ywnbaw
Anonymous No.106342409 [Report] >>106342608
>>106342400
checked
holy based
Anonymous No.106342608 [Report]
>>106342400
>>106342409
>t. midgets
Anonymous No.106342643 [Report] >>106343011 >>106343660 >>106348786
what is the C++ OOP equivalent of this?

#include <stdio.h>
#include <stdlib.h>

enum struct_type {
type1,
type2,
type3
};

struct Type1 { enum struct_type type; int x; };
struct Type2 { enum struct_type type; int x; int y; };
struct Type3 { enum struct_type type; int x; };

void * create(enum struct_type type) {
void *p = NULL;
switch(type) {
case type1:
p = malloc(sizeof(struct Type1));
case type2:
p = malloc(sizeof(struct Type2));
case type3:
p = malloc(sizeof(struct Type3));
}
*(enum struct_type *)p = type;
}

void print_obj(void *obj) {
switch(*(enum struct_type *)obj) {
case type1:
printf("type1: x=%d\n", ((struct Type1 *)obj)->x);
break;
case type2:
printf("type2: x=%d y=%d\n", ((struct Type2 *)obj)->x, ((struct Type2 *)obj)->y);
break;
case type3:
printf("type3: x=%d\n", ((struct Type3 *)obj)->x);
break;
}
}

int main()
{
void *arr[3];

arr[0] = create(type1);
arr[1] = create(type2);
arr[2] = create(type3);

for(int i = 0; i < 3; ++i)
print_obj(arr[i]);

return 0;
}
Anonymous No.106343011 [Report]
>>106342643
Virtual functions. This is shit C code though. Use a union, not a void pointer.
Anonymous No.106343052 [Report]
>>106339960 (OP)
sex with Eli.

>>106340038
kys
Anonymous No.106343062 [Report] >>106343219 >>106346249
is it bad practice to overload == for a 'unique' comparison that is not truly unique? like if I have a game with an array of blocks and want to check for a matching block type I could overload == to compare that type while ignoring the coordinates of the blocks which differ
Anonymous No.106343092 [Report]
fixed multi media and now it's all 100% working
lots of testing and weird little bugs broke the out of box installers earlier, at first it was the Windows installer missing dependencies, then it was the Linux desktop client running into seg faults because of the multi media bullshit, but now I can proudly say it's all mostly fixed with no major issues
Anonymous No.106343219 [Report]
>>106343062
I personally would not do that. The equality operator when applied to data objects is typically used to check if the object is the same exact object, or if it's two separate entities then typically it checks if they "match" each other (though this isn't always properly implemented).

Just add a function to compare the types or add a lightweight identified field to your objects. Something may change later and you might want to undo the equality overload.
Anonymous No.106343259 [Report]
chu chu yeah
Anonymous No.106343348 [Report]
I'm tired today Tohru, no programming, just gym and world of tanks
Anonymous No.106343558 [Report]
are you even a programmer if you use windows ?
Anonymous No.106343603 [Report] >>106343846
is this function pronounced faggots?
Anonymous No.106343660 [Report]
>>106342643
>Cniles use void*, no templates/generics
Anonymous No.106343846 [Report]
>>106343603
no because F(ormatted) GetS(tring) is 3 words not 1
Anonymous No.106343883 [Report]
>shit doesnt work
fuck this fucking TRASH scripting language bethesda games use
Anonymous No.106344303 [Report] >>106345046 >>106345144 >>106346796 >>106346817 >>106374082
I'm so bored. How do I fix this? I have NOTHING I want to do and NOTHING I enjoy. I need something. Please respond.
Anonymous No.106344503 [Report] >>106350554
>>106339960 (OP)
BeefLang, the hidden gem.
Most will have doubts. To convince them,
I write this love letter, of a language forsaken by fame,
As its obscurity is a serious shame.

To speak of its glory, the source of my praise
Is the IDE that completely slays.
Visual Studio left in the dust,
A tool in which you can truly trust.

With you, I want to be frank.
On compile-time powers you can certainly bank.
Godly features let you do all,
Unmatched by any language, big or small.

Within the language, anything goes,
Metaprogramming that truly glows.
No other tongue can match this might,
A programmer's pure delight.

Debug guards against memory woe:
Leak detection's gentle glow,
Double-frees it won't allow.
A GC's grace, but for the now,
For bugs you didn't mean to sow.

Though even now, with all its might,
There's a plight:

Ensure libraries you don't require,
Lest you find yourself in the mire
Of writing bindings that will tire.

And what of other limitation?
More weak points do coders see.
Even my views aren't pure admiration,
So let's get that out of the way, shall we?

Memory management I find taxing.
Each allocation needs careful thought,
Unlike C++ with constructors relaxing,
Where move and copy are easily taught.
Every pointer must be tracked and caught.

The ecosystem remains quite small,
Libraries scarce when duty calls.
What in other tongues comes free,
In Beef requires DIY spree.

C# beckons when resistance I've fought.
For projects where ease is sought,
The path of least resistance wins,
Where thinking of memory never begins.
A sigh escapes as I give in.

For those who seek the path of might,
Where control and speed unite,
BeefLang waits with features bright.
A language built for those who fight
For every cycle, every byte.

So here stands this language divine,
Waiting for its chance to shine.
Though adoption may be slow,
And some tools have room to grow,
BeefLang remains, for those who know,
A treasure in programming's flow.
Anonymous No.106344546 [Report] >>106360163
>>106340532
No. Not yet. But get ready for "the next great race."

Quantum computing will NOT be done the way people are thinking right now.
It will be unlocked through atomic scale printing, allowing current sized chips to become thousands of times more efficient, virtually overnight.
EFFICIENT. Not POWERFUL.
You won't need thousands of times more heatsinks for this leap, lads.

But there'll be a race to "talk" with this shit, and the people that come up with the languages to utilize it first will become billionaires.
The people who work with them will never have to worry about money again, either.
Anonymous No.106344559 [Report]
>>106341853
can make doesn't mean will make
e.g. i think gcc locks strict aliasing behind a flag
Anonymous No.106344717 [Report] >>106347083
what is the point of learning Zig or Go, hell, even Rust...
The job market outside of the big 4 (Python, Java, C++, JS) is really thin, especially outside of the united states.
Anonymous No.106345046 [Report] >>106345109
>>106344303
Man it sucks to be depressed. I was the same, until I sought Allah and (as a result) the betterment of my life. Change what you can + don't want in your life and don't keep worrying about the things you can't change. Improve your sleep schedule.Write down the long-term goals in an easily accessible todo list or similar.
I ended up losing weight and changing my job. Now, I am going through my personal projects at my own pace.
Anonymous No.106345109 [Report]
>>106345046
That's good for you but I already live well I'm just bored and lack ambition and will. There's no long term goals I have none.
Anonymous No.106345144 [Report] >>106345187
>>106344303
stop masturbating
Anonymous No.106345187 [Report] >>106345202
>>106345144
I already tried/am doing that.
Anonymous No.106345202 [Report] >>106345318 >>106345390
>>106345187
what's your longest streak?
Anonymous No.106345258 [Report] >>106346832 >>106346855
It feels like a lot of programming is just using some black box that someone else developed and that bugs me. Pre defined libraries and objects and such.
Anonymous No.106345318 [Report] >>106345367 >>106345386
>>106345202
I don't know about half a year. It's not something I've ever had to think about.
Anonymous No.106345367 [Report] >>106345411
>>106345318
that's very good
what about stimulats? (sugar, alcohol, caffeine, drugs, etc)
sleep schedule?
entertainemnt consumption?
Anonymous No.106345386 [Report] >>106345411
>>106345318
Full blood test.
Now.
>Can't afford-
Borrow.
Anonymous No.106345390 [Report] >>106345445
>>106345202
Mine was 4 months. Nofap only still exists because almost noone can do it, so they imagine it would be a miracle if they managed to do it.
Anonymous No.106345411 [Report] >>106345634 >>106346208
I appreciate the concern towards my health but I lack ambition. I just don't care about anything I'm not depressed.

>>106345367
I drink coffee twice a day, sugar is normal. Sleep schedule is consistently 1:30am to 10am. Entertainment is minimal because I don;'t feel like doing anything. I'm currently on a cut so gym is minimal.

>>106345386
I had a blood test last year and it didn't show anything. Nothing has really changed but I'll think about it.
Anonymous No.106345440 [Report]
>>106342400
what game
Anonymous No.106345445 [Report]
>>106345390
It's useful insofar as retards who can't stop pulling themselves asunder four times a day will reach peak benefit after two weeks (lol...) because semen/swimmers are the most metabolically expensive cells your body can make. After that period, your body just recycles and remakes anyway...
Literally just go once a fortnight and you're golden, any longer is of no benefit.
But if you're still fucked, or can't utilize the benefits, then the problems are elsewhere.
Anonymous No.106345453 [Report] >>106345469
>imagine bumping a fagged up programming OP thread
Anonymous No.106345469 [Report]
>>106345453
>reeeeee I entered a thread that I knew I wouldn't like and now I'm upset, why us this happening to meeeee!?!?
Man, being a 5 on the apple chart must be nice
Anonymous No.106345634 [Report] >>106345676
>>106345411
>sugar is normal
idk what that means, to me that's close to zero
anyway, I suppose you should try find something else to do. Read something you wouldn't usually read or pick up caligraphy, idk
Anonymous No.106345676 [Report] >>106346136
>>106345634
>should try find something else to do
That's the problem.
Anonymous No.106346136 [Report]
>>106345676
Become a Zen master.
Anonymous No.106346189 [Report]
The C++ standardization committee is insanely incompetent. how did they let that POS contracts proposal go though. There is no future for this language. It will just keep getting worse. What a clownshow.
Anonymous No.106346208 [Report] >>106346219
>>106345411
If you're not overweight, then there's a very simple trick that takes ZERO motivation to get the ball rolling and exploit the subsequent momentum into other activities.

Before you get out of bed - time irrelevant - push over the covers and do ten decent stomach crunches.
THEN get out of bed and do ten pushups.
It takes a negligible amount of time out of your day.

Do the same thing before you go to sleep.
>But my heart rate-
Will settle again, you'll still sleep.

After a week or two, you'll notice it's gotten easier.
Push both morning and evening sets to twenty.

After two weeks, you'll notice how east it's gotten...
See where I'm going wit this?
What else might be easy? Who knows... It might be a brisk walk, or a cycle? Maybe swimming?

It'll be easy. And in ease, you find peace. In peace, there is enjoyment.
People think sitting around all day means you're at peace because you can't hear the gunfire, screaming and chaos of your subconscious at war.
Anonymous No.106346219 [Report]
>>106346208
>east
*easy.
I'm drunk. The answer's not in the bottle, I just need help forgetting the question for now kek.
Anonymous No.106346249 [Report]
>>106343062
Yeah those overloads have an obvious meaning that you shouldn't mess with. a good heuristic is if you overload operator== will it break std::unordered_set. And same for operator< with std::set. With that said you could use a less obvious heuristic like a bitwise operator.
Anonymous No.106346796 [Report]
>>106344303
Boredom is a fertile ground for creativity
Just be open for new opportunities and try to do new things without judging them at prior
Allow yourself to try things, and it's normal to not have long-term goals
Also try entertainment and fap for creativity and openess, ignore the board ascetics
The keyword is giving yourself "permission" to try and to enjoy things
Anonymous No.106346817 [Report] >>106346967
>>106344303
Put on a maid outfit and begin reading about Number Theory. More maids are required.
Anonymous No.106346832 [Report] >>106350588
>>106345258
>some black box that someone else developed
What do you think a CPU is
Anonymous No.106346855 [Report]
>>106345258
You don't have to use them if you don't want to but obviously that will take much longer. It's just logical that writing everything from scratch takes time.
Anonymous No.106346883 [Report]
>>106340610
very cool
Anonymous No.106346967 [Report]
>>106346817
tell me more
Anonymous No.106347029 [Report] >>106353808
>>106339960 (OP)
I'm a newfag, and want to learn C++ to hack and tweak a couple of Qt apps i like. What's the cleanest way to create a dev environment i can wipe without leaving weird leftovers? A Distrobox container?
Anonymous No.106347083 [Report]
>>106344717
I learnt Clojure via babashka because i find absolutely ridiculous that the 2d most used programming language in the world (Python) needs external dependencies or suffer with such basic regex capacities compared with fucking Match from Jeetva. Clojure fills the unpleasant Java gaps so i don't have to use them too much.
Anonymous No.106347313 [Report] >>106347378
Is the real dragon maid anon in this thread? It's been a while since I've seen him last time
Anonymous No.106347378 [Report] >>106347389
>>106347313

714 is about right amount angry
Anonymous No.106347389 [Report]
>>106347378

sorry i forgot
she meant to say gargle
Anonymous No.106348262 [Report]
im modifying a document using paint
Anonymous No.106348464 [Report] >>106348528 >>106359493
>>106340610
Anonymous No.106348528 [Report]
>>106348464
>https://youtu.be/73WegqHbySA
GEDDAN
Anonymous No.106348582 [Report]
What are you maids doing?
I have to refactor a lot of things in my library after adding elliptic curves
Anonymous No.106348710 [Report]
Software is so gay. Why did I put so much time into learning about this trash. Imagine the skills I could have picked up in something useful instead.
Anonymous No.106348786 [Report]
>>106342643
>void * create(enum struct_type type) {
> switch(type) {
Joke's on you, that's functional programming according to the Expression Problem.
Anonymous No.106348811 [Report] >>106348843 >>106349033 >>106349260 >>106349277
I want to write one program with perfect code.
Anonymous No.106348843 [Report]
>>106348811
Haskell
Anonymous No.106349033 [Report]
>>106348811
SPARK
Anonymous No.106349260 [Report]
>>106348811
Heh, nice "perfect" code buddy
*cosmic ray hits your CPU*
Nothing personnel
Anonymous No.106349277 [Report]
>>106348811
What do you consider "perfect code"?
Anonymous No.106349353 [Report] >>106350234
Taking a little trip on concurrency.

a presentation by Mike Acton:
https://cellperformance.beyond3d.com/articles/public/concurrency_rabit_hole.pdf
(from https://cellperformance.beyond3d.com/articles/2009/08/roundup-recent-sketches-on-concurrency-data-design-and-performance.html)

a interview with Joe Duffy:
https://web.archive.org/web/20211117204233/http://video.ch9.ms/ch9/2849/2643acba-b69a-4616-9ebf-f3204a8b2849/Joe-Duffy-Perspectives-on-Concurrent-Programming-_mid.mp4 (535MB)
https://web.archive.org/web/20211218075921/http://video.ch9.ms/llnwd/ch9/4/1/9/6/5/4/E2EJoeDuffyConcurrent_2MB_ch9.wmv (1.1GB)
(different files, same video)

from:
https://joeduffyblog.com/2009/02/22/mostly-functional-but-not-purely-so-just-what-the-doctor-ordered/
https://web.archive.org/web/20150118170617/http://channel9.msdn.com/Shows/Going+Deep/Joe-Duffy-Perspectives-on-Concurrent-Programming-and-Parallelism
Anonymous No.106350234 [Report]
>>106349353
I hate post it notes now
Anonymous No.106350279 [Report] >>106350354 >>106350464 >>106350649 >>106350803
Are you guys smart enough to make practical use out of category theory
Anonymous No.106350354 [Report]
>>106350279
I can only keep up to maybe halfway through sheafification of g videos. I could never use any of that in practice.
Anonymous No.106350415 [Report]
>practical use
>category theory
Pick one
Anonymous No.106350464 [Report]
>>106350279
Haskell
Anonymous No.106350465 [Report] >>106350604
friday night vibe coding session. absolute kino. dabbling a bit into web deving. js is such a nigger language. my site's got barely any functions and my worker index.js is already 500 lines long. cloudflare workers are breddy good though once you get the hang of it. and it's le freee
Anonymous No.106350554 [Report]
>>106344503
>*nix as Tier 2 support
>no LSP or vscode extension
>always have to type out mem allocator, except for primitives (nums, chars, bool)
>dynamically sized obj on scope (stack)
>meaningless design choices like int32[?], instead of just int32[] for inferred len
DOA. StringView and member access cascade are nice though.
Anonymous No.106350588 [Report]
>>106346832
I get that I could purity spiral following this logic until I'm saying things like
>you're not a real programmer unless you code in binary and fabricated your own pc parts by hand
I'm trying to get over it. It just annoys me.
Anonymous No.106350604 [Report]
>>106350465
>>>/g/wdg
and stop typing like a retard.
>index.js
>already 500 lines long
That explains it. Upgrade to hono + jsx (tsx)
Anonymous No.106350649 [Report] >>106350664
>>106350279
what can you do with it?
Anonymous No.106350664 [Report] >>106350802
>>106350649
It's beyond your understanding.
Anonymous No.106350727 [Report] >>106351212
>janny deleted the maidposts from the maidposting thread
Why is janny like this? All the posts I want to reply to are only in the archive now. To answer Kurumi, it is me, but I am less active now because problems became worse amd am now having a hard time. It is nice to see you again. Please tell me how you are doing. To answer Sharky, I hope your elliptic curves project goes well. I am not working on anything right now because of problems. But I will be active again hopefully by mid September and then I will post my compiler.
Anonymous No.106350802 [Report]
>>106350664
nothing is
Anonymous No.106350803 [Report] >>106350826
>>106350279
possibly, but i've never given a shit about category theory because type theory is right there
Anonymous No.106350826 [Report] >>106351044 >>106351070
>>106350803
Type theory doesn't get useful until homotophy type theory and most people never go that far. Category theory is only marginally useful, and primarily to functional programmers. Most programmers don't actually know math, even if they know what the math is called and know how to apply entry level concepts from it to small code bases.
Anonymous No.106351044 [Report]
>>106350826
>Most programmers don't actually know math
You can know a lot about things like differential equations or logic and not know the first thing about category theory. Futhermore, you could easily understand the actual logic and structure of categories but be filtered by the circlejerk terminology.
Anonymous No.106351070 [Report]
>>106350826
>Type theory doesn't get useful until homotophy type theory
Nonsense, I use ocaml a lot and a lot of the reason why is because of the module system, which itself is basically just system f omega. It's probably the best metaprogramming experience I've ever had, like if sepples templates didn't suck dick and balls.
Dependent type theory is also obviously useful, but the undecidability of higher kinded unification requires proofs, and while that doesn't make it outright useless, it does mean you need serious manpower to do non-trivial things in it. I enjoyed playing around with Idris, but I'd need a more mature compiler and a team of good people to alleviate the burden of the proofs.

What do you like about homotopy type theory anon? Sell me on it.
Anonymous No.106351212 [Report] >>106358188
>>106350727
>Please tell me how you are doing
I am getting by in life, I have graduated about 2 months ago and now I'm temporarily a NEET at least for a year now till i find a job.
I'm glad you're still around, last time I saw you I remember you had an ad on /g/. Did you make your own website yet? do you have any contact info or such?
Anonymous No.106351687 [Report] >>106351732 >>106351796 >>106352656
How do I learn C from scratch? What resources should I use?
Anonymous No.106351732 [Report] >>106351777 >>106352344
>>106351687
read the code of a software you like
Anonymous No.106351777 [Report] >>106351860 >>106351964
>>106351732
how do you know it's good code
Anonymous No.106351796 [Report] >>106352830
>>106351687
>from scratch
Do you mean as a first language?
Anonymous No.106351860 [Report]
>>106351777
it's not
Anonymous No.106351964 [Report]
>>106351777
it's doesn't have to be good code (for getting to know the C language primitives) and don't limit to one code base either
Anonymous No.106351990 [Report]
>>106339960 (OP)
I am attempting to work on an embedded project but cannot get my atmega328p to initialize my sd card.
Anonymous No.106352285 [Report]
>>106339960 (OP)
Been making a self hosted chat app that's as easy to run as a minecraft server, I have accounts/channels/roles/sanitized file uploads, need to get to work on voice/video calls. Should I look at WebRTC like Discord/Slack, or try out Media-over-QUIC now that browsers support it? Feel like I heard there's a limit to how good WebRTC can do for video streaming quality
Anonymous No.106352344 [Report] >>106352710
>>106351732
any recommendations
Anonymous No.106352656 [Report] >>106352769 >>106352780
>>106351687
>https://beej.us/guide/bgc/html/
Learning C is easy. Library and platform shenanigans, on the other hand..
Anonymous No.106352710 [Report] >>106352837
>>106352344
scripting languages
Anonymous No.106352769 [Report] >>106352798 >>106352826
>>106352656
Not to mention dependecy managment.
>just copy this thousands of lines single header library bro
>just copy this .lib/.dll bro
C++ has it much worse, barely working with other C++ libraries. To use a GUI framework like Qt, you end up with replacements even for string types due to a mixture of lifecycles/alloc issues, ABI issues, and many more problems.
Anonymous No.106352780 [Report]
>>106352656
>platform shenanigans, on the other hand..
You know C? Congrats.
http://gallium.inria.fr/~maranget/papers/asplos2018.pdf
https://github.com/torvalds/linux/blob/master/Documentation/memory-barriers.txt
https://github.com/torvalds/linux/tree/master/tools/memory-model/Documentation
Anonymous No.106352798 [Report]
>>106352769
>he uses single-headerr libs and pre-compiled binaries
>he dynamically loads libs
your anguish is your own fault
Anonymous No.106352826 [Report] >>106352948
>>106352769
>installs libnigger
>-lnigger
>-Lfolder if necessary
Anonymous No.106352830 [Report] >>106352970 >>106353094
>>106351796
NTA but yes, how would one learn C as a first language?
Anonymous No.106352837 [Report]
>>106352710
tell me more
Anonymous No.106352845 [Report] >>106352856 >>106352859 >>106352866 >>106352970 >>106352996 >>106374110
>C is easy
it's not. I feel like it's always cybercucks saying this or people in their second year of cs saying this.
C is easy in a classroom until you look at a real program and see compiler directives everywhere, definition ifdefs everywhere, stupid naming conventions, hardware specific inline asm, etc
Python or js are easy. You look at real program for those and it's an endless tower of abstractions but you can follow the code as long as the interfaces are not retarded
Anonymous No.106352856 [Report]
>>106352845
That's a problem of patience and skill, anon
Anonymous No.106352859 [Report]
>>106352845
>compiler directives everywhere
meant compiler builtins, but both work
Anonymous No.106352866 [Report] >>106352874
>>106352845
>C is not easy because there is shitcode out there
>Python and js are easy, as long as we discount the shitcode
guess what the problem is anon!
Anonymous No.106352870 [Report]
For a long time i've avoided AI at all costs, but I finally started using it and I don't think I want to go back. Is it perfect? Absolutely not, but it's an incredible tool if you use it properly. It can generate majority of my code and at worse I go back and fix up details it got wrong. Having proper unit testing is also pretty vital imo.
Anonymous No.106352874 [Report] >>106352927 >>106352948 >>106353831
>>106352866
>>C is not easy because there is shitcode out there
the good C code has all the shit I meantions. Bad C code don't run. And C code without all that doesn't do anything that's worth looking at
Anonymous No.106352927 [Report]
>>106352874
for a public example of good c code, go look at plan 9's codebase.
everything you describe is shitcode made by shit programmers.
>And C code without all that doesn't do anything that's worth looking at
this is a retarded attitude exclusively held by the midwits who write bad c code, which lends them to believe there's nothing wrong with it, and so they never learn to do better. i sure hope you're not one of those people anon!
Anonymous No.106352948 [Report] >>106352990
>>106352874
>Bad C code don't run
unfortunately, linux distros and C programs function just enough to be make you frown constantly out frustration and disgusts.
>>106352826
>Werks on Nigger Machine
Congrats.
In reality: It is 2025 and cniles need hundreds of lines of code to make a cross platform program that merely lists files in a directory.
Anonymous No.106352970 [Report]
>>106352830
I've heard CS50 is a good intro
https://www.youtube.com/watch?v=89cbCbWrM4U
Most important thing is to find an IDE that lets you step through your program's execution. Visual Studio, Xcode, CLion, VSCode with some finagling can work.

>>106352845
C is easy in the sense that the base language has very few features which makes it impossible to hide any details from the programmer so your mental model of what code does is simple and almost always lines up with reality.
Javascript and particularly Python hide tremendous detail from you in ways that take a long time to realize and are not always intuitive.
Anonymous No.106352980 [Report] >>106353032
so when a function takes a pointer argument to something, you can also just feed it the address of whats being pointed to?
it makes sense I suppose. Don't know why I was struggling to understand this considering its spelled fairly plainly at a second glance
int * ptr = &x
Anonymous No.106352990 [Report] >>106353028
>>106352948
Not every program has to run in every environment possible, python/js needs hundreds of lines of code to do that as well, it just hides it from you
Anonymous No.106352996 [Report]
>>106352845
Useless post. TL;DR the syntax is easy, but large codebases, libraries, and build tools are horrible.
Good job. You just wanted to disagree, only to send the same message.
Anonymous No.106353010 [Report]
I have become too depressed to use a computer or post maids.
Anonymous No.106353028 [Report] >>106353062
>>106352990
>Not every program has to run in every environment possible
Cnile are insufferable. When I was learning C, the retards on forums and stackoverflow would go :^) and regurgitate useless shit like
>why do you assume a byte is an octet?
>Do not assume endianness.
Fuck OFF.
Anonymous No.106353032 [Report]
>>106352980
>you can also just feed it the address of whats being pointed to?
how is that different than a textbook pointer?
Anonymous No.106353048 [Report]
https://www.youtube.com/watch?v=eYfBFrrByD8
Reminds me of this.
Anonymous No.106353062 [Report] >>106353171 >>106361201
>>106353028
Your problem is believing these people were right. A byte is always an octet, a char is always a byte, you can assume two-digit complement and so on
Some things are on the standard like the byte/char case, others are just convention, but nobody would make a system with weird shenenigans that no C program would run
I'm talking about making C programs for POSIX only for example
Anonymous No.106353094 [Report] >>106353590
>>106352830
You can through the exercises of a book. I like C language, a modern approach. Implement data structures on your own, then use them in a project of your choice once you're done with the book. A chess engine has its fair share of possible optimizations if you want to go that way.
You can read other codebases and compare to realize how shit your interfaces are and it has known results so you can have an easier time debugging. You might have to read c++ code as well, which isn't a bad thing if you ask me.
Anonymous No.106353171 [Report] >>106353277 >>106353450 >>106353672
>>106353062
>a char is always a byte
Anonymous No.106353277 [Report] >>106353329 >>106353734
>>106353171
>.t troonicoder
Anonymous No.106353329 [Report] >>106353355 >>106353598
>>106353277
People who speak like this deserve to be rounded up along with their families, and gassed. Auschwitz should be refurbished to remove such braindead dysgenics from the gene pool.
Anonymous No.106353355 [Report] >>106353798
>>106353329
>Auschwitz should be refurbished
'Gas' chambers with wooden doors isn't good propaganda in 2025
Anonymous No.106353385 [Report] >>106353392 >>106353412 >>106353429
>>106339960 (OP)
Are long switches/cases really bad or is it a meme by no-code normies?
Anonymous No.106353392 [Report] >>106353453
>>106353385
Are you using javascript or C++?
Anonymous No.106353412 [Report] >>106353421 >>106353453
>>106353385
You might be heard this before but "it depends"
Anonymous No.106353421 [Report]
>>106353412
>might be
I hate posting from my phone.
Anonymous No.106353429 [Report]
>>106353385
They're certainly an indication that you may want to consider using a table or something. Try to make each case no longer than a few lines and have the behavior handled in each case be relatively simple if you can. Think about how much effort it is to keep all the different things that can happen in your head then multiply that by 10-100 and that's how much of a pain it is for people who are unfamiliar with the code.
Anonymous No.106353450 [Report] >>106353734
>>106353171
static_assert(CHAR_BIT == 8);
Anonymous No.106353453 [Report] >>106353601 >>106353616 >>106353836
>>106353392
Depends, but mostly scripting languages. So no fancy data structures.

>>106353412
On? The alternative usually is regex or calling several external modules or programs.
Anonymous No.106353590 [Report]
>>106353094
What about the C programming book? I've heard thats awful for learning though. Was wondering about /g/'s consensus on it
Anonymous No.106353598 [Report] >>106353798
>>106353329
Ok snowflake, cry about it.
Anonymous No.106353601 [Report] >>106353622
>>106353453
>Depends, but mostly scripting languages. So no fancy data structures.
Your question was ambigious. Hence, my question was find to find out whether you meant style or performance.
Anonymous No.106353616 [Report]
>>106353453
>the alternative of switch statements are regexes
lol what
Anonymous No.106353622 [Report] >>106353640
>>106353601
Why does a hello world in C require 148 lakhs of cpu cycles and 42 lakhs of branches?
Anonymous No.106353640 [Report] >>106368809
>>106353622
>not my problem 8)
Anonymous No.106353672 [Report] >>106353697 >>106353734
>>106353171
>From the spec, section 6.5.3.4 The sizeof operator, paragraph 3:
>When applied to an operand that has type char, unsigned char, or signed char, (or a qualified version thereof) the result is 1.
Anonymous No.106353697 [Report] >>106353895
>>106353672
Yes the result always returns 1. Some machines a byte is not 8 bits.
Anonymous No.106353734 [Report]
>>106353672
>>106353450
>>106353277
mojiBAKA-san, please stop holding back technology with your awful takes and stupid language.
Anonymous No.106353798 [Report] >>106353841
>>106353355
We'll give it better doors as part of the refurbishment.

>>106353598
You offer nothing to anyone, and the only way you can improve the world is by leaving it. I would not expect someone in your state to understand this, or to be willing or able to act in the greater good, so the state should step in and kill you and three generations of your family to completely remove all traces of your family from the gene pool. It isn't enough for you to be gassed. They need to get your parents to make sure they can't make more of you, get your siblings to make sure they can't make more similar to you, and get your kids to make sure absolutely none of you is present in the future.
Anonymous No.106353808 [Report]
>>106347029
Bump
Anonymous No.106353831 [Report]
>>106352874
If your code is littered with ifdefs and bare compiler extensions your code is trash. It's like making a giant fucking mess and leaving it there. Clean that shit up, write an abstraction layer, write wrapper macros, but don't leave that shit out.
Anonymous No.106353836 [Report]
>>106353453
>On? The alternative usually is regex
Blowing a fly with balistic missiles right there
Anonymous No.106353841 [Report]
>>106353798
Oh I see, you are hallucinating again.
The same way you are hallucinating that a char can be something else than a byte.
Anonymous No.106353895 [Report] >>106353942
>>106353697
Your program don't have to run in ancient 7-bit machines, or in very specific machines made for something else than general computing
Anonymous No.106353942 [Report] >>106353957 >>106354011
>>106353895
Agreed. However if you care for true portability you need to account for it. If you just want to make some shit one off or contemporary software that may not stand the test of time or does not need to be locale aware, and so on, then these things are not as much of a problem. It is a question of correctness versus convenience, as always. C makes correctness a tedious affair but that is largely a consequence of its age and a desire for the ISO committee and C programmers in general to prefer backwards compatibility over ease of future use.
Anonymous No.106353944 [Report]
>>106340610
pretty cool. kinda reminds me of ridge racer with some wipEout influence
Anonymous No.106353957 [Report] >>106354170 >>106354309
>>106353942
>true portability
that's a pipe dream
Anonymous No.106354011 [Report] >>106354309
>>106353942
How do you want true compatibility and C programmers to not prefer backwards compatibility at the same time?
Also, if you are developing the software through time, you can update it when necessary
Anonymous No.106354170 [Report] >>106354288
>>106353957
cosmopolitan C
Anonymous No.106354288 [Report] >>106354362
>>106354170
Is the original Xbox supported?
Anonymous No.106354309 [Report] >>106354420
>>106353957
It is a possibility if you care to memorize the standard and understand that everything is variable so you must check everything.
>>106354011
I am not preferring any of this. I am stating the decisions being made and the why. Part of the reason for the tediousness is that adding new language constructs to automate some of this facility can break backwards compatibility. It is always tradeoffs and C committee makes a reasonable choice, however there is a consequence that the degree of knowledge required expands over time. This is just a fact of life.
Anonymous No.106354362 [Report]
>>106354288
>modified Pentium (x86)
>no POSIX
>no SDK
>modified COFF
No.
Anonymous No.106354420 [Report]
>>106354309
I agree with that, I just think that pursuing maximum portability is a waste of time, since there's not only language constraints, but also memory and IO
Anonymous No.106354877 [Report] >>106354900 >>106354908 >>106354966 >>106355004 >>106355042 >>106355298 >>106355299 >>106357473 >>106357541
What's stopping you from coding like this?
Anonymous No.106354900 [Report] >>106354908
>>106354877
Skinwalkers
Anonymous No.106354908 [Report]
>>106354877
there's some schizo who's been going around shooting at people.

>>106354900
also this.
Anonymous No.106354966 [Report]
>>106354877
1. I don't own a starlink
2. I hate tiny screens for work
3. I hate outside
Anonymous No.106355004 [Report]
>>106354877
>waste time traveling only to be distracted by the laptop instead of going for a walk and enjoying the environment
I'd rather stay at home and work, with the benefit of more than one tiny screen, or go outside and leave the laptop at home instead of getting the worst of both.
Anonymous No.106355042 [Report]
>>106354877
Be real, you're not that far from your car.
Anonymous No.106355298 [Report] >>106361060
>>106354877
screen glare and sun exposure
for me it's balcony or porch coding
Anonymous No.106355299 [Report]
>>106354877
niggas will hike a fucking mountain to keep procastinating
Anonymous No.106355715 [Report] >>106355746 >>106355791 >>106355905
wtf does it mean when someone says something is "wrapped" or its a "wrapper" for xyz
Anonymous No.106355746 [Report]
>>106355715
a wrapper is usually a secondary interface to a program or whatever that's easier to use
Anonymous No.106355791 [Report]
>>106355715
You have `X`.
You then make `Y` that sits in front of `X` and exposes its functionality in some other manner, or extends it.
`Y` wraps `X`

Think of just about any library bindings from one language to another. Say from C to Java. You end up needing a wrapper library to use the C lib without driving yourself insane with JNI and such
Anonymous No.106355854 [Report] >>106355926
I was told that
>The reason to have an empty constructor is to allow people to create the type without any parameters.
But this compiles and runs. and I don't have to set x, y, or z. What am I missing?
class L
{
public:

int x;
int y;
int z;
};

L test;
Anonymous No.106355905 [Report]
>>106355715
https://en.wikipedia.org/wiki/Adapter_pattern
Anonymous No.106355924 [Report]
Cleaned up a lil bit of UB in my game and Clang's now giving it a clean bill of health (for UB, anyways). Feels good man. I was actually getting an occasional crash from it.
Anonymous No.106355926 [Report]
>>106355854
The compiler is automatically generating your constructor. If you had manually written a compiler that took parameters, the compiler would no longer automatically generate a zero-parameters constructor and your code would fail. Try adding constructor that takes parameters, but don't write an empty one, and see what happens when you write L test;
Anonymous No.106355986 [Report] >>106355992
why did no one ever tell me that object-oriented tcltk was that BASED holy fcuk
Anonymous No.106355992 [Report]
>>106355986
>uh they're not widgets chud they're metawidgets
Anonymous No.106357169 [Report] >>106357406
>write interpreter in Java
>realize I can take the input source for the interpreted language, bundle it with the source of the interpreter and compile that to executable with GraalVM
>now the user has an executable of whatever their input code was
Does this count as a compiler written in Java? From the user's perspective, they write code in my language, click compile and get an executable. I stole the architecture from SNOBOL4, and the program that did this was referred to as a compiler?
Anonymous No.106357406 [Report] >>106357508
>>106357169
> they write code in my language, click compile and get an executable.
Sure. They totally won't get to enjoy the thousands of sources of failure caused by relying on an external toolkit.
Now you have YOUR bundling and software issues AND GraalVM's. Don't forget the licensing issues at hand, but that won't matter for basement dwellers.
Anonymous No.106357473 [Report]
>>106354877
Battery life
Back pain
Anonymous No.106357508 [Report] >>106357809
>>106357406
>Sure. They totally won't get to enjoy the thousands of sources of failure caused by relying on an external toolkit.
All you have to do is install GraalVM. There are no third-party dependencies in my code itself, it is just written in core java 24. You're just compiling with a specific JDK and invoking native-image to get the executable (or rather, that is what happens when you click the compile button).

>Now you have YOUR bundling and software issues AND GraalVM's. Don't forget the licensing issues at hand, but that won't matter for basement dwellers.
What licensing issues? My code will just be Public Domain and I am not distributing GraalVM. The user will have to install that and add it to their path, but that is the same you would have to do for any JDK. And if they do not want to do this, they can still use the interpreter with any JDK. I suppose there could be compiler bugs, either in my code or with GraalVM, but that is true of any compiler.

>tl;dr: The only thing you need to build my compiler is a JDK, the only thing you need to make an executable with it is GraalVM. I do not bundle a JDK with my compiler, it is the user's responsibility to install the JDK.
Anonymous No.106357541 [Report]
>>106354877
Im not homeless kek
Anonymous No.106357809 [Report] >>106357890
>>106357508
Your current path results to users having to install VS+win11 SDK+msvc and so on windows (which are about 8 GB), in addition to the SDK and env setup.
on *nix, it means having to install C & C++ toolset via build-essentials.
That limits your use cases and audience.
Anonymous No.106357890 [Report] >>106358372
>>106357809
Thank you for the high quality response. You are correct, though I think you are overstating the difficulty of installing the tool-chain. I did not consider this because I set GraalVM up such a long time ago that I kind of forgot it had extra steps for native-image and assumed it was like other JDKs with the exception of having native-image. This gives me two options, abandon compilation (I might do this) or try to rewrite the interpreter in assembly for whichever machine, and then perform the same trick of basically appending a copy of the interpreter to the assembly generated by the compiler.

The language is primarily for string manipulation, so I am inclined to just abandon compilation entirely. At that point the only dependency becomes a JDK thar can use Java 24.
Anonymous No.106358188 [Report] >>106358318 >>106363330
>>106351212
>I am getting by in life, I have graduated about 2 months ago and now I'm temporarily a NEET at least for a year now till i find a job.
This is good to hear. Which thing did you study this time? Was it math again? It seems like that field has a huge number of existing things and it is fun to make up new things inside it. If you need an interesting hobby, you might like the esolang wiki. Basically a lot of people make languages and systems of computation as an entertainment.

>I'm glad you're still around, last time I saw you I remember you had an ad on /g/.
Thank you. I am glad you are still around too. The ad was purchased by someone who likes maids. Currently jannies are fairly hostile to maidposting in general and me specifically. They don't even ban me anymore, they just delete all my posts. I think they are still angry about Kurumi MaidCard.

>Did you make your own website yet? do you have any contact info or such?
I haven't done this yet, but I plan to in a month or so. Life got changes. Not sure if they are better or worse, but I will not be able to seriously use the computer for at least a month. After that, seriously using the computer will probably be all I do. I was given medications for schizophrenia and I am trying to comply with the doctor but it is extremely difficult because after leaving tend to forget everything the doctor said and think only about computers and maids. Hopefully soon I will have better housing and can resume serious computer use.
Anonymous No.106358318 [Report] >>106358336
>>106358188
Eli, you are fantasist and a pathological liar.
Anonymous No.106358336 [Report] >>106358598
>>106358318
Explain?
Anonymous No.106358369 [Report]
>>106339960 (OP)
>What are you working on, /g/?
I2S

I did not expected so many ways such a simple protocol(and related peripheral) can be set up. But I will try to cover them all.
Anonymous No.106358372 [Report]
>>106357890
There are many options. It all depends on your goal of the project (audience: devs, normals; fun; other;) and how involved you want to be.
You want to go the easy route, which is fine, but at least add an interactive utility like linqpad (without the bloat) for users wanting to see it in action

Back to your original question
>Does this count as a compiler written in Java?
I think it is best to say it is an embedded interpreter.
If you don't want to waste learning about LLVM or a particular micro arch, then just find an alternative to mono.cecil for the JVM and use it to make a compiler (to jvm bytecode)
Anonymous No.106358598 [Report] >>106358852
>>106358336
You pestered good willing people on certain AI generals who tried to teach you things but you never delivered anything back. You did that because you are a liar and enjoy the attention it brings.
Anonymous No.106358763 [Report] >>106358801
>>106339960 (OP)
Is there nothing other than typescript that:
>is not python or ruby tier slow
>is popular
>is easy to make UI with
>has a passable syntax and design choices e.g. not golang or rust
>multi-platform
Man I wish there was a programming language with:
>build.zig
>C#/kotlin syntax
>C++ performance
>corss-platform UI (two modes: unified look-n-feel or native)
>lightweight toolset
>good LSP
>lots of libraries
Kotlin is scratching the itch slightly, but the toolset is such a HUGE PITA and most of jvm libs are designed by boomers.
Flutter/dart feels awfully mobile-first and the 3rd party packages feel shady and very CCP. Performance is not great, either.
Anonymous No.106358801 [Report]
>>106358763
Rust + egui just works
Anonymous No.106358852 [Report] >>106359441
>>106358598
I remember asking for a lot of help with ComfyUI, and then abandoning that because the Science Computer doesn't have a graphics card that works with it and CPU gens were slow and awful. I did post some of my gens. They looked like trash and then I moved on to something else. There is no reason to attempt local generations again unless I get GPUs. Even then I'm worried SD will still make garbage, just faster. Also, I think that was several years ago? I'm not sure anybody actually cares. Is /sdg/ seething about my absence or something?
Anonymous No.106359401 [Report] >>106359486
should 'skills' be individual classes I construct and attach to a character object when they get/equip them or is there a better way to do that sort of thing? each skill has it's own data associated with a character, like skill level, stats, etc and usage of the skill needs to go through the character to modify the output
Anonymous No.106359441 [Report] >>106359546
>>106358852
You are lying again. You never posted anything but images made by other people.
Anonymous No.106359486 [Report] >>106359545
>>106359401
What are some examples of skills? Are they buffs, attacks?
Anonymous No.106359493 [Report]
>>106348464
Fixed GET DOWN. Whiplash just assumes RAND_MAX is 0x7FFF like it is in windows and presumably MSDOS and subtracts from rand() with that expectation for the engine jiggle effect.
Anonymous No.106359530 [Report]
Nim is the C replacement I always wanted
I would've picked Swift, but using the Foundation libraries for basic tasks is painful and annoying
Anonymous No.106359545 [Report] >>106359915
>>106359486
both
>restore health of the target
>summon a beam of fixed size at the current position dealing x dps for 3 seconds
>transform the objects in a radius at position into random objects contained in the set
Anonymous No.106359546 [Report]
>>106359441
>You never posted anything but images made by other people.
This is not true.
Anonymous No.106359915 [Report]
>>106359545
How about an entity has an available_skills component that's a vector of skill descriptors. A skill itself could be an entity with an array of effect components so a single skill can do multiple things. Then you just have a system for each type of effect.
Anonymous No.106360116 [Report] >>106360318
// The frustum:
// ```
// 4 *-----------* 7
// /| / |
// / | / |
// 0 *--------* 3 |
// | | | |
// | | | |
// 1 *--------* 2 |
// \ | \ |
// \| \ |
// 5 *-----------* 6
// ```
struct Frustum {
float3 points[8];
}

Just drew this beautiful diagram.
Anonymous No.106360163 [Report]
>>106344546
Wouldn't they just make a sort of translation language ie you write stuff in whatever programming language you like and it creates "code" or the equivalent of instructions for quantum computers?
Anonymous No.106360318 [Report] >>106360582
>>106360116
>Just drew this beautiful diagram.
learn Haskell
https://hackage.haskell.org/package/needle-0.1.0.1/docs/Control-Arrow-Needle.html
Anonymous No.106360582 [Report] >>106360701
>>106360318
Why are you a Haskell enthusiast? Why this language specifically?
Anonymous No.106360701 [Report]
>>106360582
high level of abstraction
everything is simple because pure expressions
nice type system
only thing it isnt better than 99% of other languages at is writing efficient code
Anonymous No.106360770 [Report] >>106360936 >>106361123 >>106361398
In the python Random library, is there a simple way to do a random.uniform(1,10) that favors lower numbers over higher ones?
Anonymous No.106360936 [Report]
>>106360770
Just calculate the inverse CMF of a categorical distribution and compute its value for X ~ U(0, 1)
Anonymous No.106361060 [Report]
>>106355298
>pic
DIE CALG
Anonymous No.106361092 [Report] >>106361827 >>106361953
We need a maid science foundation for real, with site and everything
Anonymous No.106361123 [Report] >>106361307
>>106360770
>uniform
>but non uniform
???
Anonymous No.106361201 [Report] >>106361694 >>106361707
>>106353062
>a char is always a byte
Sometimes the smallest addressable unit is larger than 8 bits, so a char in C becomes that size, 16 bits for example.
Anonymous No.106361307 [Report] >>106361323
>>106361123
He obviously mentioned getting float random numbers between 1 and 10 with a higher distribution of lower numbers
Anonymous No.106361323 [Report] >>106361366
>>106361307
>with a higher distribution of lower numbers
>uniform
>but non uniform
???
Anonymous No.106361366 [Report] >>106361394 >>106361755
>>106361323
You know pretty well that uniform is the name of the function, and the idea is "something that acts like this function but it's not uniform"
Anonymous No.106361394 [Report] >>106361420
>>106361366
>something that doesn't act like this function and in fact is the opposite of the name of its behaviour
Anonymous No.106361398 [Report] >>106361481
>>106360770
What about some math trick like:
11 - math.log10(random.uniform(1, 10 ** 10))
Anonymous No.106361420 [Report]
>>106361394
You understood it pretty well anon, the function gives float numbers between 1 and 10 uniformly, could pretty much be random.nonuniform
Anonymous No.106361481 [Report] >>106361531
>>106361398
how bout
def notuniform(lo, hi, ff=2):
r = (random.random() ** ff)
return r * (hi - lo) + lo
Anonymous No.106361531 [Report]
>>106361481
That's a better idea anon
Anonymous No.106361694 [Report] >>106361775
>>106361201
>Sometimes the smallest addressable unit is larger than 8 bits, so a char in C becomes that size, 16 bits for example.
Sometimes, machines pretend the smallest addressable unit is smaller than it really is. I've seen machines where char* was really a struct of a void* and an offset within the word.
Because reality sometimes goes FUCK YOU! and flips the board.
Anonymous No.106361707 [Report] >>106361784
>>106361201
Sometimes a cosmic ray can hit your computer as well, but it's pretty rare
Anonymous No.106361755 [Report]
>>106361366
There's lots of different ways to make a random distribution, but an easy one (producing 0.0-1.0) would be:
abs(rand() - rand())

That can then be scaled and translated into the range you want. (It produces a triangular-shaped distribution.)
Anonymous No.106361775 [Report] >>106361791
>>106361694
>Because reality sometimes goes FUCK YOU! and flips the board.
reddit
Anonymous No.106361784 [Report]
>>106361707
>Sometimes a cosmic ray can hit your computer
It happens more often when you're dealing with a rack of computers in a datacenter. More silicon. This is why your machines should have ECC RAM; makes this very unlikely to be a problem, as the hardware can correct single bit-flips.
Anonymous No.106361791 [Report]
>>106361775
>reddit
Cray.
Fuckers.
Anonymous No.106361827 [Report] >>106361894
>>106361092
Be the change you want to see.
Don't get mad if others don't care though.
Anonymous No.106361894 [Report] >>106361953
>>106361827
I have a static personal website, at the best I could make a nicely displayed list of maid-themed projects if I had such a list
Anonymous No.106361953 [Report] >>106361981
>>106361092
This is a good idea. I was considering updating the 4Chan code to allow Maid Cards in hopes janny would adopt the code because it has the latest PHP 8 and solves bugs in the 4Chan code base. Maybe instead I should try to host it somewhere? But then the problem becomes how do we protect it from trolls and illegal images and make sure it is only a place for maids? Maybe the imageboard idea is bad and it should be something else? The problem is that there needs to be some level of interactivity, so maids can communicate and share projects, but this also opens it to malicious people.

If you have ideas I am open to hearing them.

>>106361894
We will have to find a way to list them and host them somewhere. Ideally somewhere you do not have to agree to a TOS with a billion dollar company that hates you to do it.
Anonymous No.106361981 [Report] >>106362161
>>106361953
I don't think there's a problem on hosting in github
If we want to transport cargo, we should use the biggest road even if it's owners are dumbasses, not like they will do something personally against us

The simplest idea is making a site as a hub, while using existing git websites to host the code and 4chan to talk about and share
Anonymous No.106362161 [Report] >>106362200
>>106361981
This could be possible. Alternatively there could be a private tracker and bittorrent could be used to share the projects? A tracker for maids which only contains the maid projects and then static sites could help newmaids find what is available on the tracker?
Anonymous No.106362200 [Report]
>>106362161
Since it's just code, a static website could also host package versions of the projects
Torrent for code sounds overkill since a zip wouldn't be more than a few megabytes at most
Anonymous No.106362324 [Report]
Fucking around with Bevy again. Limiting myself to 2D stuff and keeping the feature count low so the targets folder doesn't end up weighing a ton.
Anonymous No.106362400 [Report] >>106362466
currently want to blow my brains out trying to figure out SDL
Anonymous No.106362466 [Report] >>106362700
>>106362400
What do you find so complicated about it? The API is relatively straightforward and pretty well written.
Anonymous No.106362700 [Report] >>106362754 >>106362784 >>106364283
>>106362466
I'm just trying to read the documentation and do the bare minimum to get a linear progression of making a window, drawing things on screen, affecting things on screen through input, etc.
Getting a window up was fine. But now going through documentation I can see all these things like IMG_Load, SDL_Renderer, SDL_Texture, SDL_Surface and I feel like I have to just throw shit at the wall to see what sticks with these.
Anonymous No.106362754 [Report] >>106364406
>>106362700
libraries that do a lot of things have a lot of different entities its not that difficult, you dont really have to memorise anything and the memory tends to go somewhere anyway after you use it frequently
like imagine looking at a map for a town you've never been and obsessing over all the street names and landmarks you would definitely have to memorise before even thinking about going there
Anonymous No.106362784 [Report] >>106364406
>>106362700
Go look at examples or ask chat gippity.
ImgLoad turns a disk image into a surface. Surface is an image in memory. Texture is a surface for rendering, Renderer rends textures.
Anonymous No.106363330 [Report] >>106364099 >>106364211 >>106371375 >>106376117
>>106358188
>Which thing did you study this time?
The same thing as I told you last time, I was studying [spoiler]medicine. I should start my post-graduate training program after a year (or less if I'm lucky)[/spoiler] However I still have interests in math, physics and chemistry, and I'm currently learning how to create and host my own website.
>The ad was purchased by someone who likes maids
Oh so it wasn't you who purchased it?
>Currently jannies are fairly hostile to maidposting in general and me specifically.
Well that is to be expected, the moderators and jannies are disconnected from the userbase. I want to talk to you more but this is really not the place to do it, so I created a temporary Matrix.org account: @tempacc7763:matrix.org please contact me there if you want, I only intend to keep that account for few days then delete it.
>I was given medications for schizophrenia and I am trying to comply with the doctor but it is extremely difficult because after leaving tend to forget everything the doctor said and think only about computers and maids.
I'm sorry this is happening to you. Though I'm interested in how exactly that happened, how did you get diagnosed and what symptoms you experienced.
Anonymous No.106364099 [Report] >>106364174 >>106364270 >>106364944
>>106363330
>Well that is to be expected, the moderators and jannies are disconnected from the userbase
True, allowing cancerous avatarfags like (You) and Eli to shit threads and break rules. Hiromoot really needs to clean up this trash.
Anonymous No.106364174 [Report]
>>106364099
Eli won.
Anonymous No.106364184 [Report]
What are the maid projects that currently exist?
Anonymous No.106364211 [Report] >>106371375
>>106363330
>add me on discord here's my mossadware tag
Anonymous No.106364270 [Report]
>>106364099
Yep, /dpt/ is dead again Discord won.
Anonymous No.106364283 [Report] >>106364406 >>106364544
>>106362700
sdl does a lot more than simply rendering something on a window
i made my own window and rendering library and rendering is as simple as calling a render pixel to window function on raw rgb pixel data
Anonymous No.106364406 [Report]
>>106362754
I'm not trying to memorize the whole library. I'm just trying to understand how some pieces work so I can figure out how to put them together to do what I want.
>>106362784
Thank you, the summary actually helps
>>106364283
I know that sdl does a lot of things. I'm just trying to figure some of it out so I can actually make something using it.
Anonymous No.106364544 [Report] >>106366961
>>106364283
Is it Linux/Winblows/Mac compatible?
Anonymous No.106364944 [Report] >>106365523
>>106364099
>she thinks a japanese guy is going to punish people for posting anime maids and touhou characters to an anime and japanese culture imageboard
Anonymous No.106365523 [Report]
>>106364944
this is a frog website
Anonymous No.106366764 [Report]
Why is janny like this?
Anonymous No.106366862 [Report]
hi guys, I have an idea about my GSI that I'm going to do today, can someone help me with the building kernel?

For Samsung a5 2016
I'll think I can use re4son kernel of nethunter but I can't build it nah:/
Anonymous No.106366961 [Report] >>106367050
>>106364544
it currently works on windows and linux
Anonymous No.106367050 [Report] >>106367520
>>106366961
Do you have intentions for MacOS support?
Anonymous No.106367520 [Report]
>>106367050
maybe if i get apple hardware for some reason
Anonymous No.106367722 [Report]
>some reason
Anonymous No.106368361 [Report]
I quit my job in March and wanted to slow get into the groove with LeetCode again.
Wtf, my solution to the easiest problem is one of the slowest that's been submitted? Am I retarded?
Anonymous No.106368446 [Report] >>106368911
SDL works on all platforms. If you use their abstraction libraries for stuff like filesystem access, audio, graphics, etc. so does your program.
Anonymous No.106368575 [Report] >>106369776 >>106370681 >>106371137 >>106371375
I feel like my personal projects are always low-skill shit that anyone could do, and I also sit for way too long on one project because I barely have the energy to code after 8 hours of doing it on the job.
Anyone else feel the same way? Any ideas on how to get more interesting stuff done?
Anonymous No.106368809 [Report]
>>106353640
What is he so smug about?
Anonymous No.106368911 [Report]
>>106368446
SDL ruined my pcsx2 experience with borked joystick support. Why is there no calibration tool?
Anonymous No.106369776 [Report]
>>106368575
Maybe do some open source, you won't have to do everything yourself if you don't have much time.
Anonymous No.106370162 [Report] >>106370295 >>106376673
MAIDS MAIDS MAIDS
Anonymous No.106370295 [Report]
>>106370162
Maids projects doko
Anonymous No.106370499 [Report] >>106370634 >>106370676 >>106370678 >>106371010 >>106371152
Is there a standard or good practice when it comes to asterisk positions?
Because I sometimes see code where its written as "class *thing" vs "class* thing"
I know the compiler interprets them the same way, but is there some readability reason for putting them in one position or the other?
Anonymous No.106370634 [Report]
>>106370499
In C type *thing is more consistent, as you might have to do int (*function)(int) or int (*array)[]
Anonymous No.106370676 [Report]
>>106370499
*thing is easier to read and it's the clang-format default I think.
Anonymous No.106370678 [Report]
>>106370499
There is no right way
With casting there is no name to put it on
int* y = (int*)x;
With multiple type declarations it has to go on the name
int *x, *y;
Unless it's typedef'd
typedef int* int_ptr;
int_ptr x, y;

But also using macros around pointer types is a footgun
#define int_ptr int*
int_ptr x, y; // x is an int*, y is an int

Function pointers and array pointers have to go on the name, but also on the return or value type depending on the type
void* (*func)(void);
const char* (*arr)[100];

And again casts make it even worse because there's no name to put it on
const char* (*arr)[100] = (const char* (*)[100])NULL;
void* (*func)(void) = (void* (*)(void))NULL;
Anonymous No.106370681 [Report] >>106370707 >>106371043 >>106371047 >>106371137 >>106371618
>>106368575
Never understood people who don't have a list of project ideas before even getting started, like it makes no sense to me, why the fuck are you even doing this at all if you have zero ideas of your own? Is it lack of inner voice? No self awareness? Like you seriously don't have any ideas and yet you haven't given up and touched grass yet? I just don't get it.
Anonymous No.106370707 [Report] >>106370725
>>106370681
I used to be the same, until I stopped gooning.
Anonymous No.106370725 [Report] >>106370887
>>106370707
I goon and I have more ideas than I can write
Anonymous No.106370887 [Report] >>106370975
>>106370725
3-4 times a day? and do you actually publish anything?
Anonymous No.106370918 [Report] >>106371077
working on some imageboard software
Anonymous No.106370975 [Report]
>>106370887
Not gonna dox myself, but yes

People's problem is not jerking off, but stress that looks for a escape valve
Nonsensical pressure + unrealistic expectations + guilt
You don't flee to gooning if you treat code like a fun activity like gaming, and you can pretty much publish large programs if you code as less as 100 lines per day (which in three months would be 9k!)
And once it's not a escape valve anymore, you can have fun with fapping like any other activity
Anonymous No.106371010 [Report]
>>106370499
always do "type *identifier"
Anonymous No.106371043 [Report]
>>106370681
I just wanted to make video games until I realized how hard good games are.
Anonymous No.106371047 [Report] >>106371136
>>106370681
I didn't say I had no ideas. I said I take too long to finish stuff, so I only get uninteresting stuff done, because interesting stuff would take me ages.
You are unnecessarily hostile, which would be fine if you could actually read.
Anonymous No.106371077 [Report] >>106371121
>>106370918
Come on give it a unique twist.
Anonymous No.106371121 [Report] >>106371375
>>106371077
My plan was to make Yotsuba a simple zip file that doesn't require any database software. The purpose is to open source it and let other people do what they want with it.
Anonymous No.106371136 [Report]
>>106371047
NTA, anything nontrivial will take a few months
But it's worth it, just do a few hours everyday and have a goal list
Anonymous No.106371137 [Report]
>>106368575
>I feel like my personal projects are always low-skill shit that anyone could do
that shouldn't matter
take even the most trivial project idea, as long as you can finish it
>Any ideas on how to get more interesting stuff done?
instead of focusing on being interesting, focus on having utility

>>106370681
you don't need a whole list of ideas
the difficulty isn't coming up with a general idea but formalizing it into something you can implement
if you just have a long list of ideas but no intent of implementing any of them, you're just a nocoder daydreamer
Anonymous No.106371152 [Report]
>>106370499
It's a C vs C++ thing. C++ has classes and type shenanigans more than C and that affects the casual dev.
In C, you read "int *p" as p is a pointer to int. The asterisk is a qualifier.
In C++, you read "int* p" as p is of type (pointer to int). The asterisk is part of the type.
Same thing.
Anonymous No.106371167 [Report] >>106371375
also if you're short on time and/or energy, just make a very granular to-do list and work on the project in small bites
don't be afraid of writing shitty code just to get a functionality working in a shorter time, you can refactor the code as a later step
Anonymous No.106371375 [Report] >>106371482 >>106371494
>>106363330
Thank you for telling me. I will get it and we can speak more with it.

>>106364211
If Kurumi is my Mossad handler then I request that she handle me more.

>>106368575
>>106371167
I am the director of the Science Foundation. If you feel directionless, and you want some direction, I will direct you. I can make a big list of tasks for anymaid who wants to get directed.

>>106371121
Add maids!
Anonymous No.106371389 [Report] >>106372454
never again reply any of my posts maidnigger
Anonymous No.106371482 [Report] >>106373864
>>106371375
What ideas do you have for maid projects?
Anonymous No.106371494 [Report]
>>106371375
Shouldn't maids just clean and be otherwise invisible?
Anonymous No.106371618 [Report]
>>106370681
this
Anonymous No.106372114 [Report]
Creating a textboard (an imageboard without the images) in the gemini protocol

>Same basic posting mechanics as 4chan: 200 reply limit to each thread, after 150 threads, the oldest thread gets deleted
>No accounts, default username is "Anonymous", but you can use a TLS client certificate to sign your posts (CN=username) with your cert's thumbprint as the tripcode
>IP based moderation - i.e, banning users by IP
>Same moderation rules as 4chan. Keep things on topic but otherwise no censorship

(I am not wt snacks)
Anonymous No.106372454 [Report] >>106372936
>>106371389
Why are you so antisemaidic?
Anonymous No.106372936 [Report]
>>106372454
oy desu
Anonymous No.106373864 [Report] >>106373973
>>106371482
Create a voxel engine and use it to visualize and study the behaviors of 1D, 2D and 3D cellular automata.
Anonymous No.106373973 [Report] >>106374284
>>106373864
>cellular automata
always knew maids were bald fucks
Anonymous No.106374082 [Report]
>>106344303
give your brain something new to work with
maybe learn a library you've never ever heard about
Anonymous No.106374110 [Report]
>>106352845
C itself is easy
writing proper C programs isn't (specially the lower the level you go)
Anonymous No.106374284 [Report] >>106375142
>>106373973
She got her hair back after Maidification.
Anonymous No.106375142 [Report]
>>106374284
textbook troon ideology
Anonymous No.106375424 [Report] >>106375469 >>106375744
despite C++ being my comfort language, I'm drawn to the *idea* of writing in C. if I'm making a 3D multiplayer game from scratch is there any real benefit over C++, learning perhaps? glfw and opengl are already C apis too, it's so tantalizing. but what do I even get out of it? char* masochism over std::string?
Anonymous No.106375469 [Report]
>>106375424
it compiles a lot faster
Anonymous No.106375744 [Report]
>>106375424
The benefit is more control and understanding of the processes, along with a more concrete and less abstract view of the APIs
Anonymous No.106375933 [Report] >>106376242
Trying to read documentation of big libraries, even well organized good documentation, feels like trying to decipher hieroglyphs to me.
Even when I understand individual words I cannot understand the whole sentence, so to speak.
Anonymous No.106376117 [Report]
>>106363330
I should be able to reach out some time today.
Anonymous No.106376242 [Report]
>>106375933
Gotta understand their intent as well as what problems each portion is trying to solve. Takes a while to get the picture if the project is big enough.
Anonymous No.106376673 [Report]
>>106370162
maids gave me aids
Anonymous No.106378085 [Report]
I like the idea of C++ but i have a small working memory. I do much better in python.
How to cope?