Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] brainfuck

Expand Messages
  • Florent Monnier
    ... Thanks a lot! I ve updated : http://www.linux-nantes.org/~fmonnier/OCaml/brainfuck.ml.php ... [...] ... Do you mean the esoteric characters ? These are
    Message 1 of 8 , May 10, 2006
    • 0 Attachment
      > > And for the OCaml style, is it good one? or there could there be
      > > 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.

      Thanks a lot!
      I've updated : http://www.linux-nantes.org/~fmonnier/OCaml/brainfuck.ml.php

      > Also, what's up with the
      [...]
      > let code = "
      > ++++++++++[>+++++++>++++++++++>+++>+<<<<-]
      > >++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. "
      > in
      > parse_brainfuck ~code
      > ?

      Do you mean the esoteric characters ?
      These are some brainfuck code, which is a minimalistic, useless and esoteric
      programming language, which has even a Wikipedia page :

      http://en.wikipedia.org/wiki/Brainfuck


      It's nice when get bored, and want to do some geekish things ;-)



      --
    • William Neumann
      ... 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
      Message 2 of 8 , May 10, 2006
      • 0 Attachment
        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
        work_with ~code.

        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
      • Florent Monnier
        ... Ah, ok now I understand, it is just to switch easily between different test case, to test the implementation. --
        Message 3 of 8 , May 11, 2006
        • 0 Attachment
          > > Do you mean the esoteric characters ?
          >
          > 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.

          Ah, ok now I understand,
          it is just to switch easily between different test case, to test the
          implementation.



          --
        Your message has been successfully submitted and would be delivered to recipients shortly.