Skip to main content

# Flang

A stack-based programming language for teaching basic concepts.

—

Flang is an overly-simple programming language.

It’s intended for teaching, but isn’t quite complete yet.

For now, this is the feature list.

  • [X] Number type: Int

  • [X] Number type: Float

  • [ ] Number type: Rational

  • [X] Function type

  • [X] String type (UTF-8)

  • [X] Human-readable error messages, designed for beginners.

  • [-] As much parse-time safety as is possible.

  • [ ] Loops? (This may not happen, as we can push functions to the stack)

  • [ ] Conditionals

  • [ ] Swap function, to rearrange the stack

  • [ ] Slice function, to more easily rearrange large parts of the stack

  • [X] Print function, including using special characters inside strings

  • [X] Print/literal function, not including using special characters inside strings

  • [X] Print/stack function, for displaying the stack

  • [X] Exit function

  • [X] Reset function, to set the stack back to nothing

  • [X] Reverse function, to rearrange the stack

  • [X] Push function, for placing typed objects on the stack

  • [X] Add function, for mathematics or combining strings

  • [X] Take function, for mathematics

  • [X] Times function, for mathematics

  • [X] Divide function, for mathematics

  • [X] Pop function, for executing functions on the stack

  • [X] Peek function, for executing functions on the stack

  • [X] Drop function, for not executing functions on the stack

  • [X] Read-Eval-Print-Loop

  • [X] Ability to execute a file

  • [X] Comments. Can be nested.

  • [ ] User functions.

  • [ ] String Library for working with strings.

  • [ ] Help function

  • [ ] Interactive Tutorial function

  • [ ] Documentation

## Decisions to make:

  • [ ] Case insensitivity. Should Flang be case-sensitive or not?

  • [X] Indexing. Flang will be 1-indexed, to make new adoption easier.

  • [ ] User Functions. What kind of shape should these take? How could they be written?

  • [ ] Hash Table Type. Do we need it? How would it be used?

  • [ ] Mini-Stack Type. Do we need it? How would it be used? (Think Linked-List)

  • [ ] A library of tools for strings is needed. But, it needs to be defined.

  • [ ] Semantic Versioning. What API will be covered by semver?

—

## Install

Don’t.

This is alpha-software, and breaking is going to happen a lot.

The documentation that is vitally needed, isn’t anywhere near ready for the public.

Right… So, if you’re insisting on ignoring all that:

The latest release can be installed via pip:

pip install flang

Or, you can install from the git repository to get all the very latest changes:

git clone https://gitlab.com/shakna-israel/flang.git cd flang python3 setup.py install

—

## Usage

You can explore Flang in two ways:

If you have a file filled with Flang commands:

flang filename

Or, you can enter the interactive Read-Evaluate-Print Loop:

flang repl

Metadata

Release files for flang 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for flang 0.1.1
File Interpreter ABI Platform
flang-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / flang-0.1.1-py3-none-any.whl

Download URL flang-0.1.1-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0fdd55d9ffdd155d58efb26152e0d42cb6d2df87a4ce771b1a2e7625fd25bab
BLAKE2b-256 checksum
How to use checksums
43f62feea033bf92ae19e0a6fab9dae0260f34ec3351a7f3c72573fdf0a8e934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

0.0.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page