Username: 
Password: 
Restrict session to IP 

my js ROUND3

Global Rank: 204
Totalscore: 101883
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 94d
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: 204
Totalscore: 101883
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 94d
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: 253
Totalscore: 87266
Posts: 1638
Thanks: 1338
UpVotes: 886
Registered: 16y 68d




Last Seen: 1d 19h
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: 253
Totalscore: 87266
Posts: 1638
Thanks: 1338
UpVotes: 886
Registered: 16y 68d




Last Seen: 1d 19h
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: 204
Totalscore: 101883
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 94d
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: 35
Totalscore: 291084
Posts: 164
Thanks: 157
UpVotes: 172
Registered: 16y 51d
livinskull`s Avatar





Last Seen: 19h 55m
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: 37
Totalscore: 287907
Posts: 9
Thanks: 13
UpVotes: 12
Registered: 12y 324d




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: 204
Totalscore: 101883
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 94d
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: 204
Totalscore: 101883
Posts: 65
Thanks: 66
UpVotes: 43
Registered: 15y 94d
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, JanLitwin17, SwolloW, dangarbri 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 6354 times.