Alfie

From Esolang
Jump to navigation Jump to search

Alfie is a esolang based on presumptions. There are 3 Alfie's: Alfie-1, Alfie-2 and Alfie-3. They in order from least to most presumptions per Hello World divided chronological order.

Alfie 1

A Simple accumulator-based esolang. Inside Curly brackets({}) is data I am comparing to accumulator. Outside, there are optional commands that change the accumulator's value and results answered when comparing. By default, accumulator is 0, and if the things in brackets are equal, next thing in brackets is 1, and 0 is accumulator not equal to elements in brackets.

Alfie 1 example

default settings:

{1}

When ran, it outputs:

{0}
{1}
{0}
...

It entered a oscillator, a P1 oscillator to be precise. Non-default settings:

1:= H, 0:=I
{1}

If accumulator is equal to a thing in brackets, Alfie-1 substitutes 1(True) with H. However, if False, we substitute for I. Running it:

{I}
{H}
{I}
...

The Presumption-based element in Alfie-1 is: If brackets are empty(empty set) or malformed, the output is 1. A empty set is not a set that contains 0, isn't it(presumibly)? This language doesnt feel Turing-complete at all!

Alfie-2

This language started as a primitive puzzle on the #esoteric IRC channel. The puzzle itself largely failed. The puzzle was: If A=Input, B=A+1 and C=Output, what is the Output? User:Ai523 said C is the output, which it is. Then User:Singingbanana had a idea, which was in development for over 4 days: Alfie-2. In Alfie-2, the output will be B. Why? Because A is occupied by a system keyword, so it can not be the output. And yes, the output is C, but what value does C have? By process of elimination, variable B is the output. This created the whole Presumption-based Family/The Alfies. A cat program was written in a long airport queue, with a Control flow system which created Alfie-3. Here is the incredibly simple Cat program, which just gets a argument and outputs it, exiting.

A=Input, B=A, C=Output

Here is the incredibly simple multiplying program, using 2 inputs.

A=Input, B=Input, C=A*B, D=Output

Obviously, writing large apps using Alfie-2(And Alfie-3) is a horror, as a large amount of presumptions can mix together, wrecking total chaos, so in Alfie-2, you are permitted to not use presumption. The author of Alfie invites: a)Computational class proofers and b) Esoprogramers to join in. Also, the author is launching a competion for people to investigate what memory is the Esolang using? The author presumes it is like a chain, varables and presumptions connected together, but he is not sure that is a memory model...

Alfie-3

Alfie-3 is Alfie-2 with loops and if's. You can create much more programs in it than in Alfie-2, but you have to use presumptions! A Truth-machine can be created using Alfie-3. Warning: Alfie-3 is quite verbose...

A=Input,B=If A==1: R(1|0).to(c), C=A.message(B)==1: Loop(infinite),D=1,return C, If 0: D=0, D=read.c(pass.E), E=Output.

Alfie-3 is Object-oriented and Presumption-based! In part B, the R command gets True or False, respectively, and substitutes them for 1 or 0. Note: Alfie-3 is purely conceptual...

Summary

These 3 languages are a introduction to the new Presumption-based programming paradigm. If you want a lighter introduction, Alfie-1 and Alfie-2 are perfect! If you got the hang of it, read The article on Object-oriented programming and try to understand the mess Alfie-3 is. Note: These languages are Very Mildly Presumption-based. User:Singingbanana will release yet more languages like this.