Posted in Posts, tagged devel, h4x0r on June 5, 2008 | No Comments »
Just letting you know about evil C programming language constructs. My favourite one (involving preprocessor-abuse, of course!):
/* Test whether compiler supports C++-style comments */
#define HELPER 0//**/
#define CPLUSPLUS_COMMENTS_SUPPORTED (HELPER+1)
More posts to come… someday! I am pretty busy lately
Read Full Post »
Posted in Posts, tagged devel, floss, nginx on March 9, 2008 | 4 Comments »
This is a recipe which will teach you how to set-up a Bazaar smart server on top of the great Nginx HTTP server. I will not deal with optimization or fancy setups at all, the goal is just having your Bazaar branches published, feel free to comment if you feel like the proposed setup could [...]
Read Full Post »
Posted in Posts, tagged devel, floss, gentoo on March 3, 2008 | No Comments »
Excerpt from eutils.eclass, as included in the official Gentoo package tree:
# Make a desktop file !
# Great for making those icons in kde/gnome startmenu !
# Amaze your friends ! Get the women ! Join today !
#
# make_desktop_entry(, [name], [icon], [type], [path])
This is not [...]
Read Full Post »
Posted in Posts, tagged devel, floss, gentoo, hardware, linux on January 24, 2008 | No Comments »
Alex Hixon has just released version 0.11.0 of the r5u870 driver, which supports the webcam present in the Vaio TZ11MN laptops (amongst others). I have updated my overlay with an ebuild for this release. Enjoy!
Read Full Post »
Posted in Posts, tagged art, devel, h4x0r on December 28, 2007 | No Comments »
One of the things that amazes me about the C programming language is that you can always
find something new: it teaches you to be humble about your programming wizardry. Today I have found two new mind-melting techiques which can cause serious brain damage:
Duff’s Device: speeding-up tight loops by unrolling and using a switch statement [...]
Read Full Post »
Posted in Posts, tagged art, devel on November 5, 2007 | 2 Comments »
Regarding this little quiz, here I will write down proper explanations for the snippet of code which does array access using the “2[p]” syntax instead of the usual “p[2]” form. In order to properly understand which is going under the roof, I will try to explain things from the ground up, starting with some basic [...]
Read Full Post »
Posted in Posts, tagged art, devel on October 29, 2007 | 10 Comments »
Let’s see how good is your knowledge of the C language: ¿can you tell me what does the following snippet print?
#include <stdio.h>
int main(int argc, char **argv) {
char *p = “hello”;
printf(”%c\n”, 2[p]); [...]
Read Full Post »