summaryrefslogtreecommitdiff
path: root/doc
AgeCommit message (Collapse)AuthorFilesLines
2014-04-28Prefer foreign objects over smobs in manualAndy Wingo4-84/+24
* doc/ref/api-memory.texi (Memory Blocks): Recommend against scm_gc_free. Refer to foreign objects instead of smobs. Remove discussion of scm_must_malloc et al. * doc/ref/guile.texi (API Reference): Rename SMOB menu item. * doc/ref/libguile-snarf.texi (Function Snarfing): Update example to not refer to smobs. * doc/ref/tools.texi (How guile-snarf works): Likewise.
2014-04-28Remove doc/example-smob/Andy Wingo9-440/+1
* doc/example-smob/: Remove example. It's smaller than it used to be in Guile 1.8, and with foreign objects there's practically nothing interesting to test. * doc/oldfmt.c: Remove this hoary thing. * doc/README: * doc/Makefile.am: Update.
2014-04-28Remove SMOB tutorial; update manual.Andy Wingo10-887/+208
* doc/ref/libguile-smobs.texi: Remove; this tutorial is superseded by libguile-foreign-objects. * doc/ref/libguile-foreign-objects.texi: Proofreading. * doc/ref/libguile-program.texi: Update Dia examples to refer to foreign objects. * doc/ref/libguile-concepts.texi (Garbage Collection): Update to accurately describe the BDW-GC, and to avoid reference to mark functions. * doc/ref/guile.texi: Remove libguile-smobs, and reword API menu. * doc/ref/api-utility.texi (Equality): Mention GOOPS instead of SMOBs. * doc/ref/api-smobs.texi (Smobs): Describe as a legacy interface. Exhort readers against the writing of mark functions. * doc/ref/api-foreign-objects.texi (Foreign Objects): Proofreading. * doc/ref/api-control.texi (Catch): Fix ref to point to foreign objects. * doc/ref/Makefile.am: Remove libguile-smobs.texi.
2014-04-28Add foreign object documentationAndy Wingo4-2/+622
* doc/ref/api-foreign-objects.texi: * doc/ref/libguile-foreign-objects.texi: New files. * doc/ref/guile.texi: * doc/ref/Makefile.am: Link new files into docs.
2014-04-26Add interface to disable automatic finalizationAndy Wingo2-2/+53
* libguile/finalizers.h: * libguile/finalizers.c (run_finalizers_async_thunk): Call the new scm_run_finalizers helper. (scm_set_automatic_finalization_enabled, scm_run_finalizers): New functions. (scm_init_finalizers): Only set a finalizer notifier if automatic finalization is enabled. * doc/ref/libguile-smobs.texi (Garbage Collecting Smobs): Add discussion of concurrency. * doc/ref/api-smobs.texi (Smobs): Document new functions.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver6-6/+107
Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c
2014-04-17Add interface to disable automatic finalizationAndy Wingo2-2/+54
* libguile/finalizers.h: * libguile/finalizers.c (run_finalizers_async_thunk) (finalization_thread_proc): Call the new scm_run_finalizers helper. (scm_i_finalizer_pre_fork): Only spawn the thread if automatic finalization is enabled. (scm_set_automatic_finalization_enabled, scm_run_finalizers): New functions. (scm_init_finalizers, scm_init_finalizer_thread): Only set a finalizer notifier if automatic finalization is enabled. * doc/ref/libguile-smobs.texi (Garbage Collecting Smobs): Add discussion of concurrency. * doc/ref/api-smobs.texi (Smobs): Document new functions.
2014-03-17Documentation tweaks for the 'r7rs-symbols' read/print options.Mark H Weaver1-0/+12
* doc/ref/api-data.texi (Symbol Read Syntax): Mention the 'r7rs-symbols' print option, and provide example code to enable both the read and print options. Add 'r7rs-symbols' to the concept index.
2014-03-16Doc and NEWS updatesAndy Wingo1-0/+4
* NEWS: Update section on dynamic stacks. Add link for intptr interfaces. * doc/ref/api-data.texi (Integers): Add intptr interfaces.
2014-03-16Debug options doc fix.Andy Wingo1-2/+2
* doc/ref/api-debug.texi (Debug Options): Fix.
2014-03-16Document stack-overflow handlers, limits, and unwind-only exceptionsAndy Wingo1-56/+182
* module/system/repl/error-handling.scm (call-with-error-handling): Add #:report-keys kwarg, so that unwind-only exceptions (stack-overflow in particular) get reported. * doc/ref/api-debug.texi (Pre-Unwind Debugging): Add documentation for #:report-keys kwarg of call-with-error-handling. (Stack Overflow): New subsubsection. (Debug Options): Remove discussion of stack overflow.
2014-03-14SRFI-43 documentation tweaksMark H Weaver2-4/+6
* doc/ref/api-compound.texi (Vectors): Add cross-reference to SRFI-43. * doc/ref/srfi-modules.texi (SRFI-43 Selectors): Simplify description of 'vector-ref'.
2014-02-28Fix setitimer documentation. Allow microseconds >= 1e6.Andy Wingo1-15/+17
* doc/ref/posix.texi (Signals): Fix the documentation for setitimer; it was wrong. * libguile/scmsigs.c (pack_tv): New helper. Allow usecs >= 1e6. (unpack_tv): New helper. (scm_setitimer): Use the new helpers. * test-suite/tests/signals.test: Add setitimer tests.
2014-02-27Fix typo in manual.Mark H Weaver1-1/+1
* doc/ref/api-foreign.texi (Void Pointers and Byte Access): (rnrs bytevector) --> (rnrs bytevectors).
2014-02-18Add GDB extension to support Guile.Ludovic Courtès1-2/+40
* libguile/libguile-2.0-gdb.scm: New file. * libguile/Makefile.am (install-data-local): New target. Based on code from GNU libstdc++. (EXTRA_DIST): Add 'libguile-2.0-gdb.scm'. * doc/ref/api-debug.texi (GDB Support): New section.
2014-02-12Add cooperative REPL server module.David Thompson1-0/+45
Modified-by: Mark H Weaver <mhw@netris.org> * module/system/repl/coop-server.scm: New module. * module/system/repl/repl.scm (start-repl): Extract body to start-repl*. (start-repl*): New procedure. (run-repl): Extract body to run-repl*. (run-repl*): New procedure. * module/system/repl/server.scm (run-server): Extract body to run-server*. (run-server*): New procedure. * doc/ref/api-evaluation.texi (Cooperative REPL Servers): New node. * module/Makefile.am (SYSTEM_SOURCES): Add system/repl/coop-server.scm.
2014-02-12REPL Server: Fix 'stop-server-and-clients!'.Mark H Weaver1-0/+4
* module/system/repl/server.scm: Import (ice-9 match) and (srfi srfi-1). (*open-sockets*): Add comment. This is now a list of pairs with a 'force-close' procedure in the cdr. (close-socket!): Add comment noting that it is unsafe to call this from another thread. (add-open-socket!): Add 'force-close' argument, and put it in the cdr of the '*open-sockets*' entry. (stop-server-and-clients!): Use 'match'. Remove the first element from *open-sockets* immediately. Call the 'force-close' procedure instead of 'close-socket!'. (errs-to-retry): New variable. (run-server): Add a pipe, used in the 'force-close' procedure to cleanly shut down the server. Put the server socket into non-blocking mode. Use 'select' to monitor both the server socket and the pipe. Don't call 'add-open-socket!' on the client-socket. Close the pipe and the server socket cleanly when we're asked to shut down. (serve-client): Call 'add-open-socket!' with a 'force-close' procedure that cancels the thread. Set the thread cleanup handler to call 'close-socket!', instead of calling it in the main body. * doc/ref/api-evaluation.texi (REPL Servers): Add a caveat to the manual entry for 'stop-servers-and-clients!'.
2014-02-08Merge commit 'fb7dd00169304a5922838e4d2f25253640a35def'Andy Wingo2-67/+5
This commit also renames uniform-vector-element-type-code to array-type-code. Conflicts: libguile/uniform.c libguile/uniform.h test-suite/tests/arrays.test
2014-02-08Merge commit 'b9b88351ea2c4b43a6f90938554dc5693b17e328'Andy Wingo1-50/+1
Conflicts: libguile/deprecated.h test-suite/tests/00-socket.test
2014-02-08Merge commit 'b86069c1308a6ca36f3a3bc56134b3f8fd693592'Andy Wingo1-3/+3
Conflicts: libguile/hashtab.c
2014-02-08Merge commit '54cded99dc5db94b1df0dc417161ebef7c60d874'Andy Wingo1-5/+1
2014-02-08Deprecate general "uniform-vector" interfaceAndy Wingo2-67/+5
* libguile/uniform.h: * libguile/uniform.c (scm_is_uniform_vector, scm_uniform_vector_p) (scm_c_uniform_vector_length, scm_uniform_vector_length) (scm_uniform_vector_element_type, scm_uniform_vector_element_size) (scm_c_uniform_vector_ref, scm_uniform_vector_ref): (scm_c_uniform_vector_set_x, scm_uniform_vector_set_x): (scm_uniform_vector_to_list) (scm_uniform_vector_elements, scm_uniform_vector_writable_elements): Deprecate. This interface lacked both generality and specificity. The general replacement is array-length, array-ref, and friends on the scheme side, or the array handle interface on the C side. On the specific side of things, there are the specific bytevector, srfi-4, and bitvector interfaces. * test-suite/tests/arrays.test: * test-suite/tests/bitvectors.test: * test-suite/tests/ports.test: * test-suite/tests/srfi-4.test: Update to use array interfaces. * doc/ref/api-foreign.texi (Void Pointers and Byte Access): * doc/ref/srfi-modules.texi (SRFI-4): Update.
2014-02-08Deprecate htons, htonl, ntohs, ntohlAndy Wingo1-50/+1
* libguile/sockets.h: * libguile/sockets.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_htons, scm_htonl, scm_ntohs, scm_ntohl): Deprecate. Bytevectors adequately subsume their functionality. * doc/ref/posix.texi: * test-suite/tests/00-socket.test: Update.
2014-02-07Make size argument optional to 'make-doubly-weak-hash-table'; fix docs.Mark H Weaver1-3/+3
* libguile/hashtab.c (scm_make_doubly_weak_hash_table): Make 'size' argument optional, like the weak hash table constructors. * doc/ref/api-memory.texi (Weak hash tables): Document that 'size' argument is optional for the weak hash table constructors.
2014-02-07Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.Mark H Weaver1-5/+1
* doc/ref/api-memory.texi (Weak vectors): In 'weak-vector?' entry, don't claim that weak hash tables are weak vectors. Remove statement that weak vectors are mainly useful for implementing weak hash tables.
2014-02-07Merge commit '1e3fd6a0c81bb3e9900a93a9d1923cc788de0f99'Andy Wingo1-1/+12
Conflicts: doc/ref/api-memory.texi libguile/weaks.c libguile/weaks.h module/ice-9/weak-vector.scm
2014-02-07Merge commit '40a723a92236fe4e58feb89057b4182b1fc76810'Andy Wingo2-10/+6
2014-02-07Merge commit '5e69ceb7a667377a61cb0c31d7ac20e245b3fafd'Andy Wingo1-1/+1
2014-02-07Merge commit '866af5da3d11ac4a9df44ee8c5b1781a0073c288'Andy Wingo1-2/+25
Removes the special arity handler, and instead relies on the procedure returning the correct number of values.
2014-02-07Merge commit '34e89877342f20fdb8a531ad78dab34cfd2b0843'Andy Wingo1-0/+420
Conflicts: module/Makefile.am
2014-02-07Merge commit 'ca5e0414e96886177d883a249edd957d2331db65'Andy Wingo1-0/+25
Conflicts: module/language/tree-il/primitives.scm
2014-02-07Merge commit 'f6ddf827f8f192af7a8cd255bd8374a0d38bbb74'Andy Wingo1-5/+30
Conflicts: module/ice-9/boot-9.scm module/oop/goops.scm
2014-02-07Merge commit 'a5cbbaa66a2491453db0edff9b0cb592a98f61bf'Andy Wingo1-1/+1
2014-02-07Merge commit '8ca97482b01cf1a6aa538cc5a2d1f71fb60f080c'Andy Wingo1-0/+4
Conflicts: libguile/r6rs-ports.c
2014-02-07Merge commit '122f24cc8a3637ed42d7792ad1ff8ec0c49c58df'Andy Wingo1-0/+3
Conflicts: libguile/fports.c libguile/ports.c
2014-02-07Add weak-vector-length, weak-vector-ref, weak-vector-set!Andy Wingo1-1/+12
* libguile/weaks.c (scm_is_weak_vector, scm_c_weak_vector_length): (scm_c_weak_vector_ref, scm_c_weak_vector_set_x): New interfaces for dealing with weak vectors from C. (scm_weak_vector_length, scm_weak_vector_ref, scm_weak_vector_set_x): New Scheme interfaces to weak vectors; to be used instead of vector-length, vector-ref, etc. * module/ice-9/weak-vector.scm: Export the new interfaces. * doc/ref/api-memory.texi (Weak vectors): Document them.
2014-02-05Remove outdated documentation of LTDL_LIBRARY_PATH.Mark H Weaver1-8/+0
* doc/ref/guile-invoke.texi (Environment Variables): Remove documentation of 'LTDL_LIBRARY_PATH'.
2014-02-05Document 'equal?' in list of R6RS incompatibilities.Mark H Weaver1-2/+6
* doc/ref/r6rs.texi (R6RS Incompatibilities): Mention that 'equal?' may not terminate when applied to cyclic datums.
2014-02-03Update Gnulib to v0.1-77-gd9361daMark H Weaver1-1/+1
2014-02-02Add VM and compiler support for calls to known proceduresAndy Wingo1-0/+7
* module/language/cps.scm ($callk): New expression type, for calls to known labels. Part of "low CPS". * module/language/cps/arities.scm: * module/language/cps/closure-conversion.scm: * module/language/cps/compile-bytecode.scm: * module/language/cps/dce.scm: * module/language/cps/dfg.scm: * module/language/cps/effects-analysis.scm: * module/language/cps/simplify.scm: * module/language/cps/slot-allocation.scm: * module/language/cps/verify.scm: Adapt call sites. * libguile/vm-engine.c (call-label, tail-call-label): New instructions. Renumber the rest; this is an ABI change. * libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): * module/system/vm/assembler.scm (*bytecode-minor-version*): Bump. * doc/ref/compiler.texi (CPS in Guile): Document $callk.
2014-02-02Implement R7RS 'define-values'.Mark H Weaver1-2/+25
* module/ice-9/boot-9.scm (%define-values-arity-error): New procedure. (define-values): New macro. * doc/ref/api-binding.texi (Binding Multiple Values): Add docs. * test-suite/tests/syntax.test: Add tests.
2014-02-01Implement SRFI-64 - A Scheme API for test suites.Mark H Weaver1-0/+8
* module/srfi/srfi-64.scm: New file. * module/srfi/srfi-64/testing.scm: New file. * module/Makefile.am: Add rule for srfi-64.go dependency on srfi-64/testing.scm. (SRFI_SOURCES): Add srfi/srfi-64.scm. (NOCOMP_SOURCES): Add srfi/srfi-64/testing.scm. * doc/ref/srfi-modules.texi (SRFI-64): New node. * test-suite/tests/srfi-64.test: New file. * test-suite/tests/srfi-64-test.scm: New file. * test-suite/Makefile.am (SCM_TESTS): Add test-suite/tests/srfi-64.test. (EXTRA_DIST): Add tests/srfi-64-test.scm.
2014-02-01Implement SRFI-43 Vector Library.Mark H Weaver1-0/+412
* module/srfi/srfi-43.scm: New file. * module/Makefile.am (SRFI_SOURCES): Add module/srfi/srfi-43.scm. * test-suite/tests/srfi-43.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add test-suite/tests/srfi-43.test. * doc/ref/srfi-modules.texi (SRFI-43, SRFI-43 Constructors) (SRFI-43 Predicates, SRFI-43 Selectors, SRFI-43 Iteration) (SRFI-43 Searching, SRFI-43 Mutators, SRFI-43 Conversion): New nodes.
2014-01-26Document top-level pseudo-hygieneAndy Wingo1-0/+103
* doc/ref/api-macros.texi (Hygiene and the Top-Level): Add a section documenting our pseudo-hygienic top-level names.
2014-01-24Implement SRFI-111 Boxes.Mark H Weaver1-0/+25
* module/srfi/srfi-111.scm: New file. * module/Makefile.am (SRFI_SOURCES): Add srfi/srfi-111.scm. * test-suite/tests/srfi-111.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add tests/srfi-111.test. * doc/ref/srfi-modules.texi (SRFI-111): New node.
2014-01-23Improve docs for 'eval-when'.Mark H Weaver1-5/+30
* doc/ref/api-macros.texi (Eval When): Explain in detail what each condition means, including 'expand' which was previously undocumented. Change the example to use (expand load eval) and recommend that set of conditions, instead of (compile load eval) which was previously recommended and shown in the example.
2014-01-21Fix nested block comment example in manual.Mark H Weaver1-1/+1
Reported by Chris K. Jester-Young <cky944@gmail.com>. * doc/ref/api-evaluation.texi (Block Comments): Fix example.
2014-01-21Merge branch 'stable-2.0'Mark H Weaver3-10/+34
Conflicts: libguile/read.c test-suite/tests/web-response.test
2014-01-18Custom binary input ports support 'setvbuf'.Ludovic Courtès1-0/+4
* libguile/r6rs-ports.c (CBIP_BUFFER_SIZE): Adjust comment. Set to 8KiB. (SCM_SET_CBIP_BYTEVECTOR): New macro. (cbip_setvbuf): New function. (make_cbip): Set PORT's 'setvbuf' internal field. (cbip_fill_input): Check whether PORT is buffered. When unbuffered, check whether BV can hold C_REQUESTED bytes, and allocate a new bytevector if not; copy the data back from BV to c_port->read_pos. Remove 'again' label, and don't loop there. * test-suite/tests/r6rs-ports.test ("7.2.7 Input Ports")["custom binary input port unbuffered & 'port-position'", "custom binary input port unbuffered & 'read!' calls", "custom binary input port, unbuffered then buffered", "custom binary input port, buffered then unbuffered"]: New tests. * doc/ref/api-io.texi (R6RS Binary Input): Document the buffering of custom binary input ports, and link to 'setvbuf'.
2014-01-18Prepare 'setvbuf' to support for non-file ports.Ludovic Courtès1-0/+3
* libguile/ports-internal.h (struct scm_port_internal): Add setvbuf' field. Change 'pending_eof' to a 1-bit unsigned char. * libguile/ports.c (scm_new_port_table_entry): Clear 'pti->setvbuf'. * libguile/fports.c (scm_setvbuf): Accept any open port, and error out when PORT's setvbuf' field is NULL. Remove explicit 'scm_gc_free' calls. (scm_i_fdes_to_port): Set PORT's 'setvbuf' field. * test-suite/tests/ports.test ("setvbuf")["closed port", "string port"]: New tests. * doc/ref/posix.texi (Ports and File Descriptors): Suggest that 'setvbuf' works for different port types.