10,646 reputation
11140
bio website
location
age
visits member for 2 years, 9 months
seen Jun 26 at 16:41

Aug
30
comment Is there a name for the concept of a “cumulative checksum”?
I would upvote it if you cited some source for it.
Aug
27
awarded  Necromancer
Aug
27
answered The right place to embed a parser : Server or the Client?
Aug
26
answered My github pull request was merged, what's the convention at this stage?
Aug
26
comment Can a method that must be overridden be considered private?
Standard C++ library has many pure virtual methods and all of them are private, not protected. Many of them are called publicly through thin wrapper, but they are still private.
Aug
26
comment Is it good/safe OOP practice to have a method whose only purpose is to send/retrieve data from another class?
@ButtleButkus: You should be passing around objects. It gives you better checking, because it will fail quickly (on missing attribute) if you pass wrong type and it will hide the dereferencing inside the methods. Stop if it would make the code longer or more complicated though.
Aug
23
comment C++ Linkage Languages other than C?
@johannes: Actually Windows use Pascal convention for many things, but since it needs that in C too and C does not have the "extern "Language"" syntax, they do it via platform-specific C extension, so for C++ it's still just extern "C" and the the special keyword specifies the different calling convention.
Aug
23
comment Which one subsumes the other: class-based object-orientation or prototypal inheritance?
@EduardoLeón: Because it would no longer be static. A statically typed language means that each class is a type defining which members exist. You can create a type for dynamically typed objects in statically typed language, that's what you are doing, but they are no longer statically typed as their static type is always the same.
Aug
23
awarded  Nice Answer
Aug
23
answered Which one subsumes the other: class-based object-orientation or prototypal inheritance?
Aug
23
comment Without C++-like destructors, how do we return resources that aren't managed by garbage collector in Java?
I'd sum the difference thusly: C++ is an advanced multi-paradigm language allowing especially functional programming and metaprogramming while maintaining excellent performance at the cost of being somewhat difficult to master. Java is intentionally dumbed down to make it easy to learn. While garbage collector helps productivity, it can get rather verbose due to lack of other features. If Java is not frustrating to you, you don't know C++!
Aug
23
comment What do other languages offer when it comes to infrastructure technology that could indicate its advantage over C in the future?
It should be noted that while garbage collector prevents unreleased resources to which you don't have reference any more, it can have related problem where forgetting to break some reference keeps a lot of objects alive. I am using a web app in python where I had to set the thread to restart every 10 requests, because it is leaking tens of megabytes in each request.
Aug
23
comment What do other languages offer when it comes to infrastructure technology that could indicate its advantage over C in the future?
@Vatine: But it does not really allow avoiding the garbage collector like it does in D and rust. And it is a library, which needs to be separately implemented and needs to use C or other lower level language.
Aug
22
comment How do I implement code obfuscation for native code?
I agree with @SK-logic. Clang is the only suitable compiler out there and should work on Windows. So if you are having problem getting it to work, ask a specific question (on stack overflow) about what does not work for you there (note: clang works fine with mingw libraries, but with microsoft libraries it has some problems calling linker from MSVC++; I didn't investigate further)
Aug
22
comment How do I implement code obfuscation for native code?
Problem with self-rewriting code is that current operating systems greatly limit it. You can generate code on heap and run it (virtual machines need that), but you can't write over code loaded from the binary file.
Aug
22
comment How do I distribute my scientific software with as few dependencies as possible?
@stijn: Yes. Except there is rarely point in that (beyond the licensing reasons). Also on Windows dynamic linking does not work very well for C++.
Aug
22
reviewed Approve suggested edit on What is the exact syntax of inline?
Aug
22
comment How do I distribute my scientific software with as few dependencies as possible?
On Linux, dynamic linking is preferred, because the package management software ensures there is only one copy of each library in the system. But on Windows, just link statically as it does not have much of a usable package manager. Even on Linux I'd statically link stuff that is not in standard package repository, or in LSB for cross-distribution compatibility. Just make sure you are allowed to do so (LGPL stops on dynamic link boundary, so you may not statically link e.g. Qt in non-LGPL application).
Aug
21
comment How do I implement code obfuscation for native code?
-1. Not because of the angry comment by asker that it's not what he wanted, but because it's answer before you knew.
Aug
21
comment How do I implement code obfuscation for native code?
@user2102508: As for symbols, there are many symbols left after compilation to native code. It depends on the binary format, but ELF specifically leaves all non-static symbols in the symbol table by default. And that's the easiest hint for disassembling most of stuff. Telling the linker not to is the first step in protecting native code from being successfully disassembled (yes, PE is different, it does not do by-name late binding; ELF does).