Ludovic 'Archivist'
i work in robotics
And are agreeing in using dangerous coding practices
BinaryByter
i work in robotics
You are lucky to be hired
Anonymous
there you tend to try to minimize both memory and speed
Anonymous
i mean maximize speed
BinaryByter
Anonymous
minimize latency
BinaryByter
i mean maximize speed
by not using std::string?
Anonymous
by not using std::string?
you literally cannot on a lot of things
Anonymous
look at stm32
Anonymous
it is a pain to get that working with c++
Anonymous
and even then not the whole std library is ported
Anonymous
well std/stl
Anonymous
PICs can only support C++ at the PIC32 level
Anonymous
which you try to minimize use of as well because they are expensive
Ludovic 'Archivist'
Ludovic 'Archivist'
making the subset you need is sufficient and fast
Ибраги́м
const string nl ="\n" would also help
You just wasted at least 24 bytes, when all you needed was 2 char nl[] = "\n"; Edit: I know @QNeko will try to be wiser
Ибраги́м
oops!
Ибраги́м
Printf does suck too, it's better to use boost::format
How about fmt:: from https://github.com/fmtlib/fmt
Ludovic 'Archivist'
You just wasted at least 24 bytes, when all you needed was 2 char nl[] = "\n"; Edit: I know @QNeko will try to be wiser
and even wiser: template<class char_type> constexpr char_type nl() const { return '\n'; }
Ludovic 'Archivist'
cache misses?
CPU trying to query its cache of RAM and having to load RAM because data is not in cache
Ибраги́м
Alignant
How about fmt:: from https://github.com/fmtlib/fmt
Never heard of it. Seems cool though
Ибраги́м
Marie
Never heard of it. Seems cool though
Never heard of it. It is cool though
Ибраги́м
Marie
you little shit xDD
you big shit xDD
Ибраги́м
I see
CPU cache, L1... L3 is faster than RAM
Ludovic 'Archivist'
U don goofed m8
did I again placed the constexpr wrong?
MᏫᎻᎯᎷᎷᎬᎠ
Damn!!!
BinaryByter
yea
but wouldn't a constexpr be even wiser?
Ибраги́м
did I again placed the constexpr wrong?
1. const only work inside struct | class 2. nl() is NOT that wise sire
Ибраги́м
What'\s wiser ? Operator _nl
Ludovic 'Archivist'
1. const only work inside struct | class 2. nl() is NOT that wise sire
allows for any char type to be used, even wchar_t
Ибраги́м
const works everywhere
/slap Even in main() ?
Ибраги́м
int main() const ?
BinaryByter
BinaryByter
pretty sure it won't do a lot
BinaryByter
but it should work
Ибраги́м
U don goofed boi!
Ибраги́м
but it should work
TRy that sire
BinaryByter
TRy that sire
is it the linker or the compiler who complains?
Ибраги́м
allows for any char type to be used, even wchar_t
How do you explain nl<char> () ?
BinaryByter
Compiler
THE COMPILER COMPLAINS ABOUT THE MAIN FUNCTION?
BinaryByter
Alignant
CPU cache, L1... L3 is faster than RAM
We wouldn't need it if it was slower ^_^
Anonymous
it seems much easier and does everything you want
Alignant
Guys, you're descussing bullshit ^-^ \n is not that hard to type :D
Ludovic 'Archivist'
it seems much easier and does everything you want
You use exactly the word easy, and I will say, as opposed to simple from the compiler standpoint
Anonymous
You use exactly the word easy, and I will say, as opposed to simple from the compiler standpoint
it takes less from a compiler to do what i wrote then just to parse what you wrote
Ludovic 'Archivist'
i agree
And you say functionnal programing is important, but you do not understand its value here
Ибраги́м
You just wasted at least 24 bytes, when all you needed was 2 char nl[] = "\n"; Edit: I know @QNeko will try to be wiser
std::ostream& nl(std::ostream& cout) { return cout <<'\n'; } Usage: std::cout << "Line" << newl << "Text";
Anonymous
And you say functionnal programing is important, but you do not understand its value here
it is important however for C/C++ you should stick to imperative programming paradigms
Ибраги́м
i was gonna propose a similar one
Survival of the fastest
Anonymous
just to pass it into a function
Anonymous
why the FUCK would you do this?
Ибраги́м
We value : Integration, Simplicity and principle of the least surprise
Anonymous
Issue closed
you do not have the right to close this issue for this repo