6 private links
The Nim programming language is exciting. While the official tutorial is great, it slowly introduces you to the language. Instead I want to quickly show what you can do with Nim that would be more difficult or impossible in other languages.
Let me get this straight. We have an emulator for 1985 hardware that was written in a pretty new language (Go), ported to a language that isn't even 1.0 (Nim), compiled to C, then compiled to JavaScript? And the damn thing actually works? That's kind of amazing.
So what does this have to do with make_shared? An std::shared_ptr is a relatively complex beast that has to do atomic reference counting and efficient destruction dispatching and things like that. As such, a relatively large amount of code is instantiated for each std::shared_ptr<> type.
Implementing f() to make the following snippet compile without the static_assert being fired looks impossible, doesn't it?
// <insert solution here>
int main () {
constexpr int a = f ();
constexpr int b = f ();
static_assert (a != b, "fail");
}
Sometimes when programming we need to tune a small portion of code which is critical to an implementation. For example an inner loop may involve a pixel bashing operation which dominates the program’s overall performance. If this operation uses a comparison, and that results in the compiled code branching, it can hurt performance on pipelined CPUs. It may be better to find a branch-free alternative even if it appears to make the code slightly more complex.
‘Madcam‘ is an open frameworks (C++) based project for mixing USB Web Cameras (e.g. the 10$ cheap USB - PS3-Eye Webcam) im realtime. Why this is awesome? Its usually hard and/or expensive to mix many video signals in realtime and display them side by side.
Perform the same request against two HTTP servers and diff the results.
Each of the CPUs has its own set of registers and modes. Only the memory is shared between them. That means that, in order to put the 8 cores of an i7 into long mode, we have to execute the very same procedure for each of the cores, because each core has its own register set, GDT, LDT etc. Therefore, we are able to start a CPU in real mode and keep it there, while directing another CPU to long mode
Ever wondered how device drivers are reverse engineered? We’ll show you with a simple yet complete example
The Open Game Engine Exchange (OpenGEX) format is a text-based file format designed to facilitate the transfer of complex scene data between applications such as modeling tools and game engines. The OpenGEX format is built upon the data structure concepts defined by the Open Data Description Language (OpenDDL), a generic language for the storage of arbitrary data in human-readable format.
List of all register on a x86_X64 cpu
Silicon is a high performance, middleware oriented, C++14 http web framework. It brings to C++ the high expressive power of other web frameworks based on dynamic languages without introducing run-time overhead. Its compile-time static metaprogramming paradigm allows to match the performances of servers written in C.
The behavior of malloc(0) is implementation defined by the standard. The two legal possibilities are to return a null pointer or a unique pointer. In many implementations, the second option is accomplished by means of internally increasing the length to 1 (which is then likely rounded up to 16 or so). Legally, one cannot deference this pointer, although in practice some bytes are allocated which means that won’t crash.
Nim (formerly known as "Nimrod") is a statically typed, imperative programming language that tries to give the programmer ultimate power without compromises on runtime efficiency. This means it focuses on compile-time mechanisms in all their various forms.