RegistrierenSidebar verstecken
Nickname: 
Passwort: 
Sitzung auf IP beschränken 

my js ROUND3

Globaler Rang: 204
Gesamtpunkte: 101882
Nachrichten: 65
Dank: 66
+Votes: 43
Registriert : 15y 99d
xen`s Benutzerbild






Der Benutzer ist Offline
my js ROUND3
Google/Übersetzer4Danke Schön!2Gute Nachricht!1Schlechte Nachricht! 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!
Globaler Rang: 204
Gesamtpunkte: 101882
Nachrichten: 65
Dank: 66
+Votes: 43
Registriert : 15y 99d
xen`s Benutzerbild






Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!2Gute Nachricht!1Schlechte Nachricht! Link
my first try, 324

GeSHi`ed javascript Quelltext
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!
Globaler Rang: 253
Gesamtpunkte: 87266
Nachrichten: 1639
Dank: 1338
+Votes: 886
Registriert : 16y 72d




Zuletzt gesehen am: 3h 8m
Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!1Gute Nachricht!1Schlechte Nachricht! Link
My first try
GeSHi`ed javascript Quelltext für 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.
Globaler Rang: 253
Gesamtpunkte: 87266
Nachrichten: 1639
Dank: 1338
+Votes: 886
Registriert : 16y 72d




Zuletzt gesehen am: 3h 8m
Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!0Gute Nachricht!2Schlechte Nachricht! Link
And here is another "reference" with another length:

GeSHi`ed javascript Quelltext für 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.
Zuletzt geändert von gizmore - 1. Jul 2011 03:32:31
Globaler Rang: 204
Gesamtpunkte: 101882
Nachrichten: 65
Dank: 66
+Votes: 43
Registriert : 15y 99d
xen`s Benutzerbild






Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!1Gute Nachricht!1Schlechte Nachricht! 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!
Globaler Rang: 35
Gesamtpunkte: 291082
Nachrichten: 164
Dank: 157
+Votes: 172
Registriert : 16y 55d
livinskull`s Benutzerbild





Zuletzt gesehen am: 20h 11m
Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!1Gute Nachricht!1Schlechte Nachricht! Link
319 =)

nice calculations xen =)
GeSHi`ed javascript Quelltext
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 Quelltext
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))
Zuletzt geändert von livinskull - 2. Jul 2011 16:11:38
Globaler Rang: 37
Gesamtpunkte: 287900
Nachrichten: 9
Dank: 13
+Votes: 12
Registriert : 12y 328d




Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!0Gute Nachricht!2Schlechte Nachricht! Link
Hello. Nice game!
I got 175 chars with a run-of-the-mill Vigenere cipher.
GeSHi`ed javascript Quelltext
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?
Globaler Rang: 204
Gesamtpunkte: 101882
Nachrichten: 65
Dank: 66
+Votes: 43
Registriert : 15y 99d
xen`s Benutzerbild






Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!0Gute Nachricht!2Schlechte Nachricht! 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!
Globaler Rang: 204
Gesamtpunkte: 101882
Nachrichten: 65
Dank: 66
+Votes: 43
Registriert : 15y 99d
xen`s Benutzerbild






Der Benutzer ist Offline
RE: my js ROUND3
Google/Übersetzer2Danke Schön!2Gute Nachricht!0Schlechte Nachricht! 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 haben dieses Thema abonniert und erhalten EMails bei einer neuen Nachricht.
1 Personen sehen sich diese Thema gerade an.
Dieses Thema wurde 6359 mal angesehen.