|
Avenging Dentist posted:Um yeah, I'm an American, we have a habit of fighting the UK. I don't think you understand the gravity of the situation.
|
# ? Jul 9, 2009 21:04 |
|
|
# ? May 17, 2024 00:32 |
|
tripwire posted:I was looking through some of those "fail"s and couldn't figure out how one of them was getting this text it operates on: That's interesting. Is it reading its own prompt?
|
# ? Jul 9, 2009 21:50 |
|
I thought win # 20 was kinda cute and clever, but I also think I'd kill myself if my coworkers behaved like this day in, day out.code:
|
# ? Jul 9, 2009 21:58 |
|
Zombywuf posted:I don't think you understand the gravity of the situation. code:
Blotto Skorzany fucked around with this message at 23:47 on Jul 9, 2009 |
# ? Jul 9, 2009 23:16 |
|
Otto Skorzeny posted:Oh, I think I do.
|
# ? Jul 10, 2009 00:06 |
|
Otto Skorzeny posted:Oh, I think I do. WHAT THE MOTHER gently caress HOW DOES THAT WORK?
|
# ? Jul 10, 2009 01:15 |
|
I think they should have picked a different phrase than "Hello world", because almost everyone has made obscure code to write it out. Look at some of those pieces of art - I would bet that very few of them were written in response to the ad.
|
# ? Jul 10, 2009 01:18 |
|
This is the only good Perl program:code:
|
# ? Jul 10, 2009 01:37 |
|
ymgve posted:I think they should have picked a different phrase than "Hello world", because almost everyone has made obscure code to write it out. Look at some of those pieces of art - I would bet that very few of them were written in response to the ad. Exactly. I didn't bother sending them anything but if I did, it would have been this that I did for EC in a class once: code:
|
# ? Jul 10, 2009 03:01 |
|
tef posted:hello world in prolog code like this gives me great pleasure. reminds me of the ever popular pastime of writing unnecessary forth interpreters
|
# ? Jul 10, 2009 04:40 |
|
sensual donkey punching posted:code like this gives me great pleasure. reminds me of the ever popular pastime of writing unnecessary forth interpreters
|
# ? Jul 10, 2009 04:41 |
|
I might have accidentally a Hello Worldphp:<?php // ninja coders don't need any stinkin' image libaries print("Please wait, calculating...<br>"); function gen_bg() { $img=array_fill(0,20000,0); for($i=0;$i<20000;$i++) $img[$i]=rand(0,3); return $img; } function place_text($b,$w,$xoff,$yoff){ $img = gen_bg(); for ($x=0;$x<$w;$x++) for($y=0;$y<40;$y++) if($b[$x/8]>>($y/8)&1) $img[($y+$yoff)*200+$x+$xoff]=7; return $img; } function encode($img){ $d=""; foreach($img as $p) $d.=chr($p*16+8); return $d."\t"; } function build_gif($frames){ $res = "GIF89a\xc8\0\x64\0\xa2\0\0"; for ($i=0;$i<8;$i++){ $c=chr(0+$i*36); $res.=$c.$c.$c; } $res.="\x21\xff\x0bNETSCAPE2.0\x03\x01\x0\x0\x0"; foreach($frames as $frame){ $res.="\x21\xf9\x04\x04\x0a\0\0\0\x2c\0\0\0\0\xc8\0\x64\0\0\x03"; foreach(str_split($frame,255) as $c) $res.=chr(strlen($c)).$c; $res.="\0"; } return $res."\x3B"; } $frames = array(); for ($i=0;$i<15;$i++) $frames[]=encode(place_text(array(31,4,31,0,31,21,17,0,31,16,16,0,31,16,16,0,31,17,31),152,rand(19,29),rand(25,35))); for ($i=0;$i<5;$i++) $frames[]=encode(gen_bg()); for ($i=0;$i<15;$i++) $frames[]=encode(place_text(array(15,16,15,16,15,0,31,17,31,0,31,5,26,0,31,16,16,0,31,17,14),168,rand(11,21),rand(25,35))); for ($i=0;$i<5;$i++) $frames[]=encode(gen_bg()); echo '<img src="data:image/gif;base64,'.base64_encode(build_gif($frames)).'">' ?>
|
# ? Jul 10, 2009 04:51 |
|
dancavallaro posted:Exactly. I didn't bother sending them anything but if I did, it would have been this that I did for EC in a class once: And you would have failed for using a while loop!
|
# ? Jul 10, 2009 13:55 |
|
Otto Skorzeny posted:Oh, I think I do.
|
# ? Jul 10, 2009 14:41 |
|
tripwire posted:Did you write this yourself or just copy+paste it from somewhere? I'm curious how it was made... I only understand perl a tiny bit, but it seems like it would have had to be generated by another program. How/why does the program work, and how would you go about writing a program to generate it? There's a cpan module for everything, and several for most things; the one I used was Acme::EyeDrops e: Did you really think there was a place on the internet where I could have copy+pasted an obfuscated/beautified perl program that outputs 'eat poo poo limeys' in block letters? Blotto Skorzany fucked around with this message at 14:56 on Jul 10, 2009 |
# ? Jul 10, 2009 14:52 |
|
Otto Skorzeny posted:There's a cpan module for everything, and several for most things; the one I used was Acme::EyeDrops
|
# ? Jul 10, 2009 15:06 |
|
tripwire posted:I didn't run the program I assumed it was "hello world" I think it's about time one phrase replaced the other
|
# ? Jul 10, 2009 15:16 |
|
Anyways the way the thing works is by making a regex that matches the code you want to execute then eval'ing it; since perl regexes can execute perl code there are ways to do this without calling 'eval' but whatever
|
# ? Jul 10, 2009 15:27 |
I've always thought this one was real prettycode:
|
|
# ? Jul 11, 2009 22:11 |
|
huge sesh posted:I've always thought this one was real pretty
|
# ? Jul 11, 2009 23:23 |
|
Nothing like reading some code, and then suddenly being transformed to lovely bar musiccode:
|
# ? Jul 15, 2009 03:34 |
|
code:
|
# ? Jul 15, 2009 19:41 |
|
P.S. I'll find my third pass Who took my third pass Who found my third pass
|
# ? Jul 15, 2009 19:43 |
|
Wait. What's wrong with recursion.
|
# ? Jul 15, 2009 19:43 |
|
Sartak posted:Wait. What's wrong with recursion. The programmer could've accomplished the same thing without any conditional branching or recursion, but he went out of his way to make it a confusing mess.
|
# ? Jul 15, 2009 19:46 |
|
Sartak posted:Wait. What's wrong with recursion. Nothing. Recursion should be used when recursion is needed. It's obviously not needed in that case.
|
# ? Jul 15, 2009 19:57 |
|
From my very own keyboard with my very own brain. It took me at least a minute to re-understand what I was doing. I caught it in a few hours when I was looking over everything, but I had written this quickly to fix a error if there is no element with id "anywhere".code:
|
# ? Jul 16, 2009 00:10 |
|
sonic bed head posted:From my very own keyboard with my very own brain. It took me at least a minute to re-understand what I was doing. I caught it in a few hours when I was looking over everything, but I had written this quickly to fix a error if there is no element with id "anywhere". I actually kinda like this. It's better than $("anywhere") && $("anywhere").checked because you're not resolving it twice (unless $() does some caching; it's been a while since I've used any of those JS libraries), and it saves valuable keystrokes in declaring a temp variable. It was obvious to me right away what the intent was, but yeah, I can see it being somewhat cryptic to someone, and probably best avoided in general.
|
# ? Jul 16, 2009 00:59 |
|
Flobbster posted:I actually kinda like this. It's better than $("anywhere") && $("anywhere").checked because you're not resolving it twice (unless $() does some caching; it's been a while since I've used any of those JS libraries), and it saves valuable keystrokes in declaring a temp variable. I only fear for other people who look at it. I would like if this became a common javascript idiom, but currently I think that it would take most people way longer than it should to understand what's going on. Sadly neither Prototype nor jQuery cache anything so it is faster without using temp variables.
|
# ? Jul 16, 2009 13:49 |
|
sonic bed head posted:Sadly neither Prototype nor jQuery cache anything so it is faster without using temp variables. Caching is loving hard because IDs can change — and elements can be added to and removed from the page. Caching would require listening for DOM mutation events in order to know when to invalidate the cache, but only Firefox supports said events, and when you listen for them it throws Firefox into a crazy-rear end mode that slows everything down, thereby defeating the original purpose. Web development is an infinite gauntlet of cosmic jokes.
|
# ? Jul 18, 2009 18:12 |
|
Janin posted:
nigga needs to learn himself some elseif
|
# ? Jul 21, 2009 06:10 |
|
nbv4 posted:nigga needs to learn himself some elseif that's not the problem here
|
# ? Jul 21, 2009 06:21 |
|
Janin posted:that's not the problem here it's recursive in how lovely it is, that's loving amazing
|
# ? Jul 21, 2009 06:32 |
|
Ryouga Inverse posted:it's recursive in how lovely it is, that's loving amazing Haha, I didn't even notice the lack of else if. I just saw the unrolled for-case loop.
|
# ? Jul 21, 2009 06:45 |
|
Mill Town posted:Haha, I didn't even notice the lack of else if. I just saw the unrolled for-case loop. It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2). Note: I am in no way defending this lovely method.
|
# ? Jul 21, 2009 06:55 |
|
Goat Bastard posted:It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2). right, that happens in for-case too, the difference is that here the for loop is accomplished by recursion
|
# ? Jul 21, 2009 07:07 |
|
Goat Bastard posted:It's not quite a for-case though, is it? If refresh(1) is called then the pass == 2 stuff gets skipped, and similar for refresh(2). Well, it's the same assuming each case: ends in a break. Is that normal in the for-case paradigm or not? I don't remember. :P
|
# ? Jul 21, 2009 07:09 |
|
Ryouga Inverse posted:right, that happens in for-case too, the difference is that here the for loop is accomplished by recursion Yup, but only if it is initially called as refresh(0), right? So if the calling method was something like code:
I do understand why everything about that method is wrong though.
|
# ? Jul 21, 2009 07:20 |
|
Goat Bastard posted:Yup, but only if it is initially called as refresh(0), right? To my knowledge, it's only called from one other procedure, as refresh(0).
|
# ? Jul 21, 2009 15:25 |
|
|
# ? May 17, 2024 00:32 |
|
My favorite part is the extra call to refresh(3) which does literally nothing.
|
# ? Jul 21, 2009 15:59 |