← Back to context

Comment by archibaldJ

1 year ago

I think it should be quite nice to write an interpreter in Haskell (and then introduce meta-circular to it?)

e.g. we can have Graph be a monad made up of `Node[]` with `runGraph` defined by somehow composing Rules

```

data PortType = ... deriving (Show, Read)

data Port = Port { portType :: PortType, portName :: String } deriving (Show, Read)

data Node = Node { inputPorts :: [Port], outputPorts :: [Port], principal :: Port } deriving (Show, Read)

```

Will need some creativity for the Rules to be defined more naturally, or it would end up just a function:

```

zeroAddRule :: Port -> [Port] -> Maybe [Port]

zeroAddRule target [addend]

    | target == outputPorts zero !! 0 = Just [addend]

    | otherwise = Nothing

```

[edited for elaboration]: I'm actually working on a LLM prompt-orchestration and fine-tuning/testing framework in Haskell (and will be open-source soon https://github.com/0a-io/ArchGPT ). The more I learn about iNet now the more I think I will try to write an implementation of it in Haskell and see how well it can fit into the hypergraph architecture I’m designing for building automated-software-development pipelines :)

I think what's so cool about the interaction-nets model of computation is that it makes tracing and stepping much more like first-class citizens, as well as a kind of intuitiveness for anything combinatorial

I plan to do multiple implementations of iNet too.

If you made an implementation, I will make a list of implementations in the homepage ( https://inet.run ), and add your implementation to the list :)

------

I do not know much about LLM yet, but I like hypergraphs too :)

(I learned about it from Wolfram Physics's docs.)