• Stars
    star
    271
  • Rank 151,717 (Top 3 %)
  • Language
    Java
  • License
    GNU General Publi...
  • Created over 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A functional, flexible and concise Lisp.

KamilaLisp Two: Electric Boogaloo

codecov Java CI with Maven WakaTime GitHub Patreon donate button

A functional, flexible and concise Lisp inspired by Haskell and APL, among others. A ground-up rewrite.

Useful links:

Setup

You need Java17 JDK or newer installed to build KamilaLisp yourself.

git clone https://github.com/kspalaiologos/kamilalisp
cd kamilalisp
mvn package

Alternatively, you could download a pre-compiled JAR file for use with Java 17 or newer:

export VERSION=0.3.0.1
mkdir kamilalisp && cd kamilalisp
# Download the KamilaLisp JAR
curl -L -O https://github.com/kspalaiologos/kamilalisp/releases/download/v$VERSION/kamilalisp-$VERSION.jar
# Verify the signature
curl -L -O https://github.com/kspalaiologos/kamilalisp/releases/download/v$VERSION/kamilalisp-$VERSION.jar.asc
curl https://palaiologos.rocks/pub.pgp | gpg --import # Or alternatively: gpg --recv-keys C868F0B6DE38409D
gpg --verify kamilalisp-$VERSION.jar.asc kamilalisp-$VERSION.jar

Features

KamilaLisp allows for actor programming, concurrent programming, imperative programming, functional programming, array programming, pure functional programming, object-oriented programming, rudimentary logic programming, mathematical programming, backend development, numerical and scientific computation, scripting and system administration, symbolic computation (real and complex analysis), tacit (point-free) programming, concurrent programming and event-driven programming. In more detail:

  • Arbitrary precision complex, integer and decimal arithmetic.
  • A fully-featured, remote IDE capable of communicating with KamilaLisp instances over the network. Supports multiple workspaces, contains an implementation of a hybrid tiling/floating window manager and editors.
  • Many mathematical functions (bernoulli, gamma, trigonometry, arcus functions, hyperbolic functions, inverse hyperbolic functions, FFT, IFFT)
  • Bit operations
  • Number theoretic, combinatoric and linear algebraic functions (permutations, Levi-Civita, etc...)
  • Functional higher order functions (fold, scan, all, none, some, converge, takewhile, dropwhile)
  • Functional parallelism (parallel map and filter)
  • Mu-recursive functions (SML projections, mu-recursive substitution operator).
  • Prototype-based object orientation.
  • No memory side effects, all collections are persistent.
  • Possibilities of writing code in pure functional paradigm.
  • Suffix array and Burrows-Wheeler transform construction.
  • APL-style array processing (grade-up, grade-down, find, range, where, encode, decode, replicate, etc...).
  • APL-style symbols for common operations.
  • Set operations.
  • Read/write support for JSON, CSV, XML, Base64, XZ, gzip, lz4, bzip2, tar and zip.
  • Date and time manipulations.
  • Integrated development environment - supports remote IDE sessions, compressed KamilaLisp code format, project management, multi-workspace and multi-session workflows, broadcasting/synchronising project data among multiple remote sessions.
  • Persistent hashmaps, reactive hashmap literals.
  • PNG, BMP, JPG and JPEG image I/O.
  • File I/O (read, write, append).
  • Basic matrix operations (LU decomposition, transpose, trace, matrix multiplication easily implemented as $(foldl + 0)%[1] \outer-product * A \matrix:transpose A.
  • Performance benchmarks to measure GC time, average, median and standard deviation between runs of various expressions.
  • Module system.
  • Streams
  • Process management (using sh:process) - manipulating input/output streams, etc...
  • HTTP server - supports resource handlers, path handlers, complex routing, cookies, ...
  • SQL database connection, auxiliary database drivers, statements, queries, prepared statements.
  • Symbolic matrix LU decomposition, symbolic determinants.
  • Pattern matching.
  • Memoization.
  • Imperative programming support.
  • Networking (net:fetch, net:wget).
  • Sockets (net:client, net:server and their SSL counterparts).
  • Parallel processing using the actor model (daemon threads, task threads, message passing paradigm).
  • Regular expressions.
  • KamilaLisp as a shell (implementations of sh:ls, sh:glob, sh:mv, sh:basename, etc... - all usable from the REPL and from code, as they return plain data structures, launching and manipulating external processes).
  • String functions (Shannon entropy, unicode handling, byte buffers, levenshtein distance, string interpolation/formatting)
  • On-The-Fly Lexical scanner generation.
  • Function compositions, partial application, variadic functions, static scoping.
  • Tail call optimisation.
  • Limits, complex limits.
  • Indefinite integrals.
  • Differentiation
  • Polynomial factoring.
  • Laurent, Taylor, MacLaurin and Puiseux series expansion.
  • Functional de Bruijn indices.
  • Possibility to write standalone non-interactive scripts.
  • Symbolic matrix operations.
  • Machine word operations (flt64:..., cmplx64:...) - Bessel functions, Hurwitz Zeta, Riemann Zeta, Upper/Lower Incomplete Gamma, Gamma, LogGamma, Pochhammer symbol, erf, erfc, Inverse erf, Inverse erfc, Digamma, Trigamma, Polygamma, Airy Ai, Bessel I, J, K and Y functions, Lerch Phi, Spence's function, Lambert W and Polylogarithm.
  • Prompt styling.
  • Portable.
  • Graph data structure (e.g. directed, acyclic, weighted, etc...).
  • Graph colouring (Saturation degree, greedy, largest degree first, smallest degree last, chordal, refinement, Brown backtrack).
  • Graph clustering (Givman-Newman, k-Spanning tree, label propagation).

Examples

SKI calculus:

; SKI calculus
(defun SKI x
   (match x
      ((((S 'x) 'y) 'z) (tie (tie x z) (tie y z)))
      (((K 'x) 'y) x)
      ((I 'x) x)
      (('x 'y) (tie (SKI x) (SKI y)))
      ('x x)))

converge SKI '(((S I) I) K)

List operations and point-free programming:

; Take numbers from 0 to 9999, sum the resulting list and its reverse,
; then take the amount of unique items, and verify if it equals one.
= 1 \β΄βˆ˜βŠ™βˆ˜[+ #0 ⌽] \⍳ 10000

; In Haskell:
; (==1) . length . nub $ zipWith (+) <$> id <*> reverse $ [0..10000]

; In APL:
; 1=⍴βˆͺ(⊒+⌽)⍳10000

License

KamilaLisp is distributed under the GNU General Public License v3. See LICENSE for details.

Lisp Roadmap

  • MalbolgeLISP v1.0-v1.2 - initial prototypes.
  • KamilaLisp v0.1 (beta) - initial Java prototype, concept exploration.
  • KamilaLisp v0.2 (beta) - design solidifying, API documentation.
  • KamilaLisp v0.3 (release) - polishing more features, improved non-beta versioning scheme.
  • KamilaLisp v0.4 (WIP) - a compiler and bytecode virtual machine.

v0.3 versioning guide

Every KamilaLisp v0.3 release will be signed with PGP and package maintainers are advised to verify the signature. Every release will be tagged as 0.3.x.y where a bump of x signifies a breaking change, while the bump of y signifies a non-breaking change.

More Repositories

1

bzip3

A better and stronger spiritual successor to BZip2.
C
673
star
2

malbolge-lisp

A lightweight (350MB) Lisp interpreter in Malbolge Unshackled, often dubbed the hardest turing complete programming language.
TeX
484
star
3

C-Learning-Resources

Resources for learning C that are the best in my opinion.
116
star
4

asmbf

The only true brainfuck-targetting assembler.
C
108
star
5

qbdiff

building and applying patches to binary files
C
67
star
6

sdlgames

A collection of small games made using SDL and C/++.
C++
23
star
7

tinyz80

A minimal Z80 implementation.
C
21
star
8

A-Programming-Language

An effort to transcribe Ken Iverson's "A Programming Language" book to LaTeX.
TeX
18
star
9

blc-mb

Binary Lambda Calculus evaluation engine written in Malbolge.
C
17
star
10

tiny6502

a small (~140 line) and portable 6502 emulator demo.
Assembly
16
star
11

typeracer

A ncurses-powered typing game
C
16
star
12

modern-rzip

A backup suite. Supports FLZMA2, bzip3, LZ4, Zstandard, LSH i-node ordering deduplicating archiver, long range deduplication, encryption and recovery records
C
15
star
13

Maja

A slick numerics-oriented Mathematical library for Java
Java
15
star
14

tau

a reasonably fast syntax highlighter
C
13
star
15

writings

a single place to collectively store every bit of my writings i deem at least remotely valuable.
TeX
13
star
16

lc-apl

Journey to the Center of the Lambda Calculus
APL
12
star
17

asm2ws

alpha-grade whitespace toolchain
C
11
star
18

lz4huf

An attempt to marry a fast Lempel-Ziv codec (LZ4) with a fast entropy coder (Huff0).
C
10
star
19

ski

a 666-byte, public domain SKI combinator calculus evaluator in C, minsky machines and other stuff
Perl
9
star
20

mblzp

A lightweight (8MB) implementation of the McIlroy-Tamayo Lempel-Ziv variation in Malbolge Unshackled.
C
9
star
21

mri

minecraft region interchange - compressing minecraft savefiles with bzip3.
C
9
star
22

compression

playing with small decompressors and good ratios :)
9
star
23

adler32-sse2

Adler32 implementation used in Alpha64 at ~13GiB/s in a 1 kilobyte binary.
Assembly
8
star
24

ski-windows

a 976-byte, GUI SKI calculus evaluator written in x86 assembly for windows
Assembly
8
star
25

nonalphanumeric-c

A compiler targetting a subset of C which doesn't use letters nor numbers.
C
8
star
26

cosmopolitan-sk

SK calculus reducer in as many programming languages as possible.
TSQL
7
star
27

elfdude

a small & primitive elf32 packer.
Assembly
7
star
28

rezip

Turn any archive format supported by libarchive into an uncompressed zip file for better archiving purposes.
C
6
star
29

cursed-asm

Use AT&T syntax on even lines and Intel syntax on odd lines
Assembly
6
star
30

LambdaCalculus

Dead simple implementation of Lambda Calculus.
C
6
star
31

dirac

Delightfully Intricate Reasonably Amazing Calculator
C
6
star
32

aoc2023

Advent Of Code 2023 in APL, Haskell and C.
Haskell
6
star
33

recreational

My submissions for Code guessing, Code golf and other recreational programming things.
C
6
star
34

b2all

Collection of brainfuck-to-anything compilers in brainfuck.
Brainfuck
6
star
35

dev-urandom

An assortment of random programs that serve random purposes.
C++
6
star
36

MacroLogger

Simple C logging library utilizing only C89 preprocessor and standard library. It's possible to turn on ANSI colors and GNU preprocessor extensions (and they are by default)).
C
6
star
37

esofun

esofun is an array, imperative, procedural and functional language mix.
C++
5
star
38

euler-apl

project euler solved in APL
APL
5
star
39

apl-misc-math

Miscellaneous mathematical and numerical utilities in APL.
APL
5
star
40

x86lisp

2158 byte Lisp interpreter for Windows.
5
star
41

cask

An alternative way to package Java applications.
Java
4
star
42

e8e9

A command-line wrapper for Shelwien's e8e9 algorithm.
C
4
star
43

dx

Domain eXtensions for Dyalog APL
APL
3
star
44

elf-infection

Source code for https://palaiologos.rocks/essays/posts/elf-infection/
Assembly
3
star
45

snakes

A KoTH programming game host for the Esolangs Discord server.
C
3
star
46

apl-logic

Logic gate system emulation in APL.
APL
3
star
47

apio

a very good and not bad c++ utility library.
C++
3
star
48

constant-overhead

Measuring constant overhead of various programming languages.
C
3
star
49

yarg

Yet another UNIX-like argument parser for C. CC0-licensed.
C
2
star
50

Proton

Proton is toolkit for desktop app creation in ActionScript3
AutoIt
2
star
51

dyalog-hs

Dyalog APL Competition solved with Haskell.
Haskell
2
star
52

yaspell

Yet Another Spellchecker. WIP.
Shell
2
star
53

sublime-v2

sublime: an asm2bf execution bot written in typescript
Perl
2
star
54

rust-jni-template

A template for developing JNI libraries using the Rust programming language
Java
2
star
55

euler

Project Euler solved in Brainfuck.
Brainfuck
2
star
56

kspalaiologos

Github description, I guess.
2
star
57

Chess.fl

Chess.fl is simple Flash library for managing chessboards.
ActionScript
1
star
58

minits

a crude testing platform used by malbolgelisp ca. August of 2021, preserved for historical reasons.
TypeScript
1
star
59

TinyURL-Shortener

TinyURL frontend script written in Bash. Requires cURL to be installed on target machine.
Shell
1
star
60

dotfiles

A stripped down version of my dotfiles hopefully suitable for use by others.
Shell
1
star
61

ILoCore-Release

Binaries of ILoCore Minecraft 1.14 plugin.
1
star
62

Chemal

The chemical balancer
ActionScript
1
star
63

code-guessing-backend

a (yet incomplete), fully automated code guessing automation platform.
Shell
1
star
64

namechanger

simple bash script to replace one pattern with another for each of your github repositories
Shell
1
star
65

sdlmine

A SDL2 minesweeper in 1000 lines of code.
C
1
star
66

sdlreversi

A reversi/othello game under 500 lines of C++ code.
C++
1
star
67

MANIAC-2

Replica of the first computer to beat human in a chess-like game.
C
1
star
68

ctlsh

A C port of the Trend Micro Locality Sensitive Hashing library.
C
1
star
69

ppmdj1

A Github mirror of Dymitry Shkarin's PPMd var. J
C++
1
star
70

xpar

an error/erasure code system guarding data integrity
C
1
star
71

kcrypt2

a proof-of-concept for cryptographic systems based on polynomial reconstruction.
C
1
star