John Benediktsson
db60f6e8c9
sequences: adding a test for map-reduce.
2012-04-16 17:52:21 -07:00
John Benediktsson
ca4d5cbde0
hash-sets: speed up diff, intersect, and union.
2012-04-16 10:58:08 -07:00
John Benediktsson
22c26ff3f5
vm: adding bignum_gcd primitive.
2012-04-05 09:17:35 -07:00
otoburb
30d8b5211e
io.pathnames: removed dependency on environment.
...
I had an erroneous dependency on basis/environment.
2012-03-30 21:03:01 -07:00
otoburb
152c301d49
io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
...
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-03-30 21:01:57 -07:00
otoburb
cb6eb8b2bd
io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
...
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-03-30 21:01:46 -07:00
Joe Groff
83a3a0346b
io.files: check argv when initing resource-path
2012-03-27 16:58:12 -07:00
Joe Groff
526ff277d0
parse -resource-path= during bootstrap
2012-03-25 14:02:32 -07:00
Doug Coleman
ee721d1811
kernel: Change the example for with to be more clear. Division example credit goes to chezmax.
2012-02-16 09:49:08 -08:00
Joe Groff
0ddb6fa96e
Revert "io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname."
...
This reverts commit 4e10f09787
.
2012-01-31 11:46:02 -08:00
Joe Groff
af8dc62104
Revert "io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/"."
...
This reverts commit 251a2a19a6
.
2012-01-31 11:45:51 -08:00
otoburb
dc11f2d7a2
io.pathnames: Revised ~ support to expand on the first tilde, and not on "~/".
...
This mimics the same behaviour as "ls ~" in the shell, which expands the alias
as a directory, and not as a filename. For the specific edge-case where a
filename called "~" must have a path constructed to it (e.g. "./~" or "~/~").
2012-01-11 02:36:47 +00:00
otoburb
a5e8cc75b9
io.pathnames: Added ~/ (tilde) prefix recognition as a special pathname.
...
vocab:, resource: and ~/ are special pathnames. Modified absolute-path word,
added test cases and updated io.pathname documentation.
2012-01-11 02:36:47 +00:00
Slava Pestov
d1b6106011
Set up listener's manifest so that words defined in "scratchpad" take precedence over other vocabularies and do not raise a restart. This matches the behavior of IN: and USE: in files, where the IN: takes precedence. Also remove unused clear-manifest word. Fixes #407
2012-01-02 23:18:52 -06:00
Joe Groff
c4bd4dc1cc
math.parser: hex> etc. shouldn't take radix prefix
...
Fixes #453
2011-12-16 17:20:05 -08:00
rien
b3747936b9
fixed effect based on inner behavior and outer context
2011-12-10 19:47:34 -05:00
Doug Coleman
ad8a1c3905
bootstrap/stage1: Turn off parser-quiet? flag sooner so the files loaded in the USING: list in stage2 print a loading message.
2011-11-30 23:15:43 -08:00
Doug Coleman
3ba787b277
core/basis: trim down using lists
2011-11-30 23:15:42 -08:00
Joe Groff
78d23ce6a0
io: implement stream protocols on f
...
Fixes deployed applications that write to output-stream
2011-11-28 20:36:34 -08:00
Joe Groff
16e510bc76
namespaces: rework so a singleton isn't necessary
...
Make global foldable, and make the underlying global object a hashtable wrapper. Also, use a tuple instead of a generic array for the global box type.
2011-11-28 18:25:27 -08:00
Joe Groff
a1b730e867
namespaces: make set-global/get-global foldable
...
Store the globals hashtable as an array of boxes so that the key-to-reference mapping is constant. Use a singleton and an unfoldable "box-at" word so that get-global and set-global optimize to direct operations on the associated box when the variable name is a compile-time constant. Fixes #200 .
2011-11-28 18:25:27 -08:00
Doug Coleman
2b87eaa1b5
generalizations: Refactor stack-checker so that smart combinators can be used with curry and compose.
2011-11-27 20:25:22 -08:00
Joe Groff
7ac7adeb67
syntax: add note to #! docs
2011-11-27 15:03:40 -08:00
Joe Groff
2cf8b32bda
lexer: skip #! as a single token at front of line
...
Fixes #370
2011-11-27 14:59:54 -08:00
Joe Groff
1d9838aa57
io.files: back out resource-path change
...
It's too brittle against varying current directories or the Factor directory being moved.
2011-11-27 12:37:58 -08:00
Joe Groff
88c9483343
io.files: use initialize to set resource-path
...
If a resource path is already set in the image, don't change it. Should make #364 work a bit more as expected, and let us set the resource path for deployed Mac OS X bundles.
2011-11-27 12:37:58 -08:00
Joe Groff
98fc1e28bd
math.integers: make bignum/f round to even on tie
...
Fixes #372
2011-11-26 17:44:29 -08:00
Joe Groff
0f5b551790
math.integers: pass tests even if number-base set
2011-11-26 17:37:17 -08:00
Joe Groff
269fe9ea1a
math.integers: test round-to-even-on-tie behavior
2011-11-26 16:03:43 -08:00
Joe Groff
90f34d092c
math: neg? needs to be defined for all reals
2011-11-26 15:37:58 -08:00
Joe Groff
a97a9ede15
math.parser: don't accept hex float without expt
...
Part of #372
2011-11-26 15:15:46 -08:00
Joe Groff
e58afa8ab5
oops, radix prefixes shouldn't chain
2011-11-24 12:39:52 -08:00
Joe Groff
fa979425f3
math.parser: test harder
2011-11-24 12:34:50 -08:00
Joe Groff
14efcc69ab
math.parser: reject "0x" etc. without any digits
2011-11-24 12:27:40 -08:00
Joe Groff
0b45465722
parser: remove parse-base dead code
2011-11-23 22:33:31 -08:00
Joe Groff
07abeee9d9
syntax: remove BIN: HEX: OCT:
2011-11-23 20:07:33 -08:00
Joe Groff
4b6559849f
math.parser: oops
2011-11-23 19:51:15 -08:00
Joe Groff
4e8a1d0bb4
math: add neg? word
...
Do the right thing with integers or floats
2011-11-23 19:51:05 -08:00
Joe Groff
72de75b881
let's pretend BIN: HEX: OCT: never happened
2011-11-23 19:22:37 -08:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
Joe Groff
e738c7206c
math.parser: natively support 0b 0o 0x syntax
...
Closes #371
2011-11-23 18:30:22 -08:00
Doug Coleman
64bbd248d5
classes.maybe: Change the type of maybe's class slot. As a result, maybe: maybe: integer is valid now, so fix the unit tests and its prettyprinting.
2011-11-23 01:43:02 -08:00
Doug Coleman
0700dca792
classes.maybe: make maybe's slot type a classoid so you can do maybe: union{ }. Fix prettyprinting of anonymous-union/intersection. Fixes #427 , fixes #428 .
2011-11-23 01:19:09 -08:00
Doug Coleman
f90bc5cdb6
classes: optimize instance? for classoids
2011-11-22 20:38:07 -08:00
Doug Coleman
82c5388f68
classes: add syntax for intersection{ and union{ anonymous classes. make classoid a mixin.
2011-11-22 18:49:42 -08:00
Doug Coleman
cab0369fec
classes: Make methods dispatch on maybes. Fix a couple bugs in the implementation of maybe. classoid? is now a dumb test if an object could be a well-formed classoid; valid-classoid? tests for well-formedness. Move maybe tests. Make pprint* work better on methods.
2011-11-22 15:12:20 -08:00
Doug Coleman
fac17c10ba
classes.maybe: move maybe definition from classes.union to classes.maybe
2011-11-22 02:46:36 -08:00
Doug Coleman
067f9830ef
classes.union: Define a maybe: word that makes a tuple that acts as an anonymous union for a type and f. Updated all the places we define UNION: ?foo foo POSTPONE: f ;. Fixes #416 and lots of headaches.
2011-11-22 01:56:13 -08:00
Joe Groff
1d4660c7ec
random: go faster
...
* Use int <ref> instead of 4 >le
* Inline sequences:push-all
* Types, hints, inlines
Re: #328
2011-11-15 20:45:16 -08:00
Joe Groff
34e77ec408
strings: inline >string and 1string
...
Fixes #340
2011-11-15 19:15:19 -08:00