Commit Graph

31768 Commits

Author SHA1 Message Date
Burke Fetscher
04c8aa7722 make path agnostic 2014-02-17 14:57:55 -06:00
Asumu Takikawa
18adcb5b04 Improve type inference for ListDots
This provides better inference for the case when trying
to infer a ListDots in a negative position against a List
type. For example, when trying to apply `time-apply`.
2014-02-16 11:35:55 -05:00
Matthew Flatt
5ada90bfd2 raco setup: fix the way that "stamp" is compiled for avoided files
Instead of claiing "beginning of time" and an empty SHA1, use
`file-stamp-in-paths` to get a proper stamp.

This fixes a problem when installing built packages into user scope
where the built packages refers to an installation-scope library
and SHA1s need to be checked to fix up file timestamps.
2014-02-15 14:45:14 -07:00
Matthew Flatt
7b4ea16bc0 setup/dirs: fix get-apps-dir
Affects the location of ".desktop" file installation, especially in
a Unix-style installation.
2014-02-15 09:38:25 -07:00
Matthew Flatt
576c3885cf fix typo in reference 2014-02-15 09:38:24 -07:00
Asumu Takikawa
bf47523ac9 Fix TR regression and use abstraction recipe
A function like (lambda (x) (lambda (y) y)) would cause TR
to fail in an internal metafunction. The fault was triggered
when the object y is abstracted to (0 0) and then the outer
lambda tries to abstract (0 0) and fails.

The problem was triggered by the new path index changes in
v6.0 because TR did not previously try to abstract objects
that occurs in the target type (now necessary for scope
lifting of path indices), which may contain non-identifier
objects.

This error didn't occur in another nearly identical (except
for one crucial identifier? check) code path, so this commit
also eliminates the duplication by abstracting.
2014-02-15 00:14:47 -05:00
Robby Findler
2e06761531 fix error message 2014-02-14 23:03:00 -06:00
Robby Findler
fff72a21ff clarify object=? 2014-02-14 23:03:00 -06:00
Robby Findler
73bbabe7d4 adjust error message for impersonate-struct to match its actual contract 2014-02-14 23:02:59 -06:00
Asumu Takikawa
d32e0eda7c Update TR doc pkg dependencies 2014-02-14 19:15:42 -05:00
Neil Toronto
30bf673a0f Fixed some problems with 2D plots not rendering due to +nan.0 and +inf.0
The "view" coordinate system for 2D plots used to be the same as the
"plot" coordinate system, except possibly stretched in a way that
preserved endpoints. When the endpoints were close to extreme flonum
values like +min.0 or +max.0, and the 2D plot area determined that
there were enough floating-point numbers within the plot bounds to do
fast floating-point arithmetic without losing visual fidelity, some of
that arithmetic could overflow. Then +inf.0 and +nan.0 values would
passed to `set-clipping-rect', which would promptly throw up, as it
should.

Solution: like the 3D plot area, use a normalized view coordinate
system. Now stretched plot coordinates are translated and scaled to
[0,1]x[0,1], for which floating-point arithmetic won't overflow.
2014-02-14 16:45:41 -07:00
Neil Toronto
b92b6c8337 Sanitized `density' bandwidth calculation for very dense data sets
Now, for example, (plot (density '(0))) works.

Calculated bandwidth is now bounded by both 1e-308, below which
`kde' produces nonsense, and 1e-14 * max absolute value. The latter
bound ensures the bandwidth is wide enough to make a smooth-looking
curve even in the presence of floating-point rounding in the domain,
by ensuring that at least 100 floating-point numbers or so in the
domain get nonzero density.

It's a little weird to use the gap between floating-point numbers
for this, but it ensures density estimates aren't jagged because
of rounding (at least until you zoom in, in some instances), and
it's at least a decent method of estimating bandwidth for single-
sample density estimators.
2014-02-14 16:45:41 -07:00
Neil Toronto
9a6cdf420b Updated types for density' and kde' 2014-02-14 16:45:41 -07:00
Neil Toronto
db05e20980 Added support for weighted samples in density' and kde'
Also improved window width estimate
2014-02-14 16:45:41 -07:00
Asumu Takikawa
6fd39d78d7 Add a top blurb to the TR Reference 2014-02-14 17:33:02 -05:00
Asumu Takikawa
a9b09f2910 Add a TR Guide section about ->* and optional args 2014-02-14 17:24:23 -05:00
Asumu Takikawa
1c5f6714a8 Use prefix -> in the TR Guide examples
Also some minor fixes like using the more common
case-> form rather than case-lambda.
2014-02-14 17:12:36 -05:00
Asumu Takikawa
f59a122841 Add diagrams from Vincent's PADL paper to TR docs 2014-02-14 16:38:31 -05:00
Burke Fetscher
de896c87bd move delim-cont tests into a separate file 2014-02-13 23:30:18 -06:00
Matthew Flatt
47d913b451 racket/draw: fix serializaiton of bitmap drawing in record-dc%
Closes PR 14349
2014-02-13 15:23:09 -07:00
Burke Fetscher
70f484ba77 add missing redex-examples dependencies 2014-02-13 12:34:29 -06:00
Asumu Takikawa
6ad1af3741 Reorganize documentation for -> form in TR
Put examples next to relevant prose, add more examples,
and add more cross-references.
2014-02-13 13:21:02 -05:00
Burke Fetscher
86bca7b6e7 remove unnecessary file 2014-02-13 12:08:24 -06:00
Burke Fetscher
309bb3ae74 remove missing require 2014-02-13 12:05:29 -06:00
Asumu Takikawa
4b580a8b8d Fix TR reference typo 2014-02-13 01:34:51 -05:00
Asumu Takikawa
277051fcf1 Document the new prefix function type constructors 2014-02-13 01:20:10 -05:00
Asumu Takikawa
72c9de99e0 Adjust printing of -> and ->*
Use prefix printing in all cases, and add indentation
rules for pretty printing
2014-02-13 01:20:06 -05:00
Asumu Takikawa
36524740c8 Improve error messages from : annotation form
Emit errors in terms of the original user-supplied syntax,
not the helper macro syntax
2014-02-13 00:23:01 -05:00
Asumu Takikawa
8e8df77fc4 Apply All's rules for parentheses omission for : 2014-02-13 00:23:01 -05:00
Asumu Takikawa
7bb537fc82 Do not allow parentheses omission for prefix ->
Also fix multiple -> detection, which was broken
2014-02-13 00:23:01 -05:00
Asumu Takikawa
6ec287f9f6 Use syntax classes to parse ->* type constructors 2014-02-13 00:22:59 -05:00
Asumu Takikawa
54f72050a6 Print ->* style types with ->* constructor
This recognizes the type for a function like
`regexp-match?` and will print it concisely.
2014-02-13 00:22:24 -05:00
Asumu Takikawa
97fe6b82b4 Lift out partition-kws function into util module 2014-02-13 00:20:53 -05:00
Asumu Takikawa
40bf3ad243 Abstract out function that checks ->* style types 2014-02-13 00:20:53 -05:00
Asumu Takikawa
02dd958a69 Add ->* type constructor for optional arguments 2014-02-13 00:20:47 -05:00
Asumu Takikawa
7dc5143f14 Allow prefix function arrow type
Also fix a regression that made arrow type
parsing more permissive than desired due to
missing colon^s
2014-02-13 00:15:35 -05:00
Matthew Flatt
c64142ce24 typos and notes
Thanks to Eli.
2014-02-12 18:47:04 -07:00
Burke Fetscher
ff96904f93 Add the random generation bechmark.
For now it's in the examples directory.
2014-02-12 18:42:48 -06:00
Robby Findler
0c73784c3c more unexpected strange things broke, so disable new class/c yet again
No joy in mudville. See
http://drdr.racket-lang.org/28175/ for details

Also fix (just introduced) infinite loop in class/c contract-name
implementation and tweak naming stuff a little so tests pass
2014-02-12 11:06:05 -06:00
Robby Findler
c07141408f track test case names to help find infinite loops 2014-02-12 11:01:43 -06:00
Robby Findler
53d30648f9 fix class/c contract-name implementation
specifically, fix the case where a field doesn't have
a contract, but just has to exist
2014-02-12 10:15:49 -06:00
Robby Findler
83eab4158a remove dead code
and shrink dependencies correspondingly
2014-02-12 10:10:26 -06:00
Robby Findler
59f57b1bd1 Improvement and bug fixes to the new class/c; try again to re-enable it
Fixed:
- class-field-accessor and class-field mutator,
- the interaction between init args contracts and subclasses,
- object=? on wrapped objects (ie if 'this' flows out and
  is compared to the object thatn 'new' returns)
- contract-name for class/c

Also, the code now uses impersonator properties internally to track a
class that is wrapped (instead of a wrapper struct).  This simplifies
a bunch of places in the code and paves the way for classes that have
a class/c contract to be chapeone-of the original class (altho that
doesn't work yet)
2014-02-12 06:43:23 -06:00
Vincent St-Amour
6c08632f35 Fix TR optimizer test. 2014-02-11 14:06:21 -05:00
Vincent St-Amour
1e591a5124 Make flvectors and fxvectors subtypes of sequences. 2014-02-11 14:06:21 -05:00
Matthew Flatt
9ca0aa5225 scribble/manual: delay expressions that require collection-based files
This changed make `(require scribble/manual)` work in an executable,
although actually rendering documents requires the "scribble"
collection.
2014-02-11 10:07:03 -07:00
Vincent St-Amour
e2254414d2 Simplify types for flvector and fxvector operations. 2014-02-11 10:28:50 -05:00
Vincent St-Amour
8e32e6e44c Make flvectors and fxvectors sequences. 2014-02-11 10:27:33 -05:00
Matthew Flatt
2f469a06cd scribble/html: add 'index flag in url-roots
This flag can be used to make "file://..."-rendered pages easier
to inspect.
2014-02-11 05:50:04 -07:00
Matthew Flatt
964e9d128f scribble/text: fix contract and docs on with-writer 2014-02-11 05:50:04 -07:00