guess the language!
unnecessary indirection,
unnecessary allocation,
unnecessary bound checks,
runtime type information,
overuse of abstractions,
global state in libraries,
long names.
repeated half-assed reference counting,
repeated half-assed implementations of common data structures/algorithms,
tons of fragile platform specific code.
Is the object empty? Neither javascript nor lua know...
meanwhile:
https://en.cppreference.com/w/cpp/types/is_empty
https://en.cppreference.com/w/cpp/iterator/empty
Pesky misleading semicolon like this just cost me a couple of hours of going absolutely insanely bonkers crazy (in another language): http://ix.io/2Lu3
Very glad that gcc is actively ruining this guy's whole career.
Also something in this paste is breaking ix.io's html syntax highlighting. It turns <iostream> into an html tag:
http://ix.io/2Lu3/cpp
Wonderful.
open.tube "censorship free youtube alternative" deleted my channel for no reason and made all the links i shared redirect to a violent video
open.tube "censorship free youtube alternative" deleted my channel for no reason and made all the links i shared redirect to a violent video
this is what I wanted my whole life, suffering through phone and p&s cameras - a cheap little camera with MANUAL focus, with basic fundamental settings, that can connect to a computer :')
i record games now https://open.tube/videos/watch/f93a5d3a-7748-433c-94f5-8f353203479d
Obligatory code post after a month:
https://git.sr.ht/~namark/libsimple_motion/tree/2dbc37866b1547e3c3c13041002de863b022ee97/source/simple/motion/movement.hpp
It's not exactly a timer, but can use empty structs to to turn it into one, like this:
https://git.sr.ht/~namark/truwo/tree/00a3cc97797220dd0e2ac42e0c0bcf5b99e7a731/source/main.cpp#L20
I will separate it from the interpolation eventually, maybe in another year or so, though at that point the class would become so small it might just disintegrate into a bunch of free functions.
Example of inconvenience caused by disallowing 0 duration:
https://git.sr.ht/~namark/sketchbook/commit/97ea12df328582ed2e69ee23a76590c547716a53
Very painful, but not hopeless, there is room for improvement.
boring c++ porn
While I could maybe chase after this to a potential bug report, I think it wouldn't be taken seriously, especially if I'm pressed on a use case, which I myself consider dubious. It's also somewhat indicative that maybe my approach was not necessarily the best for this kind of an experiment. I went with forwarding, in my implementation of visit_first, since that's the standard for any kind of transparent wrapper function that's supposed to entirely disappear in most cases. Being a c++ standard however it has to handle references well, that can be used as mutable out parameters sometimes (the heresy!) and that is likely the crux of the problem. References to local variables make the job of the compiler much harder, so we're going to go with another common pattern, explicit value and move semantics - pass everything by value, use std::move to avoid copies. Getting rid of mutable references simplifies things quite a bit, but in general has a nuanced cost of the move constructor (though I might not be able to use any moveable objects either, due to non-trivial destructors, and have to stick with trivial value types).
This puts me back on track with gcc-10.2 now properly optimizing all the calls. Unfortunately this also means that visit_first is no longer a generic library function, it will have to stay in this project forever, and no longer living up to its current name, instead become funky_visit:
https://git.sr.ht/~namark/funky/commit/5e440f00d59cccd4b1dd66e6bf288e73314c7408
Also seems like clang doesn't do tail call optimization well unless you change the calling conventions (whatever that entails), so it's a win-win!
boring c++ porn
seems like forwarding in conjunction with std::get is what is confusing it... without forwarding it works fine... now to isolate and figure out whether it's a bug or a feature -_-