The main problem is that it asked exact? on an unknown
value and exact? works only on numbers.
But since I was here, also try to clarify the error message a bit.
When switching tabs while an on-reflow initiated callback
might still be running can lead to bogus information
coming back from position-locations, as the editor loses
its admin.
So, we just give up recomputing the rectangles when the
admin is gone and, for now, expect that there will be
another on-reflow call when the admin comes back that'll
restart the process (not sure that this is guaranteed tho)
Also, describe the patch in the Windows build notes.
This change increases access to symbol fonts, though not in a
completely consistent and portable way. See the closed problem
report for more information, as well as a 24-NOV-2012 post
on the Racket mailing list:
http://lists.racket-lang.org/users/archive/2012-November/055141.html
Closes PR 13300
* bernoulli -> bernoulli-number
* farey -> farey-sequence
* fibonacci/mod -> modular-fibonacci
* order -> unit-group-order
* orders -> unit-group-orders
Documented `make-fibonacci' and `make-modular-fibonacci'
Reworked text about loading external libraries in docs for `math/bigfloat'
Removed type aliases like Z, Q, Prime (I like them, but TR was printing them
in unexpected places like array return types)
clean up build
Moved `float-complex?' and `number->float-complex' to `math/base',
documented them
Documented `flexpt1p'
Removed `samples->immutable-hash' (not covariant anyway; not going to
use hashes)
Commit 8653bc6792 caused
the doc navigation to render oddly on Opera due to how
it handles . This commit retains the spacing
for text browsers, but fixes the navigation on Opera.
Fixed a few limit cases in some distributions (e.g. (uniform-dist 0 0) didn't
act like a delta distribution, (beta-dist 0 0) and (beta-dist +inf.0 +inf.0)
pretended to be defined by unique limits even though they can't be)
Made integer distributions' pdfs return +nan.0 when given non-integers
Added "private/statistics/counting.rkt", for hashing and binning samples
Added `flvector-sums' (cumulative sums with single rounding error)
Added `flinteger?', `flnan?' and `flrational?', which are faster than their
non-flonum counterparts (at least in Typed Racket; haven't tested untyped)
If a path to a directory is converted to an URL it loses
its trailing path separator.
This can lead to a bug if the URL is used as a base URL to
build other URLs (e.g. combine-url/relative).
There are minor benefits to using fxvectors instead of vectors:
the GC knows that an fxvector has no pointers inside, and the
bytecode compiler knows that `fxvector-ref' produces a fixnum.
BTW, a benefit of fxvectors over byte strings is the lack of an
indirection internally. (Unlike a byte string, the content of
an fxvector is "inlined" into the vector object.)
Change `bit-vector-count' to `bit-vector-length', add arguments
to `bit-vector-copy', use `racket/private/vector-wraps' (which
should be moved to a public place) to implement things like
`for/bit-vector'.
Profiler output suggests that forward-match is a bit expensive. Here
is profiler output from the original code, when profiler is wrapped
around tabify-selection:
------------------------------------------------------------------------------------------------------------
loop [34] 0.1%
get-backward-sexp method in ...k/private/racket.rkt:425:2 [28] 99.9%
[37] 50648(61.1%) 0(0.0%) stick-to-next-sexp? method in ...k/private/racket.rkt:425:2 ...
do-forward-match method in ...rk/private/color.rkt:71:2 [50] 99.9%
...
------------------------------------------------------------------------------------------------------------
get-forward-sexp method in ...k/private/racket.rkt:425:2 [38] 17.1%
stick-to-next-sexp? method in ...k/private/racket.rkt:425:2 [37] 82.9%
[50] 61043(73.6%) 53(0.1%) do-forward-match method in ...rk/private/color.rkt:71:2 ...
colorer-driver method in ...rk/private/color.rkt:71:2 [66] 99.8%
match-forward method in paren-tree% [72] 0.1%
------------------------------------------------------------------------------------------------------------
The patch does the prerequisite string matching before calling forward-match.
Reference to dev list: http://lists.racket-lang.org/dev/archive/2012-November/010976.html
A few invariants involving subtree-width and black-height balance
could break if singleton nodes were reused; bugs were due to stale
data in the nodes.
The token tree implements the implicit interface in the original
splay-based token tree module in syntax-color/token-tree. However, it
does not appear to perform significantly differently in the case of
indentation yet. It needs some additional profiling and analysis to
see if we can take advantage of the richer structure in the rb tree.
Synchronous mode implies fsync(), which makes updates *much*
slower on some machines, such as the DrDr machine. The doc
database doesn't need to survive a catastrophic failue
(such as a power failure or OS crash), so turn synchronous
mode off.
Handle close parentheses in a smarter way while in
auto-parens mode and be a little more smart about
inserting brace pairs in general.
In summary:
- Add some "smart-skip" behavior to insert-close-paren,
described in the documentation.
- When auto-parens mode is enabled,
the existing "balance-parens" keybinding invokes
insert-close-paren with a smart-skip argument of
'adjacent
- A new "balance-parens-forward" keybinding invokes
insert-close-paren with a smart-skip argument of
'forward (whether or not auto-parens mode is
enabled)
- Enable basic smart-skip behavior for
strings ("...") and |...| pairs, specifically, typing
a double-quote or bar character when the cursor
immediately precedes one causes the cursor to simply
skip over the existing one
- Tweak auto-insertion of block comment pairs; i.e.
typing hash and a bar results in a properly balanced
#||# pair. Also, when you type a bar character when
the cursor immediately precedes a closing bar and
hash of a comment, then the cursor skips over both
characters (this seems better than having it just
skip over the bar, and then having to introduce a
new keybinding to detect when a hash is typed while
the cursor is between a bar and a hash)
- In strings and line/block comments, auto-parens mode
no longer has any effect (you can still use the M+..
keybindings to force insertion of a particular brace
pair)
- Detect when a character constant is being typed, and
don't insert brace pairs if so; i.e. if the cursor
is immediately after #\ , then typing any open parens,
double quote, or bar, does _not_ result in the
insertion of an open/close pair even in auto-parens
mode
- Add a bunch of tests related to auto-parens, matching
pairs of braces, strings, comments, etc. to
collects/tests/framework/racket.rkt
Changes the implementation of highlight-range so that it
only recomputes all of the new locations from the positions
when on-reflow is called (otherwise only computing the
relevant ones) and make the on-reflow callback chop itself
up, in case there are lots of highlighted ranges to avoid
tying up the event loop.
Changes searching so that it doesn't neccessarily compute
the entire search results in a single event callback
(but also make it start the computation more aggressively)
Overall, this changes the strategy from one that, for any potentially
long-running callback, just tried to push it off into the future, into
a strategy that tries to avoid long-running callbacks by breaking the
work up into chunks, but starting the first chunk immediately (in a
low-priority callback).
Also, misc other changes to make this work better and generally clean
things up.
Specifically, when a style change happens that ends up
not changing the size of anything, then track that
lack of size change enough to be able to avoid
calling on-reflow.
This is important for the interaction between the
colorer and the search bubbles in DrRacket. That is,
when you make an edit that causes the colorer to have
lots of work, then each chunk of work it does before
yielding control to the event loop would also trigger
a call to on-reflow, which would cause the search bubbles
to recompute their sizes. Overall, the main bad thing
this does is cause lots of allocation and aside from
that it doesn't hurt interactivity. Still, there is a
lot of useless work here, and those extra GCs can be
pretty substantial when you're doing something crazy like
searching for " " in a big file.... (there are 95k spaces
in unit.rkt, in case you were curious)
Change `raco setup' to guard database writes in different places
by an explicit lock that is implemented by place channels. Change
corss-reference reading to fall back to just loading ".sxref"
files if the database seems to be too contended at that point.
These changes are aimed at avoiding distaerous performance when
SQLite seems not to behave well.
Also, fix break and other exception handling near the "fast abort"
path for both reads and writes.