Email or username:

Password:

Forgot your password?
Devil Lu Linvega

Rewriting systems are fascinating, since they're closer to the straight automata realm, there's no pointers, no variables, no functions(think, Orca).

To check if something is in a list, you basically have to implement a 1D physics engine, that sends a signal(a word) down the list, collide with some word or the tail of the list, and bounce back with a signal of its success or failure by rewriting the program as it goes. It's kind of blowing my mind right now.
git.sr.ht/~rabbits/parade/tree

23 comments
Devil Lu Linvega

It kills me that this realm of computation is utterly unexplored.

418 I'm a Teapot

@neauoire just wait till you meet graph rewriting :)

418 I'm a Teapot

@neauoire aha, yes, I remember when you were looking at that. the funny thing is it's related but in some sense quite different from the kind of rewriting systems that we work with (which are part of a broad class of SPO, DPO, SqPO systems, process calculi like the Kappa language, usually the stochastic versions which are good for representing a variety of real-world systems). Your comment about having to think differently to encode things that are straightforward in "normal" languages rang true

Devil Lu Linvega

@chainik I hadn't seen Kappa, but it looks like it's petri nets and these sorts of things. Modal, the language I currently use could probably host graph rewriting quite nicely, but its closer languages, I think, are Thue and Maude. The advantage of string rewriting the way modal does it is that it has a nicer UX I find, it's a bit easier to reflect about.

I didn't know you were using rewriting systems at all, that's cool :) You're full of surprises.

418 I'm a Teapot

@neauoire :) yes, it is related to petri nets: graph rewriting on a (labelled) discrete graph is equivalent to a petri net. edges make things more fun, so Kappa is more general. we are working on a yet more general variant called CSet rewriting mainly for use in epidemiology (johncarlosbaez.wordpress.com/2). we do not yet have a very good surface syntax for it, though, so Modal and Thue (less so Maude, it is quite complicated) are good inspiration.

Devil Lu Linvega

@chainik Whenever you come across interesting(or odd) things that can be done with Kappa, send it my way :)

Travis F W

@neauoire could you imagine a 2 or 3D runtime?

Devil Lu Linvega

@travisfw Do you mean a 2d string rewriting language, like orca? or a 2d runtime running on modal?
git.sr.ht/~rabbits/thuesday

Travis F W

@neauoire you mentioned a physics engine. I can't really imagine that in 1D. But higher-dimensional physics engines are common, and I have always wondered if higher-dimensional programming might be possible.

DELETED

@neauoire the tools of the trade are over-defined by who pays the tradespeople...

(wryl)

@neauoire It's very nice to see you getting closer to the physical intuition and beauty of rewriting. I feel like that's the real insight behind these systems.

When you write in them, you're closer to a physicist (or, perhaps, a chemist) than a programmer. Things bounce off of other things, collide, expand, contract..

Modal may be used to build things that look functional, but at some point, you'll need to think like a physicist, or a mechanical engineer.

I could make a "string theory" pun..

Devil Lu Linvega

@wryl I originally wrote "string physics" at first and thought 🤔 that has got to mean something else to physicists.

(wryl)

@neauoire Michio Kaku would be very confused. 😆

Odo Klave

@neauoire What does working on this feel like?

Devil Lu Linvega

@dualhammers It feels like using a very mechanical thing, every part moves during transformation and you can watch each step reshape the system into a new thing. The most familiar experience this reminds me of is using Orca I think

Odo Klave

@neauoire It's interesting how seeing the transformation at a scale we understand can make something feel very different

Devil Lu Linvega

@dualhammers I agree, here's the steps to reversing a word and what it looks like during programming, it's very "mechanical", is the best way I can describe this.

Odo Klave

@neauoire Is there a benefit for this over other methods besides personal curiosity and edification?

Devil Lu Linvega

@dualhammers it's just a different way of thinking about computation. It might have certain advantage over other programming languages for certain tasks, but it's so underdocumented and explored that everything has yet to be tried.

One of the appeal to me is that the entire language implementation is only 300 lines, so it makes it pretty portable and minimal in the number of feature it has. It makes me look at things a bit differently too, which is always fun.

Odo Klave

@neauoire your answers are always helpful to me. Thank you

Go Up