Commit Graph

27364 Commits

Author SHA1 Message Date
Robby Findler
ad2e8ac54e fix error check on the result of place-children
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.
2012-11-28 10:54:34 -06:00
Robby Findler
52d0b7e352 Possible fix for error raised by build-rectangle
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)
2012-11-28 10:54:34 -06:00
Matthew Flatt
f847b76ad1 win32: make "build.bat" work with VCExpress
Closes PR 13231
2012-11-28 05:42:05 -07:00
Matthew Flatt
46fb91cfe4 update pre-built binary path for a win32 patch
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
2012-11-28 05:39:46 -07:00
Matthew Flatt
3aa74f2a84 slideshow: fix import that changed the style of legacy libraries 2012-11-28 05:39:45 -07:00
Neil Toronto
96d1400654 Renamed functions
* 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)
2012-11-27 22:23:42 -07:00
Robby Findler
a5961dcf36 make the drr log follower show its results in a separate window 2012-11-27 22:56:44 -06:00
Neil Toronto
6f1ffecc23 Stubbed out missing math/array' and math/statistics' doc entries to
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)
2012-11-27 18:05:38 -07:00
Asumu Takikawa
3e81924f84 Fix nav separator for Opera
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.
2012-11-27 18:03:40 -05:00
Jens Axel Søgaard
64f64a3607 Added bit-vector-count 2012-11-27 21:53:30 +01:00
Neil Toronto
2d34811ab6 Finished `math/distributions' documentation!
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)
2012-11-27 13:44:15 -07:00
Philippe Mechai
3fdd834c6c add missing icon resizing in replace-icons
When replacing icons in an exe file, if the icon is smaller than the target
size and it has an alpha mask it is not resized which lead to an error.
2012-11-27 09:23:45 -07:00
Arek Korbik
0a5f1a21a6 Make send/suspend/[url/]dispatch allow values
Fix the send/suspend/[url/]dispatch's contracts (any/c -> any) to
allow values (and match the docs).
2012-11-27 08:49:04 -07:00
Philippe Mechai
201534b7ad Added path->url tests for directory paths
This check that no regression was introduced with 733d95b.
2012-11-27 08:46:40 -07:00
Philippe Mechai
d8ff661118 path->url: ensure directory paths have a trailing slash
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).
2012-11-27 08:46:34 -07:00
Matthew Flatt
36bfae9497 adjust some comments to further clarify 2012-11-27 08:07:27 -07:00
Samuel Bronson
3ee6248daa scribble/html-render: clarify mangling of entities: — ⟨ ⟩ 2012-11-27 08:04:42 -07:00
Samuel Bronson
4424b19ff8 Fix syntax highlighting for `#lang meta/web'. 2012-11-27 07:55:50 -07:00
Samuel Bronson
5a216cc4ce scribble: Rename attribute pltdoc -> data-pltdoc, which is valid in HTML5.
(pltdoc isn't valid in any version of HTML.)
2012-11-27 07:55:43 -07:00
Samuel Bronson
a66fa77e2e Typo fix in content-type: text-html -> text/html 2012-11-27 07:55:36 -07:00
Samuel Bronson
b366d04792 Typo fixes 2012-11-27 07:55:29 -07:00
Samuel Bronson
e157041497 scribble/html-render: comment nits 2012-11-27 07:55:23 -07:00
Samuel Bronson
8653bc6792 scribble/html-render: Add missing sep-element for non-CSS browsers 2012-11-27 07:55:16 -07:00
Samuel Bronson
11df3f9b20 scribble/html-render: Fix typo in error message 2012-11-27 07:55:08 -07:00
Samuel Bronson
45bdaa131d scribble/racket.css: Avoid excessive line-height in some cases
(In particular, when the default line-height for "monospace" is smaller than for the main font.)
2012-11-27 07:54:05 -07:00
Danny Yoo
1b4ebef117 file/sha1: fix problem with leading zeros
Closes PR 13212
2012-11-27 07:42:48 -07:00
Matthew Flatt
054a52f547 data/bit-vector: change implementation to fxvectors
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.)
2012-11-27 07:26:39 -07:00
Matthew Flatt
4ed45a6aef data/bit-vector: some adjustments for consistency
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'.
2012-11-27 07:26:39 -07:00
Jens Axel Søgaard
028d14a877 Initial import of bit-vectors 2012-11-27 07:26:39 -07:00
Robby Findler
4af72a5825 add a little more info into the build-rectangle check for when it fails 2012-11-26 23:30:10 -06:00
Matthew Flatt
c0abe85d30 make case' in r5rs' and r6rs' still use eqv?'
Also, make both `case' and `cond' disallow internal definitions,
instead of inheriting the `racket' behavior.
2012-11-26 19:49:36 -07:00
Jon Zeppieri
486e95049f change 'case' to use equal? 2012-11-26 17:58:04 -07:00
Robby Findler
43e7150fdf clean up the text:searchable docs based on recent changes 2012-11-26 18:42:18 -06:00
Robby Findler
6d56491e8d make unhighlight-range remove only the first matching range, not
all of the matching ranges
2012-11-26 18:42:18 -06:00
Asumu Takikawa
6a88812de7 Add doc pages for remaining raco commands
Closes PR 12956
2012-11-26 17:52:43 -05:00
Asumu Takikawa
5e54ff90d4 Index raco pkg command 2012-11-26 17:52:43 -05:00
Asumu Takikawa
8c91decc8a Index raco scribble command
Relevant to PR 12956
2012-11-26 17:52:43 -05:00
Danny Yoo
43b0e2157c Optimize stick-to-next-sexp? to speculative match before using forward-match.
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
2012-11-26 13:42:49 -07:00
Robby Findler
df5ee4c7ba fix some right/top mixups
closes PR 13312
2012-11-26 12:23:27 -06:00
Danny Yoo
90714fbd5e Implements a rb-tree based version of the token tree, and fixes bugs in red-black.rkt.
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.
2012-11-26 11:14:22 -07:00
Robby Findler
f8793c0cc2 fix one way that rectangles could have the left side be to the
right of the right side
2012-11-26 10:56:04 -06:00
Robby Findler
ba89a5da92 fix bug in error checking code 2012-11-26 07:55:18 -06:00
Matthew Flatt
569af52ffc raco setup: turn off synchronous mode for doc database
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.
2012-11-26 06:24:29 -07:00
Neil Toronto
8aa623c2e8 Made plots in plot' and math' render nicely in PDFs (plots in docs are picts now)
Fixed errors in `linear-seq' when end <= start
2012-11-25 22:32:07 -08:00
Robby Findler
49a0b950b7 tweak to Nadeem's commit 2012-11-25 22:07:28 -06:00
Nadeem Abdul Hamid
8f3343cd01 automatic parenthesis mode improvements
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
2012-11-25 21:57:52 -06:00
Robby Findler
5197649cb7 improve the interactivity of DrRacket's search
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.
2012-11-25 20:58:13 -06:00
Robby Findler
0264d3d5ad Adjust text%s so they don't call on-reflow as often
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)
2012-11-25 20:58:13 -06:00
Matthew Flatt
31e644e5e1 raco setup: add a layer of db write locking, db read fallback
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.
2012-11-25 17:55:23 -07:00
Matthew Flatt
9062d27d31 make place-channel receives more fair 2012-11-25 12:29:56 -07:00