I thought it was an error message in Klingon:
You have moved the mouse. Windows will now shut down. |
Ah, I have so few words of wisdom that it's nice to have them noticed :)
|
Jiml8 good point on the don't subtract from space. Made a few more compact versions just for you :)
Code:
#!/usr/bin/perl Code:
#!/usr/bin/perl Code:
#!/usr/bin/perl Code:
#!/usr/bin/perl |
Well, alright. I can compress mine too. Readability doesn't suffer too much. I do have to declare variables though; compiler won't do it for me on the fly.
Code:
#include <stdio.h> |
lol, now we just need an erlanger to one-liner it for us :)
|
Wow. You posted fast. I updated my code after you posted, without being aware you HAD posted. Shortened it a bit more.
|
hehe, I'd bet the C is faster. All of this reminded me of a great programming challenge site, its solving math problems (some of them are even crypto), the basic idea is to write a program in any language that'll solve the problem with a bonus challenge of making it run in under a minute.
http://projecteuler.net/ |
Using bash and tr
Code:
text='Doogsauumauipnt >)! Zov qatsfd!ovr!ieipt!fjlues >) Wiau brf zovr!tirfe!fbvprjtf uedhoidam copkt? Pmebsf jndlvdf bt!lfatt!ooe!spfuwbrf fnhioefrjnh copk- uhf ptiess!cbn!bf xhbtfvfr- j.f.- qhzsjct,!mbti,!euc/' |
Got the regex one fixed now, shorter and handles that pesky last character.
Code:
#!/usr/bin/perl |
Wow Kenhelm, very nice, I wouldn't have given bash enough credit to be able to do it.
|
Quote:
I have a couple ideas to try out.. This kind of stuff keeps the brain fresh & juicy :p I think it'd be cool to see this in Lisp too, if that can be done. Any takers? Sasha |
And, in PHP:
Code:
#!/usr/bin/php edit: Here is the regexp version in PHP. Code:
#!/usr/bin/php |
bash + awk solution
Ok! While I'm semi-impressed with what I have come up with (because it's the first time I've ever used awk for anything), it has a bug.
Here's the code: Code:
#!/bin/bash Code:
bash-3.1$ sh decode |
Anyone want to do it in Fortran? I might try; I used to program a LOT of Fortran, but the last time I did was in about 1990 and I have never programmed for the gnu fortran compiler. Might be awhile before it is running.
We also need someone to step up and do it in python. And there was a request for lisp. While we're at it, is Modula still in use? Pascal? Forth? |
Here is a python one (far from optimal)
Code:
#!/usr/bin/python |
All times are GMT -5. The time now is 01:16 AM. |