Skip to content

Releases: cosmos72/schemesh

Version 0.9.1

09 May 17:18
Compare
Choose a tag to compare

New features:

  • add functions (sh-start/fds) (sh-start/ports)
  • add macro (for-alist) and function (in-alist)
  • add shell builtin threads to list existing threads and their status
  • add thread management functions (get-thread) (thread) (thread-alive?) (thread-count) (thread-find) (thread-id) (thread-initial-bindings) (thread-kill) (threads) (threads-status)

Fixes:

  • fix saving history to ~/.cache/schemesh/history.txt
  • fix issue #26: flush all open C FILE* streams before fork()ing a subshell

Version 0.9.0

02 May 14:08
Compare
Choose a tag to compare

New features:

  • add build instructions for Windows using WSL
  • add build instructions for NixOS
  • add functions (sh-binary-port) (sh-textual-port) for accessing redirections of Scheme jobs
  • add functions (fork-process) (repl-answers) (repl-answers-display) (repl-history) (repl-history-display)
  • add functions creating customized, colored prompt and document them
  • add Racket-compatible functions (port->list) (port->string) (port->bytes) (port->lines) (port->bytes-lines)
    (read-line) (read-bytes-line) (lines->port) (byte-lines->port)
  • add macro (==>)

Improvements:

  • improve shell builtins fg bg and wait: job-id is now optional
  • improve autocompletion inside single or double quotes
  • display colored jobs status
  • add per-job ports, needed for buffering input/output of redirected Scheme jobs
  • refactor type vscreen to contain colored chars: will allow implementing syntax highlighting
  • install interruptible, unbuffered UTF-8b ports as (console-input-port) (console-output-port) and (console-error-port)
  • continue implementing library (schemesh ipc fifo)

Fixes:

  • fix job control bugs on macOS, closes issue #17
  • delete shell builtin unsafe, closes issue #23
  • fix bugs in replacement functions (get-bytevector-some) (putenv) (bytevector-sint-ref)
  • fix signal handlers to correctly react to signals received by secondary threads

Version 0.8.3

06 Apr 17:52
Compare
Choose a tag to compare

New features:

  • add functions (channel?) (channel-fd) (channel-pipe-pair) (channel-socket-pair) (channel-close) (channel-get) (channel-eof?) (channel-put) (in-channel) for exchanging data between different processes through a socket, pipe or analogous file descriptor. They internally serialize and deserialize data using library (schemesh wire)
  • add function (wire-register-rtd-fields) to quickly create serializers and deserializers for user-defined record types

Improvements:

  • improve (sh-run/string) and (sh-run/bvector) behavior if job being executed receives a signal
  • define optimized versions of standard - but currently slow - functions
    (bytevector-sint-ref) (bytevector-sint-set!) (bytevector-uint-ref)(bytevector-uint-set!)
  • add support for serializing and deserializing Chez Scheme time object to library (schemesh wire)

Fixes:

  • fix a visual glitch when pasting multiple lines at REPL, and last line does not end with a #\newline
  • remove Apache-licensed file containers/hashtable-types.ss that was copy-pasted from Chez Scheme sources: replace it with accessor functions obtained from record-type-descriptor objects.

Version 0.8.2

29 Mar 12:12
Compare
Choose a tag to compare

New features:

  • add shell builtin wait
  • add macros (shell-glob) and (shell-string) for expanding shell syntax to, respectively, a list of strings or a single string.
  • add macro (in-shell-glob) as a shortcut for (in-list (shell-glob))
  • rename function (sh-version) -> (sh-version-number) and add function (sh-version) that returns a string
  • add functions (bytespan->bytevector0) (countdown) (chargbuffer->charspans*) (chargbuffer->string) (charlines->charspan) (charlines->string) (fd-seek) (open-socketpair-fds) and macro (with-raw-tty)
  • add standalone executable countdown as an alternative to sleep
  • add serialization/deserialization library (schemesh wire) that exports the functions (datum->wire) (wire->datum) (wire-get) (wire-length) (wire-put) and can also be extended to support user-defined record types

Improvements:

  • extend functions (sh-find-job) and (sh-job) to accept #f as a shortcut for (or (sh-current-job) (sh-globals))
  • improve functions (sh-fg) (sh-bg) (sh-wait) to re-raise exceptions thrown by Scheme jobs
  • add lots of functions that intentionally shadow standard R6RS or Chez Scheme functions with the same name:
    (get-bytevector-all) (get-bytevector-n) (get-bytevector-some) (get-char) (get-datum) (get-line) (get-string-all) (get-string-n) (get-u8) (put-bytevector) (put-bytevector-some) (put-char) (put-datum) (put-string) (put-string-some) (put-u8)
    They are compatible replacements, and add the ability to omit the port argument, which defaults to (current-input-port) for (get-...) functions and to (current-output-port) for (put-...) functions
  • add functions (getenv) (putenv) that intentionally shadow standard R6RS or Chez Scheme functions with the same name:
    They are intended as replacements, and access environment variables of job-id #f i.e. either (sh-current-job) if it's set, or as fallback (sh-globals) that represents the main schemesh process
  • allow getting/setting port position in ports returned by functions (open-fd-redir-...-port) (open-file-binary-input-port) (open-file-utf8b-input-port) (current-input-port) (current-out-port) (current-error-port) (sh-stdin) (sh-stdout) (sh-stderr) if the underlying file descriptor supports seeking
  • improve the following functions to also accepts bytespan paths in addition to bytevector, string and charspan:
    (delete-directory) (delete-file) (directory-list) (directory-list-type) (mkdir) (file-delete) (file-directory?) (file-exists?) (file-rename) (file-regular?) (file-type) (open-file-fd) (open-file-utf8b-input-port) (text->bytevector) (text->bytevector0)
  • improve source code conformance to R6RS, and start creating an incomplete Racket compatibility layer to use when compiling schemesh from Racket #!r6rs mode

Fixes:

  • fix issue #12: a bug in shell syntax when parsing assignment after backslash+newline
  • fix macro (in-hash-pairs)

Version 0.8.1

15 Mar 14:09
Compare
Choose a tag to compare

New features:

  • replace standard Scheme textual ports (current-input-port) (current-output-port) (current-error-port)
    with interruptible ones that honor job redirections and use UTF-8b
  • export several new functions to iterate on lists, hashtables, strings, etc.
  • add script utils/show_system_info.sh and mention it in README.md when opening an issue

Improvements:

  • fix job control on Scheme jobs $() running inside a pipeline
  • update Scheme binary ports (sh-stdin) (sh-stdout) (sh-stderr) to be interruptible and honor job redirections
  • internally rewrite and cleanup POSIX signal handlers

Version 0.8.0

04 Mar 20:00
Compare
Choose a tag to compare

New features:

  • add function (sh-expr) to create shell jobs that execute arbitrary Scheme code, and the corresponding macro (shell-expr)
  • implement job control also on arbitrary Scheme code running inside a (shell-expr)
  • update both shell parser and Scheme parser to expand $( ) to (shell-expr ( ))

Improvements:

  • ignore newlines at the beginning of shell syntax: allows writing Scheme code in a new line under the REPL prompt
  • ignore newlines after shell syntax tokens { [ ! ; & && || | |& < <> > >> <& >& - in most cases, this removes the need to end a line with \ for continuing a shell command in the next line
  • always queue job status change notifications for later displaying them, instead of sometimes displaying them immediately

Removed features:

  • remove function (sh-resume) and subsume it into (sh-wait)
  • rename shell builtin expr -> value
  • remove function (sh-bool)

Version 0.7.7

01 Mar 15:16
Compare
Choose a tag to compare

Fixes:

  • fix (charhistory-save-to-path) not to raise exceptions: it was preventing schemesh
    from exiting if ~/.cache/schemesh/ directory does not exist or is not writable

Version 0.7.6

01 Mar 08:22
Compare
Choose a tag to compare

New features:

  • add new syntax for shell command substitution $[ ] and deprecate the old syntax $( )
  • add shell builtin cd- changes current directory of parent job to its previous value
  • add shell builtin parent executes another builtin in parent's environment and current directory
    If used multiple times, as parent parent command ls, effects are cumulative
  • add string-related functions (string-any) (string-contains) (string-count) (string-every) (string-index) (string-index-right) (string-join) (string-map) (string-replace-all) (string-replace-prefix) (string-replace-suffix) (string-prefix?) (string-suffix?)
  • export existing string-related functions (in-string) (string-fill-range!) (string-is-unsigned-base10-integer?) (string-is-signed-base10-integer?) (string-iterate) (string-list?) (string-list-split-after-nuls) (string-prefix/char?) (string-range-count=) (string-range=?) (string-range<?) (string-replace/char!) (string-rtrim-newlines!) (string-split) (string-split-after-nuls) (string-suffix/char?) (string-trim-split-at-blanks)
  • add functions (delete-directory) (delete-file) (file-directory?) (file-exists?) (file-regular?) (file-symbolic-link?)
    they intentionally replace Chez Scheme functions with the same names, adding support for file and directory names that are not valid UTF-8
  • add functions (in-exact-range) (ok?)

Fixes:

  • fix parsing character \ followed by newline inside Scheme strings
  • fix parsing character \ followed by newline in shell syntax
  • fix bugs in (on-list) and (in-fixnum-range)
  • propagate tty configuration from each command execution to the following ones

Improvements:

  • automatically (import (schemesh)) at REPL
  • rename existing functions to better follow r7rs naming conventions
  • rename shell builtin test -> expr and rename macro (shell-test) -> (shell-expr)
  • improve function (in-range) to dispatch to one of the optimized implementations (in-fixnum-range) (in-exact-range) (in-flonum-range)

Version 0.7.5

14 Feb 22:53
Compare
Choose a tag to compare

Fixes:

  • fix utils/find_chez_scheme_dir.sh for Alpine linux
  • fix a pair of bugged assertions that were triggered by valid code {echo $A=}
  • fix support for Chez Scheme down to 9.5.8

Improvements:

  • rename shell builtin "error" -> "test"
  • add command line option --load-file FILE and support for loading compiled Scheme libraries *.so
  • add functions (alist->eq-hashtable) (alist->eqv-hashtable) (alist->hashtable) (file-rename)
    (in-bytevector) (in-bytespan) (in-chargbuffer) (in-charline) (in-charlines) (in-charspan)
    (in-gbuffer) (in-hashtable) (in-list) (in-span) (in-string) (in-vector)
    (in-fixnum-range) (in-flonum-range) (in-range) (on-list)
    (sh-bool) (sh-run/string-split-after-nuls) (sh-version) (string-replace)
  • add macros (for) (for*) (library-reexport) (shell-test)
  • add Fedora Linux build instructions to README.md
  • add "Troubleshooting" section to README.md
  • add more examples to README.md

Version 0.7.4

10 Feb 17:21
Compare
Choose a tag to compare

Minor improvements:

  • update Makefile to follow GNU Makefile conventions - fixes issue #1
  • add builtins "help copyright" and "help warranty"
  • add more examples to README.md and mention more job-related Scheme functions
  • sort the queued notifications about job status changes before displaying them