Commit Graph

922 Commits

Author SHA1 Message Date
Ryan Culpepper
e61d8aa1b2 syntax/parse template: update docs 2017-08-23 02:01:27 -04:00
Matthew Flatt
ff1ec66c7f pkg catalog operations: store and propagate ring number
Although `raco pkg` doesn't use a package's ring number, it's useful
to preserve for other tools (like the pkg-build service). Adjust `raco
pkg catalog-copy` and `raco pkg catalog-info` to recognize and store a
ring number.
2017-08-22 16:55:10 -06:00
Matthew Flatt
c87cdf5988 fix docs for list->cblock and vector->cblock 2017-08-19 19:02:06 -06:00
Matthew Flatt
52e7267273 doc correction for will-execute 2017-08-19 19:02:06 -06:00
Ben Greenman
3e2325acaf doc: #lang racket does not reprovide 'racket/logging' 2017-08-19 00:53:42 -04:00
Matthew Flatt
d6fdabd691 fix doc typo 2017-08-18 09:27:23 -06:00
Jay McCarthy
d1749329a6 fixes pr15467, thanks 2017-08-17 10:40:35 -04:00
shhyou
e997bb96ea Point make-meta-reader to the document of read
- Point read, read-syntax and make-meta-reader to
  the documentation explaining the arguments of
  read and read-syntax.
2017-08-15 07:12:40 -06:00
Matthew Flatt
59fc3758f0 thread-suspend-evt: doc correction 2017-08-10 18:33:49 -06:00
Matthew Flatt
f790084e11 call-in-nested-thread: add missing info in docs 2017-08-10 18:33:49 -06:00
Ryan Culpepper
5519a8ab45 example of unquoted-printing-string in make-constructor-style-printer 2017-08-04 12:24:13 -04:00
Matthew Flatt
cbfcc904ab add unquted-printing strings
And unquoted-printing string contains a string to `display` in all
print modes. Although it could be implemented with a structure type
that has a printing function, `raise-arguments-error` further treats
unquoted-printing strings specially by not using the error value
conversion handler, so it reliably produces literal text in the error
message; that way, `raise-arguments-error` can be used to construct
more error messages.
2017-08-04 06:13:19 -06:00
Matthew Flatt
1ca8b6d533 bytes-utf-8-length: fix result contract in docs 2017-08-04 06:13:19 -06:00
Jordan Johnson
58dfcee14a Clearly distinguish ~datum/~literal in examples
As discussed on the racket users list (subj: ~literal vs ~datum) at https://groups.google.com/d/msg/racket-users/KWANfGc7qcI/G_MClWJpBAAJ
New example based on code from Jens Axel Soegaard.
Caveat: I've run this in DrRacket with (require (for-syntax syntax/parse)) to verify the three distinct outputs, but am submitting this PR in-browser, so I haven't run the doc build on it myself.
2017-08-03 22:26:43 -04:00
Weng Shiwei
12e497e0e8 adding file extension ".scrbl" to fix redirection
adding file extension ".scrbl" to fix url redirect error. Otherwises, it triggers a redirection error.

This link is just before [section 8.7.1 in reference of contract](https://docs.racket-lang.org/reference/Building_New_Contract_Combinators.html)

This fix works and I guess it's correct.

I didn't compile the document project but I searched other `@other-doc` tags in project, the link in lib are all ending with `.scrbl`

The current generated url is:
https://download.racket-lang.org/docs/6.9/html/local-redirect/index.html?tag=%28part._%28.%27%28lib._contract-profile%2Fscribblings%2Fcontract-profile..rkt%29.%27._.%27top.%27%29%29&version=6.9

If changing `rkt` to `scrbl` in the url:
[https://download.racket-lang.org/docs/6.9/html/local-redirect/index.html?tag=%28part._%28.%27%28lib._contract-profile%2Fscribblings%2Fcontract-profile..scrbl%29.%27._.%27top.%27%29%29&version=6.9](https://download.racket-lang.org/docs/6.9/html/local-redirect/index.html?tag=%28part._%28.%27%28lib._contract-profile%2Fscribblings%2Fcontract-profile..scrbl%29.%27._.%27top.%27%29%29&version=6.9)

The redirected result is correct.
2017-07-31 17:32:53 -06:00
Weng Shiwei
4bad4d7655 should be "requiring" module invokes the function
Before this line, it says the function flows from providing module to requiring module.
After this line, it says the argument travels back from requiring moduleo to providing module.
I believe that argument supplying and function invoking should happen at requiring module, rather than providing module.
2017-07-28 10:43:10 -06:00
Carlo Dapor
1e9a56215f In English, "one" can be used both when counting (1, 2, 3, 4, 5, ...) as well as an atricle in front of a nouns (one tree, one bridge, ...). In German the two use cases are distinct. "One" as in counting is "eins, zwei, drei, vier, ...", but as an acticle it would be "ein" (for male or neutral nouns) or "eine" (for female nouns). Thus in the text the correct term would be "eins" in German.
For the French counting, "une" is not quite correct.  It is the female form for "one" as an article.  It is much more common to count "un", "deux", "troix", "quatre", "cinq", ....
2017-07-28 09:58:12 -06:00
Matthew Flatt
94b9b8f4dd document integer->integer-bytes and integer-bytes->integer change 2017-07-28 09:51:15 -06:00
Matthew Flatt
616d99fbdc Inside Racket: add a simpler embedding example
The simpler example uses `dynamic-require`, which will hopefully set
readers on a better path if they don't need a REPL and the associated
complexities of `load` and `eval`.
2017-07-26 08:25:28 -06:00
Ben Greenman
1f6b31aa3e doc: remove unmatched ] 2017-07-23 19:32:26 -04:00
Matthew Flatt
d1fa65ac92 doc correction for chaperone-of? 2017-07-23 08:21:28 -06:00
Ben Greenman
37006520d3 doc: path cleaner examples
Add quick examples for:
- `cleanse-path`
- `simplify-path`
- `normalize-path`
2017-07-21 16:08:36 -05:00
Ben Greenman
c15fd5045a doc: add grammar for 'recursive-contract' type option 2017-07-21 14:52:05 -05:00
Matthew Flatt
0f549823c4 call-with-immediate-continuation-mark: fix docs
Closes #1747
2017-07-18 06:42:53 -06:00
Matthew Flatt
808bd1b897 raco setup: adjust --clean mode
Make `raco setup` propagate the original value of
`use-compiled-file-paths` in case it's reset to avoid loading bytecode
files. Then, `--clean` mode can remove bytecode relevant to that
setting, instead of always clearing "compiled" subdirectories.

There's no external way to initialize `use-compiled-file-paths` right
now, other than forcing it to `null` with the `-c` flag at the
`racket` level, but the current "racket7" implementation uses
different `use-compiled-file-paths` settings for different build
modes, and it seems to make sense in general.

Also, make `--clean` sensitive to `-D` and `-d`, so that it's easy to
clean just bytecode.
2017-07-17 14:45:43 -06:00
Leif Andersen
cca6db4ff0
Add links for examples to contracted functions.
is-a?/c -> is-a?
implementation?/c -> implementation?
subclass?/c -> subclass?
2017-07-11 12:30:45 -04:00
Ben Greenman
5c382d7162 doc: typos in file/gif and file/unzip contracts
- missing `for-label` in `file/gif`
- typo in `file/unzip`
2017-07-10 16:52:06 -05:00
Ben Greenman
1a81f205cc doc: add missing 'for-label' to 'syntax/srcloc' 2017-07-10 16:52:06 -05:00
Vincent St-Amour
0f5e95ea33 Use actual contracts in json docs.
Closes #1725
2017-07-07 14:55:18 -05:00
Vincent St-Amour
5f740ffcac Fix typesetting of inpersonator-of docs. 2017-07-07 14:55:18 -05:00
Ben Greenman
5917f92ac1 typo: remove extra period in vectorof docs 2017-07-04 13:03:22 -04:00
Matthew Butterick
442c2fdfaf Correct typo
`bust be an` → `must be a`
2017-07-02 22:58:33 -04:00
Matthew Flatt
ed8145e0d2 fix doc typo 2017-07-02 14:26:59 -06:00
Matthew Flatt
63146e5451 ffi/unsafe/custodian: handle already-shutdown custodians 2017-06-29 14:36:42 -06:00
Matthew Flatt
eb24c1e0b1 find-relative-path: correct contract in docs
Also, avoid a test on Windows that can't work there.
2017-06-29 13:26:24 -06:00
Matthew Flatt
7939e32a57 docs: fix {read,peek}-{byte,char}-or-special argument order 2017-06-29 13:20:57 -06:00
catull
95ddfa4972 Typo: (fir l) was probably meant to be (fist l). 2017-06-25 01:18:50 -04:00
Ryan Culpepper
44eb5532ad syntax/parse: add ~or* and ~alt, like ~or{S,H} and ~or{EH}, respectively 2017-06-24 17:07:55 -04:00
Matthew Flatt
81f1c90ee0 small corrections reader docs
Fixes inaccuracies discovered when reimplementing
the reader in Racket.
2017-06-22 15:00:00 -06:00
Matthew Flatt
3c07250db4 fix printer for (unquote @d)
Avoid printing `(unquote @d)` or `(unsyntax @d)` as `,@d` or `#,@d`,
which would mean `(unquote-splicing @d)` or `(unsyntax-splicing @d)`
to the reader, by adding an extra space before the `@`.
2017-06-22 15:00:00 -06:00
Matthew Flatt
4bbe7a241d doc clarification for parameterize-break 2017-06-22 12:59:02 -06:00
Matthew Flatt
0d2908f824 regexp docs: minor corrections
Fixes inaccuracies discovered when reimplementing
regexp matching in Racket.
2017-06-22 12:25:43 -06:00
Matthew Flatt
36e2155b91 tcp-addresses: fix docs to note that a UDP socket is accepted 2017-06-22 12:25:43 -06:00
Matthew Flatt
31d82eb9a6 raco setup: add note in docs for --tidy
Related to #1718
2017-06-22 08:39:39 -06:00
Matthew Flatt
30e4e812ba raco test: doc and help tweaks
* Clarify shell context for `++args` note on quotes

 * Add `history` notes

 * Make the help output fit in 80 columns

 * Bump "compiler-lib" version
2017-06-22 08:36:30 -06:00
Conor Finegan
9852afe1b1 raco test: support ++arg <arg> and ++args <args>
Add a way for `raco test` to pass along arguments to the test program.
2017-06-22 08:09:22 -06:00
Ben Greenman
a915433b02 doc: add tech link for box in 'immutable?' description 2017-06-21 01:47:01 -04:00
Matthew Flatt
8094ef7a02 clarify free docs: don't use with malloc modes other than 'raw
Closes #1708
2017-06-20 11:59:26 -06:00
Matthew Flatt
d8fcbc7b56 remove incorrect claim about identifier-binding
It was true for the old macro system, but it isn't true now.

Closes #1485
2017-06-20 11:59:26 -06:00
Matthew Flatt
60e85fcaf3 rktio: document 'replace and 'replace/truncate changes 2017-06-19 06:45:18 -06:00
Matthew Flatt
c02eacd5d2 rktio: repairs to kqueue-based fs-change events 2017-06-19 06:45:18 -06:00
Matthew Flatt
c4b3b19c1e rktio: repairs
All tests now pass for MacOS.
2017-06-19 06:45:17 -06:00
Ben Greenman
5cfe5619de style: document '/', as in 'call/cc'
Add row to the table in the section on "Names".

Also clarify that the nearby margin note is about `#%`
2017-06-07 14:29:33 -04:00
Leif Andersen
40d4a35329
Add documentation for scheme_atexit 2017-06-04 18:52:09 -04:00
Leif Andersen
2f6c42f3c1 Add a #:make-c-id flag to define-ffi-definer
This make-c-id allows an author to specify a convention for how
to connect and identifier defined with define-ffi-definer and
the actual symbol in the file.

* Adds docs.
* Adds tests.
* Adds history.
2017-06-02 10:26:57 -04:00
Matthew Flatt
f459dd9eb7 make collapse-module-path-index work on a "self" modidx 2017-06-01 19:37:18 -06:00
Leif Andersen
3364dba903 Another typo in the docs:
type? -> ctype?
2017-06-01 15:37:16 -04:00
Leif Andersen
cac1266d05 Fixed documentation for cblock->vector.
It defined cblock->vector as cblock->vector, rather than
comparing it cblock->list.
2017-05-31 15:46:54 -04:00
Alexis King
69fb636a1c Add a missing for-label require in the contracts section of the guide 2017-05-30 20:09:50 -07:00
Ben Greenman
6d7f075ec5 typo: set 'subset?' functions take 2 arguments, no more 2017-05-30 17:47:53 -04:00
Leif Andersen
ea778e1dd9 FIx typo in #:retry docs for _fun. 2017-05-30 08:46:10 -04:00
Matthew Flatt
06b69c625f repair chainges to ffi/file
Bring back the exported `_file/guard`, `_file/r`, and `_file/rw`;
restore/move tests in "file.rktl" test suite; and add docs for new
functions.
2017-05-27 07:29:47 -06:00
Matthew Flatt
87c0ca84a8 add ffi/unsafe/global and switch openssl to use it
Continues the move away from using the FFI to access unsafe Racket
functionality.
2017-05-26 17:49:16 -06:00
Matthew Flatt
bf83d1126d add some unsafe operations as an alternative to FFI access
Accessing unsafe functionality through the FFI seemed like a good way
to avoid writing C code, but it made things more complicated instead
of easier, and it interacts badly with a more agressive shift away
from C (such as porting to Chez Scheme). So, add functions to the
primitive `#%unsafe` module, instead.
2017-05-26 16:26:06 -06:00
Leif Andersen
8f6ec91fb1
code-define-id -> core-define-id
Just another small typo.
2017-05-25 14:48:53 -04:00
Leif Andersen
3f61100dcc
ctype -> ctype?
Also void -> void?

These two forms are now documented using contracts, which matches
with the rest of the FFI docs.
2017-05-25 13:48:48 -04:00
Ryan Culpepper
c082f130cb support string, bytes (bindings from racket) as stxclass refs
add compile-time table as alternative to stxclass binding
2017-05-18 12:54:26 -04:00
Ryan Culpepper
ce9b309dbc defstxclass uses #:kind "syntax class" for better labeling 2017-05-18 12:54:26 -04:00
Georges Dupéron
5904cea99a Small changes to the documentation
* Fixed typo in the docs for serialization (serializable-struct/version → serializable-struct/versions)
* Fixed typo in scribble documentation (head pattern → a-pattern)
* Made the order of the argument descriptions match the order of the arguments in the documentation for import and export
2017-05-12 16:01:29 -05:00
Leif Andersen
cd1e56bfaf Improve docs for FFI custodian API. (#1684)
Improve docs for FFI custodian API.

The docs were unclear on when an object goes from weakly to strongly
held.

Also add a missing space
2017-05-12 16:32:25 -04:00
Matthew Flatt
f43234e1cb add prop:authentic and (struct .... #:authentic ....)
An authentic structure type is one whose instances cannot be
impersonated or chaperoned. The intended use of `prop:authentic` is to
annotate a library-private data structure where impersonators are
never needed internally for the data structure, and the declaration
lets the compiler produce less code and fewer branches by omitting
impersonator support.
2017-05-12 12:40:57 -06:00
Matthew Butterick
7908be8ce9 Fix spelling errors (#1687)
“cooresponds” → “corresponds” x2
2017-05-11 10:08:26 -04:00
Ben Greenman
11484b9d34 doc: explain blame object passed to late-neg
The blame object passed to a late-neg-proj function will be missing
 one party. The missing party is sometimes the negative party and
 sometimes the positive party.
2017-05-01 18:26:01 -04:00
Sam Caldwell
a666f1b0c1 typo 2017-05-01 16:34:26 -04:00
Vincent St-Amour
4ffd2fc1b8 Restore docs about impersonator-of? and immutable hash tables.
In the impersonate-hash docs, this time.
2017-04-30 13:44:49 -05:00
Vincent St-Amour
206ced8d47 Add examples for impersonator-of?. 2017-04-30 13:44:49 -05:00
Vincent St-Amour
d9b39eac1f Add back desciption of impersonator-of?'s behavior on impersonator subparts. 2017-04-30 13:44:49 -05:00
Daniel Feltey
e29dba115b New impersonator-of? docs 2017-04-30 13:44:49 -05:00
Matthew Flatt
bb2f1998f1 document binding structure of for/fold
The binding structure is not natural, but changing the binding rules
would risk breaking existing code.

Closes #1659
2017-04-29 11:08:42 -07:00
Vincent St-Amour
13443dec92 Add chaperone-vector*, unsafe-chaperone-vector, and property-only vector chaperones.
By analogy with the procedure chaperone equivalents.
2017-04-28 14:27:53 -05:00
Matthew Butterick
6e64da6880 Fix typos (#1651)
Fix typos

`sourve` → `source` x4
2017-04-27 09:16:22 -06:00
John Clements
473a3f5573 doc update for info.rkt files
specifically, mention that info.rkt files do
not provoke package conflicts
2017-04-27 09:15:03 -06:00
Matthew Flatt
608e6cc2a2 add tests for racket/port
Also, fix some doc typos.
2017-04-26 17:16:59 -06:00
Matthew Flatt
d469265a6e Makefile: support both cross-platform and non-cross installers
In non-cross mode, `-C` needs to go after `-G` and `-X` when setting
up a "bundle" directory to turn into an installer, because that mode
needs to use foreign libraries (such as SQLite) at build time, and it
can use the instances that are being set up for the installer.

Meanwhile, improve the advice for setting `PLAIN_RACKET` to use `-C`
for a cross-platform build mode, even though things tend to work
anyway without it.
2017-04-26 15:59:04 -06:00
Philip McGrath
e9cd1e5595 Corrected Racket Reference for get/build-late-neg-projection
and `get/build-val-first-projection`.
Both had incorrectly shown that the returned function took
a `contract?` as an extra first argument.
2017-04-25 14:57:50 -05:00
Matthew Flatt
c917434a86 improve cross-platform support
Detangle the target and host DLL and library directories by
making `get-lib-search-dirs` and `get-dll-dir` report the
host system's directories, and add `get-cross-lib-search-dirs`
and `get-cross-dll-dir`.

A new `-C`/`--cross` flag causes `racket` to save a host config and
collection directory and make them available via `(find-system-path
'host-{config,collects}-dir)`, while plus `(system-type 'cross)`
reports whether `-C` mode is in effect. Besides making the host paths
available, this change allows a same-platform build to run in
corss-platform mode.

The immediate problem to solve was the creation of Windows installers
on Windows, where recent changes to support 'gui-bin-dir configuration
need a clear distinction between the host Racket and the target Racket
being built, even if they're the same platform. (The "GRacket.exe"
executable didn't work, for example.)

The changes in this commit are more than needed for the immediate
problem, but they naturally build on the necessary `-C` flag, and they
support cross-platform package setup where native libraries are needed
during setup.
2017-04-25 08:31:26 -06:00
Scott Moore
54bd21e65a Discuss security considerations of racket/sandbox in Reference 2017-04-20 16:23:00 -05:00
Vincent St-Amour
c652afa894 Document surprising behavior of in-range with floats and zero. 2017-04-17 20:23:28 -05:00
Leif Andersen
922b5f06e9 Make log also accept a base. (#1667)
Make `log` in `racket/base` optionally accept a second argument.

The second argument is the log `base`. The docs also recommend
`fllogb` when precision is important.

* Error message when base is 1
* Added docs.
* Add tests.
2017-04-15 10:40:41 -04:00
Robby Findler
6492226411 add a #:name argument to flat-contract-with-explanation 2017-04-13 10:19:20 -05:00
Robby Findler
e7f68472e5 the "I don't konw what name to give" name has changed; update the guide to reflect that
closes #1661
2017-04-13 09:37:25 -05:00
Robby Findler
b3d3bf7c01 improve the guide section on how to use the contract library
to build new combinators
2017-04-12 21:27:50 -05:00
Philip McGrath
8bb8365a38 Revise Racket Guide 7.8 Building New Contracts
to use late neg projections in the examples, rather val first projections.
2017-04-12 21:27:50 -05:00
Ben Greenman
50f67cf6e4 remove @history for flat contracts #:exercise
Remove the history annotation on `build-flat-contract` property
 about removing the `#:exercise` keyword.

Because the keyword wasn't actually removed from the function,
 only from the (incorrect) documentation. So there aren't any
 legal programs that depend on the removed keyword argument.
2017-04-09 11:36:06 -04:00
Ben Greenman
3bb131ecb2 add #:generate keyword to build-flat-contract-property
the public function was missing the `#:generate` keyword,
 added this and documented why `#:exercise` is missing
2017-04-08 21:37:39 -04:00
Robby Findler
d224da3105 document the #:missing-party argument to raise-blame-error
closes #1658
2017-04-08 18:55:58 -05:00
Matthew Flatt
1030e079c4 raco ctools docs: improve xref docs and mention "cext-lib" package 2017-03-28 19:11:44 -06:00
Ben Greenman
30aa951db8 gzip: use path-add-extension as default
instead of `string-append`-ing the extension,
 because that doesn't work for all path strings
2017-03-26 20:58:59 -04:00
Ben Greenman
2cbd44d64d add optional 'sep' argument to path-add-extension
New optional argument to 'path-add-extension',
 a byte string to replace for the '.' in the argument path.
2017-03-26 20:58:53 -04:00
Matthew Flatt
e22a5da06c find-relative-path: case-normalize for comparison by default
This change affects programs only on Windows. For example, `C:\a\b`
relative to `c:\A\c` is `..\b`, instead of not relative.

Closes #1603
2017-03-24 20:00:03 -06:00
William G Hatch
144486dcc0 add more plugins to emacs section of guide (#1510)
Add more plugins to Emacs section of guide, including
a section for Evil Mode
2017-03-24 17:28:10 -06:00
Matthew Flatt
056041bd07 document current-command-line-arguments encoding
Closes #1641
2017-03-22 12:26:02 -06:00
Matthew Butterick
e08328c68c unmisspell configure-runtime 2017-03-22 12:25:41 -06:00
Matthew Butterick
6493a502c0 use deftech rather than emph 2017-03-22 12:25:41 -06:00
Matthew Butterick
8694b99608 update docs to use configure-runtime submodule rather than obsolete syntax property 2017-03-22 12:25:41 -06:00
Matthew Butterick
333f602a70 Improve assq example
Let me `assq` something: doesn’t it seem inapt to demonstrate this function with integers, when `eq?` doesn’t give consistent results for numbers?
2017-03-22 12:24:34 -06:00
Matthew Flatt
9f2db6a915 add history annotations for racket/port changes
Goes with 1309cf1649.
2017-03-17 08:37:49 -06:00
Marc Burns
1309cf1649 Add procedures like port->X but close the port (#1634) 2017-03-16 15:52:43 -04:00
Ben Greenman
10aaff692b [doc] link max <--> argmax 2017-03-12 22:33:02 -04:00
Robby Findler
faa385b337 small cleanup of contract 2017-03-11 13:06:22 -06:00
Ingo Blechschmidt
4107ee7ea0 fix tiny typo (#1630) 2017-03-07 22:20:56 -05:00
Robby Findler
fe9288d0d5 remove suprious hash 2017-03-07 19:00:36 -06:00
Robby Findler
2febfb1dba declare that examples that raise errors raise errors 2017-03-07 18:59:44 -06:00
Robby Findler
87e024d55c allow #f as arguments to integer-in 2017-03-07 16:27:18 -06:00
James Bornholt
b978631823 Clarify order of arguments for stream-fold (#1578) 2017-03-06 18:44:42 -05:00
Benjamin Greenman
d8b78e823e relax contract for (random min max [rand-gen]) (#1626)
Relax contract for `(random min max [rand-gen])` to accept any pair of
integers such that:
- `(< min max)`
- `(- max min)` is between 1 and 4294967087
2017-03-06 18:43:04 -05:00
Robby Findler
7bd7ec5aaf remove spurious } 2017-03-05 21:35:20 -06:00
Leif Andersen
eca457e886 Add history for the following functions:
positive-integer?
negative-integer?
nonpositive-integer?
nonnegative-integer?
natural?
2017-03-03 09:29:57 -05:00
Matthew Flatt
1d61d9b752 add 'vm mode to system-type 2017-03-03 06:56:09 -07:00
Leif Andersen
1ebb3d5ef3 nonnegative-integer -> exact-nonnegative-integer 2017-03-02 19:24:12 -05:00
Leif Andersen
1ac2e77d00 Add natural? as an alias for nonnegative-integer? 2017-03-02 19:24:12 -05:00
Leif Andersen
edf4bcfe78 Add documentation for the predicates in the previous commit 2017-03-02 19:24:12 -05:00
Ben Greenman
591d57b5bc typo: pluber? -> plumber? 2017-02-22 23:20:12 -05:00
Sam Caldwell
9f34be4b83 fix typo (#1620) 2017-02-17 21:54:37 +00:00
Andrew Kent
98b167d3a0 fix for/fold/derived examples
The previous for/fold/derived examples in the docs
incorrectly expanded, placing the entire body of the
user defined for loop into a let expression inside of
for/fold/derived. This meant that break clauses (i.e. #:break
or #:final) that appeared in the body of the user-defined
for loop were not visible to the underlying for/fold/derived
macro after expansion and therefore usages of #:break or #:final
incorrectly resulted in syntax errors (since with the incorrect
expansion, they were seemingly misplaced keywords inside of a let).

With this PR the for/fold/derived examples in the docs now
expand correctly into a form that mirrors the actual
expected syntax of for loops:

(user-defined-for (for-clause ...) body-or-break ... body)

==(now expands more or less into)==>

(for/fold/derived (for-clause ...) body-or-break ... body)

Or in other words, the body of the user defined for loop now correctly
expands directly into the body of for/fold/derived.
2017-02-17 06:32:25 -07:00
Robby Findler
9098b39871 remove security mention that can be misconstrued 2017-02-15 13:58:51 -06:00
Matthew Flatt
572b96a6ef add 'gui-bin-dir as a separate configuration option
Allow the directory for GUI executables to be specified as different
from console executables. The defaults for those two are different
on Mac OS, and configuring them differently might be useful to
address #1575.

Although there is probably no demand on Windows or Unix for splitting
the console and GUI bin directories, this patch tries to make things
work sensible there. On Windows, there's a corner case where a
launcher that starts GRacket (especially with `-z`) is intended to be
a console executable. The launcher creator can be told that via a
`subsystem` option, but a new `#:console?` argument was needed for
`make-gracket-launcher-path` lets the path selector know.
2017-01-30 05:41:49 -07:00
Matthew Flatt
dc85374501 Add ignore-stderr submodule and test-ignore-stderrs "info.rkt"
These configuration options apply to `raco test` and mirror the
`--ignore-stderr` command-line flag.
2017-01-30 05:41:49 -07:00
Matthew Flatt
2cf6691439 expose read capabilities of string->number
Extend the `string->number` parser for use by readers, which need
error messages and/or extflonum results.
2017-01-13 08:09:19 -08:00
Matthew Flatt
08ca76b741 extend {read,peek}-char-or-special
Support an external implementation of `read-syntax` by exposing
functionality that is currently internal to `read-syntax`: a srcloc
argument to a "special"-producing port function and wrapping special
results to reliably distinguish them from characters.
2017-01-13 08:09:18 -08:00
Alex Knauth
286e5bebed doc: switch "A is the result of B" to make more sense 2017-01-10 22:03:30 -06:00
Royall Spence
e331ae75a6 Fix typo in struct section
Change "must to be allocated" to "must be allocated"
2017-01-10 13:02:21 -06:00
Matthew Flatt
6bb4f2ecad update docs to clarify handling of paths in syntax object srclocs 2017-01-08 07:14:28 -06:00
Robby Findler
c9100a98c5 adjust scribbling style guide for new location
(and a few other minor tweaks)
2017-01-06 11:58:39 -06:00
Robby Findler
7d70c4cc6e add dictat about predicates as nouns 2017-01-06 11:58:19 -06:00
Matthew Flatt
3fca7273c3 "Mac OS X" -> "Mac OS" 2017-01-06 11:53:38 -06:00
Matthew Flatt
527c458940 clarifications and additions to style guide
original commit: c5f821b641
2017-01-06 11:53:36 -06:00
Eli Barzilay
daad01ed97 Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)

original commit: debd1f9f1e
2017-01-06 11:53:36 -06:00
Matthew Flatt
04ec4d604e "under <platform>" -> "on <platform>"; "X" -> "Unix"
I originally picked "under" as the preposition to go before
 a platform name, but obviously you should build "on" a
 platform, and "under" suddenly annoys me. The choice of "on"
 is now codified in the documentation style guide. Meanwhile,
 "Unix" insted of "X" seems more clear and consistent in the
 `racket/gui' docs.

 More usefully, this patch also fixes a few out-of-date
 platform-specific claims.

original commit: f34a31cac9
2017-01-06 11:53:36 -06:00
Matthew Flatt
f3dab045a8 a round of doc corrections from Gwyth
original commit: 0b496d5275
2017-01-06 11:53:36 -06:00
Matthew Flatt
fddf8ffbcc style guide: use v' for "any value" (as opposed to x')
original commit: 6a34dce36d
2017-01-06 11:53:36 -06:00
Matthew Flatt
75031de6d5 more Scribble "---" doc fixes
original commit: 78b54a7324
2017-01-06 11:53:36 -06:00
Matthew Flatt
1342bef4c4 new guidance in the documentation style guide
original commit: c1bf118cb5
2017-01-06 11:53:36 -06:00
Matthew Flatt
a4012e0b2d fix uses of `scheme' in the Scribble style guide
Closes PR 10999
 Merge to 5.0.1

original commit: 4bd97ae80e
2017-01-06 11:53:36 -06:00
Eli Barzilay
5a9ff6a044 scribble fixes -- nested @scheme and a few other similar problems
svn: r10744

original commit: 4cd2614c21
2017-01-06 11:53:36 -06:00
Matthew Flatt
56918ad2f2 put ... and ...+ in defproc grammar
svn: r9502

original commit: aceb620344
2017-01-06 11:53:36 -06:00
Matthew Flatt
10d48bf427 hierlist docs; fix latex/pdf output when a paragraph starts with n hspace
svn: r9276

original commit: 02fbaca2b7
2017-01-06 11:53:35 -06:00
Eli Barzilay
c2cdfd6e3b scribble/text documentation, and a few other fixes and comments
svn: r8821

original commit: 1e32dbd324
2017-01-06 11:53:35 -06:00
Eli Barzilay
9e38074a60 add #:indent to verbatim
svn: r8707

original commit: 6f0ce91461
2017-01-06 11:53:35 -06:00
Eli Barzilay
abfc979098 use @verbatim{...}
svn: r8699

original commit: 9c77909710
2017-01-06 11:53:35 -06:00
John Clements
e7f87cc3af Capitalize the first word.
svn: r8674

original commit: f0ddaaab92
2017-01-06 11:53:35 -06:00
Matthew Flatt
79f81a5bb7 scribbled dynext (from Will Farr)
svn: r8450

original commit: 987b9e7681
2017-01-06 11:53:35 -06:00
Matthew Flatt
ea534e55c0 expand Scribble-layers overview
svn: r8241

original commit: 4ba06b7ae0
2017-01-06 11:53:35 -06:00
Matthew Flatt
7c87184951 finish first draft of HtDP language docs
svn: r8179

original commit: d4482c90ca
2017-01-06 11:53:35 -06:00
Matthew Flatt
36f60d78e9 document mz/mr command-line arguments
svn: r8047

original commit: 058d8dc77e
2017-01-06 11:53:35 -06:00
Matthew Flatt
9e7ff2c5c4 doc tweaks
svn: r8043

original commit: ec3f79cf47
2017-01-06 11:53:35 -06:00
Matthew Flatt
8a88b9a7fa revised mzlib/sandbox in scheme/sandbox
svn: r7965

original commit: 622cd0554d
2017-01-06 11:53:35 -06:00
Matthew Flatt
c241e40b74 simple bibliography support in Scribble
svn: r7929

original commit: 8e68038c83
2017-01-06 11:53:35 -06:00
Matthew Flatt
fd16dfa02d v3.99.0.2
svn: r7706

original commit: 39cedb62ed
2017-01-06 11:53:34 -06:00
Matthew Flatt
d7dbdc7334 371.2
svn: r7263

original commit: e4cbc4e6a9
2017-01-06 11:53:34 -06:00
Matthew Flatt
ad2000038f catch up scribble reference
svn: r7051

original commit: 1b6483bc36
2017-01-06 11:53:34 -06:00
Robby Findler
b52983f52f remove the scribble portion of the style guide in preparation for bringing back its history 2017-01-06 11:53:06 -06:00
Robby Findler
e743275c85 add the scribbling style guide 2017-01-05 17:56:59 -06:00
Robby Findler
5f5fc0935d improve the style of the style guide
and:
 - add a link to the indenting #lang docs in DrRacket
 - change the title to be clear it is a style guide
2017-01-05 15:45:17 -06:00
Robby Findler
67da8dbaf0 add a tech link for "path or string" 2017-01-04 09:18:54 -06:00
Robby Findler
abc061aae1 style tweaks, following the style guide 2017-01-04 09:18:54 -06:00
Alexis King
597661fa4e Make range from racket/list act like in-range when used with for 2017-01-03 15:26:42 -08:00
Ben Greenman
88b2d5d4e6 document raco/all-tools, fix typos in raco documentation 2017-01-03 14:19:02 -05:00
Robby Findler
efb96c97b5 add #:name-for-blame to define-module-boundary-contract 2017-01-03 07:10:30 -06:00
Matthew Butterick
fc194d7337 update copyright year to 2017 2017-01-02 06:42:31 -07:00
Robby Findler
c4926b5684 clarify the purpose of the (bad) match expander example
closes #1553
2016-12-30 08:51:00 -06:00
Reid D McKenzie
f039a4c571 Typo - "describes" should be "described" 2016-12-27 16:57:19 -05:00
Matthew Flatt
710320e3dc "Mac OS X" -> "Mac OS"
Although "macOS" is the correct name for Apple's current desktop OS,
we've decided to go with "Mac OS" to cover all of Apple's Unix-like
desktop OS versions. The label "Mac OS" is more readable, clear in
context (i.e., unlikely to be confused with the Mac OSes that
proceeded Mac OS X), and as likely to match Apple's future OS names
as anything.
2016-12-23 12:18:36 -07:00
Matthew Flatt
769ca13b35 update "Racket Documentation" app icon to match new logo
Icon by Matthew Butterick
2016-12-23 11:29:03 -07:00
Matthew Flatt
00171a3c2c file/[un]tar: support for long paths
Implement POSIX.1-2001/pax and GNU extensions for long paths and links
in `untar` and `tar`. Add a `#:format` argument to `tar` to select
among POSIX.1-2001/pax, GNU, or error encoding for long paths.
2016-12-21 16:00:12 -07:00
Robby Findler
deaf48ae30 add #:use-wrapper-proc to racket/surrogate 2016-12-21 15:12:15 -06:00
Robby Findler
3e191fef04 misc small improvements to racket/surrogate
(generate less code in macro, add some basic test cases,
 small improvement to syntax errors, and small docs clarification)
2016-12-21 12:35:59 -06:00
Robby Findler
02a267fdb2 clarify that futures don't run in parallel with errortrace 2016-12-21 12:35:59 -06:00
shhyou
498f1795db Change the wording of the documentation for impersonate-procedure with wrapper-proc being #f 2016-12-20 08:47:29 -06:00
shhyou
3b6eda5f7d Remove the documentation mentioning chaperon-procedure*? 2016-12-19 23:40:25 +08:00
Robby Findler
23226d4290 clarify docs for unsupplied-arg in ->i
related to #1539
2016-12-17 09:10:17 -06:00
Matthew Flatt
d7b18e7a9c adjust map and for ... in-list to not retain their lists
Adjust list and stream handling as sequences so that during the body

 (for ([i (in-list l)])
   ....)

then `i` and its cons cell in `l` are not implicitly retained while
the body is evaluated. A `for .... in-stream` similarly avoids
retaining the stream whose head is being used in the loop body.

The `map`, `for-each`, `andmap`, and `ormap` functions are similarly
updated.

The `make-do-sequence` protocol allows an optional extra result so
that new sequence types could have the same properties. It's not clear
that using `make-do-sequence` is any more useful than creating the new
sequence as a stream, but it was easier to expose the new
functionality than to hide it.

Making this work required a repair to the optimizer, which would
incorrectly move an `if` expression in a way that could affect
space complexity, as well as a few repairs to the run-time system
(especially in the vicinity of the built-in `map`, which we should
just get rid of eventually, anyway).
2016-12-13 19:20:41 -07:00
Ben Greenman
8de6f581f3 doc: fix types in regexp constructors
- change return types of `pregexp` etc. to use the right predicate
- change input of `byte-regexp` and `byte-pregexp` from `string?` to `bytes?`
2016-12-13 01:43:43 -05:00
Alexis King
62170e6218 Add index(es)-of and index(es)-where to racket/list 2016-12-10 13:01:12 -08:00
Robby Findler
31ca626910 document a default 2016-11-25 09:17:28 -06:00
Sam Tobin-Hochstadt
34fdd2863a Avoid traversing immutable vectors when specified.
This adds #:eager as an option for controlling this behavior.

Using `#:eager 10` is a 2x improvement in performance for configuration 010001
of the suffixtree benchmark from Takikawa et al, POPL 2016.

The default behavior is unchanged. This is configurable because some
programs are much faster when eager checking is performed. For example:

(require racket/contract)
(collect-garbage)
(time (for/sum ([_ 100000])
        (vector-ref (contract (vectorof integer? #:eager #t) #(1) 'pos 'neg)
                    0)))
(collect-garbage)

(time (for/sum ([_ 100000])
        (vector-ref (contract (vectorof integer? #:eager #f) #(1) 'pos 'neg)
                    0)))

The second loop is 3-4 times slower than the first. However, making
the vector much larger will make the difference go the other way.
2016-11-22 11:28:30 -05:00
Robby Findler
09c1174f7e add the #:extra-delay argument to recursive-contract 2016-11-19 15:56:18 -06:00
Leif Andersen
1582178982 Add example for dict-implements/c 2016-11-15 08:29:51 -05:00
Vincent St-Amour
81cd3622d3 Update docs to reflect xrepl being enable by default. 2016-11-08 08:58:21 -06:00
Alexis King
2030c0b0ae Add a missing for-label require to the file/glob docs 2016-10-25 10:22:41 -07:00
Robby Findler
1b834d010a fix wrong name in docs 2016-10-23 22:54:46 -05:00
Matthew Flatt
4ce947da74 update pkg FAQ on the package build service's catalog 2016-10-23 10:43:02 -06:00
Georges Dupéron
153dc01ccd Some small fixes to the documentation
* Wrong contract for syntax-local-value in the documentation.
* Clarified signature in documentation for expand-import, expand-export and pre-expand-export
* Corrected typo in documentation for "for".
* Fixed error message for function which seems to have been renamed in the docs
* Fixed typo in a comment in the tests
* Fixed a typo in the documentation for set-subtract.
* Use double ellipses for the free-id-table-set*, free-id-table-set*!, bound-id-table-set* and bound-id-table-set*! operations
2016-10-19 20:52:45 -05:00
Matthew Flatt
ddf6985020 fix docs on PLT_COMPILED_FILE_CHECK
Merge to v6.7
2016-10-15 07:28:52 -06:00
Matthew Flatt
ff7f1ce9ff update "More" now that xrepl is on by default
Merge to v6.7
2016-10-15 07:28:43 -06:00
Vincent St-Amour
ecadde3a65 Add #:logger keyword argument to with-intercepted-logging.
Closes #1486.
2016-10-11 11:50:33 -05:00
Stephen Chang
58d9b3eb19 add doc example for make-provide-pre-transformer 2016-10-11 11:40:13 -04:00
Vincent St-Amour
241d87c011 Avoid tech collision.
Closes #1484.
2016-10-09 10:54:53 -05:00
Vincent St-Amour
d597983bb9 Make pkg git credential format extensible.
Thanks to Eli.
2016-10-07 14:17:31 -05:00
Alexis King
d9750064b9 Merge pull request #1472 from lexi-lambda/pkg-git-credentials
Add support for git-backed packages that require authentication
2016-10-06 18:24:24 -07:00