1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
Commit graph

2229 commits

Author SHA1 Message Date
Tomas Volf
1c093d8bc4
doc: Recommend alist-copy instead of list-copy.
The current recommendation of `list-copy' is not right and does not lead
to preserving the original list:

    scheme@(guile-user)> (define x (list (cons 'a 1) (cons 'b 2)))
    scheme@(guile-user)> (define y (list-copy x))
    scheme@(guile-user)> (assq-set! y 'b 3)
    $1 = ((a . 1) (b . 3))
    scheme@(guile-user)> x
    $2 = ((a . 1) (b . 3))

Correct approach seems to be use `alist-copy' from SRFI-1 leading to the
expected behavior of:

    scheme@(guile-user)> ,use (srfi srfi-1)
    scheme@(guile-user)> (define x (list (cons 'a 1) (cons 'b 2)))
    scheme@(guile-user)> (define y (alist-copy x))
    scheme@(guile-user)> (assq-set! y 'b 3)
    $1 = ((a . 1) (b . 3))
    scheme@(guile-user)> x
    $2 = ((a . 1) (b . 2))

* doc/ref/api-data.texi (Adding or Setting Alist Entries): Recommend
`alist-copy'.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:45:11 +02:00
Nikolaos Chatzikonstantinou
a0368a6120
doc: Fix typo in FFI documentation.
The incorrect procedure is mentioned; see the example that immediately
follows.

* doc/ref/api-foreign.texi (Foreign Functions): fix typo to
pointer->procedure.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:45:03 +02:00
Juliana Sims
8d45f63c85
doc: Document the peek and pk procedures.
* doc/ref/api-debug.texi: Document the peek and pk procedures.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:44:41 +02:00
Tomas Volf
bfff7e1d6d
doc: Fix implication of omitting optional arguments.
According to the previous wording, omitting all optional arguments led
to empty interface.  That however was not the case and was only a
documentation bug (as confirmed by wingo on IRC).  So let us fix that.

* doc/ref/api-modules.texi (Using Guile Modules): Fix implication of
omitting optional arguments.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:44:40 +02:00
Tomas Volf
130fdb0c8d
doc: Document #:hide.
* doc/ref/api-modules.texi (Using Guile Modules): Document #:hide.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-26 19:44:40 +02:00
Daniel Llorens
818b879b2e doc: Fix use of literals in alist example
Fixes https://bugs.gnu.org/32841.

* doc/ref/srfi-modules.texi (alist-copy): Add anchor.
* doc/ref/api-data.texi (Alist Example): Fix use of literals.
2024-10-22 11:42:20 +02:00
Andrew McNulty
b7bd440f22
Fix typo in dynamic wind documentation.
* doc/ref/api-control.texi: Fix typo in dynamic wind
documentation.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-10-20 21:22:22 +02:00
Matthew Wette
78e9e51065 Redirect diagnostice output messages (e.g., auto-compiling code) to a newly defined current-info-port, and add a command line argument -I' to set the current-info-port to a void-port. * libguile/ports.c: add cur_infoport_fluid, scm_current_info_port, scm_set_current_info_port; define default current-info-port to stderr * libguile/load.c(compiled_is_fresh,load_thunk_from_path, do_try_auto_compile,scm_sys_warn_auto_compilation_enabled, scm_primitive_load_path): direct output messages to current_info_port; was current_warning_port * libguile/init.c(scm_init_standard_ports): set default current_info_port * module/ice-9/ports.scm: define current-info-port and set-current-info-port * module/ice-9/command-line.scm(*usage*,compile-shell-switches): add argument -I' to silence diagnostics (or current-info-port to void-port) * doc/ref/guile-invoke.texi: add description for `-I' command argument 2024-10-12 13:16:25 +02:00
Daniel Llorens
83d6d6afd9 Better error messages in array functions
* doc/ref/api-data.texi (Arrays as arrays of arrays): Clarify
  ambiguities, fix examples.
* libguile/arrays.c (make-shared-array): Make error messages specific to
  each error case, report relevant arguments.
  (array_from_pos): Return NULL on error instead of reporting error
  ourselves.
  (array_from_get_o): Handle the trivial case.
  (scm_array_slice, scm_array_cell_ref, scm_array_cell_set_x): Don't
  build error arguments before error happens. Let array_from_get_o
  handle the trivial case.
2024-08-12 14:24:58 +02:00
Yuval Langer
2047b532fa api-data.texi: fix typo in "Real and Rational Numbers" section
* doc/ref/api-data.texi: fix typo in "Real and Rational Numbers" section

[rlb@defaultvalue.org: adjust commit message]

Closes: 59572
2024-08-03 14:25:10 -05:00
Richard Sent
8535682dda doc: Mention how to remove namespaces in xml->sxml.
* doc/ref/sxml.texi (Reading and Writing XML): Document behavior of #f
namespace prefix.

This documents behavior discussed in
https://lists.gnu.org/archive/html/guile-user/2024-07/msg00013.html.
2024-07-23 08:23:43 +02:00
Andy Wingo
7401ca75b3 Add link to foreign functions from gsubr doc
* doc/ref/api-procedures.texi (Primitive Procedures): Add link.
2024-06-20 14:39:41 +02:00
Andy Wingo
305b2fa70c Add documentation on embedded procedure properties
* doc/ref/api-procedures.texi (Procedure Properties): Document inline
procedure properties.
2024-06-20 13:54:31 +02:00
Maxim Cournoyer
4fe6d19a5b bug#71303: [PATCH] doc: Fix typo in PEG example.
* doc/ref/api-peg.texi (PEG API Reference): Fix typo in PEG example.
2024-06-18 10:36:50 +02:00
Arne Babenhauserheide
dce65edbaf
Add language/wisp, Wisp tests, and SRFI-119 documentation
* doc/ref/srfi-modules.texi (srfi-119): add node
* module/language/wisp.scm: New file.
* module/language/wisp/spec.scm: New file.
* test-suite/tests/srfi-119.test: New file.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-06-01 11:50:16 +02:00
Rob Browning
779a83d9c6 make-foreign-object-type: add #:super to provide superclasses
* module/system/foreign-object.scm (make-foreign-object-type): allow
specification of superclasses via #:super.
2024-05-17 12:53:39 -05:00
Juliana Sims
a222503a89
Second argument of ‘unread-string’ is optional.
Fixes <https://bugs.gnu.org/67063>.

* doc/ref/api-io.texi (Venerable Port Interfaces): Bring unread-string
procedure documentation in line with other procedures in the section.
* libguile/ports.c (scm_unread_string): Make port argument optional.
* test-suite/tests/ports.test: Test unread-char and unread-string
without ports.
* NEWS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-06 11:51:53 +02:00
Morgan Smith
f27e8b855f
Fix typos throughout codebase.
* NEWS:
* doc/ref/api-control.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-deprecated.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-foreign.texi:
* doc/ref/api-i18n.texi:
* doc/ref/api-io.texi:
* doc/ref/api-languages.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-memory.texi:
* doc/ref/api-modules.texi:
* doc/ref/api-options.texi:
* doc/ref/api-peg.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/api-utility.texi:
* doc/ref/expect.texi:
* doc/ref/goops.texi:
* doc/ref/misc-modules.texi:
* doc/ref/posix.texi:
* doc/ref/repl-modules.texi:
* doc/ref/scheme-ideas.texi:
* doc/ref/scheme-scripts.texi:
* doc/ref/srfi-modules.texi:
* gc-benchmarks/larceny/dynamic.sch:
* gc-benchmarks/larceny/twobit-input-long.sch:
* gc-benchmarks/larceny/twobit.sch:
* libguile/gc.h:
* libguile/ioext.c:
* libguile/list.c:
* libguile/options.c:
* libguile/posix.c:
* libguile/threads.c:
* module/ice-9/boot-9.scm:
* module/ice-9/optargs.scm:
* module/ice-9/ports.scm:
* module/ice-9/pretty-print.scm:
* module/ice-9/psyntax.scm:
* module/language/elisp/parser.scm:
* module/language/tree-il/compile-bytecode.scm:
* module/srfi/srfi-37.scm:
* module/srfi/srfi-43.scm:
* module/statprof.scm:
* module/texinfo/reflection.scm:
* test-suite/tests/eval.test:
* test-suite/tests/fluids.test:
Fix typos.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-05-06 11:51:53 +02:00
Ludovic Courtès
696acfc9e5
‘seek’ now accepts ‘SEEK_DATA’ and ‘SEEK_HOLE’ where supported.
* libguile/ports.c (scm_seek): Let SEEK_DATA and SEEK_HOLE through.
(scm_init_ice_9_ports): Define ‘SEEK_DATA’ and ‘SEEK_HOLE’.
* module/ice-9/ports.scm: Export ‘SEEK_DATA’ and ‘SEEK_HOLE’ when
defined.
* test-suite/tests/ports.test ("size of sparse file")
("SEEK_DATA while on data", "SEEK_DATA while in hole")
("SEEK_HOLE while in hole"): New tests.
* NEWS: Update.
2024-04-15 19:58:25 +02:00
Rob Browning
db7efa5d20 api-procedures.texi: remove make-binding, binding:name/boxed?/...
* doc/ref/api-procedures.texi: remove make-binding, binding:name,
binding:boxed?, binding:index, binding:start, and binding:end since they
no longer exist.

cf. 1a2711a848
2024-04-05 17:58:20 -05:00
Andy Wingo
e15617dc0e Expose read-c-struct, write-c-struct syntax
* module/system/foreign.scm (read-c-struct): Rename from read-fields.
Export.
(write-c-struct): Rename from write-fields.  Export.
(%write-c-struct, %read-c-struct): Add % prefix to these private
bindings.
2024-03-17 21:40:58 +01:00
Tomas Volf
e1690f3fd2
Add copy-on-write support to scm_copy_file.
On modern file-systems (BTRFS, ZFS) it is possible to copy a file using
copy-on-write method.  For large files it has the advantage of being
much faster and saving disk space (since identical extents are not
duplicated).  This feature is stable and for example coreutils' `cp'
does use it automatically (see --reflink).

This commit adds support for this feature into our copy-file procedure.
Same as `cp', it defaults to 'auto, meaning the copy-on-write is
attempted, and in case of failure the regular copy is performed.

No tests are provided, because the behavior depends on the system,
underlying file-system and its configuration.  That makes it challenging
to write a test for it.  Manual testing was performed instead:

    $ btrfs filesystem du /tmp/cow*
         Total   Exclusive  Set shared  Filename
      36.00KiB    36.00KiB       0.00B  /tmp/cow

    $ cat cow-test.scm
    (copy-file "/tmp/cow" "/tmp/cow-unspecified")
    (copy-file "/tmp/cow" "/tmp/cow-always" #:copy-on-write 'always)
    (copy-file "/tmp/cow" "/tmp/cow-auto" #:copy-on-write 'auto)
    (copy-file "/tmp/cow" "/tmp/cow-never" #:copy-on-write 'never)
    (copy-file "/tmp/cow" "/dev/shm/cow-unspecified")
    (copy-file "/tmp/cow" "/dev/shm/cow-auto" #:copy-on-write 'auto)
    (copy-file "/tmp/cow" "/dev/shm/cow-never" #:copy-on-write 'never)
    $ ./meta/guile -s cow-test.scm

    $ btrfs filesystem du /tmp/cow*
         Total   Exclusive  Set shared  Filename
      36.00KiB       0.00B    36.00KiB  /tmp/cow
      36.00KiB       0.00B    36.00KiB  /tmp/cow-always
      36.00KiB       0.00B    36.00KiB  /tmp/cow-auto
      36.00KiB    36.00KiB       0.00B  /tmp/cow-never
      36.00KiB       0.00B    36.00KiB  /tmp/cow-unspecified

    $ sha1sum /tmp/cow* /dev/shm/cow*
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-always
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-auto
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-never
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /tmp/cow-unspecified
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-auto
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-never
    4c665f87b5dc2e7d26279c4b48968d085e1ace32  /dev/shm/cow-unspecified

This commit also adds to new failure modes for (copy-file).

Failure to copy-on-write when 'always was passed in:

    scheme@(guile-user)> (copy-file "/tmp/cow" "/dev/shm/cow" #:copy-on-write 'always)
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure copy-file: copy-on-write failed: Invalid cross-device link

Passing in invalid value for the #:copy-on-write keyword argument:

    scheme@(guile-user)> (copy-file "/tmp/cow" "/dev/shm/cow" #:copy-on-write 'nevr)
    ice-9/boot-9.scm:1676:22: In procedure raise-exception:
    In procedure copy-file: invalid value for #:copy-on-write: nevr

* NEWS: Add note for copy-file supporting copy-on-write.
* configure.ac: Check for linux/fs.h.
* doc/ref/posix.texi (File System)[copy-file]: Document the new
signature.
* libguile/filesys.c (clone_file): New function cloning a file using
FICLONE, if supported.
(k_copy_on_write): New keyword.
(sym_always, sym_auto, sym_never): New symbols.
(scm_copy_file2): Renamed from scm_copy_file.  New #:copy-on-write
keyword argument.  Attempt copy-on-write copy by default.
(scm_copy_file): Call scm_copy_file2.
* libguile/filesys.h: Add scm_copy_file2 as SCM_INTERNAL.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-03-12 14:04:41 +01:00
Tomas Volf
2556b9a216
bug#68507: [PATCH] doc: Fix example in list-transduce example.
While the `.' might be correct from a grammatical point of view (I do
not know), it turns the example into invalid scheme code, which is not
ideal.  New users (like me) might try to copy the whole line and wonder
why it does not work (like I did).  So delete it.

* doc/ref/srfi-modules.texi (SRFI-171 General Discussion): Delete the
trailing . from the example.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2024-01-24 11:14:10 +01:00
Ludovic Courtès
65c054fe56
doc: Remove reference to “benevolent dictators”.
Fixes <https://bugs.gnu.org/63366>.
Suggested by Sebastian Carlos <sebaaa1754@gmail.com>.

* doc/ref/intro.texi (Introduction): Remove reference to Python and
Perl, which no longer have “benevolent dictators”.
2024-01-24 11:12:06 +01:00
無無
d8df317baf Minor typo in the manual
* doc/ref/api-modules.texi: Fix typo.

Fixes <https://bugs.gnu.org/67487>.

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2023-11-28 11:18:05 +01:00
Ekaitz Zarraga
1e3b5390e3 Fix example in syntax-rules doc
* doc/ref/api-macros.texi (Macros): Fix doc1 macro example

Fixes debbugs.gnu.org/65132.
2023-09-28 12:11:10 +02:00
Andy Wingo
c2cba86785 Better compilation of calls to raise-exception
Recognize `raise-exception` in the same way we recognize `throw`, though
it is a bit less optimized and the boot story is not as complicated.

* doc/ref/vm.texi (Non-Local Control Flow Instructions):
* libguile/jit.c (compile_unreachable):
(compile_unreachable_slow):
* libguile/vm-engine.c (VM_NAME):
* module/language/cps/compile-bytecode.scm (compile-function):
* module/system/vm/assembler.scm (emit-unreachable): Add new
"unreachable" instruction, inserted after a call to non-continuable
`raise-exception`.
* module/language/tree-il/compile-cps.scm (raise-exception):
* module/language/tree-il/primitives.scm
(*interesting-primitive-names*): Recognize raise-exception, and if it is
called with just one argument, prune that branch of the control-flow
graph.
2023-08-28 12:11:19 +02:00
Bruno Victal
99e644dbc7
doc: Use archived URL from Internet Archive for syntax-rules primer.
* doc/ref/api-macros.texi (Syntax Rules): Use archived URL from
Internet Archive for syntax-rules primer.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-16 22:34:01 +02:00
Morgan Smith
c7d170c5d1
Fix typos throughout codebase.
* NEWS:
* README:
* doc/r5rs/r5rs.texi:
* doc/ref/api-data.texi:
* doc/ref/api-debug.texi:
* doc/ref/api-evaluation.texi:
* doc/ref/api-io.texi:
* doc/ref/api-macros.texi:
* doc/ref/api-procedures.texi:
* doc/ref/api-scheduling.texi:
* doc/ref/api-undocumented.texi:
* doc/ref/libguile-concepts.texi:
* doc/ref/posix.texi:
* doc/ref/srfi-modules.texi:
* doc/ref/vm.texi:
* doc/ref/web.texi:
* examples/box-dynamic-module/box.c:
* examples/box-dynamic/box.c:
* examples/box-module/box.c:
* examples/box/box.c:
* examples/safe/safe:
* examples/scripts/README:
* examples/scripts/hello:
* gc-benchmarks/larceny/twobit-input-long.sch:
* gc-benchmarks/larceny/twobit-smaller.sch:
* gc-benchmarks/larceny/twobit.sch:
* libguile/expand.c:
* libguile/load.c:
* libguile/net_db.c:
* libguile/scmsigs.c:
* libguile/srfi-14.c:
* libguile/threads.c:
* meta/guile.m4:
* module/ice-9/match.upstream.scm:
* module/ice-9/ports.scm:
* module/language/cps/graphs.scm:
* module/scripts/doc-snarf.scm:
* module/srfi/srfi-19.scm:
* module/system/repl/command.scm:
* test-suite/tests/srfi-18.test:
Fix typos.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-07-16 22:09:01 +02:00
Andy Wingo
f320ce8979 Modernize soft ports
* doc/ref/api-io.texi (Soft Ports): Update docs.
* module/ice-9/boot-9.scm (make-soft-port): Don't eagerly load soft
ports.
* module/ice-9/soft-ports.scm (deprecated-make-soft-port): Rename from
make-soft-port.
(make-soft-port): New interface.
2023-06-08 10:21:28 +02:00
Andy Wingo
075599e5b0 Implement R6RS custom textual ports
* module/ice-9/textual-ports.scm (custom-textual-port-read+flush-input):
(custom-textual-port-write):
(custom-textual-port-seek):
(custom-textual-port-close):
(custom-textual-port-random-access?):
(make-custom-textual-input-port):
(make-custom-textual-output-port):
(make-custom-textual-input/output-port): New procedures.
* doc/ref/api-io.texi (Ports): Update docs.
* doc/ref/r6rs.texi (rnrs io ports): Mention custom textual port
interfaces.
* module/rnrs/io/ports.scm: Re-export custom textual port interfaces
from (ice-9 textual-ports).
* test-suite/tests/r6rs-ports.test: Add minimal tests for textual ports.
2023-06-08 10:21:02 +02:00
Andy Wingo
1852fbfef9 Add "custom ports"
Custom ports are a kind of port that exposes the C port type interface
directly to Scheme.  In this way the full capability of C is available
to Scheme, and also the read and write functions can be tail-called from
Scheme (via port-read / port-write).

* libguile/custom-ports.c:
* libguile/custom-ports.h:
* module/ice-9/custom-ports.scm: New files.
* libguile/init.c:
* libguile/Makefile.am:
* am/bootstrap.am: Add to the build.
* doc/ref/api-io.texi: Update the manual.
2023-06-08 09:03:10 +02:00
Daniel Llorens
f0df1ed0fd Fix no-clause case-lambda in peval
This is checked by optargs.test, which 3b47f87618
broke.

* module/language/tree-il/peval.scm (peval): Account for no clause (= no body)
  case-lambda.
2023-03-17 21:17:10 +01:00
Daniel Llorens
52465f0ce7 Fix typo in raise-exception documentation
* doc/ref/api-control.texi (Raising and Handling Exceptions): Fix typo,
  h/t gtz on #guile.
2023-02-24 16:05:18 +01:00
Daniel Llorens
35566ea585 Document multiple-value returns in forms taking a let-expression body
* doc/ref/api-binding.texi (Local Bindings): Document multiple-value
  returns for let.
* doc/ref/api-control.texi (begin): Document multiple-value returns for
  begin.
  (Conditionals): Document multiple-value returns and use 'body' in the
  syntax description of when, unless, cond, case.
  (Multiple values): Document multiple-value returns and use 'body' in
  the syntax description of SRFI-8 receive.
  (Fluids and Dynamic States): Use 'body' in the syntax description of
  'with-fluids'.
2023-01-25 12:52:29 +01:00
Linus
764e3614b8 Add internal definitions to derived forms
This commit adds internal definitions to the following derived
forms: when, unless, cond, case, with-fluids, and and-let*.

 * doc/ref/api-control.texi (Conditionals): Update the syntax and docs
   of when, unless, cond, and case.
 * module/ice-9/and-let-star.scm (and-let*): Changed begins to let.
 * module/ice-9/boot-9.scm (cond, case, when, unless, with-fluids):
   Changed begins to let.
2023-01-24 17:11:38 +01:00
Ludovic Courtès
2ace7a5312 doc: Mention URL of Guile-GnuTLS.
* doc/ref/web.texi (Web Client): Mention new URL of Guile-GnuTLS.
2023-01-19 15:48:47 +01:00
Daniel Llorens
e903b76795 Document R7RS functions related to bytevectors
* doc/ref/api-data.texi (Bytevectors): Fix typo in (r6:bytevector-copy),
  index need not be positive.
  Fix typos in bytevector-length, bytevector=, bytevector-fill!.
  New node 'Bytevector Procedures in R7RS'.
  (Bytevector Procedures in R7RS): Document R7RS bytevector,
  bytevector-copy, bytevector-copy!, bytevector-append.
* doc/ref/api-io.texi (Binary I/O): Document R7RS
  open-output-bytevector, write-u8, read-u8, peek-u8,
  get-output-bytevector, open-input-bytevector, read-bytevector!,
  read-bytevector, write-bytevector.
* doc/ref/r7rs.texi (R7RS support): Link to R7RS standard.
2023-01-17 16:07:48 +01:00
Jean Abou Samra
ff165ec904 Doc: clarification on regexes and encodings
* doc/ref/api-regex.texi: make it more obviously clear that regexp
  matching supports only characters supported by the locale encoding.
2023-01-17 07:20:10 +01:00
Jean Abou Samra
7d5ab8fa40 doc: Fix eval-when example
* doc/ref/api-macros.texi: make the macro expand to the literal
  date, not to a call to the date function.  The example previously
  did not actually need eval-when and did not show the intended
  effect.
2023-01-17 07:06:55 +01:00
Ludovic Courtès
e441c34f16 Add 'bytevector-slice'.
* module/rnrs/bytevectors/gnu.scm: New file.
* am/bootstrap.am (SOURCES): Add it.
* libguile/bytevectors.c (scm_bytevector_slice): New function.
* libguile/bytevectors.h (scm_bytevector_slice): New declaration.
* test-suite/tests/bytevectors.test ("bytevector-slice"): New tests.
* doc/ref/api-data.texi (Bytevector Slices): New node.
2023-01-14 16:14:17 +01:00
Josselin Poiret
551929e4fb Add 'spawn'.
* libguile/posix.c: Include spawn.h from Gnulib.
(do_spawn, scm_spawn_process): New functions.
(kw_environment, hw_input, kw_output, kw_error, kw_search_path): New
variables.
* doc/ref/posix.texi (Processes): Document it.
* test-suite/tests/posix.test ("spawn"): New test prefix.
* NEWS: Update.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-01-13 16:05:30 +01:00
Vijay Marupudi
8cb2d5c953 doc: fix documented keyword argument default to match code default 2022-12-21 08:29:42 +01:00
Jean Abou Samra
b54263dc98 Doc: document that eq?, eqv? and equal? take any number of arguments 2022-12-11 02:19:19 +01:00
Arne Babenhauserheide
beb7a2af79 doc: Lee Thomas suggested the name change.
See (1994-11-04) https://groups.google.com/g/gnu.misc.discuss/c/0VtEf1fgEJk/m/IMBs2o-ftrgJ
> If GEL and GUL and GLUE don't work for the name of the scripting
> language, how about:
>
> GUILE - GNU's Universal Interpreted Language Extension
>
> (This also implies Scheme-ing, and means that the GNU's Universal
> Interpreted Language Developers would be part of a ...)
> --
> Lee Thomas

and (1994-11-22) https://groups.google.com/g/gnu.misc.discuss/c/9pD9yVoRYFw/m/0z7SLYbx8loJ
> Why "GUILE"? (GNU's Universal Interpreted Language Extension)
> Two additional reasons:
>
> 1. It does not give deliberate offense to Dr. Ousterhout or his
> supporters, thereby allowing the warring factions to eventually
> make peace (along with some others, perhaps - Gloria's 'Usband Is
> Linguistically Educated) and get back to work.
> 2. By pronunciation it offers appreciation to one of the co-inventors
> of Scheme. (Maybe a library package could be named "Scheme User
> Supported System Macros And Native-code"? OK, that's a stretch ...)
> --
> Lee Thomas,

and https://groups.google.com/g/comp.lang.scheme/c/X5GrLVAvGLU/m/Xk11xCrbzCcJ
> A while back, I started calling the language being built by the GNU Project
> GEL. It turns out that GEL is a trademark of Sybase Inc. Therefore,
> we must choose a new name. Please do not refer to the GNU language
> as GEL.
>
> My favorite proposed name, posted recently to comp.lang.scheme, is GUILE.
> I like the name, because i think programmers should be encouraged to use
> GUILE when writing programs. The name may change yet again; but for now,
> please refer to the GNU language as GUILE.
>
> -t
2022-12-10 18:23:52 +01:00
Colin Woodbury
856c3f96fa doc: Fix minor typos
The spelling mistake is a clear fix, but the Arrays fix might not be as
obvious. Previously, with the "arrays" alias, the @ref macro would
render a superfluous period after the word "arrays", rendering (at least
within Emacs) as:

  you may wish to use see arrays. instead.

Signed-off-by: Mikael Djurfeldt <mikael@djurfeldt.com>
2022-12-09 13:15:56 +01:00
Ludovic Courtès
f72cd79152 doc: Fix typo in VM instruction name.
* doc/ref/vm.texi (Intrinsic Call Instructions): Fix name of
'call-scm<-thread'.
2022-11-01 22:02:25 +01:00
Maxime Devos
c8b81ffb34 Define Scheme bindings to ‘openat’ when available.
* configure.ac: Detect if ‘openat’ is defined.
* libguile/filesys.c
  (flags_to_mode): Extract from ...
  (scm_mode): ... here.
  (scm_open_fdes_at, scm_openat): Define the Scheme bindings.
* libguile/filesys.h (scm_open_fdes_at, scm_openat): Make them part
  of the API.
* doc/ref/posix.texi (File System): Document them.
* test-suite/tests/filesys.test ("openat"): Test ‘openat’.
* libguile/syscalls.h (openat_or_openat64): Decide between ‘openat’
  and ‘openat64’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:42:20 +02:00
Maxime Devos
cf255dd3a4 Define a Scheme binding to ‘fstatat’ when available.
* configure.ac: Detect if ‘fstatat’ is defined.
* libguile/filesys.c (scm_statat): Define a Scheme binding to ‘fstatat’.
* libguile/filesys.h (scm_statat): Make it part of the C API.
* doc/ref/posix.texi (File System): Document it.
* libguile/syscalls.h (fstatat_or_fstatat64): Choose between ‘fstatat’
  and ‘fstatat64’.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:41:10 +02:00
Maxime Devos
0af3c2f509 Define a Scheme binding to ‘fchownat’ when it exists.
* configure.ac: Detect whether ‘fchownat’ is available.
* libguile/filesys.c (scm_chownat): Define a Scheme binding to
  ‘fchownat’ when available.
* libguile/filesys.h (scm_chownat): Make it part of the API.
* doc/ref/posix.texi (File System): Document it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2022-10-21 17:40:37 +02:00