1. 17
  1. 3

    PicoLisp is pretty interesting. Anyone who can give me small contrast of scheme vs picolisp (based on experience with both)?

    From what I can tell from a little looking around picolisp has a macro system that looks completely different (very powerful!) but it was a bit uncomfortable for me to parse examples and I’m not sure how to classify it.

    I’d also be interested in seeing some examples of js interop with the picolisp gui.

    1. 3

      PicoLisp has more in common with Forth than Scheme when it comes to the philosophy of construction it uses.

      This is evidenced in it’s FFI (evaling numbers in list-head position dispatches to that location in memory like a function pointer. You get the number wrong, you get a segfault. If you’re ok thinking of PicoLisp as low-level, not a huge problem, but it didn’t sit well with me when I used it last). It also doesn’t have a number tower as such, rather, everything is either done with integers or fixed-point numbers. You set the fixpoint accuracy before the operations in question. There are more examples of PicoLisp’s spartan minimalism, like the lack of many data structures, to make the

      Scheme, I only have little experience with (mostly via Chicken Scheme). Scheme is definitely different flavor from PicoLisp, it has a lot more focus on continuations, for example.

      1. 2
    2. 3

      If you are interested in PicoLisp, you may also like uLisp.

      1. 2

        took me a bit to understand what this was doing and why they wanted it! apparently it’s because picolisp doesn’t have arrays, so there’s no container with O(1) indexing. this tree structure converts numbers to binary, then goes left for 0 and right for 1, so you get an automatic order on the tree with O(log n) indexing. also since you don’t need to store the complete tree, just the edges that are required, you get automatic support for sparse arrays. the advantage over a hash table is that you don’t need to store the keys, saving you one integer per stored value.