|
soul^keeper |
 |
Administrateur 
Connecté
Niveau : 5 N° de Membre :
1
Ancienneté : 100%
Participation : 19%
Inscription: 22 Feb 2002
Localisation: La Défense
Age: 48
Messages: 16622
Sujets Lancés : 2412
|
[LINUX] Humour : le code du kernel Linux et ses petits secrets
Citation: Humour : le code du kernel Linux et ses petits secrets
Allez vous faire voir chez les grep ! (<a href="http://light.pcinpact.com/actu/news/32677-linux-kernel-secrets.htm">Source</a> )
C’est une actualité qui n’a pas la moindre importance. Elle ne va rien changer à votre vie, ne va rien vous apprendre d’utile et va peut-être éventuellement stimuler légèrement l’activité nerveuse de vos zygomatiques. En dehors de ça, franchement, point de salut.
Et pourtant, qui l’aurait cru ? On peut facilement s’imaginer les développeurs travaillant sur le kernel de Linux comme des hommes très sérieux, tellement impliqués dans leur travail qu’ils en oublient de se raser, de se laver, de manger, enfin de vivre. Les légendes urbaines ont décidément la vie dure, et il est temps de leur porter un bon coup sur le coin de la figure.
Allez, mords-y l’œil !
Le reste va dépendre d’une chose essentielle et assez malheureuse pour certains : votre niveau en anglais. Si vous en êtes restés à « Where is Bryan », les choses risquent d’être compliquées. Si par contre vous pouvez tenir comme moi une discussion technique avec Mike Schroepfer (ingénieur logiciel de Mozilla et créateur du JavaScript), alors vous n’aurez aucun problème (je chausse actuellement du 49).
Le mieux est quand même que vous soyez sous Linux et que vous tapiez la commande suivante depuis le répertoire source du kernel :code: grep –Eir "mot" *
où « mot » doit être remplacé par un mot anglais disons vulgaire, comme f**k, sh*t ou encore pu**y. Pour ceux qui savent, vous trouverez surement le résultat éloquent. Pour ceux qui ont un bon niveau d’anglais mais n’ont pas Linux sous la main (ou le coude), rendez-vous (vous êtes cernés) à <a href="http://truehacker.blogspot.com/2006/11/hilarious-code-in-linux-kernel.html">cette adresse</a>.
Il eut été scandaleux que ces gens-là eussent été payés.
PS : cette dernière phrase dégouline de mauvaise foi.
|
Pour les flemmards, voici la source :
Citation: Hilarious code in Linux Kernel 2.6!!
Whoever thought kernel hackers are just nerds who do not have fun was completely wrong. I have evidence from the kernel code! Kernel hackers have a lot of humour, probably the most humuorous bunch of people! Here are some extremely hilariously lines of code from the kernel!!!! If you want to extract all the code yourself, run the following command inside your kernel source folder:
grep -Eir "( hilarious word of your choice, eg f**k, sh*t, pu**y)" *
On my Ubuntu Edgy Eft, with the following as my base folder, I extracted these lines of code.
/usr/src/linux-source-2.6.17/
<blockquote><code><big><big><br />drivers/media/video/spca5xx/spca5xx-main.c<br />---------------------------------------------------<br /><br />/*<br />* Function compares two strings.<br />* Return offset in <span style="font-style: italic; font-weight: bold;"> ussy</span> where prick ends if "prick" may <span style="font-style: italic; font-weight: bold;"> enetrate</span><br />* int "<span style="font-weight: bold;"> ussy</span>" like prick into <span style="font-weight: bold;"> ussy</span>, -1 otherwise.<br />*/<br />static inline int<br />match (const char *prick, const char *<span style="font-weight: bold;"> ussy</span>, int len2)<br />{<br />int len1 = strlen (prick); //<span style="font-weight: bold; font-style: italic;">length of male string</span><br />int i; //just an index variable<br />const char *tmp; //<span style="font-weight: bold; font-style: italic;">temporary pointer for my own pleasure</span><br /><br />// We skip all spaces and tabs<br /><br /></code><code></code><code>for (i = 0; i < tmp =" <font style="font-weight: bold; font-style: italic;"> ussy</font></span> + i; // <span style="font-weight: bold; font-style: italic;"> ointer to pussy with skipped shit (spaces and tabs) </span><br /><br />len2 = strlen (tmp); //calculate length again <br /><br />if (len1 > len2)<br />return -1; //<span style="font-weight: bold; font-style: italic;">Fuck off, no fucking</span><br /><br />if (!strncmp (prick, tmp, len1))<br />return i + len1;<br /><br />return -1;<br />}<br /><br /><br /><br />drivers/net/3c59x.c<br />-------------------------------------------------<br /><br />/* Acknowledge the IRQ. */<br /> iowrite16(AckIntr | IntReq | IntLatch, ioaddr + EL3_CMD);<br /> if (vp->cb_fn_base) /* <span style="font-weight: bold;">The PCMCIA people are idiots.</span> */<br /> iowrite32(0x8000, vp->cb_fn_base + 4);<br /><br />} while ((status = ioread16(ioaddr + EL3_STATUS)) & IntLatch);<br /><br /><br /><br />net/ipv4/ip_gre.c<br />----------------------------------------------------------<br /><br />static void ipgre_err(struct sk_buff *skb, u32 info)<br />{<br />#ifndef I_WISH_WORLD_WERE_PERFECT<br /><br />/* It is not :-( All the routers (except for Linux) return only<br />8 bytes of packet payload. It means, that precise relaying of<br />ICMP in the real Internet is absolutely infeasible.<br /><br />Moreover, Cisco "wise men" put GRE key to the third word<br />in GRE header. It makes impossible maintaining even soft state for keyed<br />GRE tunnels with enabled checksum. Tell them "thank you".<br /><br /><span style="font-weight: bold;">Well, I wonder, rfc1812 was written by Cisco employee,</span><br /><span style="font-weight: bold;">what the hell these idiots break standrads established</span><br /><span style="font-weight: bold;">by themself???</span><br />*/<br /><br /><br /><br />arch/mips/pci/pci-ip27.c<br />--------------------------------------------------------------------<br /><span style="font-weight: bold;">/*</span><br /><span style="font-weight: bold;">* IOC3 is fucked fucked beyond believe ... Don't try to access</span><br /><span style="font-weight: bold;">* anything but 32-bit words ...</span><br /><span style="font-weight: bold;">*/</span><br />addr = &bridge->b_type0_cfg_dev[slot].f[fn].l[where >> 2];<br /><br /><br /><br />arch/mips/kernel/sysirix.c<br />----------------------------------------------------------------------------<br /><br /><span style="font-weight: bold;">/* 2,191 lines of complete and utter shit coming up... */</span><br /><br />extern int max_threads;<br /><br />/* The sysmp commands supported thus far. */<br />#define MP_NPROCS 1 /* # processor in complex */<br />#define MP_NAPROCS 2 /* # active processors in complex */<br />#define MP_PGSIZE 14 /* Return syste<br /><br /><br />arch/sparc64/mm/ultra.S<br />----------------------------------------------------------------------------<br />/* Basically, most of the Spitfire vs. Cheetah madness<br />* has to do with the fact that Cheetah does not support<br />* IMMU flushes out of the secondary context. Someone needs<br />* to throw a south lake birthday party for the folks<br />* in Microelectronics who refused to fix this shit.<br />*/<br /><br />/* This file is meant to be read efficiently by the CPU, not humans.<br />* Staraj sie tego nikomu nie pierdolnac...<br />*/<br />.text<br />.align 32<br />.globl __flush_tlb_mm<br />__flush_tlb_mm: /* 18 insns */<br />/* %o0=(ctx & TAG_CONTEXT_BITS), %o1=SECONDARY_CONTEXT */<br />ldxa [%o1] ASI_DMMU, %g2<br />cmp %g2, %o0<br />bne,pn %icc, __spitfire_flush_tlb_mm_slow<br />mov 0x50, %g3<br />stxa %g0, [%g3] ASI_DMMU_DEMAP<br />stxa %g0, [%g3] ASI_IMMU_DEMAP<br />sethi %hi(KERNBASE), %g3<br />flush %g3<br />retl<br /></big></big></code><br /></blockquote> |
Signaler ce message à un modérateur | IP: Logguée Temps en ligne : 92 Jours, 19 Heures, 48 Minutes, 3 Secondes en ligne
|