Commit Graph

621 Commits

Author SHA1 Message Date
Matthew Flatt
0f80c71fab setup/doc-db: propagate read-only flag for database connection
Fixes a problem installation Planet packages under Windows,
for example, where attempting to open a read-only file in
write mode triggers an extremely slow result.

Merge bug fix to v6.0 (pending review)
2013-12-16 14:38:26 -07:00
Matthew Flatt
ec5157d78f setup/setup: fix #:make-doc-index? default
Making the default match the docs fixes Planet package installation,
which otherwise tries to rebuild the index too frequently.

Merge bug fix to v6.0 (pending review)
2013-12-16 14:38:26 -07:00
Matthew Flatt
1ceca069c8 more repairs to function-name inference
The main change is to add an option to `syntax-local-infer-name` to
select whether `syntax-local-name` is used, and to use the new option
to disable `syntax-local-name` for the function expression in a
keyword `#%app`.

Improvements in the expander/compiler generalize a previous repair.

Merge to v6.0
2013-12-16 09:07:36 -07:00
Matthew Flatt
4abe7d2657 fix incorrect propagation of name via syntax-local-name
Merge to v6.0
2013-12-14 21:11:08 -07:00
Matthew Flatt
80d0b2fcc3 fix for-label import of a submodule
Closes PR 14155

Merge to v6.0
2013-12-14 20:27:55 -07:00
Robby Findler
2199d96100 implement a little bit of the random generation for the new ->
(just enough to pass the test suite)
2013-12-14 15:47:31 -06:00
Jay McCarthy
87135b110b Fix PR14247
Add "Connection: close" to requests that we know will end after one
request.

Read upto 1K bytes at a time on requests rather than just 1 at a time.

Change closing semantics to be "close" and not "abandon"
2013-12-14 08:00:41 -07:00
Robby Findler
074f21203a another fix to the first-order check I added earlier today
(discovered by the test suites run by drdr)
2013-12-13 19:19:25 -06:00
Robby Findler
14645b8cc5 fix class/c first-order check for interface contracts 2013-12-13 16:20:59 -06:00
Robby Findler
52c74701ec improve the first-order checking for the current class/c implementation
(not strictly necessary, but the new, still pending class/c first-order
checking checks the arities of the methods and those additional
tests got put into the test suite, so the easiest thing for now
is just to make the current class/c implementation do that check too)
2013-12-13 12:02:53 -06:00
Robby Findler
ecc1facdaa improve source locations for uses of contracted variables 2013-12-12 22:48:57 -06:00
Matthew Flatt
0b48e883da fix reducing arity or chaperoning keyword-valued prop:procedure
Fix various problems, including a bad result from `procedure-arity`
and problems with chaperones and arity error messages when a
structure's `prop:procedure` value is a keyword-accepting procedure.

Merge to v6.0
2013-12-12 12:15:10 -07:00
Matthew Flatt
861384d36d Mac OS X: fix executable creation for LC_DYLIB_CODE_SIGN_DRS
The LC_DYLIB_CODE_SIGN_DRS load command is relatively new, and
it needs to be updated when we shift __LINKEDIT to add
__PLTSCHEME.

Merge to v6.0
2013-12-11 19:54:58 -07:00
Robby Findler
c321f6dd0c Change contract system so that projections are more first-order friendly
The main changes are the addition of a new way to specify projections,
using the #:val-first-projection keyword argument; the main goal of the
new API is that more information can be supplied to the projection on
the server side of the contract boundary. In addition, the arrow contracts
will now, internally and in some cases (see define-module-boundary-contract)
return functions that accept one additional argument than the original
function did and then insert the name of the negative party into call sites.

The rough idea is that if you have a program like this one:

  #lang racket/base
  (define (f x) (+ x 1))
  (provide (contract-out [f (-> integer? integer?)]))

then the contract system produces something much closer to this:

  #lang racket/base
  (define (f x) (+ x 1))

  (provide (rename-out [external-f f]))
  (define (external-f neg-party x)
    (check-integer neg-party x)
    (define ans (f x))
    (check-integer neg-party ans)
    ans)

  (define local-blame-information ...)
  (define (check-integer neg-party v)
    (unless (integer? v)
      (raise-blame-error local-blame-information
                         #:missing-party neg-party
                         ...)))

where 'raise-blame-error' can now cope with blame objects that don't
have negative part information in them (when the #:missing-party
argument is supplied, essentially just reassembling the original blame
record at that point)

Then, on the client side, if we had

   (f x)

it gets transformed into

   (f '<<my-modules-name>> x)

and if we had

   (let ([g f])
     ...)

you get a slow path:

    (let ([g (lambda (x) (f '<<my-modules-name>> x))])
      ...)

(where we don't create a wrapper lambda, of course, we actually create
a procedure chaperone)

The performance improvements seem pretty good (see below for the
precise programs that I ran and the numbers I got):

  first order contract microbenchmark: 6x speedup
  higher-order contract microbenchmark: 1.5x speedup
  first-order TR contract interop micro benchmark: 6x speedup

This also improves the memory use for DrRacket by about 3% (from about
236.8 mb to 231.3 mb), presumably because more of the data structures
created by the contract system can be created only once, on the server
side.

Be aware, however, that not all combinators are using the new
projections and the code that translates between the two APIs
is slow.

Also there are a bunch of other changes that got made while I was
doing this. Most notably, the change above were not designed for the
performance improvements to arrow contracts, but to make it possible
to implement class/c contracts with a (hopefully) negligible space
overhead. That work is not yet finished, but this commit includes some
changes to the class system to prepare the way for those changes.

Unfortuantely, these changes slow down 'send' on microbenchmarks by
about 24%. The change comes from the addition of an extra 'if' (and
predicate test and possibly the extra let expresison) that's inserted
into the expansion. I'm not happy about that (I was shooting for 10%)
but I'm not sure that we can do much about it (except perhaps double
check my measurements, see below).

Other misc changes:

- improve arity mismatch error messages by including the arity of the
  given procedure (closes PR 14220)

- Adjust case-> so it generates less code. This seems to reduce the
  size of the math library .zo files by about 3% (from 10440k to
  10156k for me)

- speeds up the contract tests a bit

- move recontract out into racket/contract (also, document it)

- added define-module-boundary-contract

- streamline TR's any-wrap/c and adjust it to use
  #:val-first-projection instead of #:projection

- adjust a bunch of contracts to print more nicely

- and, of course, Rackety

--------------------------------

The precise programs that I tried and their timings (the raw data
for the performance claims above):

 #lang racket/base
(module m racket/base
  (require racket/contract/base)
  (define (f x) x)
  (provide (contract-out [f (-> any/c any/c)])))

(require 'm)
(time
 (for ([x (in-range 100000)])
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)))

pre-push timings:

cpu time: 3553 real time: 3552 gc time: 52
cpu time: 3548 real time: 3552 gc time: 52
cpu time: 3525 real time: 3525 gc time: 54
cpu time: 3547 real time: 3547 gc time: 47

post-push timings:

cpu time: 515 real time: 515 gc time: 15
cpu time: 522 real time: 522 gc time: 17
cpu time: 560 real time: 560 gc time: 19
cpu time: 514 real time: 515 gc time: 19
cpu time: 507 real time: 507 gc time: 17

A second order example using vectors (note that vector/c isn't yet
updated to the #:val-first-projection, so it will be way slower)

 #lang racket/base
(module m racket/base
  (require racket/contract/base)
  (define (f x) (vector-ref x 0))
  (provide (contract-out [f (-> (vectorof any/c) any/c)])))

(require 'm)
(define v (vector void))
(time
 (for ([x (in-range 10000)])
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)
   (f v) (f v) (f v) (f v) (f v) (f v) (f v) (f v)))

pre-push timings:

cpu time: 744 real time: 745 gc time: 20
cpu time: 679 real time: 679 gc time: 18
cpu time: 695 real time: 695 gc time: 23
cpu time: 743 real time: 742 gc time: 21
cpu time: 780 real time: 786 gc time: 21
cpu time: 723 real time: 726 gc time: 25

post-push timings:

cpu time: 448 real time: 448 gc time: 18
cpu time: 470 real time: 469 gc time: 19
cpu time: 466 real time: 465 gc time: 16
cpu time: 457 real time: 456 gc time: 15
cpu time: 465 real time: 466 gc time: 24

Using contracts in TR

 #lang racket/base
(module m typed/racket/base
  (: f (Any -> Any))
  (define (f x) x)
  (provide f))

(require 'm)
(time
 (for ([x (in-range 10000)])
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)
   (f 1) (f 2) (f 3) (f 4) (f 5) (f 6) (f 7) (f 8)))

pre-push timings:

cpu time: 357 real time: 357 gc time: 6
cpu time: 446 real time: 447 gc time: 4
cpu time: 361 real time: 359 gc time: 4
cpu time: 366 real time: 366 gc time: 5
cpu time: 368 real time: 367 gc time: 6

post-push timings

cpu time: 63 real time: 63 gc time: 7
cpu time: 64 real time: 63 gc time: 8
cpu time: 63 real time: 64 gc time: 8
cpu time: 58 real time: 58 gc time: 8
cpu time: 59 real time: 59 gc time: 7

Slowdown for 'send':

 #lang racket/base
(require racket/class)
(define c% (class object% (define/public (m x) x) (super-new)))
(define o (new c%))
(time
 (for ([x (in-range 100000)])
   (send o m 1) (send o m 2) (send o m 3) (send o m 4)
   (send o m 5) (send o m 6) (send o m 7) (send o m 8)
   (send o m 1) (send o m 2) (send o m 3) (send o m 4)
   (send o m 5) (send o m 6) (send o m 7) (send o m 8)
   (send o m 1) (send o m 2) (send o m 3) (send o m 4)
   (send o m 5) (send o m 6) (send o m 7) (send o m 8)
   (send o m 1) (send o m 2) (send o m 3) (send o m 4)
   (send o m 5) (send o m 6) (send o m 7) (send o m 8)
   (send o m 1) (send o m 2) (send o m 3) (send o m 4)
   (send o m 5) (send o m 6) (send o m 7) (send o m 8)))

timings pre-push:

cpu time: 251 real time: 251 gc time: 0
cpu time: 275 real time: 275 gc time: 0
cpu time: 250 real time: 250 gc time: 0
cpu time: 246 real time: 246 gc time: 0
cpu time: 247 real time: 246 gc time: 0

timings post-push:

cpu time: 303 real time: 302 gc time: 0
cpu time: 333 real time: 333 gc time: 0
cpu time: 315 real time: 315 gc time: 0
cpu time: 317 real time: 317 gc time: 0
cpu time: 311 real time: 310 gc time: 0
2013-12-11 12:05:30 -06:00
Eric Dobson
83ce25294c Remove extraneous compile of non existent file.
Merge to v6.0
2013-12-08 07:28:32 -07:00
Matthew Flatt
280bb31d70 fix a synchronization problem in the GC for places
When a GC is needed for the shared space, a GC is triggered
in all places, and the places wait until each other place
has completed. However, the places also need to wait until
all other places are ready to *start* a GC; otherwise, a
place may be modifying a shared record while some other place
traverses it for a GC.

Closes PR 14229

Merge to v6.0
2013-12-07 09:32:51 -07:00
Matthew Flatt
1f6453de89 net/http-client: fix http-conn-live? result
Merge to v6.0
2013-12-06 21:19:38 -07:00
James McCoy
bdec6c33ff Fix typoed character ranges (A-z => A-Z)
Signed-off-by: James McCoy <vega.james@gmail.com>

Merge to v6.0
2013-12-06 12:09:11 -07:00
Ryan Culpepper
5593febba5 fix nested ?? in template form
closes PR 14170

Instead of checking free pvars of first template and using that to choose
which template to use, just try first and on failure try second.

Note: ?? still only covers absent pvars; non-#f non-stx value still
causes error; ellipsis rep mismatch still causes error; etc.
2013-12-05 14:01:26 -05:00
Matthew Flatt
b625e62ca8 raco: skip problem "info.rkt" files
Allows some `raco` tools to work (such as `raco pkg`) when loading
information about other installed tools fails, so that problems can
be more easily corrected using working tools (other than `raco setup`,
which is a special case, anyway, for bootstrapping).

Closes PR 14221

Merge to v6.0
2013-12-04 10:23:41 -07:00
Robby Findler
85bd081907 fix cons/c use in contract
related to PR 14222

This doesn't completely fix that PR because the
implementation says that bytes are allowed and
the docs don't allow that. My guess is that the
implementation is wrong, not the docs, btu I'm not
sure and this may be a backwards compatibility
kind of thing, too. Also, path->collects-relative
should probably be considered (it doesn't allow
bytes? as an argument).
2013-12-04 09:51:24 -06:00
Jay McCarthy
01b197d3eb Fix PR14207, thanks ryanc 2013-12-02 13:16:18 -07:00
Robby Findler
15e6f4d38d fix a #f/no-contract conflation in the init arg processing for class/c
related to PR 14215
2013-12-01 18:40:03 -06:00
Matthew Flatt
d37e910169 move setup/xref from "scribble-lib" to "racket-index"
The `setup/xref` library conceptually belongs in "racket-index",
and moving the library avoids a cross-package use of a private
module.

Merge to v6.0
2013-12-01 08:38:31 -07:00
Matthew Flatt
d48a75eddf make pkg-links: fix to allo "racket" as a dependency
Probably only the "base" package should rely on a "racket" version,
while other packages should rely on a "base" version.
2013-11-30 21:01:21 -07:00
Matthew Flatt
33b7d49b2e raco exe: add --config-path option, default to "etc"
Make executables created by `raco exe` not refer to the original
configuration directory by default, but add an option for setting
the directory.

For Unix ELF executables, fix `raco exe` to set/preserve the
configuration directory.

Merge to v6.0
2013-11-29 13:13:25 -07:00
Matthew Flatt
790ae0705c raco dist: fix for Unix GUI executables
Merge to v6.0
2013-11-28 18:12:59 -07:00
Matthew Flatt
7bba67d107 doc search & redirect: user as an extension of main
When rendering the user documentation-search page or
local-redirect page, only user-specific documentation is
included, which makes rendering faster and automatically
picks up any installation-scope additions.

The documentation start page is still static, so the
user version doesn't pick up installation-scope
additions in the same way.

Related to PR 14180
2013-11-28 16:53:12 -07:00
Matthew Flatt
20af636cfb fix "racket-index" package installed in user scope
When the "racket-index" package is in user scope, then the
the documentation-build process should not try to write to
"doc" in the installation.

Merge to v6.0
2013-11-28 08:47:55 -07:00
Jay McCarthy
680b6f4928 Revert "Remove arbitrary code execution exploit from Racket and DrRacket"
This reverts commit cf1755fc17.
2013-11-27 19:23:04 -07:00
Jay McCarthy
cf1755fc17 Remove arbitrary code execution exploit from Racket and DrRacket
This is particularly bad with DrRacket's online syntax checking, which
causes opening a file to download and executed aribtrary code.
2013-11-27 15:39:57 -07:00
Matthew Flatt
d007ec3e56 fix an error message
Merge to v6.0
2013-11-26 18:19:54 -07:00
Jay McCarthy
8ca8764bb3 Adding user-agent as some services require 2013-11-26 08:57:56 -07:00
Matthew Flatt
335177f1bc fix problems with text-mode ports on Windows
Closes PR 14198

Merge to v6.0
2013-11-25 10:00:23 -07:00
Asumu Takikawa
289a19e237 Fix format string for GC debug log message
Closes PR 13998

Please merge to v6.0
2013-11-25 11:55:00 -05:00
Matthew Flatt
90388d1549 fix handling of choice evt returned by a guard evt
Closes PR 14195

Merge to v6.0
2013-11-24 08:20:44 -07:00
Matthew Flatt
f4ed053620 fix #:make-docs? argument of setup
Closes PR 14193

Merge to v6.0
2013-11-23 20:10:26 -07:00
Matthew Flatt
f1d561ac46 reflow release notes for v6.0
Merge to v6.0
2013-11-22 14:59:35 -07:00
Matthew Flatt
75263e6664 fix raco config --set
Merge to v6.0
2013-11-22 14:59:35 -07:00
Matthew Flatt
c7d4b7d388 define-runtime-path: add support for version search to 'so form
Merge to v6.0
2013-11-22 07:26:43 -07:00
Matthew Flatt
9213d1aa79 configure: add fallback when checking for ar 2013-11-21 20:24:32 -07:00
Matthew Flatt
79f3fd5e64 raco setup: fix a read-only use on the docindex database
Merge to v6.0
2013-11-21 06:59:48 -07:00
Matthew Flatt
9bb5dda4f5 raco setup: fix exit code on doc error 2013-11-21 06:44:38 -07:00
Matthew Flatt
53ce3b7b96 raco pkg config: show all by default
Also, better help, checking, and error reporting on arguments.

Related to PR 14180

Merge to v6.0
2013-11-20 17:52:41 -07:00
Matthew Flatt
ecaa6576a3 raco pkg {install,update,...}: propagate setup exit code
Also, when `raco setup` reports an error, print a message to
say that the package install/update/... completed anyway.

Merge to v6.0
2013-11-20 17:52:40 -07:00
Ryan Culpepper
f12cfe185b Post-release version for the v6.0 release 2013-11-20 14:10:06 -05:00
Matthew Flatt
1d8a2516b2 fix problem resizing mutable hash tables
A hash-table size grew based on the number of key slots occupied,
instead of the number of value slots, where the two differ when
keys are added and removed in the table.

Thanks to Ryan for the example.
2013-11-20 07:28:34 -07:00
Ryan Culpepper
975762c25a work around lack of sqlite3_next_stmt on Mac OS X 10.5.* 2013-11-19 22:52:26 -05:00
Matthew Flatt
30af4dfb33 raco pkg remove: fix dependency check in --auto mode 2013-11-19 18:07:07 -07:00
Matthew Flatt
17275e3f37 unix installer: repair .desktop exec path conversion 2013-11-19 18:07:07 -07:00
Matthew Flatt
408031a01d launcher: fix "extreg.rktd" in user's space
Closes PR 14176
2013-11-19 18:07:07 -07:00
Asumu Takikawa
8323e679eb Add channel contracts 2013-11-19 01:41:05 -05:00
Robby Findler
d2fd37c251 attempt to add a little more information
to help diagnose this (and related) failures:

http://drdr.racket-lang.org/27793/pkgs/drracket-pkgs/drracket-test/tests/drracket/easter-egg.rkt
2013-11-18 21:49:30 -06:00
Robby Findler
62615f492d quote a name in an error message 2013-11-18 21:49:30 -06:00
Matthew Flatt
a88aa3c428 fix JIT slow path for bitwise-bit-set?
I'm having trouble producing a small test that triggers the bug, but
I'll keep trying.
2013-11-18 17:41:04 -07:00
Ryan Culpepper
ff19b9a74d fix custom deserialize-info
The deserialize fallback fails on modules that contain both custom
deserialize-info definitions and uses of serializable-struct.
2013-11-17 17:58:03 -05:00
Matthew Flatt
b520b66c4e restore old Scribble default style, but make new style default for manuals
Using
 #lang scribble/base
produces HTML output in the old style, while
 #lang scribble/manual
uses the new style.

To get the new style without switching to `#lang scribble/manual`,
use `manual-doc-style`.

Related changes include the addition of `css-style-addition` and
`js-style-addition`.
2013-11-16 14:38:59 -07:00
Matthew Flatt
38752b2aa2 fix build for platforms with disabled threads + inline allocation 2013-11-14 07:43:21 -07:00
Matthew Flatt
6e983482bb add flrandom and unsafe-flrandom 2013-11-13 13:40:15 -07:00
Matthew Flatt
8039f8177d make random slightly faster on 64-bit machines in integer mode
Exploit the fact that a 32-bit range fits in a fixnum.
2013-11-12 20:17:03 -07:00
Matthew Flatt
c81a468bc4 annotate some primitives as "immediate"
This annotation is useful mainly for functions that might be called
frequently from JIT-generated code.
2013-11-12 20:17:03 -07:00
Matthew Flatt
13a3c6c5c8 raco pkg: adjust error messages that include command-line flags
A new `#:from-command-line?` argument to various functions indicates
whether error messages should try to suggest command line flags (since
the suggested flags do not make sense for other contexts, such as the
GUI package manager).
2013-11-12 09:12:56 -07:00
Matthew Flatt
cb943909e4 raco pkg update: implies package dependencies are always updated
.. where "always" means "unless `--ignore-implies` is specified".
2013-11-12 09:12:56 -07:00
Matthew Flatt
9afa50b459 fix runtime-require duplicate path registration 2013-11-11 05:27:08 -07:00
Matthew Flatt
abe3647b67 fix deserialize submodule fallback
Fallback checked original module only if `deserialize-info` was
missing, but it's possible to have a mixture of `deserialize-info`
and original-module exports.
2013-11-08 20:15:26 -07:00
Matthew Flatt
90142edc5b serializable-struct, etc.: export deserialization info in submodule
This change is slightly incompatible, because `serializable-struct`,
`define-serializable-struct`, and `define-serializable-class` no
longer `provide` and identifier that they used to. Instead, the identifier
is provided by a `deserialize-info` submodule.

The deserializer looks for a `deserialize-info` submodule, and then
falls back to using a module if the submodule is not available.
2013-11-08 18:13:43 -07:00
Matthew Flatt
846c247aa3 raco exe: fix problem with dynamically resolved relative submodules 2013-11-08 18:13:43 -07:00
Matthew Flatt
ae941ac9d8 racket/runtime-path: add runtime-require
The `runtime-require` form is especially useful for ensuring
that a submodule will be pulled along with its enclosing module.
2013-11-08 18:13:42 -07:00
Matthew Flatt
8722653664 fix some misleading error messages
The misleading message that dropped submodule paths.
2013-11-08 18:13:42 -07:00
Vincent St-Amour
1bf4429e49 Add `module*' to syntax/parse's kernel-literals. 2013-11-08 16:43:08 -05:00
John Clements
63194b4229 adjusted arg to raise-argument-error to produce sensible error msg 2013-11-07 20:05:51 -08:00
Matthew Flatt
ab1e54ff4a raco pkg: repairs for SQLite-based catalogs 2013-11-06 15:55:50 -07:00
Matthew Flatt
2872f83a17 raco pkg: use a download cache
Downloaded files are keyed on the source URL and checksum, and the
cache is used only when a checksum is known.

The cache addresses two situations:

 * when installing many packages over an unreliable connection,
   the cache effectively lets a retry pick up where a previous
   attempt failed

 * when creating clean builds frequently, the downloads from a
   previous build can be reused (as long as the package's checksum
   does not change)

The cache location and limits are configurable, and they default to
a subdirectory in the user's add-ons directory (not version-specific),
1024 files, and 64 MB.

If a failure happens during staging (checksum and unpackaging) of a
package that has an entry in the cache, the entry is removed. The
file-cache library, meanwhile, implements a limit on the cache size
and defends against uncooperative filesystems.
2013-11-06 15:15:56 -07:00
Matthew Flatt
0ac601db66 add file/cache
In base, so it can be used by the package manager.
2013-11-06 14:36:43 -07:00
Matthew Flatt
02bbccc200 call-with-file-lock: fix port leak on error escape 2013-11-06 14:36:43 -07:00
Jay McCarthy
3d15fb3c1d Fix PR14142 by allowing 'tolerant' line endings acording to Appendix B of the HTTP spec 2013-11-05 11:03:06 -07:00
Jay McCarthy
b61198ec3f Fix PR 14140 2013-11-04 15:50:03 -07:00
Matthew Flatt
d23d2f8c5b path-replace-suffix: raise exception when result should be an empty path 2013-11-03 10:04:00 -07:00
Matthew Flatt
afcecc73f1 {string,bytes}->path-element: error on empty [byte] string 2013-11-03 09:57:26 -07:00
Matthew Flatt
f6cfd14c5e shutdown custodian-managed subprocesses on exit 2013-11-03 09:25:15 -07:00
Matthew Flatt
b431d8fea1 launcher ".desktop" handling: preserve existing Exec= content 2013-11-02 20:37:36 -06:00
Matthew Flatt
31d6b02d92 configure: DragonFly is like OpenBSD 2013-11-02 20:37:36 -06:00
Matthew Flatt
97d92ddb97 xform: more intrinsics to ignore 2013-11-02 20:37:35 -06:00
Matthew Flatt
fec1c8c115 avoid some compiler warnings 2013-11-02 20:37:35 -06:00
Juan Francisco Cantero Hurtado
39bcfb5871 drop unneeded #include
The "sys/param.h" header was used to check the OpenBSD version.
It's not needed, anymore.
2013-11-02 12:33:12 -06:00
Matthew Flatt
a5c655c716 guide: small edits to concurrency chapter
Also, split sections on futures and places into a "parallelism" chapter.
2013-11-02 12:32:46 -06:00
Robby Findler
40f7ab2ba4 Sorry all; stupid mistake
This reverts commit 90fc899b36.
This reverts commit 780fb37c0d.
This reverts commit 9e54b2bc1b.
This reverts commit 43a584f710.
2013-11-02 09:51:10 -05:00
Robby Findler
9e54b2bc1b IN PROGRESS: working on rect support for error messages for 2d cond 2013-11-02 09:04:14 -05:00
Robby Findler
43a584f710 IN PROGRESS: enable opt/c on provide/contract and define/contract (via with-contract) 2013-11-02 09:04:14 -05:00
Matthew Flatt
7f947d7b14 db/sqlite3: fix memory-management problem
The sqlite3_prepare[_v2]() function takes a byte-string pointer
for a query and returns a pointer into the byte string. That
pointer can be odd-valued, in which case the GC doesn't treat
the pointer as a reference to the byte string (even when the
string is allocated with 'atomic-interior), so arrange for the
original pointer to be retained.
2013-11-01 22:27:42 -06:00
Asumu Takikawa
90bfbcbec8 Update HISTORY 2013-11-01 13:50:27 -04:00
Asumu Takikawa
1f700947d4 Add channel chaperones
These chaperones only protect the "put" end of the
channel and use evt chaperones to protect the "get"
end.
2013-11-01 13:31:17 -04:00
Matthew Flatt
fac247d340 Mac OS X: support Retina mode
Seems to work for Mac OS X 10.9 (Mavericks), at least.

In Retina mode, a drawing unit corresponds to two pixels on
the screen or in a bitmap created by `make-screen-bitmap'.
In particular, a bitmap created by `make-screen-bitmap' is
actually twice as big in each dimension as requested, and the
bitmap is scaled when transferring to other drawing contexts.
When transferring onto the screen, scalings cancel so that the
result looks right.

Adds `get-display-backing-scale` to `racket/gui/base`, and
also `get-backing-scale` to `bitmap%`.

To do: add a way to set the backing scale of a bitmap. That
option will provide a way to give controls higher-resolution
bitmaps as labels.
2013-10-31 08:50:22 -06:00
Matthew Flatt
d80e6fac7f update GMP for x86 and clang 2013-10-31 08:43:00 -06:00
Matthew Flatt
d07bd11495 Makefile: make PLT_SETUP_ARGS work more sensibly
Make sure it's at the end of the `raco setup` command line, and set
the executable name to "raco" instead of "raco setup" so that the `-l`
flag is effectively implied.
2013-10-25 15:59:53 -06:00
Ryan Culpepper
016d6849fc tests, doc edits, and minor changes for unix sockets 2013-10-23 19:32:11 -04:00
Jan Dvořák
408a0a35a4 unix sockets: reworked to support abstract namespace
Rewritten to read sligthly easier while adding support for abstract
namespaces on Linux.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>
2013-10-23 19:32:11 -04:00
Jan Dvořák
9f883436e4 unix sockets: Linux is fine on any architecture
No need to limit ourselves to x86.
Regardless of architecture, sun_path is always 108 bytes long on Linux.

Signed-off-by: Jan Dvořák <mordae@anilinux.org>
2013-10-23 19:32:11 -04:00
Sam Tobin-Hochstadt
f9616959e9 add #:when to match 2013-10-22 15:30:14 -04:00
Ryan Culpepper
4993c085af fix missing sqlite3.dll with raco distribute
closes PR 14025
2013-10-22 00:02:46 -04:00
Ryan Culpepper
e3d7c5a22c improve wording of "expected more terms" messages 2013-10-21 23:02:11 -04:00
Ryan Culpepper
454234cfc9 add "within:" line for stxparse errors
related to PR 13806
2013-10-21 23:02:11 -04:00
Sam Tobin-Hochstadt
ec77a48d23 Add access to the failure continuation in match. 2013-10-21 17:04:10 -04:00
Sam Tobin-Hochstadt
d6610289b8 Check that all in-repository packages have description and authors. 2013-10-20 11:08:03 -04:00
Matthew Flatt
64b1b1037e Mac OS X: make updated frameowrk paths a multiple of 8
Needed for code-signing (on 64-bit builds, at least)
2013-10-19 07:56:00 -06:00
Asumu Takikawa
3264a7fd61 Better error messages for class/object contracts 2013-10-17 17:57:40 -04:00
Sam Tobin-Hochstadt
8ef9b98d59 Use #:usage-help to describe the behavior of raco pkg install.
In particular, specify the new behavior when no pkg-sources are given.
2013-10-16 10:01:45 -04:00
Sam Tobin-Hochstadt
ac1a6ecda7 Add #:usage-help option to command-line.
This allows specifying additional help text at the
top of the auto-generated help, before the options
specification.
2013-10-16 10:01:45 -04:00
Matthew Flatt
44ee51f22f raco setup: add --unused-pkg-deps flag
This flag may be useful for checking for unnecessary dependencies, but
beware that it reports many false negatives, either because relevant
files are not compiled, because the dependency is dynamic, or because
unused packages are intentially listed as dependencies as a
convenience (as is the case for "main-distribution").
2013-10-15 17:50:32 -06:00
Matthew Flatt
833a368c66 document pkg/name
Also, tighten contracts and add `package-source-format?`.
2013-10-15 12:40:54 -06:00
Matthew Flatt
bbf446b0f4 raco setup: fix dependency checker to distinguish package name from source
Closes PR 14095
2013-10-15 12:40:41 -06:00
Jay McCarthy
0182e3ff33 Fixing broken build and improving error message 2013-10-15 10:53:59 -06:00
Jay McCarthy
38b2a08295 Fixing PR14088 by showing entire path 2013-10-15 10:38:27 -06:00
Jay McCarthy
8b08258c34 Another friendly error message for weak sauce users 2013-10-15 10:38:27 -06:00
Jay McCarthy
add6166fad Adding noun re PR13885 2013-10-15 10:38:27 -06:00
Jay McCarthy
9cba5e6e90 Fixing PR14062 2013-10-15 10:38:26 -06:00
Jay McCarthy
0a336024a9 Restoring old decoding behavior of net/url and allowing future compatibility by parameterizing what is accepted 2013-10-15 10:38:26 -06:00
Jay McCarthy
f8d3d6c81b Fixing PR14098 2013-10-15 10:38:26 -06:00
Matthew Flatt
3a9ad7746b OpenBSD: another approach to finding stack bounds
OpenBSD provides pthread_stackseg_np(), which directly reports
the stack-bounds information that Racket needs, so we can use
that instead of the approach used on other Unix variants. The
approach used for other Unix variants seems not to work for OpenBSD
because the stack location at the point that main() is called
is already significantly far from the stack base (on the order
of 100k on a 32-bit system in my test using OpenBSD 5.2).
2013-10-15 08:59:06 -06:00
Matthew Flatt
91ac5138ca raco pkg: fix access of 'default version info
Includes repair to `raco pkg catalog-show` to use the 'version table
in a package description.
2013-10-15 07:22:31 -06:00
Jay McCarthy
243533ba61 Give a more friendly message 2013-10-15 07:19:36 -06:00
Matthew Flatt
eb42f25a4e Windows: pass current directory CreateProcess instead of setting
Avoids races setting/using a process-wide current directory,
and avoids locking the directory that was most recently used to
start a subprocess.
2013-10-14 21:28:08 -06:00
Matthew Flatt
304d72fc6f raco pkg install: work around un-deletable directories
When installing a package "P" and the usual directory already exists
and cannot be deleted, then use the path "P+1", etc., and record the
alternate path in the package database.
2013-10-14 21:06:49 -06:00
Matthew Flatt
a2e75d1ff2 {copy/delete}-directory/files: raise "not dir or file" as exn:fail:filesystem
When a bad path is encountered, the problem should count as a filesystem
exception so that it can be caught with other filesystem exceptions.
2013-10-14 18:18:33 -06:00
Matthew Flatt
b83373d6a4 fix error typo 2013-10-14 18:18:33 -06:00
Matthew Flatt
e0c143ff33 fix problems with pipe limits
A pipe's limit is supposed to apply only to unpeeked bytes, but
there were problems related to triggering further writes after
a peek, and also triggering further reads after a partial
write.
2013-10-14 14:46:09 -06:00
Sam Tobin-Hochstadt
4a542969c7 Make 'raco pkg install' with no arguments install the current directory.
This is useful for telling people how to install a new pkg, from
GitHub or elsewhere: just get the files, and then do
`raco pkg install` in the relevant directory.

Also, both cabal (the Haskell package manager) and npm (the node.js
package manager) behave this way.

To explicitly get the old behavior, specify the sources as
`--pkgs pkg-srcs ...`.  This is useful in scripts, when `pkg-srcs`
might be empty.
2013-10-14 14:06:47 -04:00
Matthew Flatt
2a79377c60 further tighten eq-hash code generation
Avoids including the bit thet indicates whether the object
is GCable in the eq hash code (in a configuration where
bits are available in the GC header for hashing).
2013-10-12 08:37:15 -06:00
Matthew Flatt
8b7b96215b equal hash code: avoid dropping useful bits
Closes PR 14059

Symbols in the PR were mapped to coliding hashes in
groups of 4 because the low 2 bits of the `eq?` hash
code were begin dropped to generate an `equal?` hash
code. Those two bits got lost due to a refectoring
a while back that moved the dropping of two useless
bits to a more centralized place, but the 2-bit shift
did not get removed from the `equal` hash code comparision.

The PR's example program will still generate groups of 2
when hashing around 10k symbols (which used to be groups of 8).
That's because there's a bit in the hash-code counter that
turns out to be forced to 1.
2013-10-12 08:37:15 -06:00
Jay McCarthy
acedb0e02a New URLs for S3 hosted catalogs 2013-10-11 16:37:25 -06:00
Jay McCarthy
0371ade45e S3 doesn't give up HTTPS, so turn it off 2013-10-11 16:37:24 -06:00
baoti
d9f0d52c8a Fix path-replace-suffix' and path-add-suffix' on path for some system 2013-10-11 16:09:30 -06:00
Matthew Flatt
7e42ee2003 fix custodian-related memory-management problem
The problem mainly affected `register-custodian-shutdown`
from `ffi/unsafe/custodian`, which is used by `math/bigfloat`
and `ffi/unsafe/com`.

When a value is registered with a custodian, the value is held
weakly, but the shutdown procedure is intended to be held
strongly. At the C API level, the data associated with a shutdown
function pointer is intended to be held strongly.

A custodian itself, however, is retained weakly by other custodians
in its family, so that custodians can be GCed and their elements
transferred to a parent custodian. Since the custodian itself may
be held only weakly, the callback & data in a custodian was effectively
held weakly --- which, in turn, can break assumptions in code such
as `ffi/unsafe/custodian` that expects strong references to prevent
finalizers from running.

Fix the problem by registering a reference to callback data as
data in a custodian's finalizer, which makes the data strongly
retained no matter how the custodian is retained.
2013-10-11 13:11:13 -06:00
Matthew Flatt
23f4a8e56e racket/runtime-path: fix ".ss" vs. ".rkt" search for lib paths
The package split exposed another place where searching
is needed, because the fallback in `collection-file-path`
to `collection-path` didn't work after the split.
2013-10-11 13:11:13 -06:00
Matthew Flatt
e8605a7181 avoid internal error on misconfigured executable 2013-10-11 13:11:12 -06:00
Matthew Flatt
ca002494e3 fix an inconsistency in free-identifier=?
Closes PR 13982
2013-10-10 18:16:47 -06:00
Matthew Flatt
9a74e633ae macro expander: restore a minor shortcut lost in a previous commit
The commit c352ef8f lost a shortcut that is used for looking up
certain bindings in an environment during expansion/compilation.
2013-10-10 18:16:46 -06:00
Matthew Flatt
70b6f6464f fix .zo marshal of a syntax object containing a hash table in a list
Also, fix `zo-parse` unmarshaling of syntax-object hash tables.

Closes PR 14087
2013-10-09 07:09:36 -06:00
Matthew Flatt
f649599681 repair for 5eee14032f
This repair needs a test case, but I think the test will require a lot
of scaffolding to set up a package configuration, so I'm leaving that
part on my todo list for now.
2013-10-08 16:48:31 -06:00
Asumu Takikawa
8df734048c Fix error message for misuse of #:methods
Closes PR 14069
2013-10-08 14:32:34 -04:00
Ryan Culpepper
c4ba293c7e better "expected more terms" messages in some cases
Still need docs, make constant stxclass descriptions available
2013-10-07 09:23:11 -04:00
Ryan Culpepper
a086943b7c fix typo 2013-10-07 09:23:11 -04:00
Matthew Flatt
5eee14032f raco setup et al.: fix problem with relative paths that exit a collection
Closes PR 14063
2013-10-06 17:23:51 -06:00
Robby Findler
a13aed7420 fix name of struct constructor built by struct-out
closes PR 14073
2013-10-06 08:21:40 -05:00
Ryan Culpepper
007d563a41 fix attr check for ~optional defaults
closes PR 14076
2013-10-05 15:20:04 -04:00
Ryan Culpepper
383c363c68 fix dict-empty?
closes PR 14075
2013-10-05 15:20:04 -04:00
Robby Findler
1742545640 fix printing for vector contracts 2013-10-02 10:03:00 -05:00
J. Ian Johnson
b32697bd88 Conservative extension to match so that app patterns may produce and consume multiple values. 2013-10-01 16:25:20 -04:00
Matthew Flatt
68df43ac16 raco setup: fix command-line argument handling 2013-09-30 09:19:52 -06:00
Matthew Flatt
413985eeb4 fix treatment of an old-style ".plt" file as a package 2013-09-30 09:15:26 -06:00