Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toots merge master march2017 #69

Open
wants to merge 51 commits into
base: toots
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e490ea0
Include symbolics version of MIT Loop
davazp Oct 30, 2016
2ad06ba
Load the loop file
davazp Oct 30, 2016
46d2b94
Comment all the file
davazp Oct 30, 2016
ae6761d
Remove reader conditionals that make the compiler fail
davazp Oct 30, 2016
424c7da
Uncomment code
davazp Oct 30, 2016
0067ed9
Comment some check-types
davazp Oct 31, 2016
1aceb7a
The whole loop implementation loads now without errors
davazp Oct 31, 2016
57c7118
Remove extra paren
davazp Oct 31, 2016
bd29892
Don't bind special variables as argument
davazp Oct 31, 2016
d7a1752
Disable a couple of declarations
davazp Oct 31, 2016
6a1c920
Remove subtypep usage
davazp Oct 31, 2016
48e408c
Replace &aux variable with let binding
davazp Oct 31, 2016
9a07eea
Disable usage of TYPEP function
davazp Oct 31, 2016
8695996
Disable some declarations
davazp Oct 31, 2016
c1309e3
Replace &environment keywords with jscl-specific internals
davazp Oct 31, 2016
093294c
Move loop implementation to jscl/loop package
davazp Nov 4, 2016
dcdd0fc
Define SPECIAL-OPERATOR-P function
davazp Nov 4, 2016
60ac03b
Don't redefine loop if not running on jscl
davazp Nov 4, 2016
183d1ce
Comment type checking
davazp Nov 4, 2016
2e6ebe8
Fix loop sum/count clauses
davazp Nov 4, 2016
98eb02e
Use jsco internal !MACROEXPAND instead of CL:MACROEXPAND
davazp Nov 6, 2016
1baa9c1
Try to test loop
davazp Nov 4, 2016
58ccdc3
Remove old implementatio of the endless loop case
davazp Nov 6, 2016
f3d8991
Don't use &aux "arguments"
davazp Nov 6, 2016
c95d1d5
Notify the loading of documentation.lisp
davazp Nov 6, 2016
e4b454d
Name correctly functions from packages other than JSCL
davazp Nov 6, 2016
7435e51
WIP: Testing LOOP
davazp Nov 6, 2016
1b087c1
Uncomment many more passing tests
davazp Nov 6, 2016
bae1ca0
Expose LOOP-FINISH macro
davazp Nov 6, 2016
8c78f40
Fix exit status code
davazp Nov 6, 2016
1243e7c
Fix failing test
davazp Nov 6, 2016
600aaf9
Merge pull request #257 from jscl-project/loop-testing
davazp Nov 6, 2016
c9dc0c7
Define MOST-POSITIVE-FIXNUM and MOST-NEGATIVE-FIXNUM
davazp Nov 6, 2016
c0b8244
Uncomment a couple of fixed tests for loop: maximizing/minimizing
davazp Nov 6, 2016
707b680
Load loop a bit earlier
davazp Nov 6, 2016
47d1057
Merge pull request #253 from jscl-project/loop
davazp Nov 6, 2016
f99208d
Update README.md to mention LOOP as implemented
davazp Nov 6, 2016
81c719c
Increase version
davazp Nov 6, 2016
d5ed45e
Mention the jscl npm package
davazp Nov 6, 2016
5c8f115
Update package.json
davazp Nov 6, 2016
453ef09
Update patch version
davazp Nov 6, 2016
0871cc4
Move time functions to misc.lisp
davazp Nov 6, 2016
d00c4d4
Add CHANGELOG.md file
davazp Nov 8, 2016
417668d
Link 0.5.1 version to the diff
davazp Nov 8, 2016
8614dae
Add an extra author mapping
davazp Jan 26, 2017
4f38570
Fix FBOUNDP function (#270)
davazp Mar 22, 2017
c61da94
Remove the failure expectation from the let* tests
davazp Mar 25, 2017
aa9b73a
Backport the fix to the compilation of LET*
davazp Mar 25, 2017
c484988
Add JSCL logo (#274)
davazp Apr 30, 2017
03aa822
merge
brpocock May 4, 2017
44d5392
merge
brpocock May 4, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
# Backup/editor temp files
*~
*#
.#*

# FASL files (various flavours)
*.fasl
*.fas
*.lx64fsl

# Generated files
/jscl.js
/tests.js
/jscl-repl
/repl-web.js
doc/*

# Log files
*.log

# ??
*.lib
\#*
jscl.js
tests.js
.tmp/

/repl-node.js
/repl-web.js
# Git/patch junk files
*.orig

# Emacs files
.emacs.desktop
TAGS


3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "ansi-test"]
path = ansi-test
url = https://gitlab.common-lisp.net/ansi-test/ansi-test.git
11 changes: 11 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ David Vázquez <davazp@gmail.com> David <davazp@debian>
David Vázquez <davazp@gmail.com> David Vázquez <davazp@Portatil.(none)>
David Vázquez <davazp@gmail.com> David Vázquez <davidv@eyecarepro.net>
David Vázquez <davazp@gmail.com> David Vazquez <Dvazquezpua@deloitte.nl>
David Vázquez <davazp@gmail.com> David Vázquez <davazp@debian>
David Vázquez <davazp@gmail.com> David Vázquez <davazp@gmail.com>
David Vázquez <davazp@gmail.com> David Vázquez <davazp@Portatil.(none)>
David Vázquez <davazp@gmail.com> David Vázquez <davidv@eyecarepro.net>
David Vázquez <davazp@gmail.com> David Vázquez <Dvazquezpua@deloitte.nl>
David Vázquez <davazp@gmail.com> David Vazquez Pua <dvazquezpua@deloitte.nl>
Raimon Grau <raimonster@gmail.com> Raimon Grau <raimon@3scale.net>
Owen Rodley <owen.rodley@gmail.com> Strigoides <Strigoides@gmail.com>
Owen Rodley <owen.rodley@gmail.com> Owen Rodley <strigoides@gmail.com>
Owen Rodley <owen.rodley@gmail.com> Owen Rodley <strigoides@gmail.com>
Owen Rodley <owen.rodley@gmail.com> Owen Rodley <Strigoides@gmail.com>
pnathan <pnathan@vandals.uidaho.edu> pdn <pnathan@vandals.uidaho.edu>
Bruce-Robert Fenn Pocock <brfennpocock@star-hope.org> BRPocock <brpocock@star-hope.org>
Bruce-Robert Fenn Pocock <brfennpocock@star-hope.org> BR. Fenn Pocock <brfennpocock@star-hope.org>
Bruce-Robert Fenn Pocock <brfennpocock@star-hope.org> Bruce-Robert Fenn Pocock <brpocock@star-hope.org>
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ install:
- curl -L https://github.com/luismbo/cl-travis/raw/master/install.sh | sh

script:
- ./make.sh
- ./run-tests.sh
- make
- make test

addons:
srcclr: true
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Change Log
All notable changes to JSCL will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- This CHANGELOG.md file

### Changed

### Fixed

## [0.5.1] - 2016-11-06
### Added
- Implement the [LOOP](https://github.com/jscl-project/jscl/pull/253) macro

[Unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.5.1...HEAD
[0.5.1]: https://github.com/jscl-project/jscl/compare/v0.4.0...v0.5.1
674 changes: 674 additions & 0 deletions COPYING.GPLv3

Large diffs are not rendered by default.

137 changes: 137 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Makefile for JSCL
# Most interesting targets: all, test, doc, clean
all: jscl.js tests.js jscl-repl repl-web.js

BRANCH=$(shell git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/')

# Eventually, this should build with other compilers; so it's good to start
# building the infrastructure for that time, even if the code is far from
# ready for it.
LISP ?= sbcl


# Defaults for many Lisps. Override below
LISPFLAGS=
LISPLOAD=--load # trailing space
LISPEVAL=--eval # trailing space

ifeq ($(LISP),sbcl)
LISPFLAGS=--non-interactive
endif

ifeq ($(LISP),ccl) # Clozure
LISPFLAGS=--batch
endif

ifeq ($(LISP),ecl)
LISPFLAGS=-q
LISPLOAD=-load # trailing space
LISPEVAL=-eval # trailing space
endif

ifeq ($(LISP),clisp)
LISPFLAGS=-on-error exit -ansi -q
LISPLOAD= #empty
LISPEVAL= #empty
endif

ifeq ($(LISP),alisp) # Allegro CL
LISPLOAD=-L # trailing space
LISPEVAL=-e # trailing space
endif

ifeq ($(LISP),gcl)
LISPFLAGS=-batch
LISPLOAD=-load # trailing space
LISPEVAL=-eval # trailing space
endif

ifeq ($(BRANCH),master)
ALT_BRANCH=/$(BRANCH)
else
ALT_BRANCH=
endif


ALL_LISP=$(shell find . -name \*.lisp -and -not -name .\*)

# This relies upon a rigid formatting of the JSON file, which is also
# used when building JSCL.
VERSION=$(shell grep "version" package.json|cut -d '"' -f4)$(ALT_BRANCH)

clean:
-rm -f jscl.js tests.js jscl-repl repl-web.js
-find . -name \*.fasl -or -name \*.fas -or -name \*.lx64fas \
-exec rm -f {} \;
-(cd ansi-test; git reset --hard; git clean -f -d)
-rm -r doc/*
-mkdir -p doc

jscl.js: $(ALL_LISP)
$(LISP) $(LISPFLAGS) $(LISPLOAD)jscl.lisp \
$(LISPEVAL)'(jscl/bootstrap::load-jscl)' \
$(LISPEVAL)'(jscl/bootstrap::bootstrap-core t)' 2>&1 |tee jscl.js.build.log

tests.js: $(ALL_LISP)
$(LISP) $(LISPFLAGS) $(LISPLOAD)jscl.lisp \
$(LISPEVAL)'(jscl/bootstrap::load-jscl)' \
$(LISPEVAL)'(jscl/bootstrap::bootstrap-core)' \
$(LISPEVAL)'(jscl/bootstrap::compile-test-suite)' 2>&1 |tee tests.js.build.log

jscl-repl: $(ALL_LISP)
$(LISP) $(LISPFLAGS) $(LISPLOAD)jscl.lisp \
$(LISPEVAL)'(jscl/bootstrap::load-jscl)' \
$(LISPEVAL)'(jscl/bootstrap::bootstrap)' \
$(LISPEVAL)'(jscl/bootstrap::compile-node-repl)' 2>&1 |tee jscl-repl.build.log

repl-web.js: $(ALL_LISP)
$(LISP) $(LISPFLAGS) $(LISPLOAD)jscl.lisp \
$(LISPEVAL)'(jscl/bootstrap::bootstrap)' \
$(LISPEVAL)'(jscl/bootstrap::compile-web-repl)' 2>&1 |tee repl-web.js.build.log

test: jscl.js tests.js
$(shell find tests ansi-test \
-\( -name \*.lisp -or -name \*.lsp -\) \
-and -not -name .\*) \
.ansi-patched
$(LISP) $(LISPFLAGS) $(LISPLOAD)jscl.lisp \
$(LISPEVAL)'(jscl/bootstrap::load-jscl)' \
$(LISPEVAL)'(jscl/bootstrap::bootstrap-core)' \
$(LISPEVAL)'(jscl/bootstrap::run-tests-in-host)' 2>&1 |tee test.log
node tests.js

doc: doc/jscl.pdf doc/jscl.html.d/index.html

doc/jscl.texi: $(ALL_LISP) doc-intro.texi doc-conclusion.texi
$(LISP) $(LISPFLAGS) \
$(LISPEVAL)'(ql:quickload :net.didierverna.declt)' \
$(LISPEVAL)'(ql:quickload :alexandria)' \
$(LISPLOAD)'write-docs.lisp' \
$(LISPEVAL)'(jscl/doc:write-docs)' 2>&1 | tee doc.build.log

doc/jscl.html.d/index.html: doc/jscl.texi
cp doc.css doc/
cd doc; makeinfo -o jscl.html.d/ \
--html --css-include=doc.css \
--split=node jscl.texi

doc/jscl.ps: doc/jscl.texi
cd doc; makeinfo --ps -o jscl.ps jscl.texi

doc/jscl.pdf: doc/jscl.texi
cd doc; makeinfo --pdf -o jscl.pdf jscl.texi

doc/jscl.txt: doc/jscl.texi
cd doc; makeinfo --plaintext -o jscl.txt jscl.texi

doc/jscl.info: doc/jscl.texi
cd doc; makeinfo -o jscl.info jscl.texi


.ansi-patched: ansi-test.patch
-patch --forward --backup -d ansi-test < ansi-test.patch
touch .ansi-patched

TAGS: $(shell find . -name \*.lisp)
ctags --languages=lisp -e -R -f TAGS

86 changes: 70 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,70 @@
# JSCL [![Build Status](https://travis-ci.org/jscl-project/jscl.svg?branch=master)](https://travis-ci.org/jscl-project/jscl)
# JSCL

[![Build Status](https://travis-ci.org/jscl-project/jscl.svg?branch=master)](https://travis-ci.org/jscl-project/jscl)

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

<p align="center">
<a href="https://jscl-project.github.io/">
<img src="logo/logo-128.png" alt="JSCL" title="JSCL" height="128" />
</a>
</p>


## Getting Started

You can try a demo [here](https://jscl-project.github.io/). But if
you want to hack JSCL, you will have to download the repository
You can try a demo online [here](https://jscl-project.github.io/), or
you can install the JSCL npm package:

npm install -g jscl

to run `jscl-repl` in NodeJS.


## Build

If you want to hack JSCL, you will have to download the repository

git clone https://github.com/jscl-project/jscl.git

*load* `jscl.lisp` in your Lisp, and call the bootstrap function to
to run `jscl-repl` in NodeJS.

This is the upstream version. Ours — Romance Ⅱ version — is hacked
a bit. We are currently aiming to stabilize a lot of things in time for

As I write this, in 2017, that experimental branch is being
finalized still. the end of 2016 for Violet Volts' purposes and then
things should begin to get more in sync with upstream.

## Build

If you want to hack JSCL, you will have to download the repository

git clone https://github.com/romance-ii/jscl.git

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

(jscl:bootstrap)
(jscl/bootstrap::load-jscl)
(jscl/bootstrap::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, or run jscl-repl with
Node.js from the shell.

You can build also with

make

This will probably only work in SBCL for now.

We also export

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.
(jscl/bootstrap:bootstrap-core)

if you don't care to build the REPLs. This will produce a jscl.js but
not the Web or Node REPLs.

## Status

Expand All @@ -26,7 +74,7 @@ functions and macros. In particular:

- Multiple values

- Explicit control tranfers
- Explicit control transfers
[tagbody](http://www.lispworks.com/documentation/HyperSpec/Body/s_tagbod.htm)
and [go](http://www.lispworks.com/documentation/HyperSpec/Body/s_go.htm)

Expand All @@ -36,28 +84,34 @@ functions and macros. In particular:
[return-from](http://www.lispworks.com/documentation/HyperSpec/Body/s_ret_fr.htm).

- Lexical and special variables. However, declare expressions are
missing, but you can *proclaim* special variables.
not actually supported, but you can *proclaim* special variables.

- Optional and keyword arguments

- SETF places

- Packages

- Others
- The `LOOP` macro

The compiler is very verbose, some simple optimizations or
*minification* could help to deal with it.
- The `FORMAT` function

Most of the above features are incomplete. The major features that are still missing are:
- Others

- The `format` function
The compiler is very verbose, some simple optimizations or minification
could help to deal with it. We are working to ensure that Google's
Closure Compiler can be used to post-process it safely, although
CL-Uglify and Yahoo Uglify are both being observed.

- A loop implementation
(http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/code/iter/loop/mit/0.html)
Most of the above features are incomplete. The major features that are
still missing are:

- CLOS
(http://www.cs.cmu.edu/afs/cs/project/ai-repository/ai/lang/lisp/oop/0.html)

- Proper condition system

- Gray streams and generally useful stream and file I/O functions

*Feel free to hack it yourself*

1 change: 1 addition & 0 deletions ansi-test
Submodule ansi-test added at 6121cc
13 changes: 13 additions & 0 deletions ansi-test.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/gclload1.lsp b/gclload1.lsp
index fef7cef..fa34186 100644
--- a/gclload1.lsp
+++ b/gclload1.lsp
@@ -16,7 +16,7 @@

;;; Configure logical pathnames
(setf (logical-pathname-translations "ansi-tests")
- `(("aux;*.*" ,(merge-pathnames
+ `(("aux;*.*.*" ,(merge-pathnames
"auxiliary/"
(make-pathname
:directory
21 changes: 21 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
checkout:
post:
- echo "Changing submodule pointers to use HTTPS URL's for Travis"
- sed -e 's#git@github.com:#https://github.com/#' -i .gitmodules
- git submodule sync
- echo "Updating submodules"
- git submodule update --init --recursive
- echo "Ensure that build dependencies are available"
- sh -c 'make deps || true'
- echo "Ensuring that we have a sane SBCL available"
- bin/ensure-sane-sbcl
- echo "Build"
- make

test:
post:
- make test




Loading