All posts by chorasimilarity

can do anything

Quine graphs (5), anharmonic logic and a flute

Several things:

  • added a new control to the quine graphs pages (all can be accessed from here). Is caled the “rewrites weights slider”: you can either favor the rewrites DIST, which add nodes to the graph, or the rewrites β  which take away nodes from the graph (for chemlambda these are the L-A rewrite, but also the termination rewrites and FI-FOE). This changes, sometimes radically, the result of the algorithm. It depends what you want. In the case of reductions of lambda terms, you may want to privilege β rewrites, but as usual this is not generally true, see the last example. In the case of the fight arena for quines, you can favor a species of quines over another by your choice.
  • of course in the background I continue with kali, or anharmonic lambda calculus. The new thing is that why not conceive a programming language which compiles to kali? It works fine, you can say things as

“from a see b as c” or

“let a mark b as c” or

“is a as b” or

“c := let x  = b in c”

and many others! Soon, hope at the beginning of December, will be available.

  • It helps to do new things, so I finished t day my first flute. Claudia, my wife, is a music professor and her instrument of choice is the flute. From a physics point of view a flute is a tube with holes placed in the right possitions, how hard would it be to make one? After I made it, it is usable but I started to learn a lot of stuff about how unnatural is the modern flute and how much you can play with all variables. As a mathematician I  oscilate between “is a known thing to simulate a flute numerically” and “I shall concentrate on the craft and will play with various techniques”. My first flute was a craft only effort, but now, when I know more, I am hooked!

OK, so that’s the news, I like to make things!


A small ouroboros has a short life (Quine graphs 4)

As I said many times, there is a lot of background to the hundreds of chemlambda mol files and associated simulations. Now that I took the Quine graphs repository seriously, I have to select rather clear and short strings of facts associated to the mol files, so that I can tell clear and short enough stories.

So it came out of the depth of this pile of stuff I have that the ouroboros is not an immortal quine. It can die and his life is of the order exp(length) where length is the length of the double track it contains.  The shortest ouroboros appears here (look in the MENU).

Otherwise, I reorganize (and continue to do so) the js scripts, so that they become easy to understand. Now there is a chemistry, nodes, etc. so thare will be a convergence with the modules of hapax.

Quine graphs (3), ouroboros, hapax and going public

Several news:

I decided that progressively I’m going to go public, with a combination of arXiv, Github and Zenodo (or Figshare), and publication. But there is a lot of stuff I have to publish and that is why this will happen progressively. Which means it will be nice to watch because it is interesting, for me at least,  to answer to the question:

What the … does a researcher when publishing? What is this for? Why?

Seriously, the questions are not at all directed against classical publication, nor are they biased versus OA. When you publish serially, like a researcher, you often tell again and again a story which evolves in time. To make a comparison, it is like a sequence of frames in a movie.

Only that it is not as simple. It is not quite like a sequence of frames,  is like a sequence of pictures, each one with it’s repeating tags, again and again.

Not at all compressed. And not at all like an evolving repository of programs which get better with time.

Quine graphs (2)

UPDATE: This page has now comments for each graph  , or its sister page. Now I can start to mass produce 🙂

There are several technical details to add before I arrive to a final version, but now there are, as usual, two sister pages:

  • (the one I want to write about today) here
  • and the one at the quinegraph repository here (link changed, mentioned in the last post)

The first page, ie the newer one, has the algorithm involving the COMB rewrites and Arrow nodes, even for Interaction Combinators, which is part of the original chemlambda programs.  It may be funny to see the Arrows and COMB rewrites in action in the case of IC.

This part is needed because the way a graph quine is defined. The Arrow and COMB rewrites allow to make purely local parallel rewrites. For the case of Interaction Combinators, where the graphs are not oriented, a hack can be done in order to use Arrows, which consists into using a pair of them, tip to tip, instead of only one. (Not the first time when I think that IC is bosonic and chemlambda is fermionic 🙂 )

That being said, what more is needed?

  • to fully implement the greedy algorithm, because only the sequential random one is in the js version (let’s recall again that the js-only version was first done by ishanpm, then modified by me according to (many) needs. It is a marvel, even if it needs more tweaks, in particular from my point of view because by using it I discovered that the 10 quine can reproduce itself). Needed because of the definition of a quine.
  • to put a graph matching function. There is one in the more ambitious project hapax. (It does not have pretty pictures, but I’ll modify it after, maybe that is why it does not attract?) Useful for the verification of a quine.
  • depending on time, implement a sort of arena where quines compete. Needed for a part of the article (or maybe a supplement?) where I explain some things mentioned in the deleted g+ chemlambda collection (adaptation is another semantic ilusion)
  • finally I need to arrive to a not too primitive form of html presentation, these days people are used to such things and the academic who just want to show a proof of principle will be ignored without. Needed because it can be done and is good for my education.

All in all, ironically, my initial awk program (4364 sloc) does that and more (Turing machines, to come in js version, as well as Formality Core) in so many lines because perhaps they were needed? I say ironically because that program is written without the use of functions, so perhaps it is about 1000 sloc with functions. Compare with the js version which has the same number of lines, written by ishanpm. Compare with the Haskell version written by synergistics,  Compare with the python version by 4lhc.

Most of these lines are needed to destroy the information added to the system by the semantic assumptions of those who wrote the programming languages. Yes.

I close here by saying that even if I don’t believe in semantics, as it is understood since Aristotle (but not by Plato), I do believe in the existence of a different, more beautiful replacement, which can be glimpsed in the way nature needs randomness for creating structure.


Quine graphs (1)

Update: here is the template page for the demos, which will be released soon with the article. Thank you for letting me know about any suggestions, improvements, bugs, requests. The demos will support the article and they will be grouped on families, based on subject or on common phenomena. In this article, up to now,  only chemlambda and Interaction Combinators are touched, not kali or hapax.


While hapax and anharmonic lambda calculus enter the final stage, it is time I prepare for publication the quines exploration project. I intend to make an article (first to arXiv) with a paired github repository and some pages where the real things happen. For the search of new quines I might go back to twitter and make a dedicated account. Let’s see how all this will work together.

For the moment I collect here the posts from this chorasimilarity blog, or other links  which are related to the  project. (Well there is a collection of google+ posts which are going to be useful, I have to see what I do with these).

So here is it, in reverse time order:

A very useful yool was the full js chemlambda editor written by ishanpm. I modified it and tuned it in many places and I shall continue or I’ll write a new one, but definitely I learned stuff by using it, thanks!

I might explore also quines in other

although I shall not touch the relations with knot theory, in this article. Only look for quines, as example.

If you have questions, suggestions, or if you want to contribute to the subject, let me know.


6 months since my first javascript only

… program, this one: How time flows: Gutenberg time vs Internet time . Before I used js only for the latest stage, written (clumsily, I admit) by other programs. Since then I wrote hapax  and I modified other scripts to fit my needs, mainly, but this corrected a gap in my education 🙂

Oh btw if anybody interested to see/interact on this talk I’d like to propose: [adapted from a pdf (sigh) for my institution management, though they are in the process to reverse to  the pre-internet era  and they managed to nuke all mail addresses a domain which was  rock solid since at least 20 years; that’s why I post it here]

A kaleidoscope of graph rewrite systems in topology, metric geometry and computer science
Graph rewrite systems are used in many research domains, two among many examples are Reidemeister moves in knot theory or Interaction Combinators in computer science. However, the use of graph rewrites systems is often domain dependent. Indeed, for the knot theory example we may use the Reidemeister move in order to prove that the Kauffman bracket is a knot invariant, which means that it does not change after the graph is modified by any rewrite. In the other case given as an example, Interaction Combinators are interesting because they are Turing universal: any computation can be done with IC rewrite rules and the rewrites are seen as the computational steps which modify the graphs in a significant way.

In this talk I want to explain, for a general audience, the ocurence and relations among several important graph rewrite systems. I shall start with lambda calculus and the Church-Turing thesis, then I shall describe Lafont’ Interaction Combinators [1]. After that I shall talk about graphic lambda calculus [2], about joint work with Louis Kauffman [3] on relations with knot theory. Finally I explain how I, as a mathematician, arrived to study graph rewrites systems applications in computer science, starting from emergent algebras [4] proposed in relation with sub-riemannian geometry and ending with chemlambda [5], hapax (demo page [6], presentation slides [7]) and em-convex [8] with the associated graph rewrite system [9] (short of “kaleidoscope”).

During the talk I shall use programs which are based on graph rewrites, which are free to download and play with from public repositories.

[1] Y. Lafont, Interaction Combinators, Information and Computation 137, 1, (1997), p. 69-101

[2] M. Buliga, Graphic lambda calculus. Complex Systems 22, 4 (2013), p. 311-360

[3] M. Buliga, L.H. Kauffman, Chemlambda, Universality and Self-Multiplication, The 2019 Conference on Artificial Life 2014 NO. 26, p.490-497
[4] M. Buliga, Emergent algebras, arXiv:0907.1520

[5] M. Buliga, Chemlambda, GitHub repository (2017)
[6] M. Buliga, Hapax, (2019) demo page,
Github repository

[7] M. Buliga, Artificial physics of artificial chemistries, slides (2019)

[8] M. Buliga, The em-convex rewrite system, arXiv:1807.02058

[9] M. Buliga, Anharmonic lambda calculus, or kali (2019),
demo page


I’d like to make this much more funny than it looks by using these js scripts. Also “kaleidoscope” is tongue-in-cheek, but that’s something only we know. Anyway kali is on the way to be finished, simplified and documented. And somehow different. For a short while, encouraged by these js scripts and similar attempts, I tried to believe that maybe, just maybe there is a purely local way to do untyped lambda, right around the corner. But it seems there isn’t, although it was fun to try again to search it. But then what to do? Maybe to be honest with the subject and say that indeed a purely local system, geometry inspired, exists, it it Turing universal, but it is not lambda calculus (although it can be guided by humans into being one, so that’s not the problem)? Maybe going back to my initial goal, which was to understand space computationally, which I do now? Yeah, I know that lambda calculus is fascinating, even more if untyped,  but em is so much better!


Experimental generation of anharmonic lambda calculus (II)

UPDATE: There is still another version, less exotic, at github. Both are working versions of kali.  For those with mathematical inclinations there are explanations in the tool rhs.js. This will come to a conclusion with the explanations about FO and with the tools to choose optimal collections of rewrites.


There is a working version of kali which I posted today. Enjoy and wonder how can it (sometimes!) reduce lambda terms even if it has nothing to do with lambda calculus in the background. The js script is interesting to read, or better the script from the page which generates DIST rewrites (which you can add in your copy of the main script and play with it, it is enough to add it to the list of rewrites).

It is comical how does it fail sometimes. Space is symmetrical and logic is constrained.

Also I think I’ll pursue the idea to train the (choice of rewrites, probabilities) for certain tasks, as evoked here.