NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Show HN: Term-Lisp – A Lisp, based on pattern matching and term rewriting (github.com)
BoiledCabbage 3 hours ago [-]
Term re-writing systems are a really interesting way of looking at computation.

It completely abstracts away the concept of a machine, and it's simply translation as computation - but equally as powerful.

simplify 3 hours ago [-]
Agreed. This reminds me – and I wonder if it could be applied – to Computational Type Theory, which relies on a similar concept of "reducing" types to their primitive forms, actually taking computation into account (something type theories normally do not!)

This lecture series goes into how it works: https://www.youtube.com/watch?v=LE0SSLizYUI

llm_trw 3 hours ago [-]
It's a shame the standard texts are all 20 years old or more than way too heavy mathematically.

A little book for term rewriting would be a great new addition.

entaloneralie 3 hours ago [-]
Here's a little zine on multiset rewriting(unordered term rewriting), John Conway said(about Fractran in The Book of Numbers) that it is such a simple paradigm of computation that no book is needed to learn it, and it can be taught in 10 seconds.

https://wiki.xxiivv.com/site/pocket_rewriting

BoiledCabbage 34 minutes ago [-]
I'm somewhat surprised there isn't a semi-mainstream language for it. It's incredibly simple, with very few core concepts yet very powerful.

Similar to LISP in that sense.

Jtsummers 14 minutes ago [-]
https://www.researchgate.net/publication/243768023_Mathemati...

Mathematica is at least semi-mainstream. Not sure of any other examples though.

lo_zamoyski 3 hours ago [-]
I would argue that it is more "primordial". After all, computation is first and foremost a human activity, generally performed using pen and paper, which involves a good deal of rewriting (computers were originally people). The machine only came later as a way to simulate this human activity. Its meaning is entirely contingent on the primordial notion. It have no meaning on its own.
llm_trw 3 hours ago [-]
This is vastly more pattern matching than term rewriting. In a term rewriting system you have no types for a start: https://en.wikipedia.org/wiki/Rewriting
convolvatron 3 hours ago [-]
is that important here? it looks like semantically types as presented are no more than magic constants to match on
llm_trw 3 hours ago [-]
Yes, in term rewriting systems the only thing that matters is the lexical structure of the "program" you're running on top of the transform rules. A simple example of running a TRS is a term of a BNF grammar, a less simple one is a symbolically expanding a term in a computer algebra system.
convolvatron 2 hours ago [-]
ok. sorry, so the issue is not that some of the runtime data is being interpreted as types, its that decisions are being made based on the data and not solely on the structure of the program.
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 21:33:19 GMT+0000 (Coordinated Universal Time) with Vercel.