Commit Graph

1887 Commits

Author SHA1 Message Date
Matthew Flatt
ae570e843e reference: expand notation section
Also, move it after the language-model section.
2013-05-01 20:41:39 -06:00
Matthew Flatt
d4c63af3d6 use new `defmodule' in the Reference notation section 2013-04-30 09:36:48 -06:00
Asumu Takikawa
86b0595795 Fix Reference typos 2013-04-29 01:06:17 -04:00
Robby Findler
3dbc3060f6 minor field contract clarifications 2013-04-28 18:19:42 -05:00
Matthew Flatt
0754f79d61 adjust the new "notation" section of the reference 2013-04-28 15:26:36 -06:00
Robby Findler
07fd08ecc3 break some lines in recent commit to make things fit better in the rendered version 2013-04-27 19:17:35 -05:00
Robby Findler
67d6e41b25 add some examples to the class/c contract docs
and fix some commas
2013-04-27 19:10:39 -05:00
Matthew Flatt
d977a2c65d update kernel parameter checks to new error-message format 2013-04-25 16:46:23 -06:00
Stephen Chang
1a149eefbd typo in docs: reference: internal definitions 2013-04-25 15:34:37 -04:00
Asumu Takikawa
a15fa5badd Start on a notation section for the Reference 2013-04-25 14:54:29 -04:00
Matthew Flatt
426a8c0d39 add `exn:fail:{filesystem,syntax}:missing-module'
These exception types are intended as a hook for a programming
environment to recommend packages that can provide a module that isn't
found (through an uncaught-exception handler). The new exceptions are
generated by the default module name resolver and defaultload
handler. In addition to the exceptions, there's a new
`prop:exn:missing-module' property and `exn:missing-module?', which is
what an environment should use to detect relevant exceptions.

There's also a new `current-module-path-for-load' parameter, which
just provides a commuincation path from the module name resolver to
the the load handler. The parameter is a relatively ugly piece of the
puzzle, but it's the best I could find to squash the new functionality
into the existing stack of handlers.
2013-04-22 10:27:02 -06:00
Matthew Flatt
5c4a7db828 scribble/manual: add #:link-target?' to defproc', `defform', etc.
Specifying `#:link-target? #f' gets blue-box typesetting without
declaring documentaton for a binding.
2013-04-21 09:49:14 -06:00
Asumu Takikawa
a9286ce726 Fix doc contracts 2013-04-20 23:17:59 -04:00
Matthew Flatt
e29878e7ae racket/system: make `system', etc., set PWD by default
That is, make `system' behave like a shell.
2013-04-18 07:02:05 -06:00
Matthew Flatt
4cc29194d1 Unix: initialize `current-directory' from the PWD environment variables
... when PWD is defined and when it refers to the same directory
as the result of getcwd().

A shell sets PWD before starting Racket to communicate a preferred
way of referring to the current directory, which may involve soft
links that are not reflected in getpwd().
2013-04-18 06:37:53 -06:00
Robby Findler
7ea6a430f1 change promise/c docs to use defproc instead of defform
also fix a few "listof/c"s

closes PR 13694
2013-04-13 19:12:51 -05:00
Stevie Strickland
eb12d76769 Add two spaces before contract error message fields (Reference section 9.2.1). 2013-04-13 17:31:39 -04:00
Matthew Flatt
06c42f0887 equality for `define-cstruct'-generated wrappers
Closes PR 13650

Merge to v5.3.4
2013-04-11 14:48:26 -06:00
Matthew Flatt
a9a20e9aa7 fix the name of `environment-variables-ref'
Also, fix use of unsetenv() to work with platforms where it returns
void.
2013-04-11 06:42:54 -06:00
Matthew Flatt
6ea9a2b3e3 add `make-environment-variables'
Swap order of argument for `environment-variables-get'
and `environment-variables-set!', so that the environment
variables come first --- which follows the usual order.
This change means that the parameter isn't used to get
the default environment variables, but that seems ok; the
convenient interface is `getenv' and `putenv'.

On Windows, case-normalized environment variable names.

Also, change the implementation to use an immutable hash
internally.
2013-04-10 12:06:29 -06:00
Asumu Takikawa
3946d7ff78 Fix environment variable doc typos 2013-04-10 12:50:46 -04:00
Matthew Flatt
7c0f35e138 reference: simplify some contractcs 2013-04-10 08:29:42 -06:00
Matthew Flatt
d5f32b649c racket/sandbox: add sandbox-make-environment-variables
By default, a sandbox gets a fresh environment variable set,
which means that it does not affect environment variables
outside the sandbox (which means that sandboxed code cannot
set the Racket process's OS-level environment variables).

Closes PR 13667
2013-04-10 06:59:33 -06:00
Matthew Flatt
3d1b0bd381 new environment-variable API
The `current-environment-variables' parameter determines the current
mutable "environment variable set". If that set is the initial one for
a Racket process, then using the set corresponds to working with OS
environment variables.  Otherwise, it's really just a hash table that
is packaged up as OS environment variables if a subprocess is created.

The new environment-variable interface works in terms of bytes, instead
of assuming that environment variable names and values fit in a string
encoding.

The string-based `getenv' and `putenv' are still available as
convenience wrappers. The checking on environment-variable names
for those wrappers is a little tighter, preventing any attempt to use a
name that contains "=".
2013-04-10 06:59:33 -06:00
Danny Yoo
075212d07c Correct typo. 2013-04-09 15:49:11 -06:00
Robby Findler
b721565488 add #:error-name argument to opt/c
this makes it easier to stick opt/c implicitly into
various other contract using forms
2013-04-09 09:41:54 -05:00
Robby Findler
8231db1961 fix non-terminal reference 2013-04-06 19:04:04 -05:00
Matthew Flatt
b82cadaf99 reference: fix grammar for cross-phase expressions 2013-04-06 07:42:59 -06:00
Matthew Flatt
7c4cfdd367 reference: adjust docs for UDP multicast
Minor style changes to better match the rest of the docs,
plus "HISTORY.txt" entry.
2013-04-06 07:22:31 -06:00
Tony Garnock-Jones
314bc49714 UDP Multicast primitives and documentation. 2013-04-06 06:49:13 -06:00
Tony Garnock-Jones
d78456b88b Support SO_REUSEADDR on (udp-bind!), for multicast use. 2013-04-06 06:49:13 -06:00
Claire Alvis
04f535cadc Default implementations are only reached in the absence of method tables. 2013-04-04 15:31:51 -04:00
Carl Eastlund
df00bbb194 Updated contracts for arity-related functions.
Added contract checking to arity=?, arity-includes?, and normalized-arity.
Removed contract checking from normalize-arity to make it a total predicate.
Updated documentation for normalize-arity to reflect this change.
2013-03-31 13:36:07 -04:00
Carl Eastlund
aaa99d565d Documented normalized-arity?, arity=?, and arity-includes?. 2013-03-31 13:36:06 -04:00
Carl Eastlund
4dd011aa09 Added documentation for normalize-arity. 2013-03-31 13:36:05 -04:00
Ryan Culpepper
1b729d34d8 added rename option to lazy-require
closes PR 13624

also added examples
2013-03-30 10:00:44 -04:00
Matthew Flatt
8e25f42fbc doc repair
Closes PR 13555
2013-03-29 07:23:50 -06:00
Matthew Flatt
3f7fcdf1b7 reference: doc clarifications on `guard-evt' 2013-03-29 07:23:49 -06:00
Matthew Flatt
5afd1b4118 syntax-color/racket-lexer: update for single-precision and extflonums
Includes a doc fix to note `+inf.t', etc.
2013-03-29 07:23:49 -06:00
Matthew Flatt
f1ebb6136b reference: fix for reader's number grammar 2013-03-29 07:23:49 -06:00
Matthew Flatt
4d76aa2040 place channels & threads: improve GC
Allow a thread to be GCed when it is blocked on a place
channel for reading and the place channel's write end
is inaccessible.

GC is limited to threads that do not participate in cycles
of such threads, where the otherwise unerachable threads
are blocked on place channels that are reachable among the
set of threads. In other words, the GC finds the greatest
fix point (as measured by the threads to retain) instead of
least fix point --- which isn't what you want, but finding
the least fix point seems to require significant extra GC
machinery across places.

This improvement was intended to solve the same problem as
commit 7b0608c, but that case seems to run into the limitation
on cycles.
2013-03-25 05:15:24 -06:00
Robby Findler
6e4d483403 adjust contract library to call raise-argument-error instead of error
and a few other changes nearby to clean up various things

closes PR 13623
2013-03-23 22:00:29 -05:00
Matthew Flatt
acd6764019 support boxes in syntax patterns and templates
Also, `datum-case' and `datum' from `syntax/datum'.
2013-03-21 09:06:15 -06:00
Matthew Flatt
31964a11dc reference: improve docs on peeking 2013-03-19 15:48:22 -07:00
Michael Filonenko
35a093469c windows: extflonum support
Enable extflonums in a MSVC build by relying on a MinGW-built DLL,
"longdouble.dll". The DLL is loaded on startup. If the DLL isn't
available, then `extflonum-available?' reports #f.

Instead of setting the floating-point mode globally to extended
precision, the mode is changed only just before (and restored right
after) extflonum arithmetic operations.
2013-03-18 07:42:32 -07:00
Robby Findler
3f6232bc2d note that the logger-callback's default argument is #f 2013-03-14 14:11:02 -05:00
Asumu Takikawa
2f0dee9270 Doc fixes for takef & friends 2013-03-09 17:13:59 -05:00
Eli Barzilay
3af72ecab4 Added splitf-at', takef-right', dropf-right', splitf-at-right', and more.
* See comment about implementation issues.

* Removed the `list?' requirement on `takef' etc -- so it matches the
  non-*f versions.  (IMO, it'd be better to drop it from all of them.)
  This also changes the output of `dropf' to `any/c'.

* Swapped the argument order so the predicate is last -- this makes it
  uniform with the non-f* versions.  (IMO, it'b be better to use the
  popular order in all of them instead.)

* Includes tests, and also improved version of previous tests.

* Includes docs, and also fixes to previous docs (eg, drop* doesn't
  return a fresh list).
2013-03-09 15:47:43 -05:00
Eli Barzilay
e47cc6efb1 Clean up source layout. 2013-03-09 15:47:42 -05:00
Eli Barzilay
2cdfe18beb Rename {take,drop}-while' -> {take,drop}f'.
Also, improve the tests a little.
2013-03-09 15:47:42 -05:00