Commit Graph

38051 Commits

Author SHA1 Message Date
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
Matthew Flatt
41e3deab97 racket/cmdline: fix table filtering when #:ps is used 2017-03-24 17:28:22 -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
Gustavo Massaccesi
cf22b1bc7d add test for ormap 2017-03-24 17:09:17 -06:00
Alex Knauth
7163c6ad98 generics: optional scope argument for private macros (#1644)
* generics: optional scope arg for private macros

To make them more friendly to macros that expand to generics

* add tests for generic-method-table macro
2017-03-24 15:52:44 -07:00
Matthew Flatt
8da0be8031 fix relative references for license and acks in installer build
The process of creating an installer involves building "racket-index"
in user scope, but the license and acks files are normally only in
installation scope. An explicit targeting of the installation-scope
output needs to be disabled when the documentats are rendered to
user scope.

Closes #1635
2017-03-24 16:02:23 -06:00
Matthew Flatt
a49bd5dc00 fix config spec for installer build
This typo likely doesn't affect anything right now, but it
might one day.
2017-03-24 15:40:56 -06:00
Gustavo Massaccesi
409321c03b raco: show all the matching commands for an ambiguous prefix 2017-03-24 13:16:36 -06:00
Matthew Flatt
056041bd07 document current-command-line-arguments encoding
Closes #1641
2017-03-22 12:26:02 -06:00
Matthew Flatt
424906af0a ffi/com: fix unsigned-int test
Closes #1633
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
Robby Findler
9b987800fb adjust things so that integer-in contracts can have other names 2017-03-08 09:31:33 -06:00
Ingo Blechschmidt
4107ee7ea0 fix tiny typo (#1630) 2017-03-07 22:20:56 -05:00
Robby Findler
f5c5db3b3d fix a bug in recent and/c improvements and add proper printing for integer-in 2017-03-07 20:40:26 -06: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
3a639d7794 improve interaction between natural?, exact-positive-integer?, exact-integer?,
and/c, and between/c (which implies <=/c and >=/c) so that they turn
themselves into integer-in when appropriate

for example, (contract-stronger? (integer-in 0 4) (and/c natural? (<=/c 4)))
returns #t
2017-03-07 16:38:35 -06:00
Robby Findler
87e024d55c allow #f as arguments to integer-in 2017-03-07 16:27:18 -06:00
Robby Findler
7c3412957a add the same fast path to contract? and chaperone-contract? that is already in flat-contract? 2017-03-07 16:27:18 -06:00
Robby Findler
36368628af adjust -> expansion to make it more friendly to possible inlining 2017-03-07 16:27:17 -06:00
Benjamin Greenman
6e746891ef clarify error message for take and drop (#1582) 2017-03-06 18:45:09 -05: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
dbddb3785e add natural? to the known predicates with generators 2017-03-05 21:35:20 -06:00
Robby Findler
7bd7ec5aaf remove spurious } 2017-03-05 21:35:20 -06:00
Leif Andersen
1cbd75436b Eta expand natural?
Doing this eta expansion has the advantage that error messages
will point to `natural?` rather than `exact-nonnegative-integer?`
2017-03-03 09:58:19 -05: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
c7df5f4150 And add tests 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
Leif Andersen
c911e4b52d Add the following predicates to racket/math:
- positive-integer?
- negative-integer?
- nonpositive-integer?
- nonnegative-integer?

These are like their exact-* counterparts provided by racket/base,
but they work for inexact numbers, and not just exact ones.
2017-03-02 19:24:12 -05:00
Matthew Flatt
d08a4cddfb fix stack-overflow handing lin the compiler's letrec-check pass
Closes #1621
2017-02-27 09:43:59 -07:00
Matthew Flatt
f19d655cbc fix optimizer bug related to single-use functions
Fix problem with once-use tracking and delayed variable-use marking
that is performed for local function bodies. A delayed variable-use
registration might happen after a once-used variable is replaced by
its use.

This scenario is difficult to provoke, because the optimizer has to
first decide not to move a once-use function, and in a latter pass
decide to move it after all. There's not enough information to
retract the tentative use plus its transitive implications.

The solution is to avoid the generic once-use layer for `lambda` forms
whose uses are delayed (and that likely has a good effect on inlining
anyway). The other half of the solution is to avoid transitive use
marking on a once-used variable whose expression has been moved (and
there are no transitive things to skip, because that expression isn't
a `lambda` form).
2017-02-26 08:58:36 -07:00
Matthew Flatt
a7ac75f15d use RTLD_LOCAL when loading extensions on Mac OS
It appears that Mac OS wants `RTLD_LOCAL` in the dlopen() call,
otherwise dlsym() searches through all previously open shared objects
– even though dlopen() is given a specific library handle.
2017-02-25 13:57:48 -07:00
Matthew Flatt
3c563484c6 fix memory-management bug in struct->vector
Closes PR 15410
2017-02-25 08:32:08 -07:00
Matthew Flatt
481dc9b0e8 fix port line, col, and pos to stay at #f when set to #f 2017-02-23 19:56:21 -07:00
Matthew Flatt
39b2a61700 fix mutability checking in impersonator-struct
Thanks to Scott Moore for the repair.
2017-02-23 19:56:21 -07: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