← Home ← Back to /g/

Thread 106284617

19 posts 4 images /g/
Anonymous No.106284617 [Report] >>106284692 >>106284893 >>106285998 >>106286032 >>106286688 >>106287393 >>106287679 >>106288478
>hurr durr generics bad
Why do cniles exhibit this kind of behavior?
Anonymous No.106284640 [Report]
the question is not generics but who generics
Anonymous No.106284692 [Report] >>106285969
>>106284617 (OP)
The typesig for f0 isn't even correct
void *(*f0) (void);
Anonymous No.106284893 [Report] >>106285449
>>106284617 (OP)
This is runtime generics in a statically compiled language. Its not a C thing, all statically compiled languages would require a similar construct.
Anonymous No.106285449 [Report]
>>106284893
You can do runtime generics in many ways, even statically compiled, it just requires a type system invented after Nixon left office, which C tragically lacks.
Anonymous No.106285969 [Report]
>>106284692
Might be C23, which fixed that.
Anonymous No.106285998 [Report]
>>106284617 (OP)
That's just mental illness. And involves something truly nasty for passing double results.
Anonymous No.106286032 [Report] >>106286061
>>106284617 (OP)
What's this code from?
Anonymous No.106286061 [Report] >>106288517
>>106286032
>MalVal
make a lisp tutorial
Anonymous No.106286688 [Report]
>>106284617 (OP)
segfault
Anonymous No.106286715 [Report] >>106286832
Someone explain void variables usecase without Haskell tier schizo nonsense
Anonymous No.106286832 [Report]
>>106286715
the void* shit in the OP?
it's just a pointer
it doesn't point to void, void is nothing
in C the compiler won't complain if you = e.g. int* to void*, so the function can accept any pointer type as arguments
the code is pretty shit and likely to explode
Anonymous No.106287377 [Report]
>Lisp tutorial
>128 bit value type
>Doesn't have pointer tagging
>Doesn't have NaN boxing
Anonymous No.106287393 [Report] >>106287437
>>106284617 (OP)
Why are people like OP so utterly retarded and sluts deep inside their prostates to a point they want their code to support every single thing in the world, like they are trying to train their assholes into taking the biggest cocks available in the market?

Just support (void*) and the programmer that deal with it, make a struct and whatever
Anonymous No.106287437 [Report] >>106287452
>>106287393
You can't fit 7 arguments into registers anyways
Just define f0-f6 and f7+
Use the low 3 bits to tag the number of arguments
Also void* is shite. OP should be better off with uint64_t and type punning.
Anonymous No.106287452 [Report]
>>106287437
OP's union simply need a void * for functions, that can be cast to the correct type afterwards
Anonymous No.106287679 [Report]
>>106284617 (OP)
>Python dev tries C
Anonymous No.106288478 [Report]
>>106284617 (OP)
wtf is this mental retardation?
>why do cniles
thats not a cultist
thats a mental retard
Anonymous No.106288517 [Report]
>>106286061
i now firmly believe that lisp is a cognitohazard
merely learning it makes you retarded