Commit Graph

4826 Commits

Author SHA1 Message Date
Matthew Flatt
bfe9548aa6 planet2: "package name service" => "package name resolver" 2012-12-21 11:51:08 -07:00
Greg Hendershott
faeba879e2 Fix bug with pound signs used to mark sections.
Also update tests/scribble/markdown-docs files accordingly.
2012-12-19 19:32:00 -07:00
Greg Hendershott
a3800cdc94 Render Scribble margin-note as Markdown block-quote.
More precisely, do this for nested flows with the "refcontent" style.

For instance this Scribble:

    @margin-note{Note: This is a note. Let's make it long enough that the
    markdown output will have to line-wrap, to make sure the > mark starts
    each line properly.}

Will render as this Markdown:

    > Note: This is a note. Let's make it long enough that the markdown output
    > will have to line-wrap, to make sure the > mark starts each line
    > properly.

A site like GitHub.com will render this in a block-quote style
suitable for notes:

> Note: This is a note. Let's make it long enough that the markdown output
> will have to line-wrap, to make sure the > mark starts each line
> properly.
2012-12-19 19:31:15 -07:00
Matthew Flatt
aa08a68424 add phantom byte strings
A phantom byte string is a small object that the memory
manager treats as an arbitrary-sized object, where the
size is specified when the phantom byte string is created
or or when size is changed via `set-phantom-bytes!'.
2012-12-19 18:42:14 -07:00
Vincent St-Amour
67af968a73 Add failing test case for instantiation and special typing rules. 2012-12-19 13:45:49 -05:00
Asumu Takikawa
acda049f7d Add define: form variant for polymorphic non-function values 2012-12-19 13:08:41 -05:00
Matthew Flatt
c5c5e6959d racket/draw: fix memory-management problems with JPEG binding 2012-12-19 11:07:48 -07:00
Matthew Flatt
4fc71951ee change subprocess handling to avoid waitpid(0, ...)
Keep track of whether any Racket-managed subprocesses are pending,
and use waitpid(0, ...) only if there is one, to better cooperate
with an embedding environment.

Also, add a chapter to the "Inside" manual to explain the issues.
2012-12-19 08:54:32 -07:00
Matthew Flatt
d88e26d7a1 racket/date: fix 'iso-8601 formatting
Closes PR 13372
2012-12-18 06:39:59 -07:00
Jay McCarthy
1b41456c7f Adding a test case for post bindings and improving error message 2012-12-17 16:28:46 -07:00
Vincent St-Amour
8c66be33e7 Fix contract generation for functions with optionals and keyword arguments.
Closes PR13354.
2012-12-17 13:57:32 -05:00
Vincent St-Amour
ec673fd58d Allow #:unless' in for:'.
Also allow `#:break' and `#:final' in all the `for:' macros.

Unfortunately, the expansion of `#:break' and `#:final' cannot be
typechecked at the moment.
2012-12-17 13:57:31 -05:00
Matthew Flatt
b8b8260379 net/url: add `current-url-encode-mode'
Changing `current-url-encode-mode' from 'recommended to 'unreserved
causes `url->string' to encode !, *, ', (, and ) using %, which
can avoid confusing some parsers.

See also https://github.com/plt/racket/pull/198
2012-12-17 06:56:38 -07:00
Matthew Flatt
3d1f1289ef net/uri-codec: added `uri-path-segment-unreserved-encode' 2012-12-17 06:32:59 -07:00
Ryan Culpepper
a2ae813739 replace db's sql-bits with data/bit-vector 2012-12-16 22:39:02 -05:00
Ryan Culpepper
810d07d8d5 added bit-vector <-> {string,list} operations 2012-12-16 22:29:43 -05:00
Ryan Culpepper
e4da3edeec fix popcount bug in bit-vector 2012-12-16 22:29:43 -05:00
Ryan Culpepper
28f1d4ff5d make argument order of heap-sort consistent with sort
Old order is also accepted for backwards compatibility.
2012-12-16 22:29:43 -05:00
Matthew Flatt
22f9c8509f fix optimizer bug, again
Corrects ef824351a1.
2012-12-16 16:04:19 -07:00
Matthew Flatt
ef824351a1 fix optimizer bug
Moving an expression that is referenced through a level of copy
propagation did not fix up a nested static distance correctly.

Closes PR 13355
2012-12-16 13:11:57 -07:00
Asumu Takikawa
2676beaa7c Make integer-sets implement generic interfaces
Supports gen:stream, gen:equal+hash, gen:custom-write
2012-12-14 16:21:07 -05:00
Asumu Takikawa
891ee1b19e Fix missing set-integer-set-contents!
Closes PR 13368

This was a MzScheme -> Racket transition issue. Also
added tests and fixed some docs as well.
2012-12-14 10:56:29 -05:00
Matthew Flatt
5baf63f821 syntax-local-get-shadower: fix interaction with marked bindings
Getting a shadower should not drop module context if the context
determines a binding that has marks.
2012-12-13 19:34:32 -07:00
Asumu Takikawa
ece218fc85 Rackety 2012-12-13 17:54:58 -05:00
Asumu Takikawa
13b831f0ec Fix unsound type variable scoping
Closes PR 13123
2012-12-13 17:54:58 -05:00
Asumu Takikawa
28108884ab Fix tests where type variable scoping is wrong 2012-12-13 17:54:58 -05:00
Matthew Flatt
e0de33a005 net/ftp: make progress proc keyword, change progress protocol
The revised protocol for a progress procedure doesn't create
the thread automatically, and it provides an event to indicate
when the progress count changes.
2012-12-13 07:45:26 -07:00
Chenxiao
4cc287f7e5 Improve ftp client. Add upload, progress monitor and something else. 2012-12-13 07:09:04 -07:00
Greg Hendershott
00a5bf63b1 Render italic and bold in Markdown.
Scribble => Markdown
  @bold{text}    **text**
@italic{text}     _text_
2012-12-12 20:58:44 -07:00
Matthew Flatt
dd5b999c64 fix `quasisyntax' to better preserve syntax properties
Closes PR 13357
2012-12-12 08:34:19 -07:00
Greg Hendershott
dbffc840a9 Render @hyperlink in Markdown.
Render Scribble like

    @hyperlink["url" "content"]

as Markdown like

    [content](url)

Note that this only works for `@hyperlink`. The motivation is to
preserve content the author has explicitly written. (Previously,
`markdown-render.rkt` was discarding this; `text-render.rkt` still
does so.)

This does _not_ attempt to handle everything that `html-render.rkt`
would automatically generate and render as `<a>`. It simply can't --
things like hotlinked Racket keywords in code blocks simply won't work
in Markdown.
2012-12-11 12:40:54 -07:00
Jay McCarthy
9a0e948a58 Fixing regression re path restriction patch 2012-12-11 10:47:54 -07:00
Jay McCarthy
b843a45cd8 Fixing in an error in how paths that went outside the filesystem to
URL map were handled.

Previously, only ".." at the beginning of the URL were checked; now it
looks at the entire URL for a path that ultimately leaves the base.
2012-12-10 11:54:31 -07:00
Greg Hendershott
6aa6dc0400 Add a Markdown rendering mode to Scribble.
Uses "Github flavored markdown". Specifically, code blocks are opened
using ```scheme so that Github will lex and format them as Scheme code
rather than generic monospace.

Note: I would have used ```racket, but we are still waiting for the
pygments.rb project to pull again from pygments-main -- to which I
contributed a Racket lexer back in August. After pygments.rb pulls,
can update this to use ```racket instead.
2012-12-09 15:17:36 -07:00
Matthew Flatt
5b016b4c32 win32: support MinGW build
A MinGW build is the same shape as a MSVC build (but without
MzCOM), unlike a Cygwin build.
2012-12-09 11:26:02 -07:00
Robby Findler
8907daf65f make the queue-callback/res function queue low-priority callbacks
This should have been like this all along; I think it can lead to
race-conditions with high-priority events. In particular, something
might be pending in the event queue and then the test suite might
queue a high-priority event to check for it, which could happen before
the event that actually does the work that's being checked for!
2012-12-09 08:55:09 -06:00
Jay McCarthy
9b9a2f4280 Make simplified P2 index to remove dep on meta 2012-12-08 09:09:40 -07:00
Jay McCarthy
1b6c4f0e72 Disabling the other screen->client call on X, re: DrDr 2012-12-08 09:09:40 -07:00
Jay McCarthy
1d36492f51 Remove build location from the test zo to satisfy zo-path 2012-12-08 09:09:40 -07:00
Jon Zeppieri
8489448e42 ffi: fix prop:cpointer so that it works with a procedure value 2012-12-07 06:43:30 -06:00
J. Ian Johnson
a193cd9efb Peephole optimization for iterating over an empty set (no allocation). 2012-12-07 06:39:27 -06:00
Matthew Flatt
4721a79c8f define-logger: make (define-logger X)' define X-logger' 2012-12-07 06:36:31 -06:00
Matthew Flatt
ea79cc4417 benchmark noise
Remove an unnecessary manual unrolling
2012-12-07 06:36:31 -06:00
Matthew Flatt
a6eb219305 avoid spurious arity mismatch in {s,n}boyer benchmarks 2012-12-07 06:36:31 -06:00
Neil Toronto
f607a3b061 Added stress test: libmpfr C struct accessor vs. Racket struct accessor 2012-12-06 22:52:22 -07:00
Vincent St-Amour
cc8bd4f294 Make srclocs serializable. 2012-12-06 17:53:04 -05:00
Asumu Takikawa
c7162ec533 Fix TR error for missing mandatory keywords 2012-12-06 12:20:54 -05:00
Matthew Flatt
fc7fa68039 remove test for removed library
And remove the `props' entry again.
2012-12-05 11:18:02 -06:00
Matthew Flatt
64f0273829 fix printing problem with flvectors 2012-12-05 05:56:59 -06:00
Nadeem Abdul Hamid
c0a412ed0e fix close parens behavior in interactions and comments 2012-12-04 20:39:10 -06:00
Vincent St-Amour
9a5db10124 Fix tests. 2012-12-04 19:29:16 -05:00
Vincent St-Amour
fb73bc8b0e Fix partial bounds checking elimination.
Closes PR13341.
2012-12-04 19:29:16 -05:00
Asumu Takikawa
5802b42f66 Support path/object reasoning for promises 2012-12-04 18:03:11 -05:00
Asumu Takikawa
3f2d4663a8 Fix call/comp's type 2012-12-04 16:10:39 -05:00
Matthew Flatt
bd1a63a43a racket/pretty: fix `print' mode for fxvectors and flvectors
Closes PR 13340
2012-12-03 22:44:21 -07:00
Vincent St-Amour
ee0a1d4b89 Randomly test the TR optimizer.
Compares results of a Racket and a TR sandbox.
2012-12-03 21:54:01 -05:00
Matthew Flatt
adee7494b4 fix printing test
I missed some test updates with the fxvector/flvector change to
printing.
2012-12-03 18:57:53 -07:00
Vincent St-Amour
9f9092b762 Fix optimization of unary float subtraction.
Closes PR13339.
2012-12-03 19:46:29 -05:00
Asumu Takikawa
0252207e38 Support Any wrapping for promises
Closes PR 13326
2012-12-03 17:59:55 -05:00
Matthew Flatt
9e8477dd45 racket/serialize: serialize fxvectors and flvectors 2012-12-03 10:42:35 -07:00
Matthew Flatt
9cf821b301 disallow #fx()' and #fl()' notation in `read-syntax' mode
Allowing them would require support for immutable fxvectors and
flvectors, interning, and more. Since the motivation for reader
support is to make marshaling and unmarshaling easier, allow
them only in `read' mode. Change printing to make then unquotable.
2012-12-03 10:42:35 -07:00
Kevin Tew
492167c23f read and write support for fxvectors and flvectors 2012-12-03 10:42:35 -07:00
Ryan Culpepper
5470899d6e fix shadowing (caused unwanted state threading)
closes PR 13327
2012-12-01 11:17:13 -05:00
Robby Findler
17c3203ae4 the test case should have been checking for 6 builds all along.
Not sure why it only saw 4 in the past but now it properly sees all 6
so we just change the expected result.
2012-12-01 10:11:44 -06:00
Matthew Flatt
7b3bb4a3ba make splicing-syntax-parameterize' work with begin-for-syntax'
More generally, a `splicing-syntax-parameterize' wrapping immediate
compile-time code effectively parameterizes the compile-time code as
well as any macro-triggered compile-time code. This is implemented by
using a compile-time parameter that complements each syntax binding.
2012-12-01 08:12:33 -07:00
Ryan Culpepper
05e7e61d85 added #:option to start-transaction, call-with-transaction 2012-12-01 01:33:56 -05:00
Matthew Flatt
b83804c153 raco pkg: normalize error reporting
Use `raise-user-error' for `raco pkg ...' errors, so that stack
traces don't print out for external errors. Reformat error messages
generally to match current conventions. Use logging for debugging
output.
2012-11-30 19:09:19 -07:00
Matthew Flatt
59f289249f raco pkg: user-specific and version-specific by default
The default `raco pkg' mode should work right for a
multiple-version installation (because everything in
Racket should work in a multiple-version installation).
Along the same lines, `raco pkg' should work if the
installation directory is unwriteable. So, the default
mode is user-specific and version-specific.

Use `--shared' or `-s' for user-specific, all-version
installs.

By default, `raco pkg show' now shows packages installed
in all three modes (installation-wide, user- and version-
specific, and user-specific all-version). Use `-i', `-u',
or `-s' to show just one of them.
2012-11-30 19:09:19 -07:00
Matthew Flatt
381d9d84d6 raco pkg: switch from "METADATA.rktd" to "info.rkt"
For now, "METADATA.rktd" is still recognized as a fallback.

Also, rewrite package source type and name inference,
make ".zip" the default format for `raco pkg create',
and many doc edits.
2012-11-30 19:09:19 -07:00
Asumu Takikawa
a42cc9a001 Add more tests for continuation marks & Any wrapping 2012-11-30 17:37:33 -05:00
Asumu Takikawa
904db66f65 Rename control types to be consistent with other types 2012-11-30 17:37:33 -05:00
Asumu Takikawa
4e0b38ea79 Improve type of call-with-continuation-prompt
Now works with the handler argument omitted, in which case
the default handler is used. Note that the default handler
cannot be used in conjunction with the default prompt tag
because it is unsound to do so.
2012-11-30 17:37:33 -05:00
Asumu Takikawa
42b07475e9 Apply Any wrappers for default-continuation-prompt-tag in TR 2012-11-30 17:37:33 -05:00
Asumu Takikawa
d6b0c71a91 Fix up old TR tests that should fail now 2012-11-30 17:37:33 -05:00
Asumu Takikawa
3ed1d56b05 Add new tests for typed control 2012-11-30 17:37:33 -05:00
Matthew Flatt
cbe0831956 fix problem with re-expansion and renamed imports 2012-11-30 07:26:52 -07:00
Asumu Takikawa
d7163142be Forgot to add the test for commit b4dd3b5e1d
Relevant to PR 13209
2012-11-30 00:12:35 -05:00
Matthew Flatt
6bfc03d625 add tests for in-list', in-mlist', and `in-set' shortcut 2012-11-29 06:57:34 -07:00
Matthew Flatt
15cbfa1947 `raco pkg': fixes for package source inference and handling
Also, test additions and documentation adjustments.
2012-11-29 06:43:51 -07:00
Jens Axel Søgaard
07b8507ce9 Rename to bit-vector-popcount 2012-11-28 22:04:25 +01:00
Robby Findler
a5961dcf36 make the drr log follower show its results in a separate window 2012-11-27 22:56:44 -06:00
Jens Axel Søgaard
64f64a3607 Added bit-vector-count 2012-11-27 21:53:30 +01: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
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
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
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
Eli Barzilay
dd9d85feec Cleanup junk files in a bunch of racket tests. 2012-11-24 16:37:36 -05: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
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
9f5324b754 fix quoted submodule path in `all-from-out' 2012-11-23 08:30:01 -07:00
Matthew Flatt
4e0fac0477 JIT: fix allocation of came-lambda closures over flonums
Also, clean up code and assumptions related to fixnum-producing
functions and unboxing (not related to the bug).
2012-11-23 08:20:05 -07:00
Matthew Flatt
961f5e40bf fix untagged cpointer as place-channel message
(repair by Kevin)

Closes PR 13282
2012-11-23 08:20:05 -07:00
Robby Findler
475822b44a fix a bug in a syntax-case keywords spec
closes PR 13237 (turns out not to be planet-specific)
2012-11-22 13:54:32 -06:00
Robby Findler
98633665b3 extend data/queue library
- add enqueue-front!

- add queue-filter!

- use the predicates instead of the /c contracts

- make queue-length take constant time

- add some random tests

- note the running times of all of the operations in the docs

- make queues be sequences directly (and use make-do-sequence
  to implement in-queue instead of building a list)

- added non-empty-queue? (note extra hypen as compared
  to the past; this seems better since the function
  wasn't exported before and we already have other
  functions named "non-empty-<something>" but not
  others namedn "nonempty-<something>")
2012-11-21 11:10:02 -06:00
Robby Findler
ac7c37812b fix dequeue! to actually not hold onto queue elements
(the comments on line 11-13 said that it did this already,
but it didn't)

also add a test case to be sure that it stays this way
2012-11-21 11:10:02 -06:00
Vincent St-Amour
95d51fc892 Add new versions of for/hash: and co that the typechecker can handle.
Based on Eric Dobson's implementation.

Closes PR13248. Closes PR13249.
2012-11-20 17:45:15 -05:00
Vincent St-Amour
e2007abd7a Heterogenous -> heterogenEous.
Found by Ray Racine.
2012-11-20 17:06:51 -05:00