All Projects → bullno1 → lip

bullno1 / lip

Licence: BSD-2-Clause license
An embeddable LISP in C99

Programming Languages

c
50402 projects - #5 most used programming language
python
139335 projects - #7 most used programming language
javascript
184084 projects - #8 most used programming language
C++
36643 projects - #6 most used programming language
Nu
17 projects
lua
6591 projects

Projects that are alternatives of or similar to lip

mima
MIninmal MAchine Assembler and Simulator
Stars: ✭ 19 (+18.75%)
Mutual labels:  virtual-machine
uvmm
Virtual machine monitor for L4Re
Stars: ✭ 22 (+37.5%)
Mutual labels:  virtual-machine
ugo
Script Language for Go
Stars: ✭ 75 (+368.75%)
Mutual labels:  virtual-machine
clover2
Clover2 can be used as shell. The completion is powerfull like IDE. Also clover2 is a Ruby-like compiler language with static type like Java. This is high performnace. Please see the wiki for details
Stars: ✭ 100 (+525%)
Mutual labels:  virtual-machine
ubuntu-vnc-xfce-chromium
Retired. Headless Ubuntu/Xfce container with VNC/noVNC and Chromium (Generation 1)
Stars: ✭ 20 (+25%)
Mutual labels:  virtual-machine
Arduino-FVM
Byte Token Threaded Forth Virtual Machine (FVM) for Arduino
Stars: ✭ 35 (+118.75%)
Mutual labels:  virtual-machine
Arduino-Shell
RPN Postscript/Forth Command Shell for Arduino
Stars: ✭ 19 (+18.75%)
Mutual labels:  virtual-machine
vmSafeguard
vmSafeguard is a management, planning, backup system for a Vmware ESXi(s) solution, orchestrated through a Web Admin Panel. RTFM for more info. Under develop since Jun 2020
Stars: ✭ 20 (+25%)
Mutual labels:  virtual-machine
ol
Otus Lisp (Ol in short) is a purely* functional dialect of Lisp.
Stars: ✭ 157 (+881.25%)
Mutual labels:  virtual-machine
wasm-joey
Serverless Wasm - A lightweight Node.js application for deploying and executing WebAssembly(Wasm) binary-code via HTTP
Stars: ✭ 48 (+200%)
Mutual labels:  virtual-machine
VPS
Script and resources to install VitalPBX on VPS Machines
Stars: ✭ 21 (+31.25%)
Mutual labels:  virtual-machine
leema
A functional programming language designed for concurrency and failure
Stars: ✭ 43 (+168.75%)
Mutual labels:  virtual-machine
jMiniLang
用Kotlin实现的编译器和虚拟机,并在此基础上构建操作系统。
Stars: ✭ 62 (+287.5%)
Mutual labels:  virtual-machine
ThreatPursuit-VM
Threat Pursuit Virtual Machine (VM): A fully customizable, open-sourced Windows-based distribution focused on threat intelligence analysis and hunting designed for intel and malware analysts as well as threat hunters to get up and running quickly.
Stars: ✭ 1,033 (+6356.25%)
Mutual labels:  virtual-machine
qubes-video-companion
Securely stream webcams and share screens across virtual machines *THIS PROJECT IS CURRENTLY STILL IN DEVELOPMENT (Mostly finishing switch to MJPEG for big performance boost; see FAQ)*
Stars: ✭ 38 (+137.5%)
Mutual labels:  virtual-machine
minima
A fast, byte-code interpreted language
Stars: ✭ 43 (+168.75%)
Mutual labels:  virtual-machine
wiser
🐎 Extremely minimal vmm for linux written in C. Hopefully someday will spin linux-vm for you.
Stars: ✭ 249 (+1456.25%)
Mutual labels:  virtual-machine
nautilus
Nautilus Aerokernel
Stars: ✭ 30 (+87.5%)
Mutual labels:  virtual-machine
blacklight
a stack-based concatenative virtual machine for implementing highly concurrent languages
Stars: ✭ 42 (+162.5%)
Mutual labels:  virtual-machine
Plotty
C language compiler from scratch for a custom architecture, with virtual machine and all
Stars: ✭ 33 (+106.25%)
Mutual labels:  virtual-machine

lip - An embeddable LISP

License Travis CI Status AppVeyor CI Status Coverage Status

lip is my own implementation of a LISP language, designed to be embedded in a host program (similar to Lua). It is written using C99.

Currently, lip is still under heavy development.

How to build

Using the provided scripts

An Unix environment, Python and a modern C99 compiler is required. From the project folder, run: ./numake bin/lip and an interpreter will be created at bin/lip.

numake is my own custom build tool: https://github.com/bullno1/numake

./watch bin/lip will watch all dependencies of bin/lip and rebuild if needed.

Using Visual Studio 2015

Visual Studio 2015 is the only Visual Studio version that has proper C99 supports, anything earlier probably will not work. Run vs2015.bat and a solution will be created in the vs2015 folder.

Using GENie

GENie is a project generator for XCode, Visual Studio and Makefile. Run it on genie.lua to create a project for your tool.

What works currently

  • The interpreter can execute simple scripts (see benchmark). To run a script: bin/lip benchmark/fib.lip. Run bin/lip --help for some options.
  • The current speed is slightly slower than that of interpreted Lua.
  • A simple interface to bind C functions to the runtime: include/lip/bind.h (see src/lip/builtins.c, for example).

What is planned?

  • A simple error handling system similar to Lua's pcall/error. This means no polymorphic exception nonsense. Exception should only be used for panic cases.
  • A module/package system similar to that of Common Lisp or Clojure.
  • A minimal standard library.

Why another language?

Lua is one of the best embeddable scripting language available, however there are a few parts I am not happy with:

  • Treatment of globals: They are silently treated as nil and cause problems much later when used. It is possible to setup metatables such that they throw errors but the erroneous code still have to be executed. In lip, undefined globals would be an error at load-time or compile-time.
  • Lack of typing: Even in a dynamic environment, type checking techniques can still be used.
  • Macros: I am not a big fan of macros but macros are good for building DSLs. Having used Lua for data declaration, I like its syntactic sugar for unary function with strings and table (i.e: the parentheses can be omitted: func "str arg" or func {key = value}). However, its anonymous function syntax is too verbose: function(arg1, arg2) boyd end. Good macro support will make DSLs much nicer.
  • Garbage collector: It has become a problem in multiple projects. Sometimes, it's because GC pauses for too long. Sometimes, it's because developer forgot to mark objects (and it's not easy with Lua). This is my chance to experiment with two ideas:
    1. A scripting language and runtime for game development that does not use garbage collection. Details will be revealed later.
    2. Pluggable garbage collection: There can be several type of GC: incremental, stop-the-world or just reference counting. An developer can choose which fits a project the most. Of course, programs written will have to take the plugged GC into account (e.g: you cannot create cycle in a reference counting collector).

There are also areas I want to experiment with:

  • Hackable runtime for scripting languages: Many scripting languages such as Lua does not expose its underlying infrastructure enough for language hackers. To target the Lua VM, one would have to read a document written by a third-party. Making languages which compile to Lua but have line information and source name map nicely to the source language for ease of debugging is a challenging task There is no simple way to access Lua's compiler or AST. lip is designed to be modular and hackable from the start. There is API (albeit undocumented for now) for codegen, ast, parser and compiler. In fact, every part of it can be used independently (e.g: one can use lip's sexp parser to build their own language in their own runtime or parse their own language and generate corresponding s-expressions to feed into lip's compiler).
  • Type system: Even in a dynamic environment, there are several type inference and checking techniques that can improve performances (by removing type checks) and improve correctness (by catching error at compile-time instead of runtime). lip is an attempt to explore type system in an embedded and dynamic environment.
  • Hot code reloading: Among one of the many things which GOAL is famous for is its ability to reload code on-the-fly. This feature can already be simulated in many current scripting languages. However, I want to experiment with a runtime where this is designed as as a first-class feature. Erlang is a language where this is a central design.

Building lip is also an exercise in language design and implementation as well as type system. Choosing C99 instead of other languages means I could immediately use it in many of my own projects as find about the language's strength and weaknesses.

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].