Username: 
Password: 
Restrict session to IP 

my js ROUND3

Global Rank: 202
Totalscore: 101922
Posts: 65
Thanks: 67
UpVotes: 44
Registered: 15y 316d
xen`s Avatar






The User is Offline
my js ROUND3
Google/translate4Thank You!2Good Post!1Bad Post! link
The goal of this round is to make a script that outputs:
'the quick brown fox jumps over the lazy dog'

rule1: you may only use 3 or less words from the sentence in your code(this includes encoding the words in any form e.g. base64, hex, etc etc)
rule2: standalone script, no external source/s

Good luck and Happy coding ;)
chmod ---x--x--x,, i'm illiterate!
Global Rank: 202
Totalscore: 101922
Posts: 65
Thanks: 67
UpVotes: 44
Registered: 15y 316d
xen`s Avatar






The User is Offline
RE: my js ROUND3
Google/translate2Thank You!2Good Post!1Bad Post! link
my first try, 324

GeSHi`ed javascript code
1
x='';s=x+((((((2577*450)+8)*9*369)+1)*2)*11)+(((((4027*90)+1)*23)*74)*93)+((((226*1450)+7)*307)*823)+'0'+(((((20*1280)*1724)+6)*181)-1)+((((32*1031)*1340)*1760)-2)+((((((9007*40)-5)*1162)+3)*160)-8)+(((92830*1118)-9)*668)+((581114*1605)+1);for(i=0;i<=85;i++){x=x+String.fromCharCode(s.substr(i,2)).toLowerCase();i++}alert(x)
chmod ---x--x--x,, i'm illiterate!
Global Rank: 227
Totalscore: 94363
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 290d




Last Seen: 5d 23h
The User is Offline
RE: my js ROUND3
Google/translate2Thank You!1Good Post!1Bad Post! link
My first try
GeSHi`ed javascript code for 177
1
2
3
 
$x="\x74\x68\x65\x20\x71\x75\x69\x63\x6b\x20\x62\x72\x6f\x77\x6e\x20\x66\x6f\x78\x20\x6a\x75\x6d\x70\x73\x20\x6f\x76\x65\x72\x20\x74\x68\x65\x20\x6c\x61\x7a\x79\x20\x64\x6f\x67";
 


Just as a reference, 4 bytes per char + 5.

Happy Challenging!

PS: Is there a site for javascript codegolf yet?
The geeks shall inherit the properties and methods of object earth.
Global Rank: 227
Totalscore: 94363
Posts: 1680
Thanks: 1358
UpVotes: 920
Registered: 16y 290d




Last Seen: 5d 23h
The User is Offline
RE: my js ROUND3
Google/translate2Thank You!0Good Post!2Bad Post! link
And here is another "reference" with another length:

GeSHi`ed javascript code for 185
1
2
3
 
$x=String.fromCharCode(116,104,101,32,113,117,105,99,107,32,98,114,111,119,110,32,102,111,120,32,106,117,109,112,115,32,111,118,101,114,32,116,104,101,32,108,97,122,121,32,100,111,103);
 


You probably might want to apply some rules to this one Smile

Edit: Your javascript is priceless. But you cannot beat 185 chars with that math magic, can you? ;)

Edit2: How about this rule you need to have an array $x= new Array(116,104,101,32,...) in the final state, and you are not allowed to use functions Smile
The geeks shall inherit the properties and methods of object earth.
Last edited by gizmore - Jul 01, 2011 - 03:32:31
Global Rank: 202
Totalscore: 101922
Posts: 65
Thanks: 67
UpVotes: 44
Registered: 15y 316d
xen`s Avatar






The User is Offline
RE: my js ROUND3
Google/translate2Thank You!1Good Post!1Bad Post! link
sorry, rule1 says no more than 3 words in any encoded form which includes unicode and hex.

also base64/decimal/octal/binary/ascii etc etc ;)
there is no code golf sites for javascript yet that i know of, i've been searching for awhile
my math magic is going to get even more magic once i spend a bit more time on it to shorten them hehe.

Happy Coding.
chmod ---x--x--x,, i'm illiterate!
Global Rank: 33
Totalscore: 309768
Posts: 182
Thanks: 182
UpVotes: 205
Registered: 16y 273d
livinskull`s Avatar





Last Seen: 1d 20h
The User is Offline
RE: my js ROUND3
Google/translate2Thank You!1Good Post!1Bad Post! link
319 =)

nice calculations xen =)
GeSHi`ed javascript code
1
d=['the','over','quick'];e=[[[-14,7,19],[-16,7,2]],[[-3,-21,21,7]],[[-15,-3,6,20,3],[-7,0,4,13,8]]];function t(r,s){q='';for(p in d[r])q+=String.fromCharCode(d[r].charCodeAt(p)+e[r][s][p]);return q;};function z(x){document.write(x+' ')};z(d[0]);z(d[2]);z(t(2,0));z(t(0,0));z(t(2,1));z(d[1]);z(d[0]);z(t(1,0));z(t(0,1));


EDIT: 275 =)
GeSHi`ed javascript code
1
d=['the','over','quick'];k=' ';e=[[[-14,7,19],[-16,7,2]],[[-3,-21,21,7]],[[-15,-3,6,20,3],[-7,0,4,13,8]]];function t(r,s){q='';for(p in d[r])q+=String.fromCharCode(d[r].charCodeAt(p)+e[r][s][p]);return q+k}alert(d[0]+k+d[2]+k+t(2,0)+t(0,0)+t(2,1)+d[1]+k+d[0]+k+t(1,0)+t(0,1))
Last edited by livinskull - Jul 02, 2011 - 16:11:38
Global Rank: 42
Totalscore: 287796
Posts: 9
Thanks: 13
UpVotes: 12
Registered: 13y 181d




The User is Offline
RE: my js ROUND3
Google/translate2Thank You!0Good Post!2Bad Post! link
Hello. Nice game!
I got 175 chars with a run-of-the-mill Vigenere cipher.
GeSHi`ed javascript code
1
2
3
 
a='the quick brown ';b=' yvb zourc pmsn gms ijtk sgu';for(i=j=0;++i<28;j+=a[j]<'a')a+=(b[i]>' '?String.fromCharCode(((b[C='charCodeAt'](i)-a[C](j++)+26)%26)+97):' ');alert(a);
 

However, as Gizmore said, the first rule should be explained better. What does 'encoding the words in any form' mean?
We need to represent the information in some way, so in the broadest sense, the task is impossible.
Is simple Cesar shift allowed? Would any method producing the result from another string be allowed?
Global Rank: 202
Totalscore: 101922
Posts: 65
Thanks: 67
UpVotes: 44
Registered: 15y 316d
xen`s Avatar






The User is Offline
RE: my js ROUND3
Google/translate2Thank You!0Good Post!2Bad Post! link
the challenges output cannot be stored letter for letter in your code(43 in total)
instead you must make them, see my first code as example.
chmod ---x--x--x,, i'm illiterate!
Global Rank: 202
Totalscore: 101922
Posts: 65
Thanks: 67
UpVotes: 44
Registered: 15y 316d
xen`s Avatar






The User is Offline
RE: my js ROUND3
Google/translate2Thank You!2Good Post!0Bad Post! link
there is indeed now javascript codegolf.- google: golf.js
its a challenge site so maybe they should be made aware of wechall?
chmod ---x--x--x,, i'm illiterate!
tunelko, quangntenemy, TheHiveMind, Z, balicocat, Ge0, samuraiblanco, arraez, jcquinterov, hophuocthinh, alfamen2, burhanudinn123, Ben_Dover, stephanduran89, braddie0, SwolloW, dangarbri, csuquvq have subscribed to this thread and receive emails on new posts.
1 people are watching the thread at the moment.
This thread has been viewed 6609 times.