Re: Euphoria sucks at golfing
- Posted by jaygade May 07, 2014
- 1634 views
I got it down to 150 characters (after whitespace removed). Here's the whitespace version:
object t=and_bits(gets(0),#DF),L="LLAMA",X={},i=1 while length(L) do i=find(L[1],t,i) if i=0 then X={} exit else L=L[2..$] X&=i i+=1 end if end while ?X
Edit: Shortened to 148:
object t=and_bits(gets(0),#DF),L="LLAMA",X={},i=1 while length(L)do i=find(L[1],t,i) if i then L=L[2..$] X&=i i+=1 else X={} exit end if end while ?X
Edit2 Got it down to 147. Here is the short version:
object t=and_bits(gets(0),#DF),L="LLAMA",X={},i=1 while length(L)do i=find(L[1],t,i)if i then L=L[2..$]X&=i i+=1 else X={}exit end if end while ?X