Pollyanna
-
- Posts: 61
- Joined: Wed Apr 30, 2008 3:31 am
ruby and whitespace.
fortunately whitespace was available in the ubuntu repository.
this was a 3 minute challange!
took me 1 second to recognize ruby, saw the many whitespaces a few seconds later and realized it could be whitespace aswell. because of lazyness i ran the ruby one first. polyglot. clearly, time for `wspace pollyanna.txt`
fortunately whitespace was available in the ubuntu repository.
this was a 3 minute challange!
took me 1 second to recognize ruby, saw the many whitespaces a few seconds later and realized it could be whitespace aswell. because of lazyness i ran the ruby one first. polyglot. clearly, time for `wspace pollyanna.txt`
Yea this was fun, didn't know about polyglot's until now
I recognized the ruby, had to google polyglot, and found a website showing a 6 language polygot! It also used whitespace, so since there was not other obvious text in the program i tried that and it worked!
Had the hardest time for a while tho, I was working on "Execution Style" at the same time and tried to submit my answer to that problem for Pollyanna... and then thought Pollyanna was a further clue to the end result of the "Execution Style" answer, which led me on a wild goose chase through websites looking for a possible answer until i realized my mistake ><
I recognized the ruby, had to google polyglot, and found a website showing a 6 language polygot! It also used whitespace, so since there was not other obvious text in the program i tried that and it worked!
Had the hardest time for a while tho, I was working on "Execution Style" at the same time and tried to submit my answer to that problem for Pollyanna... and then thought Pollyanna was a further clue to the end result of the "Execution Style" answer, which led me on a wild goose chase through websites looking for a possible answer until i realized my mistake ><
Having recognized ruby I searched for languages with similar syntax. I thought that the computation is slightly different in that language (maybe the **-operator), so that it changes the output. I even tried different implementations of ruby (thinking about possible overflows). Of course, I had no luck until I finally found the whitespaces at the end.
-
- Forum Admin
- Posts: 496
- Joined: Sat May 28, 2011 9:14 am
- Location: Germany
- dangermouse
- Posts: 89
- Joined: Sun Jun 05, 2011 8:14 pm
- Location: deep space computing AG
- Contact:
did not recognize Ruby so i wrote a Python one, thinking it was some Octave/Mathematica/Maple thing:
i saw the whitespaces and thought it was encoded with www.spammimic.com, i then tried the decode sentence as it would be malbolge...
then i tried a whitespace online tool which did not work. only the Ubuntu package worked, and it is compiled for AMD64, wow Linux is really getting cute!
Code: Select all
#!/bin/python
import math
a=[[[3,1],[5,1],[821,1],[273997,1],[7741805910970258163,1]],[[2,2],[107,1],[244219007447,1],[95966808334871,1]],[[2,2],[7,3],[919,1],[56951,1],[103160249,1],[4656410419,1]],[[2,3],[17,1],[177693403,1],[414883089729841223,1]],[[3,1],[31,1],[4951,1],[1346989159,1],[50461897989311,1]],[[7,2],[79,1],[241,1],[4271,1],[48523,1],[1051181,1],[176838479,1]],[[2,1],[1475709031,1],[12177009148932085937,1]],[[6323573,1],[4753519027288416018457,1]],[[2,1],[18164960872674393974925145111,1]]]
for i in range(0,len(a)):
n=1
for j in range(0,len(a[i])):
n*=a[i][j][0]**a[i][j][1]
s=''
for k in range(0, int(round((math.log(n,2))/(math.log(256,2))))):
s=chr(n%256)+s
n=n/256
print s
then i tried a whitespace online tool which did not work. only the Ubuntu package worked, and it is compiled for AMD64, wow Linux is really getting cute!