Commit graph

2381 commits

Author SHA1 Message Date
Alex Shinn
31997cb514 Don't use rsa keys by default for now. 2015-04-26 23:45:43 +09:00
Alex Shinn
00691b64f1 Making libraries portable where possible.
Many still import (chibi), and as (scheme base) is somewhat more
expensive to load at present these are changed to cond-expand.
Many libraries also rely on (srfi 33), and these have been changed
to a cond-expand first trying (srfi 60) where available.
Also fixing a few portability concerns (duplicate imports of the
same binding), and adding a few libraries missing from lib-tests.scm.
2015-04-26 16:17:38 +09:00
Alex Shinn
12c9dc1038 Adding a snowballs target. 2015-04-26 13:29:40 +09:00
Alex Shinn
1883561c57 Clarifying error message on bad import spec. 2015-04-26 13:29:16 +09:00
Alex Shinn
93406a98ee Fixing upload with passwords. 2015-04-26 10:42:38 +09:00
Alex Shinn
24a880ad28 Adding fixed-size heaps as an experimental compile-time option. 2015-04-25 22:24:56 +09:00
Alex Shinn
b3bc13443b Fixing gabriel benchmarks. 2015-04-25 22:22:49 +09:00
Alex Shinn
e230823cc6 Fixing random-integer for real. 2015-04-25 14:14:32 +09:00
Alex Shinn
7e80510755 Fixing typo in random-integer fix. 2015-04-25 13:05:17 +09:00
Alex Shinn
11cb17835b Adding sexp_int32_t definition. Fixing SRFI 27 bug on 32 bit machines.
Fixing the random-integer range to allow all results with a bignum bound.
2015-04-25 13:01:16 +09:00
Alex Shinn
2e481d57e9 Non-strict top-level identifier matching now works if the identifier
is bound in only one of the environments.  This is necessary in the
case where a library uses an unbound keyword (e.g. "with" in (chibi
loop)), but you want to use it along with a binding for the
keyword (e.g. "with" in (chibi show)).  The alternative to work with
the current logic is to always require such keywords to be bound, in
this case to add a dummy "with" auxiliary syntax binding to (chibi
loop), however this doesn't seem any safer than the new logic, and the
whole point of the feature is convenience.  Fixes issue #221.
2015-04-25 10:56:58 +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
Alex Shinn
4ea94fa51d Forgot to import temp-file. 2015-04-24 23:12:06 +09:00
Alex Shinn
a8848793e4 Adding a preserve thunk to call-with-temp-file/dir. 2015-04-24 22:52:13 +09:00
Alex Shinn
08cf38851e Adding for loop shortcut syntax. 2015-04-24 21:27:35 +09:00
Alex Shinn
2ac6b0f271 Adding "implementations" command, along with impl version checks where needed. 2015-04-24 18:22:29 +09:00
Alex Shinn
b40f5284fc Refactoring some utils. 2015-04-24 16:32:06 +09:00
Alex Shinn
78d68de282 Adding missing test files from last commit. 2015-04-24 14:10:57 +09:00
Alex Shinn
ac53193e5d Adding initial chibi-ffi support to snow-chibi. 2015-04-24 14:10:37 +09:00
Alex Shinn
74ed34b4a3 Adding a system? variant of system which returns #t iff the command completes successfully.
Also allowing a list as the first argument to both.
2015-04-24 14:10:13 +09:00
Alex Shinn
db16fc693c Using absolute import paths for kawa, since relative paths break on chained dependencies. 2015-04-23 18:36:44 +09:00
Alex Shinn
9b328359b5 Chibi still wants to run tests in pwd in case we're running snow-tests from the chibi build dir. 2015-04-23 18:32:15 +09:00
Alex Shinn
ef86d2ff65 extra error checks for call-with-temp-dir 2015-04-23 18:31:22 +09:00
Alex Shinn
28011727e4 call-with-process-io should terminate if execute returns (i.e. fails) 2015-04-23 18:14:33 +09:00
Alex Shinn
1027b424c2 Adding tests to ensure packages with failing tests aren't installed without confirmation. 2015-04-23 17:09:19 +09:00
Alex Shinn
259d208ad5 Adding support for installing data files. 2015-04-23 15:23:30 +09:00
Alex Shinn
882f36bccf Adding proper program installation for chicken, plus tests. 2015-04-21 18:02:19 +09:00
Alex Shinn
79652b8fd5 Adding sexp options support. 2015-04-21 12:23:01 +09:00
Alex Shinn
5f97353ff5 Adding a chmod binding. 2015-04-21 12:22:47 +09:00
Alex Shinn
6a3179ec42 Various snow bugfixes. 2015-04-21 00:01:46 +09:00
Alex Shinn
eb1a982842 Ignoring generated crypto.c. 2015-04-21 00:00:29 +09:00
Alex Shinn
a1fd315604 Merge pull request #258 from ilammy/native-sha-2.v2
Native SHA-2 implementation (take two)
2015-04-20 19:20:48 +09:00
Alex Shinn
732df3a136 Trying to load libraries for scribble doc examples. 2015-04-20 00:11:44 +09:00
Alex Shinn
4e75fbab49 Adding snow tests for advanced package defaults from config.
Adding test-library option to automatically infer tests from libraries.
Processing scribble docs even when we can't load the module.
2015-04-20 00:09:02 +09:00
ilammy
a6ca2e39dc chibi.crypto: move sexp_uintN_t typedefs to <sexp.h>
First we check for C99 support in Makefile.detect, looking for the
header we need and verifying whether it is the right one by using
a definition required by C99 standard to be present in that header.

uintN_t types are optional, but implementations are required to
provide corresponding limit #defines for the types they support,
so we can check for this with preprocessor only.

Finally, we define SEXP_UINTN_DEFINED for any sexp_uintN_t we have
so that the code can use #ifs to check for exact integer support.
2015-04-19 16:01:11 +03:00
ilammy
db2b598cde chibi.crypto: code style fixes
- Fixed some typos in sha-native.scm
- Removed unnecessary structs and unions from sha_context
- Used more efficient implementation of hex32
- Made (scheme base) a common import in (chibi crypto sha2)
2015-04-19 16:01:07 +03:00
ilammy
9088b1954c chibi.crypto: make Chibi use native SHA-2 by default
This change concerns only Chibi. The portable implementation is
still kept around because it is... well... portable and can be
used by other Scheme implementations.
2015-04-18 17:31:46 +03:00
ilammy
1f8c0088a7 chibi.crypto: fix formatting bug in portable SHA-2
We can't use 'integer->hex-string' alone to print out SHA-224/256
digest because it rightly converts #x00001234 into "1234", while
we need to keep the padding zero nibbles and get "00001234".

'hex' got renamed into 'hex32' because SHA-512 will need some
different 'hex64' which returns 16-character-long strings.
2015-04-18 17:31:46 +03:00
ilammy
37d808e470 chibi.crypto: more tests for SHA-2
* Boundary cases

  Both SHA-224 and SHA-256 use 512-bit data chunks and have a special
  behavior when chunk size is near the 448-bit boundary.

* Source type support

  Basic smoke tests for accepting bytevectors and binary input ports
  as valid arguments.
2015-04-18 17:31:45 +03: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
f9c063ebe6 Clean up unused var warning. Fixes issue #256. 2015-04-16 08:37:51 +09:00
Alex Shinn
6d94e9b04c Adding Alexei Lozovsky to AUTHORS. 2015-04-15 17:20:31 +09:00
Alex Shinn
01df2fec44 Merge pull request #251 from ilammy/overflow-fixes
Fixed a couple of integer overflows
2015-04-15 17:14:58 +09:00
Alex Shinn
b6bbc1cae5 Enabling chicken snow installs, and adding to tests.
Smarter handling of requested vs. available impl installs.
2015-04-15 15:19:44 +09:00
Alex Shinn
4267164e92 Interleave reading/writing to subprocess in process-pipe-bytevector,
using u8-ready? to avoid blocking.  Fixes issue #253.
2015-04-15 11:24:56 +09:00
Alex Shinn
aa3f869798 Avoiding potential segfault from trying to capture temporary local variables in a macro.
Fixes issue #252.
2015-04-14 23:22:48 +09:00
Alex Shinn
579fcf95ae Fixing kawa install rules and adding to tests. 2015-04-11 01:21:38 +09:00
Alex Shinn
d1537fec79 Fixing library rewriting and test-depends bug. 2015-04-11 01:01:07 +09:00