BinaryByter
:D
Dima
why not lan
BinaryByter
i prefer coax cables
Dima
found this in my code, what..
Nikolas
wrong on so many levels
Elnee
found this in my code, what..
What. What the fuck.
Elnee
:D
Elnee
-0
Roxifλsz 🇱🇹
Nikolas
max between 1 and a number that I REALLY expect to be at least 1, after subtracting 0
Nikolas
makes sense
Nikolas
¯\_(ツ)_/¯
Dima
Leinier
Good morning to all
Mihail
found this in my code, what..
What are you writing that you'd be concerned about the number of LPUs?
Mihail
Good morning
Ludovic 'Archivist'
found this in my code, what..
I guess that - 0 is a trick for type conversion
Ludovic 'Archivist'
How would that work?
The same way as double/int => int
Mihail
The same way as double/int => int
Yeah but the same can happen with subtraction?
Mihail
Also if it is going to do some sort of implicit conversion won't it do it anyways, looking at the type that the function takes?
Ludovic 'Archivist'
Yeah but the same can happen with subtraction?
Not sure, I don't know the types involved and it may rely on a specifically designed type with that property
Leinier
Group, I’m developing a software. I enter here in order to debate and try to elevate the quality of my algorithms
Leinier
And, by the way, share with you all some of my thoughts
Dima
I guess that - 0 is a trick for type conversion
No it’s supposed to be - 1 haha
Leinier
I’m in the process of creating a module that process files and extract informations that will be stored in a database. I want that process be fast, that’s why I created an algorithm to be able to process that files in parallel
Leinier
It’s my first time making that. I want to share with you my algorithm and debate about it
Nikolas
No it’s supposed to be - 1 haha
which magicall makes things much more reasonable 😆
Mihail
No it’s supposed to be - 1 haha
Well then idk, as you typoed like 9 keys away
Mihail
Unless you use some weird keyboard layout where 0 is next to 1
olli
The same way as double/int => int
that's not how it works... double divided by int results in double http://eel.is/c++draft/expr.arith.conv#1.3
BinaryByter
just use the ROUND opcode
BinaryByter
😏😏
Leinier
here is the major part of the algorithm: while (filesQueue.empty() == false) { cleanProcessedFiles(); if (filesQueue.size() < _configuration.filesProcessingThreads()) { for (unsigned short i = 0; i < _configuration.filesProcessingThreads(); i++) { if (filesQueue.empty() == true) { break; } createNewFileProcessing(); } sleepFor(milliseconds(500)); } }
Leinier
that algorithm do the magic. i define a configuration variable named 'filesProcessingThreads' and I assign a value, i.e. 4. the algorithm then maintain 4 slots of file processing, and when one finish, then it's deleted, one slot is avaible and then one file processing is created
Leinier
what do you think about that? do you see something bad?
Leinier
that algorithm runs in a thread in order to not to block the main process, so there is other code for termination signal monitorization and cleanup code that I omit
数学の恋人
Hey guys one quick question. I have a variable of datatype std::vector<std::string> say vecstr Now I want to initialize values of vecstr how can I achieve that?
Leinier
First of all anything starting with _ is bad and technically undefined behavior
there is some site that talk about that? that works for me very good until now, but I'm open to read about that and learn
Mihail
And that's the important part
Anonymous
hi
klimi
hi
数学の恋人
K thanks
Anonymous
i am new here 😅😅
数学の恋人
It was nothing new (foolish me) , still thanks
Leinier
It will probably work, but it's not guaranteed to work
i think it works well, just like #ifdef linux #endif // linux
Anonymous
So.........can this group be used by beginners ?? I dont wanna get a ban......thats why...?
Mihail
So.........can this group be used by beginners ?? I dont wanna get a ban......thats why...?
Yes, but not googling a question first might get you a warning
Leinier
Also is _configuration::filesProcessingThreads() constexpr? Because if it isn't then those calls seem a bit redundant
no, that is a function that returns the value of a variable if it's assigned different from 0, or the number of detected cpu in the system if it's 0
Mihail
In the while loop
Leinier
???
i explain: the c headers used in gnu version makes a definition of several variables that start with _ i think if that works perfectly then all the variables starting with _ but with different names should works perfectly as well
Leinier
i don't think that using _ before the name of the variable has negatives results. and I do something extra: define a namespace for my software, so every variable is within the custom namespace, making all variables completely unique
Mihail
Actually no, because it'd still inherit everything from :: (the global namespace)
Mihail
Wait no
Mihail
Either ways technically everything starting with _ is undefined behavior
Mihail
Also what were you referring to with that ifdef example?
Leinier
#ifdef linux #endif // linux
Leinier
i'm trying to write _ _ linux _ _
Leinier
but when I put that together then telegram erased it
Mihail
Yeah italic formatting
Leinier
uhhmmm
Mihail
But how's that relevant?
Unknown
What is faster in between these in case of arrays ? 1.merge sort 2.selection sort 3.insertion sort
Nikolas
What is faster in between these in case of arrays ? 1.merge sort 2.selection sort 3.insertion sort
mergesort has an algorithmic complexity of O(nlogn) The other two are O(n^2)
Nikolas
BTW you could have find with a google search...