All Projects → Adriandmen → 05ab1e

Adriandmen / 05ab1e

Licence: mit
A concise stack-based golfing language

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to 05ab1e

Nf Interpreter
⚙️ nanoFramework Interpreter, CLR, HAL, PAL and reference target boards
Stars: ✭ 168 (-71.18%)
Mutual labels:  hacktoberfest, interpreter
Feel Scala
FEEL parser and interpreter written in Scala
Stars: ✭ 52 (-91.08%)
Mutual labels:  hacktoberfest, interpreter
Boa
Boa is an embeddable and experimental Javascript engine written in Rust. Currently, it has support for some of the language.
Stars: ✭ 2,509 (+330.36%)
Mutual labels:  hacktoberfest, interpreter
Androrat
A Simple android remote administration tool using sockets. It uses java on the client side and python on the server side
Stars: ✭ 187 (-67.92%)
Mutual labels:  hacktoberfest, interpreter
Gwion
🎵 strongly-timed musical programming language
Stars: ✭ 235 (-59.69%)
Mutual labels:  hacktoberfest, interpreter
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+380.62%)
Mutual labels:  hacktoberfest, interpreter
Mond
A scripting language for .NET Core
Stars: ✭ 237 (-59.35%)
Mutual labels:  hacktoberfest, interpreter
Awesome Graal
A curated list of awesome resources for Graal, GraalVM, Truffle and related topics
Stars: ✭ 302 (-48.2%)
Mutual labels:  hacktoberfest, interpreter
React Foundation
Foundation as React components.
Stars: ✭ 573 (-1.72%)
Mutual labels:  hacktoberfest
Sentinelsat
Search and download Copernicus Sentinel satellite images
Stars: ✭ 576 (-1.2%)
Mutual labels:  hacktoberfest
Cucumber Ruby
Cucumber for Ruby. It's amazing!
Stars: ✭ 5,090 (+773.07%)
Mutual labels:  hacktoberfest
Undercover
Actionable code coverage - detects untested code blocks in recent changes
Stars: ✭ 574 (-1.54%)
Mutual labels:  hacktoberfest
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (-1.03%)
Mutual labels:  hacktoberfest
Broot
A new way to see and navigate directory trees : https://dystroy.org/broot
Stars: ✭ 6,362 (+991.25%)
Mutual labels:  hacktoberfest
Site
pythondiscord.com - A Django and Bulma web application.
Stars: ✭ 580 (-0.51%)
Mutual labels:  hacktoberfest
Webpacker
Use Webpack to manage app-like JavaScript modules in Rails
Stars: ✭ 5,282 (+806%)
Mutual labels:  hacktoberfest
Go
Algorithms Implemented in GoLang
Stars: ✭ 7,385 (+1166.72%)
Mutual labels:  hacktoberfest
Font awesome flutter
The Font Awesome Icon pack available as Flutter Icons
Stars: ✭ 580 (-0.51%)
Mutual labels:  hacktoberfest
Sunpy
SunPy - Python for Solar Physics
Stars: ✭ 577 (-1.03%)
Mutual labels:  hacktoberfest
Jaspy
a Python VM written entirely from scratch in JavaScript with some unique features
Stars: ✭ 577 (-1.03%)
Mutual labels:  interpreter

  



A short introduction

05AB1E is a golfing language. If the name 05AB1E were interpreted as a hexadecimal number and converted to base64, it would result into "Base". I wanted to make a language which has an advantage in base conversion, but now it is more of a general-purpose language. The name 05AB1E can be pronounced in multiple ways, such as 'osabie', 'osable' or even 'usable'.

You can try this language out yourself at: Try it online!. This interpreter is provided by DennisMitchell.

A reference list containing all the commands/functions can be found at Info.txt or at the Commands Wiki page.


What is a golfing language?

A golfing language is a language that specializes in code golf. A code golf competition is a competition in which participants strive to achieve to solve the challenge in as few bytes as possible.


Installation and execution

05AB1E is written in Elixir using the Mix build tool, which comes with Elixir.

Installation

  1. Clone this repository (e.g. with git clone https://github.com/Adriandmen/05AB1E.git).
  2. Install Elixir 1.6.0 or higher using one of the installation options here.
  3. Install the package manager Hex with mix local.hex.

Compilation

  1. Retrieve/update all necessary dependencies using mix deps.get (if necessary).
  2. In the terminal, compile the project using MIX_ENV=prod mix escript.build. On Windows in the command prompt, compile with set "MIX_ENV=prod" && mix escript.build.

Execution

After running the build command, a compiled binary file osabie will be generated. For example, running the file test.abe is done by running:

escript osabie test.abe

Normally, an 05AB1E file ends with .abe, but any other file extension can also be used.

A more official way of running an 05AB1E program is by storing all the input in an inputs file. For example, if the inputs were to be stored in a file named inputs, the following way is the preferred way to run a program:

escript osabie test.abe < inputs

If run without the inputs file, the 05AB1E program reads the input from the command line.


Command-line flags

In addition, you can append the following arguments before running the 05AB1E file:

           Argument            Information
-d or --debug Activates the debug flag. After each command is run, an update will be shown to STDIN with the current command.
--debug-stack Activates the debug flag and will print the current stack as well after each iteration.
--debug-global-env Activates the debug flag and will print the global environment as well after each iteration.
--debug-local-env Activates the debug flag and will print the local environment as well after each iteration.
-c or --osabie Reads the file as a file with a 05AB1E encoding. If this flag is not activated, the file will be read as a normal UTF-8 file.
-t or --time Times the duration of executing the program. Given in seconds.
--no-lazy Disables lazy evaluation where needed. This is done because lazy evaluation can interfere with the way and order how things are printed.

Note that when debugging, the debug logs can become very weird and cluttered due to tail-call optimization and lazy evaluation.


A quick tutorial

The basics

A program in 05AB1E is just like any other program, it is stored in a file and then run with osabie. The interpreter will interpret the given file as 05AB1E code. A very easy to understand program is:

"Hello, World!"

Which can be tried here. This is a normal Hello, World! program. Of course, the last quotation mark is a bit redundant, so we can actually leave that out. The interpreter will automatically complete the string. That means that the following program:

"Hello, World!

is also a valid Hello, World! program.

Stack memory

05AB1E uses a stack memory model. That means that everything will be operated using the stack. For example, if we want to multiply 2 different numbers, let's say 4 and 5, we can do the following in pseudo-stack language:

PUSH 4
PUSH 5
MULTIPLY

After the first two commands, the top two elements of the stack are 4 and 5. The multiply command consumes two elements and produces one in return. So, after the multiply command, the stack only contains the number 20. So, how do we do this in 05AB1E?

To push an integer, just place any arbitrary integer in the progam. For example, if we want to push the number 4, this would be our program:

4

05AB1E will scan the literal up till no more digits are found and pushes that onto the stack. To push a new number, just add another number after the first number, separated by a no-op (like a space). For example:

4 15

This pushes the numbers 4 and 15. To multiply both numbers, just add the multiply command (or any other command from Info.txt):

4 15*

You can try that here. You can see that it outputs 60.

Stack memory - part 2

We now have a basic understanding of the stack model, we can continue to what exactly gets printed. Normally, when nothing is printed, the top of the stack gets printed. In the following example:

1 2 3 4 5

only the number 5 gets printed. If something else gets printed before the program terminates, the top of the stack is not printed automatically anymore.

Now you have a basic understanding of how 05AB1E works! Tutorials will be added soon...


Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].