a statically-typed concatenative programming language inspired by sml/cat
Clone or download
broomweed delete old 2fork; dfork → 2fork
old 2fork was just the same as 'bi' plus not quoting the third thing...
this 2fork is the actual J dyadic fork
Latest commit 443807b Jul 27, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples delete old 2fork; dfork → 2fork Jul 27, 2018
lib delete old 2fork; dfork → 2fork Jul 27, 2018
old fix a memory bug in while* Mar 29, 2018
projecteuler delete old 2fork; dfork → 2fork Jul 27, 2018
tests for syntax extensibility/consistency, actually require 'func' Jul 11, 2018
.gitignore ignore lex.h actually Apr 5, 2018
.travis.yml
Makefile Basic imports. Jul 19, 2018
README.md update readme to remove stdlib garbage at top Jul 17, 2018
alma.c Import stdlib into library scope, not scope of first module. Jul 26, 2018
alma.h now can import files by string name Jul 26, 2018
almalogo.png betterify logo Mar 21, 2018
almalogo.svg
ast.c print functions imported in interactive mode Jul 25, 2018
ast.h parse imports (don't actually resolve them yet) Jul 18, 2018
compile.c importing entire modules with a prefix now works Jul 25, 2018
compile.h Basic imports. Jul 19, 2018
eval.c do a bunch more work converting to postfix Jun 11, 2018
eval.h begin adding list support Apr 1, 2018
import.c now can import files by string name Jul 26, 2018
import.h now can import files by string name Jul 26, 2018
lexer.l
lib.c interactive mode!!! Apr 6, 2018
lib.h interactive mode!!! Apr 6, 2018
lib_control.c start making it postfix Jun 9, 2018
lib_func.c syntax change! Jun 8, 2018
lib_list.c
lib_op.c Start adding project euler solutions; use longs instead of ints Jul 19, 2018
lib_stack.c add 'rot' stack shuffler Jun 22, 2018
list.c add basic test, fix error message Jun 11, 2018
list.h do a bunch more work converting to postfix Jun 11, 2018
parse.c allow imports to not necessarily end with a newline Jul 26, 2018
parse.h Start adding project euler solutions; use longs instead of ints Jul 19, 2018
registry.c Standard library file added: lib/std.alma Jul 17, 2018
registry.h
scope.c Importing specific words from modules. Jul 25, 2018
scope.h
stack.c
stack.h changes to memory management Mar 27, 2018
symbols.c allow printing vals to arbitrary filehandles wow Apr 2, 2018
symbols.h allow printing vals to arbitrary filehandles wow Apr 2, 2018
test.c Basic imports. Jul 19, 2018
ustrings.c now can import files by string name Jul 26, 2018
ustrings.h now can import files by string name Jul 26, 2018
uthash.h and now the new files take center stage... Mar 19, 2018
value.c Start adding project euler solutions; use longs instead of ints Jul 19, 2018
value.h Start adding project euler solutions; use longs instead of ints Jul 19, 2018
vars.c
vars.h Fix #3 Mar 30, 2018

README.md

Alma Build Status

Alma is a statically-typed, stack-based, functional programming language heavily inspired by Forth, Standard ML, and the language Cat created by Christopher Diggins.

Note: I'm still getting around to rewriting the type system for the new version! A lot of things don't work yet.

Simple examples

func main [ "Hello world!" say ]

This program prints "Hello world!" to the console, followed by a newline.

func comp sort-one [
    shift -> first
    [first append]
    if: [first comp apply] [2dip] [dip]
]

func comp partition [
    [{} {}] dip
    while*: [empty not] [comp sort-one]
    drop
]

func quicksort [
    when*: [small not] [
        shift -> pivot
        [pivot <] partition
        [quicksort pivot append] [quicksort] bi ++
    ]
]

This implements the famous quicksort algorithm.

Check out the examples/ directory for a few more examples.