Commit Graph

39966 Commits

Author SHA1 Message Date
bdeket
eea771ea64 improve accuracy of tanh function (#2565)
improve accuracy of tanh function

using the implementation of https://www.math.utah.edu/~beebe/software/ieee/tanh.pdf

by changing from (/ (- 1 exp2z) (+ 1 exp2z)) to (- 1 (/ 2 (+ 1 exp2z)) the accuracy after rounding is increased (I was comparing with bftanh) and removes the fluctuations around z=18.35
using the polynomial for z ϵ(1.290e-8 to 0.549) seems to increase the accuracy after rounding even further
see comparison: http://pasterack.org/pastes/48436

especially the fact that  (< (tanh 18.36)(tanh 18.37)) ;=> #t was tripping me up
the two extra conditions (z . < . 1.29e-8) and (z . < . 0.549) are optional to solve this
2019-03-28 05:36:18 -06:00
Matthew Flatt
82d5b46819 ELF tools: don't treat non-allocated section as allocated
For example, don't fail in shifting file offsets by misinterpreting an
unallocated section's null address as requiring a shift of virtual
addresses.
2019-03-27 15:07:08 -06:00
Paulo Matos
a4704f861c Clarify how string-split separates the input 2019-03-27 08:26:33 -06:00
Matthew Butterick
16a6542735 emphasize that fixnums can be compared with eq? (#2562) 2019-03-27 08:22:16 -06:00
Matthew Flatt
db677018d0 remove unused debugging code
Closes #2564
2019-03-27 08:19:29 -06:00
Ryan Culpepper
0502e537d7 syntax/parse: update fix #1452
- Propagate disappeared uses from any pattern stx, not only those
  attached to forms that themselves have a disappearing use.
- Fix for new local-apply-transformer handling of scopes.
2019-03-26 18:30:43 +01:00
Ryan Culpepper
6c3031a5f7 add optional intro? argument to record-disappeared-uses 2019-03-26 18:30:43 +01:00
Georges Dupéron
85fe092ed9 Fixes #1452 syntax-parse discards the 'disappeared-uses property added by pattern-expanders 2019-03-26 18:30:43 +01:00
Georges Dupéron
c618ec803a Merge pull request #1691 from jsmaniac/syntax-parse-regexp
Adds built-in syntax classes which match regular expressions
2019-03-26 17:20:10 +01:00
Ryan Culpepper
22a9b0cf35 syntax/parse: fix spurious description for eh-alt-set
closes #2551
2019-03-26 16:58:46 +01:00
Ryan Culpepper
076621558e syntax/parse: document that define-eh-alternative-set does not delimit cuts
closes #2552
2019-03-26 16:44:02 +01:00
Alexis King
db3c1d4cb9 units: Avoid use-before-initialization errors in signature contracts
This commit fixes an issue with the fix for contracted bindings in
signatures implemented in commit 5fb75e9f82. While the previous fix
worked in simple cases, it introduced a problem: although signatures
that define contracted bindings were able to refer to other bindings
in the signature in the binding contracts, but anyone doing so was
at the mercy of the exporting unit’s definition order. For example,
given a signature

  (define-signature a^
    [(contracted
      [ctc contract?]
      [val ctc])])

then a unit exporting the signature would cause a
use-before-initialization error if its definition for val appeared above
its definition for ctc.

This limitation did not exist in the units implementation prior to the
introduction of the sets-of-scopes expander in Racket v6.3 (after which
contracted bindings were broken until the aforementioned fix in Racket
v7.2). However, the fact that they worked at all seems semi-accidental:
instead of properly indirecting references to signature bindings within
binding contracts, the contract expressions were simply placed in a
context in which the existing names were bound. However, this meant that
any export that renamed identifiers could cause problems, which the
implementation strategy taken in this commit handles just fine.
2019-03-25 13:58:51 -05:00
Lassi Kortela
1600bc5dc6 file/untar: allow leading as well as trailing blanks (#2553)
Some really old tar files can have both leading and trailing
blanks (nul/space characters) in the same octal number field in the
header.
2019-03-24 18:33:52 -06:00
Robby Findler
683492f6fe allow some redirections in the url that looks for the new version 2019-03-24 19:21:07 -05:00
Matthew Flatt
70e0cac062 compiler/cm: fix ".zo" file locking in -MCR mode 2019-03-23 14:47:36 -06:00
Matthew Flatt
3127b324c4 cs: more attempts to fix Chez Scheme submodule update
When `#:extra-repo-dir` is used in a site configuration, the
extra repos need to have a "master" branch to enable updates.
2019-03-23 10:40:59 -06:00
Matthew Flatt
32330c1327 cs: another fix for Windows build repo update 2019-03-22 20:35:47 -06:00
Matthew Flatt
0736898ccd cs: fix Windows build repo update
repair for 66efceee0e
2019-03-22 17:36:16 -06:00
Matthew Flatt
0fc4f69d1e cs: add needed header space for Mac OS executables 2019-03-22 11:55:24 -06:00
Matthew Flatt
66efceee0e cs: fix Windows script for updating Chez Scheme checkout 2019-03-22 08:41:08 -06:00
Matthew Flatt
e34dbdc4f4 defend against bad hash type in bytecode
The change to make `#hash()`, etc., unique made it easy for the fuzz
tester to crash the bytecode reader.
2019-03-22 07:34:36 -06:00
Matthew Flatt
3501fce192 expander: syntax-make-delta-introducer and mpi shifts
When the result of `syntax-make-delta-introducer` adds scopes,
it needs to carry along any shifts that might be relevant.

The new implementation risks adding lots of redundant shifts. In this
case, it might be worth spending extra effort at shift-transfer time
to check whether the shift is redundant.

Closes #2542
2019-03-22 07:18:06 -06:00
Matthew Flatt
7332060b69 raco make: fix parallel-build prefetch for relative submodule paths
Closes #2543
2019-03-21 18:58:20 -06:00
Matthew Flatt
0020332810 raco demod: discard unusable macro implementations
Prune away "phase -1" macro registrations, because they're useless,
and because the expander's evaluation of linklets now actively rejects
them.
2019-03-21 18:12:49 -06:00
Matthew Flatt
4a26420b14 update "INSTALL.txt" to explain the describe-clients target 2019-03-21 10:40:31 -06:00
Matthew Flatt
ccf8c525fa makefile: add describe-clients target
The `describe-clients` target is a debugging aid for viewing
distro-build site configurations.
2019-03-21 10:12:24 -06:00
Matthew Flatt
1fb8e744dd makefile: build distro packages as machine-independent by default 2019-03-21 07:52:48 -06:00
Matthew Flatt
0be2178f0e cs: fix build of cross-compile racket 2019-03-21 07:52:48 -06:00
Matthew Flatt
d0a98cb42a cs: update for LZ4 compression 2019-03-21 07:52:48 -06:00
Alexis King
8910ff0a39 units: Fix mistake in 86bb85931d that could cause compile-time failures
Specifically, if a contracted binding was applied as a function inside
another contract, it would lead to a syntax error.
2019-03-19 14:24:41 -05:00
AlexKnauth
b471b18876 document procedure behavior of make-variable-like-transformer 2019-03-19 15:43:04 +01:00
AlexKnauth
780647f0eb return a procedure from make-variable-like-transformer
So that make-variable-like-transformer produces a value that passes both procedure? and set!-transformer?
2019-03-19 15:43:04 +01:00
Paulo Matos
1efe1ebbf1 Revert "Fix typo"
This reverts commit 9a731f45f9.

Not a typo as pointed out in 9a731f45f9 (commitcomment-32813840)
2019-03-19 08:38:33 +01:00
Paulo Matos
9a731f45f9
Fix typo
s/intensionally/intentionally
2019-03-18 23:52:32 +01:00
Matthew Flatt
201015a4b6 cs: avoid uppercase in Windows header and library references 2019-03-18 13:10:43 -06:00
Matthew Flatt
f94fba12da struct: disallow #:extra-name with #:omit-define-syntaxes 2019-03-17 06:54:55 -06:00
Robby Findler
ed2381ee59 when collapsing use contract-stronger only on trustworthy contracts 2019-03-17 07:04:23 -05:00
Ben Greenman
a2d87c353e typo: rename 'provide/contract-struct-expandsion-info-id' 2019-03-16 17:11:55 -04:00
Robby Findler
ce324be9f8 adjust contract-out to use fresh scopes for mangled identifiers
closes #2469
2019-03-15 22:13:10 -05:00
Ben Greenman
397be50113
doc: new names for arguments to 'error' (#2525)
rename the arguments to error in the 2 and 3+ arguments cases to be more
descriptive and to avoid confusion between 'src' and 'srcloc's
2019-03-15 20:44:20 -04:00
Marc
eac9208f3f Correct path, and add link to path
Fixes #2520.
2019-03-15 08:33:49 -06:00
Paulo Matos
dee62018b1 Add armv7l support (rpi) 2019-03-15 09:14:57 +01:00
Paulo Matos
0c49b15b6a Add testing on a raspberrypi 2019-03-15 08:49:57 +01:00
Gustavo Massaccesi
ab1458f5bb fix typo in syntax-binding-set docs 2019-03-14 20:29:13 -03:00
yjqww6
01222bb93c fix docs 2019-03-14 20:27:33 -03:00
Paulo Matos
c292c61da6 Fix pipeline by passing llvm and qemu using artifacts 2019-03-14 17:58:59 +01:00
Matthew Flatt
b6a7f7bc38 expander: keep reference that is needed after all
Part of e7744efb7d triggered a test failure (that I missed by somehow
running tests incorrectly). It turns out that phase -1 transformer
bindings can be used in phase-0 code via shifting.

This change does not effect the repair for building with
machine-independent bytecode.
2019-03-14 07:39:20 -06:00
Matthew Flatt
e7744efb7d expander: avoid unneeded namespace reference
This change avoids the stair-step effect that is depicted in the
"current Racket -M" build plot from the January 2019 blog post about
Racket on Chez Scheme.

The stair step in that plot is a result of a combination of effects,
but one key part is that the `.set-transformer!` linklet import (to
support macro definitions) has a reference back to the namespace.
While `.set-transformer!` normally would not be captured in any
closure, `db/private/generic/prepared` creates a thread that causes
the "prefix" part of a closure to be moved to a thread's runstack
before it can be pruned by the GC. The stair-step problem happens only
when running directly from machine-independent form, because that form
is recompiled in a way that doesn't optimize away the unused
`.set-transformer!` import. The change in this commit avoids a
reference to the namespace in some cases where it will not be useful,
which turns out to be sufficient to address the build problem.

A more complete repair would be to change the compiler to pair a
closure prefix on the runstack with a liveness mask. An even more
complete repair is to switch to Racket CS. Racket CS is immune to the
problem, even when running from machine-independent bytecode, because
its closures do not keep extra references (with the tradeoff that
there's less sharing).
2019-03-14 06:37:23 -06:00
Matthias Felleisen
077a11c84f
remove reference to Scheme Cookbook
This citation was too scholarly anyways for our Guideline. [[ The code could have been from anybody's library. ]]
2019-03-13 15:15:25 -04:00
Matthew Flatt
0257b5cf71 raco pkg: fix --source mode for some installations
Some package installation modes did not support `--source`
and similar strip modes on an intermediate directory.
2019-03-13 12:38:09 -06:00