katef / kye

Kye
22 stars 2 forks source link

No documentation? #3

Open owlshrimp opened 2 years ago

owlshrimp commented 2 years ago

Hello! I hope this finds you well!

I find this language you've implemented to be quite interesting, especially after seeing it implement a Turing machine in an animation on twitter. I've seen it described as some kind of visual programming language?

To be honest, I'm having a hard time understanding what I'm looking at, or what the above description means. There doesn't appear to be much explanation or documentation available in this repository. Do you have an explanation somewhere of this language and what makes it unique? I'd love to learn more!

Sincerely, -Matthew Bradley

katef commented 2 years ago

Hi there! Unfortunately no, not yet.

This is a reimplementation in rust of something I wrote an awfully long time ago, and I don't have much of what I wrote at the time. But it boils down to a giant match in a loop, one per thread. If you look through that, that's all of the instruction execution.

katef commented 2 years ago

See tick() in kye.rs. That's called for each thread, independently.

owlshrimp commented 2 years ago

Can you describe what "visual programming language" might mean? From the Turing machine animation it looked like the arrangement of the characters in 2D space was important, kind of like a Turing machine implemented in Conway's game of life.

katef commented 2 years ago

That's right. Kye is a "funge", these are a class of languages with multi-dimensional instruction flow, named for the first language, Befunge. In Kye a thread can move horizontally, vertically and diagonally. If you run exampes/fork.kye, you should be able to see the T instruction to fork at 90°, and Y to fork at 45°.

katef commented 2 years ago

oh I wrote a little here - maybe this helps! https://twitter.com/thingskatedid/status/1404342562421317632