Posts Tagged ‘devel’
Evil C
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
Filed under: Connectical, Posts | Leave a Comment
Tags: devel, h4x0r
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 [...]
Filed under: Connectical, Posts | 4 Comments
Tags: devel, floss, nginx
Get the women!
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 [...]
Filed under: Connectical, Posts | Leave a Comment
Tags: devel, floss, gentoo
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!
Filed under: Connectical, Posts | Leave a Comment
Tags: devel, floss, gentoo, hardware, linux
C: Trick or Treat?
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 [...]
Filed under: Connectical, Posts | Leave a Comment
Tags: art, devel, h4x0r
C language explanations
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 [...]
Filed under: Connectical, Posts | 2 Comments
Tags: art, devel
C language quiz
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]); [...]
Filed under: Posts | 12 Comments
Tags: art, devel
Bamboo Fun + Gentoo
It finally arrived, I had to patch by myself the linuxwacom kernel driver to add support for the device identifier of my shiny new Bamboo Fun tablet. I did some test to verify that the values in the device features table are the same as the black Bamboo ones, and everything seems to work properly. [...]
Filed under: Connectical | 6 Comments
Tags: devel, floss, gentoo
Hario 1 ― Nginx 0
Just letting you know: today I tamed Nginx. My shiny new fancyindex module for this amazing web server is alive. This, alongside with some love it is getting lately (like Manlio Perillo adding proper WSGI support to Nginx) will make it one of the web servers to take as reference in the future. Maybe I [...]
Filed under: Connectical | Leave a Comment
Tags: devel, floss
On web browser breakage
It is amazing how b0rked web browsers can even affect web servers. I you don’t believe, just take a look at this piece og the gzip filter of the Nginx web server:
/*
* if the URL (without the “http://” prefix) is longer than 253 bytes
[...]
Filed under: Connectical | Leave a Comment
Tags: devel, floss