Arc Forumnew | comments | leaders | submitlogin
Bipedal: A new, untyped, stack-based language (lambda-the-ultimate.org)
3 points by claytonkb 3885 days ago | 1 comment


3 points by fallintothis 3883 days ago | link

Very interesting! Particularly the <- and -> operators. It's refreshing to see new approaches to stack shuffling that don't come from the kind of established zeitgeist of stack shufflers (dup, swap) & combinators (dip, bi, tri). I was confused by the notions of the "downstack" and "upstack", because it looks to me that you really only have one stack, and a cursor into it, like:

               -- (bottom) n
               --          ^

   <-          -- (bottom) n
               -- ^^^^^^^^

   { '*' << }  -- (bottom) { '*" << } n
               --          ^^^^^^^^^^

   ->          -- (bottom) { '*' << } n
               --                     ^

   times
or

               -- (bottom) a b c
               --              ^

  <-           -- (bottom) a b c
               --            ^

  <-           -- (bottom) a b c
               --          ^

  operate_on_a -- (bottom) whatever operate_on_a produces b c
               --                                ^^^^^^^^

  ->           -- (bottom) whatever operate_on_a produces b c
               --                                         ^
etc.

Also, it seems to me the language isn't really "typeless"; rather, the programs aren't generally type-directed. The system appears similar to Arc's, where you have a few already-used type tags (string, int, num), but in principle the tags are arbitrary. I suppose one distinction could be the treatment of the data under certain operations: Bipedal has syntax for strings and integers, but what happens when you call + on a string and an integer? Is it just treated like adding the string's address with the integer, perhaps?

Finally, I'm interested by the crypto angle. Do you think this is just a generally important (or interesting) feature, or is there a particular application you have in mind? [I said, hoping you're still checking this forum. :)]

-----