Skip to content

Commit

Permalink
Merge branch 'master' into docker-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fare authored Oct 18, 2023
2 parents a1f5484 + 02c5801 commit be3f11e
Show file tree
Hide file tree
Showing 110 changed files with 14,085 additions and 11,375 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ src/TAGS
.build*
doc/node_modules
doc/.vuepress/dist
# src/gerbil/runtime/version.ss
src/gerbil/runtime/version.ss
src/gerbil/boot-gxi
src/bootstrap/static

Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Gerbil Release Notes
## Gerbil v0.18, Nimzowitsch

- Gerbil v0.18; to be released soon
- Gerbil v0.18; October 12, 2023
- Gerbil v0.18-rc1; October 6, 2023

**TL;DR** Gerbil v0.18 is a milestone release, which sets the
Expand Down
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,19 @@ ahead of time compilation and compiled macros.
The source code for Gerbil is hosted on [Github](https://github.com/mighty-gerbils/gerbil),
with the latest release available in [releases](https://github.com/mighty-gerbils/gerbil/releases).

Installation from source is straightforward:
**If you are on Linux** installation from source is straightforward:
```shell
$ git clone [email protected]:mighty-gerbils/gerbil.git
$ cd gerbil
$ ./configure
$ make
$ make -j4
$ sudo make install
```

This will install Gerbil in `/opt/gerbil`; all you have to do then is
add `/opt/gerbil/bin` to your path.
add `/opt/gerbil/bin` to your path. Obviously, you can customize the
install prefix by using the `--prefix=/path/to/gerbil/installation`
configure option.

**Note** the default configuration has some dependencies you may need
to install: sqlite, zlib, and libcrypto/openssl.
Expand All @@ -46,7 +48,23 @@ You can install them in ubuntu with:
$ sudo apt install libssl-dev zlib1g-dev libsqlite3-dev
```

For more detailed installation instructions see the [Guide](https://cons.io/guide/).
**Note** If you want to install the latest release (v0.18), you can also use the precompiled binary packages for Ubuntu, Debian, Fedora, and CentOS. They are available in the [v0.18 release](https://github.com/mighty-gerbils/gerbil/releases/tag/v0.18) page.

**If you are on MacOS** you can install Gerbil using our [brew formula](https://github.com/mighty-gerbils/gerbil/blob/master/homebrew/gerbil-scheme.rb):
```shell
$ wget https://raw.githubusercontent.com/mighty-gerbils/gerbil/master/homebrew/gerbil-scheme.rb

## to use 4 cores for the build
$ export GERBIL_BUILD_CORES=4

## to install latest release
$ brew install --formula -vd gerbil-scheme.rb

## to install latest Gerbil from master
$ brew install --HEAD --formula -vd gerbil-scheme.rb
```

for more detailed installation instructions see the [Guide](https://cons.io/guide/).

# Using Gerbil
The Gerbil interpreter is `gxi`, and the compiler is `gxc`.
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ package_out_of_tree() {
echo "It is now available as an external package: github.com/mighty-gerbils/gerbil-${pkg}"
}

readonly gerbil_version="v$(git describe --tags --always)"
readonly gerbil_version="$(git describe --tags --always)"
readonly gerbil_targets=""
readonly default_gambit_tag=24201248effa23d5017be4992b5b9879e4cd3a4c
readonly default_gambit_config="--enable-targets=${gerbil_targets} --enable-single-host --enable-dynamic-clib --enable-default-runtime-options=tE8,f8,-8 --enable-trust-c-tco"
Expand Down
13 changes: 9 additions & 4 deletions doc/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ module.exports = {
title: 'Standard Library',
children: [
'',
'sugar',
'sugar',
'source',
'stxparam',
'stxutil',
'assert',
'assert',
'errors',
'getopt',
'make',
Expand All @@ -63,7 +64,7 @@ module.exports = {
'ref',
'iterators',
'coroutine',
'events',
'events',
'amb',
'lazy',
'sort',
Expand All @@ -78,6 +79,7 @@ module.exports = {
'protobuf',
'xml',
'parser',
'values',

{ title: "Networking Libraries",
path: "/reference/std/net/",
Expand Down Expand Up @@ -149,9 +151,11 @@ module.exports = {
path: '/reference/std/misc/',
children: [
'misc/',
'misc/decimal',
'misc/list',
'misc/list-builder',
'misc/alist',
'misc/walist',
'misc/plist',
'misc/hash',
'misc/sync',
Expand All @@ -174,12 +178,13 @@ module.exports = {
'misc/rtd',
'misc/shared',
'misc/string',
'misc/path',
'misc/text',
'misc/template',
'misc/func',
'misc/number',
'misc/shuffle',
'misc/uuid'
'misc/uuid',
]
}
]
Expand Down
9 changes: 8 additions & 1 deletion doc/guide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ Various features can be enabled or disabled by passing `--enable-FEATURE` or
`--disable-FEATURE` to `./configure`. Use `./configure --help` to see which
features are available.

## Installation using Binary Release Packages

If you want to install the latest release (v0.18), you can also use
the precompiled binary packages for Ubuntu, Debian, Fedora, and CentOS.
They are available in the [v0.18 release](https://github.com/mighty-gerbils/gerbil/releases/tag/v0.18) page.

## Installation on MacOS

Gerbil is available via a homebrew recipe. If you are on MacOS, you can build using the brew formula.
Expand Down Expand Up @@ -119,5 +125,6 @@ See the [Docker Gulde](docker.md) for additional information.
You can install Gerbil using Nix. See [nix.md](nix.md) for more details.

There are also Docker containers based on Nix, with some gerbil libraries also installed,
at `fahree/gerbil-nix` (`root` only) and `fahree/gerbil-utils` (user `user` working in `/home`).
at `mukn/gerbil` (with the compiler) and `mukn/glow` (with many libraries installed)
(user `user` working in `/home`).
See the `scripts` directory of [Gerbil Clan](https://github.com/fare/gerbil-utils) for details.
117 changes: 62 additions & 55 deletions doc/guide/emacs.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,64 +100,71 @@ LSP server for the next Gerbil release (v0.19).

## Use-Package Example Configuration

Example [use-package](https://github.com/jwiegley/use-package) definition to get you
hacking in no time. All you have to do is to set the environment variables `GERBIL_INSTALL_PREFX`
and `GERBIL_SRCDIR` and copy the code snippet below into your Emacs config.
Example [use-package](https://github.com/jwiegley/use-package)
definition to get you hacking in no time. All you have to do is to
have`gxi`in your path and copy the code snippet below into your Emacs
config.

``` elisp
(use-package gerbil-mode
:when (getenv "GERBIL_INSTALL_PREFIX")
:ensure nil
:defer t
:mode (("\\.ss\\'" . gerbil-mode)
("\\.pkg\\'" . gerbil-mode))
:bind (:map comint-mode-map
(("C-S-n" . comint-next-input)
("C-S-p" . comint-previous-input)
("C-S-l" . clear-comint-buffer))
:map gerbil-mode-map
(("C-S-l" . clear-comint-buffer)))
:init
(setf gambit (getenv "GAMBIT_INSTALL_PREFIX"))
(setf gerbil (getenv "GERBIL_INSTALL_PREFIX"))
(setf gerbil-src (getenv "GERBIL_SRCDIR"))
(autoload 'gerbil-mode
(concat gerbil "/share/emacs/site-list/gerbil-mode.el") "Gerbil editing mode." t)
:hook
((gerbil-mode . linum-mode)
(inferior-scheme-mode-hook . gambit-inferior-mode))
:config
(require 'gambit
(concat gambit "/share/emacs/site-lisp/gambit.el"))
(setf scheme-program-name (concat gerbil "/bin/gxi"))
(let ((tags (locate-dominating-file default-directory "TAGS")))
(when tags (visit-tags-table tags)))
(visit-tags-table (concat gerbil-src "/src/TAGS"))
(when (package-installed-p 'smartparens)
(sp-pair "'" nil :actions :rem)
(sp-pair "`" nil :actions :rem))
(defun clear-comint-buffer ()
(progn
(defvar *gerbil-path*
(shell-command-to-string "gxi -e '(display (path-expand \"~~\"))'\
-e '(flush-output-port)'"))
(use-package gerbil-mode
:when (file-directory-p *gerbil-path*)
:ensure nil
:straight nil
:defer t
:mode (("\\.ss\\'" . gerbil-mode)
("\\.pkg\\'" . gerbil-mode))
:bind (:map comint-mode-map
(("C-S-n" . comint-next-input)
("C-S-p" . comint-previous-input)
("C-S-l" . clear-comint-buffer))
:map gerbil-mode-map
(("C-S-l" . clear-comint-buffer)))
:init
(autoload 'gerbil-mode
(expand-file-name "share/emacs/site-lisp/gerbil-mode.el" *gerbil-path*)
"Gerbil editing mode." t)
:hook
((gerbil-mode-hook . linum-mode)
(inferior-scheme-mode-hook . gambit-inferior-mode))
:config
(require 'gambit
(expand-file-name "share/emacs/site-lisp/gambit.el" *gerbil-path*))
(setf scheme-program-name (expand-file-name "bin/gxi" *gerbil-path*))
(let ((tags (locate-dominating-file default-directory "TAGS")))
(when tags (visit-tags-table tags)))
(let ((tags (expand-file-name "src/TAGS" *gerbil-path*)))
(when (file-exists-p tags) (visit-tags-table tags)))
(when (package-installed-p 'smartparens)
(sp-pair "'" nil :actions :rem)
(sp-pair "`" nil :actions :rem))
(defun clear-comint-buffer ()
(interactive)
(with-current-buffer "*scheme*"
(let ((comint-buffer-maximum-size 0))
(comint-truncate-buffer)))))
(defun gerbil-setup-buffers ()
"Change current buffer mode to gerbil-mode and start a REPL"
(interactive)
(with-current-buffer "*scheme*"
(let ((comint-buffer-maximum-size 0))
(comint-truncate-buffer)))))
(defun gerbil-setup-buffers ()
"Change current buffer mode to gerbil-mode and start a REPL"
(interactive)
(gerbil-mode)
(split-window-right)
(shrink-window-horizontally 2)
(let ((buf (buffer-name)))
(other-window 1)
(run-scheme "gxi")
(switch-to-buffer-other-window "*scheme*" nil)
(switch-to-buffer buf)))
(global-set-key (kbd "C-c C-g") 'gerbil-setup-buffers)
(gerbil-mode)
(split-window-right)
(shrink-window-horizontally 2)
(let ((buf (buffer-name)))
(other-window 1)
(run-scheme "gxi")
(switch-to-buffer-other-window "*scheme*" nil)
(switch-to-buffer buf)))
(global-set-key (kbd "C-c C-g") 'gerbil-setup-buffers))
```

To start open a Gerbil file or type `C-c C-g`. Alternatively run `M-x gerbil-mode` (to launch a REPL `run-scheme`).
Expand Down
8 changes: 8 additions & 0 deletions doc/guide/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,11 @@ If this variable is set, `gxpkg` will clone packages using `git` over
ssh instead of https.

Set this if you want to access private repose.

## GERBIL_TAGS_FORMAT

This variable is consulted by the `gxtags` tool when generating TAGS.
It can have the value `emacs` for emacs TAGS or `vim` for vi/vim/neovim TAGS.

If unset, the default format is `emacs`, so you should set this if you
are a vim user.
Loading

0 comments on commit be3f11e

Please sign in to comment.