« first day (3628 days earlier)      last day (1305 days later) » 

12:48 AM
Well did a coding interview at a fintech company but didn't finish it on time (got 6/9) questions within the time period. Growing realization that the job is entire string manipulation :-)
Also had some bit twiddling
 
@traduce i think the function array sounds ..possibly good: indexing an array will be faster than (potentially, average worst case) 36k if() ?
depends how common each value is? if 99.99% start with 00x1 maybe not..
 
Some fintech companies have a reputation of interview many but hire very few.
I worked for a few of them many years ago.
Now looking back, I truly realise how low I was - if you are rich and powerful, they pay you for appearance, if you are a nobody like I was, you have to fork out time and travel expense yourself for interviews. 3 - 4 interviews for a position with little pay. So sad.
But I was lucky. Nowadays my destiny is in my hand, not someone else.
Make myself steady and always, then I can help others.
 
1:31 AM
@traduce maybe not :/ if the functions can be iinlined or not, cache miss might be more of a performance hit than the If()s
 
 
2 hours later…
3:58 AM
Hi
Recently, I'm studying dll injetion and I found something interesting.
I opened the process with PROCESS_QUERY_LIMITED_INFORMATION and inject dll into the process using CreateRemoteThread. Surprisingly it works. What's happening here? Would anyone give some explanation about this?
 
 
1 hour later…
5:04 AM
25
A: DLL Injection with CreateRemoteThread

Hans PassantIt works by accident. It is a very common accident, Microsoft makes a great deal of effort to ensure that the operating system DLLs, like kernel32.dll, have a base address that doesn't conflict with any other DLLs. Further enhanced by kernel32.dll getting loaded very early at process initializa...

 
5:54 AM
So, how do people manage shared libraries with CMake? On MSBuild I usually copy the DLLs into the target directory as a post build step. What is the CMakeway?
 
 
1 hour later…
7:24 AM
@Mikhail you can add them to the install with cmake. Or also copy to the build-folder if you need to.
 
 
2 hours later…
9:04 AM
Would also be neat if packages supplied a way to get the associated dynamic libraries? Did they recently add this functionality?
add_custom_command(TARGET hypernet POST_BUILD
               COMMAND ${CMAKE_COMMAND} -E copy_if_different
               "C:/Program Files (x86)/CGAL/bin/CGAL_Core-vc140-mt-4.13.1.dll"
               "C:/Program Files (x86)/CGAL/bin/CGAL_Core-vc140-mt-gd-4.13.1.dll"
               "C:/Program Files (x86)/CGAL/bin/CGAL-vc140-mt-4.13.1.dll"
               "C:/Program Files (x86)/CGAL/bin/CGAL-vc140-mt-gd-4.13.1.dll"
               "C:/Program Files (x86)/CGAL/lib/libgmp-10.dll"
               $<TARGET_FILE_DIR:hypernet>)
This is what I ended up doing but it looks a bit on the ugly side because it doesn't switch depending on the version of the MSVC runtime, and obviously isn't platform independent...
I guess there is really no way of avoiding curating a list of the shared libraries on a per platform and runtime basis, although somehow I feel each package could ... in principal supply this list (we have the technology!).
 
 
5 hours later…
2:08 PM
If you think debugging a computer program is not easy, try to add a few other devices on the same computer then debug them all.
 
nwp
It's mostly a tooling problem. If my debugger wouldn't constantly crash my program wouldn't be so difficult to debug.
 
2:47 PM
You wouldn't have more powerful tools to debug all those other devices.
 
 
2 hours later…
4:25 PM
@Mysticial Any thoughts about working for these guys? maystreet.com
 
 
2 hours later…
6:04 PM
Also the string.find_last_of family of functions should accept a predicate
 
 
1 hour later…
7:10 PM
Also std::reverse_copy is neat
2 days ago, by Morwenn
plz I feel lonely here ç_ç
 
 
2 hours later…
9:15 PM
2 days ago, by Morwenn
plz I feel lonely here ç_ç
I'm sure you all wanted to know what's the best algorithm to sort an std::list<double>
The results are even neater for std::forward_list
 
@Morwenn verge sort... this could be really bad and require Lyle to do a reaction video
 
Why is that?
Who's Lyle?
Why would they do reaction videos to algorithms?
 
@Morwenn search for "Bitwit verge"
on youtube
 
oh
 
9:32 PM
@Morwenn So only time I've seen a forward list used in production is in the linux kernel, might be fun to see if there is some hilarious improvement in the kernel if the lists ever get sorted.
 
Depending on how and what they sort it might be ok
The heavier the moves, the better std::forward_list::sort becomes
 
Can we just replace everything with a sorting network?
Is any graph on your plot a sorting network?
We need more sorting networks...
Although somehow I think for already sorted data they aren't too good
 
9:50 PM
Sorting networks for 2^22 elements?
Theoretically possible with an AKS network but why
 
No like 40 elements
 

« first day (3628 days earlier)      last day (1305 days later) »