#203659 - 2011-11-13 06:00 PM
Kixgolf - Whitespace Obfuscation - Public Round
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
The public round has now started. Please post your codes.
Download the Updated Ini for the Public Round> http://www.kixtart.org/forums/ubbthreads.php?ubb=download&Number=252
Edited by Allen (2011-11-14 11:22 PM)
|
Top
|
|
|
|
#203661 - 2011-11-13 06:04 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Allen]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
Yay! 2nd place! I guess I can be proud of it still.
Look Ma, 4 iif()'s. What have you done, silly Boy! *Slap*
for 247:
function a($, optional $k)
dim $e,$m
$k=$k+$<' '
$m=' ',' '
$e=$<!
while $
dim $c,$n,$x
$x=asc($)
$n=128
while $n
$c=$c+iif($e,$n*(($k^$<' ')&$>),$m[$k^$x/$n])
$x=$x-$n*($x/$n)
$n=$n/2
$=iif($e|$n=0,right($,~),$)
loop
$a=$a+iif($e,chr($c),$c+iif($,@,$m[$k]))
endfunction
_________________________
|
Top
|
|
|
|
#203663 - 2011-11-13 06:13 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Allen]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#203664 - 2011-11-13 06:17 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Jochen]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
The way you are using $k has me completely vexed. Wicked code indeed.
I'm really looking forward to seeing the others now.
|
Top
|
|
|
|
#203665 - 2011-11-13 06:53 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Allen]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
KiXGolf Score = 255
function a($s, optional $k,$,$c,$e,$p,$z)
$z=1,128,64,32,16,8,4,2,1
For $c=1 To ($s^)
$p=substr($s,$c,1)
if $k
;Encode
For $=1 to 8
$a=$a+iif(asc($p) & $z[$], iif($k=" "," "," "), $k)
Next
else
;Decode
$=$c mod 8
$e=$z[$]*(right($s,1)<>$p)+$e
if $=0
$a=$a+chr($e)
$e=0
endif
endif
Next
$a=$a+$k
endfunction
Edited by Howard Bullock (2011-11-13 07:02 PM)
|
Top
|
|
|
|
#203666 - 2011-11-13 06:58 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Jochen]
|
Howard Bullock
KiX Supporter
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Jochen: Your code for 245 function a($, optional $k,$e,$m)
$k=$k+$<' '
$m=' ',' '
$e=$<!
while $
dim $c,$n,$x
$x=asc($)
$n=128
while $n
$c=$c+iif($e,$n*(($k^$<' ')&$>),$m[$k^$x/$n])
$x=$x-$n*($x/$n)
$n=$n/2
$=iif($e|$n=0,right($,~),$)
loop
$a=$a+iif($e,chr($c),$c+iif($,@,$m[$k]))
endfunction
Edited by Howard Bullock (2011-11-13 07:00 PM)
|
Top
|
|
|
|
#203667 - 2011-11-13 10:56 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Howard Bullock]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
ok, sorry guys, haven't been around to post my code. here is my 173:
function a($t, optional $k,$,$b)
$a=$k
if $t
$a=chr(iif($k,9+($k=" " ^ ($ & asc($t))>)*23,($=)*$b))+a(substr($t,2-(~$ & $k)),$k,$/2+64*($=),$*(right($t,1)<>left($t,1))+$/$*$b)
endfunction
_________________________
!download KiXnet
|
Top
|
|
|
|
#203670 - 2011-11-13 11:26 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Lonkero]
|
Allen
KiX Supporter
Registered: 2003-04-19
Posts: 4549
Loc: USA
|
LOL... WTH! Nice Lonk. You surely have no souls left to sell to the man down stairs now.
|
Top
|
|
|
|
#203672 - 2011-11-14 09:27 AM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Howard Bullock]
|
Jochen
KiX Supporter
Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
|
|
Top
|
|
|
|
#203673 - 2011-11-14 10:21 AM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Jochen]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
integer values? what you are talking about?
what wondered me was how many lines you guys had. I don't remember having that many even in my very first code.
oh, and here is my last code at 181 that supported 8bit characters (you know, ä, ü, etc...):
function a($t, optional $k,$,$b)
$=$+128*($=)
$a=$k
if $t
$a=chr(iif($k,9+23*($k=" " ^ ($ & asc($t))>),$/99*$b))+a(substr($t,2-($>1 & $k)),$k,$/2,$*(right($t,1)<>left($t,1))+$b*($<99))
endfunction
_________________________
!download KiXnet
|
Top
|
|
|
|
#203678 - 2011-11-14 12:00 PM
Re: Kixgolf - Whitespace Obfuscation - Public Round
[Re: Lonkero]
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
this is indeed crazy. took jochen's code. it worked. removed the first dim, got this:
function a($, optional $k, $e, $m)
$k=$k+$<' '
$m=' ',' '
$e=$<!
while $
dim $c,$n,$x
$x=asc($)
$n=128
while $n
$c=$c+iif($e,$n*(($k^$<' ')&$>),$m[$k^$x/$n])
$x=$x-$n*($x/$n)
$n=$n/2
$=iif($e|$n=0,right($,~),$)
loop
$a=$a+iif($e,chr($c),$c+iif($,@,$m[$k]))
endfunction
tested, it works. it's 245. compared with what howard had, exact same look. replaced with howards code and again it failed with 246. I am not seeing the light here!!!
_________________________
!download KiXnet
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 616 anonymous users online.
|
|
|