Page 2 of 4 <1234>
Topic Options
#203683 - 2011-11-14 01:31 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Touché!
That indeed blast my code to smithereens ..

But, Riposte, yours too :p (does no good to Howards either)

 Code:
# Tests Failed   = 1
Result           = Failed
KiXGolf Score    = 173


Edited by Jochen (2011-11-14 01:35 PM)
_________________________



Top
#203684 - 2011-11-14 01:35 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
now as I got that layout issue sorted :P

Jochen, I quickly tried to remove the thing you do with $k and couldn't so kinda forcing you to now ;\)

your line:
 Code:
 $c=$c+iif($e,$n*(($k^$<' ')&$>),$m[$k^$x/$n])

would translate to:
 Code:
;$k=$k+$<' ' <- this line at the top removed
 $c=$c+iif($e,$n*($<>asc(right($,1))),$m[$k=' ' ^ $x>$n])


but there is something I am missing with the $m-part of the code.
you probably having more insight could actually figure it out.
anyways, this would lead to eliminating the $e and making your code work with my test40 (41st test)
_________________________
!

download KiXnet

Top
#203685 - 2011-11-14 01:40 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
mine too?

run on mine:
 Code:
KiXtart Version  = 4.61
KiXGolf Script   = kixgolf_wo.kix
Scoring Engine   = 3.3
OS               = Windows 7 Professional Edition
CPU              = Intel Pentium III
Speed            = 1396 MHz
Memory           = 4096 MB

Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/14 14:37:49.794
Processing End   = 2011/11/14 14:37:50.858
Duration         = 0000/00/00 00:00:01.063
# Tests Run      = 41
# Tests Passed   = 41
# Tests Failed   = 0
Result           = Passed
KiXGolf Score    = 173


and run on howard's FIXED (tabulator) code:
 Code:
KiXtart Version  = 4.61
KiXGolf Script   = kixgolf_wo.kix
Scoring Engine   = 3.3
OS               = Windows 7 Professional Edition
CPU              = Intel Pentium III
Speed            = 1396 MHz
Memory           = 4096 MB

Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/14 14:39:39.833
Processing End   = 2011/11/14 14:39:40.190
Duration         = 0000/00/00 00:00:00.357
# Tests Run      = 41
# Tests Passed   = 41
# Tests Failed   = 0
Result           = Passed
KiXGolf Score    = 255
_________________________
!

download KiXnet

Top
#203686 - 2011-11-14 01:43 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
yeah, yours too .. at least with what you have posted here \:D
_________________________



Top
#203687 - 2011-11-14 01:52 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I actually tried with that.
and results are the same.
_________________________
!

download KiXnet

Top
#203688 - 2011-11-14 02:04 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
 Code:
Tournament       = Whitespace Obfuscation
Processing Start = 2011/11/14 14:01:26.046
Processing End   = 2011/11/14 14:01:26.609
Duration         = 0000/00/00 00:00:00.562
# Tests Run      = 41
# Tests Passed   = 40
# Tests Failed   = 1
Result           = Failed
KiXGolf Score    = 173


your code
 Code:
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


copied test 41 40 from your post


Edited by Jochen (2011-11-14 02:09 PM)
_________________________



Top
#203689 - 2011-11-14 02:11 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
I meant to have a line in the rules that explicitly said, "There will be no clear text input that starts or ends with a space or tab."

Sorry, about that, it slipped my mind.

Top
#203690 - 2011-11-14 02:55 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
I would not disagree ;\)
_________________________



Top
#203691 - 2011-11-14 02:59 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, it wasn't in the rules, so allen go ahead and let us know will it be added.
it would force ppl to do something during the public round too, so I am for including a whitespace test.

I demand one!!!!! \:\)
_________________________
!

download KiXnet

Top
#203692 - 2011-11-14 03:27 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
I need to check something, but I am a bit tied up for the moment. I'll post back asap.
Top
#203693 - 2011-11-14 03:28 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Sidenote to Howards code posts:

I noticed that both posts have been edited .. maybe the intrinsic board editor has f*ed with the tabs?
_________________________



Top
#203694 - 2011-11-14 04:18 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I couldn't get the effect no matter how much I kept editing...
_________________________
!

download KiXnet

Top
#203695 - 2011-11-14 05:02 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Jochen, I tried even once more.
copied my code from your post and the test from my post.
renamed it to test41 and got back passed 42, failed 0

I bet your editor replaced tabs again \:D
_________________________
!

download KiXnet

Top
#203696 - 2011-11-14 05:19 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Nope it doesn't .. not when I paste things, only when I type ;\)
Even if I let it show non-printable characters, there are tabs and spaces evenly distributed .. dunno what is going on with this.


Edited by Jochen (2011-11-14 05:21 PM)
_________________________



Top
#203701 - 2011-11-14 06:17 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
"fixing" Jochen's code seems too hard for me, so, wen't for Howards instead.

237 by switching $z and $ and then taking out the need for the array stuff:
 Code:
function a($s, optional $k,$z,$c,$e,$p,$)
;  $=1,128,64,32,16,8,4,2,1
  For $c=1 To ($s^)
    $=$+($=)*128
    $p=substr($s,$c,1)
    if $k
      ;Encode
      For $z=1 to 8
        $a=$a+iif(asc($p) & $, iif($k=" ","	"," "), $k)
	$=$/2
      Next
    else
      ;Decode
;      $z=$c mod 8
      $e=$*(right($s,1)<>$p)+$e
      $=$/2
      if $=0
;      if $z=0
        $a=$a+chr($e)
        $e=0
      endif
    endif
  Next
  $a=$a+$k
endfunction
_________________________
!

download KiXnet

Top
#203702 - 2011-11-14 06:22 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
$z no longer needed, 234

 Code:
function a($s, optional $k,$c,$e,$p,$)
  For $c=1 To ($s^)
    $=$+($=)*128
    $p=substr($s,$c,1)
    if $k
      ;Encode
;      For $z=1 to 8
      For $e=1 to 8
        $a=$a+iif(asc($p) & $, iif($k=" ","	"," "), $k)
	$=$/2
      Next
    else
      ;Decode
      $e=$*(right($s,1)<>$p)+$e
      $=$/2
      if $=0
        $a=$a+chr($e)
        $e=0
      endif
    endif
  Next
  $a=$a+$k
endfunction
_________________________
!

download KiXnet

Top
#203703 - 2011-11-14 06:52 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so... how about that post Allen? \:\)
_________________________
!

download KiXnet

Top
#203704 - 2011-11-14 07:07 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Lonkero]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
While I'm working... am I correct this only effects Jochen (so far)?

Normally I don't mind adding cases, but I'm really struggling to find any value in it this time. Comments?

Top
#203705 - 2011-11-14 09:33 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Allen]
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
None

edit: answered your PM though


Edited by Jochen (2011-11-14 09:38 PM)
Edit Reason: Oh well..
_________________________



Top
#203706 - 2011-11-14 09:51 PM Re: Kixgolf - Whitespace Obfuscation - Public Round [Re: Jochen]
Allen Administrator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4549
Loc: USA
Okay guys... here are the new test cases in a new INI. 45 total now.



Attachments
kixgolf_wo.ini (420 downloads)
Description:




Edited by Allen (2011-11-14 11:22 PM)
Edit Reason: Updated INI

Top
Page 2 of 4 <1234>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 365 anonymous users online.
Newest Members
rrosell, PatrickPinto, Raoul, Timothy, Jojo67
17877 Registered Users

Generated in 0.046 seconds in which 0.015 seconds were spent on a total of 14 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org