bpt/guile.git
13 years agoConfront the MOP
Neil Jerram [Fri, 14 Jan 2011 21:53:37 +0000 (21:53 +0000)]
Confront the MOP

* doc/ref/goops.texi (The Metaobject Protocol): Bring forward to
  before `Class Options', and add intro text to explain why.  All of
  the sections now remaining are ones where the MOP is more likely to
  be relevant than not.

13 years agoMove `GOOPS Error Handling' to after `Introspection'
Neil Jerram [Fri, 14 Jan 2011 21:23:54 +0000 (21:23 +0000)]
Move `GOOPS Error Handling' to after `Introspection'

* doc/ref/goops.texi (GOOPS Error Handling): Move to just after
  `Introspection'.

13 years agoMove `Handling Slot Access Errors' inside `Accessing Slots'
Neil Jerram [Fri, 14 Jan 2011 21:19:51 +0000 (21:19 +0000)]
Move `Handling Slot Access Errors' inside `Accessing Slots'

* doc/ref/goops.texi (Accessing Slots): Move `Handling Slot Access
  Errors' here; update relevant references.

13 years agoMerge small sections into `GOOPS Object Miscellany'
Neil Jerram [Fri, 14 Jan 2011 20:34:41 +0000 (20:34 +0000)]
Merge small sections into `GOOPS Object Miscellany'

* doc/ref/goops.texi (GOOPS Object Miscellany): New section, combining
  previous `Object Comparison', `Cloning Objects' and `Write and
  Display'.  Replace `Object Comparison' text with something that
  makes sense.  Add a snippet to the end of the write/display section.

13 years agoRemove content-free `Generic Functions and Accessors'
Neil Jerram [Fri, 14 Jan 2011 20:10:33 +0000 (20:10 +0000)]
Remove content-free `Generic Functions and Accessors'

* doc/ref/goops.texi (GOOPS): Remove `Generic Functions and
  Accessors'.  There was nothing here that wasn't better covered
  elsewhere.

13 years agoMove `Accessing Slots' inside `Introspection'.
Neil Jerram [Fri, 14 Jan 2011 20:06:34 +0000 (20:06 +0000)]
Move `Accessing Slots' inside `Introspection'.

* doc/ref/goops.texi (Introspection): Move `Accessing Slots' into
  here, and flatten it, except for `Handling Slot Access Errors'.
  (GOOPS Error Handling): Move `Handling Slot Access Errors' here.

13 years agoReorder `Introspection'
Neil Jerram [Fri, 14 Jan 2011 20:01:29 +0000 (20:01 +0000)]
Reorder `Introspection'

* doc/ref/goops.texi (Instances): Move `Instances' before `Slots', as
  it feels more important.

13 years agoEdit `Introspection'
Neil Jerram [Fri, 14 Jan 2011 19:45:38 +0000 (19:45 +0000)]
Edit `Introspection'

* doc/ref/goops.texi (Introspection): Make a bit snappier.
  (Classes): Add intro.  Remove "the" and "metaobject" everywhere.
  Remove `class-environment', since I don't know what it's useful for.
  (Instances): Remove implementation notes.
  (Built-in classes): Merge with `Instances'.  Reorder text points.
  (Generic Functions): Add intro.  Remove "the" and "metaobject"
  everywhere.
  (Generic Function Methods): Merge with `Generic Functions'.

13 years agoMove `Introspection' earlier
Neil Jerram [Fri, 14 Jan 2011 19:08:46 +0000 (19:08 +0000)]
Move `Introspection' earlier

* doc/ref/goops.texi (Introspection): Move to after `Generic Functions
  and Methods'.  The idea is to have all of that sections that make
  sense without needing to understand the MOP, before sections that
  really depend on the MOP.

13 years agoImprove doc on generic functions and inheritance
Neil Jerram [Wed, 12 Jan 2011 23:42:40 +0000 (23:42 +0000)]
Improve doc on generic functions and inheritance

* doc/ref/goops.texi (Methods and Generic Functions): More explanation
  of generic function invocation.  Created (or moved) subsections here
  to cover material on the following that was previously spread elsewhere:
  accessors; extending primitives; merging generics; generic function
  examples; handling invocation errors.  Edited for clarity throughout.
  (Generic functions and methods, Example): Nodes deleted, with their
  material incorporated above.
  (Class Precedence List): Edited to improve clarity.
  (Sorting Methods): New subsection.

13 years agoweb.texi defun -> deffn
Andy Wingo [Tue, 11 Jan 2011 06:40:43 +0000 (22:40 -0800)]
web.texi defun -> deffn

* doc/ref/web.texi (URIs): Change instances of @defun to @deffn with
  {Scheme Procedure}.

13 years agomore web.texi foo
Andy Wingo [Tue, 11 Jan 2011 06:35:39 +0000 (22:35 -0800)]
more web.texi foo

* doc/ref/web.texi (Web Server, Web Examples): Update.

13 years agoupdate web.text documentation for requests and responses
Andy Wingo [Tue, 11 Jan 2011 06:23:38 +0000 (22:23 -0800)]
update web.text documentation for requests and responses

* doc/ref/web.texi (Requests, Responses): Update, and add a note on
  character encodings.

13 years agorequest and response cleanups
Andy Wingo [Tue, 11 Jan 2011 06:22:56 +0000 (22:22 -0800)]
request and response cleanups

* module/web/request.scm (build-request): Make URI a positional
  argument.

* module/web/response.scm: Remove extend-response.
  (read-response): Fix a docstring.
* module/web/server.scm (extend-response): Include extend-response here,
  but not exported.

13 years ago(web response) and (web request): bodies are bytevectors
Andy Wingo [Tue, 11 Jan 2011 06:09:57 +0000 (22:09 -0800)]
(web response) and (web request): bodies are bytevectors

* module/web/request.scm (read-request-body, write-request-body): Rename
  from read-request-body/bytevector and
  write-request-body/bytevector.  Remove the /latin-1 variants, as they
  were unused and a bad idea.
* module/web/response.scm (read-response-body, write-response-body):
  Likewise.

* module/web/server/http.scm (http-read, http-write): Adapt to
  request/response change.

* test-suite/tests/web-request.test:
* test-suite/tests/web-response.test: Update tests.

13 years agoupdate web.texi for (web http) changes
Andy Wingo [Mon, 10 Jan 2011 17:32:26 +0000 (09:32 -0800)]
update web.texi for (web http) changes

* doc/ref/web.texi (HTTP Headers): Update to reflect current code, and
  to reformat. Not sure if it's an improvement...

13 years agoparse credentials and challenges
Andy Wingo [Mon, 10 Jan 2011 16:20:29 +0000 (08:20 -0800)]
parse credentials and challenges

* module/web/http.scm (parse-credentials, validate-credentials)
  (write-credentials, parse-challenge, parse-challenges)
  (validate-challenges, write-challenge, write-challenges)
  (declare-credentials-header!, declare-challenge-list-header!): New
  helpers.
  ("Authorization", "Proxy-Authorization"): Parse out credentials.
  ("Proxy-Authenticate", "WWW-Authenticate"): Parse out challenges.

13 years agomore symbols in (web http)
Andy Wingo [Sun, 9 Jan 2011 05:32:14 +0000 (21:32 -0800)]
more symbols in (web http)

* module/web/http.scm (declare-symbol-list-header!): New helper.
  ("Connection"): Redefine as a header list.
  ("Allow", "Content-Encoding", "Accept-Ranges"): Redefine as symbol
  lists.

* test-suite/tests/web-http.test:
* test-suite/tests/web-response.test: Adapt tests.

13 years ago(web http): keys are always symbols
Andy Wingo [Sun, 9 Jan 2011 04:50:46 +0000 (20:50 -0800)]
(web http): keys are always symbols

* module/web/http.scm (parse-media-type): Parse media types as symbols.
  (parse-key-value-list, parse-param-component, parse-param-list):
  Change kons to val-parser. Always parse keys as symbols, and always
  either cons, if there is a val, or just have the key, if there is no
  val.  Easier to explain and just as correct.
  (declare-param-list-header!, declare-key-value-list-header!): Adapt to
  key-list and param-list kons change.
  ("Cache-Control", "Pragma", "Transfer-Encoding", "Accept", "Expect")
  ("TE"): Likewise, adapt.
  ("Content-Type"): Param keys are symbols.

13 years agoupdate (web http) docs
Andy Wingo [Sat, 8 Jan 2011 20:21:38 +0000 (12:21 -0800)]
update (web http) docs

* doc/ref/web.texi (HTTP): Update docs to correspond with current code.

13 years ago(web http): don't expose header-decl objects
Andy Wingo [Sat, 8 Jan 2011 19:40:20 +0000 (11:40 -0800)]
(web http): don't expose header-decl objects

* module/web/http.scm: Change to not expose the header-decl objects,
  instead exposing header-parse, header-validator, header-writer et al.
  Explaining header decls in the manual was too complicated.
  (string->header, header->string): New helpers.
  (<header-decl>): Remove the `sym' field.
  (declare-header!): Adapt to header-decl change, and use
  string->header.
  (known-header?, header-parser, header-validator, header-writer): New
  procedures.

  Adapt to use the new procedures internally.

13 years ago(web http): header names always represented as symbols
Andy Wingo [Sat, 8 Jan 2011 18:54:07 +0000 (10:54 -0800)]
(web http): header names always represented as symbols

* module/web/http.scm (declare-header!): No need to specify `sym', as it
  can be derived from `name'. Change to take parser, validator, and
  writer as positional arguments, and multiple? as a keyword.
  (parse-header): Change to take the header as a symbol already, and
  just return the parsed value.  All headers are symbols now, including
  unknown headers.  I feel OK doing this given that the symbol GC works
  now.
  (lookup-header-decl): Only look up headers by symbol.
  (read-header): Adapt to parse-header change.

  (valid-header?, write-header): Adapt to all headers being symbols.
  (split-header-names, list-of-header-names?, write-header-list):
  Represent all header names as symbols.

  (declare-opaque-header!, declare-date-header!)
  (declare-string-list-header!, declare-header-list-header!)
  (declare-integer-header!, declare-uri-header!)
  (declare-quality-list-header!, declare-param-list-header!)
  (declare-key-value-list-header!, declare-entity-tag-list-header!):
  Change to be functions instead of syntax, and no need to specify the
  symbolic name. Update all header declarations accordingly.

* module/web/request.scm (validate-headers):
* module/web/response.scm (validate-headers): Adapt to all headers being
  symbols.

* test-suite/tests/web-http.test (pass-if-parse, pass-if-any-error)
  (pass-if-parse-error): Update for parse-header change.
  ("general headers"): Update header list examples to be all symbols.

13 years agofix scm_from_stringn empty string case
Andy Wingo [Sat, 8 Jan 2011 06:16:10 +0000 (22:16 -0800)]
fix scm_from_stringn empty string case

* libguile/strings.c (scm_from_stringn): Fix empty string case
  (oops...).

13 years agofix tab completion in repl (doh)
Andy Wingo [Sat, 8 Jan 2011 06:01:27 +0000 (22:01 -0800)]
fix tab completion in repl (doh)

* libguile/hashtab.c: Fix remaining vector hash table support.
* module/ice-9/session.scm (apropos-fold): Use a hash table instead of a
  vector for the completions.

13 years agorevert unfinished web.texi changes
Andy Wingo [Fri, 7 Jan 2011 17:31:36 +0000 (09:31 -0800)]
revert unfinished web.texi changes

These were prematurely committed in
17072fd2c6acad1d4f2b5c98eb0d62911ea07406.

13 years agouse scm_from_latin1_symboln for string literals and load-symbol
Andy Wingo [Fri, 7 Jan 2011 17:08:58 +0000 (09:08 -0800)]
use scm_from_latin1_symboln for string literals and load-symbol

* libguile/bytevectors.c:
* libguile/eval.c:
* libguile/goops.c:
* libguile/i18n.c:
* libguile/load.c:
* libguile/memoize.c:
* libguile/modules.c:
* libguile/ports.c:
* libguile/print.c:
* libguile/procs.c:
* libguile/programs.c:
* libguile/read.c:
* libguile/script.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/strings.c:
* libguile/throw.c:
* libguile/vm.c: Use scm_from_latin1_symboln to make symbols from string
  literals, because they aren't in the user's locale -- they are in
  ASCII, and we can optimize this case.

* libguile/vm-i-loader.c: Also use scm_from_latin1_symboln when loading
  narrow symbols.

13 years agooptimize scm_from_latin1_symboln
Andy Wingo [Fri, 7 Jan 2011 17:03:12 +0000 (09:03 -0800)]
optimize scm_from_latin1_symboln

* libguile/symbols.c (lookup_interned_latin1_symbol): New helper.
  (scm_from_latin1_symboln): Use lookup_interned_latin1_symbol, so we
  avoid allocating a string in that case.

13 years agolookup_interned_symbol uses get_handle_by_hash
Andy Wingo [Fri, 7 Jan 2011 16:42:15 +0000 (08:42 -0800)]
lookup_interned_symbol uses get_handle_by_hash

* libguile/symbols.c (lookup_interned_symbol): Change to use
  scm_hash_fn_get_handle_by_hash.

13 years agoadd scm_hash_fn_get_handle_by_hash
Andy Wingo [Fri, 7 Jan 2011 16:36:39 +0000 (08:36 -0800)]
add scm_hash_fn_get_handle_by_hash

* libguile/hashtab.h:
* libguile/hashtab.c (scm_hash_fn_get_handle_by_hash): New internal
  procedure, which should make symbol table lookup faster.

13 years agoremove vector hash table code
Andy Wingo [Fri, 7 Jan 2011 15:44:27 +0000 (07:44 -0800)]
remove vector hash table code

* libguile/hashtab.c: Remove deprecated hash-tables-as-vectors support
  code.

13 years agohashtab cleanups
Andy Wingo [Fri, 7 Jan 2011 00:20:54 +0000 (16:20 -0800)]
hashtab cleanups

* libguile/hashtab.c: Update comments.
  (hashtable_size): Allow bigger vectors on 64-bit machines.

13 years agofix symbol garbage collection
Andy Wingo [Thu, 6 Jan 2011 04:15:11 +0000 (20:15 -0800)]
fix symbol garbage collection

* libguile/symbols.c (lookup_interned_symbol, intern_symbol): Refactor
  to use hashtab.[ch] interfaces.

13 years agoadd hash functions for locale, latin1, and utf8 strings
Andy Wingo [Thu, 6 Jan 2011 02:43:28 +0000 (18:43 -0800)]
add hash functions for locale, latin1, and utf8 strings

* libguile/hash.c (scm_i_locale_string_hash)
  (scm_i_latin1_string_hash, scm_i_utf8_string_hash): New functions.

13 years agomultibyte regex error handling fix
Andy Wingo [Thu, 6 Jan 2011 00:40:22 +0000 (16:40 -0800)]
multibyte regex error handling fix

* libguile/regex-posix.c (fixup_multibyte_match): Fix mbrlen error
  handling.

13 years agohash.c cleanup
Andy Wingo [Thu, 6 Jan 2011 00:32:48 +0000 (16:32 -0800)]
hash.c cleanup

* libguile/hash.c (scm_hasher): Remove needless remember_upto_here.

13 years agoadd scm_from_{latin1,utf8}_symbol{n,}
Andy Wingo [Thu, 6 Jan 2011 00:24:32 +0000 (18:24 -0600)]
add scm_from_{latin1,utf8}_symbol{n,}

* libguile/symbols.c (scm_from_latin1_symbol, scm_from_latin1_symboln)
  (scm_from_utf8_symbol, scm_from_utf8_symboln): New functions.

13 years agoadd scm_{to,from}_{utf8,latin1}_string{n,}
Andy Wingo [Thu, 6 Jan 2011 00:21:54 +0000 (18:21 -0600)]
add scm_{to,from}_{utf8,latin1}_string{n,}

* libguile/strings.h:
* libguile/strings.c (scm_from_latin1_string, scm_to_latin1_string): New
  functions, in terms of the latin1_stringn variants.
  (scm_from_utf8_string, scm_from_utf8_stringn)
  (scm_to_utf8_string, scm_to_utf8_stringn): New functions.
  (scm_i_from_utf8_string, scm_i_to_utf8_string): Removed these internal
  functions.
  (scm_from_stringn): Handle -1 as a length. Unlike the previous
  behavior of scm_from_locale_string (NULL), which returned the empty
  string, we now raise an error.  The null pointer is not the same as
  the empty string.

* libguile/stime.c (scm_strftime, scm_strptime): Adapt to publishing of
  utf8 functions.

13 years agoread-header returns EOF at end, update (web http) docs
Andy Wingo [Sun, 2 Jan 2011 17:42:25 +0000 (12:42 -0500)]
read-header returns EOF at end, update (web http) docs

* doc/ref/web.texi (HTTP): Add an example for declaring a header, and
  adapt to read-header change.

* module/web/http.scm (read-header): Return EOF for both values if there
  are no more headers, instead of #f.
  (read-headers): Adapt.

13 years agoupdate URI documentation
Andy Wingo [Sun, 2 Jan 2011 15:16:57 +0000 (10:16 -0500)]
update URI documentation

* doc/ref/web.texi (Types and the Web): Fix spacing.
  (URIs): Give default values, and clarify a number of procedure docs.
  Update "encoding" name, and string->uri name.

13 years agouri-encode fast path
Andy Wingo [Sun, 2 Jan 2011 15:07:54 +0000 (10:07 -0500)]
uri-encode fast path

* module/web/uri.scm (uri-encode): Add a fast-path for the common case
  in which the string does not contain any reserved characters.

13 years agouri-decode #:encoding, not #:charset
Andy Wingo [Sun, 2 Jan 2011 14:41:14 +0000 (09:41 -0500)]
uri-decode #:encoding, not #:charset

* module/web/uri.scm (call-with-encoded-output-string, encode-string)
  (decode-string, uri-decode, uri-encode): Change all instances of
  "charset" to "encoding", as variables and arguments.

13 years agorename string->uri and uri->string.
Andy Wingo [Fri, 31 Dec 2010 17:44:11 +0000 (12:44 -0500)]
rename string->uri and uri->string.

* module/web/uri.scm (string->uri, uri->string): Rename from parse-uri
  and unparse-uri.

* test-suite/tests/web-uri.test:
* module/web/http.scm: All callers changed.

13 years agoclarify uri fragment discussion
Andy Wingo [Fri, 31 Dec 2010 16:53:14 +0000 (11:53 -0500)]
clarify uri fragment discussion

* doc/ref/web.texi (URIs): Clarify the discussion of URI fragments.

13 years agorewrite web.texi intro
Andy Wingo [Fri, 31 Dec 2010 16:12:07 +0000 (11:12 -0500)]
rewrite web.texi intro

* doc/ref/web.texi (Web): Rewrite the intro.
  (Types and the Web): New subsection, a mini-rant.

13 years agoTiny style improvement in the ECMAScript compiler.
Ludovic Courtès [Wed, 5 Jan 2011 21:22:15 +0000 (22:22 +0100)]
Tiny style improvement in the ECMAScript compiler.

Followup to 8891bd1b166b7210c241a0c1a730fc3af7f45b8a ("Fix ECMAScript
object creation.").

* module/language/ecmascript/compile-tree-il.scm (comp): Use `@implv'
  for `new-object'.  Suggested by Kan-Ru Chen <kanru@kanru.info>.

13 years agoChange `getaddrinfo' test to handle the GNU-specific `EAI_NODATA'.
Ludovic Courtès [Wed, 5 Jan 2011 21:17:26 +0000 (22:17 +0100)]
Change `getaddrinfo' test to handle the GNU-specific `EAI_NODATA'.

* doc/ref/posix.texi (Network Databases): Mention `EAI_NODATA'.

* libguile/net_db.c (scm_getaddrinfo): Likewise for the docstring.

* test-suite/tests/net-db.test ("getaddrinfo")["no name"]: Handle
  `EAI_NODATA'.

13 years agoFix ECMAScript object creation.
Noah Lavine [Mon, 3 Jan 2011 07:22:35 +0000 (02:22 -0500)]
Fix ECMAScript object creation.

* module/language/ecmascript/compile-tree-il.scm (compile-tree-il):
  generate correct tree-il for construction of new objects.
* test-suite/tests/ecmascript.test (ecompile): Add pattern with EXPECTED
  omitted.
  ("compiler"): test whether we generate new objects correctly.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
13 years agoDocument `scm_misc_error' (bug #31969).
Ludovic Courtès [Tue, 4 Jan 2011 17:29:55 +0000 (18:29 +0100)]
Document `scm_misc_error' (bug #31969).

* doc/ref/api-control.texi (Handling Errors): Add `scm_misc_error'.
  Suggested by Bake Timmons <b3timmons@speedymail.org> (bug #31969).

13 years agoImprove doc of `string-index', `string-index-right', and `string-rindex'.
Ludovic Courtès [Tue, 4 Jan 2011 17:08:58 +0000 (18:08 +0100)]
Improve doc of `string-index', `string-index-right', and `string-rindex'.

Suggested by Noah Lavine <noah.b.lavine@gmail.com>.

* doc/ref/api-data.texi (String Searching): Mention the return value of
  `string-index', `string-index-right', and `string-rindex' when no
  match is found.

* libguile/srfi-13.c (scm_string_index, scm_string_index_right,
  scm_string_rindex): Adjust docstring accordingly.

13 years agoManual typo fix
Neil Jerram [Thu, 23 Dec 2010 12:10:52 +0000 (12:10 +0000)]
Manual typo fix

* doc/ref/api-overview.texi (API Overview): bot -> but

13 years agoHave `lookahead-u8' and `get-u8' actually do binary input.
Ludovic Courtès [Mon, 20 Dec 2010 23:18:20 +0000 (00:18 +0100)]
Have `lookahead-u8' and `get-u8' actually do binary input.

* libguile/r6rs-ports.c (scm_lookahead_u8): Use `scm_get_byte_or_eof'
  instead of `scm_peek_char'.
  (scm_get_u8): Likewise.

* test-suite/tests/r6rs-ports.test ("7.2.8 Binary
  Input")["lookahead-u8"]: Fix typo.
  ["lookahead-u8 non-ASCII"]: New test.

13 years agoTemporarily fix `unistr.in.h' to allow compilation with `-Wundef'.
Ludovic Courtès [Tue, 7 Dec 2010 21:49:46 +0000 (22:49 +0100)]
Temporarily fix `unistr.in.h' to allow compilation with `-Wundef'.

See <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24225> for details.

* lib/unistr.in.h: Change #if's into #ifdef's.

13 years agoUpdate Gnulib to v0.0-4544-gce083ca.
Ludovic Courtès [Mon, 20 Dec 2010 21:51:46 +0000 (22:51 +0100)]
Update Gnulib to v0.0-4544-gce083ca.

13 years agoformat handles ~@c better
Andy Wingo [Sat, 18 Dec 2010 12:13:16 +0000 (13:13 +0100)]
format handles ~@c better

* module/ice-9/format.scm (format): Fix ascii-ism in ~@c. Pull
  flush-output? into the let*.

13 years agomore format tweaks
Andy Wingo [Sat, 18 Dec 2010 12:02:07 +0000 (13:02 +0100)]
more format tweaks

* module/ice-9/format.scm (format): Strip format: prefix from port and
  output-col.

13 years agomore format tweaks
Andy Wingo [Sat, 18 Dec 2010 11:57:29 +0000 (12:57 +0100)]
more format tweaks

* module/ice-9/format.scm (format): Move the port and output-col to let*
  vars, again removing a set!. We will probably move more state vars to
  the let*, to let the procedures exist in a more fixed-point style.

13 years agotake advantage of letrec* in format
Andy Wingo [Sat, 18 Dec 2010 11:50:00 +0000 (12:50 +0100)]
take advantage of letrec* in format

* module/ice-9/format.scm (format): Take advantage of letrec* internal
  expansion, and so have fewer set! invocations.

13 years agoinline format:out into format
Andy Wingo [Sat, 18 Dec 2010 11:42:50 +0000 (12:42 +0100)]
inline format:out into format

* module/ice-9/format.scm (format): Inline format:out into the body.

13 years agomore format cleanups
Andy Wingo [Sat, 18 Dec 2010 11:32:14 +0000 (12:32 +0100)]
more format cleanups

* module/ice-9/format.scm (format): Remove the need to save a copy of
  the incoming arguments, because they are available as local
  variables.  Do the check early for the format-string actually being a
  string.

13 years agoformat's first arg is "destination"
Andy Wingo [Sat, 18 Dec 2010 11:20:26 +0000 (12:20 +0100)]
format's first arg is "destination"

* module/ice-9/format.scm: The argument to format is "destination", not
  "port". Fix this newly reintroduced buglet.

13 years agoinline format:format into format
Andy Wingo [Sat, 18 Dec 2010 11:15:12 +0000 (12:15 +0100)]
inline format:format into format

* module/ice-9/format.scm (format): Inline format:format body.

13 years agodeprecate omission of port to ice-9 format
Andy Wingo [Sat, 18 Dec 2010 11:06:53 +0000 (12:06 +0100)]
deprecate omission of port to ice-9 format

* module/ice-9/format.scm (format): Add port and format-string as formal
  arguments. Seems also to have triggered a reindent.  Formally
  deprecate omitting the port, as it's usually an error.

* test-suite/tests/format.test ("format basic output")
  ("format basic output", "~{ iteration"): Fix up tests that omitted the
  destination port.

13 years agoletrec -> internal definitions in format.scm
Andy Wingo [Sat, 18 Dec 2010 10:44:57 +0000 (11:44 +0100)]
letrec -> internal definitions in format.scm

* module/ice-9/format.scm (format): Change from letrec to internal
  definitions, and use the define (foo ...) .. shorthand. No semantic
  change.

13 years agoformat.scm cleanups
Andy Wingo [Sat, 18 Dec 2010 10:27:19 +0000 (11:27 +0100)]
format.scm cleanups

* module/ice-9/format.scm (format:symbol-case-conv)
  (format:iobj-case-conv): Remove these exports, they were not used.
  (format:expch): Remove this one, though it was used.
  (format:floats, format:complex-numbers, format:radix-pref): Inline
  these "configuration variables" into the format body.

13 years agoice-9 format license update
Andy Wingo [Sat, 18 Dec 2010 10:21:29 +0000 (11:21 +0100)]
ice-9 format license update

* module/ice-9/format.scm: A more standard copyright header, with
  LGPLv3+ instead of public domain. Update define-module block.

13 years agoBump version number for 1.9.14.
Ludovic Courtès [Fri, 17 Dec 2010 20:57:19 +0000 (21:57 +0100)]
Bump version number for 1.9.14.

* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.

13 years agoTweak `NEWS'.
Ludovic Courtès [Fri, 17 Dec 2010 20:48:16 +0000 (21:48 +0100)]
Tweak `NEWS'.

* NEWS: Update.

13 years agofutures: Store pending futures in a queue.
Ludovic Courtès [Fri, 17 Dec 2010 20:23:23 +0000 (21:23 +0100)]
futures: Store pending futures in a queue.

* module/ice-9/futures.scm (%futures): Change from a list to a queue.
  (register-future!, process-futures, touch): Adjust accordingly.
  (unregister-future!): Remove.

13 years agoClarify doc regarding threading of `par-map' and `par-for-each'.
Ludovic Courtès [Fri, 17 Dec 2010 20:17:42 +0000 (21:17 +0100)]
Clarify doc regarding threading of `par-map' and `par-for-each'.

* doc/ref/api-scheduling.texi (Parallel Forms): Refine wording for
  `par-map' and `par-for-each'.

13 years agoadd www-commit rule in doc/ref
Andy Wingo [Fri, 17 Dec 2010 15:41:58 +0000 (16:41 +0100)]
add www-commit rule in doc/ref

* doc/ref/Makefile.am (www-commit): Add rule to update docs on web site.

13 years agoRemove conflicting `scm_is_string' declaration.
Ludovic Courtès [Fri, 17 Dec 2010 13:34:22 +0000 (14:34 +0100)]
Remove conflicting `scm_is_string' declaration.

* libguile/strings.h: Move `scm_is_string' declaration...
* libguile/inline.h: ... here.
  Reported by Noah Lavine <noah.b.lavine@gmail.com>.

13 years agofix unbound fluid tests
Andy Wingo [Fri, 17 Dec 2010 12:53:29 +0000 (13:53 +0100)]
fix unbound fluid tests

* test-suite/tests/fluids.test: Fix tests.

13 years agoupdate NEWS
Andy Wingo [Fri, 17 Dec 2010 12:33:29 +0000 (13:33 +0100)]
update NEWS

* NEWS: Update.

13 years agoguile-user has no filename
Andy Wingo [Fri, 17 Dec 2010 12:30:07 +0000 (13:30 +0100)]
guile-user has no filename

* module/ice-9/boot-9.scm (guile-user): Set #:filename to #f for
  guile-user module, as guile-user isn't really associated with any
  file.

13 years agoadd ,reload meta-command and document it and reload-module
Andy Wingo [Fri, 17 Dec 2010 12:27:43 +0000 (13:27 +0100)]
add ,reload meta-command and document it and reload-module

* module/ice-9/boot-9.scm (reload-module): Add docstring.
* module/system/repl/command.scm (reload): New meta-command.

* doc/ref/scheme-using.texi (Module Commands): Document the ,reload
  meta-command.
* doc/ref/api-modules.texi (Module System Reflection): Document
  reload-module.

13 years agodocument variable-unset!
Andy Wingo [Fri, 17 Dec 2010 12:16:36 +0000 (13:16 +0100)]
document variable-unset!

* doc/ref/api-modules.texi (Variables): Document variable-unset!.

* NEWS: Update.

13 years agodocument make-unbound-fluid et al
Andy Wingo [Fri, 17 Dec 2010 12:14:13 +0000 (13:14 +0100)]
document make-unbound-fluid et al

* doc/ref/api-scheduling.texi (Fluids and Dynamic States): Document the
  new fluid routines.

* NEWS: Update.

13 years agorename make-undefined-fluid to make-unbound-fluid
Andy Wingo [Fri, 17 Dec 2010 12:10:03 +0000 (13:10 +0100)]
rename make-undefined-fluid to make-unbound-fluid

* libguile/fluids.c (scm_make_unbound_fluid): Rename from
  scm_make_undefined_fluid.

* libguile/fluids.h:
* module/language/elisp/runtime.scm: Update referrers.

13 years agomulticast manual updates
Andy Wingo [Fri, 17 Dec 2010 12:04:23 +0000 (13:04 +0100)]
multicast manual updates

* doc/ref/posix.texi (Network Sockets and Communication): Add
  IP_MULTICAST_TTL and IP_MULTICAST_IF docs, from the docstring.

* NEWS: Update.

13 years agomore web.texi "hacking"
Andy Wingo [Fri, 17 Dec 2010 11:54:21 +0000 (12:54 +0100)]
more web.texi "hacking"

* doc/ref/web.texi (Web Server, Web Examples): Finish these sections.

13 years agobuild-response validates headers
Andy Wingo [Fri, 17 Dec 2010 11:01:34 +0000 (12:01 +0100)]
build-response validates headers

* module/web/response.scm (build-response): Add some validation, like
  for build-request.

13 years agoImplement `(ice-9 threads)' high-level constructs in terms of futures.
Ludovic Courtès [Thu, 16 Dec 2010 22:44:55 +0000 (23:44 +0100)]
Implement `(ice-9 threads)' high-level constructs in terms of futures.

* module/ice-9/threads.scm (parallel, par-mapper): Rewrite in terms of
  `future' and `touch'.

* test-suite/tests/threads.test ("par-map", "par-for-each"): New test
  prefixes.

* doc/ref/api-scheduling.texi (Parallel Forms): Add cross-ref to
  futures.  Recommend against the `n-' variants.

13 years agofutures: Support multiple-value returns.
Ludovic Courtès [Thu, 16 Dec 2010 16:38:32 +0000 (17:38 +0100)]
futures: Support multiple-value returns.

* module/ice-9/futures.scm (process-future!): Use `call-with-values'
  when invoking `(future-thunk future)'.

* test-suite/tests/future.test ("futures")["multiple values"]: New test.

13 years agofutures: Fix potential deadlock.
Ludovic Courtès [Thu, 16 Dec 2010 16:37:02 +0000 (17:37 +0100)]
futures: Fix potential deadlock.

* module/ice-9/futures.scm (process-futures): Fix potential deadlock,
  whereby %FUTURES-MUTEX would be acquired *after* FUTURE's mutex.

13 years agoRehash weak hash tables less frequently.
Ludovic Courtès [Thu, 16 Dec 2010 16:07:50 +0000 (17:07 +0100)]
Rehash weak hash tables less frequently.

* libguile/hashtab.c (weak_bucket_assoc): Call `scm_i_rehash' only when
  REMAINING is below `SCM_HASHTABLE_LOWER (table)'.

13 years agoFix `hash' for pointer objects.
Ludovic Courtès [Thu, 16 Dec 2010 16:06:52 +0000 (17:06 +0100)]
Fix `hash' for pointer objects.

Previously all pointer objects would hash to the same value.

* libguile/hash.c (scm_hasher): Add case for `scm_tc7_pointer'.

13 years agoInline `scm_is_string'.
Ludovic Courtès [Thu, 16 Dec 2010 14:20:10 +0000 (15:20 +0100)]
Inline `scm_is_string'.

* libguile/strings.c (scm_is_string): Move to...
* libguile/inline.h (scm_is_string): ... here.  Inline.

13 years agoAdd `compose', `negate', and `const'.
Ludovic Courtès [Thu, 16 Dec 2010 14:14:33 +0000 (15:14 +0100)]
Add `compose', `negate', and `const'.

* module/ice-9/boot-9.scm (compose, negate, const): New procedures.

* doc/ref/api-procedures.texi (Higher-Order Functions): New node.

* test-suite/Makefile.am (SCM_TESTS): Add `tests/procs.test'.

* test-suite/tests/procs.test: New file.

13 years agoupdate web-response tests for http header parsing change
Andy Wingo [Thu, 16 Dec 2010 18:38:48 +0000 (19:38 +0100)]
update web-response tests for http header parsing change

* test-suite/tests/web-response.test ("example-1"): Update for change in
  parsing Vary header.

13 years agoupdate NEWS
Andy Wingo [Thu, 16 Dec 2010 18:33:16 +0000 (19:33 +0100)]
update NEWS

* NEWS: Update for Web documentation.

13 years agomore web.texi work
Andy Wingo [Thu, 16 Dec 2010 18:31:50 +0000 (19:31 +0100)]
more web.texi work

* doc/ref/web.texi (Requests, Responses): Flesh out.
  (Web Examples): New section, replacing "Web Handlers". The only one
  that's not really written yet.

13 years agoadd section on format of parsed http headers
Andy Wingo [Thu, 16 Dec 2010 18:06:41 +0000 (19:06 +0100)]
add section on format of parsed http headers

* doc/ref/web.texi (HTTP Headers): New section. Needs some examples,
  though.

13 years agohttp: lists of header names parse better
Andy Wingo [Thu, 16 Dec 2010 17:12:08 +0000 (18:12 +0100)]
http: lists of header names parse better

* module/web/http.scm (list-of-strings?, write-list-of-strings): Move
  definitions up.
  (split-header-names, list-of-header-names?, write-header-list): New
  helpers.
  (declare-header-list-header): New helper.
  (cache-control): Use split-header-names for private and no-cache.
  (trailer): Use declare-header-list-header to parse known headers to
  symbols.
  (vary): Likewise, use split-header-names et al.

* test-suite/tests/web-http.test ("general headers"): Add a test.

13 years agobetter cache-control: private, no-cache parsing
Andy Wingo [Thu, 16 Dec 2010 16:56:03 +0000 (17:56 +0100)]
better cache-control: private, no-cache parsing

* module/web/http.scm (cache-control): Parse private and no-cache
  better.
* test-suite/tests/web-http.test ("general headers"): Update.

13 years agofix web.texi
Andy Wingo [Thu, 16 Dec 2010 15:44:44 +0000 (16:44 +0100)]
fix web.texi

* doc/ref/web.texi: Texinfo syntax fixen!

13 years agoupdate web.texi
Andy Wingo [Thu, 16 Dec 2010 15:43:01 +0000 (16:43 +0100)]
update web.texi

* doc/ref/web.texi (URIs, HTTP): Update these sections.

13 years agoadd web.texi to manual
Andy Wingo [Tue, 14 Dec 2010 22:26:41 +0000 (23:26 +0100)]
add web.texi to manual

* doc/ref/web.texi: New file, here to document the various (web ...)
  modules.  Quite a rough beginning, but it is a start...

* doc/ref/guile.texi:
* doc/ref/Makefile.am: Add to manual.

13 years ago(web server) docstrings
Andy Wingo [Thu, 16 Dec 2010 11:52:03 +0000 (12:52 +0100)]
(web server) docstrings

* module/web/server.scm: Docstrings in the house.

13 years agodocstrings in (web request) and (web response)
Andy Wingo [Thu, 16 Dec 2010 11:21:56 +0000 (12:21 +0100)]
docstrings in (web request) and (web response)

* module/web/request.scm:
* module/web/response.scm: Add docstrings.

13 years ago(web http) docstrings
Andy Wingo [Thu, 16 Dec 2010 11:02:53 +0000 (12:02 +0100)]
(web http) docstrings

* module/web/http.scm: Add docstrings all around.