Have you written your own esoteric (or not) language? What did it look like?

I saw several questions regarding the favorite esoteric (or not) stackoverflow programming languages. There are also questions regarding the implementation of languages. However, I was curious to find out if any of you really wrote your own programming language (whether esoteric or not), and I also wanted to know how it looks.

I like reading and trying to learn new and inventive languages, so I thought it would be nice to see what the stackoverflow community has to offer. :)

I wrote one for fun a few years ago.

+4
source share
4 answers

I wrote a set of 7 "micro" languages ​​for learning. Each of them is intended to illustrate the key ideas of one of the following complete programming languages:

  • untyped version of C
  • Scheme
  • FROM
  • System F
  • ML
  • Smalltalk
  • Prolog

Languages ​​consciously look very similar to each other, so that students see only significant differences, never free. I want to make two more based on Haskell and CLU.

Sam Kamin had an original idea and helped a lot with the design.

+3
source

I worked and worked on DIFL, intended as a declarative text of adventures, but over time it became less declarative. Its main functions are a very free object system and an action system based on multipoints. (Well, its main functions will be if I ever finish this.)

+2
source

One of the first languages ​​I tried to write was the assembly language of MIDI files. You must determine the tempo and bank of instruments, and then many lines of notes (note name, initial bit-per-current measure, duration, additional accent), dotted with dashed lines ("meas \ n") and dynamics (ppp, pp, p , mp, mf, f, ff, fff).

In macro language, it was not used to repeat sequences, change channels and record new tracks. This required my first hash table, and the cunning cross-on-fingers called qsort to alternate channels in a time sequence (implicitly carried by each Note-On / Note-Off event).

When I returned to him a year later, he became a victim of bit rot. After a bit of a fight, I rediscovered that the sort-and-output-everything function was called by explicit EOF code. The macro-expanded song was easily 20,000 lines with this important EOF line, so the 1 / 200,000th chance to be noticed, trying to understand what is going wrong on the check!

I'm a little glad that all the evidence is safely hidden in a dead processor under a microwave trolley. Horror !!

Edit: After further reflection in the MIDI format, there are some interesting things. It has an integer type of variable length (IIRC using the sign bit for the signal of the last byte). It is byte-oriented, designed to work on 9 parallel wires; and he has a crazy time synchronization that I never understood. But all I cared about was that the Windows95 media player could interpret the output (it could even use an 8-bit bank of MIDI tunes built into the sound card, and the cymbals were perfectly distorted).

+2
source

Source: https://habr.com/ru/post/1300914/