Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 15 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
language: c

compiler:
- gcc
- clang

script:
- mkdir -v build
- cd build
- mkdir -v ../m4
- autoreconf -ivf ..
- ../configure --prefix=${HOME}
- make check
- make distcheck
- make install
Empty file added AUTHORS
Empty file.
Empty file added ChangeLog
Empty file.
57 changes: 0 additions & 57 deletions Makefile

This file was deleted.

63 changes: 63 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# femtolisp/Makefile.am

ACLOCAL_AMFLAGS = -I m4

AM_CFLAGS = -falign-functions -Wall -Wno-strict-aliasing -I$(top_srcdir) \
-I$(top_srcdir)/llt -DUSE_COMPUTED_GOTO



noinst_LTLIBRARIES = libllt.la # libflisp.la

libllt_la_SOURCES = llt/bitvector.h llt/htable.h llt/ptrhash.h llt/utf8.h \
llt/dirpath.h llt/ieee754.h llt/random.h llt/utils.h llt/dtypes.h \
llt/ios.h llt/socket.h llt/hashing.h llt/llt.h llt/timefuncs.h \
llt/bitvector.c llt/hashing.c llt/socket.c llt/timefuncs.c \
llt/ptrhash.c llt/utf8.c llt/ios.c llt/dirpath.c llt/htable.c \
llt/bitvector-ops.c llt/int2str.c llt/dump.c llt/random.c llt/lltinit.c



bin_PROGRAMS = flisp

flisp_SOURCES = flmain.c flisp.h opcodes.h flisp.c builtins.c string.c \
equalhash.c table.c iostream.c

flisp_LDADD = libllt.la



EXTRA_DIST = equal.c read.c print.c equalhash.c equalhash.h types.c operators.c \
cvalues.c llt/lookup3.c llt/htableh.inc llt/htable.inc llt/mt19937ar.c \
mkboot1.lsp mkboot0.lsp system.lsp compiler.lsp flisp.boot tests



flispbootdir = $(bindir)

flispboot_DATA = flisp.boot

flisp.boot: flisp
cp -vft . $(top_srcdir)/*.lsp $(top_srcdir)/flisp.boot
./$< mkboot0.lsp system.lsp compiler.lsp > flisp.boot.new
mv -vf flisp.boot.new flisp.boot
./$< mkboot1.lsp



check_SCRIPTS = unittest.sh

TESTS = $(check_SCRIPTS)

unittest.sh: flisp flisp.boot
echo '#!/usr/bin/env bash' > $@
echo >> $@
echo "echo $@ && \\" >> $@
echo "cd $(abs_srcdir)/tests && \\" >> $@
echo "$(abs_builddir)/flisp unittest.lsp" >> $@
chmod +x $@


CLEANFILES = mkboot1.lsp mkboot0.lsp system.lsp compiler.lsp flisp.boot \
unittest.sh

Empty file added NEWS
Empty file.
Empty file added README
Empty file.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## ...a purely symbolic gesture...

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

This project began with an attempt to write the fastest lisp interpreter I could in under 1000 lines of C. It snowballed from there as I kept trying to see if I could add powerful features with minimal code. At the same time I assembled a library of some of my favorite C code (by myself and others) to use as a base for a standard library. This includes `ios`, a replacement for parts of C's stdio that adds more flexible features.

Before you say "oh no, another lisp", consider the following: femtolisp is about 150kb, is very self-contained, and has the following features:
Expand Down
67 changes: 67 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.68])

AC_INIT([femtolisp],
[1.0.0],
[jeff.bezanson@gmail.com],
[femtolisp],
[https://github.com/JeffBezanson])

AC_LANG_PUSH([C])
AM_INIT_AUTOMAKE([subdir-objects])
LT_PREREQ([2.4])
LT_INIT([dlopen])
AC_CONFIG_SRCDIR([flmain.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC
AC_PROG_MAKE_SET

# Checks for libraries.
# FIXME: Replace `main' with a function in `-lm':
AC_CHECK_LIB([m], [cos])

# Checks for header files.
AC_FUNC_ALLOCA
AC_CHECK_HEADERS([fcntl.h limits.h locale.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/param.h sys/socket.h sys/time.h sys/timeb.h unistd.h wchar.h wctype.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_INT8_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T

# this is autoconf v2.69
dnl AC_CHECK_HEADER_STDBOOL

# this is autoconf v2.68
AC_HEADER_STDBOOL

AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_UINT8_T

# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_MKTIME
AC_FUNC_REALLOC
AC_FUNC_STRTOD

AC_CHECK_FUNCS([bzero floor ftime getcwd gethostbyname gettimeofday iswprint localtime_r memchr memmove memset pow select setenv setlocale socket sqrt strcasecmp strchr strdup strpbrk strrchr strtol strtoull wcwidth])

dnl AC_CONFIG_FILES([Makefile
dnl llt/Makefile
dnl tiny/Makefile])
AC_CONFIG_FILES([Makefile])

AC_OUTPUT