What is the smallest possible Windows (PE) executable?

As quoted from source (Creating the smallest possible PE executable): 1 Smallest possible PE file: 97 bytes Smallest possible PE file on Windows 2000: 133 bytes Smallest PE file that downloads a file over WebDAV and executes it: 133 bytes The files above are the smallest possible PE files due to requirements of the PE … Read more

A step-up from TiddlyWiki that is still 100% portable?

After some time and serious consideration, I will post my own answer. There is nothing that matches TiddlyWiki. As for voluminous information, TW can pretty much handle it. (My early discouragements were due to malformed code.) Difficulty accessing information through the interface becomes an issue before any speed problems. This isn’t to fault the interface … Read more

GLIBCXX versions

Use readelf -a and objdump -x to inspect ELF files in preference to strings. Actually, all the GLIBCXX_* versions don’t apply to the entire library, but to each symbol (symbol versioning, see DSO-howto). So you can have e.g: std::char_traits<wchar_t>::eq@@GLIBCXX_3.4.5 and std::ios_base::Init::~Init()@@GLIBCXX_3.4 on the same library file. The fact that your program needs GLIBCXX_3.4.9 probably means … Read more

msys path conversion (or cygpath for msys?)

Update (Aug-2016): This question is no longer relevant, as msys2 now comes with cygpath in its installation. … I’ll summarize my research here. The cygpath equivalent in MSYS is to use this command: { cd /c/some/path && pwd -W; } | sed ‘s”https://stackoverflow.com/”\\|g’ The problem with this approach is that it requires existing path, e.g. … Read more

What is the most portable/cross-platform way to represent a newline in go/golang?

I got curious about this so decided to see what exactly is done by fmt.Println. http://golang.org/src/pkg/fmt/print.go If you scroll to the very bottom, you’ll see an if addnewline where \n is always used. I can’t hardly speak for if this is the most “cross-platform” way of doing it, and go was originally tied to linux … Read more

How to design a C / C++ library to be usable in many client languages? [closed]

Mostly correct. Straight procedural interface is the best. (which is not entirely the same as C btw(**), but close enough) I interface DLLs a lot(*), both open source and commercial, so here are some points that I remember from daily practice, note that these are more recommended areas to research, and not cardinal truths: Watch … Read more