This is a bit suspicious, since it isn't clear why a frame
whose show method has been called with #f should be considered
an active frame. Since changing that is a much more dangerous
change then, for now: closes PR 13564
This commit is to giure out just how much Rackety can combat rightward drift
in this file (this was a region of code edited recently for other reasons)
Turns out that the first hunk's rightmost column (of code, not counting
comments) moved left by 39 chars and the second by 40 chars
Specifically, when expanding in the body of a dependent argument, put
the original variable for the dependened on field into that code, but
changing the expansion so that the binder becomes the original field's
x, not the x in the dependent declaration list.
This means that, for example, in this program:
(->i ([x any/c]
[y (x) (begin x any/c)]
[z (x) (begin x any/c)]) any)
the first x will be the binder and the other four now count as
bound occurrences.
Also, rip off Casey's redex check syntax tests to add tests
closes PR 13559
The intent is to support phase-crossing data such as the `exn:fail:syntax'
structure type that is instantiaed by macros and recognized by contexts
that use `eval' or `expand'. Phaseless modules are highly constrained,
however, to avoid new cross-phase channels, and a module is inferred to
be phaseless when it fits syntactic constraints.
I've adjusted `racket/kernel' and improved its documentation a little
so that it can be used to implement a phaseless module (which can
import only from other phaseless modules).
This change also adds a `flags' field to the `mod' structure type
from `compiler/zo-structs'.
* The all-versions page has a docs column with html/pdf links, and also
two links in the nightly builds footer.
* Specific version download pages have a link to the docs for that
version. (Only html, to save space.)
* Move sha1 test to the same place, to be run like the others.
* Unify tests for untar and unzip.
* Also improve them: test results instead of failing with errors. Also,
generate random text to archive, and use 0 for group+other permission
bits (to avoid world writable results on an error).
Also, minor code cleanup (don't create a function and pass it
around when has only one thing in its closure and you can
just pass that around, especially when passing the function around
makes the code harder to read and the created function has to
have a "dot" arglist and use "apply" in its body)
better wrt to its first result
That is, instead of just returning the string "#lang" it now
returns the actual text that was there (it was supposed to be
doing that all along and my recent commit fixed it, but I
missed the test cases)
lexers it defers to
also, remove the checks in color.rkt in the framework (they are not
all covered by the added contract, but they mostly are and when they
aren't, most of those times are using the heavily tested racket-lexer)
- sllgen.rkt - use begin-for-syntax+define-syntax instead of
define-syntax-set.
- eopl.scrbl - rewrite *3-columns so that it no longer errors when 3
doesn't divide the number of reprovided lang forms.
- Removal of mzscheme and mzlib requires.
- Updated docs.
This adds a tag to DrRacket File menu docs. It adds two margin notes
to the quick start, one linking to the essentials for using DrRacket,
and the other for saving Definitions.
Addresses PR 9501.
same information as the yellow green bubbles
Before, when you typed c:x;n, drracket would look at the identifier
you're on, find its binder, find all bound occurrences of that binder,
sort them by position in the buffer, and then jump to the one that
follows where you are.
This works great for things like the "x" in "(let ([x 1]) x x)"
but not so great for things like the "define" in:
#lang racket
(define x '(+ 1 2))
(define y '(+ 3 4))
since that would jump to the quote, since there are bindign arrows
going from the "racket" to the define and to the quote.
Now, since it is using information ultimately derived directly
from (and only from) free-identifier=? (the arrows also come from
identifier-binding, which is how we get those arrows in the second
example above) you jump from the first define to the second define,
which seems better.
Pango crashes (with an assertion failure) on characters U+1D173
through U+1D17A. Trying to fix (or even just compile) Pango for
Windows is hard, so skip the characters at the `draw-text' and
`text-extent' level.
The bug is unlikely to be specific to just those characters in the
long run, but only those characters appear to be problematic on my
Windows 7 installation. So, the workaround may be enough for many
installations, and hopefully the Pango bug wil be fixed one day.
Relevant to PR 13513
A recent change improved "on this page" handling and also
fixed a short-circuit test to almost certainly do what
was originally intended, but the test was wrong, so just
get rid of it.
Related to PR 13305: I tried to use zero-width-space to force appropriate
line breaks, but unfortunately under Opera on Linux, this shows as
unsupported character glyphs.
Since I can't reliably use zero-width-space, I'm backtracking to the
prior solution on introducing spans with the mywbr class. However,
I've added in a   element to the content of the span, as suggested
elsewhere on the web. This appears to fix the _gcpointer issue that
Eric sees.
These additions could create backward-compatibility problems, but our
searches suggest that problems will be rare; it's more common for
`_size_t' to be incorrectly aliased to `_int', so having definitions
for these standard types is likely to avoid future problems.
commit e503850f21 broke drracket's
interactivity (for some files it could take 2 seconds to do
that one line)
This changes the bindings-table so that it maps to sets instead of
lists. Now, instead of mutating all entries in the table right after
collecting everything, just leave them as sets until we need the info
and just sort a single entry, when it is needed
The check was incomplete in the case that both arguments to a binary
[ext]flonum function need to be checked and the second one was not an
[ext]flonum and also not a fixnum.
The problem was exposed by improved error checking
in the expander to detect references to exports of a module that
is not yet visited, and as triggered by the documentation for
`2htdp/planetcute'.
A part with style property 'toc-hidden no longer
hides child sections, which makes it consistent with Latex/PDF
rendering.
A part with style 'grouper and 'unnumbered does not make its
child parts render as more nested, which is consistent with
'gruper without 'unnumbered. An unnumbered grouper is represented
as "" in a section-number list (while #f is still used for
unnumbered non-grouper layers).
Includes a repair for floating-point `min' and `max' that affects all
x86 builds that use SSE arithmetic, leaving the (otherwise unused)
floating-point stack in a bad state, which might have affected
x87-using C/foreign libraries running alongside Racket.
in the line numbers when it moves around
specifically, if the before and after green line are right
next to each other, then put it into a single edit sequence
(which unions the invalidated regions); if not, then we
may be jumping far away, so invalidate the two regions
and redraw them separately
wrap/handle-evt that receives multiple values must have a handler function with adequate arity.
struct.c:
change contract for wrap/handle-evt from (any/c -> any) to procedure?
thread.c:
adjust sync processing
sync.rktl:
add test for handle-evt, wrap-evt and prop:evt
Repair 73e07f576b added an item to a list without incrementing a
counter for the list length, which cause a different element of
the list to be dropped, which could mess up binding resolution in
arbitrarily bad ways.
(Ths bug falls into the "how did this not get exposed earlier?" bin,
although part of the answer is that it requires a combination of
module re-expansion and simplification of syntax objects in the
residual program.)
Closes PR 13428
This fixes a bug in DrRacket where by changing the font size
would cause the line numbers to encroach on the space allotted
to the main text of the definitions window (or, if the font size
is getting smaller, make a large gap)
Also, some cleanups of the code and
make the syntax-color/ library docs
point to color:text<%> instead of
color:text% (as the interesting information
is attached to the interface, not the class)
The previous version of the code replaced the implicit #%app with
the kernel #%app (ie, #%plain-app), causing sequence functions
that take keyword arguments to fail.
Instad of `(dynamic-require .. #f)', use `(dynamic-require .. 0)', which
has the effect of making compile-time code "available" (see docs) in
case the loaded module uses `eval' on syntax objects that refer to
non-kernel syntax.
closes PR 13489.
In the C code, inflate is allowed to peek at least one character
beyond the extent of a deflated byte sequence. The thread related to
the bug report of PR 13489 documents that deflate can peek beyond EOF.
Specifically when there is no delegate and an edit
sequence is started, track that differently in case
a delegate is set before the edit sequence ends
(in which case we don't want to end the edit
sequence in the delegate since we didn't start it
there)
related to PR 13491
Instead of assumning that the snip's text will match a font's height
metrics, check and remember the actual metrics if its doesn't match,
which accomodates font substitions (e.g., when using #\u2144 under
Windows).
This is, afaict, a completely backwards compatible way to add this
functionality in the sense that any of the non-error command-line
arguments passed to raco test before still do precisely the same
things
After some consultation with my class this quarter,
it seems clear that the previous defaults and nearby
variations are completely hopeless for colorblind people
(there are at least 3 in this class). So go with the
defaults used in the HtDP languages, which have been
vetted by saidsame 3 people.
binding site (with a green/yellow bubble) when the mouse moves over
any one of them
This change comes about because of the recent fixes to the
interactivity wrt to the rename menu. Basically, in order to fix the
bug (but still preserve the interactivity optimization), check syntax
changed from sending the information "here is a place to offer a
rename for these identifiers" to "here is a set of identifiers that
are all free-identifier=?" (the difference being that the latter does
not imply you got them all (which enables the optimization) and that
the information is slightly less rename-menu specific (which enables
the change in this commit))
An extflonum is like a flonum, but with 80-bit precision and
not a number in the sense of `number?': only operations such as
`extfl+' work on extflonums, and only on platforms where extflonums
can be implemented by hardware without interefering with flonums
(i.e., on platforms where SSE instructions are used for
double-precision floats).
[Patch provided by Michael Filonenko and revised by Matthew.]
The compiler tracks information about bindings that are known to
hold extflonums, but the JIT does not yet exploit this information
to unbox them (except as intermediate results).
Note: With this refactoring, `math/utils' no longer depends on `rackunit'.
* (flexp2 x) computes (flexpt 2.0 x) but in about 1/3 the time for integer
`x' using a lookup table. Written for exact argument reduction in `fllog2'
after discovering that (flexpt 2.0 x) was the main performance bottleneck.
* (fllog2 x) computes (/ (fllog x) (fllog 2.0)) with near perfect accuracy.
Invented an algorithm to compute it with at least 8 extra bits before
final rounding; quite pleased with the result. Needed `fllog2' to ensure
(fllogb 2.0 x) would be exact when `x' is a power of two.
* (fllogb b x) computes (/ (fllog x) (fllog b)) with better accuracy, and
also handles limit values in a way that's consistent with the mathematical
limits. When those are ambiguous, it's consistent with `flexpt', which
follows IEEE 754 and C99. Otherwise returns +nan.0. See docs for details.
* `bflogb' is currently just for testing `fllogb'.
* Refactored FPU testing and documented it. So far, the only documented way
to do it is by calling `test-floating-point', which runs a comprehensive
deterministic+randomized suite of tests and returns a list representing
failed tests. I'll document individual tests after I document flonum
expansions and result/error functions like `fl+/error'.
* Added `fllog2' and `fllogb' to the flonum tests.
The code used eq? to check to see if a given language was in
an list of allowed-to-create-executables languages. But the
language object was passing thru TR and so eq? didn't hold and
thus the check was buggy.
They hypothesis behind this change is that the undo is
undoing an edit that came before, not the temporary edit
that appears in insert-close-paren. So, when there are
no edits happening (ie when fixup? is #f) then don't
undo. This is only a hypothesis because we were not able
to find a small code sequence, outside of DrRacket to
cause the bad behavior, so possibly there is really more
going on here.
Thanks to Nadeem Abdul Hamid for finding this fix.
Closes PR 13454
This move moves a library from the plt distribution into the
mr distribution, which is a direction we do not generally
like to go, but the pict library is more core than slideshow
and the dependency that triggered this change is that the
2htdp/image library now interoperates with picts (hopefully
2htdp/universe will also work with them at some point).
So this teases out the pict part of slideshow (mostly,
but not completely the texpict collection) and moves only
that part to the mr distribution.
The code to draw a border has to determine the widget's position
within the drawing window. Gtk 3.0 has a function to provide that
transformation, but Gtk 2.0 doesn't seem to have one, and it seems
that the transformation implemented in `racket/gui' wasn't right.
Closes PR 13453
The code added to handle expressions mixed with definitions was
not introduced in the right way; fix it to be like macro-introduced
code.
Closes PR 13452
Clean up the use of styles for alignment and the generated instances
of style names. In the process, remove some padding for HTML output,
and make the rendering more configurable (especially for Latex, based
on suggestions by Keven Tew).
The way that nested flows are generated can be different than before,
so these changes risk breaking some existing uses of `scriblib/figure'.
The changes especially likely break uses of `scriblib/figure' with
output configured through overiding .css/.tex definitions. But
the old pile of styles/macros was inconsistent and broken in various
ways, so hopefully the changes are an improvement overall.
Nothing in the docs said that `parser-tools/yacc' is for LALR grammars
--- although I guess that it implied for most reader by the name "yacc",
but it doesn't hurt to say so explicitly. Meanwhile,
`parser-tools/cfg-parser' is useful for non-ambigious (non-LALR) grammars.
Also, from the style guide:
* Section Titles Should be In Titlecase, Like This
* Don't start a setence with an uncapitalized identifier.
This guarantees that patterns like (? pred pat) will
always check `pred` before matching any of `pat`.
However, `and` patterns are not required to match left-
to-right.
The fix consists of three parts:
1. Rewriting `inline-matrix*'. The material change here is that the
expansion now contains only direct applications of `+' and `*'.
TR's optimizer replaces them with `unsafe-fx+' and `unsafe-fx*',
which keeps intermediate flonum values from being boxed.
2. Making the types of all functions that operate on (Matrix Number)
values more precise. Now TR can prove that matrix operations preserve
inexactness. For example, matrix-conjugate : (Matrix Flonum) ->
(Matrix Flonum) and three other cases for Real, Float-Complex, and
Number.
3. Changing the return types of some functions that used to return
things like (Matrix (U A 0)). Now that we worry about preserving
inexactness, we can't have `matrix-upper-triangle' always return a
matrix that contains exact zeros. It now accepts an optional `zero'
argument of type A.
Strip any code signing when generating an executable from
Racket or GRacket. Also, place the __LINKEDIT segment in
virtual memory after the __PLTSCHEME segment, so that
the in-memory layout order matches the file layout order,
which in turn makes the code-signing tool's update of the
__LINKEDIT segment's size not create a virtual-memory
overlap with __PLTSCHEME.
* Narrowed type of `submatrix' to only sensible argument types
* `matrix-invertible?' now returns #f when given a non-square matrix
instead of raising an error
* Allowed `matrix-diagonal' to operate on non-square matrices
* Fixed type of `matrix-expt'
* Made matrix functions respect `array-strictness' parameter (mostly
wrapping functions with `parameterize' and return values with
`array-default-strictness'; reindentation makes changes look larger)
* Added strictness tests
* Added parameter `array-strictness', default #t
* Added `array-default-strict!' and `array-default-strict', which act
like the functions without "default" in the name when
`array-strictness' is #t; otherwise they do nothing
* Lots of small changes to existing array functions, mostly to ensure
computations are done using nonstrict arrays, but return values are
strict when `array-strictness' is #t
* Added strictness tests
* Added tests to ensure untyped code can use `math/array'
* Rewrote `array-map' exported to untyped code using untyped Racket
* Rearranged a lot of `math/array' documentation
closes PR 13435
Also cleaned up one more threading problem (this one was
probably innocuous, but it is hard to be sure and the
rewrite is easier to see that it isn't problematic)
Before this commit, the files that are loaded during expansion
were discarded when an error during expansion occurs. This commit
saves them: unless the program is something like
(begin-for-syntax (kill-thread (current-thread)))
the handling that deals with that kind of situation (as opposed
to just an exception being raised) doesn't try to save them
Do not merge to 5.3.2: this bug isn't serious and the new code
is not as well tested as the old
Also cleaned up implementation; only generates syntax for requested part(s) of
source location, and is more intelligent about calculation of relative paths.
* Remove lots of sudoing, and instead use one to change the contents (of
non-simple DMGs). Perhaps that's not needed too. (I think that there
used to be some problem when the owner was a specific user in the
installer script days, perhaps it caused some mess in the pre/post
flight scripts. Maybe it's safe to not do this anymore.)
* There was a fundamental weakness in the Finder script -- it tweaks the
DMG by openning its mount, but the way to specify a disk is via its
displayed name which is not unique. This can be problematic if there
is already a mount that has the same name, and given that the DMG
machine can be used by PLT people, it's even likely to happen. It is
tricky to solve this, since there is no way that I see to refer to the
disk by its mount point or device in the Finder, and no way to find
out the name in the shell.
I spent a ton of time searching the webs for a solution, but it seems
that practically nobody is concerned (or even aware of this problem).
Eventually, the hack I did is to mount the image onto a randomly named
directory, then iterate over all disks and look for one whose `name'
property is that directory name (apparently the `name' property is the
name of the last component of the mount point). For safety, throw an
error if no such disk is found, or if more than one is found.
Incidentally, using a known mount point also simplifies things since
there is no need to know the device name of the mount.
* Use UDBZ instead of UDZO for the compressed image. The savings are
not as big as I expected them to be for some reason, but the
compatibility issues should be all gone now (UDBZ works only from 10.4
and up).
* Unset $LD_LIBRARY_PATH to avoid some 10.8 bug.
* Switch the build to happen on dublin, running 10.8. At least
code-signing is broken on the 10.5.8 machine, and possibly also the
osascript to identify the desired image disk.