Show more

converting a synchronous API to asynchronous I've replaced all return values with callbacks and all callbacks with return values (technically callback params, but that's how you return something out of sync :V) ... is that a thing? it could be a thing...

: you may declare a class without defining it, as long as all you're doing is declaring pointers/references to it.
: you may declare a class without defining it, if I feel like it...

to all of the statistical nerds out there counting memory errors in to justify the existence of : a logic error in a system that uses explicit memory management often culminates in a memory error. That doesn't make it a memory management error, it's still a logic error, and patching it up with more memory management is over-complicated at best and silently incorrect at worst.

whoopsie daisies, how did this get here?... much embarrassment

Show thread

>Many people have died from this pandemic

I asked you to edit this out, where are you getting this from. Present an argument or a question about my reply, with that part edited out. Show me how it doesn't make sense without it. How many times should I beg you to read...

PPS: if you want to become one of these fabled rust experts who can allow themselves to write a half baked linked list wannabe - learn modern c++, then learn rust, that's the natural order.

Show thread
Mistake 7 : Build lifetime heavy API
Am I reading this right? In rust, a language designed for managing lifetimes, it's prohibitively difficult and inefficient to manage lifetimes.
Solution: freaking copy everything... marvelous...

PS: mistake 3 - linked lists are not hard in rust, they are impossible in safe rust, both to implement and to use properly, and that will always be embarrassing. Even worse when you religiously refuse to admit it, and intentionally miss the whole point of the data structure.

this is roughly what your file format parsing library API should look like

you must tell exactly where you stopped, what was there and, if it wasn't the end, what did you expect instead.

oldern website: need to constantly refresh to update content

modern website: need to constantly refresh cause they hog all the resource

gotta love everyone advertising how header only their libraries are, as if that's some special feature requiring extra effort and not them just being lazy to do proper interface-implementation separation and provide an ABI.

every time
Q: why is this undefined behavior?
Everyone: undefined behavior means anything can happen, you cat will explode, your computer will get pregnant, yada yada, omg I love saying this over and over so much, i'm so smart, i know c++! what do you mean why?! standard says so!
No one: *actually explains why undefined, as opposed to unspecified or implementation defined*

another must have flag coming along to accompany -fno-rtti and -fno-ecxeptions, especially on embedded:

borrow checker is basically a whiny garbage collector that screams at you if you make too much work for it

do i even want to know what you did with intrusive containers? -_-

Show thread

rust: since you just can't, I made you a nice doubly linked list in std library, yay!
me: yay! I can finally use a list for it's intended purpose - adding/removing elements to/from anywhere without worrying about references to any elements that I don't touch!
rust: uhm... but... but no, you must always worry about references to elements you don't touch, that's how the world works... right?
me: -_- you didn't make a linked list at all did you...
rust: cursor?
me: bye bye generic code, hello edge cases everywhere?
rust: ugh! I thought you just want the terrible memory allocation, isn't that the whole point of this useless thing?
me: no, that's not even... allocators, cmon!
rust: allocators you say?... i've got one!
me: cute...

witness @freemo waving the banhammer at me, after I roasted his religious belief in parker topology

"the only reason I protect you at all when reports come in time and time again is because even people with the maturity of a toddler deserve a voice"

"Act like a mature adult with people, at least within reason and try to, or else I will be forced to escalate the matter."

and this is the same @freemo who would try to publicly humiliate a known troubled teenager

presented motivation: he's getting fed up with the horrible me who is harassing everyone into oblivion
deduced motivation: looking for an excuse to erase the record of the roast

"When the criteria for elision of a copy operation are met and the object to be copied is designated by an lvalue, or when the expression in a return statement is a (possibly parenthesized) id-expression that names an object with automatic storage duration declared in the body or parameter-declaration-clause of the innermost enclosing function or lambda-expression, overload resolution to select the constructor for the copy is first performed as if the object were designated by an rvalue."

Now can I please have this for passing parameters and captures? Like if I say
return f(a,b,c);
return [a,b,c](){};
and any of of them a,b,c are automatic, they would get moved.

c: *bloats memory allocation with size information, cause stupid ass programmer can't keep track of a number*

stupid ass programmer: *still has to keep track of the size to be able to use the memory in any meaningful way*

Show more
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.