Re: "ocaml_beginners":: brainfuck
> > And for the OCaml style, is it good one? or there could there beThanks a lot!
> > some things to be better?
> A quick look at the code looks fine. Though in dump, instead of
> "((List.rev acc) @ buf)", just use "List.rev_append acc buf", which
> is tail recursive and only traverses acc once.
I've updated : http://www.linux-nantes.org/~fmonnier/OCaml/brainfuck.ml.php
> Also, what's up with the[...]
> let code = "Do you mean the esoteric characters ?
> >++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. "
> parse_brainfuck ~code
These are some brainfuck code, which is a minimalistic, useless and esoteric
programming language, which has even a Wikipedia page :
It's nice when get bored, and want to do some geekish things ;-)
- On May 10, 2006, at 7:14 PM, Florent Monnier wrote:
> Do you mean the esoteric characters ?No. I meant the
let code = blah in
let code = fluff in
It's just that you masked the first definition of code with the
second, and I wasn't sure why.
William D. Neumann
"I eat T-bone steaks, I lift barbell plates, I'm sweeter than a
German chocolate cake. I'm the reflection of perfection, the number
one selection. I'm the man of the hour, the man with the power, too
sweet to be sour. The ladies' pet, the men's regret, where what you
see is what you get, and what you don't see, is better yet."
--Superstar Billy Graham
> > Do you mean the esoteric characters ?Ah, ok now I understand,
> No. I meant the
> let code = blah in
> let code = fluff in
> work_with ~code.
> It's just that you masked the first definition of code with the
> second, and I wasn't sure why.
it is just to switch easily between different test case, to test the