Commit graph

3409 commits

Author SHA1 Message Date
Nguyễn Thái Ngọc Duy
a3eda041a3 Add Tangerine library names
Chibi supports quite a few SRFIs that have been part of Tangerine
edition. These .sld are the same as their counterpart .sld, except the
rename.
2020-02-20 19:12:03 +07:00
Alex Shinn
7656be5043
Merge pull request #616 from pclouds/chibi-run
Allow to run chibi-run from anywhere
2020-02-19 22:25:24 +08:00
Nguyễn Thái Ngọc Duy
b678abbce7 Allow to run chibi-run from anywhere
chibi-run script assumes $(PWD) is at topdir. Let's remove that
assumption so that the script can be used anywhere to launch chibi from
dev environment.
2020-02-19 17:24:12 +07:00
Alex Shinn
3161edbe86
Merge pull request #613 from pclouds/chibi-test-no-protect
chibi/test: remove dead import
2020-02-14 22:19:22 +08:00
Nguyễn Thái Ngọc Duy
58b2ee34dd chibi/test: remove dead import
'protect' used to be renamed to 'guard', after excluding 'guard'
from (scheme base). But that part is now gone. test.scm itself never
uses 'protect' directly. Remove it because it's not used.
2020-02-14 19:03:42 +07:00
Alex Shinn
507e62c3e1 add safety checks on substring-cursor 2020-02-06 23:09:33 +08:00
Alex Shinn
fad3413235
Merge pull request #609 from ilammy/snow-usr-local
Always install Snow libraries to /usr/local
2020-02-06 21:15:39 +08:00
Alex Shinn
9e82ffd462
Merge pull request #612 from pclouds/srfi-159-exports
Correct srfi-159 exported procedures
2020-02-05 21:40:48 +08:00
Nguyễn Thái Ngọc Duy
c68bbf89bd Correct srfi-159 exported procedures
The two procedures pretty and pretty-simply from (chibi show pretty)
should be part of (srfi 159 base). written-shared is removed from 159
because it looks like it's an addition in 166.
2020-02-04 20:28:55 +07:00
Alex Shinn
77dad5af5c
Merge pull request #611 from ilammy/snow-remove
Use sudo when doing "snow-chibi remove"
2020-02-03 22:21:15 +08:00
Alex Shinn
addb859ab2
Merge pull request #610 from ilammy/hide-symbols
Hide unnecessarily exported symbols
2020-02-03 22:19:37 +08:00
Alex Shinn
4f7c3d5637
Merge pull request #608 from ilammy/man-path
Correct man page installation directory
2020-02-03 22:16:38 +08:00
Alex Shinn
12d3c6a504
Merge pull request #607 from ilammy/so-prefix
Common library installation prefixes
2020-02-03 22:15:45 +08:00
Alexei Lozovsky
24f207115c Hide unnecessarily exported symbols
gc_heap_err_str and load_image_header() are never used outside of
gc_heap.c but they are not marked static and are effectively exported
by Chibi's shared library. Since this is unlikely to be intentional,
let's hide them.
2020-02-02 16:59:57 +02:00
Alexei Lozovsky
50a9c9d4d4 Use sudo when doing "snow-chibi remove"
Currently "remove" command does not know how to use sudo to remove
files installed into directories owned by root. By default Snow
installs stuff into /usr/local hierarchy and uses sudo for that.
Let's teach it to remove packages without explicit sudo too.
2020-02-02 16:46:23 +02:00
Alexei Lozovsky
26061930e9 Always install Snow libraries to /usr/local
Snow-Chibi is a local package manager, not a system one. It can install
Scheme packages into system but they are not managed by system package
manager like dpkg, RPM, pacman, ports, etc.

Traditionally (and in accordance with Filesystem Hierarchy Standard),
/usr/local hierarchy should be used for local administrator installs --
and that's what Snow-Chibi provides.

Let's make sure that Snow-Chibi installs snowballs into /usr/local
hierarchy even if Chibi is compiled for installation into the system,
with PREFIX=/usr. Introduce a distinct bunch of variables holding paths
to library installation directories, with "SNOW" prefix:

  - SNOWPREFIX    - default prefix for Snow-installed stuff
  - SNOWLIBDIR    - custom libraries required for Snow itself
  - SNOWSOLIBDIR  - shared libraries required for Snow itself
  - SNOWMODDIR    - Snow installs Scheme modules here
  - SNOWBINMODDIR - Snow installs native libraries here

All of these are set to /use/local by default, just as they are now.
However, they are not affected by regular PREFIX, LIBDIR, MODDIR, etc.
which affect only libraries bundled with Chibi.

And in order for these to work, they need to be added into the current
module path so that they can be used in parallel with system libraries.
Furthermore, we need to tweak "get-install-library-dir" function to use
those paths instead of hardcoded "/usr/local/lib" by default. Introduce
a new helper "get-install-library-dirs", similar to "get-install-dirs".
It will look up the correct installation directories in current module
path, giving preference to the ones with "/lib" in them.

With these defaults, Snow will install Scheme modules into
/usr/local/share/snow and native libraries go into /usr/local/lib/snow,
similar to how built-it libraries are installed into
/usr/local/share/chibi and /usr/local/lib/chibi is used for native code.
Of course, this can be overriden at build time by setting SNOWPREFIX or
individual SNOWMODDIR, SNOWBINMODDIR variables.
2020-02-02 16:21:21 +02:00
Alexei Lozovsky
2137fcd3f0 Correct man page installation directory
According to the Filesystem Hierarchy Standard (see "man 7 hier")
man pages should be installed into an appropriate subdirectory for
their section. Fix the installation path so that our documentation
goes into the right place.

All UNIX-like systems supported by Chibi follow FHS for man pages:

  - FreeBSD
  - GNU/Linux
  - macOS
  - Plan 9
2020-02-02 11:34:24 +02:00
Alexei Lozovsky
04ce3700d7 Shared library installation prefixes
Both SOLIBDIR and BINMODDIR install into $(PREFIX)/lib which is the same
value as LIBDIR -- the traditional name of the directory for installed
libraries. Current duplication is fine for the default installation
(with PREFIX = /usr/local) but it does not play nicely with systems
supporing multiple architectures.

For example, Debian systems allow the users to install libraries for
multiple architectures simultaneously: e.g., 32-bit and 64-bit libraries
for AMD-64 CPUs go into separate directories:

  - 64-bit: /usr/lib/x86_64-linux-gnu/libchibi-scheme.so.0.8.0
  - 32-bit: /usr/lib/i386-linux-gnu/libchibi-scheme.so.0.8.0

Other Linux systems (Red Hat family) use different paths like /usr/lib64
and /usr/lib, but the general idea is the same.

In order to achive this, packaging toolchain supplies appropriate value
of LIBDIR which takes care of these details more or less automagically.

However, with Chibi you currently need to additionally override SOLIBDIR
and BINMODDIR to have all the libraries installed into multiarch-enabled
locations. While definitely doable, it's not convenient.

Redefine SOLIBDIR and BINMODDIR in terms of LIBDIR so that you only need
to override LIBDIR to get the packaging correctly. This does not change
the default installation paths and it is still possible to override
these values individually if necessary.
2020-02-02 10:48:39 +02:00
Alex Shinn
2b7927b9bc allow indexes instead of cursors for cursor-next/prev and string-any/every 2020-01-31 23:26:38 +08:00
Alex Shinn
708f57ffed SRFI 151 fixes: bitwise-if arg order swapped from SRFI 33; bit-set? on negative integers should extend infinite 1s; bit-field-every? should compare only bits within mask 2020-01-31 23:12:20 +08:00
Alex Shinn
a88a1ad244 adding ffi test with unsigned-char param 2020-01-27 22:19:51 +08:00
Alex Shinn
6a2ed9cdb4 fix iset-intersection on large trees in the first argument (issue #606) 2020-01-27 21:52:17 +08:00
Alex Shinn
5e3d2284ed
Merge pull request #604 from ar-nelson/srfi-128-hash-fix
Fix make-comparator hash function arity in SRFI 128
2020-01-12 22:46:26 +08:00
Adam R. Nelson
6aacffc0e8 fix make-comparator hash function arity in SRFI 128 2020-01-12 09:45:38 -05:00
Alex Shinn
82654b4c46 make install shouldn't fail if there are issues with images (fixes issue #603) 2020-01-12 22:43:36 +08:00
Alex Shinn
48d6c35548 nans aren't rational 2020-01-02 22:40:49 +08:00
Alex Shinn
c174465aa1 fix rational? for some boundary cases 2020-01-02 22:35:33 +08:00
Alex Shinn
a9f9b3dd8a
Merge pull request #596 from lassik/apropos
Add (chibi apropos) module
2019-12-31 00:36:10 +08:00
Lassi Kortela
60f22c978f Add (chibi apropos) module 2019-12-28 17:44:32 +02:00
Alex Shinn
6f28159667 regexp-replace should respect start/end also for pre/post substitutions 2019-12-28 22:48:44 +08:00
Alex Shinn
3c8402d4fb re-run scheduler if only thread was still waiting (issue #594) 2019-12-26 23:42:15 +08:00
Alex Shinn
588d63d901 don't escape html in sxml-display-as-text, add newline after li (issue #592) 2019-12-26 22:49:18 +08:00
Alex Shinn
d79f557d46 fix variadic foreign functions with more than 4 params 2019-12-19 23:58:51 +08:00
Alex Shinn
d5b5a079f4 initial uvector ffi support 2019-12-17 23:48:26 +08:00
Alex Shinn
5b60641f43 small documentation fixes 2019-12-17 23:47:53 +08:00
Alex Shinn
e10d82987a adding ignored failing match-letrec test case 2019-12-17 23:47:19 +08:00
Alex Shinn
33d6cfd0ac
Merge pull request #591 from krzygorz/ansi-fix
(chibi show): Make ANSI escape codes work with col state variable
2019-11-08 18:54:41 +08:00
krzygorz
5c43ca7720 move the col+ansi test to color section 2019-11-07 22:37:33 +01:00
krzygorz
15fef988af add a test for col with unicode and ANSI escapes 2019-11-07 22:31:29 +01:00
krzygorz
05521e5e1d use string-append for building ansi escape codes 2019-11-07 18:34:41 +01:00
Alex Shinn
abfa6a724e Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-11-04 20:15:40 +08:00
Alex Shinn
7b6a928974 adding levenshtein distance 2019-11-04 20:15:32 +08:00
Alex Shinn
10b713284c
Merge pull request #589 from ekaitz-zarraga/docs
Update sxml docs
2019-10-31 23:17:28 +08:00
Ekaitz Zárraga
bbe279b825 Update sxml docs 2019-10-30 10:15:52 +01:00
Alex Shinn
6f57d6ac71
Merge pull request #586 from amirouche/wasm-improvements
WASM improvements
2019-10-29 21:58:32 +08:00
Amirouche
9604fa361b Makefile: js/chibi.js: ALLOW_MEMORY_GROWTH=1
`ALLOW_MEMORY_GROWTH=1` allows to grow the wasm vm memory space as
needed and avoid out-of-memory issues. This is for development
purpose, production build will want to set memory size to something
that is fit the application (I don't remember the actual option name,
but removing ALLOW_MEMORY_GROWTH=1 from the compilation, and
re-running the app will display the good option to use).
2019-10-28 12:21:37 +01:00
Amirouche
61684647d6 Makefile: js/chibi.js: disable optimization
Optimizations will (sometime) lead to broken build.
2019-10-28 12:19:37 +01:00
Amirouche
9acd71735c Makefile: whitespace cleanup 2019-10-28 12:18:09 +01:00
Alex Shinn
4ad228a0f6
Merge pull request #585 from ekaitz-zarraga/safe-string
[WIP] Add option to ignore escaping
2019-10-24 21:00:29 +08:00
Ekaitz Zárraga
12f941dbfe Add option to ignore escaping 2019-10-24 09:56:08 +02:00