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.
"dmg" is now the layout-enabled usual DMGs, since they will soon have
more functionality around them (signed applications). "sdmg" is for the
simple (or "source") DMGs, which are just plain containers for a
directory. Also use a flag to avoid the stupid dynamic scope hack.
In particular, `raco pkg show' should work when the user does not
have write access to the installation directory or installation-wide
package database.
Merge to v5.3.2
Note that this requires a running Finder. Note also that the process
involves attaching the created DMG which means that it might be
problematic with a machine that might have a volume by the same name
already attached (since the applescript uses the volume name, which is
not required to be unique).
Robby says that they're no longer recommended and rarely used by
browsers, and with a better dmg layout the contents should not be copied
automatically anyway.
These are call sites where one of the callees accounts for a large portion
of the total time of its caller.
When such call sites are considered inlining failures, we can refine
recommendations.
The concept of interesting call site is also useful as a building block
for higher-level patterns.
Had been specifying Scheme lexer for code blocks, while waiting for
new Racket lexer to wend its way from Pygments to Pygments.rb to
Linguist to GitHub.
That day is almost here: Linguist will soon update and deploy to
GitHub. And Racket 5.3.2 is about to release. As a result, I think
this is the correct time to switch to the Racket lexer: It should be
live on GitHub by the time people are using Racket 5.3.2.
/cc @rmculpepper -- I think this commit should go into the 5.3.2
release.
- parsing of polydots values was fixed
- certain polydots error cases are now reported
- the custom application rule for values was fixed
Closes PR 13365
Please merge to 5.3.2
The prior code constructed the location of nonterminal maches out of
the the state of the stream after parsing. This isn't right for a few
reasons:
1. It doesn't get starting location correctly.
2. It doesn't behave when the non-terminal production did not
actually consume tokens for its parse.
This patch modifies the parsers to also pass along a
"last-consumed-token"; it, along with a few other changes, provides
the parsers enough information to accurately construct the locations,
even when no tokens have been consumed during the parse. We
synthesize a sentinel last-consumed-token token to take location from
the head of the stream.
The `+m' flag is a long-overdue shorthand for `++xref-in setup/xref
load-collections-xref', which links to installed documentation in
the same way as DrRacket's "Scribble HTML" button.
That is, use `+m' to link to installed documentation,
scribble +m mine.scrbl
instead of the previously recommended
scribble ++xref-in setup/xref load-collections-xref mine.scrbl
Merge to 5.3.2
I belive this should only be noticeable at the human timescale level
when the tabs have been switched to already and, in that case, seems
to go from 3-400 msec to 50-60 msec on my machine
Essentially all of that time is in redrawing the buffer, so that 50-60
msec is proportional to the height of the DrRacket window, roughly.
(The commit just makes drracket do a single redraw instead of about 4
or so of them per switch ...)
With either
configure --enable-pkgscope=installation
or
raco pkg config -i --set default-scope installation
the default scope of `raco pkg' actions can be changed from
user-specific to installation-wide.
We considered trying to guess when someone building Racket would prefer
installation-wide package scope by default. In particular, someone
building from source for in-place use seems likely to want
installation-wide scope by default. Then again, we don't want to
discourage in-place builds for Unix installations that are intended
for multiple users. So, no guessing for now.
Also, add a `--scope' argument to `raco pkg' commands, which is more in
line with other options, but keep `-i', etc., as shorthands.
The intent is that the configuration module can be rewritten without
recompiling code that uses it, so don't let the compiler inline
configuration values.
The problems were with
* `sqrt' and `expt' on single-flonum complex numbers
* `asin' and `acos' on single-flonum arguments and complex results
* `atan' on mixtures of single-flonum and exact arguments
* `gcd' on mixtures of single-flonum and flonum arguments
guard more of the filesystem manipulations with
handlers and log errors instead of letting them
be raised and show up as internal errors
related to PR 13403
teachpack menu.
Instead DrRacket explicitly changes the menu items when
the language changes or when a teachpack is added/removed
Also, Rackety.
Closes PR 13395
* At least stubbed out all (or almost all) `math/matrix' exports; many
have complete documentation (e.g. types, predicates, accessors,
constructors, for loops, conversion, much of "Comparing Matrices")
* Moved `matrix-zero?' and fixed to use (matrix-error-norm) as its norm
* Added `matrix-basis-cos-angle' (currently a stub; should return smallest
singular value of a certain matrix multiplication)
There appears to be no way to make `on-demand' work right for the
Unity window manager's global menu bar, since there's no notificiation
when the menu bar is clicked. We approximate the correct behavior
by calling `on-demand' when a containing frame loses the keyboard
focus, which might be because the menu bar was clicked; that may be
too late (because the menu has already been shown), but it should
work most of the time.
Closes PR 13347.
Relevant to PR 13395, but DrRacket will have to change to work
around the remaining limitations of `on-demand'.
This will make switching back and forth between 5.1.3 and the latest
not lose the frame size and position preferences (since the format
of the data is different now that the current release remembers
the position on a per-monitor-configuration basis)
* Gram-Schmidt using vector type
* QR decomposition
* Operator 1-norm and maximum norm; stub for 2-norm and angle between
subspaces (`matrix-basis-angle')
* `matrix-absolute-error' and `matrix-relative-error'; also predicates
based on them, such as `matrix-identity?'
* Lots of shuffling code about
* Types that can have contracts, and an exhaustive test to make sure
every value exported by `math/matrix' has a contract when used in
untyped code
* Some more tests (still needs some)
The synchronization result of a log receiver is now a vector of four
values, instead of three, where the last one reports the name.
Also, an optional argument to `make-logger' provides a notification
callback for each event sent to the logger.
These changes enable more control over loggers and events. Suppose
that you have processes A and B, and you want all log events of A
to be visible to B, but not vice-versa. Furthermore, you want the
log events to appear at B in the right order: if A logs an event
before B, then A's event should arrive at a log receiver's before
B's. Now that a log receiver gets the name associated with the
original event, and now that the name can be re-sent in a
`log-receiver', it's possible to give A and B separate loggers and
send all of the events from A's logger to B's logger. Furthermore,
you can use the notification callback so that when an event is logged
in B, you can make sure that all available events from from A's
logger have been transferred to B's logger.