Commit Graph

43004 Commits

Author SHA1 Message Date
Matthew Flatt
f4ccd0fdc6 expander: correct some namespace-mismatch error formats
Related to #1352
2021-04-28 07:13:06 -06:00
Matthew Flatt
8962b027fe docs: clarifications on raco test and module instantiations
Closes #1338
2021-04-28 07:13:06 -06:00
Matthew Flatt
547678f7de raco test: fix --place mode (non-)rackunit counting
When a test run by `--place` mode doesn't increment any rackunit
counts, treat the count as 0 instead of 1 for consistency with
`--direct` and `--process` modes.

Closes #1358
2021-04-28 07:13:06 -06:00
Matthew Flatt
8cea33baa1 racket/unitsig: fix location on indirect reference
Set the source location of a function call that implements an indirect
import to be the original identifier, so a use-before-definition error
has the right location.

Closes #1324
2021-04-28 07:13:06 -06:00
Matthew Flatt
bf4fb553b3 raise-syntax-error: accomodate cyclic S-expressions
Closes #1016
2021-04-28 07:13:06 -06:00
Matthew Flatt
09b61f06c1 search page: avoid propagating "q" query
When you search in a page other than the main search page, the search
request is communicated as a "q" query in the URL. Meanwhile, the search
page generally propagates all query arguments, as a kind of store-passing
facility, which means that the "q" query was passed along. Avoid adding the
"q" to search results, so it doesn't get propagated so much.

Closes #936
2021-04-28 07:13:06 -06:00
Matthew Flatt
613e142447 typo in comment 2021-04-28 07:13:06 -06:00
plan-do-break-fix
0cdede88c3 Chez Scheme: corrects typos in project documentation 2021-04-27 19:43:22 -03:00
Matthew Flatt
6e3a94b6ac openssl: fix waiting on input or output
As noted by @rmculpepper, using an underlying input port as an evt to
indicate more SSL input is not right if data can be pumped from the
underlying input port meanwhile. This commit uses progress evts (real
or synthesized) to avoid that problem.

[The commit include more whitespace changes than I'd normally like,
but it seems like some past tabify went wrong.]

Closes #3804
2021-04-27 12:50:07 -06:00
Matthew Flatt
2f9cd5446b cs: auto-flush stdout/stderr only when terminals
Match BC's long-standing behavior of only flushing the original output
and error ports on input from the original input port when the output
and/or error port is a terminal port.
2021-04-27 11:55:59 -06:00
Matthew Flatt
a385788971 cs: make flush-output error if port is closed
Closes #3803
2021-04-27 09:23:32 -06:00
Matthew Flatt
9ae6d66449 bc: fix sync when a guard-evt turns into choice-evt late
During the time that the procedure in a guard-evt is called by `sync`,
it's possible for the `sync` evt choice to become determined. If the
guard-evt procedure then returns a choice-evt, the BC implementation
of `sync` could lose track of the selected evt; the selection is
represented by an index, and choice-evt splicing can shift indices.

Possibly related to #3004
2021-04-27 08:39:40 -06:00
Matthew Flatt
f4a9058941 stream-{ref,tail,take}: avoid retaining stream for potential error
Although retaining the original stream argument to `stream-ref`,
`stream-tail`, or `stream-take` can enable a better error message if
the stream runs out of elements too soon, it can also interfere with
the intended memory use of a stream.

Closes #2870
2021-04-26 20:03:55 -06:00
Matthew Flatt
a2d724fff6 security-guard-check-network: fix contract
CS was correct, but BC and the documentation were too strict.

Closes #1763
2021-04-26 18:14:00 -06:00
Matthew Flatt
5b66a2e590 racket/rerequire: fix submodule handling
Closes #971
2021-04-26 16:32:08 -06:00
Matthew Flatt
60129ffaca native libs: add CG-with-clipping patch to Cairo
This patch is useful for emoji support on Mac OS.
2021-04-26 16:32:08 -06:00
Matthew Flatt
50cb94621f raco test: clarifications on some command-line flags 2021-04-26 16:32:08 -06:00
shhyou
0cff2f6caf ->[*]: Put srcloc on the outermost syntax object 2021-04-26 09:06:41 -05:00
John Clements
b1f84fa60d typo, insert 'to' 2021-04-25 17:16:37 -07:00
Greg Hendershott
b72c11f08b Supply original stx to make-import
Although commit 5b0f0cee23 was sufficient to make `rename-in` expand
to `rename` with srcloc for the original name, it turns out it did not
address a similar issue with `only-in` renaming.

Do so by supplying the original (not renamed) identifier syntax as the
`orig-stx` for `make-import`.
2021-04-23 09:46:09 -06:00
sorawee
91d136120c doc: @racket[parameterizing] -> @racket[parameterize]-ing 2021-04-23 09:44:55 -06:00
Matthew Flatt
af40cdb7e7 repair struct with same #:name and #:constructor-name identifier
Closes #3791
2021-04-21 11:20:36 -06:00
Matthew Flatt
725a7e353c cs: avoid crash on startup if the working directory does not exist
Closes #3793
2021-04-21 11:07:59 -06:00
Matthew Flatt
9753eb6fb0 license from main doc page: use "BC" and "CS" 2021-04-21 09:42:19 -06:00
Bob Burger
c6608d78d3 Chez Scheme: maybe-compile-program now returns void 2021-04-21 07:54:17 -06:00
Jamie Taylor
17bc9b2b33 Chez Scheme: fix mat that failed in bullyx with cmg=1 2021-04-21 07:53:18 -06:00
Jamie Taylor
b090edbe9d Chez Scheme: update docs on ftype pointer types in foreign-procedure
Now specifies that the ftype pointer parameter types - `(* ftype)` and
`(& ftype)` - actually require an `ftype-name` (i.e., the syntax
requires an identifier in that position). This clarifies the problem
encountered in issue cisco/ChezScheme#557 (although further examples
would be helpful, of course).
2021-04-21 07:52:52 -06:00
Jamie Taylor
e97ae6522c Chez Scheme: add instructions for building docs
[The original commit has been adapted to revised "BUILDING" format.]
2021-04-21 07:52:52 -06:00
Bob Burger
70db865800 Chez Scheme: fix typo in get-process-id documentation 2021-04-21 07:27:12 -06:00
Amirouche
2e8da7ecb7 Chez Scheme: typofix 2021-04-21 07:26:31 -06:00
Philip McGrath
0ead209cc5 Chez Scheme: further adjust paths for utils in build scripts
As suggested by @akeep

Co-authored-by: Andy Keep <akeep@robotman.org>
2021-04-21 07:25:18 -06:00
Matthew Flatt
f383076784 Chez Scheme: repair bignum shift right
When a negative bignum is shifted right by a multiple of the bigint
bit size (which is 32), when a shifted-off bit is non-0, and when the
result would be a sequence of bigints with all 1 bits before rounding
to deal with the dropped bits, a carry that should have been delivered
to a new high bigint was dropped.

Closes #3794
2021-04-20 18:25:23 -06:00
Matthew Flatt
890aa076a9 doc: simplify readtable-mapping result contract 2021-04-20 18:25:23 -06:00
Philip McGrath
cc0b1bafeb remove committed "racket.boot"
This file appears to have been checked in accidentally.
2021-04-18 10:16:15 -06:00
Robby Findler
9085ffe69b Update racket/collects/json/main.rkt
Co-authored-by: Sam Tobin-Hochstadt <samth0@gmail.com>
2021-04-16 16:15:02 -05:00
Robby Findler
7cae0adaa6 change json parser to be more strict about whitespace (matching the spec) 2021-04-16 16:15:02 -05:00
Robby Findler
fea6a0b9ae specialize or/c when its arguments are eq-contracts
This commit improves the performance of or/c contracts with symbols
(or other things that the contract system compares with eq?).

For example, on the program below we halve the distance to
just writing the contract directly as a predicate.

```
 #lang racket/base
(require racket/contract/base)

(define c1 (or/c 'x 'y (integer-in 1 24)))

(define (c2 x)
  (or (eq? x 'x) (eq? x 'y)
      (and (exact-integer? x)
           (<= 1 x 24))))

(define f1
  (contract (-> c1 any)
            (λ (x) x) 'pos 'neg))

(define f2
  (contract (-> c2 any)
            (λ (x) x) 'pos 'neg))

(define (try f)
  (time
   (for ([x (in-range 1000000)])
     (f 'x) (f 'y) (f 10) (f 'x) (f 'y) (f 10)
     (f 'x) (f 'y) (f 10) (f 'x) (f 'y) (f 10)
     (f 'x) (f 'y) (f 10) (f 'x) (f 'y) (f 10)
     (f 'x) (f 'y) (f 10) (f 'x) (f 'y) (f 10)
     (f 'x) (f 'y) (f 10) (f 'x) (f 'y) (f 10))))

(try f1)
(try f2)
```

with this commit:
cpu time: 849 real time: 850 gc time: 39
cpu time: 615 real time: 616 gc time: 2

without this commit:
cpu time: 1020 real time: 1021 gc time: 37
cpu time: 616 real time: 617 gc time: 2
2021-04-16 14:31:43 -05:00
K
df0c756f73
typographic rehash of --help output
The current output for `--help` is quite messy and hard to
navigate.

I added some indentation and spacing to make the document
easier to read. For example,

    File and expression options:

      -e <exprs>, --eval <exprs>
         Evaluate <exprs>, print results
      -f <file>, --load <file>
         Like -e '(load "<file>")' without printing

The new layout is longer, but at least it is readable. It
might be better if we could move all the options to a man
page and only select a few common ones to put in `--help`.
2021-04-16 08:25:31 -06:00
Sorawee Porncharoenwase
73381c3ad3 expander: another improvement to make-readtable's error message
Currently `(make-readtable #f #\a 'dispatch-macro)` produces the error
message

```
; make-readtable: expected procedure argument after symbol argument
;   given: 'dispatch-macro
```

which is very confusing, because it sounds like `'dispatch-macro` is
incorrect, but it is in fact correct already.

This PR adjusts the error message to:

```
; make-readtable: expected procedure argument after symbol argument
;   symbol: 'dispatch-macro
```

which is the convention that is already used when the mode argument is not given.
2021-04-16 08:22:43 -06:00
sorawee
bad18f5be6
expander: fix make-readtable's error message and doc 2021-04-15 12:33:23 -06:00
Doc Mo
c3e54219ff better phrasing 2021-04-15 12:07:26 -06:00
Doc Mo
b03f274933 generator argument formals specified directly 2021-04-15 12:07:26 -06:00
Gustavo Massaccesi
28a46e36c6 fix typo in resource.scrbl 2021-04-15 11:57:43 -06:00
Greg Hendershott
5b0f0cee23 Use import-orig-stx instead of import-src-sym when appropriate
The equivalent, for imports, of commit 66a8436bc1 and PR #3758 for
exports.
2021-04-15 11:57:12 -06:00
Matthew Flatt
6d30ff78c1 ffi/unsafe/try-atomic: don't use callback during nested atomic
When a `try-atomic` thunk starts a more nested atomic region, don't
trigger the callback until the more nested atomic region ends.
2021-04-15 09:16:09 -06:00
Matthew Flatt
237d627583 bc: send stderr/stdout logging through rktio
One effect of using rktio instead of fwrite is that Windows output
produces LF instead of CRLF. Writing CRLF is arguably more correct,
but it likely doesn't matter, and consistency with normal Racket
output is helpful.
2021-04-14 17:23:19 -06:00
Matthew Flatt
448b77a662 adjust DNS test to use different hosts for reverse lookup
The old one stopped working. Added two new ones, so we have a spare to
discard if one stops working.
2021-04-14 14:38:58 -06:00
Philip McGrath
1b8250de14 readme: remove reference to Boehm GC 2021-04-14 08:33:21 -06:00
Matthew Flatt
5dfe7b9c18 cs: repair run of at-exit custodian callbacks
When an at-exit callback is attached to a subcustodian, it wasn't run
as it should be.

Closes #3782
2021-04-14 08:14:19 -06:00
William J. Bowman
9f649e0afa Fix typo in engine docs 2021-04-14 09:18:16 -04:00