Also, add 'lsquo as allowed content.
Omitting the ` conversion in the first place was over-conservative.
There's a backward-compatibility issue with this addition (i.e., a
document might contain a backquote in a decoded context that is
meant to be rendered as a backquote), but the potential problems
seem minor.
The `slideshow/code-pict' library is the same as `slideshow/code', but
it works in non-GUI settings. Only the `slideshow/code' library connects
the code font size to `current-font-size', though.
The `code' macro, `define-code', etc., now support "code transformers",
which are syntax bindings that trigger otherwise-unescaped transformations
in the code to typeset (which can make the code easier to read and
friendlier to auto-indentation).
Other major changes:
- pg code now uses only binary format
- pg timestamptz now always UTC (tz = 0), added doc section
- added contracts to most pg "can't-convert" errors
Support for break clauses complicates expansion to `for/fold/derived';
a new `syntax/for-body' library provides a helper for macros that need
to split a `for'-style body into a prefix part and wrappable part.
Allows the use of `in-generator' to produce multiple values in a
position other than immediately within `for' (where the arity
can be inferred).
Closes PR 11662
The new parameter (and supporting environment variables and
command-line flags) can bytecode lookup to a tree other than
where a source file resides, so that sources and generated
compiled files can be kept separate. It also supports storing
bytecode files in a version-specific location (either with
the source or elsewhere).
The `make-log-receiver' function now includes a logger-name
filter. This filter is implemented as a low enough level that
it affects `log-level?' tests to check whether a log message
needs to be constructed at all.
The -W and -L flags and PLTSTDERR and PLTSYSLOG environment variables
support filters of the form "<level> <level>@<name> ...", where
<level>@<name> specializes filtering of events for a logger whose
name matches <name> to show <level> and higher.
The old `cast' didn't work right for a mismatch between
a pointer GCableness and the source or target types, and
it didn't work right for an GCable pointer with a non-zero
offset. While those pitfalls were documented, the first
of them definitely has been a source of bugs in code that
I wrote.
Also added `cpointer-gcable?'
Add `file-position*', which can return #f instead of raising
an exception when a port's position is unknown. Change
`make-input-port' and `make-output-port' to accept more
kinds of values as the initial position.
These changes make it possible to synchronize a port's
position with a `port-commit-peeked' action. It's ugly,
which I think reflect something broken about position
tracking in the port protocol (which seems difficult to fix
without breaking compaibility).
Providing a port instead of a reading or writing procedure
redirects the read/write to the specified port. This shortcut
is kind of a hack, but the run-time system can easily streamline
the redirection when it's exposed this way.
Using the new redirection feature reduces overhead in
`with-output-to-bytes' and `pretty-print'.
We can't disallow the creation of bad mutators without breaking
old code, but we can prevent the JIT from treating them like
good ones.
Closes PR 13062
Stream generic operations stopped working for lists
since the operations used only the generic dispatcher
instead of the real generic functions.
(Moral of this story: write more tests)
that it drops from the expansion (like define/public) by
adding them to the origin syntax property (and sometimes
to disappeared-use; see the add-decl-props function
for details on those that aren't in the origin property)
this means that check syntax will now pick them up
so they'll show up in the blue boxes in drracket
Thanks Matthew, for some helpful advice and
comments on an initial version of the commit.
Generalize splitting of `(let-values ([(x ...) (values e ...)]) ....)'
to `(let ([x e] ...) ....)' for any `e', since it's always equivalent.
Right?
(The old requirements on the `e's seem to be needed only for
`letrec-values' splitting and maybe mutable variables.)
Treat unsafe functional operations (which never raise an
exception) as omitable, which means that simple `let-values'
combinations can be split into `let' bindings, etc.
Basically, Racklog (and all versions of schelog) implement ! by
causing the failure continuation of the entire relation being
returned. They did not also cause the unification caused by the
relation to be un-done.
However, it is not easy to separate un-doing the local changes because
the unification just returns a failure continuation too. I had to call
that fail continuation but use state to communicate to its target that
the next clause should not be visited.
I don't know if this is correct. My test suite contains a lot of cut
tests that still pass. Erik's test passes too. But I'm not confident
that this really works.
Internally, there's a `prop:method-arity-error' property that is
used for keyword-accepting methods. The same thing could be
accomplished with `procedure->method', but the new property avoids
a wrapper. It might be nice to expose the property from `racket/base',
but that creates trouble for generating arity errors for keyword-
requiring procedures (i.e., when such a procedure is wrapped), so
keep it provate for now.
Closes PR 12982
Split out base-abbrev.rkt so that subtype is not dependent on abbrev.rkt.
Remove unused code in numeric-tower.rkt so that it is now a dependent of
abbrev.rkt, which allows the body of convenience.rkt to be merged back in.
Remove special casing for union.rkt and extraneous subtyping checks.
Remove union-maker.
conventions in 9.2.1 of the reference (altho the messages do
not yet do the extra level of indenting when a field is too
long, nor are there any field names ending in ...)
Also, fix the docs for the #:stronger argument to
make-contract, make-chaperone-contract, and make-flat-contract
Specifically, it seems like about 20% of the time (in drdr),
running the program
(let l()(l))
in DrRacket and then clicking the break button results in a state
where DrRacket's focus is not in the definitions window. I can't seem
to make this happen on my own machine and I'm not sure if this a
race-condition in the test suite or a real bug in DrRacket but it
seems minor enough (given all of the other focus-based testing that is
happening in this (and related) test suites) that I'm just going to
give up on this particular test.
A progress evt from a close input port must be initially ready,
and the primitive `peek-bytes-avail!' checks a progress evt
before checking whether the port is closed.
These changes resolve a race in `read-bytes-evt' and related evt
constructors.
This is a follow-up to commit ec6f3fd610. We're still
seeing crashes while rendering the "plot" documentation, and this
change seems to make things work on my machine.
Fix tchecking for a rest argument to a function that
is lifted by closure conversion so that one of its
arguments is a mutable local variable's location.
Also reject bytecode that would pass too many arguments
to a lifted function, since that would trigger an arity
error that might try to use a location as a value.
Merge to v5.3
When a `port-commit-peeked' succeeds, position information should
(appear to) be updated. This patch synchronizes commits and
position information for primitive ports, but synchronizing
them for user ports remains a problem.
Convert
(hash-ref <hash> <key-expr> (lambda () <literal>))
to
(hash-ref <hash> <key-expr> <literal>)
which is useful for making the `case' expansion fit
Typed Racket.
appear in saved wxme format files
also, improve the testing support for testing snip loading
(before this, the testing infrastructure could let one test
"leak" into another one in a way that could mask failures)
please include in release branch
Leave it working in splicing mode. I prefer doing that over always
splicing them, since that would make a less uniform interface, so I
rather keep all options open. There is no longer a `#:nothing' keyword,
which is the main point of this downgrade.
(See mailing list discussion on "no-argument" for the reason.)
and the change to the racket/gui load-handler
(unfortunately, there is still another problem that keeps
the test suite from passing)
please merge to the release branch
When a module is loaded from bytecode and then the value of
`use-compiled-file-paths' changes, an attempt to load a submodule
would fail, because source isn't used if the main module is
already declared, and the bytecode code is not used according to
`use-compiled-file-paths'. Make the bytecode path stick when it
is used once, so that submodule loads succeed, and make it work
even with `namespace-module-attach'.
The module-attach part of this protocol requires a change to the
API of a module name resolver: the notification mode gets two
arguments, instead of one, where the second argument is an
environment.
The lambda-lifting transformation needs to iterate to a fixpoint
where each lambda's added arguments and order are known. The
check for whether something changed was formerly just the number
of added arguments, but that's not good enough, because a binding
might get lifted away while another one acquires an extra argument.
The right test is to check the count and original bindings for the
added arguments.
Closes PR 12910
- Allow indexing into a VectorTop, with result `Any`.
- Don't use special typing rules for applications when the operator
has an annotation or instantiation.
Closes PR 12887.
Closes PR 12888.
The optional arguments for `call-as-current' for `gl-context<%>'
were not implemented, and the locking implementation didn't match
the documentation in other ways.
The libraries moved were:
- mzlib/control => racket/control
- mzlib/date => racket/date
- mzlib/deflate => file/gzip
- mzlib/inflate => file/gunzip
- mzlib/port => racket/port
- mzlib/process => racket/system
- mzlib/runtime-path => racket/runtime-path
- mzlib/shared => racket/shared
- mzlib/unit => racket/unit
- mzlib/unit-exptime => racket/unit-exptime
- mzlib/zip => file/zip
The old modules in mzlib are now pointers to the
new modules. These are all modules that were already
redirected in the documentation.
Added empty-sequence type (prints funny but works polymorphically; will submit bug report)
Loosened type of sequence-andmap (can't mimic andmap's predicate type)
Paths are left as paths, instead of trying to convert them to strings
or byte strings. Submodule path elements should be unquoted -- in the
same form as a `submod' form. All extra parts are submodule path elements,
never module paths or ".".
Each typed module now defines a submodule named `type-decl`.
This module performs the type environment initialization (along
with other environment updates) when invoked. Additionall,
every typed module, when invoked, performs a for-syntax addition
to a list specifying the submodules that need invocation.
This invocation is then performed by the `#%module-begin` from
Typed Racket.
The `type-decl` module always goes at the beginning of the
expanded module, so that it's available at syntax-time for all
the other submodules. This involved adding pre- and post-
syntaxes for the results of typechecking.
This allows significant runtime dependency reduction from the
main `typed/racket` and `typed/racket/base` languages (not yet
complete).
Fixed problems related to sorting, more than two references for
one citation, and "specific" additions like page numbers.
Also, removed a set of parentheses around disambiguated dates
in the bibliography, because I don't think they belong there.
The doc format was confused; for example, square brackets don't mean
optional in a syntactic form documentation, but instead mean square
brackets.
The JIT wants to detect calls to functions bound to module-level
variables that are always instantiated to a procedure of a particular
arity, in which case it can avoid some checks. The problem is that
bytecode and JITted code can be shared via the module cache across
namespaces that use different modules to implement a particular module
path or that enable the JIT differently. In particular, starting with
one that has a procedure binding and then using one (in a different
namespace) that has a non-procedure binding could lead to a crash.
Defend against this possibility by never treating imported variables
as constant in that sense. The JIT detects imported variables through
a new import map in the prefix.
This change may slow code. My guess is that it will have no
performance impact in practice, due to cross-module inlining,
although I can construct a microbenchmark that slows by 20%.
The optimizer can no longer reduce
(with-continuation-mark _id _v-expr _expr)
to just
_expr
when _v-expr and _expr are simple enough, because _id
might be bound to a continuation mark key with an
impersonator that checks the result of _v-expr.
The loss of an optimization can have a significant affect on
errortrace of microbenchmarks, such as
(for ([i (in-range 10000000)])
i)
The new names are `prompt-tag/c` and `continuation-mark-key/c`
to keep the names consistent with the values that are being
contracted. Also updated the HISTORY file.
Add a `#:nothing' argument so the no-value value can be
made explicit --- based on discussion with Eli, but pending
further review.
Also, renamed `#:first' to `#:before-first' and `#:last' to
`#:after-last' to be more clear, more parallel ro `#:before-last',
and avoid a collision with prominent function names.
The generics library now generates a `name/c` macro
for a generic interface `name`. The combinator can be
used to contract instances (or constructors) of a
generic interface across standard contract boundaries.
A arity-reduced procedure-valued `prop:procedure' was not handled
correctly, for example.
A good candidate for random testing? I had the right kind of test in
place, but only for an arity of 1. It turns out that testing any other
arity would have exposed the problem, so now there are tests with
arity 0. If I had randomly generated procedures instead of manually
constructing `f0' through `f1:+' in "procs.rktl", then maybe I would
have more naturally generalized the arity testing, too. Then again,
I did already have relevant inputs, and it was the testing of inputs
that was too specific.
Closes PR 12870
See PR 12860; some of problem related to the PR were "fixed" by
adjusting the guarantees that are specified in the documentation.
Another problem was that non-consecutive bytes could be returned.
* The old function was removed completely, people will get it from
`racket/base' anyway.
* I also removed its documentation. I thought about leaving a note in,
but if `define-ffi-definer' is the preferred style, then this should
be done when there's a way to make `define-ffi-definer' use it. (Eg,
some new #:keyword that adds a way to change the defined name.)
* Note that the function is added to `racket/private/string' and not to
`racket/string' because the latter deals only with strings, and the
new function accepts byte strings too. It might be better to start a
new `racket/regexp' module for these functions.
As the documentation says, it's supposed to be ok to use the
same evt multiple times or in multiple threads, but an internal
buffer was allocated incorrectly, so that multiple/concurrent
uses could go wrong.
Closes PR 12860
Add extra intitial-message lines, use "..." on a field name
to indicate that it could reasonably be hidden by default,
and refine some existing messages.
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.
This was broken in the class100 port. The init arguments
previously handled by the class100*/kw macro need to be
explicitly passed down.
Also, an (init-rest) is needed at the leaves of the class
hierarchy to ensure that internal super init args don't
leak via error messages. (the class100 macro always
inserts these)
Added a test file so similar breakage is detectable in the
future.
1. Lots of #lang-ization, other racketizations, code improvements, etc.
2. Some files that were not working now do.
3. "collects/tests/aligned-pasteboard" had some files that were near
duplicates of "collects/mrlib/private/aligned-pasteboard/tests".
I've removed the former since in a few places it looked like an older
version (eg, there were bogus references to a non-existent
"utils.rkt"). The former has more files that are in runnable
condition now.
4. There are plenty of tests that look like they're failing, but it
wasn't shown since they just return #f, and when they were running
with a "-f" these results weren't displayed.
5. I have no idea about the code, this is all just reshuffling and minor
editing.
Added alises for call-with-continuation-prompt,
abort-current-continuation, and call-with-composable-continuation.
Also allow % and fcontrol to take an optional prompt tag argument.
Types for nan?, infinite?, pi.f, exact-round, exact-floor, exact-ceiling,
exact-truncate, degrees->radians, radians->degrees
Extended tc-random-testing: generates exact integers and rationals now
Fixed types of sinh, cosh and tanh to account for underflow and NaNs
Altered TR's random arithmetic testing to generate single-flonums and very small flonums; fails now because of erroneous types
Fixes to sgn, sinh, cosh, and tanh:
* preserve single-flonum-ness
* correct zero sign (-0.0) for negative return values that are smaller than epsilon
* correct behavior with NaN and infinite inputs
Caveats:
- keyword function definitions do not define static
bindings, thus limiting optimization opportunities
- can't use `define:`, `lambda:`, etc with keywords
- error messages sometimes expose the implementation
- the optimizer skips most of the generated code for
keyword functions definitions (user-level code is
optimized)
Also, fix FFI procedures to preserve names: change `ptr-ref' with
`_fpointer' on an `ffi-obj' value to return the `ffi-obj'
value, so that the name in the `ffi-obj' value can be used
by `_cprocedure'.
Closes PR 12645
Previously, some hacks were used to obtain the internal
identifiers that implemented keyword functions directly, and
give them types at startup. Now, the primary "function"
(eg, `sort`) is given a type, and when used, the residual
syntax properties are used to find `sort` from the real
functions, and then the type of the real function is computed
from the type of `sort`.
Some creativity was required in the types of functions which
take optional arguments that when present, alter the return type,
such as `regexp-match*` and `file->list`.
like textual-read-eval-print-loop
There is still a difference, however, because drracket's REPL has a
notion of multiple expressions that are submitted simultaneously that
textual-read-eval-print-loop doesn't. For example, if you type this at
the prompt:
(car) (+ 1 2)
then textual-read-eval-print-loop will print out the error and then 3,
but drracket will print only the error (ditto if (car) were replaced
by a continuation abort).
This difference is, IMO, a good thing, since it lets you use a single
interaction to do multiple things, but stops as soon as there is an
error. (It is also how drracket has behaved for a long time.)
closes PR 12790
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.
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.
This change does not yet update the *SL error-message rewriter
to recognize the new error-message formats; the tests do not
currently use the rewriter. A next step is to decide on the
rewritings, implement them, change the test suite to use the
rewriter, and test the rewritings.
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.
Committed as a checkpoint, since I convinced myself that a single
function with a keyword is better, given that the rest of the simplified
functions operate on the whole string.
The text that says that (regexp-split #rx"whatever" "") returns '("")
rather than '() is
If `input' contains no matches [...] the result is a list containing
input’s content [...] as a single element.
This is a little implicit, if you consider such an input as having
nothing left to match over so it's as if there is no input (with a port
this confusion is a little clearer).
Clarify with an example in the docs, and also add tests.
Since mixins rely on super calls to possibly abstract
methods, we want to ensure that the super call will not
error when it gets to an abstract method. However,
external method calls should still raise an error for
abstract methods.
The properties appear in the inlining expansion of an application
of a keyword-accepting function, and they're mainly intended for
use by Typed Racket.
The property keys are hidden, so that the property value can be
trusted as originating from `racket/base'. The accessor functions are
`syntax-procedure-alias-property' and
`syntax-procedure-converted-arguments-property' from
`racket/keyword-transform'.
For example, if definitions have two unmarked `x's that originate
from different modules, make them correspond to different bindings.
This improvement will be used by `scribble/srcdoc', which will
rely on module context to connect `for-doc' requires to documentation
code that appears in the same module --- which is needed, for example,
if a macro expands to documentation code and the macro is used in
a different module.
(this is similar to being flat, but struct contract (lazy ones) can
be non-flat and still have no negative blame).
Use this to optimize struct/dc contracts; specifically when a contract
has no negative blame, then we don't need to add additional wrapping
for indy-ness.
This ended up being fairly tricky to handle the case where there
are several mutually recursive define-opt/c functions. The code
tracks which definitions depend on which ones and does a graph traversal
of the dependencies to find if there is any non-negative blame
possible. Naturally, this uses Racket's macro system to communicate
between the definitions.
This reverts commit f3b687c8ed.
After discussion with Robby and Stevie, we concluded that
this procedure isn't necessary for now. If we ever think
of more examples where it's useful we can bring it back.
a chaperone contract", "no it definitely isn't" or "evaluate this code
at runtime to find out"; previously only the first two options
were available to opters
(this commit also includes other tweaks here and there so won't stand alone)
Looks like it's not making any changes in the current tests (which use
the text renderer), but with words that are longer than the width the
old version would stop wrapping afetr these words. Added a test file
that fails with that and succeeds with the new one. If anyone cares
about this, it's easy to make hyphenate words that are too long for a
line.
(Also fixed some redundant frustration in the bib test...)
* Make each test file runnable using `module+'.
* Make the space tests not print anything (unless they fail, of course).
* Make the `first-class?' case even "more first class" by defining their
and/or as functions. (Doesn't make a real difference for this test,
but nice to test more of the language.)
This should probably become documented if it's stable enough. For now
it's intended for building wrapping functions, so it's only documented
in comments the file.
Don't put an extra seperator element at the end of the stream. Brings
it in-line with the list version (`add-between') and sequence
version (`sequence-add-between'). Includes a test.
* Use #f instead of (lambda () #f) in hash-ref call
* We want the positive blame, not negative, when interface-contracted
methods are passing through a class/c application.
* Use (interface <i>) and (class <c>) for interface and class blame.
These primitives atomically update a box to a new value, as long
as the current value is the same as a provided value. They also
are future-safe.
When futures are enabled, they use low-level hardware instructions
to perform the change atomically.
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.
Generate wrappers consistent with a reader-level absence of `.'s,
instead of wrapping every pair. This change fixes the `syntax-e'
example in the Guide's description of syntax objects.
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
For example, `(module-declared? '(submod (planet dyoo/bf) reader) #t)'
shouldn't fail if there's no "main.rkt" to hold a `reader' submodule;
it should return #f.
Merge to 5.3, but updating cstartup.inc will require a manual merge.
MySQL:
- support multi-packet data rows
- fixed very old length-coding bug (24 vs 32 bit length)
- support large params via long-data packets
- 'any' pseudo-type for parameters
- distinguish 'blob'/'text', 'var-string'/'var-binary'
- read 'text' results as string, not bytes
SQLite3:
- enabled sql types tests
library (mostly in opt/c)
Specifically:
- add inlining declaration for ->i helper function
- modernized the opt/c contracts and improved them so that mutually
recursive define-opt/c functions recognize each other instead of
bailing out to the slow path.
- added =/c as an optimized contract
- improve the error message for the between and comparison opt
contracts
- adjust the blame struct so the name is created lazily, since opt/c
contracts just stick a copy o the contract into the thunk that
creates the name and we don't want to run those effects twice if we
can help it.
adjust 'one-of/c' and 'symbols' so they just use or/c (when possible)
improve or/c's stronger check so that, in the case that or/c is
getting eq or equal contracts, or/c's stronger check is as good as
'symbols'/'one-of/c's stronger check is.
This distinction is important after the introduction of chaperones and
impersonators, since accessing a key and accessing its corresponding value
may have different effects, and hash-keys should only trigger the former.
The immediate symptom was that `(provide (all-defined-out))'
didn't work in a `module+'-based submodule, but there were
also non-submodule ways to expose the problem.
The `get-handle' method provides the underlying Cairo surface for
a bitmap, while the unsafe `make-handle-brush' function supports the
use of a Cairo surface as a `brush%'.
Also, add `racket/draw/unsafe/cairo-lib', which simplifies access
Cairo from external libraries. Documenting `racket/draw/unsafe/cairo'
might be better, but that's a lot more work.
* Get rid of the concept of `modspec': `getarg' now has `require' for
require specs and `module' for a module name (the latter is what all
previous uses of 'modspec except for ,require really needed); command
descriptions use "<require-spec>" and "<module>", documentation
adjusted as well.
* `module-name?' etc turn to `known-module' and `known-module-name',
with a saner behavior, and tests to keep it sane.
* This cleans up a lot of things. Two specific points: ,switch works
better with toplevel-defined modules (see the corresponding change in
the test suite), and also fixes PR 12148.
* Ensure that ,sh commands return void.
* Add tests for ,r with non-atomic require spec, and for use of $F in
,sh commands.
* Improved the test suite, including uses of `module+' so each file can
be run by itself to perform a subset of the tests.
- changed substitute to use closure-compilation
- added stress/perf test for templates
- updated minimatch with vector patterns
- split substitute into separate file, minimize dependencies
- do ellipsis optimization dynamically
- validate guides: check var indexes
It looks like run-teaching-program hasn't been touched in quite a while.
To begin with, the "rewrite-module" function used to add code to print
out values of non-define exprs, but this is no longer necessary. In fact,
the only thing that it does now is to discard "provide" statements, and
even this may be unnecessary. I rewrote big chunks of this (short) file
to introduce defines, eliminate unnecessary functions, and add stepper-
skip-completely annotations to the requires associated with teachpacks.
Also, it appears that the 'rep' argument to expand-teaching-program
was entirely superfluous; I removed it from the argument list, and also
from the three places in the main tree (deinprogramm, lang, and the stepper)
that call this function.
Let me know of any problems seen with teachpack requires....
The bug happens with n-ary uses of arithmetic operations that
have constant arguments but couldn't be constant-folded ---
maybe due to a divide-by-zero.
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.
Using the functions on a port triggers renegotiation of the
connection, which s useful for cases such as a web server that
requires a certificate only for certain paths. This functionality
also allows better testing of the SSL library.
Mostly for amusement, including the contrast between
the benefits of closure compilation for a host interpreter
versus the benefits for a host compiler.
The old implementation could cause deadlock by blocking on a semaphore
while waiting for the original place to run a callback, but a master
GC might be needed (and the blocked place wouldn't get the signal).
Beside fixing that problem, a potential memory leak is fixed in
calling an ffi funcition and having a Racket->C unmarshaling fail.
Also, the GC marking routine for a `place' value didn't reference the
place's underlying `place_obj' value.
The eopl language is now racket-based rather than mzscheme-based. This
test-suite, which was originally distributed on the book's web-site has
been re-written in the new language. Changes include dropping all
drscheme-init.scm and top.scm files. Remaining files were renamed to
use the .rkt extension and edited to use the #lang syntax (instead of
modulue). Require and provide forms were changed to reflect racket's
syntax instead of mzscheme's (eg, only-in vs. only). Several
occurrences of one-armed ifs were changed to use when and unless. All
tests have been run successfully.
The bug is triggered by unsafe flonum operations, a
conversion that tries to make the arguments more unboxable,
and a `lambda' form within an argument to the unsafe
operation.
Closes PR 12587
The `or' and `and' functions already worked correctly; this
fix is for `or' and `and' as applied directly to arguments, which
expands to the `racket/base' `or' and `and' forms.
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".
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.
The prohbition against `handle-evt' on `handle-evt' is as
document and as originally intended. I'm not sure why it
was allowed.
Existing programs that use `handle-evt' incorrectly
can break. I found and fixed one incorrect use and one
questionable use in the Racket tree (which is a small
minority of the uses of `handle-evt' in the tree).
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'.
When an eventspace is created, its thread implicitly calls
`yield'. It now effectively loops with `yield' and while
catching continuation aborts.
Closes PR 12566
This addition triggered several other changes:
* -k for a Mac OS X embedding is now relative to the __PLTSCHEME
segment (which means that executables won't break if you strip
them, for example)
* the command-line no longer has a limited size for Mac OS X
launchers and embedding executables
* Mac OS X GUI and Windows launchers record the creation-time
collection path, unless they are created as "relative" launchers
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