GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
HAI
CAN HAS STDIO?
I HAS A MESS ITZ "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/"
I HAS A NUM ITZ 0
I HAS A TMP
IM IN YR DECODE TIL NUM IZ 206
LOL TMP R NUM IN MAH MESS
BOTH SAEM TMP AN " ", O RLY?
NO WAI
NERFZ TMP!!
OIC
LOL NUM IN MAH MESS R TMP
UPZ NUM!!2
IM OUTTA YR DECODE
VISIBLE MESS
KTHXBYE
Did somebody give evil that encrypted line at a job interview? That's messed up. Or maybe it was in the Craigslist want ads?
Once I wrote a program that would solve the zodiac cryptogram by substituting the symbols with every possible combination of letters (which was pretty dumb because if it was just substitution there would have been double symbols for "l" and somebody would have solved it already). And when I was almost done I realized that since the number of permutations was N! that the universe would collapse before my program ever tried them all. And that was before it even took the time to scan for keywords.
Next time I try something like that I'm going to research it first instead of wasting an entire weekend.
Credit** goes to both "David The H." and "HKo" for helping me improve this silly thing, producing a much simplified version, and without a bunch of convoluted crap that was actually doing nothing!
IMHO, the second example you provided reaffirms (to me anyway) that Lisp appears to really be well suited to such a task: there's almost NO CODE involved there! Cool
I felt a filter-like program in the unix tradition for this was desperately needed. So a program that reads the garbled text from stdin and outputs the de-garbled text to its stdout.
This way, we won't need to change the source/script and no need to recompile when the next job application of this kind turns up on the net. And, arguably more importantly, the ugly garbled text doesn't clutter the source/script. Everything for more readable code!
So, here's my C implementation of a program that reads the garbled text from its stdin:
I felt a filter-like program in the unix tradition for this was desperately needed...
I like it!!
[Edit] You should also get double-points for "impenetrable C coding" ! [/Edit]
I don't wish to appear "picky" but something is not quite right:
Code:
tred@vaio:~$ ./wiau <garbled.txt
Congratulations =) You passed our idiot filter =)What are your three favorite technical books?
Please include at least one software engineering book,ugfpsidsr can be whatever, i.e., physics, math, etc.
tred@vaio:~$
tred@vaio:~$
(Extra linebreak added by me, so it fits better into the CODE window)
estabroo's LOLCODE made me laugh till I cried. Thanks for that!
I like it!!
[Edit] You should also get double-points for "impenetrable C coding" ! [/Edit]
Thank you!
Quote:
Originally Posted by tredegar
I don't wish to appear "picky" but something is not quite right:
Code:
tred@vaio:~$ ./wiau <garbled.txt
Congratulations =) You passed our idiot filter =)What are your three favorite technical books?
Please include at least one software engineering book,ugfpsidsr can be whatever, i.e., physics, math, etc.
tred@vaio:~$
tred@vaio:~$
Ouch!
That has nothing to do with being picky: that's a bug!
I did not notice it myself.
What I did see was that at a few places (e.g. after the question mark) there appear unprintable chars (0x1f after the quesion mark). But I'd argue that that's bug in the specification of the cipher
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.