Commit Graph

368 Commits (clean-macosx-x86-32)

Author SHA1 Message Date
Slava Pestov 018677319c math, syntax: fix help lint 2009-09-12 21:07:31 -04:00
Slava Pestov 1337f82ce6 math.order: better docs 2009-09-12 16:33:42 -05:00
Slava Pestov 11f984e734 math.floats: fix abs on floats; -0.0 abs should be 0.0 not -0.0 2009-09-12 16:24:07 -05:00
Slava Pestov 3c55e7fe0c Add NAN: literal syntax for NANs with a payload 2009-09-12 15:06:15 -05:00
Joe Groff 0ed5822ed9 HEX: X.XXXpEEE hexadecimal float literal syntax 2009-09-11 20:11:29 -05:00
Joe Groff 14f412b404 add an "unordered?" predicate to math, with a dumb implementation for now 2009-09-10 23:45:18 -04:00
Joe Groff 1bc97b4624 add unit tests for comparisons against nan 2009-09-03 17:27:06 -05:00
Joe Groff 1106fb10f1 let's not forget about hex literals 2009-09-01 21:28:23 -05:00
Joe Groff 1a04bc1124 require numeric literals to begin and end with a digit/decimal point so that stuff like "," and "1," don't parse as numbers 2009-09-01 21:14:26 -05:00
Slava Pestov ec70e1d714 More minor documentation tweaks 2009-08-30 06:32:20 -05:00
Slava Pestov 2bb6293217 compiler: add fixnum-min/max intrinsics; ~10% speedup on benchmark.yuv-to-rgb 2009-08-28 19:02:59 -05:00
Slava Pestov d957ae4e44 Performance improvements to make struct-arrays benchmark faster
- improved optimization of ##unbox-any-c-ptr on ##box-displaced-alien; convert it to ##unbox-c-ptr where possible using class info stored in the ##bda instruction
- make fcos, fsin, etc inline again; everything in math.libm inline again, except for fsqrt which is an intrinsic
- convert min and max on floats to float-min and float-max
- make min and max not inline, so that the above can work
- struct-arrays: rice a bit so that more fixnums come up
2009-08-28 05:21:16 -05:00
Slava Pestov 79cdc45339 math: move float methods to math.floats 2009-08-20 03:55:19 -05:00
Joe Groff 15a7148de0 Merge branch 'master' of git://factorcode.org/git/factor 2009-08-19 15:48:07 -05:00
Daniel Ehrenberg 8120bdebea Merge branch 'master' of git://factorcode.org/git/factor 2009-08-18 00:02:29 -05:00
Daniel Ehrenberg 62cd1d280c Fixing docs typo in math.floats 2009-08-18 00:02:19 -05:00
Slava Pestov 030b1b816c Add inline declarations for various assorted methods 2009-08-17 22:32:21 -05:00
Joe Groff 24d9a8635c Merge branch 'struct-classes' of git://factorcode.org/git/factor 2009-08-17 21:26:19 -05:00
Doug Coleman 7c92ab1ea5 move if-zero etc to math, remove 1-/1+ from math 2009-08-14 14:27:23 -05:00
Joe Groff 6fe7fe72c7 Merge branch 'master' of git://factorcode.org/git/factor 2009-08-14 10:55:05 -04:00
Doug Coleman 686b3e348e use ERROR: in several places instead of throwing strings 2009-08-11 23:09:02 -05:00
Doug Coleman 15ae8fb673 fix sgn docs 2009-08-11 18:15:24 -05:00
Doug Coleman 14ef1649d4 add if-zero/when-zero/unless-zero to core/ and update usages 2009-08-11 17:59:40 -05:00
Brad Christensen f8405e9c55 A number of documentation fixes.
* Short-circuit combinators now show correct stack effect for quots
 * Groups and Clumps unchecked examples corrected, made runnable in listener
 * Class operations had duplicate link to class-types
 * Protocol slots readability fixed
 * Tuple word property for "tuple-layout" corrected to "layout"
 * cond>quot sentence started in lowercase
 * Method precedence code example missing stack effect for GENERIC:, M: integer explain changed to detail an integer
 * Motivation for default streams readability
 * Default input and output streams duplicate readln link removed from output stream words section
 * Looping combinators do description clarified
 * Make philosophy missing space
 * Linear order protocol duplicate after? link removed
 * Parsing words readability fix
 * Copied note regarding with-compilation-unit from define to define-declared and define-inline
2009-08-10 23:34:25 -07:00
Joe Groff 0376cf0f9d allow commas in numeric literals 2009-08-10 19:33:27 -04:00
Joe Groff f034be3c9e nitpick 2009-07-24 21:04:49 -05:00
Doug Coleman 01a0bf7c36 add more links to floating point words in docs 2009-07-24 18:11:51 -05:00
Slava Pestov 4ee1f68e30 Documentation fixes 2009-07-18 06:32:57 -05:00
Doug Coleman a54c78007b add a clamp word to math.order, use clamp word throughout libraries 2009-05-24 21:35:50 -05:00
Joe Groff c5d440700d 0.0 neg ought to be -0.0 2009-05-21 18:49:22 -05:00
Joe Groff 7584b30755 "math" help-lint 2009-05-09 20:23:56 -05:00
Slava Pestov 4ee4357e75 Fix negative zero smashing with bootstrap 2009-05-09 18:17:30 -05:00
Joe Groff 9021062795 fp-nan? was defined incorrectly. while i'm here, let's add some more float manipulation words 2009-05-09 09:49:31 -05:00
Slava Pestov 8e3e67fad4 Fix test failures 2009-05-04 13:10:56 -05:00
Slava Pestov b4088373b7 Merge branch 'master' of git://factorcode.org/git/factor 2009-05-04 05:16:47 -05:00
Slava Pestov a63ad6a7a5 Remove cruddy string encoding/decoding code from VM 2009-05-02 13:45:38 -05:00
Doug Coleman 0ad6d1fb7b add a few usages of iota, remove most 1+ and 1- from core 2009-05-01 19:58:24 -05:00
Slava Pestov fc4894fbdf Replace ratio and complex built-in types with tuples defined in the library. This frees up two lo-tags, so move array and quotation over to these tags and update compiler for new tags 2009-04-30 00:27:35 -05:00
Slava Pestov 1c68b389cc Document special float values 2009-04-14 15:05:10 -05:00
Slava Pestov cb6f59ff5b Fix unit test failure in math.parser 2009-04-13 20:25:55 -05:00
Slava Pestov 0ffd43e2e3 1.0/0.0 => 1/0. 2009-04-13 19:48:08 -05:00
Slava Pestov 0fda643ab1 Optimizing string>number 2009-04-11 20:30:51 -05:00
Slava Pestov 99b8400e56 Documentation updates 2009-04-06 03:00:46 -05:00
Slava Pestov 8385e9d9f5 Fixing compile errors, test failures and help lint failures 2009-03-23 17:12:41 -05:00
Slava Pestov 25a877e50b Merge OneEyed's patch 2009-02-28 17:06:55 -06:00
Slava Pestov cd53c2bd37 produce and produce-as: don't need third quotation either 2009-02-28 15:31:34 -06:00
Slava Pestov 78ce670101 Merge branch 'for-slava' of git://git.rfc1149.net/factor 2009-02-28 14:42:56 -06:00
Slava Pestov 45dae72f4a Merge branch 'master' into new_ui 2009-02-26 23:31:36 -06:00
Doug Coleman a083832ab4 fix typo in math docs 2009-02-26 18:10:11 -06:00
Slava Pestov 91d0c4ed1f Fix conflict 2009-02-22 20:02:13 -06:00
Slava Pestov 127f9b3578 Add unit tests for bignum bug 2009-02-22 19:41:47 -06:00
Samuel Tardieu 087d931c36 Remove the tail argument from do/until/while 2009-02-18 02:41:14 +01:00
Slava Pestov 421ee726b8 Merge branch 'master' into new_ui 2009-02-16 21:22:12 -06:00
Slava Pestov 6b25e99470 Add summary for heaps more vocabs 2009-02-16 21:05:13 -06:00
Slava Pestov 0684a9b7b0 Merge branch 'master' into new_ui 2009-02-09 18:16:14 -06:00
Daniel Ehrenberg 35b526cc7a Docs for lists, consolidating list functionality in lists, minor API changes 2009-02-09 14:29:09 -06:00
Slava Pestov 1bbabcd5e1 Remove some usages of slip combinators from the core 2009-02-05 03:29:59 -06:00
Slava Pestov 669548e62e Clean up some usages of tuck, and add Joe's curried cleave/spread/apply combinators to kernel vocabulary 2009-02-02 13:43:54 -06:00
Slava Pestov a9ef525aed Help lint fixes for stricter help lint 2009-01-27 04:12:37 -06:00
Slava Pestov 92f9338978 Smart quotes 2009-01-26 23:20:27 -06:00
Doug Coleman 66f5694462 document more core/ words 2009-01-17 22:15:57 -06:00
Slava Pestov ca2f01e0d0 Updating non-core libraries for monotonic? change 2009-01-16 17:02:54 -06:00
Doug Coleman 076b2d0893 add >=< word to math.order 2009-01-08 16:06:01 -06:00
Slava Pestov 058ba127cb Cleaning up more -rot usages 2008-12-22 05:41:01 -06:00
Slava Pestov c5160d76e9 Merge qualified, alias, symbols, constants into core 2008-12-17 18:10:01 -06:00
Slava Pestov 0021cde743 Fix more compile errors 2008-12-15 22:21:56 -06:00
U-SLAVA-DFB8FF805\Slava 53db40ba13 Add more stack declarations 2008-12-13 05:06:28 -06:00
Slava Pestov b154b21aaa Add new until combinator, and a new do word which acts like a modifier: do while, do until for loops which iterate at least once 2008-12-08 23:37:18 -06:00
Slava Pestov 73b3cd6367 Use eq? instead of number= since we only ever have a fixnum here 2008-12-08 13:59:59 -06:00
Slava Pestov e4f8448eb1 Fix some problems with arithmetic type inference, exposed by recent changes to log2 word
- declared input type for bignum-shift was stricter than the runtime behavior, leading to bad propagation of type info if shift count was a bignum
- types inferred for type functions which used number-valued/integer-valued/real-valued were not always precise, eg bignum bignum bitxor => integer
- add interval-log2, type function for (log2)
- remove math-class-min, it was useless
2008-12-07 19:44:49 -06:00
Slava Pestov 8a8f0c925c Use BSR instruction to implement fixnum-log2 intrinsic 2008-12-06 15:31:17 -06:00
Slava Pestov fa146b248a Remove obsolete info; 1+ and 1- are identical to 1 + and 1 - in reality 2008-12-05 02:11:50 -06:00
Aaron Schaefer 13781ee48c Merge branch 'master' of git://factorcode.org/git/factor 2008-12-04 00:42:34 -05:00
Aaron Schaefer ca73c06194 Fix documentation example for floats 2008-12-04 00:36:11 -05:00
Doug Coleman 0e14f767ee core: swap 3append -> glue 2008-12-03 19:12:48 -06:00
Slava Pestov 267ab0aa4d Implement /i on floats 2008-11-29 12:21:26 -06:00
Slava Pestov a4d9cdfeb3 Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov 3d8f432856 Clarify math.bitwise -vs- bitwise-arithmetic docs 2008-11-19 19:23:11 -06:00
Slava Pestov 9bf63b1613 New $quotation markup element 2008-11-16 09:03:30 -06:00
unknown cc7ab11881 Add more unit tests 2008-11-07 20:34:04 -06:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00
Slava Pestov 21c621d464 Fix erg's ratio bug 2008-09-30 18:28:11 -05:00
Slava Pestov f5acf7e3d6 Rice 2008-09-27 17:54:44 -05:00
Slava Pestov e211260e47 Tweak unit test 2008-09-20 18:52:39 -05:00
Doug Coleman 3d7ed0f122 document ?1+ for the lulz 2008-09-17 00:21:11 -05:00
Slava Pestov 0c8e2584b4 Fixing unit tests for make, fry changes 2008-09-11 00:20:06 -05:00
Slava Pestov 44f53de164 Move make to its own vocabulary, remove fry _ feature 2008-09-10 20:07:00 -05:00
Doug Coleman 73086e1a61 add fp-infinity?, docs, and tests 2008-09-03 01:35:03 -05:00
Doug Coleman bb8fcf245f fix math docs 2008-09-02 15:17:18 -05:00
Slava Pestov 110a5e5162 Change equality semantics 2008-09-02 02:02:05 -05:00
U-SLAVA-DFB8FF805\Slava cead05c5d2 Workaround Windows libc bug (?) 2008-08-22 00:32:37 -05:00
Slava Pestov 95657e5742 Remove some funny retain stack usage 2008-08-18 20:13:24 -05:00
Slava Pestov f279015b85 Minor fixes 2008-08-06 04:46:30 -05:00
Slava Pestov d66f887736 Create basis vocab root 2008-07-28 22:03:13 -05:00
Slava Pestov ed7ad146d8 Fix NaN handling in math.intervals 2008-07-28 06:31:11 -05:00
Slava Pestov c6915b1023 Working on tuple slot propagation 2008-07-25 02:07:45 -05:00
Slava Pestov ef1e8ee8f6 More interval debugging 2008-07-23 20:11:43 -05:00
Slava Pestov 5d7cb635ad Add empty interval handling 2008-07-22 21:04:22 -05:00
Slava Pestov b42c845d48 Update intervals docs 2008-07-22 04:44:21 -05:00
Slava Pestov af09eae727 Add some more interval operations 2008-07-22 01:27:39 -05:00
Slava Pestov f1268db79a Fix test 2008-07-21 20:48:30 -05:00
Slava Pestov 35bd2abc71 Fix more math.parser stuff 2008-07-20 04:05:09 -05:00
Slava Pestov 89d3c0c616 Fix negative zero 2008-07-20 00:56:25 -05:00
Slava Pestov ac2bf0b87d Adding inline recursive declarations 2008-07-18 19:22:59 -05:00
Slava Pestov 0bb85a1ef9 Fix obscure corner case; -include='compiler math' 2008-07-06 18:21:34 -05:00
Slava Pestov 9c603c164c Fix intervals bug 2008-07-04 18:18:00 -05:00
Slava Pestov 77c4d97785 Some unit test fixes 2008-06-30 03:57:00 -05:00
Slava Pestov f7b7001f39 BOA constructors now check types 2008-06-30 01:44:58 -05:00
Slava Pestov b36e06d0d6 Builtinn types now use new slot accessors; tuple slot type declaration work in progress 2008-06-28 02:36:20 -05:00
Slava Pestov 685d53e264 Add gather word; faster 'implementors' using inverted index 2008-06-12 05:49:46 -05:00
Slava Pestov 5a3581acbc Documentation updates 2008-06-11 20:27:54 -05:00
Slava Pestov 29fa4a8a54 assoc-find is no longer generic 2008-06-09 05:22:21 -05:00
Slava Pestov 9dd5c9919f Mandatory stack effect annotations 2008-06-08 15:32:55 -05:00
Slava Pestov 91ef98cc70 math.parser fix 2008-05-05 18:09:44 -05:00
Slava Pestov 75fb15ee4c Split stdio up into input-stream/output-stream, pipes work in progress 2008-05-05 02:19:25 -05:00
Slava Pestov d1a3b64569 Fix class sorting again 2008-05-02 17:36:31 -05:00
Slava Pestov 5a29b2e273 Class linearization 2008-05-02 02:51:38 -05:00
Slava Pestov d2fe9f6abb Fix unit tests 2008-04-29 06:01:01 -05:00
Slava Pestov ee46527023 Fix tests 2008-04-29 03:59:41 -05:00
Slava Pestov 5901107f66 Bootstrap fix 2008-04-29 01:49:06 -05:00
Slava Pestov 08af497255 Fix /f for large integers 2008-04-28 21:26:31 -05:00
Doug Coleman 1dbc37e0cd Merge branch 'master' of git://factorcode.org/git/factor 2008-04-28 15:18:07 -05:00
Doug Coleman 594d57d5cc fix docs 2008-04-28 15:17:47 -05:00
Slava Pestov 1f7be9945b Cleanup erg's cleanup 2008-04-28 14:52:03 -05:00
Doug Coleman 09c21f077b add invert-comparison word 2008-04-27 23:23:51 -05:00
Doug Coleman 32814ffce5 <=> outputs +lt+ +eq+ +gt+ 2008-04-27 18:57:46 -05:00
Doug Coleman b4f7619655 add math.order 2008-04-27 17:03:21 -05:00
Doug Coleman 15402ed1b4 core changes:
index* -> index-from
last-index* -> last-index-from
1 tail -> rest
1 tail-slice -> rest-slice
subset -> filter
prepose
find* -> find-from
find-last* -> find-last-from
before, after generic, < for integers
make between? work for timestamps
2008-04-25 23:12:44 -05:00
Slava Pestov f48d5091c9 Faster inline allocators 2008-04-19 04:52:34 -05:00
Slava Pestov 2d2b3ec904 Partial dispatch on integer operations 2008-04-18 16:51:09 -05:00
Slava Pestov 390afacac8 Better modular arithmetic optmizer 2008-04-17 12:22:24 -05:00
Slava Pestov aaf48cebf5 New utility word 2008-04-13 03:52:40 -05:00
Doug Coleman bced4022e5 updating usages of cond/case 2008-04-11 12:53:22 -05:00
Doug Coleman 1e538ccd03 more docs 2008-04-03 22:16:37 -05:00
Eduardo Cavazos e75222d039 More add and add* cleanups 2008-03-31 19:24:48 -06:00
Slava Pestov c22af5c7a6 Rename 2apply to bi@ 2008-03-29 20:36:58 -05:00
Slava Pestov 32526206f1 Help fixes 2008-03-11 19:51:58 -05:00
Slava Pestov 7ad74eb320 Various fixes 2008-03-08 02:51:26 -06:00
Slava Pestov 7ffd9c95ba Fixing interval comparison 2008-03-07 21:27:00 -06:00
Slava Pestov e98cd1fd59 New convention for unit tests 2008-03-01 17:00:45 -05:00
Slava Pestov 3bf3c3ee5a New sorting comparison operators 2008-02-26 17:33:48 -06:00
Slava Pestov 727f91409d Split off concurrency.mailboxes, add timeout support to promises, locks, mailboxes, semaphores, count-downs 2008-02-21 23:47:06 -06:00
Slava Pestov 2ecd1ba127 Improve ratio syntax 2008-02-10 01:40:17 -06:00
Slava Pestov 52b5c5a068 Reorganize compiler tests 2008-02-08 01:48:51 -06:00
Slava Pestov 78abc143d6 Load fix 2008-02-07 01:01:14 -06:00
Slava Pestov 2541c62e29 Fix code for math.parser changes 2008-02-06 21:15:47 -06:00
Slava Pestov f3c8bd266b Improved syntax for ratios 2008-02-06 20:05:03 -06:00
Slava Pestov be2c8b13d7 Rename unit-test-fails to must-fail and add must-fail-with to replace [ t ] [ [ ... ] catch ... ] unit-test idiom 2008-02-06 13:47:19 -06:00
sheeple a05c18152b flags now works with numbers 2008-02-02 07:05:15 -06:00
sheeple 16e206b3b8 Add flags to math.bitfields 2008-02-02 06:58:28 -06:00
Slava Pestov 2ef76798b0 record1 strings 2008-01-31 23:00:08 -06:00
Slava Pestov feb4e8df9e Fix typo 2008-01-21 15:33:37 -05:00
Doug Coleman aa08a1f5f6 Merge git://factorcode.org/git/factor 2008-01-12 17:44:15 -10:00
Slava Pestov d54fc8172d Assorted fixes 2008-01-12 22:24:27 -05:00
Doug Coleman 0ee64a0358 Merge git://factorcode.org/git/factor 2008-01-12 16:41:00 -10:00
Slava Pestov e3416ec170 Faster bit-arrays 2008-01-12 21:37:44 -05:00
Doug Coleman 8b8ebaacc8 small cleanups from lint 2008-01-12 07:42:47 -10:00
Doug Coleman 84891e2591 pick pick -> 2over
minor cleanups
2008-01-11 12:02:44 -10:00
Doug Coleman ff1ee9e874 2apply and -> both? 2008-01-11 11:03:18 -10:00
Slava Pestov 9c1454ef68 Rename real/imaginary slots of complex to real-part/imaginary-part to avoid clashing with the real class word; fix bug where redefining a generic as a class leaves the word in a weird state 2007-12-27 17:26:39 -05:00
Slava Pestov d7217801c3 Documentation fixes 2007-12-11 22:36:40 -05:00
Slava Pestov 2e78ce3d4a Profiler fixes 2007-10-29 01:12:27 -04:00
Slava Pestov 850c145a09 Fix bootstrap hang 2007-10-24 02:01:43 -04:00
U-SLAVA-FB3999113\Slava f529d3d2d2 Load fixes for core/math 2007-10-18 02:38:35 -04:00
U-SLAVA-FB3999113\Slava 8b54248c50 Get core unit tests to pass without number tower 2007-10-14 21:13:42 -04:00
U-SLAVA-FB3999113\Slava e9b42fa635 Move more math stuff to extra/, get compiler to work without ratios/complex numbers 2007-10-14 20:38:23 -04:00
Slava Pestov d86d83fdbb Fix mod-inv 2007-10-06 17:09:15 -04:00
Slava Pestov a96457cecc Initial import 2007-09-20 18:09:08 -04:00