Email or username:

Password:

Forgot your password?
Devine Lu Linvega

Practicing writing games entirely using string rewriting for the first time. It's rewiring my brain, I've never seen a computing paradigm as powerful as that before. I'm at a loss for words-

The runtime is 200 lines, the game source reads like english, it's fast as hell, it vitrifies whatever examples is on rosetta code, even Prolog(You had one job?!).

tictactoe: git.sr.ht/~rabbits/modal/tree/
runtime: git.sr.ht/~rabbits/modal/tree/
docs: wiki.xxiivv.com/site/modal
weep: rosettacode.org/wiki/Tic-tac-t

15 comments
ThaCuber

@neauoire I think I once commented on such a thing as one example of pattern matching, not necessarily in Modal, but in Feather, another language by wryl

either way, I really like it, reminds me of Puzzlescript and other rule-based systems

Devine Lu Linvega

@thacuber2a03 yeah! Feather is @wryl's more focused language, a bit further out of the tarpit.

ThaCuber

@neauoire @wryl and I just realized this looks a lot like a functional programming language LOL

ThaCuber

@neauoire me being pedantic again, but I found a single character off with that logic table for or:

datarama

@neauoire To me it feels like rewriting is one of the "ur-paradigms"; a programming paradigm general enough that you can express any other in it. And it *is*, in a very real sense, the commonality between lambda calculus and (the original) Turing machines.

program jiggler

@neauoire no shade on your code, i think it is fascinating and i love it

but to be fair to the prolog version, it implements a computer player, using the minmax algorithm to compute the best next move

not that you couldn't do it in modal! i'd love to see it in fact. betting it will still be way more concise and readable than the prolog version

Devine Lu Linvega

@pho4cexa I'd like to add a cpu, I started on it, but got caught up doing boat projects yesterday, I'll try to revisit that over the weekend. I'm curious to see what that would look like as well.

poetaster

@neauoire ah, modal! Jeez. Fun. (looks for time behind bush at ground level).

Devine Lu Linvega

@ddlyh yes :) I've begun working on the implementation already.

Go Up