@BartekBanachewicz Tried to write a game in JS with Pixi + ember but got messed when trying to make buttons for the user interface. Whats the paradigmatic way to make styled buttons with the webstack?
@StackedCrooked Could it be Coliru isn't giving any output anymore (if so, that has been for a few days already, I must admit I frequently use Wandbox these days if Coliru is giving me trouble)
I just started doing research and I am writing all programs related to the research in Matlab. For the first month, I used the 1 month free trial that Mathworks provides for free since the trial has expired my professor told me to download Matlab from the files he give me but those files have a cracked version of matlab. What should I do?
@Tyger write to your uni software department and ask for a license. If they decline, write to Matlab and ask them for trial extension, explaining the situation.
This of course assumes you don't want to buy a license for yourself.
@Morwenn When a company I telephone interviewed with forgot to call back to make an appointment, I did say "fuck you" (never heard from them again, I presume they lost interest/filled the position)
This pattern:
while (callback(CallbackActions::NeedMoreInput, src, read)) {
in.async_write_some(...);
out.async_read_some(...);
}
is most likely misguided (async operations always immediately return, so you'd simply keep adding more async operations without giving them a chance to run...
Is there a performance hit when using boost::asio? Could this contribute to global warming, the melting of the polar ice caps, and declines in polar bear populations?
the algorithm is basically like that: std::nth_element to partition the collection in two, with the first part being twice the size of the second, then mergesort the first part using the second one as a temporary buffer (except you swap elements instead of creating/destroying them), then call the algorithm again on the unsorted part
now I have to think more: the easiest solution is to build a recursive top-down mergesort, but then it's O(log n) space
I shared an implementation on code review a few years ago and it's actually rather straigthforward :p
actually even with a natural mergesort I would need to store references to runs to avoid having to compute them over and over again, so that wouldn't use O(1) space either :/
but that bookkeeping can be very small compared to the size of the array, for especially when you merge such that each run is at least twice as large as the next one
then you only need up to 64 pointers to hold runs as long as the memory space
the linux kernel uses a similar trick for mergesorting its linked lists
I just remembered that quicksort and friends use O(log n) memory due to recursion, so maybe if I make quick_merge_sort use O(1) memory it can be the fastest algorithm with the best complexities for both space and time x)
ok, block sort is equivalent as well as being stable, too bad u_u
@ratchetfreak I actually need the first run to be smaller than the second, which means that I could only track the first 3 runs, but the merge strategy of just merging the following until they are big enough don't feel super great :/
you have a list of runs and when you add a run you then check if runs[runs.length-2].length > 2*runs[runs.length-1].length if not you merge runs[runs.length-2] and runs[runs.length-3] and repeat the check
@Morwenn basically always make sure that run[i].length > 2*run[i+1].length and any operation that can increase a run's length (appending to the end can result in a merge of the 2 previous runs. Except at the start of the array which merges with the run that increased in length.
you only have O(log n) runs max because the length of each run gong back doubles each time, so with 64 spots you are already exceeding the possible address space
if you have 64 runs stored then the last run is at least 2^64 long
Today in 101 ways you know you are a good software developer: I was called because my software "doesn't work" and promptly diagnosed it as a hardware problem.
C++ is a general purpose programming language also known as an OOP. When you write code in C++ you have to do three things in order for your program to run, they are as follows:
Write the source code and add the file extension being .cpp
Compile the code in order for it to be machine readable la...
> Enthusiastic programmer, languages of choice being; Python, C++ and Java. I'm an aspiring OSCP candidate, as I've started my path in working towards gaining a better understanding of how cyber security can be better enhanced.
@nwp They remain just as funny, whether you appreciate the humor or not. "If you think an horse's tail is a leg, how many legs does a horse have?" "Five". "Wrong. It still only has four legs, regardless of what you think about its tail."
it was only meant to be a toy library and shit, but now that it's got quite a few stars and is available through a package manager I try to make it slightly better, but I don't want to break the fun abstractions
I thought of partial spec, but every SFINAE condition actually depends on the operator() parameters
so I'd need to add more tags everywhere in sorters to know when I can use a simpler version
I tried to complete the class to handle non-const operator() in the library and actually store sorters in sorters adapters, and compiling the whole testsuite skyrocketed to 30+ minutes x)
and it produced ICEs on Clang which I didn't manage to fix
also I couldn't even move my mouth during some steps of the compilation