Commit graph

21 commits

Author SHA1 Message Date
Juan Francisco Cantero Hurtado
c4eb57c6c8 Add the variable VERSION and remove the uses of 'cat VERSION'
The Makefile doesn't write correctly the version of chibi-scheme within
the pkgconfig file (spotted by James Turner, OpenBSD developer) because
the VERSION variable doesn't exist.

The uses of 'cat VERSION' are not needed anymore.
2015-05-02 20:07:25 +02:00
Alex Shinn
0df0dc3e2b Fixing typo in snowballs target. 2015-05-02 22:14:29 +09:00
Alex Shinn
5cab36c8bd Fleshing out (chibi parse) docs and adding to the manual. 2015-05-02 21:47:24 +09:00
Alex Shinn
452e6f27d7 Packaging (chibi iset) recursively. 2015-05-01 07:55:02 +09:00
Alex Shinn
7f63676e1b Adding description for (chibi char-set boundary). 2015-04-30 17:33:20 +09:00
Alex Shinn
93730efceb Adding (chibi app) docs. 2015-04-30 17:21:36 +09:00
Alex Shinn
12c9dc1038 Adding a snowballs target. 2015-04-26 13:29:40 +09:00
Alex Shinn
82bc3b931f Adding "debian" make target from issue #221. 2015-04-25 10:40:21 +09:00
Alex Shinn
ff8f9d5fa7 Updating dist target to use git ls-files instead of hg manifest. 2015-04-25 10:36:06 +09:00
ilammy
baff1af72d chibi.crypto: native SHA-2 implementation
The original Scheme implementation is astonishingly slow. Rewriting
SHA-2 in C yields around x10000 speed boost for premade strings and
bytevectors. For input ports this is alleviated to x100 boost.

The implementation is divided into two parts: native computational
backend and thin Scheme interface. It is tedious to properly do IO
from C, so the Scheme code handles reading data from an input port
and the C code performs actual computations on byte buffers (which
is also used to handle strings and bytevectors directly).

Scheme wrapper reads data in chunked manner with 'read-bytevector'.
Currently, the chunk size has insignificant impact on performance
as soon as it is bigger than 64. Also, using simply read-bytevector
turned out to be 33% faster than preallocating a buffer and filling
it with read-bytevector!

One tricky part is how to get exact 32-bit integers in C89. We have
no <inttypes.h> there, so instead we use <limits.h> to see whether
we have a standard type with suitable boundaries.

The other one is how to return a properly tagged sha_context from C.
Chibi FFI currently cannot handle the case when a procedure returns
either a C pointer (which needs to be boxed) or an exception (which
should be left as is). To workaround this sexp_start_sha() receives
a dummy argument of type sha_context; this makes Chibi FFI to put a
proper type tag into 'self', which is then extracted in the C code.

This commits adds a new shared library 'crypto$(SO)' with intent to
keep there all native code of (chibi crypto) libraries. This allows
to simply put any future native implementation of SHA-512 or MD5 in
some md5.c and just include those files into crypto.stub.
2015-04-18 17:31:45 +03:00
ilammy
78a57dfe83 chibi.crypto: documentation for (chibi crypto sha-2)
Clearly state what kind of arguments sha-224 and sha-256 can handle
and what they return as a result.
2015-04-18 17:31:44 +03:00
Alex Shinn
3979e98aa6 Adding initial snow command-line tests. 2015-04-09 01:16:52 +09:00
Alex Shinn
4e5cdedc03 Converting tests to modules instead of separate programs.
By convention, a library meant for testing exports "run-tests".
Also by convention, assume the test for (foo bar) is (foo bar-test),
keeping the test in the same directory and avoiding confusion since
(chibi test) is not a test for (chibi).
- Avoids the hack of "load"ing test, with resulting namespace complications.
- Allows keeping tests together with the libraries.
- Allows setting up test hooks before running.
- Allows implicit inference of test locations when using above conventions.
2015-04-05 23:38:51 +09:00
Alex Shinn
f4f954fe35 Fixing snow-chibi install source path after removing submodule. 2015-04-05 08:15:07 +09:00
Alex Shinn
b22e81afd6 fixing install target for snow-chibi 2015-03-17 22:09:32 +09:00
Alex Shinn
fc457c6146 Adding optional EXTRA_COMPILED_LIBS to Makefile. 2015-02-25 23:18:33 +09:00
Alex Shinn
956b968ab4 clibs.c should depend on the generated c files 2015-02-22 16:16:24 +09:00
Alex Shinn
dc5e7e397d Emscripten support by default. Patch from Marc Nieper-Wi?kirchen. 2015-02-22 16:10:30 +09:00
Alex Shinn
3f85d7c2c0 Using CHIBI_DEPENDENCIES in clibs.c rule deps instead of hard-coded chibi-scheme. 2015-02-17 19:52:39 +09:00
Alex Shinn
41ea3bb835 chibi-genstatic only needs -q 2015-02-16 22:50:11 +09:00
Alex Shinn
2922ed591d Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00