Generate C interface from C++ source code using Clang libtooling
I developed a concurrent user-thread library using C++, and was looking for a way to provide a C interface and make the functionality available in C. In order to achieve this goal, I started writting a C wrapper interface manually where each public method of a class is mapped to a function in C with the class name followed by the function name. Also, constructors are mapped to class name followed by _create and destructors are mapped to the class name followed by _destory....
How to wrap a system call (libc function) in Linux
For one of my research projects I had to wrap linux system calls and redirect them to another thread. In Linux system calls are not invoked directly, but rather via wrapper functions in glibc[man 2 syscalls]. The glibc wrapper is only copying arguments and unique system call number to the registers where the kernel expects them, then trapping to kernel mode and setting the errno if the system call returns an error number [man 2 intro]....
National Geographic Photo of the day Downloader for Linux
National Geographic's Photo Of the Day I am a fan of National Geographic photos on their site, and I also get bored of by my desktop background after a while. So I decided to create a script to download National Geographic photo of the day, and using it as my desktop background. I am using it over Gnome3 (I am using Fedora as I think it’s more stable than Ubuntu, and I like Gnome3 way better than Unity), but if you are a Unity user it should work for you as well....
What Might My Resume look Like If I Were a Computer !?
The other day I was about to update my resume, and this crazy question came to my mind: What might my resume look like if I were a computer ? And This is the result. (Best viewed in Chrome and Firefox). Well, I am aware that I would not wake up one morning finding out I turned into a computer. Also, I am not sure if one day I turn into a computer, I would look for a job....
Mercurial on Bluehost
...