Doug Coleman
4b614cc15b
factor: Make source files/resources 644 instead of 755.
2018-07-13 20:36:50 -05:00
Doug Coleman
9f213f96f6
core: Add the shuffler words but without primitives.
...
The nipd branch slowed bootstrap by a minute, this patch does not.
sorry about changing the fjsc line endings...
2018-06-19 22:52:58 -05:00
John Benediktsson
d6fd4215d2
formatting: better error messages for unknown directives.
2018-01-18 08:54:06 -08:00
Doug Coleman
15b13870ae
peg.ebnf: Clean up EBNF: syntax.
...
The syntax for an EBNF parser is now ``EBNF: identifier string``. The
inline syntax went from [EBNF ... EBNF] to EBNF[[ ]], EBNF[=[ ]=], etc.
<EBNF looked for a main word, but this functionality is just EBNF[[ ]]
now.
2017-08-05 22:23:57 -05:00
Jon Harper
e470a5bb28
formatting, workaround bug for "%.0e" and "%.0f" on windows
...
On windows, the underlying formatting implementation
uses a precison of 6 when asked to do a precision of 0.
Improve the post-processing so that it doesn't fully break
the formatted number. The previous implementation would change
"1.00000" to "10000", and 1.00000e0 to 10000e0...
With this, windows has a different formatting for "%.0f" and "%.0e"
but at least it's the right number
2017-07-08 18:40:08 +02:00
Jon Harper
7c2e964fc9
formatting: fix exception when formatting the integer 0 using "%e"
2017-07-08 18:39:56 +02:00
Björn Lindqvist
1ca8276df4
basis/,core/,extra/: many new tags
2017-07-06 23:04:18 +02:00
Björn Lindqvist
7a9817aeb6
formatting.tests: conditioning some tests to pass on windows
2017-06-28 11:18:40 +02:00
John Benediktsson
0fddbc2af1
formatting: revert change to %d, %o, %b, %x for now.
...
We should have a format character in the future to format using our Factor
binary, octal, and hex parser. Maybe using the "alternate form" format
character like Python does? And if we do that, maybe print the 0b, 0o, 0x
prefixes? TBD.
2017-06-10 13:33:01 -07:00
Jon Harper
1dceb069ad
formatting: fix bug when using %e and the number rounds up in magnitude
...
99/10 0 format-scientific-simple was outputting 1.0e0 because
the mantissa was rounded up, so it had one extra character, and
the exponent was wrong.
2017-06-08 11:23:38 -07:00
Jon Harper
4df21818f5
formatting: change %.0f and %.0e to remove the radix character. It's more standard.
2017-06-08 11:23:38 -07:00
Jon Harper
756184607b
formatting: make these tests actually test the expected code path
2017-06-08 11:23:38 -07:00
Jon Harper
552791d1cf
formatting: don't force the presence of ".0" for %f and %e when precision is 0
...
It's misleading because you can think you have more precision than you really
do when looking at the output. So instead of "1.0", we can format it as "1" or
"1.". And instead of "1.0e+00" we can format "1e+00" or "1.e+00". In C,
printf does not print the radix character, it's prettier. But since the factor
parser accepts both styles, and keeping the radix character gives a stronger sense
that the number is approximate, I prefer to keep the radix character..
2017-06-08 11:23:38 -07:00
Jon Harper
762b22e1a8
formatting-docs, document ' ' as an alternative to '+' for positive numbers sign prefixing
2017-06-08 11:23:38 -07:00
Jon Harper
6061da92be
formatting, allow uppercase exponent for bin floats in base 2 and 8
2017-06-08 11:23:37 -07:00
Jon Harper
ccbb8116fc
formatting, make %d, %o, %b work for ratios and floats
2017-06-08 11:23:37 -07:00
Jon Harper
438e22fceb
formatting, fix %f and %e for ratios and integers
2017-06-08 11:23:37 -07:00
Jon Harper
e1df9df735
formatting: fix missing '+' for %+e with negative exponent
2017-06-08 11:23:37 -07:00
Alexander Iljin
2ffa446f5b
*-docs: replace double spaces with single spaces
...
Code examples and other places where multiple spaces were used to align
text were left intact.
2017-06-05 13:16:07 -07:00
Björn Lindqvist
f9b9ce20f2
calendar.english: new vocab for english names for days and months
...
This moves all the english-centric words from the calendar vocab which
was getting kind of big to calendar.english. It should make it easier to
see which vocabs make language assumptions.
2017-01-03 15:48:08 +01:00
John Benediktsson
498285d7dd
unicode: make this the API for all unicode things.
2016-03-30 23:29:48 -07:00
Jon Harper
cac9b58f11
formatting, format numbers with C locale and document that it's english only
2016-03-08 07:55:25 -08:00
Jon Harper
19fadb6c96
prettyprinter, locale independant float printing
2016-03-08 07:55:25 -08:00
Jon Harper
6ee9fad443
formatting: fix docs for padding and use a better example
...
Make the padding number coherent between the example and the docs.
Also bump it from 3 to 10 because [[3.14 "%'#5f" printf]] is "3.140000"
because the default precision is 6.
2015-08-30 18:43:59 +02:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
b6be8685c3
basis: ERROR: changes.
2015-08-13 03:20:39 -07:00
John Benediktsson
c25fb5f55e
update some more MACRO: effects.
2015-07-19 11:42:46 -07:00
Doug Coleman
2c257f399c
factor: Rename MACRO: and MACRO: to have quot as the output in stack effects.
2015-07-18 22:16:11 -07:00
Doug Coleman
43d6f1d3e2
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
2015-07-02 17:28:17 -07:00
Doug Coleman
59f3b1ea57
Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
...
Needs a bit more work.
This reverts commit 7e54cc2824
.
2015-07-02 13:47:06 -07:00
Doug Coleman
7e54cc2824
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
2015-07-02 11:36:08 -07:00
John Benediktsson
1723544b56
formatting: use nappend-as in sprintf.
2015-06-06 09:28:01 -07:00
Doug Coleman
77c5783270
formatting: Welcome to the sprintf club, MSVC 2015. Fixes #1337 .
2015-06-06 05:54:22 -07:00
John Benediktsson
50725002be
formatting: support space prefix for numbers.
2015-04-17 17:50:00 -07:00
John Benediktsson
76761b2e59
more minor cleanup.
2014-11-30 19:26:23 -08:00
John Benediktsson
a80540fdee
formatting: specify integer instead of fixnum as bignums are supported.
2014-09-04 09:35:15 -07:00
John Benediktsson
87433a4585
``swap drop`` is ``nip``.
2014-08-05 10:31:42 -07:00
John Benediktsson
0287355e2a
formatting: adding octal and binary format directives.
2014-08-05 09:39:50 -07:00
John Benediktsson
380251308e
formatting: faster strftime and make parse-strftime match parse-printf.
2014-05-20 16:11:32 -07:00
John Benediktsson
6e0a9fdf1f
formatting: make printf faster.
2014-02-10 20:39:08 -08:00
Björn Lindqvist
a82dc84f2d
formatting: new format specifier for unparsed representation
2014-02-09 21:09:24 -08:00
John Benediktsson
f29aac24bb
formatting: adding vprintf by request.
2013-05-14 09:23:00 -07:00
John Benediktsson
55a230f368
formatting: use $snippet to make format strings stand out in docs.
2012-09-24 09:48:58 -07:00
John Benediktsson
fa0a0939f9
formatting: some cleanup, minor performance improvements.
2012-07-20 09:41:05 -07:00
Joe Groff
943596575a
use radix literals
2011-11-23 19:03:40 -08:00
John Benediktsson
340e69aef3
formatting: improve summary.txt.
2011-11-12 16:18:39 -08:00
Slava Pestov
2ace3c5956
formatting: remove platform-specific example
2010-04-15 16:14:29 -05:00
Slava Pestov
f26bf45b4a
formatting: fix unit tests on Windows; libc's float formatting produces different output there
2010-04-15 13:49:16 -05:00
Slava Pestov
8f4210436b
formatting: use the new format-float word to fix a failing test case
2010-04-13 21:24:35 -07:00
Slava Pestov
050d042449
formatting: fix docs
2010-02-23 21:21:16 +13:00