Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

LifeGoesOnLang

life goez onion onion onion

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Life Goes On Programming Language

A programming language inspired by Oliver Tree's song Life goes on

Also inspired by:

Programming paradigm

All popular programming paradigms are bad. Why? Just google search "why ... is bad". Examples:

That's why LGOL introduces a brand‑new, modern paradigm: SHOP. Now Google "why SHOP is bad". No results. Crickets. So SHOP must be great! But what even is SHOP? its simple! SHOP - Self-Harm Oriented Programming.

Language Design

The "modern" programming languages are notoriously complex. Thats why LGOL consists of only 12 simple commands:

Memory model

LGOL uses a traditional tape‑based memory model, like Brainfuck but with more existential dread. However, we've extended it with new instructions to cut down on boilerplate. Every element of the tape is a 42-bit integer simply because 42 is the answer to everything. The tape grows automatically as you move the life pointer... move what??

The Life Pointer

The life pointer in LGOL is a movable cursor that tracks the active position on a tape of memory cells. You can increment it using on instruction and decrement using work.

Instructions

As said earlier, LGOL has exactly 12 instructions: life, goes, on, and, onion, work, all, day, then, i, wake, up

here is the reference:

Instruction Description
on Life goes on and on and on... Moves the life pointer forward.
work J*b sucks. Thats why work instruction moves the life pointer backwards.
up Simply increments the current cell's value.
onion Peel one onion layer! Heh. Decrements the current call's value.
goes If the current cell is zero, jump forward to instruction after the matching all
all If current cell is non-zero, jump back to instruction right after the matching goes
life Output the current cell's value as a ascii character.
wake Wake up and listen. Inpit a character to the current cell.
i You are worth exactly 0. Sets the current cell to that value.
day One day after another. Copies the current cell's value into the next cell.
and Adds the current cell's to the next cell
then Swaps the current cell with the next one

Example

It's a time‑honoured tradition to print "hello world". But honestly, the world's been greeted enough times already, so now we say goodbye instead.

The following program prints "Goodbye, world!":

pascal
up up up up up up up up
goes
    on up up up up on up up up up up up on up up up up up up up up on up up up up up up up up up up on up up up up up up up up up up up up
    work work work work work onion
all
on on on up up up up up up up life on on up up up up up up up up up up up up up up up life life
onion onion onion onion onion onion onion onion onion onion onion life onion onion life up up up
up up up up up up up up up up up up up up up up up up up up life onion onion onion onion onion
onion onion onion onion onion onion onion onion onion onion onion onion onion onion onion life
work work work onion onion onion onion life work life on on on on up up up up up up up up up up
up up up up up up up up life onion onion onion onion onion onion onion onion life up up up life
onion onion onion onion onion onion life onion onion onion onion onion onion onion onion life
work work work work up life onion onion onion onion onion onion onion onion onion onion onion
onion onion onion onion onion onion onion onion onion onion onion onion life
goes
    on
all
work
goes
    goes
        onion
    all
    work
all

Don't ask how it works. If you can't read this then its probably a skill issue.