[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: LinuxBeaver.png (100 KB, 460x460)
100 KB PNG
What are you beavers working on?

Previous: >>109580998
>>
>>109594885
>What are you beavers working on?
nothing right in this moment. I am shitposting from my fedora (TM) 44 and wondering how I can get back into the flow.
How do I get back into the flow?
>>
>>109594885
like a proper, honest to go beaver-
i work on infrastructure rn
ill be refactoring thi because using a function to output an error message turned out to be retarded
i want to shove that into an array and recover the strings by index
>>
I think im gonna use std::shared_ptr on WebRTC rooms so they're only removed when all clients leave
>inb4 malloc schizo sepples regdump
>>
>>109594882
i am not sure why you can't return a sized array, it just has to be copied like how a struct is copied by value, there must be some abi obscure bullshit reason
>>
>>109594980
>>109594995
i forgot how important it is for making macros feel like statements by wrapping them in
 do { ... } while(0) 

do while is very important
>>
>>109595011
>macros
it is the only place in my code where youre gonna find a do-while
and its only to localize variables to the macro
#define NOUVO_STR_TERMINATE(ptr) \
do { \
union { void *vp; unsigned long *ulp; } u; \
u.vp = (ptr); \
*u.ulp = 0L; \
} while (0)


there must be a more elegant way of doing things
didnt actually look for it, though
this code is obsolete for my lib now
>>
>>109594986
I'm not sure of the reason either. It's hard to come up with a reason why statically sized arrays can't work when a struct can.
But what I was talking about was pointers to VLAs, which is something more specific. The type system doesn't handle VLAs well in static contexts.

>>109595033
do while is useful for code that's properly handling syscalls that may return EAGAIN or otherwise similar code.
I've definitely used it in other places. It's the rarest type of loop, but it fundamentally does something different than the other 2, so it deserves to be there.

>there must be a more elegant way of doing things
Type punning a pointer like that doesn't mean it's not violating strict aliasing still.
Just use memset.
>>
>>109595074
>Just use memset.
fuck the commitee and their inbred hallucinations
i write for a compiler and a traget machine
type punning through union is supported on gcc, and clang iirc (gcc 100%, 90% sure about clang)

but in this case, yeah
memset would be more elegant
this is a fucking eyesore
>>
>>109595092
Type punning is more like "reinterpreting the bit pattern of a float as an int" or some shit.
If you're doing that with a pointer, just cast it normally.
>>
>>109595092
>>109595033
interpreting bytes of one type as another type in an union is allowed by the standard,
 float f = *(float *)&x; 
where x is an int is UB, but probably would do the same thing, and yeah in this case
 *(intptr_t *)ptr = 0; 
should be enough, and it probably could be in an inline function.
>>
>>109595100
yeah but then a whole lot of abstract shit from the standard and its delusion of portability makes it so that what you described is verboten
ive done what you said tons of times, never had an issue, but apparently its the most risky way of doing things
so now i use unions bc these are explicitly supported by gcc. and i know youre actually supposed to use memcpy in the case you want to go full idiomatic
>>
>>109595033
Why not include the semicolon as part of the macro? if it's going to be on one line then you can do
#define NOUVO_STR_TERMINATE(ptr); \
union { void *vp; unsigned long *ulp; } u; \
u.vp = (ptr); \
*u.ulp = 0L;
>>
>>109594885
https://www.phoronix.com/news/LLVM-Offload-Rust-Performance
Rust is winning again
>>
>>109595154
probably. im not sure how recasting back into chars stacks up with that, though

i dont have a phd, so i learned C at an operational level
and it seems its enough
a while ago i ran the compiler with the flag to check for ub, on a project that i thought was quite cursed
returned 0.
i think im vindicated in my approach. if you dont do turbo-heretical shit, you most likely wont create ubs without even being able to list them from memory
>>
>>109595170
because if(cond) NOUVO_STR_TERMINATE(ptr)
doesn't do what it looks like it should do, and you can forget the semicolon at the end which messes up the auto formatting, but gives no error or warning
>>
>>109595170
Because if you put that inside of a statement without { }s
// What you wrote
if (foo)
NOUVO_STR_TERMINATE(ptr);
// What it actually is
if (foo)
union { void *vp; unsigned long *ulp; } u;
u.vp = (ptr);
*u.ulp = 0L;

This case would fail to compile because of the scope, but it's much much worse if it doesn't fail.

>>109595155
The autism about strict aliasing is an optimisation thing.
void fn(int *i, float *f) {
read(i);
write(f);
// Should the compiler be able to cache this?
read(i);
}
>>
>>109595170
visual uniformity helps with visual inspection
and i try to keep as much as possible- explicit
this reduces the amount of stuff i have to remember

also its a bad move to remove the macro from the do-while
bc what happens if you have a name collision with your union?
like when using that macro in multiple places in the same compilation unit?
>>
>>109595185
>probably. im not sure how recasting back into chars stacks up with that, though
well it should be equivalent to what the NOUVO_STR_TERMINATE does

>i ran the compiler with the flag to check
i haven't tried that, but watched a talk about UB and got really scared as it seems it can just come out of thin air
>>
>>109595198
>The autism about strict aliasing is an optimisation thing.
yeah, so waaaay above my paygrade even if i learnt the standard by heart
there are things i dont know, and im ok with that as long as these things dont impact me
i have an iq of 125, not 175
i have to pick my battles
>>
>>109595170
generally a macro like that should be an inline function, macros are most useful when you have to do things involving types or "making" your own statment syntax like
 iterate_linked_list(list, element) { *element = 69; } 

or something like that, this is not a good example, but I know the linux kernel does something like that with some structures
>>
>>109595220
>well it should be equivalent to what the NOUVO_STR_TERMINATE does
yeah but heres the thing:
despite being close to the metal, c is still a high level language

its all about expressing to the compiler what you want from it
and which expressions are expected by said compiler
thats why you should still tend to use canonical expressions.

>but watched a talk about UB and got really scared as it seems it can just come out of thin air
run your compilation with the check for UBs then
otherwise, like i said
in my opinion shit's gotta be contrived to elicit an ub
and some ubs are even defined by the compiler, like using type punning through unions.
i think...
im not a "standard-follower", im "it werks on my machine" kindof guy
im really not an authority on that specific matter

but it seems this anon is >>109595198
>>
>>109595240
>pic
i used to write shit like this for goto style error management, the example is not very good but i think it gives the idea, with the ERR_JXX macros you can set the label
>>
>>109595281
oh i forgot the show the comment for the __ERR_J macro, it is
 // syntactic rape 
>>
>>109595256
>and some ubs are even defined by the compiler, like using type punning through unions.
Type punning through unions is actually allowed in C, but not in C++.
But that doesn't actually do anything about getting around changing the "effective type" of what's being pointed to, where the whole strict aliasing thing comes in.

>but it seems this anon is
I'm just someone who occasionally reads through the WG14 document log. Some of it is interesting.
>>
>>109595294
>reads through the WG14 document log
i don't know why everyone seems to think that the C committee is just braindead retard boomers. they are mostly boomers but are actually smart

>>109595281
This can also do:
 ERR_NZ(expr) if(_err.ret > 0) break; 
to skip the goto or
 ERR_NE(expr1, expr2) if(_err.ret < _err.ret2) break; 
for 2 expressions
>>
>>109595294
ok, i learnt something.
type punning through union doesnt change the effective type of the underlying data.
i actually had to look up what you wrote to me. but now its clear.
i also understood why it is a thing. its not necessary today, but in order to not reforge the whole compilation process it wont be changed.

>I'm just someone who occasionally reads through the WG14 document log. Some of it is interesting.
modesty is a nice character trait to have.
you clearly have a good understanding of the matter. you's absolutely deserved
>>
>>109595229
You should be aware of it at least, it can lead to some bugs if you're not careful
https://youtu.be/w3_e9vZj7D8?t=2981
>>
>>>/wsg/6217462
VP8 is a piece of shit, no surprise there. Blurry mess 8 seconds in.
>>
>>>/wsg/6217466
H264 looks much better apart from the tab bar leaking blue ink everywhere. Takes longer to degrade.
I'm stuck with VP8 because firefox doesn't have H264 decoding preinstalled due to some licensing issue
>>
>>109594885
So C pointers are just variables that point to a memory location (ex: 0x7ffee3b8 ) instead of an object?
That's it? I always see other people complaining about C pointers and how they're so difficult to grasp, so I thought it was gonna be this super abstract 900 IQ concept.

Did I misunderstand or miss something?
>>
>>109595993
>Did I misunderstand or miss something?
no you didn't. Pointers are fucking easy.

the only thing is pointer+1 means pointer+sizeof(pointertype). But that's really it.
So if it's a uint8_t then
0x7ffee3b8+1=0x7ffee3b9
and if it's a uint32_t pointer then
0x7ffee3b8+1=0x7ffee3bc
>>
>inb4 some autist comes around the corner with some weirdo edge cases that you'll learn about in your C journey
ok bro, they really don't matter until you need them
>>
>>109595549
i reviewed this video
and honestly, the vast majority of examples given are just contrived, if one knows c's primitives.
like the fact that the pointer is an abstract object. or that an union is a solid memory space with multiple interfaces
all of the things cited in that video just dont make sense from a c-grug's perspective
+ rational practices, like not reading from an uninitialized variable, or dereferencing null

except two.
the first example, with automatic type promotion. i could have gotten caught by it too. im not gl, i didnt know the unsigned shorts are gonna get promoted into ints. but i test often, so i would have caught the bug
yes, i test even easy shit that i think has no chance to fail, but its mostly that im easily distracted, and inattention errors are not an exception in my code, theyre the rule, kek. although its forgetting to increment in a loop 99% of the time.

and the example when comparing the actual value of two pointers that point to the stack.
i dont think i *would have done it bc i know the rule of "pointers are abstract objects", and so one shouldnt treat them as integers
but if i were to program on bare metal, i *might have done that mistake, getting caught up in a situation where i deliberately break out of c's abstract machine, only for it to catch up in an unexpected place
>>
>>109596044
except once you do, its usually because youre debugging a behaviour that makes zero sense from the point of view of your mental model

>>109595993
dont listen to the other anon.
pointer == address is a useful simplification

but in practice, if you go beyond this
if (ptr_1 == ptr_2)
....

this
ptr++;

or this
ptr[n];


ask a shatbot if the operation is permitted.

but yeah, pointers arent a 900iq concept, theyre just references to objects.
basically an address but with a couple caveats
>>
File: 1758413748499110.gif (3.47 MB, 268x210)
3.47 MB GIF
>>109594885
>LinuxBeaver
Man... That brings me back.
What happened to this namefag?
>>
>>109595178
Based Rust.
>>
>>109596052
>all of the things cited in that video just dont make sense from a c-grug's perspective
Yeah it's an advanced talk, the guys says in the beginning these bugs are rare, but very confusing when they happen.
>i could have gotten caught by it too
Tip: you can use -Wconversion flag in gcc to warn you about implicit type conversions, sometimes useful when you're debugging why calculations don't produce desired result.
>>
>>109597442
It's weird that number types cast just fine but not enums. My code is littered with static_cast back and forth between enums and ints.
>>
>>109595993
the fact that all underlying memory except for like registers or whatever has some address and that address can be passed around and used as a reference, incremented, etc while having its own address feels like an abstraction of its own and forces people to completely rethink what's actually going on if their exposure to programming before that had only ever been some scripting language

add in concepts like stack frames and virtual memory and it gets daunting for beginners
>>
>>109595993
>That's it?
yes, at least as far as theory goes
>I always see other people complaining about C pointers and how they're so difficult to grasp, so I thought it was gonna be this super abstract 900 IQ concept.
the concept itself is simple
the difficult part is when it's applied in practice and you have to debug it - you can't just inspect a variable's value directly if it's a pointer, instead you have to navigate through a whole separate layer of meta-programming to get to the value
>>
>>109595178
Winning what? Best language that produces no real software? You really want Rust take the crown from Pascal?
>>
File: file.png (186 KB, 307x415)
186 KB PNG
it sucks that the deeper you go into competitive programming algorithms, the shittier the explanations for everything gets. you have to search hours to find videos that are poorly made, ramble, and are like an hour long on what should be a 15 minute concept. or the videos are made by indians with unintelligible accents. And you're also expected to have a lot of fundamental knowledge at this point, so if you can't figure something out you have to go and read up on that shit too. Even AI becomes increasingly useless because it is really shitty at explaining some of this stuff.

Like take a binary indexed tree (fenwick tree). It's used as an efficient and simple implementation of a segment tree that only supports addition and subtraction, but requires like 1/4 of the code.
Each index is "responsible" for a range depending on how many bits it has flipped to 1, and you climb up and down the tree by inverting the rightmost bit of the index you're querying until you're out of bounds or reach 0.
so for an update:
while i <= tree.len(): 
tree[i] += delta
i += i & -i

what does
i += i & -i 

do? no clue. how could I figure this shit out on my own, assuming I understand how BITs work?
???
>>
>>109600085
i dont remember what a & -a does, but this is probably assuming two's complement so -i is ~i + 1, the + 1 will either increase a bit in i (which & i will remove) or hit a series of sequential set bits which it will zero out
>>
>>109600085
>>109600119
oh I forgot the complement, so you might need to invert this, maybe it's finding a free slot or something idk you would have to think about it
also consider this resource (which might have that in, I haven't searched) https://graphics.stanford.edu/~seander/bithacks.html
>>
>>109600119
>>109600128
I think its something like this
If i = 0, then i += i & -i will do nothing (0 += 0 & -0)
otherwise, there has to be some set bit within the number, and the least set bit will be followed by zeroes (if it's the least bit overall, then 0 0s, but the argument still applies)
In two's complement -i = ~i + 1, so the number before becomes a 0 followed by trailing 1s. Adding 1 will reset all trailing 1s (0s in the original number) to 0 and set the first 0 (the first 1 in the original number) to 1. Masking with i then ensures that any bit that was not set already does not become set, and all the higher bits are also cleared because for the higher bits it is essentially a & ~a
>>
Is (((Lisp))) part of the jewish conspiracy?
>>
>>109600085
My man, the compiler is free
>>
>>109600187
According to stanford and stack overflow v & -v (aka v &= ~v + 1) isolates the least significant set bit (0 if 0) which seems about right given my explanation which can be much shorter: v & -v = v & (~v + 1), v & ~v would be 0. So the only set bits in v & (~v + 1) are going to be those +1 sets in the complement (that are also in the original number). If it doesn't overflow, +1 necessarily sets only the least significant zero, because of the complement that's the least significant 1 in v. (If it went over it would get masked out)
>>
>>109600285
mildly drunk, and forgot to use the broken out vars. whatever lmao
>>
Is only 17% slower than C good?
>>
>>109600285
When did compilers become free?
>>
>>109598953
>static_cast
Is this more powerful than my cocklust?
>>
why the FUCK is reading a png file in C using libpng so convoluted?
I'm reading through this:
https://www.libpng.org/pub/png/libpng-1.2.5-manual.html
This documentation would be incomprehensible if they hadn't given code examples
>>
>>109600452
bro, your stb_image.h?
>>
Can someone please answer >>109600341
>>
>>109600427
1987
>>
>>109600452
In Rust this is just
image::read("file.png")?
or something
>>
>>109600210
>Is (((Lisp))) part of the jewish conspiracy?
John McCarthy was Jewish but imo one of the good ones (he opposed Communism)
I think it's the CLisp compiler that features an ascii image of a menorah when you boot up the repl. Iirc the original creators of CLisp weren't actually Jewish, they just thought Judaism was cool
>>
>>109600285
Isn't that just i+=1?
>>
File: 1765746724790721.webm (4 MB, 868x600)
4 MB
4 MB WEBM
the rust programming experience
>>
>>109594885
cute beaver
>>
>>109600973
kek
>>
>>109600973
Lmao, eventually you'll get it. Meanwhile that C UB will always remain hidden.
>>
>>109600128
>The aggregate collection and descriptions are © 1997-2005 Sean Eron Anderson.
do you have anything made this fucking century?
>>
File: 1770143918727370.jpg (58 KB, 976x850)
58 KB JPG
I need an idea for a project that's useful and will actually get end users, but not too complicated that it will take me 6 months to develop before it's usable.
>>
>>109601795
Ask the ai
>>
>>109601795
a frontend for yt-dlp with the following functionalities
>ability to save a parameters "preset"
>drag n drop a URL into the app to download using the preset parameters
>support for multiple and selectable target folders for downloads
>cataloguing/indexing of downloaded videos and their metadata (title/author/year/website/video code/etc)
>"already downloaded" detection based on aforementioned metadata index, and checking all target folders
>>
>>109601958
how much shit are you downloading from youtube that you need a program to organize it?
>>
>>109602013
yes.
>>
>>109601076
>do you have anything made this fucking century?
has anything good been made this century, zoomzoom?
>>
>>109602207
yes. in fact literally everything you are currently using was made in this century.
>>
>>109602013
about 1000-2000 videos per year
too many cool videos have been removed or restricted so nowadays I download everything I like or find interesting
>>
>>109602216
>everything you are currently using
nothing good then?
>>
File: 1784022539195454.jpg (25 KB, 600x600)
25 KB JPG
>>109601892
>ask AI
>top suggestion is a commercial application that's been developed over a decade by a small team, but they stopped development because its unprofitable
>core selling feature of the application is a massive manually maintained database that makes the application actually work for its users
>>
File: FuzeVD 2.1.0 Capture.png (19 KB, 386x471)
19 KB PNG
>>109601958
That 's what I'd do if I wasn't so occupied with Fuze Mediaboard. I actually made a yt-dlp frontend in the past but it was Windows-only and stopped maintaining it. Making things cross-platform is a nightmare if it's not web.
>>
>>109602455
redeem the Java, sir
>>
>>109600452
those docs looks pretty good tho what are you on about?
>>
File: 1782703446685431.png (671 KB, 918x784)
671 KB PNG
>/g/ can't make an exhentai CLI uploader

not even surprised
>>
>>109600457
I'm aware of stb_image but I'm avoiding for now until I understand how libpng actually works and stb_image itself depends on libpng and I want the implementation to have the least amount of dependencies as possible
>>109602505
It talks about too much unnecessary stuff, like using a custom malloc, setting longjmp and setting up callbacks, like why the hell does a png library need all this, what's the use case for this? this is way more complicated than I expected, though I realized those parts were optional and skipped to the read interface but still the whole library feels way too overengineered
Also the function png_set_sig_bytes_read() is mentioned only once, and this function doesn't actually exist, I'm guessing they made a typo there?
>>
>>109602989
not gonna make shit for you
>>
>>109603361
you can't
>>
>>109594885
hey its me!

I'm going to rewatch a classic https://www.youtube.com/watch?v=_-rNLqgBl1Y
>>
>>109597231
i mostly moved on from GEGL and got my ass kicked by magical girls. I still use Linux. Though I still make plugins time to time.


i'm no longer chronically online
>>
i'm not saying shit like this often but whoever "develops" gnome should maybe not be shot but probably institutionalized. the retarded incompetence that has made it ever more unusable is indistinguishable from malicious sabotage of "The Linux Desktop" as a whole

Files showing on the desktop: "oopsie uwu that's not wowking anymow sowwwwy hihi"
HIDING THE FUCKING WINDOW MAXIMIZE/MINIMIZE BUTTON
NO RIGHT CLICK FILE CREATION POSSIBLE WITHOUT CREATING A "TEMPLATE"

i'm getting a fucking stroke just installing the thing, or should i say "tweaking"?

that any distro still makes it its default is simply incomprehensible to me
>>
>>109603539
stop arguing. Hitler lost the war. It's a fact. You can't argue against that
>>
>>109603539
>that any distro still makes it its default is simply incomprehensible to me
It's mostly because of Ubuntu, gnome2 was actually good, then gnome3 and gtk3 came a long and everything went to shit, but distros kept it the default because that's what they always did.
Take a look at cinnamon, it's what gnome would be like if it wasn't a pile of garbage.
>>
>>109603575
yeah X11 kicked his ass impersonator without the!
>>
test
>>
>>109603416
YOU can't.
I can, but won't do it for you.
>>
>>109603673
Yeah, you're an Indian.
>>
>>109600591
What the hell are you asking? nobody understands what you mean by "17% slower than C", be more specific
>>
>>109604582
The C program finishes in 75s. My program finishes in 90s.
>>
File: images.jpg (24 KB, 513x597)
24 KB JPG
I was debugging some rust code and just realised that all these constructs - ownership, move, lifetimes etc are just compile time checks the compiler makes, they have no runtime representation, for example after a move s1: String -> s2: String, the s1 data structure (fat pointer) still remains on stack until the end, its just if you use s1 later on to access the data it previously owned, your code won't compile in the first place
>>
File: 1715872046405.jpg (210 KB, 1124x723)
210 KB JPG
We finished a networked 2d top-down shooter with JS and DOM-elements as a school project.
>>
>>109594885
>/dpt/
>thread is 1 day and 5 hours old
>94 posts
Where is everyone? Last time I was here there were like 4 or 5 threads a day.

>>109605081
That's nice, what grade did you receive?
>>
Finishing up codewars bookkeeping problem in Java, did some conditional formatting in libreoffice, going to figure out conditional statements for K (I'm using Goal instead though because its easier to use on Windows). I need to make a switch and a foreach that changes the switch and its hard to figure out for me in K. I got it working in BQN though. May try Kap after getting it working in Goal. I like seeing how the same problem is solved in different programming languages.
>>
>>109605133
fewer mass spam posts from schizos
>>
>>109605133
The project implemented everything required and a bit more so a full grade was received.

Group work is such bullshit though. I know it's a good skill to grind but in smaller projects it only slows everyone down.
>>
Deep inside me there is this urge to properly learn modern C++ features and become a magician. But I have the same with Rust.
Yet I sit here all day doing neither of those and just thinking about it.

So what should I actually do?
>>
Weird question perhaps but are you guys also more productive with a 2x monitor setup?
I’m trying to work on my coding project on a small laptop atm as I’m away from home and it feels really grim in terms of productivity

Just wondering if not having a good setup is something you guys feel too or if it’s just me
>>
>>109605803
>more productive with a 2x monitor setup?
no.
Right now I have 2 monitors running again (27 1440p and 22 inch). But I do know and I do realize that this second monitor is just distracting me.
When I can get myself locked in I am usually more productive with one monitor only. 27 inch 1440p feels perfect (havent tried 4k yet)
>>
>>109605803
it helps to be able to have two windows side by side (to see both the code and the application's interface) without either being squished too much, so either have two monitors, or one with high enough resolution

>>109605820
2560x1440 is just wide enough for two windows. it's pretty much the same as having two 1280x1024 monitors but with no bezel in the middle
>>
>>109605803
Yes. One monitor for the code, the other monitor for documentation. I'd like a third monitor for running the program I'm building.
>>
>>109605782
>So what should I actually do?
Code.
>>
>>109604896
yeah that's reason for slow compile times, but if you think about it, you actually save a lot of time in the long run.
>>
What's the most usable esoteric programming language?
>>
'Sup, /g/ents? Feel like accelerating things more? paste dDwjHP3a
>>
>>109603039
>and stb_image itself depends on libpng
no it doesn't. what the fuck are you smoking? stb libraries depend on nothing, that's the entire point
>>
>>109605133
I want to blame the schizophrenia but the threads even without lumping that in are kind of lame so I just assume that everyone over the years slowly made little connections, went into small friendgroups rather than the public web in general and faded away from 4chan.
I miss /prog/
>>
>>109606184
>What's the most usable esoteric programming language?
LOLCODE. It's just an imperial language with funny names for things. It's not actively hostile to the programmer (If I remember correctly)
>>
>>109605390
I remember that Rei creep, and Bruce, but it couldn't have all been creeps right?
>>109605736
>Group work is such bullshit though
Son, where I'm from "TEAM" stands for "Toll Ein Anderer Machts!" which translates to "Great Someone Else is Doing It".
>>109606982
I guess. Site's been deader than my love life.
>>
>>109606982
Why don't we open a new programming forum?
>>
>>109607250
I'm staying right here and finishing my project until the vibecoders take over.
>>
>>109607179
>Toll Ein Anderer Machts!
As someone who actually understand German: lol

>>109607286
We can never fix autism. And *violently* getting rid of autism is about the *only* thing that can save us.

As long as autists are counted as actual human beings we WILL remain screwed, no discussion, no questions asked. We FIRST have to make autists devoid of human rights; THEN we're talking.
>inb4 never gonna happen
I know.
>>
>>109607179
>Son, where I'm from "TEAM" stands for "Toll Ein Anderer Machts!" which translates to "Great Someone Else is Doing It".
>hh3h3h3hh33 look i made that funny joke again XDDDD
you must be younger than 60 to be allowed to post on this forum
>>
>>109607395
Anon younger than 60 reporting,
Sie verwenden das Akronym immer noch,

You know because I spelled "Akronym" correctly.
>>
>>109607395
>you must be younger than 60 to be allowed to post on this forum
I'm 28 ... I'm the spear-tip of GenZ and I'll be damned if I don't flex T.E.A.M. on others like Millenials flexed on me.
>>
>>109607412
That's your fault if you react in ANY way when people say that fucking unfunny shit.
Just say nothing. Don't even reply. These fags should just realize that it is not funny and small talk is the cancer that kills work
>>
>>109607362
Autists are just people whose brains have shorter neurons. Women's brains on average have longer neurons than men's, and an autist's are shorter than both. Also the corpus callosum - which connects the left and right hemispheres together - is narrower for autists.
It's not immediately obvious why autists exist evolutionarily but maybe something to do with a tribe needing a diverse skillset. They're too common to be written off as a genetic malfunction. Also it's a spectrum and the extreme is less common but more identifiable.
Autists don't really fit into modern society well, which is a shame because they're fully capable of doing good work if given the chance, but need help with navigating social structures and finding their place.
>>
>>109607463
>That's your fault
Nah, that's just you and your autistic "but we must follow imaginary rules" mindset.
Try being less autistic in the future, if your brain allows you to.
>>
>>109607472
>Autists are just people
As someone who's been actively, sexually molested by an autist:
No.
Autists have NEVER!!!!! been people.
>>
>>109607484
>>109607500
Und noch einmal:
I *do* understand German. Like, I've hard actual native German speakers complementing me on the way I speak German. Like, I GET the language. Long and short, back and front vowels. Ich VERSTEHE die Sprache (I DO understand the language).
>>
>>109600452
It's really old but it's not too bad when you get the hang of it

>>109603039
They wanted to have exceptions for error handling so they used setjmp
>>
>>109602989
It's true, I can't do it.
I don't have the time.
>>
>>109606728
Huh, I thought stb_image used libpng calls internally, had to double check the code, well that's impressive.
>>
>>109603539
>Files showing on the desktop: "oopsie uwu that's not wowking anymow sowwwwy hihi"
i disable files on desktop on all OSes I use, it's useless, if i want a folder open at all times but full screen, id just open a file manager
>HIDING THE FUCKING WINDOW MAXIMIZE/MINIMIZE BUTTON
there's no dock to minimize to, they want you to use workspaces. same reason minimize and maximize are useless for i3 and tilling managers, they make no sense there
>NO RIGHT CLICK FILE CREATION POSSIBLE WITHOUT CREATING A "TEMPLATE"
install a better distro that actually cares about users and adds files based on the installed apps. Last time I used linux, the distro i was using which i dont remember which one it was, came with new file.txt and when i installed libreoffice it added template files for those too
>that any distro still makes it its default is simply incomprehensible to me
it works and doesnt krash
and rhel is basically the default server OS and comes with it
>>
When I type string into my browser, the first result is Oracle's Java documentation.
>>
>>109608105
You get what you deserve.
>>
check out my cool minecraft clone ive been working on
>>
>>109608169
Beautiful.
>>
>>109608182
thank you! :)
>>
>>109608105
Mine shows the salesforce apex reference followed by glib...
>>
>>109608105
>The meaning of STRING is a cord usually used to bind, fasten, or tie —often used before another noun.
>>
>>109608197
You're welcome! :)
>>
>>109608169
This looks trippy. Is it like Minecraft on LSD?
>>
I tried Ubuntu and HOLY SHIT I JUST SHIT MYSELF
>>
>>109608349
How much time was there between these events?
>>
>>109608328
Could be, im a bit colorblind idk if that has any effect on the art. Im not a very talented artist
>>
I installed Rust and my dick and balls turned into a vagina. I kind of like it desu.
>>
>>109594885
LMAO HE LOOKS SILLY!
>>
File: file.png (209 KB, 2435x1211)
209 KB PNG
did my first project in python with a guide, it was a quiz game show where you can add questions and it stores and reads the questions in json.

I'm not sure what to work on next.
I was thinking on adding AI to this so it makes up questions on the fly.

I was also thinking of a webscraper, that downloads all images on a thread.
Any ideas on how to go about it?
>>
GO HERE

>>109608562

>>109608562

>>109608562

>>109608562
>>
File: 1770081320315044.jpg (59 KB, 961x785)
59 KB JPG
>C isn't maintained
>the language has basically received no new features in the last 40 years
no wonder, perfect language for gen x schizophrenic retards
>>
>>109608818
This.
>>
>>109608833
Dubs confirm.
>>
>>109608818
C but with hygienic macros would be incredible
>>
>>109608847
no it wouldn't. the language is old as shit and terrible to write. move to rust or swift or something modern.
>>
>>109608818
Based
>>
>>109608818
truth
>>
>>109608847
C but without the third letter of the alphabet would be incredible.
>>
File: 1780017603043299.jpg (72 KB, 1024x756)
72 KB JPG
>>109608851
>the language is terrible to write.
no it isn't
>something modern
there are virtually no languages that want to be a simple systems programming language, maybe odin or zig

>rust or swift
>>
>>109608883
>there are virtually no languages that want to be a simple systems programming language
maybe because that isn't necessary anymore. modern apps are massive, complex, and solve real issues. nobody is going to use your shitty custom compiler or vhs tape driver.
>>
>>109608896
>modern apps are massive, complex,
and they run like shit. no thanks
>>
>>109608917
how many monthly downloads does your nes emulator built in C have? last I checked bun gets 20m monthly downloads
>>
>>109608923
bun was written in zig and then literally doubled its LoC count from 500k to 1m with its rust rewrite lmao. that's probably the worst example you could have given. zig wouldn't be my first choice, but it's certainly less niggerlicious than rust.

I look a someone like ryan flurry rewriting raddbg from C++ to C and building that up and it's clear C is good enough despite it flaws. or that file pilot developer having no trouble maintaining his >100k LoC project in C and it getting universal praise for how fast and responsive it is with people fleeing from windows explorer. the language is fine and still productive. it's not going anywhere any time soon
>>
Programmed some simple CLI to Ollama chat endpoint in python that allows me more freedom to manipulate the conversation context (undoing messages, response prefilling, loading .txt files)
Refactored the data file part of my project/time management to be more elegant and extensible, scrapped current TUI that was a mess in favor of making a CLI short term and later developing a more robust TUI.
Updated design to allow keeping issues in separate directories instead of a centralized data directory to allow projects to keep a copy of the related issues. Time data is still kept in the centralized data dir since it's more of a personal thing than a project thing. Changed date notation to the RFC 3339 format for standardization.
Next I will be cleaning some of the code, testing if everything is working and implementing the CLI to make it usable ASAP so I can start using it to increase my productivity again.
>>
>>109606184
Become the übermensch with
>German C
>>
>>109609225
Both of those things sound like hell to deal with.
>>
how can i improve my C code? the score() function seems like a mess
simple poker / slot machine game that takes x amount of hands as an argument, gives the player 5 cards, lets them hold any of the cards and then redraws x new hands with their held cards in place. the aim is to get the highest scoring hand like a royal flush

https://pastebin.com/dsmZFeVa
>>
>>109608576
you should learn to use emacs or vim coz it unironically makes you a better programmer
>Any ideas on how to go about it?
4chan is one of the easiest websites to scrape, use beautifulsoup
>>
>>109608818
What sort of features are you missing?
>>
>>109609578
generics
>>
File: 1774050860471227.png (12 KB, 427x400)
12 KB PNG
>This line prints the string that now contains the user’s input. The {} set of curly brackets is a placeholder: Think of {} as little crab pincers that hold a value in place.
>Rust doesn’t yet include random number functionality in its standard library. However, the Rust team does provide a rand crate with said functionality.
>>
>>109609875
Thin standard libraries are a good thing for language hygiene—they ensure minimal poor early decisions surviving into eternity. You are not entitled to the work of others: if you want a rand crate make it yourself.
>>
someone should make a fork of rust without proc macros
>>
>>109609578
GC
green threads
>>
File: 1761573971636234.png (129 KB, 529x538)
129 KB PNG
>>109609903
>YOU WANT INT.RANDOM()?
>RUST ISN'T DESIGNED THAT WAY, CHUDDIE
>IMPORT THE FUCKING CRATE, FASCIST
>>
>>109609915
memory safety
>>
>>109609920
This but unironically.
>>
What are some good programming books for fully understanding well made design structures involving OOP?
I feel like I'm not quite educated enough to pass from the "practiced noobie" to the "actually decent" level.
>>
>>109610416
>well made design structures involving OOP
since OOP is about encapsulation at the arbitrary level of individual objects, it tends to not be well suited for well made design structures in general imo, because computers are built from systems, but collections of objects and the OOP mindset often misses the forest for the trees, like being a city planner and focusing on the cars rather than the roads.

>good programming books
maybe like, fabian's data-oriented design book

or, this may be more procedural versus strictly data oriented and it isn't a book, but watching a couple dozen episodes of handmade hero. that's probably my favorite reference. I think watching someone actually program in a not retarded way is more helpful than books for trying to get a strong initial grasp
>>
>>109610416
from my experience: books don't help with OOP, or at least I haven't encountered a book that would help greatly. If anything, books are detrimental with how they're all theory with contextless examples but don't show any real applications
what really helps is just writing code. at some point it just "clicks" with you. you just have to not have any cnile-tier prejudice against OOP that makes you avoid it or anything related to it at all costs

>>109610633
>posts asks about OOP
>DODfag recommends a DOD book and watching an anti-OOP grifter that can't even finish a project
>watching someone "program", instead of actually programming
>>
>>109610705
bro, I wish someone told me OOP fucking sucks when I didn't have the experience to know otherwise and the OOP cult was at its peak. Yeah, I'm gonna chime in when I think I see someone in a similar position.

>watching an anti-OOP grifter that can't even finish a project
irrelevant character attack that does not matter even if you were 100% correct. the only thing I care about is, is it a good learning reference or isn't it, and it's one of the best

>watching someone "program", instead of actually programming
obviously you have to actually do the thing to get better at it, I never implied otherwise.
>>
>>109609931
fil-c
>>
I can't even conceive of how to program without OOP. Before learning it I just used dictionaries for everything (this was in Python). I still always use integer-indexed maps but they point to objects instead.
>>
>>109610416
objects are fine
object orientation is a retarded idea
just write code that does things, everything that handles orchestration should be as minimal as possible
>>
>>109609363
you could use tables for some things instead of these switch functions
also I don't think you need allocate on the heap for any of this?
print_suit is missing a return value
I would probably have a variable that holds the rules (your PRIZE defines) so you can play around with different rules and so on (personally have had the need to do that back when I was doing bonus hunting)
but yeah other than that it's pretty readable C code, what else is there to say
>>
>>109610750
>OOP fucking sucks
either skill issue or blind devotion to hating on OOP
no one criticizing OOP can even make a point of their own, at best they will just repost some youtuber "programmer"'s video with some poorly constructed strawmen

>OOP cult
the irony of this statement when posting unsolicited books and streamers as a little "crusade"

>is it a good learning reference or isn't it, and it's one of the best
sure, if you want to learn how to be a grifter that never finishes anything while constantly bitching on things that work
>>
>>109610416
I hear a lot about this book
https://en.wikipedia.org/wiki/Design_Patterns
>>
>>109612001
"How to overcome some flaws in Java with ridiculously overengineered solutions: The book".
>>
>>109612116
>Design Patterns publication date: 1994
>Sun Microsystems released the first public implementation as Java 1.0 in 1996

you anti-Java niggers really have read-only ROMs for brains
>>
>>109612001
it's popular in academia because it's quite easy to construct an exam for, with how the patterns are categorized and juxtaposed against each other. but it's not a good resource when you're mostly inexperienced with OOP: most of the GoF design patterns are very situational, contrary to usual teaching they are not something you should try to shoehorn into every corner of your application
it's best to just familiarize what problem patterns are solved in the book, and return to it to pick the most suitable one once you encounter that specific problem pattern in your own work
>>
/>>[0-9]{9}\n>>[0-9]{9}\n{0,1}(?![\s\S]*[a-z])/gmi
>>
>>109608576
>>109609381
>use beautifulsoup
Better yet, the JSON API
https://github.com/4chan/4chan-API
>>
>>109613357
>Anonymous 08/21/26(Fri)19:38:23 No.109613357â–¶
> >>109608576
> >>109609381
> >use beautifulsoup
> Better yet, the JSON API
> https://github.com/4chan/4chan-API
>last post was 12 hours ago
Welcome to the dead forum. Wow. What a great forum. This forum is so dead, I am not even coding rn
>>
File: 1781839711445306.png (6 KB, 685x625)
6 KB PNG
im on ch 3 of the rust book (i just finished the guessing game)
I want to start building something useful to actually learn rust but I have no ideas and i dont want to jump into something so complex I'll give up after a day
>>
>>109615206
Haskell compiler before you transition
>>
>>109615206
get some actual hobbies or interests e.g cryptography, networking, fluid mechanics, databases etc and you will have no shortage of ideas
>>
>>109615419
my hobbies are video games and gooning
>>
>>109615430
get a life, sorry
>>
>>109615430
so make a porn mod for a video game. wow that was hard.
>>
File: 1773738356709967.jpg (675 KB, 2048x1536)
675 KB JPG
>>109615450
that doesn't really work because i'm ashamed of my gooning and don't want to enable it and also all modding ecosystems have their own established languages like c++ or java or javascript and require tons of specialized modding knowledge or 3d modeling or texture work that doesn't transfer over to other projects. also I can't put that shit in my github.
believe me if I was learning java I would be making minecraft mods right now
>>
>>109615548
So I see. That makes sense.
Then pick up C++ instead and help me with the Mediaboard, otherwise I can't help you.
>>
>>109612780
>they are not something you should try to shoehorn into every corner of your application
Yep, particularly the advanced patterns.
Always first try the simplest thing that could possibly work, and only reach for the fancy bits when you need them.
(FWIW, I've needed Visitor exactly once in over 30 years of programming, and I was really surprised by that. Some of the patterns just don't come up that much.)
>>
>>109615548
>i'm ashamed of my gooning
Understandable with a lot of modern pron.
Oh well, learn another programming language and try to write a simple game with it. The point is LEARN SOMETHING AND MAKE SOMETHING, even if it isn't very good the first time you try. Just keep trying, because that's how you get good at anything, and getting good at something productive is very satisfying. Proper life goal.
>>
>>109615419
>>109615430
I have to pee right now
>>
>>109609875
>Rust doesn’t yet include random number functionality in its standard library. However, the Rust team does provide a rand crate with said functionality.
What
C has a pretty minimal standard library but still has a PRNG
>>
File: 1758672052302632.png (152 KB, 2350x1403)
152 KB PNG
>>109616429
Sorry fascist, you don't NEED an rng function in the standard library. see, pseudorandomness in computers is actually really heckin' complicated and adding a int.random function is really problematic because that sets a "standard" for the rust language and .01% of users that care about a specific aspect of random number generators will be hecking upset. so you have to download a crate every single time.
>>
>>109610633
>>109610705
Well, I know that just reading books isn't enough, but I've got a decent amount of experience in actually writing code that I'm just looking for a bit of professional nudging in the direction that everyone else tends to go.
Partially so I can also put a name on whatever design pattern or structure I'm using so I can look up further advice around them.
>>
File: 1785769114692627.png (798 B, 160x160)
798 B PNG
Stupid question, any of you have worked on android apps? i'm learning Kotlin and have a project in mind, i want to create something similar to LocalSend, except instead of sending files it'd sync two SQlite databases in a pseudo P2P manner. What i basically want, is a frontend for this:
https://github.com/jarun/buku
Hopefully i'd first reimplement the extent of the functionality i want in something other than Python first. My usecase is baiscally managing links. I don't truly like using browser bookmarks because they just stay dumped there, unclassified, and because i switch back and forth between different browsers for distinctive use cases, mainly Firefox and Brave. My question is if someone has already worked on something similar on a techincal level.
>>
Programming has stopped.
>>
File: file.png (33 KB, 663x522)
33 KB PNG
>>109594885
c++23 is so sick
>>
>>109619705
>not using filter for dirs and transforming into model_list
>>
>>109594924
brother have you ever heard of a switch statement?
>>
>>109609178
Implemented calling vim to edit issues and to create new ones, aborting creation when you don't write the required information similar to how committing on git CLI works
>>
File: file.png (37 KB, 636x537)
37 KB PNG
>>109619755
comfy
>>
>>109620330
assuming move isnt expensive and the files aren't changing you could transform it into model load
>>
anything I should know for streaming raw data off of a device to a file on storage in linux? It's not especially fast, like 6mib/s. I'm guessing I want to write in chunks rather than poll the device quickly, so maybe just keep a loop going at 1Hz and write the ~6mib that have been populated?

What about the actual write method? you have open / read / write, but I'm using c++ so should I be using io streams instead? I was reading that they have internal buffers which sounds like it will be slower to me as you add an extra copy for no reason
>>
File: file.png (18 KB, 584x216)
18 KB PNG
>>109620379
what the fuuuk
>>
>>109620421
i mean you dont even need the loop really you can just go into the filter into a load into the vector but whatever
>>
>>109620545
well i dont hate the loop honestly it proves you dont actually need C++23 because its still C++ which is automatically awkwardly verbose with too much syntax
moral of the story is use Haskell instead
>>
>>109620421
how does this work emplace_back only works if load succeeds?
>>
>>109620590
NTA but emplace_back() gives you a reference so it always emplaces and he calls load on the new element
>>
zig is actually garbage im sorry just use C if you hate Rust that much.
>>
How do you find the motivation to code?

I've been coding since I was 16 (34 now). I've always held a vague ambition to get into tech some day, which would inspire me to go on a coding binge with a new project every now and then, but with all the AI doom and gloom I just cant anymore.
>>
>>109621194
what have you been doing so far?
>>
>>109621194
You are in the right. Since we have AI now, making sure to prioritize anything you truly want is the goal. Will we get mind uploading out of LLM tech? Of course not, we are at the very start of our value optimization
>>
>>109621194
>but with all the AI doom and gloom I just cant anymore.
I feel burned out as shit, too.
But on the other side I know that there is no magical thing to FIND motivation. You have to CREATE motivation yourself.
So in theory I should relax, meditate and find muh inner peace (tm). Then think about a project, make a plan and just do it, without doubting myself, too much shitposting or other crap.
The motivation comes from doing something. It doesn't magically appear.
So if you feel like you can hustle, then just do it (tm). Otherwise just be happy first
>>
>>109609875
Making your own random is like one line of code.
>>
>>109621194
>How do you find the motivation to code?
Have something you want to create
>>
File: 1771837085050929.png (193 KB, 450x418)
193 KB PNG
>literally every other language:
x = "hello!"

>rust:
let mut x = String::from("hello");

HMMM i32, i64, u32, usize, u64... I bet String is called str!
>nope, str is impossible to work with and you need to convert it to a String to use it anywhere because some rustroon dev really thought it was necessary to give you public access to a completely useless type
joke of a language
>>
>>109623222
>I bet String is called str!
bro, just read the fucking book.
The distinction between String and str is really not that difficult wtf. Brainlet take
>>
>>109623233
why would they give you access to a completely useless primitive that's burdensome, provides almost no value to actual end developers, and only exists to shit up the standard library and confuse beginners? that should be an internal type with no access.
If you understand how to program you can pick up any other language like java or ts or python in a week, it's only rust that shits up the language with autisms like this and make it take a month before you can code a simple webapp.
>>
>>109623252
>the programmer should not know what he is writing. We should hide everything from her
Ok, that's your opinion. Maybe upgrade to max pro for some more tokens per week
>>
File: 1759152900477325.jpg (29 KB, 553x553)
29 KB JPG
>>109623233
>>109623252
it's the same shit as this
let nums = vec![1,2,3,4,5,6];
let nums_index: i32 = 2;
println!("{}", nums[nums_index]); //doesn't compile unless you cast it to usize, won't implicitly cast it for you


but then if you cast it as usize:
let nums_index: i32 = -2; //gets converted to 18446744073709551614 and gives you an out of bounds
let nums_index: i32 = 8; // gives you an out of bounds

these still crash and give you an out of bounds error. So what's the fucking point? you just get more compile errors and have to waste time casting this shit yourself.
>>
>>109623252
>why would they give you access to a completely useless primitive that's burdensome

I don't know why you would come on here with a take like that. It's obvious you are a beginner. Why not ask why its designed that way instead and try to learn something?
>>
>>109623300
>>109623300
>So what's the fucking point?
if you REALLY can't answer this yourself, then you might have to go back to writing javascript apps. or you listen to this anons advice: >>109623310
>Why not ask why its designed that way instead and try to learn something?

don't be so fucking angry dude. Maybe there is a reason why the language is designed that way? Who knows. Maybe they actually had a goal they wanted to solve with that language?
>>
>>109623310
because I can reason for myself that there's other retarded design decisions that make no logical sense such as >>109623300
or having no built in int.random function and requiring you to download a crate, except that now after two decades they're finally adding a built in function, except it's only on nightly builds.
No other languages struggle with these issues.

>>109623338
>Why not ask why its designed that way instead and try to learn something
I did. And I came to the conclusion that it's retarded.
>>
>>109623344
>And I came to the conclusion that it's retarded.
What if your conclusion is faulty? Maybe things are a bit more complex, when you actually start thinking about them?
You should try writing Ada or do some hardware design in VHDL. That'd be a fun journey for you
>>
>>109623344
just read up on the difference in languages with pass by reference vs. pass by value
>>
>>109621194
i hopped on the vibe coding bandwagon but honestly i don't think it's everything it's cracked up to be for writing actual code. usually if there's a better way to do something AI will not just tell you. and even if you ask it to tell you it might not... idk it's all about how you prompt it, but if you have to prompt it asking specifically for what you want, then you already have to know what you want, you could've done it yourself at that point, but maybe it saves time to have the AI actually type it out. that has been my experience using claude cli pointed at openrouter's free model router. i've also tried ollama with qwen-coder locally but that was hammering my pc.

it's pretty good for asking questions though. definitely beats stack overflow. especially for things that don't have extensive documentation, maybe only a doxygen page with a list of symbols. sometimes AI can just comprehend those symbols and give you a mental model to follow. which is fucking sick
>>
got sucked into GUI frameworks again. its the same thing every time, but I keep thinking there will be something new and fun.
>>
Do we need to fork off like /agdg/ did? There are so many retarded vibespammers here.
>>
How in the fuck did they do curved collision in DKC in fucking assembly?
>>
>>109625026
It's possible if you divest enough time into it. It is assembly afterall.
But it will be very tedious. However since they had an entire studio working on the game (IIRC), it wouldn't have been that hard compared to one guy doing it.
Just ask the RCTC guy, Sawyer something or other.
>>
>>109625026
Have your slopes fixed angles.
>>
>>109624596
>There are so many retarded vibespammers here.
they will be everywhere. Don't matter where you go
>>
What's a good resource to learn C++, assuming I already know C and high level languages like java/python/etc.? Looking for an online tutorial or something to the point, no books - not trying to go deep into examples and practice problems and stuff, just want to understand the language features and nuances unique to C++ so I can read existing programs and follow what's going on
>>
>>109624596
why should we move
what this place needs is /ai/ board
they could even have their own dpt over there
>>
>>109625752
learn rust. you can do your unsafe low level bullshit with unsafe {} though you shouldn't need to unless you're writing drivers/kernel modules or some shit. cpp is worse than rust in every way except current market share. that will change on it's own so it's a better investment imo.
>>
>>109625752
>>109626067
My brain says I should learn Ada. What do?
>>
I'm a little class curious, should I explore classes in C++?
I've always just used C and have never actually written a class.
>>
>>109626351
People with "class consciousness" tend to go for Rust. But anyway classes are great and were the first thing ever added to C++.
>>
>>109626351
there are some good things about C++ classes but don't listen to OO philosophy / design pattern shit
>>
>>109626072
learn Pascal
>>
>>109626067
>just make single allocations all over the place, it's definitely better than just using GC !!
retarded advice, just use Java/C# if you don't want to care about memory usage
>>
File: Evil-lain.png (768 KB, 1520x855)
768 KB PNG
I had an idea for a browser addon that would solve a lot of problems
The core idea is, it fetches tiny JSON metadata from archive.org (yes the is an API endpoint).
Display the data on the badge in your browser bar.
int field_1 = $firstYearArchived;
int field_2 = $timesDomainOwnerChanged;
int field_3 = $yearWithMostArchivedCopies;

When you open a site you look ad the badge.
You can immediately discern if a size is slop/SEO dogshit.
Now you can close tab the moment you realize the site is less than 6 years old.
Like all dogshit sites from the LLM era.

Bonus:
The addon saves the JSON data locally to not stress archive.org in the native addon sqlite storage.
>>
File: MaidOS.png (67 KB, 1920x1080)
67 KB PNG
>>109594885
I turned MAIDS into a self-hosting systems language, then got it compiling for RISC-V, x86 and ARM. Then I used MAIDS to build an operating system for MAIDS which runs on the same three targets. It is still very rough, consisting basically of a file system and a compiler, but it can compile any MAIDS code written into the terminal and you can call the code from the terminal. Once it is done, it should be possible to run it on bare metal on a Maid Phone, regardless of how that maid built her Maid Phone because it supports all the architectures.

The attached screenshot is of MaidOS running on RISC-V. It is written entirely in MAIDS. There is no C or other common systems language propping up any of the infrastructure. MAIDS is a memory safe string processing language with goal-directed evaluation, and has big integer support, because I don't like it when the system language on the computer is a Numberlet. It currently supports numbers up to 17k digits, so it is still a bit of a Numberlet, but I will eventually get it to true arbitrary size so the computer can use Big Numbers more.
>>
>>109626488


function feldToString(f: tFeld) :string;
var i :integer;
h: string;
begin
h := '[';
for i := 1 to 19 do h := h + IntToStr(f[i]) + ',';
h := h + intToStr(f[20]) + ']';
result := h;
end;

procedure TForm1.Bt_neueClick(Sender: TObject);
var i: integer;
begin
randomize;
for i:= 1 to 20 do
alteZahlen[i] := random(1000);
Memo1.Lines.Add(feldToString(alteZahlen));
end;

procedure quicksort(links, rechts: integer);
var l, r, mitte, h :integer;
begin
l := links;
r := rechts;
mitte := sortierteZahlen[(links+rechts) div 2];
repeat
while sortierteZahlen[l] < mitte do l := l +1;
while sortierteZahlen[r] > mitte do r := r -1;

if l <= r then
begin
h := sortierteZahlen[l];
sortierteZahlen[l] := sortierteZahlen[r];
sortierteZahlen[r] := h;
l := l +1;
r := r -1;
end;
until l > r;
if links < r then quicksort(links, r);
if rechts > l then quicksort(l, rechts);
end;

procedure quicksort2;
begin
quicksort(1,20);
end;

procedure TForm1.Bt_QuickClick(Sender: TObject);
begin
sortierteZahlen := alteZahlen;
quicksort2;
Memo2.Lines.Add( feldToString(sortierteZahlen));
end;

procedure TForm1.Bt_endeClick(Sender: TObject);
begin
close;
end;

procedure TForm1.Bt_sortierenClick(Sender: TObject);
var i, f, n : integer;
sortiert : array of integer;
begin
setlength(sortiert, length(werte));


for i:=0 to length(werte)-1 do
sortiert[i] := werte[i];

If length(sortiert) > 1 then
begin // if begin

for n:=length(sortiert) downto 0 do
begin
for i:=0 to length(sortiert)-2 do
begin
If (sortiert[i] >= sortiert[i+1]) then
begin
f := sortiert[i];
sortiert[i] := sortiert[i+1];
sortiert[i+1] := f;
end;
end; // for-end
end; // for-end

end; // if-end

for i:=0 to length(werte)-1 do
Memo2.Lines.Add(IntToStr(sortiert[i]));

Memo2.Lines.Add('');
>>
>>109626709
based. Tfw not able to pull this off. Is this inspired/copied from templeOS?
I wish I could (more or less) port templeOS to risc-v, but when I try to understand the compiler I get immediate headaches and stop again
>>
File: reze.jpg (192 KB, 1300x2048)
192 KB JPG
>>109627099
It is architecturally inspired by TempleOS and uses RedSea and also the font from TempleOS. It is basically going to be a port of the core of the OS, but with MAIDS instead of HolyC, then add some math software on top of it.
>>
>>109627290
something like that was my fantasy, too. Based.
Maids are still cringe and unbased af, no cap fr fr, but unironically.
>>
>>109625752
mmm, I guess the main things of interest are objects and the rules / features surrounding them, as well the STL. idk, I'm sort of the opinion that you actually need to use this shit in order to learn it properly and while you can use the STL easily enough on leetcode style questions, objects kind of demand a project of decent size to really get them
>>
>>109623222
>let

Immediately discarded.
>>
<Get

Immediately accepted.
>>
>>109600973
you should stop the challenge-response loop you've got going while you can and slow down
you end up learning nothing
>>
>>109594885
0.2 finished.
<this is a full opencl program
pretty neat, eh? 80 lines of code, not counting the kernels proper
>>
File: maidposters.png (1.8 MB, 1297x1212)
1.8 MB PNG
>>109627357
>Maids are still cringe
>>
>>109626488
>painless cross compile everywhere
>generics (mogs C)
>compiles 3 million lines in 5 seconds (mogs C++)
RETVRN TO PASCVL
>>
https://github.com/DrewRidley/bronzite/
God I wish the faggot Rust devs would make something like this a standard part of the language. Dumb slopcoded library doesn't even work on Wangblows.
>>
>>109629235
Just install GNU or get a Mac.
Windows is not an option anymore.
>>
>>109629235
>>109629240
>Made with and a lot of
and a lot of fucking bitch AI.
Why does AI love emojis so fucking much? I can't even read the fucking readme, because the emojis are distracting my brain too much.
No, I am not autistic (no diagnosis). I just have a little adhd.
>>
What do you do when the body is craving for shasta?
Should I get some or just make a tea?
>>
hello /dpt/, i haven't been on this general for at least 5 years now. glad to see it's still alive.

i do a lot of go development for work (backend web stuff mostly). my boss wants me to do a poc for a new project in rust, as he believes the stronger compile-time safety guarantees will make it a better language for heavy ai-assisted development. i don't know rust at all, so i'm going to be learning the language and the ecosystem.

what am i in for, is rust easy to learn? anyone have experience using rust with ai tools?
>>
>>109629422
>glad to see it's still alive.
it's ded.
You have to decide if you want to be a slow snail in a dead thread or do you join the vibegod's over at >>>/g/vcg/
The decision is yours
>>
>>109629435
rip
>>
>>109629422
>is rust easy to learn
Think it's generally regarded as pretty hard to learn. Probably easier these days since you can have AI tutor you.

AI works fine on Rust with all the usual caveats about AI code. You'll definitely want some kind of AI tool that can actually run code so it can check compiler output and iterate.
>>
>>109595993
Most people are retarded, simple as.
>>
>>109604617
Not enough information.
Another C program may finish the same in 50s, just by memory mapping the input file and using a generator approach to make it cache friendly.
>>
File: cr.jpg (855 KB, 3000x1705)
855 KB JPG
>>109628421
>compiles 3 million lines in 5 seconds (mogs C++)
True and fucking real.
>>
>>109629551
thanks anon, will give it a shot
>>
File: natehiggers.png (135 KB, 1213x873)
135 KB PNG
If you're wondering what language to use.
>>
>>109629881
then use Haskell
>>
>>109629881
surprisingly good chart
>>
>>109629881
why is *that* question the only one without "yes" or "no" written on the branches?
>>
>>109629944
Because gender identity is a spectrum!
[spoiler]i was restructuring it around a bit and forgot to add it back[/spoiler]
>>
>>109629881
>do you hate Java
>yes
>ok then Java
>>
>>109624596
>Do we need to fork off like /agdg/ did? There are so many retarded vibespammers here.
There are already vibe coding generals. They need to fuck off back to them

>>109625752
>What's a good resource to learn C++
learncpp.com

>>109626067
>learn rust.
Fuck off. He asked for help learning C++.
This is why people hate rustroons. You just have to insert your shitlang everywhere, regardless of whether it's wanted or not.

>>109629435
>You have to decide if you want to be a slow snail in a dead thread or do you join the vibegod's over at >>>/g/vcg/
Fuck off back to there and never post in these threads again vibecunt
>>
>>109630824
Finally someone who answers the damn question. No wonder there's a hiring crisis in tech, most of y'all can't even follow the assignment
>>
File: 1782488889690422.png (76 KB, 400x300)
76 KB PNG
holy shit I finally found ONE thing that I like about rust
let x = 'a' // inferred to char
let x = "a" // inferred to str

too bad str is FUCKING USELESS SO THIS IS AS WELL
>>
>>109631037
use Haskell instead
>>
>>109631043
why? so I can be even more unemployable? fuck you, autistic fuck
>>
>>109631050
yes
>>
>>109631053
i have no interest in learning your autistic shitlangs, rust is already bad enough
>>
>>109631059
dumb frogposter
>>
I heading toward using C for writing my tools and C++ for gamedev.
Is this a good approach? I like the idea of having containerized objects in my games and won't be doing all the other C++ or OOP stuff, just classes.

I already know that excessive inheritance is a huge problem and will avoid it.
>>
>>109631081
Just use C for everything
>won't be doing all the other C++ or OOP stuff, just classes.
Then just use C structs, if you really need more then put function pointers inside your structs.
>>
>>109631172
>if you really need more then put function pointers inside your structs.
I never understood the purpose of doing this
>>
>>109631172
>>109631189
It's all about organisation, you containerise data and methods instead a single code block.

Have you done game dev before? Things get really messy really fast.
>>
>>109631189
Sometimes you want to associate functions with your structs, something like this:
#include <stdlib.h>

typedef struct {
char* text;
int x;
int y;
int width;
int height;
void (*callback)(void);
} Button;

Button* CreateButton(char* text, int x, int y, int width, int height, void (*callback)(void)) {
Button* button = malloc(sizeof(Button));
button->text = text;
button->x = x;
button->y = y;
button->width = width;
button->height = height;
button->callback = callback;
return button;
}

void foo() {
// ...
}

void bar() {
// ...
}

int main() {
Button* foo_button = CreateButton("Foo", 0, 0, 100, 50, &foo);
Button* bar_button = CreateButton("Bar", 0, 200, 100, 50, &bar);

foo_button->callback(); // This will call foo();
bar_button->callback(); // This will call bar();

return 0;
}
>>
>>109631271
So then what is the point of C++ classes?
>>
>>109631308
doing those things with type safety
>>
File: 1781369394980752.png (21 KB, 700x350)
21 KB PNG
>check today's leetcode problem
>dp + prefix sums
>>
>>109631189
Sometimes it's useful when you truly need dynamic dispatch, but honestly that's not very often except maybe for some library code.
If it's all your own code, just use an enum or some shit to dictate behaviour.
>>
>page 11
are we cooked?
>>
>>109605133
I think we might be cooked
>>
Hi anons, I am trying to build a front end for DjVuLibre in Appkit for macOS. I have only ever worked with C projects in vim with makefiles and simple appkit apps using Xcode only importing Apple's frameworks. I am not very sure how to expose DjVuLibre to my app in Xcode (like in C, I would just set the library paths in the makefile). Can anyone help me?
>>
I don't know what to make.
I'd love to make a 3D videogame but just thinking about the hassle of getting assets makes me feel defeated, let alone learning some game engine framework and putting the shit together.
>>
>>109636178
Think: is there an app you need but no one has made it quite right yet?
>>
>>109636178
dont use anything electronical for 3 days straight.
youre in dopamine imbalance + youre not bored in the right way
>>
File: 1775981010877239.png (13 KB, 704x284)
13 KB PNG
Thoughts?
>>
>>109636323
It's perfect.
>>
I am not coding right now. I am sorry.
>>109636323
i use Claude (TM) and Google (R) Gemini (TM). They are the real game changer
>>
File: cargo-cult.jpg (75 KB, 860x484)
75 KB JPG
>>109636526
<the code
price: only 999.99 usd + your left ball tyvm
>>
>>109607179
>"Great Someone Else is Doing It"
Yeah, wouldn't that be the dream, lol.
>>
>>109636568
Yes, that's why I have such a big cock. Sometimes it's a bit annoying while coding, so I am thinking about chopping it off.
Girls have it so much better
>>
>>109636666
>obsessed about tranies and dick chopping
are you the poorfag bosnian?
regardless, the nocodeshitter general is down the aisle, to the left
>>
>>109636683
No, not really right now. But I will go pee like a real woman now, even tho i am a man. Checkmate haters.
I would never stand while peeing into my own toilet. That's digusting, you little bitch.
Either I sit the fuck down or I pee into my sink. Both work. But usually I sit down
>>
>>109636781
>average vibeshitter thoughts
fascinating.
>>
>>109636807
That's no problem for me. Back in the day I used to write a lot of Arduino. Now it's more C and VHDL usually.
But tbqh, go is better for vibe coding. Vibe coding feels good at first, but then a few days later you realize it's all dogshit
>>
>>109637193
yeah thats the problem with vibecoding.
youre using an approximation machine
so it does the tasks you tell it to, approximately

in practice, you have to feed it a plan, interfaces, and pseudocode
but typing is the part that takes the least amount of time in the whole process
and you make your codebase visible to the shatbot, so its parent company too
and the gains in time are easily erased because the code is a fucking chore to proof-read

its kinda fucking worthless especially when youre doing something serious
and recently theres been talks of liability for the ai companies
the next step after that is claiming ownership of the code the shatbot produces, because liability ~= ownership

you do you, but this >>109636526
means "my projects are not worth protecting, and the code quality doesnt matter. neither does legibility because its a throw away project"
not exactly something to be proud of
>>
>>109637267
wtf im pro ai now
>>
>>109637193
>>109637267
oh, and i almost forgot
>you end up paying for this trash, and this shit becomes quite expensive quite quickly
>>
>>109637291
how?
you mean
>"claude, type this shit for me, in exchange for my ideas, training data, AND my money"?
if it works for you, then it does

from my perspective its a humongously retarded deal
>>
>>109636323
neat language killed by excessive compile times
>>
>>109637267
Imagine getting 2 (You)'s and a wall of text for shitposting some pointless crap.
Thank you my man. I love you.
Right now I am expanding my ghdl fork, because I am missing a few features in their LSP. If I have time I might contribute back some parts of it
>>
>>109637361
>hes in it for the attention
holy shit anon, get a life
>>
>>109637376
How?
Discord is shit
Twitch is shit
I have no irl frens
I dont have yt
I dont have instagram
I dont have tiktok
I dont suck cock
I sometimes fuck a 63yo ukrainian gilf
I am lonely af
I dont like my family. How the fuck should I get a life?
>>
>>109637430
>how to get a life?
>lists all the ways he can get attention
thats not having a life, retard
thats being a desperate attention-whore

the world is burning. find a way for you to survive the next 20 years, that plenty of work allright
>>
File: 1580846208030.png (727 KB, 1445x1000)
727 KB PNG
Anons is there a simple and small C library for writing and reading INI files? I could probably implement my own but would like to know if such a thing exists first
>>
>>109637450
>thats being a desperate attention-whore
that's the only way i got some interaction with humans in my life. Otherwise they dont really care about me. That's all I have. I know how 2 attention whore good. I am a professional
>>
>>109637522
youre not a professional, you dont make money with it
if only the attention you get could pay your rent or put food on the table...

youre having a devalorisation-revalorisation complex.
it isnt discussed in modern psychology bc marketing hinges on people suffering from it

the crux of the problem is that you seek external validation instead of creating intrinsic value
which you then evaluate by confronting yourself with various problems

your value == what you can do. not how youre perceived by people
its unavoidable, its self-evident
everything else is noise and self indulgence
when not pathological dependence

and guess what,
once you acquire intrinsic value
you get the "friends"
your family suddenly becomes nice to you
and even non-gilfs start looking at you like theyre hungry
and the best part is that then you dont need them, and so youre the one dictating the terms

also its all fluff
theres a wall of fire all around us and its closing in
and no amount of attention is gonna help with whats coming

llms are shit rn, but new tecnologies will come- i, myself have a couple ideas about it
so its a given smarter people found the solutions im missing. reliable ai is coming, and if it takes too much time ill build it myself
but its robotics that are the scariest because we could have automated most of the jobs 20 years ago already

not because muh jerbs but because its gonna nuke the valuation of everyone's assets into the ground
and robocops means if youre outside the system you will be hunted down and killed at the push of a button

we have a tough 20 years ahead of us, and the only way to survive at a decent level is to float to the top
in the future all that will matter is sheer technology and manufacturing capabilities
reliable ai will nuke white collars, automation will nuke blue collars
ubi will exist to make you starve. get ready, time is running out. and a recession is on the horizon so shit's gonna get gradually harder for everyone
>>
>>109637626
where do i unsubscribe?
>>
>>109637644
you close the tab, worthless attention whore
>>
>>109631308
Anything related to allocating dynamically sized memory, and the problem with function pointers is that it's kind of useless without a payload, which means you need to do some jank like void* casting or typed unions.
In C++ you have many ways of replacing a function pointer, you got a C style one which may require a payload (I use this, I just cast the void* to static_cast<decltype(this)> using a lambdas as a trampoline to a member function so that I can just use variables directly, I love the lambda because it is a part of the stacktrace if I get an error).
Then you got std::function which stores the captured payload of the lambda (it won't use malloc if you only capture 8~ bytes AKA 1~ pointer, because of empty base optimization, size depends on STL impl).
Then you have virtual functions, which is equal to C having a struct holding your function pointers in a global variable (useful if you have a bunch of functions).
You can optionally downcast from a virtual base class with dynamic_cast (with a small overhead), which is useful because downcasting the wrong void* is a silent error that leads to weird bugs when it doesn't fail quick (easy mistake to make when the code is frequently copy-pasted).
Technically you can directly cast without dynamic_cast if you only inherit 1 virtual class, since the address between the base and the child are the same, and I THINK you can make it safer by comparing the typeid(x).hash_code(), but no inheritance matching is done which is bad if you mess up inheritance (using the typeid is similar to how std::any works but std::any has a really stupid api, too fat, and it might allocate).
Overall, all of this kind of sucks, but the goal of this is basically to create a signal/slot system without a fragile void*/typed union. Basically the dream is to make retard-proof code that also ends up being just as fast as C.
>>
>>109636190
everything has already been made.
>>
>>109637626
>>109637626
>your value == what you can do. not how youre perceived by people

I can't do shit and people pretend I am super smart. That's annoying. They are all trolling me and I don't know why.
I must have some visual retardation. Otherwise I can't explain why people treat me different than most other people. They treat me exactly like the people in retard shelters
>wow you're so smart
no, I am not. i don't even know how to kill myself properly
>>
>>109637723
yeah, and thats why you shouldnt listen to them
you should set your own value.
you improve your skillset, then tackle problems.
in programming, your personal life, in your finances
thats how you verify your self-image against reality, so you dont end up all delusional

also its a healthy routine. you see progress->this motivates you->you make even more progress->you get even more motivated
positive feedback loop. no external validation needed whatsoever.
also: people are duplicitous. in actuality they dont give a fuck about you, they act this way only because theyve been taught thats "acting nice"
in truth, you can count only on yourself. and your skillset.
>>
the perfect language is so easy to make
you just fix the obvious issues in C and add slightly stronger type system and there you go
and no C++ is not it
>>
>>109638098
>glaring issues with c
such as?
because if anything, c is too strict with its types, in my opinion
i have a couple void * in my codebase because of that
>>
Is it true that malloc gets slower the more you use it?
>>
>>109638141
its much more complex than that
malloc hides alot of things, dependent on your exact os

p. ex: if you malloc something, free, then malloc the same size again
it should be pretty fast
because chances are the memory hasnt been actually released yet

if you want fast allocations you should look up "arenas" aka "slab allocators"
and how they relate to amdahl's law
>>
>>109638141
yes
>>
I have decided to apply for one single job to see if all the people crying about not being able to get hired have any basis, or they just suck, which I'm leaning it's more towards that because as someone who does the screening and interviewing for my team, a lot of applicants are dogshit.

It may bite me in the ass if I get the offer and reject it because I like my current job, but it sounds fun, I haven't done an interview myself in like 5 years now.
>>
File: 1761603541641519.jpg (18 KB, 258x544)
18 KB JPG
>>109638446
>I have decided to apply for one single job
you'll need to apply to another 50 before you get an interview
>>
>>109638446
2 years ago i still got invitations after every application i sent out but i'm guessing the market changed quite a bit since then
>>
>>109638460
Why would I need to apply for 50 more? I don't think there's 50 openings in my city currently that I'd be interested in doing.
>>
>>109638534
because that's how many applications it takes to get a callback, boomer
>>
>>109638539
Why 50? Why not 100, or 10, or 1?
>>
>coding with Honeywell control language for work
>type time only has two functions: date_time (which returns today as calculated as the number of seconds since 1979)
>or now which returns the number of seconds past midnight for the current day
Pure suffering. I di not want to derive a fucking calendar just to extract month day or year data from this dogshit type in this dogshit language reeeee
>>
>>109638098
It's called Free Pascal.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.