Commit Graph

3723 Commits

Author SHA1 Message Date
Matthew Flatt
57516164de ffi/unsafe/obj: add +A' and -A' method modes
On Cocoa, a view's `drawRect:' method can be called from a
heartbeat thread that animates controls. Such a call happens
rarely for a `canvas%' or other class where `drawRect:'
is overridden, but since it can happen, ensure that the
callback runs on the Racket thread.
2013-04-19 07:54:30 -06: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
Matthew Flatt
3e1ecc41b4 demote some `raco' commands
The commands `link', `pack', and `unpack' are now
discouraged in favor of `pkg'.
2013-04-17 12:28:50 -06:00
Matthew Flatt
51d48f3ab4 raco setup: --tidy mode (as needed by `raco pkg remove') and more
When a collection disappears, then documentation and metadata
cross-references need fixing up based on everything that remains
available, even though other setup actions are confined to
collections that are specifically relevant to the packages. The
new `--tidy' mode takes care of that.

Package installation now also provides `--avoid-main' when working
with packages in a scope other than installation scope, and `raco
setup' now better respects `--avoid-main' to avoid creating
executables or re-running documentation.

Also, revise the `raco' documentation to better orient it toward the
package manager.
2013-04-17 12:28:50 -06:00
Matthew Flatt
25ddfcbfb3 ffi/com: repairs for parameterized-property setting and for date values
Merge to v5.3.4
2013-04-16 10:02:37 -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
Jay Kominek
0562755be9 OpenGL context sharing 2013-04-12 14:58:53 -06: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
98c5209c95 ffi/unsafe: fix doc typo
From Tobias

Closes PR 13684

Merge to v5.3.4
2013-04-11 10:30:00 -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
Matthew Flatt
d5ede87ae8 JIT for ARM
Includes switch from LGPL 2.1 to LGPL 3, since the ARM port
of GNU lightining is licensed under LGPL 3.
2013-04-08 14:43:30 -06:00
Robby Findler
8ce213bf1c extend proc-doc to support optional arguments in an ->i contract
also refactor to be able to add some unit tests
2013-04-06 19:04:05 -05:00
Robby Findler
8231db1961 fix non-terminal reference 2013-04-06 19:04:04 -05:00
David Van Horn
213430f728 Add #:lang and input-program inputs to make-base-eval and friends.
This commit extends make-base-eval, make-base-eval-factory, and
make-eval-factory with an #:eval and input-program inputs so that
these functions are more like racket/sandbox make-evaluator.
2013-04-06 09:00:41 -06:00
Matthew Flatt
ee78b70e4a doc search: fix mismatch between generator and renderer
This change revisits commit eb7fa6f066. I think the problem
is not in the rendering of index entries but on the generation
side. The generator was converting Xexprs to strings, except
that strings were left as-is, which is inconsistent. So,
I've reverted commit eb7fa6f066 and fixed the generator.
2013-04-06 07:43:49 -06: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
Robby Findler
b05767ab13 add support for firing up a REPL to poke at DrRacket 2013-04-05 22:39:19 -05:00
Claire Alvis
04f535cadc Default implementations are only reached in the absence of method tables. 2013-04-04 15:31:51 -04:00
Ryan Culpepper
516f56fc83 added with-eval-preserve-source-locations to scribble/eval
Makes it possible to show examples of redex term->pict, etc.
2013-04-04 13:28:01 -04:00
Robby Findler
ecf2b16bf0 refactor the plt installation code in drracket to pull out
the GUI wrapper around command-line like utilities
2013-04-03 22:23:26 -05: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
Matthew Flatt
6e40caa7e2 ffi/com: repairs, including `mysterx' compatibility
Restore MysterX-style handling of parameterzied properties in
`com-get-property'.  It turns out that the original `com-get-property'
handles parameterized properties by allowing a list in place of a
property-name string, and that handling got lost in the re-write.

Fix the name of `com-get-active-from-from-coclass'.

Fix arity checking for optional arguments.

Closes PR 13603
Closes PR 13604
2013-03-31 11:12:45 -06:00
Ryan Culpepper
1b729d34d8 added rename option to lazy-require
closes PR 13624

also added examples
2013-03-30 10:00:44 -04:00
Ryan Culpepper
293b208af7 added optional #:grammar clause to defform, etc 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
325a9dd34b slideshow/pict: allow a color in a style for `text' 2013-03-27 17:17:33 -06:00
Danny Yoo
eb7fa6f066 Sanitize the output from HTML escape characters.
Noted by ozzloy on IRC.  The search page appears to fail when
searching for the term 'string<?'; in truth, the search succeeds, but
the search link-printing code doesn't escape the '<?' part of the
identifier.
2013-03-25 12:51:19 -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
Jay McCarthy
9f337c632a Removing the planet2 name from the code 2013-03-22 07:45:14 -06: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
Robby Findler
e5d91baa2c add interaction/no-prompt and clarify that interaction-eval
doesn't catch errors
2013-03-20 22:51:39 -05:00
Robby Findler
a29f37f18b added scribble-exn->string 2013-03-20 22:51:39 -05:00