Commit Graph

524 Commits

Author SHA1 Message Date
Matthew Flatt
ff8a062bfe guarantee `current-seconds', etc. from 1/1/1970 UTC
For all currently supported platforms, the result was already
portable, despite the documentation's hedging.

Also fixed up the documentation in other ways, such as the fact
that `seconds->date' returns a `date*'.
2012-06-23 02:04:55 -07:00
Matthew Flatt
40c892ff80 futures: future-local handling of stack overflow
Includes the addition of 'overflow and 'start-overflow-work
events, whcih are effectively specializations of 'sync and
'start-work to expose overflow handling.

Also, fix a bug related to a potential GC during mark-stack
restore from a lightweight continuation.
2012-06-21 07:14:50 +08:00
Asumu Takikawa
86cefd90a0 Update history for recent control additions 2012-06-14 19:44:45 -04:00
Neil Toronto
ddeda70b20 Added to HISTORY.txt
Added (report-errs) to tests/racket/math.rktl
2012-06-09 17:46:04 -06:00
Matthew Flatt
fbb6a294f3 local-expand' allows a stop list to have only module*'
That is, when the sto plist contains only `module*', core
forms are not implicitly added to the stop list.
2012-06-08 16:08:55 +08:00
Matthew Flatt
248301c9ed disable nested `#lang'
A `syntax/module-reader' reader disables `#lang' when looping to
read a module body. The HtDP languages require a little additional
treatment.
2012-05-29 11:01:52 -06:00
Matthew Flatt
26269c329e racket/base: add some missing predicates
The new predicates are `progress-evt?' `thread-cell-values?',
`prefab-key?', `semaphore-peek-evt?', and `channel-put-evt?'.
These were used internally, and now they appear in contract
error messages.
2012-05-29 11:01:52 -06:00
Matthew Flatt
b098ca7aa6 slideshow: run a slideshow' or main' submodule, if any
A common Slideshow pattern is to put a subset of slides in its
own module with a `run-slides' function, and then you'd
(un)comment a `(run-slides)' call at the end of the module to
work on the subset by itself. Now, you can write
`(module+ main (run-slides))' atthe end of the module and not
have to comment it out. Adding `main' support to the `slideshow'
executable makes it more consistent with using `racket' directly.
Checking first for a `slideshow' submodule makes it possible
for `slideshow' and `racket' to do different things, in case
that's useful.
2012-05-29 11:00:43 -06:00
Matthew Flatt
0c303ca9cd racket/cmdline add `#:ps' clause 2012-05-29 11:00:43 -06:00
Matthew Flatt
99635ab091 change `impersonate-struct' to require evidence that a field is mutable
When supplying an accessor to redirect, either the corresponding field
must be accessible through the current inspector, or a mutator for
the same field must be redirected, too.

Stevie realized that we need this constraint; otherwise, impersonators
can implement mutator-like behavior even when the mutator is otherwise
secret.
2012-05-27 15:37:45 -06:00
Matthew Flatt
d6774d5d54 racket/sandbox: add sandbox-propagate-exceptions 2012-05-25 18:37:29 -06:00
Matthew Flatt
9e7548de61 new error message convention
Add `raise-argument-error', `raise-result-error', `raise-arguments-error',
and `raise-range-error'.

The old convention was designed for reporting on a single (sometimes very
long line). The new convention is

 <name>: <short message>
   <field>: <detail>
   ...

If <detail> is long or itself spans multiple lines, then it may
also use the form

   <field>:
    <detail>

where each line of <detail> is indented by 3 spaces.

Backtrace information is shown as a multi-line "context" field.
2012-05-25 15:08:05 -06:00
Matthew Flatt
9270936a28 instantiate require'd modules in the order that they are require'd
This order is now specified, whereas the order was previously unspecified,
and the previous reverse order was an artifact of the implementation.
2012-05-16 07:12:27 -06:00
Matthew Flatt
e35337dcfd add `relative-in' 2012-05-15 20:03:41 -06:00
Matthew Flatt
0653d1c966 add `syntax-local-submodules' 2012-05-14 21:57:09 -06:00
Matthew Flatt
1bf1564f90 add `variable-reference->module-path-index' 2012-05-14 21:57:09 -06:00
Matthew Flatt
d93f4214a4 fix `compiler/zo-parse', etc. for phase-shift addition 2012-05-13 09:00:28 -06:00
Matthew Flatt
2d027e7ee5 scribble/eval: add eval:result' and eval:results' 2012-05-09 19:11:21 -06:00
Matthew Flatt
9a41129c69 racket/flonum: add `flexpt' 2012-05-07 20:41:14 -06:00
Matthew Flatt
b30374824a racket/draw: add #:eventspace' argument to open-output-text-editor'
The argument is `(curent-eventspace)' by default, which makes ports
work better with threads.

Closes PR 12749
2012-05-05 10:32:05 -06:00
Matthew Flatt
23d46620f2 documentation tweaks 2012-05-03 19:22:46 -06:00
Matthew Flatt
68e005fb2c racket/draw: make-immutable-{color,brush,pen} => make-{color,brush,pen}
Also, use keywords for `make-pen' and `make-brush'.

Adding `make-pen' and `make-color' creates many conflicts among
teaching libraries, such as `2htdp/image'. These are easy to fix
up in the tree, but adding such obvious names to `racket/draw'
may create other compatibility problems, so we might have to reconsider
the names.

In consultation with Asumu.
2012-05-01 21:04:40 -06:00
Matthew Flatt
9ba663aa77 preserve submoduleness in module path index for expanded submodules
The preserved path is exposed by a new `module-path-index-submodule'
function, and `module-path-index-join' now accepts an optional
submodule path.

Also, fixed a problem with `collapse-module-path-index' when
a module path indx is built on a resolved module path that
is a submodule path.

In addition to the main repair, `collapse-module-path[-index]' is
correctly documented to allow '(quote <sym>) rel-to paths.

Finally, `collapse-module-path-index' changed to use a symbolic
resolved module path that appears as the base of a module path
index, rather than falling back to the given rel-to path. It's
possble that the old beavior was intentional, but it wasn't tested,
and it seems more likely to have been a bug.

Closes PR 12724
2012-04-24 21:10:28 -06:00
John Clements
69a3239c59 updated release notes, please add to 5.3 release 2012-04-19 16:26:43 -07:00
Matthew Flatt
1a981d1cc2 Add missing compatibility items to the Racket change log
Merge to 5.3
2012-04-19 12:45:28 -06:00
Matthew Flatt
4179cbfa63 enforce ranges on all integer types
DO NOT merge to 5.3
2012-04-15 05:37:44 -06:00
Robby Findler
9d43203990 adjusted the render-* functions so they produce .pdf if the given
filename ends with #rx#"[.]pdf".
2012-03-17 08:36:34 -05:00
Matthew Flatt
366aa2c42d fixups for the `module-path?' change 2012-03-12 21:10:14 -06:00
Robby Findler
a7cb8fdc84 small improvements to the memory usage for files opened in DrRacket.
Before this commit, opening collects/drracket/private/unit.rkt required
about 17.5 megabytes of memory and after this commit, it is down to
about 15 megabytes.

The precise measurement I did was to create a frame and a scheme:text%
object in it, record the result of current-memory-use, open the file,
and record current-memory-use again.

For comparison, using a text:standard-style-list% object instead of
the scheme:text% requires only about 4.1 megabytes. One difference
being that there are about 3x more snips (10,204 vs 33,901 (after the
commit)), since we have one snip for each region that has a different
color in the scheme:text version, and the text:standard-style-list has
no colors and thus about two per line (there are 5006 lines in the
file).
2012-03-10 20:18:49 -06:00
Matthew Flatt
566759a5fa progress on submodule docs; bug fixes 2012-03-09 10:34:56 -07:00
Matthew Flatt
3d69dfab86 first cut at submodules 2012-03-09 10:34:56 -07:00
Robby Findler
b7caf411ae added define-extended-judgment-form to Redex 2012-03-03 16:41:53 -06:00
Matthew Flatt
5630a3a1ca racket/sandbox: use `gui-available?' at sandbox creation
Previously, sandbox creation used `gui?', which is the result of
`gui-available?' at the time that `racket/sandbox' is instanited.
This change makes sandbox behavior less sensitive tothe order in
which modules `require'd into a program are intiantiated.

The change depends on a new `sandbox-make-namespace' default
function for `sandbox-namespace-specs'. The new function uses
either  `make-base-namespace' or `make-gui-namespace', depending
on whether the GUI library is available at that point.

A new `sandbox-gui-enabled' parameter can disable use of the
GUI library even if it is available.

The `gui?' binding is still exported for backward compatibility,
but it shouldn't be used anymore.
2012-03-02 07:47:16 -07:00
Robby Findler
f61f0830e5 change register-toolbar-button so that it accepts a number
argument and uses that to order the buttons in the DrRacket
panel.

Also, order all of the buttons via these numbers in
a more sane way
2012-02-25 16:57:49 -06:00
Matthew Flatt
645ca02e92 racket/draw: add `record-dc%' 2012-02-25 20:57:56 +00:00
Eli Barzilay
c007c345f9 A bunch of more typos like the ones in David's commit. 2012-02-21 14:21:43 -05:00
Matthew Flatt
530b353798 racket/draw: change font face name interpretation again
Treat a "face" as a font description only if it has a comma,
otherwise go back to treating it as a family name.

This change fixes the problem of parsing "Times New Roman"
as "Times New, Roman".
2012-02-17 11:25:15 -07:00
Matthew Flatt
11de33d4ff remove MysterX DLL, replace with wrapper around `ffi/com'
The ActiveX part of MysterX is gone. The `ffi/com' re-imeplemtnation
provides only core COM support.

The "mysssink" DLL is still needed, and its source is still
in the tree, but it is downloaded in the same way as other
pre-built DLLs. The DLL no longer needs to be registered with
regsvr32.
2012-02-17 06:37:19 -07:00
Matthew Flatt
e5d8b9f049 add release note about `handle-evt' 2012-02-17 06:36:23 -07:00
Matthew Flatt
6cd2e3c71b add `prop:cpointer'
Extend `define-cstruct' to support #:property specs, which causes
the constructor and C->Racket coercsions to wrap the pointer in
a structure instance with the specified properties. Of course,
the wrapper structure has a `prop:cpointer' property so that the
wrapper can be used transparently as a C pointer.

Add missing tests and documentation for the id`->list', `list->'id,
id`->list*', and `list*->'id bindings created by `define-cstruct'.
2012-02-14 14:25:55 -07:00
Matthew Flatt
2493564a35 note re-export of racket/future 2012-02-14 14:25:55 -07:00
Robby Findler
e4e4d70b6b added define-union-language 2012-02-10 17:10:47 -06:00
Matthew Flatt
937cdf51d7 change `current-write-relative-directory' to support more path conversions
In particular, allow a pair of a relative-to directory and a base
directory. Paths that syntactically extend the base directory are
recorded as relative to the relative-to directory (which must
syntactically extend the base directory).

The compilation manager now sets the parameter to a pair with
the base directory as the main collection directory, if the source
file's path extends that directory's path.

This generalization solves problems created by cross-module inlining,
where the source location of a procedure in bytecode can now be in a
different file than the enclosing module's file.

Also add a test that checks whether the build directory shows up
in any ".zo", ".dep", or documentation ".html" files.

Closes PR 12549
2012-02-10 06:17:18 -07:00
Robby Findler
b3584fff5c added amb tutorial note to the redex HISTORY file 2012-02-07 15:50:52 -06:00
Matthew Flatt
13a5b0c623 change `ffi-lib' to not make library symbols global by default 2012-01-26 09:30:25 -05:00
Sam Tobin-Hochstadt
b839b03d4b Typed Racket HISTORY for 5.2.1.
Please merge to release.
2012-01-24 10:49:42 -05:00
John Clements
080b6095c4 Updated HISTORY.
Please merge to 5.2.1 release.
2012-01-23 14:54:27 -08:00
Matthias Felleisen
0a5a949d1a fixed an old wheel-event bug and added version number to history, please propagate 2012-01-19 11:39:05 -05:00
Robby Findler
50dba41043 DrRacket & Redex history updates for 5.2.1
Please merge to the release branch
2012-01-17 22:14:36 -06:00
Matthew Flatt
23010fc495 add #:fail' option to collection-file-path' and `collection-path'
Merge a variant to 5.2.1
2012-01-09 15:59:05 -07:00
Matthew Flatt
0d47cea848 collapse Racket HISTORY.txt for v5.2.1
Merge to 5.2.1
2012-01-09 15:59:05 -07:00
Matthew Flatt
7153fbd4d5 net/mime: allow any subtype, exns as exn:fail subtypes; doc fixes 2012-01-08 12:14:51 -07:00
Robby Findler
bb2ebb6ad6 redex: added note about optimizations 2012-01-08 12:13:53 -06:00
Robby Findler
3bc1e8f3c0 Change the keybindings dialog to be a frame, and make it react
to changes in focus

closes PR 12474
2012-01-08 06:55:50 -06:00
Robby Findler
e8beac29cf added notes for recent redex changes 2012-01-02 10:08:32 -06:00
Matthias Felleisen
0a2262bea5 history updated for game pad 2011-12-31 11:28:12 -05:00
Matthew Flatt
6c5c170565 racket/draw: add text-outline' to dc-path%' 2011-12-25 18:20:39 -06:00
Matthew Flatt
ee775c3cc3 intern strings, etc. only when making syntax objects, not in `read'
Rename `read-intern-literal' to `datum-intern-literal'.

Interning is needed only in `read-syntax' or `datum->syntax' to
set up the invariants that the bytecode compiler needs for cross-module
optimization. When `read'ing numbers from a data file, meanwhile,
interning slows things down a lot and doesn't seem worthwhile.
2011-12-14 16:03:44 -07:00
Matthew Flatt
287d5cedf5 add `pseudo-random-generator-vector?'
Also, adjust docs to clarify that `vector->pseudo-random-generator!'
can be used as a more complete seeding function.
2011-12-09 09:12:17 -07:00
Matthew Flatt
657be87c66 generalize gcd' and lcm' to work on rationals 2011-12-08 09:25:39 -07:00
Matthew Flatt
7e666b4b45 add stream' to racket/stream'
based on a pull request from Dan King
2011-12-08 09:25:34 -07:00
Matthew Flatt
99032a75d0 inline map', for-each', andmap', and ormap'
More generally, support a
 (define _id (begin 'compiler-hint:cross-module-inline _proc-expr))
hint, which is how the compiler determines that `map', etc., are
candidates for inlining.
2011-12-01 06:59:27 -07:00
Matthew Flatt
779b419c03 first cut at cross-module function inlining
Inline only trivial functions, such as `(empty? x)' -> `(null? x)',
to avoid generating too much code.

Bytecode includes a new `inline-variant' form, which records a
version of a function that is suitable for cross-module inlining.
Mostly, the variant let the run-time system to retain a copy
of the bytecode while JITting (and dropping the bytecode of)
the main variant, but it may be different from the main variant
in other ways that make it better for inlining (such a less loop
unrolling).
2011-11-30 07:39:36 -07:00
Robby Findler
1c2f9cd721 adjust the handling of the scheme mode keymap so that it can go
before the plain text-mode keymap.

Add a doubleleftclick binding to the scheme mode keymap so that
we can have sexp-sensitive double clicking in the drracket editor
2011-11-29 13:46:23 -06:00
Matthias Felleisen
00c93a1829 allow strings and symbols for name clause in world; Closes PR12403 2011-11-28 21:31:18 -05:00
Matthias Felleisen
19f8cacfcd on-receive does not have to exist for a world to be a part of a universe, weird but feasible; Closes PR12401 2011-11-28 17:43:12 -05:00
Robby Findler
25271be3e8 set the current-load-relative-directory to #f (initially) in drracket 2011-11-28 13:57:11 -06:00
Robby Findler
153dd73f6b adjust drracket to clean up the code that sets the initial value of
current-directory and current-load-relative-directory and to make
current-directory's initial value be the user's home directory
2011-11-28 13:29:55 -06:00
Matthew Flatt
1ac7e7e19d racket/class: add `dynamic-send' 2011-11-25 13:22:05 -07:00
Matthew Flatt
fe3b6ea003 at-exp, scribble: remove distinctness of @{}-introduced newlines 2011-11-24 09:17:34 -07:00
Matthew Flatt
6a99c93ebb add get-colors' to color-database<%>' 2011-11-22 20:17:58 -07:00
Matthew Flatt
c7464dcbd3 mzlib/pconvert: `add-make-prefix-to-constructor' parameter
Defaults to #f, which fixes constructor-style printing in `plai'
and `racket', and is set to #t for the HtDP languages.
2011-11-22 19:42:35 -07:00
Matthew Flatt
4c7727e7af add HISTORY note on read-intern-literal 2011-11-22 18:12:28 -07:00
Matthew Flatt
e44bd3f79d intern literal strings, byte strings, regexps, characters, and numbers 2011-11-22 08:54:37 -07:00
Robby Findler
19ccc17bf6 added note about recent commit 2011-11-21 07:36:38 -06:00
Robby Findler
b726209dc5 fix the interaction between the automatic insertion of matching parens
and the magic fixup of opening parentheses.

This commit moves the automatic insertion of matching parens to the
scheme mode keymap, so it will now take affect in Racket mode editing,
only. Also, Rackety.
2011-11-16 19:36:18 -06:00
Matthew Flatt
3bffcae3c2 fix places & executable interaction
Added `module-predefined?' and changed `racket -k ...'
2011-11-15 18:42:21 -07:00
Robby Findler
c8fd6f9312 syntax error change 2011-11-11 06:10:33 -06:00
Matthew Flatt
5139de9cec add `port-closed-evt' 2011-11-10 10:01:57 -07:00
Eli Barzilay
cfc465932e Add a history note on the lazy change, make the TR history specify 5.2. 2011-11-03 17:09:58 -04:00
John Clements
e830fb1b38 updated history
Merge to 5.2
2011-10-21 02:17:37 -07:00
Casey Klein
210a6f329e Updates Redex history for v5.2
Merge to release branch
2011-10-19 13:32:59 -05:00
Matthias Felleisen
38b802dde4 history for teachpacks updated; please propagate 2011-10-18 12:36:32 -04:00
Matthew Flatt
ff839d1cda update Racket history for v5.2
Merge to 5.2
2011-10-18 06:46:30 -06:00
Eli Barzilay
c66c669ee3 Remove preference for old-style menu bindings, and instead add a sample
keybindings file that does that.

(This reverts most of commit 26f6c588fcfa45a1a12c275e5824aede8ba23e3e.)
2011-10-17 14:09:26 -04:00
Matthias Felleisen
051649fc13 history for release 2011-10-09 20:16:50 -04:00
Matthew Flatt
8f0fa96d69 docs and release notes for `set-icon' change
Merge to 5.2
2011-10-09 09:45:42 -06:00
Matthew Flatt
ec380e34ed remove built-in reader and printing support for Honu
This is a backward-incompatible change, but I think it's
unlikely that any code depends on the removed bindings
or reader syntax.
2011-10-05 09:40:27 -06:00
Robby Findler
11a3d9b0ac add support for redirections to get-pure-port and add get-pure-port/headers 2011-10-03 13:21:30 -05:00
Robby Findler
4a2757f200 Adjust DrRacket so that it saves files with CRLF
line terminators when:

  a) running under windows, and
  b) the file on the disk (when DrRacket first opens it)
     contains all CRLF line endings.

In all other situations, the file is saved with LF terminators.

Before this commit, DrRacket would always use the platform-specific
convention, regardless of the original content of the file.

closes PR 12242
2011-09-30 17:08:07 -05:00
Matthew Flatt
ac8990d519 add date*' and exn:fail:syntax:unbound'
The `date*' structure type is an extension of `date' with
`nanosecond' and `time-zone-name' fields.

The `seconds->date' function now accepts a real and returns a
`date*'. The fractional part of its argument goes into the
`nanosecond' field.
2011-09-29 09:22:10 -06:00
Robby Findler
048fa1d7b8 get rid of the "open here" functionality
This is a backwards incompatible change; there is a more complex change
that just stubs this stuff out that may be better that we may need
isntead of this commit.
2011-09-21 22:53:03 -05:00
Matthew Flatt
0ab6637539 remove obsolete and unused Racket-to-C compiler
Removes `raco ctool -e/-c', `mzc -e/-c', `compile-extensions',
`compile-extensions-to-c', `compile-c-extensions', `compiler/cffi',
`compiler/comp-unit', `compiler:inner^', and most options in
`compiler/option'.
2011-09-20 15:26:39 -06:00
Matthew Flatt
0197902309 add var-ref->mod-decl-insp' and switch cur-code-insp' uses
Macros and other tools that need syntax privilege used
`(current-code-inspector)' at the module top-level to try to
capture the right code inspector at load time. It's more
consistent to instead use the enclosing module's declaration-time
inspector, and `var-ref->mod-decl-insp' provides that. The
new function works only on references to anonymous variables,
which limits access to the inspector.

The real function name is longer, of course.
2011-09-20 13:50:36 -06:00
Kevin Tew
14014b3d36 Add place ffi, fd, and port changes to HISTORY.txt 2011-09-17 12:52:40 -06:00
Matthew Flatt
a233697f08 fix errortrace (required API changes), add `syntax-shift-phase-level'
Also fix a bug in the `module' expander and streamline lazy
visits.
2011-09-13 21:04:10 -06:00
Matthew Flatt
d3c56c9f13 generalized `begin-for-syntax' 2011-09-08 14:06:00 -06:00
Robby Findler
26f6c588fc added a preference to restore the old run, new tab, and replace keybindings 2011-09-07 17:31:33 -05:00
Robby Findler
5e943709ef catch up on the release notes 2011-09-06 11:12:26 -05:00
Robby Findler
8f6fb87597 adjust keybindings to free up <menukey>-r for "Run" and <menukey>-t for "New Tab" 2011-09-01 10:53:07 -05:00