Commit Graph

7 Commits (master)

Author SHA1 Message Date
Mike Gerwitz 937aefe00c
UNFINISHED: Years-long uncommitted changes
These changes have been sitting here uncommitted for a almost a couple of
years now.  It's become clear that, while this project deeply interests me,
I do not have time for it.  Implementing a full-fledged Scheme is simply not
something I have time to do.

The original goal of this project is also something I'm still interested in,
but will not have time to do any time soon.  But it has been folded into
broader, more grand ideas.

I hope that this will, at the very least, be interested to someone else.  It
is terribly lacking in certain cases, e.g. it does not even implement pairs
properly, because I never needed to.

See also https://github.com/google/schism, which compiles to WASM.

Happy hacking!
2020-02-23 01:07:04 -05:00
Mike Gerwitz 7ebe7cd9c8
birth, rebirth: Update header style of Lisp files
This is consistent with Guile and can be parsed with `(ice-9 documentation)'.

* bootstrap/birth.scm: Update header.
* bootstrap/rebirth.scm: Likewise.
* bootstrap/rebirth/es.scm: Likewise.
* bootstrap/rebirth/macro.scm: Likewise.
* bootstrap/rebirth/relibprebirth.scm: Likewise.
2018-09-12 21:44:02 -04:00
Mike Gerwitz cf73eb4a31
rebirth: Add viability test suite
This is an initial test suite that is by no means comprehensive, but is a
pretty good starting point.  At this point, it's important that we be
confident in certain aspects of the system to preempt difficulty in
debugging problems when using 3rd-party code (we'll be using psyntax at some
point, for example).

We also need to be able to have confidence in refactoring.  We do gain
limited confidence when Rebirth is able to successfully compile itself, but
finer details are missed, as has been demonstrated by recent commits (which
fix bugs found by this test suite).

This is also the first test of writing another program in Rebirth that isn't
Rebirth itself.  It's exciting, and helps make obvious certain pain points,
like the need to include core packages.  Further, we can't include important
definitions in `rebith.scm' itself.  Consequently, I think it may be in my
best interest to just add support to Birth for `include' so that the first
pass of Rebirth can benefit from it.  I didn't want to do so because I
wanted Birth to be a faithful re-implementation of Prebirth, but it's not
worth it.  This would be a minor addition and would save so much trouble.

I saw a couple mentions of JS Lisps today on HN (one a tiny Lisp that
compiles to JS, one an interpreter)---neither of them come close to what
Ulambda will be (and in many ways with Rebirth already is), so I'm excited
to keep development going.  There is a niche to be filled.  And I intend to
keep this project secret until it can actually be called "Scheme" (and maybe
beyond that too, since I have Gibble to work on as well).

Anyway, enjoy the first non-Rebirth Rebirth program!  Hello, world!

* bootstrap/Bootstrap.js (bootstrap): Include `#_testViable' call after
    Rebirth compilation.
  (_birth): Throw any error received during Birth compilation.
  (_makeCompiler): Accumulate output for each `console.log' in compiler,
    rather than overwriting with each call (that latter behavior was never
    intended in the first place).
  (_compileRebirth): Throw error on compilation failure.
  (_testViable): New method.
  (_strmap)[rebirthTestCompiling, rebirthTestCompiled, rebirthTestFailed]
    [rebirthTestDone]: New functions.
* bootstrap/rebirth.scm: Add comment clarifying that Rebirth should _not_ be
    used as a general-purpose little Lisp.
* bootstrap/rebirth/.dir-locals.el: New file.
* bootstrap/rebirth/es.scm: Add comment comparing environment implementation
    to a spaghetti stack (a term which I was unfamiliar with until recently
    while researching some Lisp history).
  (es:json-stringify): New procedure.
  (es:try): New macro.
* bootstrap/rebirth/relibprebirth.scm (es:null): New procedure for use by
    test suite.
  (fold): Fix argument naming order.
  (zero?): Correctly use `=' instead of `eq?'.
* bootstrap/rebirth/test.scm: New viability test suite.
2018-09-11 22:51:26 -04:00
Mike Gerwitz 34518e1532
birth: Remove remaining Gibble references
Some of them snuck through.

Gibble is still a goal.  It really is fascinating how projects like these
evolve...as a complete distraction from my original goals.

* bootstrap/birth.scm: s/GIBBLE/REBIRTH/.
* bootstrap/libprebirth.js: Likewise.  Also s/Gibble/Ulambda/.
2018-09-11 20:20:48 -04:00
Mike Gerwitz 84345fab58
rebirth: Recognize numbers without digit before decimal point
* bootstrap/rebirth.scm (tname-verbatim?): Match numbers that have no digit
    preceding the decimal point, so long as digits follow it.
2018-09-10 23:24:45 -04:00
Mike Gerwitz ba93b7c034
Add Makefile.am for bootstrapping
This provides a very basic Automake+Autoconf configuration.  At the moment
it handles only bootstrapping, but at least allows for the user to enter
`make' and have something useful happen.

* .gitignore: New file.
* Makefile.am: New file.
* autogen.sh: New file.
* bootstrap/Bootstrap.js (_error): Re-throw error.
* bootstrap/bootstrap.js: Exit with non-zero status code on failure.
* configure.ac: New file.
2018-09-10 23:07:54 -04:00
Mike Gerwitz aae726b7a6
bootstrap: Move from build-aux/bootstrap
NOTE: To see history for files in this directory, run:

  $ git log --follow PATH

The previous home for the bootstrapping process was build-aux, but this has
evolved into quite the project in its own that such a directory strucutre is
no longer honest.  Further, I want the bootstrap process to get the
visibility in the source tree that it deserves, considering how vitally
important it is.

I preserved the original history rather than rewriting the commits because I
did not want the hashes to change---I have recorded some hashes elsewhere
as proof that early Ulambda existed when it did, since it is yet unpublished.

* bootstrap/Bootstrap.js: Renamed from build-aux/bootstrap/Bootstrap.js.
* bootstrap/birth.scm: Renamed from build-aux/bootstrap/birth.scm.
* bootstrap/bootstrap.html: Renamed from build-aux/bootstrap.html.
* bootstrap/bootstrap.js: Renamed from build-aux/bootstrap.js.
* bootstrap/libprebirth.js: Renamed from build-aux/bootstrap/libprebirth.js.
* bootstrap/prebirth.js: Renamed from build-aux/bootstrap/prebirth.js.
* bootstrap/rebirth.scm: Renamed from build-aux/bootstrap/rebirth.scm.
* bootstrap/rebirth/es.scm: Renamed from build-aux/bootstrap/rebirth/es.scm.
* bootstrap/rebirth/macro.scm: Renamed from build-aux/bootstrap/rebirth/macro.scm.
* bootstrap/rebirth/relibprebirth.scm: Renamed from
    build-aux/bootstrap/rebirth/relibprebirth.scm.
2018-09-10 21:14:25 -04:00