Kelechi.
Systems Programming || Machine Learning || C++ || Rust
I woke up and decided I wanted to make my compiler better
More Stories
Bits to Bytes: Building Computer Memory from Scratch (Part 1)
I am really curious about how computers are able to remember things
Lambda in Cpp
Think of lambdas as a shorthand for writing a functor without needing to define a struct or class
Function Objects (Functors)
Functors are basically instances of classes that implement the operator() method
Function Pointers
Just like data pointers point to data, function pointers point to the addresses of functions.
Intrusive Pointers
But how does it keep track of how many shared_ptr are owning the object and all that ??, with the help of a control block of course!
Bazel from the Eyes of a Cpp dev
After trying this out, I really wish I could easily integrate Bazel with vcpkg just like cmake does, but unfortunately 🫠
Copy and Clone in Rust
You must first understand how to build a code. what does it actually mean to build a code ?, how different is it from compiling and running ??? I just hope this blog dosent get too long 💀💀😂
Type Traits -C++
With type traits, you can write code that adapts to different types, and performs different actions depending on the characteristics of those types.
Code Generation- CuriousX
CuriousX code generator takes an AST as input and outputs ARMv8 assembly code, it traverses the AST in postfix order and generates code for each node in the AST
Register Allocation - CuriousX
In the same way, a computer processor is like a chef in a restaurant kitchen, and registers are like the small work area where the processor can keep the data it needs to work with most frequently
Revolutionizing Null-Handling with std::optional
C++23 features are out already and i am still battling with C++17, and who knows, maybe by the time I have mastered C++17, C++26 will already be here! 😅
Semantic Analysis in CuriousX
As the semantic analysis traverses the tree, it also checks and adds variables to the symbol table. The symbol table is like a dictionary for your code, it keeps track of all the variables and their types
Syntax Analysis in CuriousX
For example, comments and white space (like spaces and tabs) are like the garnishes on a dish - they make your code look pretty but they dont actually do anything
[vcpkg] Add new Port
It is also worth noting that package managers typically provide more features and automation than Git submodules. For example, package managers can handle dependency resolution, version management, and building and installing libraries
Lexical Analysis in CuriousX
For example, comments and white space (like spaces and tabs) are like the garnishes on a dish - they make your code look pretty but they dont actually do anything
A taste of OCaml 😋
OCaml has very predictable performance. In fact, any decent OCaml hacker (who knows assembly, of course) can look at the source and have a rough idea of what the generated assembly code would look like.
OCaml for n00bs
As software grows more complex and we depend on it more for activities ranging from simple tasks to life saving tasks, OCaml is designed in a way to tame complexities and help us write correct software
Systems Programming
The best way to think of "system programming" is the software that talks to hardware
Type Casting 🎥
This is my best goto cast operator, performs same implicit cast that C-style cast does, the only difference is that the conversion happens at compile time, which gives you a compile time checking ability
Smart Pointers 🤓
But in as much as they are tremendously powerful, they are also extremely dangerous as a single overlook can devastate your entire app. 🥲🥲
String vs String_view
Applying this logic to string_view, it means string_view is the window, which is only a view of the string and cannot be used to modify the actual string. it allows you to point into an existing string at some offset
Build systems - CMake
CMake does not build the project, it generates the files needed by your build tool(make, ninja etc). This means CMake is a build script generator and acts as a generator for other build systems
Build systems -C++ (PART 2)
What happens when a new directory or file is added to the project? Do we have to keep manually editing the build script tho accommodate new stuffs? 🤦
Build systems -C++ (PART 1)
You must first understand how to build a code. what does it actually mean to build a code ?, how different is it from compiling and running ??? I just hope this blog dosent get too long 💀💀😂
Outreachy - Final project progress blog post
this past three most has been whole some, from learning Rust from scratch to getting to fall in love with Rust (dont worry i am still a c++ girl 😋)
Outreachy- Think about my Audience- Introducing Enarx
Running an application in the TEE is not that simple as there are different silicon vendors with different TEE, that means you have to develop your application specific to that platform, which means no portability
Everyone Struggles
So guys i spent hours troubleshooting something i had no power over 😆, i practically wasted time, well thats a lesson for me, there is no shame in struggling
Trusted Execution Environment
Together, these attributes provide not only an assurance that the data is kept confidential, but also that the computations performed are actually the correct computations, allowing one to trust the results of the computation as well
Confidential Computing Consortium
Who are they ??, Why do they do it ??, okay wait I know you are confused 😂, Hold on, I will explain in a minute 😁
Outreachy - The Journey Begins
I love low level programming and I think I want to go into Systems Engineering fully (yep, still figuring it out 😬). In my freetime I loove research and watching cartoons