GithubHelp home page GithubHelp logo

cforster / jscl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jscl-project/jscl

0.0 2.0 0.0 4.71 MB

A Lisp-to-Javascript compiler bootstrapped from Common Lisp

Home Page: http://davazp.net/jscl/jscl.html

License: GNU General Public License v3.0

HTML 0.28% Common Lisp 89.34% Shell 0.10% JavaScript 1.40% CSS 0.32% NewLisp 8.56%

jscl's Introduction

JSCL

JSCL is a Common Lisp to Javascript compiler, which is bootstrapped from Common Lisp and executed from the browser.

Getting started

You can try a demo here. But if you want to hack JSCL, you will have to download the repository

git clone [email protected]:davazp/jscl.git

load jscl.lisp in your Lisp, and call the bootstrap function to compile the implementation itself:

(jscl:bootstrap)

It will generate a jscl.js file in the top of the source tree. Now you can open JSCL.html in your browser and use it.

Status

JSCL is and will be a subset of Common Lisp. Of course it is far from complete, but it supports partially most common special operators, functions and macros. In particular:

  • Multiple values
  • Explicit control tranfers (tagbody and go)
  • Static and dynamic non local exit (catch, throw; block, return-from).
  • Lexical and special variables. However, declare expressions are missing, but you can proclaim special variables.
  • Optional and keyword arguments
  • SETF places
  • Packages

The compiler is very verbose, some simple optimizations or minification could help to deal with it.

Most of the above features are incomplete. It is not so bad because so the compiler is not too heavy, but it would be great if we were just enough compliant to include a loop implementation, a format implementation, or even CLOS or non-CLOS OOP.

Feel free to hack it yourself

jscl's People

Contributors

davazp avatar orodley avatar ferada avatar abeaumont avatar kidd avatar kengruven avatar samebchase avatar rayslava avatar nikodemus avatar jnjcc avatar cforster avatar billstclair avatar kingcons avatar henryirvine avatar mishoo avatar stylewarning avatar maxwellhansen avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.