Commit Graph

27284 Commits

Author SHA1 Message Date
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
Robby Findler
6c0baa0c1e make sure there is a dc before trying to size text 2012-11-25 13:19:47 -06:00
Matthew Flatt
d47bfc287d raco setup: more consistent logging and pausing on db locks 2012-11-25 07:23:59 -07:00
Matthew Flatt
24f358a5d7 scribble latex: work around `\href{...#...}{...}' as a macro argument
The `math' document build was failing because `\marginpar' does not
like `\href{...#...}{...}' as an argument.
2012-11-25 06:24:51 -07:00
Neil Toronto
3670916a11 Initial commit for `math/array' documentation; about 65% finished
Replaced pointwise operators with macros that expand to applications of `array-map'; allows more precise return types and reduces compilation time

Changed literal array syntax to use #() to delimit rows instead of [] (still suggest using square parens, though)

Minor refactoring

Fixed a macro so that the only problem with "array-tests.rkt" now is that typed/rackunit is b0rked
2012-11-24 22:13:24 -07:00
Eli Barzilay
dd9d85feec Cleanup junk files in a bunch of racket tests. 2012-11-24 16:37:36 -05:00
Robby Findler
793ee71e69 fix a coloring bug
also, add a little more logging to the aspell logging info
2012-11-24 14:05:45 -06:00
Matthew Flatt
4b094f8ec8 raco setup: fix for non-parallel doc build in a fresh installation 2012-11-24 11:33:07 -07:00
Jay McCarthy
34d2c7b263 Removing usable of lib paths and collection paths in Web server re: Planet 2 extensions 2012-11-24 09:22:14 -07:00
Jay McCarthy
accdcb755a Preventing planet2 from running 'raco setup' on updating when no updates were available 2012-11-24 09:22:14 -07:00
Jay McCarthy
6c4a2067d9 Fixing package source details link 2012-11-24 09:22:14 -07:00
Jay McCarthy
d614500f59 Allowing more characters in Planet 2 tags 2012-11-24 09:22:14 -07:00
Jay McCarthy
cf7e54bb9f Set a maximum timeout for all tests in DrDr 2012-11-24 09:22:14 -07:00
Jay McCarthy
fd86928320 Changing the timeout for this file for DrDr
Before Matthew's change, it takes 7m24s but after it takes 3m9s, at
least when I run it manually... for some reason it takes longer when
DrDr runs it.
2012-11-24 09:22:14 -07:00
Jay McCarthy
ecb88afd21 Fixing some ugly line-widths in DrDr 2012-11-24 09:22:14 -07:00
Matthew Flatt
7d6dc98e0e racket/draw: fix problems related to failed font fallbacks 2012-11-24 08:15:43 -07:00
Matthew Flatt
4ca6e3c452 fix exception handling during collection-table read
Non-`exn:fail?' exceptions, such as breaks, should be propagated.
2012-11-24 08:13:51 -07:00
Matthew Flatt
3f08da67a4 remove 'always-run style from the doc that list documents
The 'depends-all style and dependency tracking should run the document
when needed, I think.
2012-11-24 08:13:51 -07:00
Matthew Flatt
c12a129b09 remove unused locking layer in the doc database manager 2012-11-24 08:13:51 -07:00
Mike Sperber
124b5abb7d Synch German string constants with latest. 2012-11-24 15:08:56 +01:00
Jens Axel Søgaard
7ef4bec534 Added more margin notes 2012-11-24 14:00:34 +01:00
Matthew Flatt
19d7519dfe don't fail when there's no user-specific docindex 2012-11-24 05:28:04 -07:00
Eli Barzilay
777a6cd38b New Racket version 5.3.1.9. 2012-11-24 03:05:18 -05:00
Matthew Flatt
bc5e811cac dist-spec fix
probably temporary, until the tree library moves
2012-11-23 22:07:18 -07:00
Matthew Flatt
9888fac99e raco setup: move doc dependency and duplicate checking to database
This change makes document building --- and specially incremental
document building --- more scalable. The global duplicate-definition
check is handled by a database query, for example.
2012-11-23 20:07:49 -07:00
Matthew Flatt
a73dc50224 break cross-reference info for document into pieces
For example, the cross-reference information for the
Reference is now broken into about 16 pieces, so that
resolving a cross-reference into the Reference doesn't
require loading all cross-reference information for
the Reference.

Every document is split into two pieces, so that the title
of a document is roughly in its own piece. That way,
re-building the page of all installed documentation can be more
scalable (after some further changes).
2012-11-23 18:44:51 -07:00
Matthew Flatt
693ff33bfc serialize bluebox tables
Typically, the bluebox table includes keys that have interned parts,
so serialization can save space both on disk and in memory when the
bluebox information is reloaded.
2012-11-23 18:44:51 -07:00
Matthew Flatt
e4e4d544f5 net/imap: log to an 'imap logger 2012-11-23 18:44:51 -07:00
Matthew Flatt
a64a54abee fixup for docindex.sqlite 2012-11-23 18:44:51 -07:00
Matthew Flatt
20bdbb6d9b racket/serialize: simpler handling of quotable values 2012-11-23 18:44:51 -07:00
Matthew Flatt
41e9e3e5ff db: add `sqlite3-available?'
Loading `db/sqlite3' no longer raises an exception if
the SQLite library isn't found. Instead, `sqlite3-connect'
raises an exception, while `sqlite3-available?' reports
whether it will work.

The dynamic test allows the documentation-help system
to continue to work if SQLite3 is not available. Currently,
though, `raco setup' still insists on using SQLite3 to
build the database of documented tags.
2012-11-23 18:44:51 -07:00