Re: The Turing Machine (#162)
by Alpha Chen other posts by this author
May 15 2008 3:00PM messages near this date
Re: The Turing Machine (#162)
|
Re: The Turing Machine (#162)
Thanks for the writeup!
But a small nitpick... =)
On May 15, 11:26Â am, Matthew Moss <matthew.m...@[...].com> wrote:
> Â Â Â puts @tape.sort.map {|_,v| v}.join.gsub(/^_*|_*$/, '')
>
> "useful" content of the tape is displayed. Chen's regular expression
> (slightly corrected in the code shown above), removes all blanks
> immediately after the start of the line _or_ immediately preceding the
> end of the line.
Shouldn't the regex return "a" instead of "a_b" for "_a_b_"?
Thread:
Matthew Moss
Adam Shelly
James Koppel
Alpha Chen
Matthew Moss
Alpha Chen
Alpha Chen
Matthew Moss
Robert Dober
Alpha Chen
Matthew Moss
Chiyuan Zhang
Juanger
Mike Stok
jgabrielygalan
Marcelo
Chiyuan Zhang
James Gray
Juanger
Matthew Moss
ThoML
Chris Shea
Chris Carter
Andrew Thompson
Sandro Paganotti
Chris Shea
ThoML
Chris Shea
Chris Shea
Glen F. Pankow
Adam Shelly
Matthew Moss
Chris Carter
Adam Shelly
|