Pollyanna

Discussion of challenges you have already solved
Post Reply
lukas
Posts: 34
Joined: Wed Nov 26, 2008 1:53 pm
Location: Germany

Pollyanna

Post by lukas »

Nice challenge!
the_impaler
Posts: 61
Joined: Wed Apr 30, 2008 3:31 am

Post by the_impaler »

polyglot program is usually written in more than one language.
What would be the name of the second language here ? Or better put it , how would we call it ?
I think one of didactic texts is using it too. And lotsa-dotsa.
"bit chat" ? "hacker choker" ?
User avatar
m!nus
Posts: 202
Joined: Sat Jul 28, 2007 6:49 pm
Location: Germany

Post by m!nus »

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`
MerickOWA
Posts: 182
Joined: Mon Apr 07, 2008 5:54 pm
Location: HkRkoz al KuwaiT 2019 HaCkEr 101

Post by MerickOWA »

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 ><
tog
Posts: 70
Joined: Fri Nov 14, 2008 11:23 am
Location: Germany

Post by tog »

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). :roll: Of course, I had no luck until I finally found the whitespaces at the end.
megabreit
Posts: 141
Joined: Sat Jan 03, 2009 3:33 pm

Post by megabreit »

I was missing "whitespace" all along the challenges... but I did not expect it in this challenge :shock:
Anyway, funny challenge; even if it took me months to solve it :lol:
moose
Posts: 67
Joined: Fri Jul 16, 2010 7:32 pm

Post by moose »

This is so crazy! Thanks for this challenge! I've just created a polyglot with three languages:
my blog
AMindForeverVoyaging
Forum Admin
Posts: 496
Joined: Sat May 28, 2011 9:14 am
Location: Germany

Post by AMindForeverVoyaging »

Nice challenge. Polyglots are quite cool. :)
User avatar
dangermouse
Posts: 89
Joined: Sun Jun 05, 2011 8:14 pm
Location: deep space computing AG
Contact:

Post by dangermouse »

did not recognize Ruby :-( so i wrote a Python one, thinking it was some Octave/Mathematica/Maple thing:

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	
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!
User avatar
Hippo
Posts: 339
Joined: Sat Feb 01, 2014 12:05 am
Location: Praha 5

Post by Hippo »

It took me several tries to write two r's in the answer :(.
Post Reply