Program The rantings of a lunatic Scientist

99 Bottles of beer

L2Program Language

Still very much a work in progress but it’s at least 99% there. And what better way to celebrate than with a round of 99 bottles of beer on the wall!

1.1 Do part 2 for a = 99(-1)2.
1.2 Do part 3.
1.3 Line.

2.1 Type a in form 1.
2.2 Type a in form 2.
2.3 Do step 4.1.
2.4 Set b = a - 1.
2.5 Do step 3.1 if b = 1.
2.6 Do step 3.5 if b != 1.
2.7 Line.

3.1 Type "1 bottle of beer on the wall".
3.2 Type "1 bottle of beer".
3.3 Do step 4.1.
3.4 Set b = 0.
3.5 Type b in form 1.

4.1 Type "You take one down, you pass it around".

Form 1:
_._ bottles of beer on the wall
Form 2:
_._ bottles of beer

  • Thomas Lake

    Is there a version of JOSS for Linux and/or Windows? I’d really like to be able to run it. Somehow it works the way I think (scary, I know!) FOCAL is not bad but JOSS is even closer to PeCos. I always wanted an APF PeCos One computer when I was younger. PeCos was based on JOSS.

  • I developed the simulator in Javascript, so it should run on any modern web-browser. But I I hit a snag when developing that there was no way to implement the pause instruction in Javascript because it uses asynchronous callbacks. Short of rewriting the whole thing to work around this I abandoned the project when I started my PhD.

    If you’d like I can have a hunt around for the source files and put them on Github for you. A large part of the project was in reverse engineering and transcribing the formal grammar for the language. I wrote it in BNF notation before translating it to a script for PEG.js so you could potentially use it to write a parser in any language or framework.

  • Thomas Lake

    I’d really appreciate getting a copy of your JavaScript version. Thanks!