Skip to content

JoyTrain is a pseudorandom algebraic multiquine relay written in a subset of Joy programming language by Manfred von Thun.

Notifications You must be signed in to change notification settings

undetectablev/joytrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JoyTrain

JoyTrain is a pseudorandom algebraic multiquine relay written in a subset of Joy programming language by Manfred von Thun. It works by specializing a probabilistic pattern matcher with a non-confluent TRS and applying the residual program to itself. All ad-hoc specialization and interpretation is done in Chez Scheme.

How to run (takes a few seconds):

chezscheme --script joy.scm joytrain.joy > 1.joy
chezscheme --script joy.scm 1.joy > 2.joy
chezscheme --script joy.scm 2.joy > 3.joy
...

Building from sources:

chezscheme --script src/joytrain.scm > joytrain.joy

Notes

  • All recursion is eliminated by the fixpoint combinator.
  • Quotations [...] are treated as extensional, so no axioms violating extensionality are used.
  • Strings "..." are intensional. They are used with the intern combinator as patterns to avoid their further overwriting.
  • No type checking is implemented, so no axioms like id == swap swap are used.
  • Strategy is the dumbest possible:
    • randomly apply axioms N times
    • normalize
    • randomly apply axioms once
  • Doesn't work with the original Joy interpreter because it crashes with segfault for some reason.

About

JoyTrain is a pseudorandom algebraic multiquine relay written in a subset of Joy programming language by Manfred von Thun.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages