Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Woe – A concatenative language inspired by Joy (github.com/sctb)
3 points by sctb on Feb 20, 2018 | hide | past | favorite | 2 comments



I'm posting this old project for curiosity's sake. The repository offers no help at all to understand what's going on, but I'm happy to respond to any question I can remember the answer to!

The language is semantically inspired by Joy and Lisp, but with more of a Factor (and Forth) feel. It's written in Whitney-style C, which I'm sure many will object to. But like, here's the GC:

  Z V gc(E e){
    S r;N t;H h,o;e->g=1;o=e->dh;e->dh=h=nh(e->dh->s);r=h->d;
    cp(e,1,&e->d);cp(e,1,&e->c); /* roots  */
    while(r<(h->d+h->u)){        /* cheney */
      t=(N)r;if(t->t==N_Q){cp(e,1,&t->v.q);}cp(e,1,&t->n);r+=ln(t);
    }e->g=0;free(o->d);free(o);
  }


That's horrible.

But I can grasp some beauty in the ugliness already.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: