Compare commits

...

799 Commits

Author SHA1 Message Date
John Benediktsson cbdd559a75 misc/vim: some minor fixes.
- fix word definition to have dashes and other printables
- fix private to properly highlight and close the region
2020-09-29 10:04:43 -07:00
John Benediktsson ff6b75d030 misc/vim: remove TH{ syntax. 2020-09-28 16:32:33 -07:00
John Benediktsson 8fd437d877 Revert "core: Add TH{ for making assoc tuples."
This reverts commit e93d8f82bc.
2020-09-28 16:29:43 -07:00
John Benediktsson 36b2ac97ef sequences.extras: fix stack effect for filter-all-subseqs. 2020-09-28 12:30:15 -07:00
John Benediktsson f2a40f88dc bootstrap: rename layouts/layouts.factor to layouts.factor. 2020-09-26 21:29:52 -07:00
John Benediktsson fed5fd7c50 classes.tuple: speed up slots>tuple a bit.
Only get the initial values that are needed to supplement provided values.
2020-09-26 12:22:02 -07:00
John Benediktsson dc3a11bfc4 talks.tc-lisp-talk: fix typo. 2020-09-26 11:58:03 -07:00
John Benediktsson ae1890e0d7 vm: remove -console option, seems not necessary. 2020-09-26 11:46:56 -07:00
John Benediktsson 7bd1adb1c3 command-line: cleanup some documentation, change terminology slightly.
Refer to "options" instead of "VM args" or "Factor arguments".
2020-09-26 10:52:32 -07:00
John Benediktsson 5a71d98d29 compiler.tree.propagation.transforms: document not{ } as well. 2020-09-26 10:29:42 -07:00
John Benediktsson 09829bd506 compiler.tree.propagation.known-words: fix type in comment. 2020-09-26 10:29:25 -07:00
John Benediktsson 840159710e classes: update with quotation stack effects. 2020-09-26 10:28:35 -07:00
John Benediktsson dbdf4540bc hints: switch to using instance?. 2020-09-25 11:11:52 -07:00
John Benediktsson 96d7da0169 classes.builtin: remove bootstrap-type>class.
Not currently used, if adding more builtins maybe useful.
2020-09-23 19:49:35 -07:00
John Benediktsson 7789bbc79c classes.union: speed up instance? on unions of tuple-classes. 2020-09-23 19:32:15 -07:00
John Benediktsson 9f8a791a3b tools.completion: re-add chars-matching, not sure how i removed it. 2020-09-22 13:23:06 -07:00
John Benediktsson 16b144eaf5 fonts: simplify reverse-video-font 2020-09-22 13:05:17 -07:00
John Benediktsson 11f060719a benchmark.completion: fix use of name-completions. 2020-09-22 11:32:52 -07:00
John Benediktsson c200cfb8ca tools.completion: merge qualified and unqualified word completions. 2020-09-22 11:30:43 -07:00
John Benediktsson cc08ad38a4 tools.completion: allow fuzzy vocab name in qualified-matching. 2020-09-22 11:24:04 -07:00
John Benediktsson 03e62f3bc5 tools.completion: support qualified word completions. 2020-09-22 11:12:52 -07:00
John Benediktsson 979c13e156 math.complex: update test using. 2020-09-15 16:57:29 -07:00
John Benediktsson bc0789ca91 math.complex: move malformed-complex and parse-complex to math.complex.
They were incorrectly defined in syntax vocabulary.
2020-09-15 13:24:17 -07:00
John Benediktsson 115b7b62df basis: removing unnecessary method stack effects. 2020-09-09 15:00:54 -07:00
John Benediktsson f2deb82829 core: removing unnecessary method stack effects. 2020-09-09 15:00:53 -07:00
Doug Coleman f3ae869536 editors.visual-studio-code: Prefer code-insiders on macOS. 2020-09-02 19:08:56 -05:00
Doug Coleman 946bbd1597 vscode: Prefer code-insiders version if installed. 2020-09-02 17:47:08 -05:00
John Benediktsson 0b5cb42d95 cuda.libraries: remove duplicate definition of ?delete-at. 2020-09-01 13:20:49 -07:00
John Benediktsson c7959f2cb2 README: minor style tweak. 2020-08-30 16:58:41 -07:00
Doug Coleman 46be019527 assocs.extras: better implementation of rekey-new-assoc 2020-08-29 19:06:48 -05:00
Doug Coleman ce3049decd assocs.extra: Add a word to keep only certain keys in an assoc to the same assoc or to a new one. 2020-08-29 19:05:41 -05:00
Doug Coleman 87cce0ba6a build.sh: Warn if boot image url is nonexistent when falling back to master. 2020-08-29 18:22:38 -05:00
Doug Coleman 13b366e88b Revert "build.sh: Fix boot image download to current branch."
This reverts commit ec490587e7.

I didn't read the code, but the odds of a random branch working with master boot image are pretty low.
2020-08-29 18:04:19 -05:00
Doug Coleman 97d828a7f5 build.sh: recognize arm64 linux 2020-08-27 16:47:14 -05:00
Doug Coleman ec490587e7 build.sh: Fix boot image download to current branch. 2020-08-27 16:43:38 -05:00
Doug Coleman 3eb6e55ae4 db: Fix using list for walker. 2020-08-27 10:28:12 -05:00
John Benediktsson a861c4c732 assocs: improve stack effect for delete-at* and ?delete-at. 2020-08-23 13:04:48 -07:00
Alexander Iljin 00fc565111 sodium: add the "bindings" tag 2020-08-20 18:04:42 +00:00
John Benediktsson 3fdb0325ca misc: update vim syntax for ?change-at. 2020-08-17 10:14:13 -07:00
John Benediktsson 1ac7e08f59 assocs: adding ?change-at. 2020-08-17 10:08:41 -07:00
John Benediktsson 699ebc960b colors.hex: adding an invalid-hex-color error. 2020-08-17 08:04:04 -07:00
John Benediktsson ce871f99dd compiler.tree.escape-analysis.branches: no need for sift. 2020-08-14 13:43:02 -07:00
John Benediktsson 60dd083bcb misc/vim: highlight predicate classes. 2020-08-14 13:28:48 -07:00
John Benediktsson 5176b270d2 misc: more syntax tests. 2020-08-14 13:22:34 -07:00
John Benediktsson d535b62f50 vocabs.parser: faster name lookup. 2020-08-14 11:58:50 -07:00
John Benediktsson 8cc090950a tools.profiler.sampling: fixing missed rename. 2020-08-14 11:57:27 -07:00
John Benediktsson 997aaf005e Revert "Revert "vm: Allow larger 32bit code heaps.""
This reverts commit 0c0647f12c.
2020-08-14 10:47:18 -07:00
John Benediktsson 6e83e00d22 vm: rename primitive_sampling_profiler to primitive_set_profiling.
also rename the private primitives words in tools.profiler.sampling.
2020-08-14 10:40:54 -07:00
John Benediktsson e1085ffef4 vm: add some allocates memory comments. 2020-08-14 10:27:54 -07:00
John Benediktsson f21deee3df vm: change some bools from cell to bool. 2020-08-14 10:27:18 -07:00
John Benediktsson 0c0647f12c Revert "vm: Allow larger 32bit code heaps."
This reverts commit 723e0e2c1a.
2020-08-14 10:14:18 -07:00
John Benediktsson 8eb78b9212 Revert "checksums.multi: make multi-checksum an instance of checksum"
This reverts commit fbeb409979.
2020-08-13 16:09:31 -07:00
John Benediktsson 995d717277 tools.profiler.sampling: assert that profile-data is created. 2020-08-13 14:50:52 -07:00
John Benediktsson 5eaaaf06d6 xml.tests: fix USING. 2020-08-13 09:57:29 -07:00
John Benediktsson bb827a1565 furnace: require chloe-tags when loading furnace framework. 2020-08-13 09:17:43 -07:00
John Benediktsson 6bfc54b15c xml.tests: require 8-bit encodings. 2020-08-13 09:17:20 -07:00
John Benediktsson 24e1080362 alien.libraries.finder.macosx: fix test USING. 2020-08-12 15:01:51 -07:00
John Benediktsson 126f3acf63 math.bitwise: remove duplicate logic in bitfield. 2020-08-05 15:57:27 -07:00
John Benediktsson 70687a0eb3 alien.libraries.finder.linux: return fully-qualified path. 2020-08-05 10:59:01 -07:00
John Benediktsson 40aedcb346 alien.libraries.finder: cleanup, add windows tests. 2020-08-05 10:58:43 -07:00
John Benediktsson 564720281d command-line.startup: print default values for parameters. 2020-08-04 13:30:00 -07:00
Alexander Iljin 53d741a6ef L-system: rename some words to new conventions
Move the angle brackets from tuple names to their <constructors>.
2020-08-04 19:57:23 +00:00
Alexander Iljin 42855b4c44 L-system: reformat for brevity 2020-08-04 19:57:23 +00:00
Alexander Iljin 0bee527143 L-system: use named color constants 2020-08-04 19:57:23 +00:00
Alexander Iljin bfe2140148 L-system: fix compilation 2020-08-04 19:57:23 +00:00
Alexander Iljin 28bdbf8a2c L-system: resurrect from unmaintained to extra 2020-08-04 19:57:23 +00:00
Alexander Iljin 8a3d7a9d7f syntax-docs: add description of the vocab:word syntax 2020-08-01 22:32:55 +00:00
Alexander Iljin 21a1a6e7a1 syntax-docs: fix a typo 2020-08-01 22:32:55 +00:00
Alexander Iljin c496feb256 syntax-docs: remove mention of a nonexistent error 2020-08-01 22:32:55 +00:00
Alexander Iljin 5d0827ed4e totp[-docs]: accept TOTP keys in Base 32 encoding
Base 32 is the encoding, in which keys are given to Google Authenticator.
2020-07-29 17:44:07 +00:00
Alexander Iljin 92b7c32e19 totp[-docs]: change default totp-hash value to SHA-1
SHA-1 is the hash used by the Google Authenticator application, which this
vocab wanted to imitate in the first place.
2020-07-29 17:44:07 +00:00
Alexander Iljin 27d38225f4 checksums: inherit checksum-state from disposable
This allows the inherited tuples, including block-checksum-state, to be
treated like the normal disposable tuples, instead of imitating only part
of the interface.
2020-07-29 17:42:02 +00:00
Alexander Iljin fbeb409979 checksums.multi: make multi-checksum an instance of checksum
Previously it was declared to be an instance of block-checksum, which is
not necessarily the case, since the participating checksums don't have to
be block-checksums.
2020-07-29 17:42:02 +00:00
John Benediktsson 9c60c202e9 sequences.extras: move some words to assocs.extras. 2020-07-19 20:18:15 -07:00
Doug Coleman 2c488736e4 sequences.extras: Add {filter,reject}-{keys,values} 2020-07-19 10:41:51 -05:00
Alexander Iljin d1782a23cc io.pathnames-docs: fix a copy-paste error 2020-07-19 14:24:11 +00:00
Alexander Iljin 671aa228f3 math-docs: fix `times` documentation
The word `each` used to loop over integers in the past, but it does not
anymore.
2020-07-19 14:24:11 +00:00
Doug Coleman 5c3efc5cee build.sh: Fix update-boot-image help 2020-07-03 14:16:45 -05:00
Doug Coleman 464bd705f4 unix: Add more posix_spawnp and rename fork-process to call-fork.
- spawn-process will call posix_spawn()
- fork-process will call fork()

The environment variable should be used or else apps like VSCode won't open because the display isn't set.
2020-06-30 21:12:51 -05:00
John Benediktsson 3a091577ae vocabs.hierarchy: use ensure-vocab-root/prefix. 2020-06-26 20:19:24 -07:00
John Benediktsson d8f7bd067d vocabs.hierarchy: fix (disk-vocabs) on subvocabs. 2020-06-26 20:13:13 -07:00
Doug Coleman 35719d11b6 vocabs.hierarchy: Fix typo.
Closes #2314.
2020-06-26 19:17:11 -05:00
Doug Coleman 87022ea3b9 unix.linux.proc: Add cpuinfo flag "vmx flags".
Fixes #2315.

I'm not sure how this would have stopped a vocabulary from loading.

cpuinfo flags are in linux kernel repo:
 arch/x86/kernel/cpu/proc.c
2020-06-26 19:16:18 -05:00
Doug Coleman be6d8cae27 tools.dns.public: Add cloudflare dns 2020-06-23 18:20:39 -05:00
Doug Coleman b6373caa4f system-info.macosx: 11.0 2020-06-22 13:49:48 -05:00
Doug Coleman 8aa76be5ed system-info.macosx: Big Sur 2020-06-22 13:11:06 -05:00
Doug Coleman 6c02569916 build.sh: Recognize arm64 ipad/appletv. 2020-06-15 17:10:07 -05:00
John Benediktsson 0b7122350e Revert "ui.gadgets.borders: don't convert border-loc to fixnum."
This reverts commit eb7aad96c0.
2020-06-15 07:36:52 -07:00
Doug Coleman d88ed6ce63 help.cookbook: Fix typo.
Fixes #2307.
2020-06-13 08:48:00 -05:00
Doug Coleman e9ab963df9 math.bitwise: Fix example for bitfield* 2020-06-12 19:40:47 -05:00
Doug Coleman a7b058bed1 math.bitwise: I can't implement ``bitfield*`` as ``reverse bitfield``
I don't really know why. Add some tests in the docs and document bitfield*
2020-06-12 19:24:02 -05:00
Doug Coleman c87811f611 ui.backend.cocoa: fix bootstrap -- vocab does not exist. 2020-06-12 18:43:01 -05:00
Doug Coleman 8efe213273 vocabs: On use-vocab we should throw an error if the vocabulary does not exist.
Also ui.pixel-formats.private does not exist so remove that.

Fixes #2298.
2020-06-12 18:23:45 -05:00
Doug Coleman 8bc4a3f2b8 build.sh: Add OS detection for Haiku. 2020-06-10 17:05:47 +00:00
Dusk a67f2a4a05 vim/syntax: Even more fixups.
|:syn-priority| is respected now, :syn-skip & :syn-keepend are used
when appropriate, newlines don't jank stuff up, comments don't extend
match regions, numbers are much more reliable, and stack effect error
highlights return.

A feature request has even been sent to Bram.
https://github.com/vim/vim/issues/872#issuecomment-641025231
2020-06-10 03:12:30 +00:00
John Benediktsson d59cb0a672 misc/vim: change stack effects to not highlight when required
This is due to optional requirement in some forms, for example M:.
2020-06-08 12:03:54 -07:00
John Benediktsson c6f634d6a6 ui.tools.listener: re-order emacs keybinding docs. 2020-06-08 11:39:41 -07:00
John Benediktsson 0dd87cc282 misc/vim: fix NAN: highlighting, and private generic definitions. 2020-06-08 11:38:30 -07:00
John Benediktsson 17e862b801 misc: add private definitions to syntax-test file. 2020-06-08 11:21:09 -07:00
John Benediktsson f3bd6dd183 misc/vim/syntax: fix private word highlights. 2020-06-08 11:21:09 -07:00
John Benediktsson 440b56a9f0 misc/vim: dos2unix factor-docs.vim. 2020-06-08 11:21:09 -07:00
John Benediktsson d9210f738d editors.vim.generate-syntax: merge in factor.vim.fgen. 2020-06-08 11:21:09 -07:00
Doug Coleman b0b5c31821 build.sh: Change WORD size detection to use preprocessor. 2020-06-07 11:43:39 -05:00
Dusk 70cf73b032 fixup! [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
+ Error match priority should be cleaned up.
2020-06-07 05:35:13 +00:00
Dusk f70ce01b51 editors.vim.generate-syntax: Match new generation
Also update the vim/syntax README.
2020-06-06 20:32:17 -07:00
Dusk 35b8621306 [misc] vim/syntax: Fixups
(Thanks, @mrjbq7!) Now:
+ `CHAR:` literals highlight the whole next token.
+ `0b...` binary literals don't require invalid `+=0b` or `-=0b` syntax.
+ Float literals can't start with a `,` separator.
+ Float literals can have exponents with `,` separators.
+ `foo: ...` stack effects function as intended in general.
+ Syntax clusters might be a bit cleaner with `g:factor_syn_no_error`.
2020-06-06 20:31:59 -07:00
John Benediktsson 0a8cb5f2c1 misc: adding a syntax-test file. 2020-06-06 19:04:21 -07:00
John Benediktsson 61635500f2 vim: missed a char in 0b fix. 2020-06-06 19:02:21 -07:00
John Benediktsson ddf498d5ad vim: fix syntax highlighting of CHAR:, 0b, NAN:. 2020-06-06 19:00:41 -07:00
Dusk 14b1418f6a [misc] vim/syntax: Overhaul syntax highlighting
Also fixes comments in a lot more places than a few commits ago.

Syntax like the following is proper, and the comment highlighting fixes
from last commit make the incorrect highlighting here really stand out:

```factor
USE: ! only this line highlights
  kernel
```
2020-06-07 00:10:18 +00:00
Dusk 35799f8d2d [misc] vim/syntax: Avoid extra group captures 2020-06-07 00:10:18 +00:00
Dusk 686f707078 [misc] vim/syntax: Very magic patterns
From Vim's |pattern.txt|, |/\v| |/\V|:
> Use of "\v" means that after it, all ASCII characters except
> '0'-'9', 'a'-'z', 'A'-'Z' and '_' have special meaning: "very magic"

This mostly makes some upcoming syntax pattern refactoring cleaner,
though most patterns still get shorter here.
2020-06-07 00:10:18 +00:00
Dusk 11757d87fb [misc] vim/syntax: Proper comment precedence
Now comments, a lexer level feature, won't get beat out by rather normal
syntactic parser constructs like `STRUCT:`.
2020-06-07 00:10:18 +00:00
Dusk 710b54869a [misc] vim: Hygenic text width highlights
This lets Factor's overly long line highlighting avoid bleeding over
into documentation source buffers, or buffers of other non-Factor file
types entirely. Also, by taking `:2match` instead of `:match`,
clobbering of most user matches (or vice versa) can be avoided.

Unfortunately, the highlighting effects all windows in a multi-buffer
split setup, but since we can't reasonably make this a `:syntax match`
group, it'll have to do. (And this behavior isn't new.)
2020-06-07 00:10:18 +00:00
John Benediktsson 35681032d9 ui.tools.listener: change previous/next line to multiline-editor. 2020-06-06 16:47:30 -07:00
John Benediktsson 02386eebcc ui.tools.listener: document emacs-style keybindings for now. 2020-06-06 16:28:40 -07:00
John Benediktsson 4f51adf8bf Revert "ui: better support for Emacs-style key bindings."
This reverts commit 928b4c6abc.
2020-06-06 16:20:21 -07:00
John Benediktsson e446f34280 Revert "ui.gadgets.editors: adding Ctrl-u support."
This reverts commit 046d128c97.
2020-06-06 16:19:51 -07:00
John Benediktsson 5c04baf757 Revert "ui.gadgets.editors: make Ctrl-A select-all if at column 0."
This reverts commit 9287b05d57.
2020-06-06 16:19:50 -07:00
John Benediktsson 43c2ffead2 Revert "ui.tools: change Alt- to Ctrl-Shift- for tools."
This reverts commit 9c3908e003.
2020-06-06 16:19:43 -07:00
John Benediktsson a9ad206edc ui.backend.gtk: don't let input-methods steal key-presses. 2020-06-06 16:09:15 -07:00
John Benediktsson 9c3908e003 ui.tools: change Alt- to Ctrl-Shift- for tools. 2020-05-29 14:59:45 -07:00
John Benediktsson 9287b05d57 ui.gadgets.editors: make Ctrl-A select-all if at column 0. 2020-05-29 14:56:58 -07:00
John Benediktsson 09c867f747 images.pbm: use not. 2020-05-28 09:13:51 -07:00
John Benediktsson 6e23222187 logic: use not. 2020-05-28 09:13:44 -07:00
John Benediktsson 046d128c97 ui.gadgets.editors: adding Ctrl-u support. 2020-05-27 20:01:33 -07:00
John Benediktsson 928b4c6abc ui: better support for Emacs-style key bindings.
This changes a bunch of things like Ctrl-E for edit becomes Alt-E
(Cmd-E on macOS).  I think that's overall nicer, but let's play with it.
2020-05-27 19:49:30 -07:00
John Benediktsson 32fa577368 ui.gadgets.editors: can just use preedit-start>> as boolean. 2020-05-27 12:52:45 -07:00
John Benediktsson 258d7e05d6 models: cleanup docs for $slots. 2020-05-27 12:51:31 -07:00
John Benediktsson 82a34fe4b8 ui.gadgets.editors: fix off-by-one. 2020-05-27 11:50:04 -07:00
John Benediktsson c781933d6b ui.gadgets.editors: fix page-up/page-down behavior. 2020-05-27 11:43:29 -07:00
John Benediktsson f2189a32f4 ui.gadgets.editors: cleanup docs for $slots. 2020-05-27 11:43:12 -07:00
John Benediktsson c8afb239a0 ui.gestures: clean docs for $slots. 2020-05-27 11:18:20 -07:00
John Benediktsson d0a694a7fe ui.gadgets.tables: change hook>> to be called on all row-actions.
Not just when a selected-row was available and action>> was called.
Also, call the hook after the action, not before.
2020-05-27 09:59:42 -07:00
John Benediktsson 75d5a8a8f9 ui.gadgets.tables: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
John Benediktsson 3ee93ee68d lexer: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
John Benediktsson 10e19a3944 threads: cleanup docs for $slots. 2020-05-27 09:59:42 -07:00
Doug Coleman 0fb44180c0 db.sqlite.ffi: Update the sqlite3 bindings a bit. 2020-05-26 21:16:11 -05:00
John Benediktsson 130c1d8dd6 ui.gadgets.editors: fix page-up/page-down with one line. 2020-05-26 10:53:16 -07:00
John Benediktsson 8f3ce6f49a punycode: adding basic support for Punycode (RFC 3492). 2020-05-26 10:05:43 -07:00
Doug Coleman b1f29dc497 ui.backend.x11.keys: Enable numpad navigation keys for when numlock is off.
I recently got a Model F keyboard and the arrow keys weren't mapped.

To see the keycodes on Linux:

```
IN: ui.backend.x11.keys
: code>sym ( code -- name/code/f action? )
    dup . flush
    dup codes at* [ nip dup t and ] when ;
```

Also try ``USE: gesture-logger``
2020-05-22 18:18:31 -05:00
Doug Coleman 131c91b786 gesture-logger: Add as a demo! 2020-05-22 18:18:31 -05:00
John Benediktsson 02dd86a37d help.html: better tests, don't just drop the result. 2020-05-22 16:01:25 -07:00
John Benediktsson 0db8b2d012 help: some test fixes for recent behavior changes. 2020-05-22 14:41:00 -07:00
John Benediktsson ad1e4dcd11 help: change the "help" word-prop to store the actual documentation.
Change word-help to massage the $inputs and $outputs when requested.

Revert the help.lint.coverage checks to still look for $values.
2020-05-22 10:48:34 -07:00
John Benediktsson 409ce057f3 Revert "help.lint.coverage: change $values to $inputs and $outputs."
This reverts commit 61102548f4.
2020-05-22 10:47:27 -07:00
John Benediktsson 150c6a6554 help.html: adding back the link to factorcode.org.
It should probably be a cool logo or something...
2020-05-22 10:14:55 -07:00
timor 655f54af19 shell.nix: supply `wrapFactor` helper to make standalone factor binary
This adds the shell function `wrapFactor`.  This function is intended to wrap
the result of calling `build.sh` in the shell environment so it can be executed
outside of the nix shell.

Example:

```
$ nix-shell
[nix-shell] $ ./build.sh bootstrap
...build factor vm and image...
[nix-shell] $ wrapFactor .
exit
$ ./factor
```

`wrapFactor` takes the path to the factor root dir as argument, and expects the
binary `factor` and the image file `factor.image` there and uses Nixpkgs'
`makeWrapper` to wrap the `factor` executable in-place with the correct
`LD_LIBRARY_PATH`.  Afterwards, the factor executable can be called outside of
the nix-shell environment.
2020-05-22 17:11:26 +00:00
John Benediktsson 802bb073b0 help.html: better navbar on iPhone. 2020-05-22 10:03:39 -07:00
John Benediktsson e2fa0a6392 ui.backend.cocoa.views: fix jittery resize.
This could still be improved since this current approach pauses Factor
execution when the window is being resized, and it could instead
maybe detect inLiveResize or something and be smoother.
2020-05-22 08:23:20 -07:00
John Benediktsson 61102548f4 help.lint.coverage: change $values to $inputs and $outputs. 2020-05-22 08:06:36 -07:00
John Benediktsson eded28cc74 help: splitting $values into $inputs and $outputs.
This is an automatic conversion, so we can keep writing docs the way we
have been.
2020-05-21 19:47:28 -07:00
John Benediktsson 27215982e6 help.html: copy image resources to output directory.
This helps avoid needing so many different static responders in
webapps.help, and makes the documentation more self-contained.
2020-05-21 19:17:56 -07:00
John Benediktsson da8a378b38 ui.tools.error-list: changing icons from tiff to png. 2020-05-21 17:31:41 -07:00
John Benediktsson 4e498ad3b7 webapps.help: whoops. 2020-05-21 17:25:03 -07:00
John Benediktsson 2e2f1d673a help.html: support ui/tools/error-list/icons also. 2020-05-21 17:23:47 -07:00
John Benediktsson 868d970784 html.streams: move icon src mapping to help.html. 2020-05-21 17:19:36 -07:00
John Benediktsson d2114e913c syntax: allow anonymous MAIN:. 2020-05-21 14:19:43 -07:00
John Benediktsson 551e079da8 webbrowser: adding MAIN. 2020-05-20 20:26:02 -07:00
John Benediktsson 15b0f07b37 metar: add a main. 2020-05-20 19:47:47 -07:00
John Benediktsson 918436af7e websites.factorcode: update macos screenshot. 2020-05-20 11:11:57 -07:00
John Benediktsson 721cb84d2a definitions.icons: lighter open-vocab/unopen-vocab. 2020-05-20 10:46:34 -07:00
John Benediktsson e3fb39e3fe definitions.icons: prefer more isometric vocab icons. 2020-05-20 09:33:54 -07:00
John Benediktsson b277d96065 definitions.icons: fix unopen-vocab.png. 2020-05-19 21:46:46 -07:00
John Benediktsson ba80c1b6d6 definitions.icons: fix some 1x images. 2020-05-19 21:45:26 -07:00
John Benediktsson e28bcd400b help.html: use @2x images. 2020-05-19 20:53:08 -07:00
John Benediktsson 149cc270ff ui.images: fix for gl-scale-factor not being set. 2020-05-19 19:10:51 -07:00
John Benediktsson 27c9792108 ui.images: load 1x or 2x graphics. 2020-05-19 19:00:25 -07:00
timor 01a389cb68 compiler.tree.propagation.slots: remove unused word
The last use of `length-accessor?` has been removed in
8e227bc874, which obsoleted the `length` slot.
2020-05-19 10:18:15 -07:00
John Benediktsson e065e5b315 ui.theme: fix help-path-border-color to match toolbar-background. 2020-05-19 10:15:50 -07:00
John Benediktsson 1b007dd7fc Revert "ui.pens.image: allow float math."
This reverts commit 2d71fd9e22.
2020-05-19 10:00:05 -07:00
John Benediktsson fd4ddf588f ui: update more icons, including ui.tools.error-list. 2020-05-19 09:46:43 -07:00
John Benediktsson 1a3d061954 definitions.icons: minor tweak. 2020-05-19 08:25:49 -07:00
John Benediktsson 466f599d11 definitions.icons: minor tweaks. 2020-05-19 08:08:12 -07:00
John Benediktsson dc584bb671 unix.signals: bump time on tests. 2020-05-19 07:49:56 -07:00
John Benediktsson cc823e7db1 tools.profiler.sampling: bump runtime. 2020-05-19 07:46:25 -07:00
John Benediktsson 221b222f86 Revert "ui.baseline-alignment: allow floats in alignment."
This reverts commit c37e9551ad.
2020-05-19 07:41:06 -07:00
John Benediktsson 1ee94a168b ui.theme.images: minor scroll arrow fixes. 2020-05-18 21:20:10 -07:00
John Benediktsson 44003d802f ui.theme.images: minor cleanup. 2020-05-18 21:09:37 -07:00
John Benediktsson 2d71fd9e22 ui.pens.image: allow float math. 2020-05-18 20:57:03 -07:00
John Benediktsson cf5bc20b1b ui.gadgets.icons: draw icon on top of selected background. 2020-05-18 20:56:25 -07:00
John Benediktsson c37e9551ad ui.baseline-alignment: allow floats in alignment. 2020-05-18 20:53:14 -07:00
John Benediktsson c0ab4beb0c help.html: set the sizes of 2x definition icons. 2020-05-18 20:46:27 -07:00
John Benediktsson 65a3f0b6f4 ui.images: load all UI images as 2x for retina displays. 2020-05-18 20:45:58 -07:00
John Benediktsson 9635596b0b ui.gadgets.labels: only ceiling the height for now.
This might align to every other pixel on a 2x display but it fixes some
rendering artifacts with borders on subpixel boundaries.
2020-05-18 08:06:08 -07:00
John Benediktsson 06ff539b17 Revert "ui.gadgets.labels: make labels integer larger than text."
This reverts commit 0b294c5d50.
2020-05-18 08:02:06 -07:00
John Benediktsson 5d4a0b4f00 ui.gadgets.tracks: don't convert dims to floats in track-pref-dims-2. 2020-05-17 20:47:22 -07:00
John Benediktsson eb7aad96c0 ui.gadgets.borders: don't convert border-loc to fixnum. 2020-05-17 20:45:49 -07:00
John Benediktsson 0b294c5d50 ui.gadgets.labels: make labels integer larger than text. 2020-05-17 20:44:21 -07:00
John Benediktsson 65d7e3fad1 build.sh: make_boot_image can just use -run=bootstrap.image. 2020-05-17 19:55:59 -07:00
John Benediktsson d85d3e861c bootstrap.image: allow making other images in main. 2020-05-17 19:54:33 -07:00
Doug Coleman 160d1b4415 build.sh: Add self-bootstrap option. 2020-05-16 14:52:02 -05:00
Doug Coleman 75d8607643 build.sh: Only pull into current branch so we don't end up merging 2020-05-16 14:51:53 -05:00
John Benediktsson abb1755311 logic.examples.money: use lnth and leach. 2020-05-16 11:26:16 -07:00
John Benediktsson 457485dae7 ui.gadgets.labels: allow sub-pixel baseline and cap-height. 2020-05-16 11:18:11 -07:00
John Benediktsson 5f89facf9e basis/extra: replace "/ >integer" with "/i" in a few places. 2020-05-16 11:17:42 -07:00
John Benediktsson 68f6eeb3ad ui.gadgets.packs: change pack-layout not to round. 2020-05-16 11:10:18 -07:00
John Benediktsson 7b023ad59d brainfuck: inline (?) because it's not a language command. 2020-05-16 10:13:10 -07:00
John Benediktsson b3412e8930 ui.gadgets: formatting. 2020-05-16 10:07:35 -07:00
John Benediktsson 33e72abff9 ui.baseline-alignment: better stack effects. 2020-05-16 10:05:11 -07:00
John Benediktsson 824e239915 core-text: change metrics>dim not to ceiling. 2020-05-16 09:58:42 -07:00
Sergii Fesenko 4353b05cf1 io.standard-paths: fix standard-login-paths for fish shell
Fish shell automatically split variables whose name ends in "PATH" into lists,
and uses space as separator for output
Colons force fish to use standard $PATH representation
2020-05-16 07:03:23 -07:00
John Benediktsson 413cc49d3b urls: adding redacted-url to mask the password of a URL.
This is particularly useful for logging to avoid accidentally printing
passwords in web server logs.
2020-05-15 12:13:00 -07:00
Silvio Mayolo 454f192562 Added imenu tags to factor-mode for Emacs 2020-05-14 15:16:55 +00:00
Alexander Iljin 484d564b5d sodium.ffi: add the scrypt functions 2020-05-10 18:31:37 -05:00
Alexander Iljin 882050600e sodium: update copyright years in the header 2020-05-10 18:31:37 -05:00
Alexander Iljin 39ab923224 sodium: add sodium-bin>base64 2020-05-10 18:31:37 -05:00
Alexander Iljin cefb0c6e9e sodium: add sodium-base64>bin 2020-05-10 18:31:37 -05:00
John Benediktsson 05796cb497 math.bitwise: some docs cleanup. 2020-05-02 07:43:39 -07:00
Doug Coleman 94c6c8e5db math.bitwise: Add some more docs to find bits form >signed. 2020-05-01 22:49:14 -05:00
Doug Coleman c21608b0a0 math.bitwise: Add an in-order bitfield word called bitfield*. 2020-05-01 22:48:48 -05:00
John Benediktsson d27c259928 tensors: updated with the latest tensors vocab.
rebased and merged #2283
2020-04-27 20:15:33 -07:00
John Benediktsson 298bbddeb1 visionect: change http-backend to use CRLF. 2020-04-23 11:23:58 -07:00
John Benediktsson 2f8e96a6b6 visionect: handle non-post-data in visionect-post. 2020-04-21 21:18:42 -07:00
John Benediktsson eef4e17727 visionect: fix get-tclv and set-tclv. 2020-04-21 12:33:55 -07:00
John Benediktsson ecf9352a25 visionect: get http-backend working properly. 2020-04-21 12:25:37 -07:00
Steve Ayerhart e04a6e39f3 added srv parsing 2020-04-21 18:00:17 +00:00
Steve Ayerhart b9469a4acc incorrect SRV enum 2020-04-21 18:00:17 +00:00
John Benediktsson 34640fe559 bootstrap.image.upload: remove os hook from scp-name. 2020-04-21 07:05:19 -07:00
Doug Coleman bb1dbc887b bootstrap.image.upload: scp is included with windows git now.
pscp is not necessary anymore and in fact is a more effort to set up.
2020-04-21 01:18:38 -05:00
John Benediktsson 75d82c2a93 visionect: new vocab for Visionect Server Management API. 2020-04-20 14:58:51 -07:00
Doug Coleman e6b546c358 math.bitwise: Fix shift "right" to shift "left" for bitfield.
This word was really hard to understand so I reworked the docs and added another example.
2020-04-18 19:46:29 -05:00
John Benediktsson 8d4f0be202 io.files.trash: use normalize-path. 2020-04-18 09:58:40 -07:00
John Benediktsson 4cb4308a11 io.files.trash: add tags.txt for now. 2020-04-18 09:48:22 -07:00
John Benediktsson 8cf877a1cd websites.concatenative: rename cgi to gitweb. 2020-04-17 22:11:25 -07:00
Alexander Iljin a06e9cc3b2 io.files.trash.windows: convert input path to absolute in send-to-trash
The input path must be absolute, but normalize-path can't be used, because
that returns UNC path, and SHFileOperation fails on any path prefixed with
"\\?", see https://docs.microsoft.com/en-us/windows/win32/api/shellapi/ns-shellapi-shfileopstructa
Use absolute-path instead. The mixture of slashes and backslashes in the
path is tolerated, at least on Windows 10.

Add a simple unit-test.
2020-04-17 02:55:24 +00:00
Alexander Iljin 595cf81eb8 io.files.trash.windows: fix SHFILEOPSTRUCTW struct
Fix the incorrect field alignment. SHFileOperationW crashed with a memory
protection error while trying to dereference only part of the string
pointer.
2020-04-17 02:55:24 +00:00
Alexander Iljin d486e39255 ui.gadgets.charts: delete some obsolete implementation comments 2020-04-14 10:41:33 -07:00
Alexander Iljin d2b79e7185 images.viewer-docs: remove some extra spaces 2020-04-14 10:41:27 -07:00
Alexander Iljin 894571c484 compiler.tree.propagation.constraints: fix a harmless typo 2020-04-14 10:41:22 -07:00
Alexander Iljin a2978c8cb9 alien.data-docs: fix wording and punctuation in cast-array help 2020-04-14 10:41:18 -07:00
Alexander Iljin bcaba7b7c6 ui.gestures-docs: add code example to file-drop gesture documentation 2020-04-14 10:41:12 -07:00
Alexander Iljin 8af54ff2fa io.timeouts-docs: fix an example formatting
The help system highlights only the last line as the code "output", so in
this case it displayed only half of the text that way.
2020-04-14 10:41:04 -07:00
Doug Coleman 723e0e2c1a vm: Allow larger 32bit code heaps.
Code heap is artificially restricted on 32bit because PPC only had relative
jump instructions of a certain width and we punted on implementing
larger jumps.
2020-04-13 15:50:58 -07:00
John Benediktsson 5d818ccc71 mason.child: change windows code-heap from 200 to 100. 2020-04-13 13:36:10 -07:00
John Benediktsson a89474786e drive-strings: really move this time. 2020-04-13 12:53:13 -07:00
John Benediktsson 1e81dbdf17 drive-strings: move to windows.drive-strings. 2020-04-13 12:43:25 -07:00
Alexander Iljin 0b1a080bb0 sodium.secure-memory: fix a stack effect and add documentation 2020-04-13 19:33:42 +00:00
Alexander Iljin 7cda5f7e53 literals-docs: fix a copy-paste error 2020-04-13 19:33:42 +00:00
Alexander Iljin 97b07d9972 drive-strings: add a demo vocab for GetLogicalDriveStrings to extra 2020-04-13 19:33:42 +00:00
Alexander Iljin c98b49aaf4 windows.kernel32: add GetLogicalDriveStrings 2020-04-13 19:33:42 +00:00
Alexander Iljin 24eff67e60 windows.version: new vocab 2020-04-13 19:33:42 +00:00
Alexander Iljin 56ca2c3cb0 alien.data-docs: fix a typo 2020-04-13 19:33:42 +00:00
Alexander Iljin e14cd169e1 io.files.windows: rename a stack effect to make it more readable 2020-04-13 19:33:42 +00:00
John Benediktsson 61ae19d7e4 sodium: fix help-lint warnings. 2020-04-13 11:16:18 -07:00
John Benediktsson 799912b953 sodium.secure-memory: fix return type of secure-memory=. 2020-04-13 11:13:20 -07:00
John Benediktsson dc78ea1ac8 mirrors: make failures check error type. 2020-04-13 10:53:22 -07:00
Cat Stevens 90fcf7cfd5 mirrors: useless using 2020-04-13 17:52:09 +00:00
Cat Stevens 175a42bd49 mirrors: delete-at and clear-assoc are an error, fix #1757
M\ mirror delete-at and M\ mirror clear-assoc
	have been made to throw a new
	mirror-slot-removal error, because
	it doesn't make sense to remove a
	tuple slot, and this behaviour should
	not have been relied on.
2020-04-13 17:52:09 +00:00
John Benediktsson c56dd706ce io.directories: use factor for touch-file. 2020-04-13 10:28:16 -07:00
John Benediktsson f0013a8815 sodium.secure-memory: apply @AlexIljin patch for secure-memory=. 2020-04-13 09:53:39 -07:00
Alexander Iljin 87d7908063 sodium.secure-memory: new vocab 2020-04-13 15:32:00 +00:00
Alexander Iljin 7d87d1ee8a sodium.ffi: add 2020 to the copyright years 2020-04-13 15:32:00 +00:00
Alexander Iljin a2bb9f117b sodium.ffi: fix the pointer declaration syntax 2020-04-13 15:32:00 +00:00
Alexander Iljin 7a7b69c73d sodium.ffi: add the Argon2i header definitions 2020-04-13 15:32:00 +00:00
Alexander Iljin 2ba1db0362 sodium.ffi: fix the array parameters in the function declarations
Add a couple of necessary constants.
2020-04-13 15:32:00 +00:00
Alexander Iljin 142d02ce43 sodium.ffi: add some SHA hash and HMAC headers 2020-04-13 15:32:00 +00:00
Doug Coleman 1870c11c0b io.directories: The only truly cross-platform binary is Factor. 2020-04-12 13:25:24 -05:00
Doug Coleman 899c388ca7 benchmark.regex-dna: We have to read the input and output files with \n
line endings.
2020-04-12 11:23:38 -07:00
Doug Coleman 4a48297387 io: Really fix the tests. 2020-04-12 11:04:50 -05:00
Doug Coleman 32410ebca7 Windows: Handle three places where Windows line endings break the tests.
Usually we check out with Unix line endings, but if you don't set this
option, then get adds extra newlines to text files. Since there are
only three places, let's just fix them.

Fixes #2276
2020-04-12 00:05:44 -05:00
Doug Coleman 2b85b27c17 io.directories: Maybe echo is a good cross-platform test?
4a6bd57977 (commitcomment-38433000)
2020-04-11 12:48:08 -05:00
Doug Coleman 723072726e Revert "io.directories: Don't use ``touch`` because it's not default on Windows."
This reverts commit 4a6bd57977.

We don't test anything without try-process.
2020-04-11 12:39:22 -05:00
Doug Coleman 4a6bd57977 io.directories: Don't use ``touch`` because it's not default on Windows. 2020-04-10 21:44:38 -07:00
Doug Coleman cff2fde9f9 mason.child: Up the codeheap size on Windows mason tests. 2020-04-10 21:31:56 -07:00
John Benediktsson ce7cad8bd3 webbrowser: disable some tests that open windows. 2020-04-09 13:35:28 -07:00
Doug Coleman 0e5a3e2f6a openssl.libssl: Add functions to set options on SSL_CTX.
With these functions we can disable TLS1.0 and TLS1.1 someday.

Related to #2273.
2020-04-07 22:34:43 +00:00
John Benediktsson e219aad7e5 vm: lost a character somehow. 2020-04-07 11:40:04 -07:00
John Benediktsson 5c98ba78cb vm: quick fix for compilation warning. 2020-04-07 11:38:48 -07:00
Doug Coleman f5d0b8bfb0 sodium: Less stack shuffling in test. 2020-04-07 00:52:29 -05:00
John Benediktsson 2c014197c7 mason.test: change mason to load roots in order.
This will allow us to know when core depends on basis, or basis on
extra, because they should get load errors.
2020-04-03 09:44:45 -07:00
John Benediktsson 2c378da929 furnace.actions: better using. 2020-04-02 20:00:56 -07:00
John Benediktsson c4d179643b furnace.actions: cleanup using. 2020-04-02 17:31:41 -07:00
John Benediktsson a785e279d5 windows.iphlpapi: use follow, it's simpler. 2020-04-02 17:30:13 -07:00
John Benediktsson 94d97a20f5 basis/extra: move tools. 2020-04-02 17:06:50 -07:00
John Benediktsson 7deab681c6 io.encodings.utf7: skip over first char when searching. 2020-04-02 12:32:05 -07:00
John Benediktsson 605dad2406 io.encodings.utf7: revert last patch, fixed and faster. 2020-04-02 10:54:51 -07:00
John Benediktsson 3b1464630c cli.git: revert process-contents patch. 2020-04-02 09:53:56 -07:00
John Benediktsson de3b74d1c6 basis/extra: move fewer things. 2020-04-01 21:37:28 -07:00
John Benediktsson 42cf41e616 Revert "basis: Move any vocabularies required by basis into basis."
This reverts commit 59c2956570.
2020-04-01 21:37:28 -07:00
John Benediktsson 33eb8a7837 Revert "basis: Move more extra to basis."
This reverts commit 2d85dafa98.
2020-04-01 21:37:28 -07:00
Alexander Iljin 7e4c854714 rosetta-code.multisplit: reduce memory usage
Avoid creating a filtered sequence when all we need is its first element.
2020-04-02 01:50:01 +00:00
Alexander Iljin 9b143a826d rosetta-code.multisplit: new vocab 2020-04-01 23:21:52 +00:00
Doug Coleman 0f9959a15b build.sh: Only find the mingw compiler on Windows.
Fixes #2269
2020-03-30 20:37:38 -05:00
Doug Coleman 905e2cfb6b build.sh: Support MINGW64 as 64bit Windows.
This is for msys2 64bit mode.
2020-03-30 17:31:35 -05:00
Doug Coleman 45d090738d build.sh: Only support 32/64bit word sizes. 2020-03-30 17:28:02 -05:00
Doug Coleman 2d85dafa98 basis: Move more extra to basis.
I missed these because they were already loaded in my saved image.
2020-03-28 10:39:06 -05:00
Doug Coleman 59c2956570 basis: Move any vocabularies required by basis into basis. 2020-03-28 09:30:37 -05:00
John Benediktsson 497d6491e6 formatting: simplify using assoc>map instead of unzip map map zip. 2020-03-24 11:13:55 -07:00
John Benediktsson 5525313757 formatting: support other sequences in printf. 2020-03-24 11:11:15 -07:00
Doug Coleman 5cc97a4d1b unix.process: Add posix_spawn stub.
I couldn't get this to work in all cases to replace spawn-process yet.

```
! works
{ "/bin/ls" "-al" } posix-spawn-args-with-path

! Broken on Linux64 for some reason
{
    "/usr/bin/code"
    "-g"
    "-r"
    "/home/erg/factor-master/basis/io/launcher/launcher.factor"
} posix-spawn-args-with-path
```
2020-03-15 17:23:21 -05:00
Doug Coleman 8c97ea20de build.sh: Tab snuck into my commit... 2020-03-15 13:46:42 -05:00
Doug Coleman c23230ed82 windows: Move types to ole32 2020-03-15 13:31:46 -05:00
Doug Coleman 1abde46c79 windows: Move IStream to windows.com to fix bootstrap. 2020-03-15 13:21:38 -05:00
Doug Coleman 172649f667 factor: Update all repos to point to github.com.
factorcode.org repo can get behind the github one due to #1862 and low RAM on the new factorcode.org server

Change strategy for calling git fetch to not include the branch name if we are on a detached HEAD
2020-03-15 13:06:02 -05:00
Cat Stevens 426d8f09b2 fix various typos; cleanup and fully document boyer-moore 2020-03-15 14:58:43 +00:00
kusumotonorio d8f813a531 Reduced stack waste, added LOGIC-RED: and LOGIC-VAR:, a little speed up. 2020-03-15 03:22:57 +00:00
John Benediktsson ee4e977fbb ui.text.core-text: apply @kusumotonorio patch. 2020-03-11 20:59:20 -07:00
Doug Coleman 85d15e865a windows: Add more COM code. 2020-03-10 18:34:24 -05:00
John Benediktsson 717dce055a images.loader: fix tests. 2020-03-10 10:20:21 -07:00
Doug Coleman d98f0134ab images.loader: fix using and kick the tires 2020-03-10 09:57:47 -05:00
Doug Coleman 39f8abc764 images.loader: Disable saving a bmp on win32.
This is probably fixable with enough auditing of the gdiplus flat
interface.
2020-03-10 03:53:14 -05:00
Doug Coleman fcc225466f vm/allot.hpp: Print more room info when allot() fails.
This is to help debug win64.

Some interesting observations:

fails without any error:
factor.com -codeheap=74000

fails with VirtualAlloc error:
factor.com -codeheap=80000
2020-03-10 03:33:20 -05:00
Doug Coleman 96d3482475 windows: Fix user32/shcore DPI functions. 2020-03-09 21:59:10 -05:00
Doug Coleman 67d5e633f1 nmake: Fix caching on Windows when compiling without a manifest. 2020-03-09 17:30:24 -05:00
Doug Coleman 37871d87f4 windows: Add a bunch of HighDPI functions. 2020-03-07 13:26:25 -06:00
Doug Coleman fe83a4a164 vm: Add AS_UTF and use it to print wchar_t in Windows terminal.
There may be more places to add AS_UTF8 calls--anywhere that prints a
wchar_t string in the Windows vm.

Fixes #992.
2020-03-06 23:57:57 -06:00
Doug Coleman 34029cf1e4 Nmakefile: Add default flags and add command to add the manifest to .exe
The manifest is disabled for now, but once we fix the resolution we
should enable it.

to test:
nmake /f Nmakefile factor.exe.manifest

Right now the UI looks tiny if you compile for the factor.exe and
include the manifest.

Lastly, sorry for the WIP but it seems pretty harmless and has been
sitting in a branch for almost three years.
2020-03-06 23:33:26 -06:00
Benjamin Pollack bafb101b7a windows; add functions to determine DPI scaling 2020-03-06 23:21:02 -06:00
Niklas Larsson 8df1d1fbe6 cache: Don't use in-place filter
This solves a UI corruption problem by not reusing the hashtable when
purging the cache. The root cause of why the hashtable gets corrupted
when filtering in place hasn't been found.

Fixes #1978.
2020-03-06 23:14:44 -06:00
nomennescio d1be15c28d Added instructions on fetching replace objects for source history 2020-03-06 23:03:42 -06:00
Doug Coleman 96b891f5d8 images.loader: Windows can save bmp files.
If there is a crasher, we can debug it.
2020-03-06 22:59:30 -06:00
Doug Coleman 9bb9afd5cc ui.render.test: Replace reference image with an uncorrupted one.
To generate a rendering image:

USE: ui.render.test
"ui-render-test" run
render-output get-global "resource:reference.bmp" save-graphic-image

Fixes #2210.
2020-03-06 19:37:02 -06:00
Doug Coleman d188bcf592 images.loader.gdiplus: Allow writing .bmp and do a better lookup. 2020-03-06 19:35:16 -06:00
Doug Coleman 97532d020a ui.gadgets: Stale gestures can lose the associated gadget.
The gesture queue can send messages where the
focusable-child has disappeared.

Handle ``M: f focusable-child*`` by doing nothing.

Fixes #2117.
2020-03-06 19:05:27 -06:00
Doug Coleman 8da5c2fc91 windows.ole32: Add more LONG: constants. 2020-03-06 19:05:07 -06:00
Doug Coleman 92cb20163f windows.ole32: Add more error constants as long.
These are -2B..2B instead of positive integers because long is s32 on
Windows.
2020-03-06 17:53:38 -06:00
John Benediktsson 7eee21ab94 vocabs.metadata: cleanup a couple uses of metadata paths. 2020-03-05 09:33:41 -08:00
John Benediktsson d94b135087 vocabs.metadata: cleanup paths to be fully specified. 2020-03-05 08:59:36 -08:00
John Benediktsson 3efe23cc71 ui.gadgets.panes: fix tests under dark-theme. 2020-03-03 15:23:18 -08:00
John Benediktsson 0be0c69ea5 pdf: heuristic for dealing with table wrapping. 2020-03-03 11:31:00 -08:00
John Benediktsson 9d16162371 pdf.values: fix names for some fonts. 2020-03-03 11:09:11 -08:00
John Benediktsson 5a1b773899 help.pdf: use 1.25 line-height on pdf. 2020-03-03 09:46:45 -08:00
John Benediktsson b23fc52850 pdf.canvas: add concept of line-height multiplier. 2020-03-03 09:46:32 -08:00
John Benediktsson ab81a957c9 logic.examples: cleanup, make hanoi tests assert output. 2020-03-03 08:09:52 -08:00
kusumotonorio 4ecc1110c8 logic.factor: [ quot call( -- ) ] --> quot 2020-03-03 15:59:07 +00:00
kusumotonorio 14ac76fc2c factlog vocab ==> logic vocab 2020-03-03 15:59:07 +00:00
kusumotonorio a37cb9857a Rename directory, files. 2020-03-03 15:59:07 +00:00
kusumotonorio 431282afcf catb0t's PR: add a Prolog-like %! ... multiline comment #6 2020-03-03 15:59:07 +00:00
kusumotonorio c760a5aa8f factlog 2020-03-03 15:59:07 +00:00
John Benediktsson a462587833 html.templates.chloe: adding missing tests. 2020-03-02 19:01:01 -08:00
John Benediktsson 8fd4552b45 webapps.planet: use factor color. 2020-03-02 17:07:30 -08:00
John Benediktsson c57580b06a webapps.wiki: remove footer border-top. 2020-03-02 17:03:25 -08:00
John Benediktsson 711297690b websites.concatenative: navbar background. 2020-03-02 17:01:01 -08:00
John Benediktsson 36553b34fb webapps.wiki: better spacing on article list. 2020-03-02 16:07:09 -08:00
John Benediktsson 290d0ed7d2 html.templates: adding meta tag and some chloe tests. 2020-03-02 15:57:19 -08:00
John Benediktsson 3b18827044 tools.errors: fix to match current behavior: "show". 2020-03-02 15:40:37 -08:00
John Benediktsson ab9eca2454 bootstrap.image: add make-my-image to docs. 2020-03-02 15:40:22 -08:00
John Benediktsson b9bd328f2e webapps: remove floating factorcode.org links. 2020-03-02 15:39:53 -08:00
John Benediktsson 9abc2ae873 webapps.help: matching style for navbar. 2020-03-02 08:48:25 -08:00
John Benediktsson 5acf0512b9 websites.concatenative: make navbar use line-height. 2020-03-02 08:44:17 -08:00
John Benediktsson 52d371320f webapps.wiki: 24px hamburger instead of 32px. 2020-03-02 08:40:23 -08:00
John Benediktsson 1c1d23fd99 webapps.help: responsive search. 2020-03-02 07:03:55 -08:00
John Benediktsson a8d35345c4 extra: moving hash-sets.numbers, hashtables.numbers to basis. 2020-03-01 20:50:58 -08:00
John Benediktsson 50bd41d82f help.html: move pre-wrap to css style fixup. 2020-03-01 18:32:47 -08:00
John Benediktsson 2c43df72ea html.streams: fix tests. 2020-03-01 18:32:35 -08:00
John Benediktsson 522bc97e87 webapps.planet: a bit more style. 2020-03-01 14:41:03 -08:00
John Benediktsson 70fba55732 webapps.planet: more responsive css. 2020-03-01 14:35:04 -08:00
John Benediktsson 77fd680475 webapps.planet: use div to style post body. 2020-03-01 13:49:06 -08:00
John Benediktsson b6853b8c6a webapps.pastebin: more padding. 2020-03-01 13:46:41 -08:00
John Benediktsson a07af0b593 webapps.wiki: style the header. 2020-03-01 13:46:27 -08:00
John Benediktsson 670f5a77a7 webapps.wiki: tweak line-height to fix issue with title. 2020-03-01 13:31:08 -08:00
John Benediktsson d326e8f788 webapps.wiki: simplify and fix resize issue on mobile. 2020-03-01 12:20:32 -08:00
John Benediktsson 9336cd6efc webapps.wiki: some responsive css (and JS for hamburger menu). 2020-03-01 12:12:08 -08:00
John Benediktsson 18a1d07d05 websites.concatenative: write script (if any) from children. 2020-03-01 12:11:31 -08:00
John Benediktsson 5967033fe5 html.templates: adding t:script and t:write-script. 2020-03-01 12:05:59 -08:00
John Benediktsson c64d9032b5 help.html: more responsive help docs. 2020-03-01 10:27:22 -08:00
John Benediktsson e07abedafe html.streams: monospace uses pre-wrap, wrap-margin sets width. 2020-03-01 10:27:22 -08:00
Cat Stevens 573e4ed198 math.matrices: fix/rename mnorm, update all norms
closes #2244

- `mnorm` has been renamed to `normalize-matrix`
	to reflect what it actually does, which
	is normalize a matrix, not find a norm
	of a matrix.

- `mnorm` is no longer a word defined here.

- bugfix: previously, `normalize-matrix` found
	the supremum of a matrix (`mmax`),
	before taking the supremum's absolute
	value (`abs`) and dividing the matrix
	by it (`m/n`).
	for matrices containing only negative
	values and 0, the supremum is 0, and
	a `div-by-zero` error was thrown.

	`normalize-matrix` has been fixed to
	first `abs` all the matrix elements,
	and then find the supremum and divide,

	it also receieved a zero-matrix? guard
	for optimization and preventing
	`div-by-zero`.

- new alias: `hilbert-schmidt-norm` for
	`frobenius-norm`,  to go along with
	`math.matrices.extras.<hilbert-matrix>`
	and improve searchability by physicists.

- new word: `matrix-p-norm`, written as an
	analogue of `math.vectors.p-norm`.

- new word: `matrix-p-q-norm`, which generalizes
	entrywise matrix norm over the L^p,q
	vector space.

- new word: `matrix-p-norm-entrywise`:
	`matrix-p-norm`'s fallback
	for p =/= 1, 2, inf; analogue of
	`math.vectors.p-norm-default`.

- all norm words have gotten new docs,
	`zero-matrix?` guards as an optimisation,
	and most have gotten new tests.
2020-03-01 03:31:28 +00:00
John Benediktsson 2511fa72de websites.concatenative: fix for xhtml. 2020-02-29 08:25:52 -08:00
John Benediktsson f169051860 websites.concatenative: device viewport css. 2020-02-29 08:25:16 -08:00
John Benediktsson 50f0d241b7 websites.factorcode: some downloads style. 2020-02-29 08:21:41 -08:00
John Benediktsson 24b85d774f websites.factorcode: give logo a width also. 2020-02-29 08:14:10 -08:00
John Benediktsson 5c758c7018 websites.factorcode: better mobile responsive css. 2020-02-29 08:06:59 -08:00
John Benediktsson 6599869f73 prettyprint.backend: make +nil+ render as L{ }. 2020-02-29 07:16:46 -08:00
John Benediktsson 0139e0d081 websites.factorcode: tinypng the logo. 2020-02-28 14:25:35 -08:00
John Benediktsson 835a83d311 websites.factorcode: more examples. 2020-02-28 13:16:58 -08:00
John Benediktsson 9237a4f289 websites.factorcode: more examples. 2020-02-28 13:04:46 -08:00
John Benediktsson ed3cdf7ec7 websites.factorcode: smaller fonts in downloads table. 2020-02-28 12:03:07 -08:00
John Benediktsson dc8e6e6799 ui.gadgets.paragraphs: need to merge height/metrics.
Sometimes cap-height is false and we handle that differently.
2020-02-27 21:53:39 -08:00
John Benediktsson 086269ba34 help.html: default font size should be 12pt, less line-height for pre. 2020-02-27 21:44:32 -08:00
John Benediktsson 2379d27950 ui.gadgets.paragraphs: faster pref-dim.
Now computing gadget-metrics once, before called (measure-metrics) twice,
the first time adding the result, the second time dropping the top of stack.
2020-02-27 18:10:37 -08:00
John Benediktsson 12079725ac webapps: pre tag line-height. 2020-02-27 17:25:20 -08:00
John Benediktsson 741d9e2dd6 webapps.wiki: moving class description to wiki.css. 2020-02-27 17:21:33 -08:00
John Benediktsson ba09d70b8b help.html: raise line-height to 150%. 2020-02-27 16:49:48 -08:00
John Benediktsson d3337d566e Revert "webapps.help: just include the original css instead of duplicating."
This reverts commit 77b0c45a13.
2020-02-27 16:41:20 -08:00
John Benediktsson 77b0c45a13 webapps.help: just include the original css instead of duplicating. 2020-02-27 16:27:15 -08:00
John Benediktsson 490c66ef5d webapps.help: sync with help.html. 2020-02-27 16:09:03 -08:00
John Benediktsson d732e87cfa help.html: less css reset. 2020-02-27 16:08:33 -08:00
John Benediktsson db1069a6dd websites.concatenative: move container div to page.xml. 2020-02-27 15:11:55 -08:00
John Benediktsson c719b096a5 webapps.planet: minor fixes. 2020-02-27 14:44:19 -08:00
John Benediktsson 4241854f94 webapps.pastebin: updated css style. 2020-02-27 14:44:05 -08:00
John Benediktsson e329d3d9c2 webapps.planet: use protocol agnostic link. 2020-02-27 14:41:13 -08:00
John Benediktsson 7ec954ec05 help.html: use protocol agnostic link. 2020-02-27 14:40:50 -08:00
John Benediktsson d2eb77e849 webapps.planet: some css cleanup. 2020-02-27 14:28:51 -08:00
John Benediktsson 83f47eb209 help.html: make these match new wiki css. 2020-02-27 13:15:53 -08:00
John Benediktsson de6d2e2ccd webapps.wiki: forgot this file. 2020-02-27 12:49:46 -08:00
John Benediktsson 79f1b8e409 websites.concatenative: cleanup css a bit. 2020-02-27 12:49:22 -08:00
Doug Coleman b546d88e83 extra: Finish renaming a couple words 2020-02-27 01:04:52 +00:00
John Benediktsson b1a70d47a4 websites.factorcode: a couple more examples. 2020-02-26 17:00:07 -08:00
John Benediktsson 391e3734ee websites.factorcode: first pass cleanup of website. 2020-02-26 16:46:05 -08:00
John Benediktsson 43b82b03ad math.vectors: rename "h." to "hdot" 2020-02-26 13:06:52 -08:00
John Benediktsson da5d010c5b math.vectors.simd: fix typo in simd vdot intrinsic. 2020-02-26 12:56:52 -08:00
John Benediktsson 07a5912afa math.matrices: rename m./m.v/v.m to mdot/mdotv/vdotm. 2020-02-26 12:51:04 -08:00
John Benediktsson 1c5d417100 math.vectors: rename "v." to "vdot" 2020-02-26 12:40:16 -08:00
John Benediktsson 29054e53e8 help.markup: make sure lists wrap wider. 2020-02-26 12:02:20 -08:00
John Benediktsson 95b695d664 fjsc: remove unnecessary stack effects on generic words. 2020-02-26 11:34:23 -08:00
John Benediktsson 385c5edf1a calendar: remove unnecessary effects on generics. 2020-02-26 11:34:02 -08:00
John Benediktsson 6ee821e061 prettyprint.stylesheet: s/stack-effect-style/base-effect/style/. 2020-02-26 11:18:18 -08:00
John Benediktsson 049271d04e help.markup: cleanup using. 2020-02-26 11:08:13 -08:00
John Benediktsson 59ddb844e9 prettyprint.stylesheet: change stack effects to not be green. 2020-02-26 11:07:46 -08:00
John Benediktsson 2cbcacad88 core/basis/extra: update some tags.txt. 2020-02-26 10:57:08 -08:00
John Benediktsson 522f30e520 xml.writer: remove M\ number write-xml.
This is likely an artifact from when numbers were treated as sequences,
which isn't needed anymore.
2020-02-26 10:24:23 -08:00
John Benediktsson 994ecb655b help.html: assume even padding started out odd. 2020-02-26 10:03:35 -08:00
John Benediktsson 6796daab79 help.html: clone attrs in css-styles-to-classes and double padding. 2020-02-26 09:44:14 -08:00
John Benediktsson 15d6762449 help.markup: change $breadcrumbs to unicode. 2020-02-26 09:40:27 -08:00
John Benediktsson 6aa7d52473 ui.tools.browser: use unicode next/prev arrows. 2020-02-26 09:22:48 -08:00
John Benediktsson c03a7b5ec2 ui.gadgets.panes: simplify <styled-label>. 2020-02-25 12:33:01 -08:00
John Benediktsson 94fcf3f2b6 html.streams: allow div-css-style to use span-css-style. 2020-02-25 12:30:51 -08:00
John Benediktsson 404aa1bc92 Revert "html.streams: use style-stream."
This reverts commit 6f9a7dcc9e.
2020-02-25 12:10:42 -08:00
John Benediktsson 0d6096df0a vm: use FILE_READ_ATTRIBUTES to make exists? faster. 2020-02-25 11:05:17 -08:00
John Benediktsson 08dd854b15 lists: check for errors like L{ . 3 }. 2020-02-24 09:11:46 -08:00
John Benediktsson 20f0b8aa28 lists: make multiple dots a syntax error. 2020-02-23 07:29:02 -08:00
John Benediktsson 79add00e24 help.html: don't use sprintf. 2020-02-22 20:40:11 -08:00
John Benediktsson 83e46eb030 lists: simplify parse-list-literal to fix bootstrap issue. 2020-02-22 20:37:10 -08:00
kusumotonorio 0f6ec42e3e lists.factor: rest: --> . 2020-02-22 19:58:55 -08:00
kusumotonorio 384f976deb lists.factor: Added some vocab 2020-02-22 19:58:55 -08:00
kusumotonorio a38b3dfd83 Supports dotted pair notation 2020-02-22 19:58:55 -08:00
John Benediktsson 189b54998d Revert "help.markup: separate examples using newlines."
This reverts commit 76fcbdc690.
2020-02-22 19:49:41 -08:00
John Benediktsson 2ee8635f1e help.stylesheet: make some fonts bigger. 2020-02-19 21:55:29 -08:00
John Benediktsson b73b3e04f9 help: simplify navigation-table. 2020-02-19 21:47:01 -08:00
John Benediktsson 76fcbdc690 help.markup: separate examples using newlines. 2020-02-19 21:47:01 -08:00
John Benediktsson e0e58a62c5 ui.tools.browser: change $navigation to not use title-style. 2020-02-19 21:47:01 -08:00
John Benediktsson 1a84cede3b ui.gadgets.panes: change approach to nested-pane-stream. 2020-02-19 21:47:01 -08:00
John Benediktsson a7682c9854 io.styles: change style-stream to inherit all styles by default. 2020-02-19 21:47:01 -08:00
John Benediktsson fa31902975 ui.tools.error-list: adding table header emphasis. 2020-02-19 21:47:01 -08:00
Doug Coleman a91fbb54b0 syndication: Property can be present but f, handle this.
Test case:
    "http://www.spreaker.com/show/2952221/episodes/feed" http-get nip parse-feed
2020-02-18 18:43:49 -06:00
Doug Coleman 02445393c8 factorcode: Friendship ended with RACKSPACE. Now DIGITALOCEAN is my best friend 2020-02-18 14:18:53 -06:00
John Benediktsson 3aa71bcb84 help.html: cleanup stylesheet a bit. 2020-02-17 14:50:48 -08:00
John Benediktsson ff35f79f3e help.html: change fixed font-size to relative. 2020-02-17 14:50:30 -08:00
John Benediktsson c8e4d9fa69 Revert "io.streams.ansi: use call-next-method."
This reverts commit dbb83b7100.
2020-02-17 07:09:12 -08:00
John Benediktsson abbfedc53d Revert "io.streams.256color: use call-next-method."
This reverts commit 4af73340d2.
2020-02-17 07:08:56 -08:00
John Benediktsson 2e5cec428a help.markup: adding a $slots word to document slots, use it. 2020-02-16 22:36:19 -08:00
John Benediktsson 7de25b9f20 ui.gadgets.panes: make it clear that pane/pack/paragraph are not streams. 2020-02-16 19:23:29 -08:00
John Benediktsson f651c8fd9a ui.gadgets.pane: rename pane-clear to clear-pane. 2020-02-16 19:17:29 -08:00
John Benediktsson 8976014697 help.html: support style/class replacement in more tags. 2020-02-15 10:27:22 -08:00
John Benediktsson dbb83b7100 io.streams.ansi: use call-next-method. 2020-02-15 09:36:06 -08:00
John Benediktsson 4af73340d2 io.streams.256color: use call-next-method. 2020-02-15 09:35:57 -08:00
John Benediktsson 7b0f6efe7f ui.gadgets.panes: use style-stream. 2020-02-15 09:35:09 -08:00
John Benediktsson 6f9a7dcc9e html.streams: use style-stream. 2020-02-15 09:33:55 -08:00
John Benediktsson 4a05a845bc io.styles: rename do-nested-style, make private. 2020-02-15 09:22:41 -08:00
John Benediktsson 1e8b405307 io.streams.256color: use filter-writer. 2020-02-15 08:57:18 -08:00
John Benediktsson e822e78afd io.streams.ansi: use filter-writer. 2020-02-15 08:57:09 -08:00
John Benediktsson d0a44d665e io.styles: only allow character styles to inherit. 2020-02-15 08:42:06 -08:00
John Benediktsson 70c8b35f62 slides: unify default-style and code-style. 2020-02-15 08:40:44 -08:00
John Benediktsson be746c1f6d help: unify code-char-style and code-style. 2020-02-15 08:40:21 -08:00
John Benediktsson 647a477d68 help.html: vertical-align images. 2020-02-14 22:31:12 -08:00
John Benediktsson 75db2b0d4a help.markup: change default-style to use with-nesting. 2020-02-14 22:18:38 -08:00
John Benediktsson 1da20adc63 help: change $title to only use with-nesting. 2020-02-14 22:17:41 -08:00
John Benediktsson 6adabbdf2d io.styles: simplify style-stream by depending on style words. 2020-02-14 21:28:05 -08:00
John Benediktsson 3b08633604 help.html: whoops, need to remove the extra links. 2020-02-13 21:52:43 -08:00
John Benediktsson ba81ca3fa6 help.html: tweak the navbar a bit. 2020-02-13 21:43:24 -08:00
John Benediktsson d890f410bf help.html: use max-width for content. 2020-02-13 21:07:25 -08:00
John Benediktsson de294563d1 help.html: wrap contents in a div, update style a little. 2020-02-13 21:01:47 -08:00
John Benediktsson a3730c329a help: change $title to nest then style.
This changnes the HTML we produce to look like:

    <div><span>...</span></div>

Instead of:

    <span><div>...</div></span>
2020-02-13 21:01:03 -08:00
John Benediktsson 02ec3531c3 help.markup: more bold table headings. 2020-02-13 15:20:17 -08:00
John Benediktsson 38bfcd4bf1 help: add more bold table headings. 2020-02-13 15:18:43 -08:00
John Benediktsson dc0a5ba216 help: add some bold table headings. 2020-02-13 15:07:15 -08:00
John Benediktsson b94d9662f9 bootstrap.image: define MAIN: to make-my-image. 2020-02-13 14:56:35 -08:00
John Benediktsson c850d38e6c generic.math: some minor cleanup. 2020-02-13 14:54:46 -08:00
John Benediktsson bcecb3b088 markov-chains: initial implementation. 2020-02-13 14:26:40 -08:00
Doug Coleman 5cb26d546f windows.gdiplus: flags{ } is in literals, fix using 2020-02-13 06:25:21 +03:00
John Benediktsson 0ce27a4507 gpu.framebuffers: simplify bitor. 2020-02-12 17:00:34 -08:00
John Benediktsson e4aae0871c opencl: use flags{ }. 2020-02-12 17:00:19 -08:00
John Benediktsson ec0326fee9 io.files.trash.windows: using flags{ }. 2020-02-12 14:33:30 -08:00
John Benediktsson 42e49f432c vocabs.loader: fix alignment of last patch. 2020-02-12 13:54:11 -08:00
John Benediktsson 38eab40848 vocabs.loader: prevent create-vocab if check-vocab fails. 2020-02-12 08:42:56 -08:00
John Benediktsson 6c06054ed6 tetris.game: fix tests. 2020-02-12 08:38:41 -08:00
John Benediktsson bd0369e4e1 x11.xim: fix use of flags. 2020-02-12 08:37:13 -08:00
John Benediktsson 2e644a2c7b tetris: some cleanup, simplify. 2020-02-11 13:57:19 -08:00
John Benediktsson d2ab01a5d9 core/basis/extra: use flags{ } in places. 2020-02-11 13:27:42 -08:00
John Benediktsson fe929be0f4 io.directories.windows: don't need to wrap. 2020-02-11 13:25:44 -08:00
John Benediktsson 4e91f55f1e vocabs.hierarchy: change sorting to sort visible-dirs. 2020-02-09 10:00:18 -08:00
John Benediktsson 1a1ee4b4a8 vocabs.hierarchy: faster all-disk-vocabs-recursive.
The old technique caused a high amount of redundant ``exists?`` checks,
even though we are traversing the directory tree.  That happens to be a
little slow on Windows, for some pathological reason, the first time
it's run. This should make it better while we also investigate why
``windows_stat`` is slower in that case.
2020-02-09 09:04:14 -08:00
John Benediktsson b430f8e0a7 io.files.windows: make win32-file-attributes a little faster. 2020-02-07 14:11:43 -08:00
John Benediktsson dfc4901857 math.statistics: adding interquartile-range, midhinge, and fivenum. 2020-02-06 11:40:53 -08:00
John Benediktsson 67bf39f0fb tensors: cleanup using, and make a few float math operations faster. 2020-01-30 13:39:27 -08:00
John Benediktsson 2200468755 gobject-introspection: support more number type constants. 2020-01-30 08:23:13 -08:00
Chris Double 487141d440 Fix linux find-so failure if no old ld entries exist
If '/etc/ld.so.cache' does not contain any old entries
using the 'HeaderOld' struct then it fails with a bad-magic
error before looking for the HeaderNew entries.

My Ubuntu 19.10 system doesn't have any old entries so always
fails here when using 'load-all', which results in the
'extra/llvm' vocab failing due to using 'find-so'.

The fix implemented here is to catch the error and recover from
it by seeking back to the start of the header before looking for
the new header entries.
2020-01-29 06:17:37 -08:00
John Benediktsson dfdbde9f33 math.matrices: use any? and all? directly in tests. 2020-01-28 20:44:19 -08:00
John Benediktsson 464f0a11ef math.matrices: update using on tests. 2020-01-28 20:38:43 -08:00
John Benediktsson 2300311641 bittorrent: fix check-bitfield, add a test. 2020-01-28 16:25:19 -08:00
John Benediktsson 6aa8f640c8 persistent.hashtables: cleanup. 2020-01-28 16:22:33 -08:00
John Benediktsson 548109bf4b math: use sorted-histogram values in a few places. 2020-01-28 16:21:33 -08:00
John Benediktsson 94cbe2b479 ui.gadgets.panes: fix for big strings on windows and linux.
Using 3639 grapheme length, which is win32 limit. Maybe cairo supports
4681 graphemes, but use the lower limit for now.
2020-01-28 16:16:09 -08:00
John Benediktsson a62ea78d73 ui.backend.cocoa.views: some formatting cleanup. 2020-01-24 14:47:42 -08:00
kusumotonorio fb3928f807 Tests for System V AMD64 ABI (#2233)
* Adds Tests for System V AMD64 ABI

* Remove TABs, etc.

* Adds a test

* Some Cleanup

* Add Callback Tests

* Add More Tests
2020-01-24 21:54:33 +00:00
John Benediktsson 4e17fb13cb
Merge pull request #2235 from kusumotonorio/system-v-amd64-abi
Improved System V AMD64 ABI compliance
2020-01-24 21:52:40 +00:00
John Benediktsson eb4c6cf711 bittorrent: initial commit of message parsing. 2020-01-24 13:47:20 -08:00
Doug Coleman d992e87cd6 LICENSE.txt: Update the copyright year! 2020-01-23 19:44:03 -06:00
kusumotonorio 1eaa895c8a unix.factor: Bug fix etc., boxing.factor: Improves record/unrecord-reps 2020-01-23 20:02:03 +09:00
kusumotonorio 95519b0130 boxing.factor: Swap first and second positions 2020-01-20 20:47:16 +09:00
kusumotonorio 7349f9d953 boxing.factor: Use count 2020-01-20 20:38:43 +09:00
kusumotonorio aba3d66849 unix.factor: Use count 2020-01-20 18:53:26 +09:00
kusumotonorio 56c6e3058b put alien.factor, ffi_test.* back 2020-01-19 22:30:48 +09:00
kusumotonorio e6726acd02 put alien.factor back 2020-01-19 22:27:17 +09:00
kusumotonorio c258a4e2f4 Add Callback Tests 2020-01-19 21:57:05 +09:00
kusumotonorio 2ee51f50e2 Stop inc-not-f and dec-not-f, etc 2020-01-19 14:30:38 +09:00
Doug Coleman ada064d9c3 byte-arrays: Add a byte-sequence protocol for byte-{array,vector}
Allow hexdumping strings as utf8 for convenience.
2020-01-16 18:18:46 -06:00
kusumotonorio bb7777e0cf boxing.factor: Change Stack Effects 2020-01-16 23:34:24 +09:00
kusumotonorio d581322225 Remove an extra space 2020-01-16 21:06:22 +09:00
kusumotonorio 5bee1ba3a1 Improve System V AMD64 ABI compliance 2020-01-16 20:57:13 +09:00
John Benediktsson d593d3d953 tuple-arrays: final-class wasn't a predicate class. 2020-01-15 13:54:40 -08:00
John Benediktsson 8c5e9a7df4 classes: fix a couple of check-instance uses. 2020-01-15 13:33:50 -08:00
John Benediktsson 19c8d482fb continuations: more use of check-instance. 2020-01-15 10:52:34 -08:00
John Benediktsson 77cd3aaede classes: use check-instance in a few places, to remove duplication. 2020-01-15 10:34:47 -08:00
John Benediktsson cd75a7eb4e classes: adding a check-instance for checking type of things.
This will replace a bunch of not-a-thingy errors that we have in a few
places.  Those should probably go away anyway, in favor of better type
propagation or runtime JIT compilation.
2020-01-15 10:29:06 -08:00
John Benediktsson b3582dd323 urls.encoding: support byte-array values for encoding. 2020-01-09 14:17:01 -08:00
John Benediktsson c2270fbe6a bencode: support decoding byte-arrays. 2020-01-09 11:57:20 -08:00
John Benediktsson 7565b372e7 bencode: alloe bencode of byte-arrays. 2020-01-08 17:33:11 -08:00
Doug Coleman 4acb08d905 tools.deploy: Up the deploy sizes for mac32.
Looks like upgrading to unicode 12 caused the sizes to grow. These are mostly graphics demos which should not depend on unicode, but the tools can't detect this easily, so punt for now.

Here's a command to show the last clean deploy to where it broke.

git log -p 4201c2149b66d5ce45a9e45be95459256486a7ea..8eb7621b549a7956665affc9e53a48e8e8b29ea3
2020-01-08 19:23:37 -06:00
John Benediktsson 73b01704a2 bencode: use linked-assocs to preserve ordering, fix byte-strings.
the byte-string was being "decoded" with replacement characters, messing
up binary data.
2020-01-08 11:45:42 -08:00
John Benediktsson d7c0dfcb2b llvm.ffi: ... 2020-01-08 11:44:45 -08:00
John Benediktsson d0fd75b208 tensors.tensor-slice: make step-slice not extend slice.
This caused a small regression in compiler.tree.cleanup on this test:

{ t } [
    [ { array } declare 2 <groups> [ . . ] assoc-each ]
    \ nth-unsafe inlined?
] unit-test

I'm not entirely sure why it wasn't able to infer the slice that was created
for iteration stays a slice, and never becomes a step-slice, so perhaps there
is some improvement to be made in type inference here.
2020-01-08 09:05:06 -08:00
John Benediktsson 655262af9a llvm.ffi: need to fix stack effect for the false case. 2020-01-08 08:51:41 -08:00
John Benediktsson ca1612cc57 io: fix for win32-error not throwing on zero. 2020-01-06 14:20:15 -08:00
John Benediktsson 1eb7dbe6d2 io.files: quot effects in change-file-lines and change-file-contents. 2020-01-06 13:26:19 -08:00
John Benediktsson b2dc630bd0 game.loop: last-tick-percent-offset counts down to zero, need to subtract from 1. 2020-01-06 13:20:12 -08:00
Alexander Iljin c77cc4c205 windows.errors: fix a compilation error 2020-01-06 13:18:53 -08:00
Alexander Iljin 049356574a windows.errors: streamline error handling and throwing 2020-01-06 13:18:33 -08:00
Alexander Iljin 3733b13daf Replace "win32-error-string throw" with windows-error instance throwing
Remove win32-error-string, because there was only one place it was used in.
2020-01-06 13:18:33 -08:00
Alexander Iljin 563a3b1a47 Replace "n>win32-error-string throw" with windows-error instance throwing 2020-01-06 13:18:33 -08:00
Alexander Iljin 135390968b Delete throw-win32-error, replace with win32-error calls 2020-01-06 13:18:33 -08:00
Alexander Iljin 407c7bc216 io.files.windows: replace "-1 <alien>" with INVALID_HANDLE_VALUE 2020-01-06 13:18:33 -08:00
Alexander Iljin 294be2cca3 Replace inline INVALID_HANDLE_VALUE checks with check-invalid-handle calls
On error find-first-file will now throw a windows-error instance instead of
a string.
2020-01-06 13:18:33 -08:00
Alexander Iljin 77db1b1df3 windows.errors: make check-invalid-handle throw windows-error instances
There are two consequences:
- the thrown object is now a windows-error, previously it was a string;
- if GetLastError returns zero, nothing is thrown. Previously the string
"The operation completed successfully." was thrown in that case.
2020-01-06 13:18:33 -08:00
John Benediktsson 249b916636 game.loop: using timer's next-nanos, which is in the future.
Also, use clamp to make sure tick offset is always [0,1].
2020-01-06 13:14:59 -08:00
John Benediktsson d3b9974bed llvm.ffi: fix cond. 2020-01-05 19:14:22 -08:00
Doug Coleman 86a35088de gpu.demos.bunny: use while* instead of each-morsel 2020-01-05 13:42:31 -06:00
Doug Coleman f9c90583d0 io.files.info: Fix linux file-system-info recursion 2020-01-05 13:27:22 -06:00
Doug Coleman b35a5466e1 game.loop: Fix game loop for timers change 2020-01-04 14:02:21 -06:00
Doug Coleman 9bb19274b2 build: Fix paths... 2020-01-04 13:47:13 -06:00
Doug Coleman 16135ef8d6 mason.disk: fix word name 2020-01-04 13:40:26 -06:00
Doug Coleman 9beeedfe18 io.files.info: Fix find-mount-point. 2020-01-04 13:33:45 -06:00
Doug Coleman 596d44f5af Revert "build.cmd: github is source of truth now"
This reverts commit d7af258eb7.

I renamed /git/factor-github.git to /git/factor.git
2020-01-04 13:21:34 -06:00
Doug Coleman 4da6f51c91 io.files.info: fix circularity regression in file-systems on linux 2020-01-04 09:07:32 -06:00
Doug Coleman f621e69335 mason.git: new repo location 2020-01-04 08:27:16 -06:00
Doug Coleman 16442c27ac io: Fix word to find disk space if a file is missing.
Add canonicalize-drive because Windows likes C: instead of c:.

Add >windows-path for path string comparison.

Add canonicalize-path-full for fixing the path, drive, and / to \\ on
Windows.
2020-01-03 16:30:00 -06:00
Doug Coleman d7af258eb7 build.cmd: github is source of truth now 2020-01-03 15:26:02 -06:00
Doug Coleman 894bab914e mason.disk: Fix usage of word 2020-01-03 15:18:14 -06:00
Doug Coleman 0625b85b47 Revert "windows.errors: make check-invalid-handle throw windows-error instances"
This reverts commit 38ab7289b5.
2020-01-03 13:04:38 -06:00
Doug Coleman 75e98b4bc3 Revert "Replace inline INVALID_HANDLE_VALUE checks with check-invalid-handle calls"
This reverts commit 1e61dbfd2a.
2020-01-03 13:04:29 -06:00
Doug Coleman 8a3b7cbd18 Revert "io.files.windows: replace "-1 <alien>" with INVALID_HANDLE_VALUE"
This reverts commit a6f0b74f03.
2020-01-03 13:04:11 -06:00
Doug Coleman d9f1093cf8 Revert "Delete throw-win32-error, replace with win32-error calls"
This reverts commit e1be081ec9.
2020-01-03 13:04:01 -06:00
Doug Coleman c308d794db Revert "Replace "n>win32-error-string throw" with windows-error instance throwing"
This reverts commit 70d08ce743.
2020-01-03 13:03:52 -06:00
Doug Coleman 7f395ba7f0 Revert "Replace "win32-error-string throw" with windows-error instance throwing"
This reverts commit 2dfb3b3a73.
2020-01-03 13:03:10 -06:00
Doug Coleman 0f7672c25e Revert "windows.errors: streamline error handling and throwing"
This reverts commit ca474dd154.
2020-01-03 13:02:57 -06:00
Doug Coleman 16c153411d io: Trim using lists. 2020-01-03 12:42:11 -06:00
Doug Coleman 3419d34cbf mason.disk: Better handling of free disk space.
- Works if the build directory does not exist, assuming it would be created on the root disk containing the path of the first existing parent directory
- Space calculation is wrong, we should be using the available space
- MB is GB, comment was wrong
- Call find-mount-point-info to get the real disk mount point even if the dir does not exist
2020-01-03 11:10:53 -06:00
John Benediktsson 2235eadf04 timers: simplify by setting delay-nanos directly. 2019-12-17 20:03:45 -08:00
John Benediktsson 07833d94c6 misc/vim: update syntax for cartesian-find. 2019-12-13 19:31:17 -08:00
John Benediktsson 2d1da05bc5 sequences.product: adding product-find. 2019-12-13 19:30:22 -08:00
John Benediktsson 6be39382a3 sequences: adding cartesian-find. 2019-12-13 19:20:27 -08:00
John Benediktsson cc15116323 timers: allow timers to re-use threads when restarted, simplify.
Throw an error if started twice.
2019-12-13 15:31:49 -08:00
John Benediktsson 1959c68feb tensors: faster tensor/number operations by forcing floats. 2019-12-13 15:09:24 -08:00
Nandeeka Nayak a7722b0804 tensors: optimize matrix operations.
tensors: Add benchmarking file

tensors: Add addition and multiplication tests for benchmarking

tensors: inlined slicing to improve metrics.

tensors: fix help-lint warnings.

tensors: restore newer matmul

tensors: add fixnum declaration.

tensors: away with you, unsafe!

tensors: transpose added to benchmarks

tensors: optimize matmul to be within an order of magnitude of np.

tensors: remove type declaration.

tensors: optimize matmul.
2019-12-13 14:52:09 -08:00
John Benediktsson ec58d39bb2 misc/vim: update vim syntax keywords. 2019-12-13 14:41:43 -08:00
John Benediktsson 77b13fbdc2 core/basis/extra: using while* in a few places. 2019-12-13 14:38:26 -08:00
John Benediktsson 05665e8d13 kernel: adding while* that passes the predicate result to the body. 2019-12-13 14:35:51 -08:00
nomennescio c33a406066 Support for MinGW compiler. Need to instal MinGW compiler and runtime. 2019-12-10 08:53:32 -08:00
Doug Coleman 3db9870669 .travis: Don't upgrade ruby, it takes too long. 2019-12-09 10:12:07 -08:00
Doug Coleman f95ed9c230 .travis: install correct version of ruby 2019-12-09 09:56:15 -08:00
Doug Coleman 310f5374c9 .travis: rvm reload 2019-12-09 09:50:59 -08:00
Doug Coleman fff022da74 .travis: use newer ruby and turn off brew updating 2019-12-09 09:43:27 -08:00
Doug Coleman 336c2aefad travis: upgrade rvm first 2019-12-09 09:35:13 -08:00
Doug Coleman d2b2b5a1a6 .travis: more testing 2019-12-08 12:20:30 -08:00
Doug Coleman 56f1da8eae .travis: fixing ruby? 2019-12-08 12:12:37 -08:00
Doug Coleman 34df021a6f .travis: Delete old rubygems after we install it. 2019-12-08 12:07:38 -08:00
Doug Coleman 5beead130b .travis: Trying to fix macos.
/usr/local/Homebrew/Library/Homebrew/brew.rb:10:in `<main>': Homebrew must be run under Ruby 2.6! You're running 2.3.3. (RuntimeError)
The command "if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions snappy > /dev/null || brew install snappy; fi" failed and exited with 1 during .
Your build has been stopped.
2019-12-08 11:58:06 -08:00
Doug Coleman a8fd0d05e7 .travis.yml: Don't run long-running tests. 2019-12-08 11:48:59 -08:00
John Benediktsson 8e8c62a2d9 tools.test: adding a warning for possible long unit tests.
This will help us learn which tests are the slowest on Travis.
2019-12-08 09:06:55 -08:00
Cat Stevens 4350bcbfcd math.matrices: rewrite, modernize and overhaul
math.matrices.elimination: move to extra
math.matrices.extras: expand with esoteric, less-used and unfinished code from basis

- math.matrices and .extras receive more words, tests, and docs
- matrix has become a predicate class
- 94% of matrices words have complete docs
- 77% of matrices.extras words have complete docs
- much more consistent naming for constructors etc
- added missing words / features such as main-diagonal and anti-transpose
- optimizations
- lots of documentation
2019-12-08 08:08:54 -08:00
Doug Coleman c71b92eba9 webapps.pastebin: Cleaner url derivation, better variable names 2019-12-07 15:54:57 -08:00
Doug Coleman e05eecf26b webapps.pastebin: fix 2019-12-07 10:40:35 -08:00
Doug Coleman 03e7f918ae webapps.pastebin: fix using. oops. 2019-12-07 10:38:49 -08:00
Doug Coleman 1cb00c6f61 webapps.pastebin: Fix the url 2019-12-07 10:37:52 -08:00
Doug Coleman 6bbdb5c12e websites.concatenative: endpoint for syncing github to factorcode 2019-12-07 09:58:01 -08:00
Doug Coleman d58ce0fb5b webapps.pastebin: Email a list on every paste. 2019-12-07 09:48:03 -08:00
John Benediktsson 6b91f6f774 llvm.ffi: adding macOS location (when using homebrew). 2019-12-05 14:16:12 -08:00
Rudi Grinberg deb324dee1 Redirect when using curl
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
2019-11-28 21:57:21 -08:00
Alexander Iljin ca474dd154 windows.errors: streamline error handling and throwing 2019-11-25 07:06:59 -08:00
Alexander Iljin 2dfb3b3a73 Replace "win32-error-string throw" with windows-error instance throwing
Remove win32-error-string, because there was only one place it was used in.
2019-11-25 07:06:59 -08:00
Alexander Iljin 70d08ce743 Replace "n>win32-error-string throw" with windows-error instance throwing 2019-11-25 07:06:59 -08:00
Alexander Iljin e1be081ec9 Delete throw-win32-error, replace with win32-error calls 2019-11-25 07:06:59 -08:00
Alexander Iljin a6f0b74f03 io.files.windows: replace "-1 <alien>" with INVALID_HANDLE_VALUE 2019-11-25 07:06:59 -08:00
Alexander Iljin 1e61dbfd2a Replace inline INVALID_HANDLE_VALUE checks with check-invalid-handle calls
On error find-first-file will now throw a windows-error instance instead of
a string.
2019-11-25 07:06:59 -08:00
Alexander Iljin 38ab7289b5 windows.errors: make check-invalid-handle throw windows-error instances
There are two consequences:
- the thrown object is now a windows-error, previously it was a string;
- if GetLastError returns zero, nothing is thrown. Previously the string
"The operation completed successfully." was thrown in that case.
2019-11-25 07:06:59 -08:00
Niklas Larsson 99df1effea Don't use rm from the nmake build. 2019-11-24 15:51:15 -08:00
John Benediktsson 614256abe2 tensors: fix help-lint warnings. 2019-11-24 15:43:29 -08:00
Nandeeka Nayak ce0584adcb tensors: create basic tensors vocabulary.
tensors: create tensors vocabulary.

tensors: create file heading

tensors: define tensor constructor.

tensors: add additional constructors.

tensors: add reshaping.

tensors: implement add and include tests.

tensors: add binary operations.

tensors: add scalar multiply.

tensors: added >array functionality

tensors: tests for >array

tensors: unit tests fix

tensors: use more idiomatic >array.

tensors: add multi-methods for scalar multiplication.

tensors: cleaned up >array

tensors: combine a few constructors

tensors: added dims function and unit tests.

tensors: add documentation capabilities.

tensors: added multi-methods for scalar addition/subtraction/division

help.lint.coverage: fix for shadowing "empty" word; prevent the other test-only words from being shadowed too

soundex: move to extra as it's unused; fix authors.txt filename

modify arange to match numpy; replace with naturals

create >float-array for efficient float array construction

use combinators

tensors: documentation added for public functions.

tensors: implement t% and matrix multiplication.

tensors: add slice with non-zero step

tensors: add documentation.

tensors: added transposition funcitonality, with documentation and tests

tensors: add error documentation.

Add error documentation

tensors: fix matmul documentation.

extra/tensors: add tests for arange

tensors: make transpose style more similar

tensors: make some of the PR changes.

tensors: separate shape checking.

tensors: add documentation for non-positive-shape-error.

tensors: add missing comment.

tensors: transpose edits for efficiency
2019-11-24 15:41:13 -08:00
Doug Coleman 881040ba23
Add description of '-help' switch to documentation. (#2221) 2019-11-16 18:58:36 -06:00
Alexander Iljin 71ad025aaf random.passwords: new vocab 2019-11-15 09:58:32 -08:00
Cat Stevens cee0229b20 soundex: move to extra as it's unused; fix authors.txt filename 2019-11-11 09:54:12 -08:00
Cat Stevens 465facfde3 help.lint.coverage: fix for shadowing "empty" word; prevent the other test-only words from being shadowed too 2019-11-09 15:08:28 -08:00
John Benediktsson fb9359d26a llvm.ffi: adding LLVMBuildMul. 2019-11-09 10:02:29 -08:00
nomennescio 1f75d6985d Add description of '-help' switch to documentation. 2019-11-08 09:59:56 -08:00
John Benediktsson 234a5bd744 math.extras: don't shadow B (breakpoint). 2019-11-07 21:43:22 -08:00
John Benediktsson 8d8e59c43e math.extras: adding integer-sqrt. 2019-11-07 21:32:07 -08:00
John Benediktsson ec71ef22ee tools.test: add silent-tests? that hides unit-tests. 2019-11-07 13:13:05 -08:00
John Benediktsson 69849bc925 ui.tools.listener: better future-proofing with code-completion class. 2019-11-07 09:57:21 -08:00
John Benediktsson 6db0ae3087 project-euler.common: cleanup. 2019-11-06 20:16:48 -08:00
John Benediktsson 388dc83efd math.primes.factors: flush in unix-factor. 2019-11-06 20:12:55 -08:00
John Benediktsson bc78db5a43 project-euler: cleanup main vocab, don't USE: the children. 2019-11-06 20:05:53 -08:00
John Benediktsson 10d4a41819 project-euler.064: adding description and SOLUTION:. 2019-11-06 20:00:53 -08:00
John Benediktsson fae208f67f project-euler.087: adding description and SOLUTION:. 2019-11-06 19:56:56 -08:00
John Benediktsson 6492f1c9cb math.floats.half: improve the roundtrip of subnormal float16. 2019-11-06 19:40:37 -08:00
John Benediktsson 4ece7a6ca0 benchmark.cuckoo-filters: adding a new benchmark. 2019-11-06 18:17:29 -08:00
John Benediktsson 12dc9e7ab7 classes.union: faster builtin-class check, for example sequence?. 2019-11-06 14:13:13 -08:00
John Benediktsson 17aa52f51c ui.tools.listener: handle history-completion popup differently. 2019-11-06 12:16:19 -08:00
John Benediktsson aaabe0a142 math.extras: adding a more exact sum for floats. 2019-11-06 12:03:01 -08:00
John Benediktsson 972fa0fbab ui.tools.listener: close completion-popup when completion-mode changes. 2019-11-06 09:29:31 -08:00
John Benediktsson 83fd6b65e0 command-line.startup: adding version argument.
$ ./factor -version
Factor 0.99
2019-11-06 08:12:39 -08:00
John Benediktsson 745840dfca listener: adding quiet mode.
This skips printing the version info when starting the listener.

    ./factor -q
    ./factor -q -run=listener
    ./factor -q -run=readline-listener
2019-11-06 08:09:16 -08:00
Cat Stevens 715283d11d basis/system-info.linux: fix test for Linux kernel 5.x 2019-11-05 20:50:26 -08:00
John Benediktsson da64b05e6d math.functions: adding e^-1.
This is for calculating e^x-1 for small values more accurately.  You can also
call expm1(x) function if you want, and it's available on your platform.

FUNCTION: double expm1 ( double x )
2019-11-05 10:19:32 -08:00
John Benediktsson 4c48f03fe1 spelling: minor cleanup. 2019-10-31 14:55:47 -07:00
John Benediktsson e256a4ba18 math.intervals: workaround possible compiler bug by widening interval-bitor.
IN: scratchpad [
                   { byte-array } declare
                   [ 0 alien-unsigned-4 32 shift ]
                   [ 4 alien-unsigned-4 ] bi bitor
                   64 >signed
               ] optimized.

! working
[
    dup >R 0 alien-unsigned-4 32 fixnum-shift
    R> 4 alien-unsigned-4 over tag 0 eq?
    [ fixnum-bitor ] [ fixnum>bignum bignum-bitor ] if
    18446744073709551615 >R >bignum R> bignum-bitand
    dup 63 bignum-bit? [ 18446744073709551616 bignum- ] [ ] if
]

! broken
[
    dup >R 0 alien-unsigned-4 32 fixnum-shift
    R> 4 alien-unsigned-4 over tag 0 eq?
    [ fixnum-bitor ] [ fixnum>bignum bignum-bitor ] if
    dup 63 bignum-bit? [ 18446744073709551616 bignum- ] [ ] if
]

The second case correctly eliminates the bitand but incorrectly assumes
that the item on the stack (which is an integer -- either a fixnum or a
bignum), was converted to a bignum.
2019-10-31 10:45:54 -07:00
John Benediktsson f68df75b84 math.intervals: simplify interval-bitand. 2019-10-31 10:45:36 -07:00
John Benediktsson 52123559f3 math.partial-dispatch: simplify using fry. 2019-10-31 10:27:29 -07:00
John Benediktsson bccdb5419b math.intervals: improve interval-bitand. 2019-10-31 10:27:17 -07:00
John Benediktsson 29ebfe5129 compiler.tree.propagation: fix test for improved interval-bitor. 2019-10-31 10:03:44 -07:00
John Benediktsson 20c4e2feaa math.intervals: remove extra non-interval tests. 2019-10-30 09:47:04 -07:00
timor 30f2d6e78f math.intervals.tests: clean up literal syntax 2019-10-30 09:44:39 -07:00
timor 449224878f math.intervals: more exact interval-bitxor operation
- fixed: `interval-bitxor` caused bit-growth
- improved: `interval-bitxor` more exact case for negative intervals
2019-10-30 09:44:23 -07:00
timor 713cfa79f8 math.intervals: more exact interval-bitor operation
Addresses #2170

- fixed: `interval-bitor` caused bit-growth
- improved: `interval-bitor` more exact about lower bounds

The added utility words could be used as a basis to make the other bitwise
interval operations more exact also.
2019-10-30 09:43:44 -07:00
John Benediktsson bebdb54543 classes.algebra: update forgotten test for flatten-class. 2019-10-25 17:53:06 -07:00
John Benediktsson 522d176762 math.vectors: use $sequence in docs. 2019-10-24 20:38:05 -07:00
John Benediktsson 61964d0f46 classes.union: woops, reduce in fast-union-mask. 2019-10-24 14:14:01 -07:00
John Benediktsson 80bd0feaef classes.algebra: change (flatten-class) to use arrays. 2019-10-24 14:12:26 -07:00
John Benediktsson 738113d524 classes: update docs with $sequence. 2019-10-24 14:10:41 -07:00
John Benediktsson cb091281bb math.floats.env: use $sequence in docs. 2019-10-24 13:54:58 -07:00
John Benediktsson f513a14e1c prettyprint.backend: print up to length-limit lists. 2019-10-24 09:09:17 -07:00
John Benediktsson 6cc7ca2a97 prettyprint.backend: print only cons-states. 2019-10-16 10:11:46 -07:00
John Benediktsson 4b45df48f8 prettyprint.backend: lists only print car and "~more~" for cdr. 2019-10-16 10:01:56 -07:00
Doug Coleman 114f58d894 lists: Add list literals.
Fixes #2019.
2019-10-16 09:10:41 -07:00
timor 3c789cb0a7 Simplify nix shell environment
`buildFHSUserEnv` uses `chroot` to create a kind of sandbox environment.  This
change uses a simpler mechanism, and also provides the necessary libraries for
running all the demos.
2019-10-16 08:57:47 -07:00
Kye W. Shi b02ae64e91 add shell.nix for building/running on NixOS 2019-10-15 11:26:20 -07:00
Kye W. Shi 5f2ace09d2 project-euler: add solutions to 064, 087 2019-10-15 11:25:39 -07:00
John Benediktsson 840ecce776 talks.otug-talk: forgot a second $link. 2019-10-06 03:41:10 -07:00
John Benediktsson 85d7fc9d30 talks.olug-talk: fix link to new syntax _. 2019-10-05 16:40:57 -07:00
John Benediktsson 28f0f471d3 alien.data.map: fix use of _ for fry change. 2019-10-05 14:33:05 -07:00
Doug Coleman 78c3a99a31 zealot.help-lint: Add a help-lint for travisci that ignores a lot of flaky resource leaks.
Some work needs to be done with ensuring that resources are cleaned up before reporting resource leaks and exiting. In the meantime, we want TravisCI to be useful enough to catch help-lint errors, so ignore a bunch of errors that it might find. These leaks are still tested for in the more thorough mason CI.
2019-10-05 12:04:14 -05:00
Doug Coleman abf36e89ae furnace.utilities: Allow for unloaded vocab to pass help-lint. 2019-10-05 12:02:30 -05:00
Doug Coleman c19d6517a9 furnace.redirection: Fix for unloaded vocabularies in lint. 2019-10-05 16:03:22 +00:00
John Benediktsson 0e958ca21c fry: update docs for syntax change. 2019-10-04 18:55:30 -07:00
John Benediktsson 0a64678c2d stack-checker.values: fix for fry change. 2019-10-04 18:31:04 -07:00
John Benediktsson fcfe24f98b fry: improve syntax for _ and @ to throw when not used in a fry quotation. 2019-10-04 18:15:59 -07:00
John Benediktsson e17b911929 sequences.generalizations: fix finish-nfind use of times.
(that didn't work in optimizing compiler).
2019-10-04 18:15:19 -07:00
John Benediktsson 0dc71ab053 memoize: fix memoize-quot for zero input effects. 2019-09-29 18:38:41 -07:00
John Benediktsson 9a8b1f8d8e monads: fix ordering of writer monad logs. 2019-09-29 07:16:03 -07:00
Doug Coleman 17a0a6e1a4 tools.deploy: Trying to get clean binaries. 2019-09-28 13:51:39 -05:00
Doug Coleman 1935533b08 webapps: Update to https 2019-09-28 16:55:22 +00:00
Doug Coleman ea2600c3e8 mason.config: Update status url to https. 2019-09-28 10:56:40 -05:00
Doug Coleman dc10c08158 tools.deploy: Bump the deploy size.
We should look at deploy sizes and try to fix them correctly.
2019-09-28 09:43:07 -05:00
Doug Coleman afe188efb3 openssl: Fallback for versions of macOS < 10.15.
We probably want a word that finds libssl.x.dylib where x is the highest version so that we don't have to update the libary-loading code in the future.

This is all because loading libssl.dylib causes a SIGABORT signal 6, perhaps there's another workaround?
2019-09-28 09:40:47 -05:00
Doug Coleman 6f6bc00cb1 io.launcher.unix: Fix test. 2019-09-27 23:13:51 -05:00
Doug Coleman 50cf54ddde basis: Move signal word and fix tests. 2019-09-27 22:59:36 -05:00
Doug Coleman 4faab8a00f basis: Fix bootstrap to display unix signals instead of "Error in print-error!" 2019-09-27 17:17:56 -05:00
Doug Coleman bf719c4cca openssl: macOS 10.15 beta needs explicit paths for these libraries.
10.14 has versions that are .2 lower than 10.15.
2019-09-27 17:17:22 -05:00
John Benediktsson 0a155def04 smalltalk: cleanup usings. 2019-09-27 08:26:02 -07:00
John Benediktsson 06b72b8a0d peg: less stack shuffling in define-parser-word. 2019-09-27 08:24:53 -07:00
John Benediktsson f2e4a36c2c peg: reuse code in compile-parsers-quots. 2019-09-26 08:56:42 -07:00
John Benediktsson e643afa168 peg.parsers: use splitting. 2019-09-26 07:57:31 -07:00
John Benediktsson 0150e4c303 peg.parsers: simplify range-pattern. 2019-09-25 21:34:28 -07:00
John Benediktsson 689c18c374 toml: minor cleanup, note a fixme for later. 2019-09-25 20:51:27 -07:00
John Benediktsson c1ebf5451f peg.ebnf: minor cleanup. 2019-09-25 20:38:19 -07:00
John Benediktsson c3bee31342 peg: some cleanup. 2019-09-25 20:26:12 -07:00
John Benediktsson cc858f633f toml: some updates. 2019-09-25 14:41:06 -07:00
John Benediktsson cb854c0801 toml: adding support for Tom's Obvious Markup Language (TOML). 2019-09-25 14:24:05 -07:00
Doug Coleman 1d3779e3ba openssl.libcrypto: nginx factorcode.org server upgrades to https by default.
Change the unit test to expect a 301. We should probably make all tests work with networking disabled instead of hitting remote servers.
2019-09-25 00:15:44 -05:00
John Benediktsson a3d5789fd4 regexp.classes: use \v\a escapes. 2019-09-24 20:56:29 -07:00
John Benediktsson df295d5ef9 ini-file: cleanup using \f\v escapes. 2019-09-24 20:13:40 -07:00
John Benediktsson 5f1f2a00d6 tools.deploy: bump size for spheres. 2019-09-18 19:25:17 -07:00
John Benediktsson 2657e7507e effects: fix clone of row variadic effects. 2019-09-15 08:35:08 -07:00
Doug Coleman d26d36cc86 smtp: Fix issues with sending an email using Outlook's smtp server.
- Outlook requires saying HELO after upgrading to TLS.
- Outlook stopped supporting plain auth in 2017.

Tested on gmail and outlook.
2019-09-12 18:14:31 -05:00
John Benediktsson 0ea9f8935d tools.crossref: actually, prefer higher level article-links word. 2019-09-11 07:20:02 -07:00
John Benediktsson 9736acaa5b tools.crossref: faster M\ link uses by calling article-content once. 2019-09-11 05:00:11 -07:00
John Benediktsson 5dfe740c16 help.markup: slightly faster collect-elements. 2019-09-11 04:59:56 -07:00
John Benediktsson 04f96c83f1 colors: moving some color definitions from extra/ to basis/. 2019-09-10 12:02:43 -07:00
John Benediktsson bf84e85126 numbers-game: simplify for readability. 2019-09-10 04:52:59 -07:00
timor 14d75bbbcb math.intervals: Consistent handling of special intervals
Make both `empty-interval` and `full-interval` singletons, use generic functions
and methods where they are special-cased.

All words which work with interval points should also now work with the special
intervals.
2019-09-09 14:09:57 -07:00
John Benediktsson a8c73064d8 vlists: splitting prettyprint dependency out. 2019-09-08 15:59:04 -07:00
John Benediktsson e66c777188 bit-vectors: splitting prettyprint dependency out. 2019-09-08 15:58:12 -07:00
John Benediktsson f4c9e52876 bit-arrays: splitting prettyprint dependency out. 2019-09-08 15:57:55 -07:00
kusumotonorio 76f561ba3c NSNotFound for both 32 bit and 64 bit environments 2019-09-08 11:15:49 -07:00
John Benediktsson b1b3483ce0 urls: simpler url-port. 2019-09-07 07:31:33 -07:00
John Benediktsson 0f537f0c45 opengl.gl: just add libGL.so.1 instead of using find-library-from-list.
I think this is more robust, and also I would rather have find-library
return full paths on all platforms since that's the utility that I was
going for when it was written.
2019-09-04 09:42:18 -07:00
John Benediktsson e6eb7be61c tools.deploy: bump tetris image size. 2019-08-20 17:10:17 -07:00
John Benediktsson 001cb1746f cbor: cleanup tests a bit. 2019-08-20 16:45:23 -07:00
John Benediktsson 336da664ba cbor: read bignums, read/write timestamps and urls. 2019-08-20 14:48:03 -07:00
John Benediktsson 56fbf4643d cbor: support write of bignums. 2019-08-20 09:13:26 -07:00
John Benediktsson a7447cd783 cbor: support writing negative integers. 2019-08-20 07:41:54 -07:00
John Benediktsson 0b78157744 cbor: support read/write of simple values and tagged items.
Fix issue with long array lengths.
2019-08-20 07:34:29 -07:00
John Benediktsson 5aedc3cc57 cbor: add support for reading simple values and tagged data items. 2019-08-20 07:21:37 -07:00
John Benediktsson 63f1727ede cbor: fix empty bytestrings, add a bunch more parsing tests. 2019-08-19 21:32:17 -07:00
John Benediktsson 4ac8628a98 cbor: basic support for Concise Binary Object Representation (CBOR)
This is defined in RFC 7049.
2019-08-19 20:49:20 -07:00
kusumotonorio 2f2cb869f1 Revert Unnecessary Changes 2019-08-10 22:12:52 +09:00
kusumotonorio bada736a3f Input Completion Improvements 2019-08-10 22:02:17 +09:00
John Benediktsson 41db42a571 Revert "io.encodings.utf16: add a utf16n word for native utf16 type."
This reverts commit ad24fa414f.
2019-08-06 07:12:55 -07:00
John Benediktsson 04fab09c8f Revert "io.encodings.utf16: update docs for utf16n."
This reverts commit e6fdc8fd51.
2019-08-06 07:12:50 -07:00
John Benediktsson 6e161a2ccb Revert "io.encodings.utf16: make utf16n foldable, maybe fixes windows bootstrap."
This reverts commit 17a3cf7590.
2019-08-06 07:12:44 -07:00
John Benediktsson 17a3cf7590 io.encodings.utf16: make utf16n foldable, maybe fixes windows bootstrap. 2019-08-05 19:44:29 -07:00
John Benediktsson e6fdc8fd51 io.encodings.utf16: update docs for utf16n. 2019-08-05 18:32:47 -07:00
John Benediktsson 5e6a79c187 tools.deploy: bump sizes for macosx-32.
Need a better approach to this...
2019-08-05 14:27:46 -07:00
John Benediktsson 8aafd0240a summary: forgot to commit the test change. 2019-08-05 14:27:05 -07:00
John Benediktsson 1cba716637 gap-buffer: some cleanup. 2019-08-05 13:15:48 -07:00
John Benediktsson ad24fa414f io.encodings.utf16: add a utf16n word for native utf16 type.
remove io.encodings.utf16n vocabulary, which was kind of single purpose.
update a bunch of vocab usings.
2019-08-05 13:08:09 -07:00
John Benediktsson cad867a3e9 io.files.trash.windows: cleanup using. 2019-08-05 13:07:25 -07:00
John Benediktsson fc9d0176df windows.winsock: cleanup using. 2019-08-05 13:06:54 -07:00
John Benediktsson b0390c57ae summary: change strings to say "code points"
This reflects their current implementation, which is unicode code
points, not displayable characters (glyphs).
2019-08-05 11:59:39 -07:00
John Benediktsson ba75d0994a tools.deploy: bump deploy sizes for macosx-32. 2019-08-05 09:18:44 -07:00
John Benediktsson 05e8957732 windows.uniscribe: re-commit the &dispose removal. 2019-08-04 08:27:21 -07:00
John Benediktsson 98ee3abcae ui.text.uniscribe: windows.uniscribe.private not needed. 2019-08-03 07:51:20 -07:00
Doug Coleman f7e4774d3f ui.backend.windows: 2sequence cleanup 2019-08-02 18:29:19 -05:00
Doug Coleman c70d1f6c4a basis: Fix Windows 10 select-all for emojis.
This is @kusumotonorio's patch but his branch is not up to date so there
are a ton of merge conflicts so I'm just pulling his changes into a new
patch. Sorry for my lack of git to do this cleanly while maintaining his
credit for this patch.
2019-08-02 17:07:42 -05:00
Doug Coleman d8c1eef9f3 tools.deploy: up the size. 2019-07-31 17:52:34 -05:00
Doug Coleman 8eb7621b54 factor: fix bootstrap and test and doc 2019-07-30 18:01:11 -05:00
Doug Coleman 6ac5bf66e8 ui.text.uniscribe: fix using 2019-07-30 18:00:02 -05:00
Doug Coleman a98d4620ae unicode.case: Change test, somewhere in the Unicode data files it's now capitalizing the ``M`` in ``I'M``
Look into this but we should still merge this branch back into master.

Fixes #1402
2019-07-30 02:24:58 -05:00
Doug Coleman c8e12067c1 unicode.collation: Fix all the tests.
Basically, there are some errors in the unicode collation tests if you fix up the DUCET table for Tibetan according to the recommendations in the Unicode spec. So we ignore those errors and document it everywhere.
2019-07-30 02:12:41 -05:00
Doug Coleman 97b848a045 ui: Fix circular dependency. 2019-07-30 02:12:41 -05:00
Doug Coleman 338acc8843 unicode: Minor cleanups.
This fixes/breaks some of the tests. Why?
{ 3953 3958 3960 3968 3969 } [ canonical-map delete-at ] each
2019-07-30 02:12:41 -05:00
Doug Coleman 0631e3651d unicode.collation: Fix ducet for Tibetan using allkeys.txt
Fixes two more tests.
2019-07-30 02:12:41 -05:00
Doug Coleman e6613011fb unicode.collation: some cleanup, no test fixes 2019-07-30 02:12:41 -05:00
KUSUMOTO Norio bce6238d6e Revert Unnecessary Changes 2019-07-30 02:12:41 -05:00
KUSUMOTO Norio 99e520410c Improved background rendering when selecting text, including emojis 2019-07-30 02:12:41 -05:00
Doug Coleman 73228e6b73 unicode.collation: Add Nushu block, it's like Tangut
https://www.unicode.org/reports/tr10/tr10-41.html#Order_DUCET
https://wiki.computercraft.cc/Module:Unicode_data
https://ko.wiktionary.org/wiki/%EB%AA%A8%EB%93%88:Unicode_data

12 failing tests!
2019-07-30 02:12:41 -05:00
Doug Coleman 8bf19307b0 collation: Adding more character ranges 2019-07-30 02:12:41 -05:00
Doug Coleman a9928b0dc0 unicode.collation: illegal? is now gone, do AAAA BBBB for every code point
remove some tests that pass now
2019-07-30 02:12:41 -05:00
KUSUMOTO Norio 1b790ee6b6 Better support to NSTextInputClient 2019-07-30 02:12:41 -05:00
KUSUMOTO Norio b83435c9a9 cocoa inline input using IM 2019-07-30 02:12:41 -05:00
Doug Coleman 971423d93f unicode.collation: Write out explicity the failing tests 2019-07-30 02:12:41 -05:00
KUSUMOTO Norio 3f1d7c8b4f UNICODE TEXT SEGMENTATION 12.0.0 2019-07-30 02:12:41 -05:00
Doug Coleman c6414048ce windows.uniscribe: Apply the patch from #1402 for Windows. 2019-07-30 02:12:41 -05:00
Doug Coleman 3df3ad4257 ui.text.core-text: Add patch from issue #1402 by kusumotonorio 2019-07-30 02:12:41 -05:00
Doug Coleman 44cbe83984 unicode: Update to 11.0 2019-07-30 02:12:41 -05:00
John Benediktsson 4201c2149b boids: fix wrap-pos to wrap at row/col 511 instead of 510. 2019-07-26 18:38:08 -07:00
John Benediktsson 9135c82eb6 trails: use ``f`` to represent "invisible" points. 2019-07-25 09:19:23 -07:00
John Benediktsson bd2ed2c214 windows.uniscribe: remove <cache-assoc> &dispose.
That's kind of a bug, but probably dispose should happen differently.
2019-07-24 20:19:32 -07:00
John Benediktsson 48a06554d9 help.markup: make $complex-shuffle use $shuffle. 2019-07-23 18:10:19 -07:00
John Benediktsson 2692227fbc kernel: fix stack effect for -rotd. 2019-07-23 16:23:27 -07:00
John Benediktsson 4b246b6130 math.extras: add test for stirling numbers. 2019-07-10 09:42:03 -07:00
Niklas Larsson c3197c36c3 math.extras: Fix stirling
Fixes #2149
2019-07-10 09:42:03 -07:00
Doug Coleman eb25325f87 simple-flat-file: 1.3s -> 300ms for parsing the unicode txt file.
Somehow it's spending a ton of time in <string> if split-; is not inlined.
2019-07-07 11:01:41 -05:00
John Benediktsson 81f2e9a0a7 sequences.extras: adding extract!.
It's similar to reject! but returns the items that were removed.
2019-06-28 11:27:23 -07:00
John Benediktsson 00a0edb199 raylib.demo: cleanup change-player-position. 2019-06-11 19:36:59 -07:00
John Benediktsson bc7680969f raylib.gui-demo: adding MAIN: 2019-06-11 19:18:26 -07:00
Jack Lucas a8200d61b2 Raylib: Add Raylib 2.5 + Raygui 2019-06-11 19:14:00 -07:00
timor 13b0da9182 FUEL: make `fuel-refactor-inline-word` work with hyphenated words
The emacs command `kill-word`, used by `fuel-factor-inline-word` does not
delete the complete word if that contains hyphens.  Using `kill-sexps` instead
exhibits correct behavior.
2019-06-11 06:50:31 -07:00
Alexander Iljin 4a7644e509 windows.uniscribe: support transparency in text color 2019-06-08 18:47:42 +02:00
Alexander Iljin 3d56183360 windows.uniscribe: speed up pixel array processing for transparent fonts
The approach was suggested by John Benediktsson in a GitHub comment.
2019-06-08 18:47:41 +02:00
Alexander Iljin f445b44af6 windows.uniscribe: support text with transparent background
This fixes issues #152 and #1658.
2019-06-08 18:47:41 +02:00
nicolas-p f84cfc7209 Revert "ui.gadgets.labeled: flat colour on windows because of the gradient bug"
This reverts commit b81a5f9c7a.
2019-06-08 18:47:41 +02:00
John Benediktsson a3b439047f Revert "ui.gadgets.labeled: separate title-bar-interior with a comment why."
This reverts commit cb575c1ba8.
2019-06-08 18:47:41 +02:00
Alexander Iljin 7ad6784911 Revert "ui.gadgets.buttons: workaround for windows gradient bug"
This reverts commit 20a663ab0b.
2019-06-08 18:47:41 +02:00
John Benediktsson 74313e9b52 Revert "slides: make it work on windows (no gradients)."
This reverts commit 9d428cbcaf.
2019-06-08 18:47:41 +02:00
Alexander Iljin 3d56615d19 Revert "slides: fix illegible code snippets on Windows"
This reverts commit 4b1e2b8af8.
2019-06-08 18:47:40 +02:00
John Benediktsson 22b5263446 system-info.macosx: adding macOS Catalina 10.15 2019-06-03 20:50:42 -07:00
Doug Coleman 0cfc48479e macos32: Lock to 10.11 for build machine.
32bit macos has been deprectated and 10.13 does not seem have i386 libraries anymore.
2019-05-22 11:02:20 -05:00
John Benediktsson d0a8377827 words: remove word-props? used only in one place. 2019-05-20 20:45:29 -07:00
John Benediktsson 056d8acad4 cap: use locals to make screenshot simpler. 2019-05-20 20:15:53 -07:00
John Benediktsson bca952ebd2 tools.disassembler.gdb: cleanup using. 2019-05-20 12:52:31 -07:00
John Benediktsson 1b10b8dbf4 base32-crockford: swap stack effects and update tests. 2019-05-20 10:20:47 -07:00
John Benediktsson 414a426880 base64: fix stack effect typo. 2019-05-20 08:39:13 -07:00
John Benediktsson bfc133742e base64: cleanup using. 2019-05-19 18:48:50 -07:00
John Benediktsson 2d2ff1ef68 base64: much faster base64. 2019-05-19 18:48:01 -07:00
John Benediktsson d150e5cfe2 io.streams.byte-array.fast: push-all is faster for byte-array. 2019-05-19 18:47:34 -07:00
John Benediktsson 86046dcbf7 sequences.generalizations: adding (nsequence). 2019-05-19 16:31:19 -07:00
John Benediktsson 53d404a150 base16/32/64/85/91: declare base>ch as fixnum. 2019-05-19 16:23:35 -07:00
John Benediktsson c6e14ce3ca sequences: making copy-state indices integers. 2019-05-19 15:59:31 -07:00
timor 82893dceee FUEL: don't jump to USING: section after updating 2019-05-10 15:41:25 -07:00
Doug Coleman c14e571429 ui.backend.windows: GetKeyboardState returns 0 on error 2019-05-02 07:55:40 -05:00
KUSUMOTO Norio 08aa27a112 windows.factor KUSUMOTO Norio plan 2
bug fix for issue #1

Review of the structure of words

NUMPAD&OEM-keydown-codes

plugable keyboard info

keyboard auto detect

conflict

ToUnicode version

resolve conflicts

ui.backend.windows: fix whitespace
2019-05-02 07:52:27 -05:00
Alexander Iljin 968fea56d0 windows.user32: add the GetKeyboardType function 2019-04-22 22:16:58 -07:00
Alexander Iljin 0007789795 continuations[-docs]: add the finally word 2019-04-22 21:57:51 -07:00
Alexander Iljin 4d5548d62d extra: cleanup USING: lists 2019-04-21 11:24:11 -07:00
John Benediktsson ba41385f10 extra: remove unnecessary yield. 2019-04-21 11:07:28 -07:00
Alexander Iljin 867fc1e3fc calendar[-docs]: add week-number 2019-04-18 14:34:54 -07:00
Alexander Iljin 9063cfc61b sodium: use a more conventional parameter name 2019-04-14 08:42:54 -05:00
Alexander Iljin 18b896e54d sodium: add wrapper words for working with detached signatures 2019-04-14 08:42:49 -05:00
Alexander Iljin 0fc946dc0f sequences-docs: add a missing article 2019-04-14 08:42:26 -05:00
Alexander Iljin b3b9b6b1ac README: add the Gitter and the mailing list links in the Community section 2019-04-14 08:42:05 -05:00
Doug Coleman 9d06dcb67e Config.linux: Better check for g++.
A consistent string across platforms is 'Free Software Foundation'
2019-04-07 18:54:59 -05:00
Doug Coleman 3f777a6fdd tools: use base91 instead of base85 2019-04-06 11:39:07 -05:00
John Benediktsson d248f2452e combinators: faster hashcode for byte-arrays. 2019-04-05 16:55:10 -07:00
John Benediktsson 824fc16a0f base91: adding version of base91 encoding/decoding. 2019-04-05 13:43:05 -07:00
John Benediktsson 38e8c5aeb1 base16: adding RFC 3548 version of base 16 encoding/decoding. 2019-04-05 13:40:23 -07:00
John Benediktsson fa1f9aa5a0 base64/32/85: adding tests for all byte values. 2019-04-05 13:38:00 -07:00
John Benediktsson d89d4590ab game-of-life: adding deploy file. 2019-04-05 13:04:01 -07:00
John Benediktsson 103b15df97 base85: change alphabet to byte-array. 2019-04-05 13:03:19 -07:00
John Benediktsson 83d6c5b382 base32-crockford: separate Douglas Crockford version of Base 32. 2019-04-05 12:10:52 -07:00
John Benediktsson 77c5a4b7ff base32: adding authors.txt 2019-04-05 12:10:33 -07:00
John Benediktsson d53ef800e2 base32: change to RFC 3548 version. 2019-04-05 12:05:21 -07:00
John Benediktsson ab88710e74 base64: adding urlsafe base64 and specify RFC 3548. 2019-04-05 12:03:00 -07:00
John Benediktsson a8b6d7bd4f io.crlf: adding read-ignoring-crlf and read1-ignoring-crlf. 2019-04-05 11:34:34 -07:00
John Benediktsson 66652c4903 geohash: adding first version of Geohash geocoding vocab. 2019-04-02 17:32:15 -07:00
John Benediktsson 338b739f30 base32: faster inverse operation. 2019-04-02 17:32:15 -07:00
Alexander Iljin e2b689a636 windows.ole32: add a couple of constants 2019-03-29 19:45:58 -05:00
John Benediktsson 88abc4e4c2 gravatar: wrapper for Gravatar.com service. 2019-03-28 13:50:35 -07:00
1353 changed files with 1764839 additions and 6448 deletions

1
.gitattributes vendored
View File

@ -1,2 +1,3 @@
*.factor text eol=lf
*.html text eol=lf
misc/vim/*/*/generated.vim linguist-generated

View File

@ -35,6 +35,15 @@ addons:
- gtk2-engines-pixbuf
before_install:
- uname -s
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export HOMEBREW_NO_AUTO_UPDATE=1 ; fi # Don't let homebrew upgrade itself
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm -rf ~/.gnupg/; fi # https://github.com/rvm/rvm/issues/3110
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://rvm.io/mpapis.asc | gpg --import - ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://get.rvm.io | bash -s stable; fi # https://github.com/travis-ci/travis-ci/issues/6307
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm reload ; fi # for homebrew to have 2.6.3, which takes too long. instead we just use HOMEBREW_NO_AUTO_UPDATE=1
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm install ruby-2.6.3 ; fi # for homebrew
#- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm use 2.6 ; fi # for homebrew
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./build.sh deps-macosx ; else ./build.sh deps-apt-get ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions snappy > /dev/null || brew install snappy; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew ls --versions cmake > /dev/null || brew install cmake; fi
@ -47,10 +56,6 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start redis; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start postgresql; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start memcached; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm -rf ~/.gnupg/; fi # https://github.com/rvm/rvm/issues/3110
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://rvm.io/mpapis.asc | gpg --import - ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl -sSL https://get.rvm.io | bash -s stable; fi # https://github.com/travis-ci/travis-ci/issues/6307
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
wget https://github.com/vmt/udis86/archive/v1.7.2.tar.gz && tar xzvf v1.7.2.tar.gz &&
( cd udis86-1.7.2/ && ./autogen.sh && ./configure --enable-shared=yes && make && sudo make install ) &&
@ -69,8 +74,8 @@ script:
- export CI_BRANCH="${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}"
- echo "CI_BRANCH=${CI_BRANCH}"
- DEBUG=1 ./build.sh net-bootstrap < /dev/null
- "./factor -e='USING: memory vocabs.hierarchy ; \"zealot\" load save'"
- "./factor -e='USING: memory vocabs.hierarchy tools.test namespaces ; \"zealot\" load f long-unit-tests-enabled? set-global save'"
- './factor -run=zealot.cli-changed-vocabs'
- './factor -run=tools.test `./factor -run=zealot.cli-changed-vocabs | paste -s -d " " -`'
- './factor -run=help.lint `./factor -run=zealot.cli-changed-vocabs | paste -s -d " " -`'
- './factor -run=zealot.help-lint `./factor -run=zealot.cli-changed-vocabs | paste -s -d " " -`'
- "./factor -e='USING: modern.paths tools.test sequences system kernel math random ; core-vocabs os macosx? [ dup length 3 /i sample ] when [ test ] each'"

View File

@ -14,6 +14,7 @@ ifdef CONFIG
endif
XCODE_PATH ?= /Applications/Xcode.app
MACOSX_32_SDK ?= MacOSX10.11.sdk
MACOSX_SDK ?= MacOSX10.13.sdk
include $(CONFIG)

View File

@ -1,4 +1,4 @@
Copyright (c) 2019, Slava Pestov, et al.
Copyright (c) 2020, Slava Pestov, et al.
All rights reserved.
Redistribution and use in source and binary forms, with or without

View File

@ -8,21 +8,21 @@ VERSION = 0.99
!IF [git describe --all > git-describe.tmp] == 0
GIT_DESCRIBE = \
!INCLUDE <git-describe.tmp>
!IF [rm git-describe.tmp] == 0
!IF [del git-describe.tmp] == 0
!ENDIF
!ENDIF
!IF [git rev-parse HEAD > git-id.tmp] == 0
GIT_ID = \
!INCLUDE <git-id.tmp>
!IF [rm git-id.tmp] == 0
!IF [del git-id.tmp] == 0
!ENDIF
!ENDIF
!IF [git rev-parse --abbrev-ref HEAD > git-branch.tmp] == 0
GIT_BRANCH = \
!INCLUDE <git-branch.tmp>
!IF [rm git-branch.tmp] == 0
!IF [del git-branch.tmp] == 0
!ENDIF
!ENDIF
@ -58,6 +58,13 @@ CL_FLAGS = $(CL_FLAGS) $(CL_FLAGS_VISTA)
PLAF_DLL_OBJS = vm\os-windows-x86.64.obj vm\cpu-x86.obj
SUBSYSTEM_COM_FLAGS = console
SUBSYSTEM_EXE_FLAGS = windows
!ELSE
CL_FLAGS = $(CL_FLAGS) $(CL_FLAGS_VISTA)
PLAF_DLL_OBJS = vm\os-windows-x86.64.obj vm\cpu-x86.obj
SUBSYSTEM_COM_FLAGS = console
SUBSYSTEM_EXE_FLAGS = windows
!ENDIF
!IF DEFINED(DEBUG)
@ -143,6 +150,16 @@ factor.com: $(EXE_OBJS) $(DLL_OBJS)
factor.exe: $(EXE_OBJS) $(DLL_OBJS)
link $(LINK_FLAGS) /out:factor.exe /SUBSYSTEM:$(SUBSYSTEM_EXE_FLAGS) $(EXE_OBJS) $(DLL_OBJS)
# If we compile factor.exe, run mt.exe, and run factor.exe,
# then Windows caches the manifest. Even on a recompile without applying
# the mt.exe tool, if the factor.exe.manifest file is present, the manifest
# is applied. To avoid this, we delete the .manifest file on clean
# and copy it from a reference file on compilation and mt.exe.
#
factor.exe.manifest: factor.exe
copy factor.exe.manifest.in factor.exe.manifest
mt -manifest factor.exe.manifest -outputresource:"factor.exe;#1"
all: factor.com factor.exe factor.dll.lib libfactor-ffi-test.dll
!ENDIF
@ -174,12 +191,15 @@ clean:
if exist factor.lib del factor.lib
if exist factor.com del factor.com
if exist factor.exe del factor.exe
if exist factor.exe.manifest del factor.exe.manifest
if exist factor.exp del factor.exp
if exist factor.dll del factor.dll
if exist factor.dll.lib del factor.dll.lib
if exist factor.dll.exp del factor.dll.exp
if exist libfactor-ffi-test.dll del libfactor-ffi-test.dll
if exist libfactor-ffi-test.exp del libfactor-ffi-test.exp
if exist libfactor-ffi-test.lib del libfactor-ffi-test.lib
.PHONY: all default x86-32 x86-64 x86-32-vista x86-64-vista clean
.PHONY: all default x86-32 x86-64 x86-32-vista x86-64-vista clean factor.exe.manifest
.SUFFIXES: .rs

View File

@ -28,7 +28,7 @@ a boot image stored on factorcode.org.
To check out Factor:
* `git clone git://factorcode.org/git/factor.git`
* `git clone git://github.com/factor/factor.git`
* `cd factor`
To build the latest complete Factor system from git, either use the
@ -38,7 +38,7 @@ build script:
* Windows: `build.cmd`
or download the correct boot image for your system from
http://downloads.factorcode.org/images/master/, put it in the factor
http://downloads.factorcode.org/images/master/, put it in the `factor`
directory and run:
* Unix: `make` and then `./factor -i=boot.unix-x86.64.image`
@ -127,6 +127,25 @@ The Factor source tree is organized as follows:
* `misc/` - editor modes, icons, etc
* `unmaintained/` - now at [factor-unmaintained](https://github.com/factor/factor-unmaintained)
## Source History
During Factor's lifetime, sourcecode has lived in many repositories. Unfortunately, the first import in Git did not keep history. History has been partially recreated from what could be salvaged. Due to the nature of Git, it's only possible to add history without disturbing upstream work, by using replace objects. These need to be manually fetched, or need to be explicitly added to your git remote configuration.
Use:
`git fetch origin 'refs/replace/*:refs/replace/*'`
or add the following line to your configuration file
```
[remote "origin"]
url = ...
fetch = +refs/heads/*:refs/remotes/origin/*
...
fetch = +refs/replace/*:refs/replace/*
```
Then subsequent fetches will automatically update any replace objects.
## Community
Factor developers meet in the `#concatenative` channel on
@ -135,5 +154,7 @@ anything related to Factor or language design in general.
* [Factor homepage](https://factorcode.org)
* [Concatenative languages wiki](https://concatenative.org)
* [Mailing list](factor-talk@lists.sourceforge.net)
* Search for "factorcode" on [Gitter](https://gitter.im/)
Have fun!

View File

@ -105,7 +105,7 @@ $nl
ARTICLE: "c-types.primitives" "Primitive C types"
"The following numerical types are defined in the " { $vocab-link "alien.c-types" } " vocabulary; a " { $snippet "u" } " prefix denotes an unsigned type:"
{ $table
{ "C type" "Notes" }
{ { $strong "C type" } { $strong "Notes" } }
{ { $link char } "always 1 byte" }
{ { $link uchar } { } }
{ { $link short } "always 2 bytes" }

View File

@ -41,8 +41,8 @@ HELP: memory>byte-array
HELP: cast-array
{ $values { "byte-array" byte-array } { "c-type" "a C type" } { "array" "a specialized array" } }
{ $description "Converts a byte array into a specialized array by interpreting the bytes in as machine-specific values. Code which uses this word is unportable." }
{ $notes "The appropriate specialized array vocabulary must be loaded; otherwise, an error will be thrown. See the " { $vocab-link "specialized-arrays" } " vocabulary for details on the underlying sequence type constructed." }
{ $description "Converts a " { $link byte-array } " into a specialized array by interpreting the bytes in it as machine-specific values. Code using this word is unportable." }
{ $notes "The appropriate specialized array vocabulary must be loaded, otherwise an error will be thrown. See the " { $vocab-link "specialized-arrays" } " vocabulary for details on the underlying sequence type constructed." }
{ $errors "Throws an error if the type does not exist, the necessary specialized array vocabulary is not loaded, or the requested size is negative." } ;
HELP: malloc-array
@ -257,4 +257,4 @@ ARTICLE: "c-out-params" "Output parameters in C"
{ $code
"1234 { c-string } [ do_frob ] with-out-parameters"
}
"which would put the functions return value and error string on the stack." ;
"which would put the function's return value and error string on the stack." ;

View File

@ -1,5 +1,4 @@
USING: alien.libraries.finder sequences tools.test ;
IN: alien.libraries.finder.linux.tests
{ t } [ "libm.so" "m" find-library subseq? ] unit-test
{ t } [ "libc.so" "c" find-library subseq? ] unit-test

View File

@ -44,4 +44,4 @@ PRIVATE>
M: linux find-library*
"lib" prepend load-ldconfig-cache
[ ldconfig-matches? ] with find nip ?first ;
[ ldconfig-matches? ] with find nip ?last ;

View File

@ -1,9 +1,6 @@
USING: alien.libraries.finder
USING: alien.libraries.finder alien.libraries.finder.macosx
alien.libraries.finder.macosx.private sequences tools.test ;
IN: alien.libraries.finder.macosx
{
{
f

View File

@ -0,0 +1,3 @@
USING: alien.libraries.finder sequences tools.test ;
{ t } [ "kernel32.dll" "kernel32" find-library subseq? ] unit-test

View File

@ -1,8 +1,9 @@
USING: alien.libraries io.pathnames system windows.errors ;
USING: alien.libraries io.pathnames system windows.errors
windows.kernel32 ;
IN: alien.libraries.windows
M: windows >deployed-library-path
file-name ;
M: windows dlerror ( -- message )
win32-error-string ;
GetLastError n>win32-error-string ;

View File

@ -1,5 +1,7 @@
USING: base64 io.encodings.ascii io.encodings.string kernel
sequences splitting strings tools.test ;
USING: base64 byte-arrays io.encodings.ascii io.encodings.string
kernel sequences splitting strings tools.test ;
{ t } [ 256 <iota> >byte-array dup >base64 base64> = ] unit-test
{ "abcdefghijklmnopqrstuvwxyz" } [ "abcdefghijklmnopqrstuvwxyz" ascii encode >base64 base64> ascii decode
] unit-test
@ -39,3 +41,9 @@ sequences splitting strings tools.test ;
"eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJKb2UifQ.ipevRNuRP6HflG8cFKnmUPtypruRC4fb1DWtoLL62SY"
"." split [ base64> ] map
] unit-test
{ "01a+b/cd" } [ "\xd3V\xbeo\xf7\x1d" >base64 "" like ] unit-test
{ "\xd3V\xbeo\xf7\x1d" } [ "01a+b/cd" base64> "" like ] unit-test
{ "01a-b_cd" } [ "\xd3V\xbeo\xf7\x1d" >urlsafe-base64 "" like ] unit-test
{ "\xd3V\xbeo\xf7\x1d" } [ "01a-b_cd" urlsafe-base64> "" like ] unit-test

View File

@ -1,8 +1,9 @@
! Copyright (C) 2008 Doug Coleman, Daniel Ehrenberg.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays combinators fry io io.binary io.encodings.binary
io.streams.byte-array kernel literals math namespaces sbufs
sequences ;
USING: arrays assocs byte-arrays combinators fry growable io
io.encodings.binary io.streams.byte-array kernel kernel.private
literals locals math math.bitwise namespaces sbufs sequences
sequences.private ;
IN: base64
ERROR: malformed-base64 ;
@ -10,8 +11,10 @@ ERROR: malformed-base64 ;
<PRIVATE
<<
CONSTANT: alphabet
CONSTANT: alphabet $[
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
>byte-array
]
: alphabet-inverse ( alphabet -- seq )
dup supremum 1 + f <array> [
@ -24,79 +27,133 @@ CONSTANT: alphabet
: base64>ch ( ch -- ch )
$[ alphabet alphabet-inverse 0 CHAR: = pick set-nth ] nth
[ malformed-base64 ] unless* ; inline
[ malformed-base64 ] unless* { fixnum } declare ; inline
: (write-lines) ( column byte-array -- column' )
output-stream get dup '[
_ stream-write1 1 + dup 76 = [
drop B{ CHAR: \r CHAR: \n } _ stream-write 0
: encode3 ( x y z -- a b c d )
{ fixnum fixnum fixnum } declare {
[ [ -2 shift ch>base64 ] [ 2 bits 4 shift ] bi ]
[ [ -4 shift bitor ch>base64 ] [ 4 bits 2 shift ] bi ]
[ [ -6 shift bitor ch>base64 ] [ 6 bits ch>base64 ] bi ]
} spread ; inline
:: (stream-write-lines) ( column data stream -- column' )
column data over 71 > [
[
stream stream-write1 1 + dup 76 = [
drop 0
B{ CHAR: \r CHAR: \n } stream stream-write
] when
] each ; inline
] each
] [
stream stream-write 4 +
] if ; inline
: write-lines ( column byte-array -- column' )
over [ (write-lines) ] [ write ] if ; inline
: stream-write-lines ( column data stream -- column' )
pick [ (stream-write-lines) ] [ stream-write ] if ; inline
: encode3 ( seq -- byte-array )
be> { -18 -12 -6 0 } '[
shift 0x3f bitand ch>base64
] with B{ } map-as ; inline
: write-lines ( column data -- column' )
output-stream get stream-write-lines ; inline
: encode-pad ( seq n -- byte-array )
[ 3 0 pad-tail encode3 ] [ 1 + ] bi* head-slice
4 CHAR: = pad-tail ; inline
: (encode-base64) ( stream column -- )
3 pick stream-read dup length {
{ 0 [ 3drop ] }
{ 3 [ encode3 write-lines (encode-base64) ] }
[ encode-pad write-lines (encode-base64) ]
} case ;
:: (encode-base64) ( input output column -- )
4 <byte-array> :> data
column [ input stream-read1 dup ] [
input stream-read1
input stream-read1
[ [ 0 or ] bi@ encode3 ] 2keep [ 0 1 ? ] bi@ + {
{ 0 [ ] }
{ 1 [ drop CHAR: = ] }
{ 2 [ 2drop CHAR: = CHAR: = ] }
} case data (4sequence) output stream-write-lines
] while 2drop ; inline
PRIVATE>
: encode-base64 ( -- )
input-stream get f (encode-base64) ;
input-stream get output-stream get f (encode-base64) ;
: encode-base64-lines ( -- )
input-stream get 0 (encode-base64) ;
input-stream get output-stream get 0 (encode-base64) ;
<PRIVATE
: read1-ignoring ( ignoring stream -- ch )
dup stream-read1 pick dupd member?
dup stream-read1 pick dupd member-eq?
[ drop read1-ignoring ] [ 2nip ] if ; inline recursive
: push-ignoring ( accum ch -- accum )
dup { f 0 } member-eq? [ drop ] [ suffix! ] if ; inline
: read-into-ignoring ( accum n ignoring stream -- accum )
'[ _ _ read1-ignoring push-ignoring ] times ; inline
: read-ignoring ( n ignoring stream -- accum )
[ [ <sbuf> ] keep ] 2dip read-into-ignoring ; inline
pick <sbuf> [
'[ _ _ read1-ignoring [ ] _ push-if ] times
] keep ;
: decode4 ( seq -- )
[ 0 [ base64>ch swap 6 shift bitor ] reduce 3 >be ]
[ [ CHAR: = = ] count ] bi
[ write ] [ head-slice* write ] if-zero ; inline
: decode4 ( a b c d -- x y z )
{ fixnum fixnum fixnum fixnum } declare {
[ base64>ch 2 shift ]
[ base64>ch [ -4 shift bitor ] [ 4 bits 4 shift ] bi ]
[ base64>ch [ -2 shift bitor ] [ 2 bits 6 shift ] bi ]
[ base64>ch bitor ]
} spread ; inline
: (decode-base64) ( stream -- )
4 "\n\r" pick read-ignoring dup length {
{ 0 [ 2drop ] }
{ 4 [ decode4 (decode-base64) ] }
[ drop 4 CHAR: = pad-tail decode4 (decode-base64) ]
} case ;
:: (decode-base64) ( input output -- )
3 <byte-array> :> data
[ B{ CHAR: \n CHAR: \r } input read1-ignoring dup ] [
B{ CHAR: \n CHAR: \r } input read1-ignoring CHAR: = or
B{ CHAR: \n CHAR: \r } input read1-ignoring CHAR: = or
B{ CHAR: \n CHAR: \r } input read1-ignoring CHAR: = or
[ decode4 data (3sequence) ] 3keep
[ CHAR: = eq? 1 0 ? ] tri@ + +
[ head-slice* ] unless-zero
output stream-write
] while drop ;
PRIVATE>
: decode-base64 ( -- )
input-stream get (decode-base64) ;
input-stream get output-stream get (decode-base64) ;
<PRIVATE
: ensure-encode-length ( base64 -- base64 )
dup length 3 /mod zero? [ 1 + ] unless 4 *
output-stream get expand ;
: ensure-decode-length ( seq -- seq )
dup length 4 /mod zero? [ 1 + ] unless 3 *
output-stream get expand ;
PRIVATE>
: >base64 ( seq -- base64 )
binary [ binary [ encode-base64 ] with-byte-reader ] with-byte-writer ;
binary [
ensure-encode-length
binary [ encode-base64 ] with-byte-reader
] with-byte-writer ;
: base64> ( base64 -- seq )
binary [ binary [ decode-base64 ] with-byte-reader ] with-byte-writer ;
binary [
ensure-decode-length
binary [ decode-base64 ] with-byte-reader
] with-byte-writer ;
: >base64-lines ( seq -- base64 )
binary [ binary [ encode-base64-lines ] with-byte-reader ] with-byte-writer ;
binary [
ensure-encode-length
binary [ encode-base64-lines ] with-byte-reader
] with-byte-writer ;
: >urlsafe-base64 ( seq -- base64 )
>base64 H{
{ CHAR: + CHAR: - }
{ CHAR: / CHAR: _ }
} substitute ;
: urlsafe-base64> ( base64 -- seq )
H{
{ CHAR: - CHAR: + }
{ CHAR: _ CHAR: / }
} substitute base64> ;
: >urlsafe-base64-lines ( seq -- base64 )
>base64-lines H{
{ CHAR: + CHAR: - }
{ CHAR: / CHAR: _ }
} substitute ;

View File

@ -1 +1 @@
Base64 encoding/decoding
Base64 encoding/decoding (RFC 3548)

View File

@ -1 +1,2 @@
algorithms
collections

View File

@ -1,8 +1,8 @@
! Copyright (C) 2007, 2011 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors alien alien.accessors byte-arrays fry io.binary
kernel kernel.private locals math math.bitwise parser
prettyprint.custom sequences sequences.private ;
kernel kernel.private locals math math.bitwise parser sequences
sequences.private vocabs.loader ;
IN: bit-arrays
TUPLE: bit-array
@ -98,6 +98,4 @@ SYNTAX: ?{ \ } [ >bit-array ] parse-literal ;
INSTANCE: bit-array sequence
M: bit-array pprint-delims drop \ ?{ \ } ;
M: bit-array >pprint-sequence ;
M: bit-array pprint* pprint-object ;
{ "bit-arrays" "prettyprint" } "bit-arrays.prettyprint" require-when

View File

@ -0,0 +1,6 @@
USING: bit-arrays kernel prettyprint.custom ;
IN: bit-arrays.prettyprint
M: bit-array pprint-delims drop \ ?{ \ } ;
M: bit-array >pprint-sequence ;
M: bit-array pprint* pprint-object ;

View File

@ -1,8 +1,7 @@
! Copyright (C) 2008, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays kernel kernel.private math sequences
sequences.private growable bit-arrays prettyprint.custom
parser accessors vectors.functor classes.parser ;
USING: bit-arrays classes.parser growable kernel parser
vectors.functor vocabs.loader ;
IN: bit-vectors
<< "bit-vector" create-class-in \ bit-array \ <bit-array> define-vector >>
@ -10,6 +9,5 @@ IN: bit-vectors
SYNTAX: ?V{ \ } [ >bit-vector ] parse-literal ;
M: bit-vector contract 2drop ;
M: bit-vector >pprint-sequence ;
M: bit-vector pprint-delims drop \ ?V{ \ } ;
M: bit-vector pprint* pprint-object ;
{ "bit-vectors" "prettyprint" } "bit-vectors.prettyprint" require-when

View File

@ -0,0 +1,7 @@
USING: bit-vectors kernel prettyprint.custom ;
IN: bit-vectors.prettyprint
M: bit-vector >pprint-sequence ;
M: bit-vector pprint-delims drop \ ?V{ \ } ;
M: bit-vector pprint* pprint-object ;

View File

@ -166,10 +166,10 @@ ERROR: not-enough-bits n bit-reader ;
bs bytes>> subseq endian> execute( seq -- x )
n bs subseq-endian execute( bignum n bs -- bits ) ;
M: lsb0-bit-reader peek ( n bs -- bits )
M: lsb0-bit-reader peek
\ le> \ subseq>bits-le (peek) ;
M: msb0-bit-reader peek ( n bs -- bits )
M: msb0-bit-reader peek
\ be> \ subseq>bits-be (peek) ;
:: bit-writer-bytes ( writer -- bytes )

View File

@ -46,7 +46,7 @@ HELP: sub-primitives
ARTICLE: "bootstrap.image" "Bootstrapping new images"
"A new image can be built from source; this is known as " { $emphasis "bootstrap" } ". Bootstrap is a two-step process. The first stage is the creation of a bootstrap image from a running Factor instance:"
{ $subsections make-image }
{ $subsections make-image make-my-image }
"The second bootstrapping stage is initiated by running the resulting bootstrap image:"
{ $code "./factor -i=boot.x86.32.image" }
"This stage loads additional code, compiles all words, and creates a final " { $snippet "factor.image" } "."

View File

@ -1,15 +1,15 @@
! Copyright (C) 2004, 2011 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays assocs byte-arrays classes classes.builtin
classes.private classes.tuple classes.tuple.private combinators
combinators.short-circuit combinators.smart
compiler.codegen.relocation compiler.units fry generic
generic.single.private grouping hashtables hashtables.private io
io.binary io.encodings.binary io.files io.pathnames kernel
kernel.private layouts locals make math math.order namespaces
namespaces.private parser parser.notes prettyprint quotations
sequences sequences.private source-files strings system vectors
vocabs words ;
USING: accessors arrays assocs byte-arrays classes
classes.builtin classes.private classes.tuple
classes.tuple.private combinators combinators.short-circuit
combinators.smart command-line compiler.codegen.relocation
compiler.units fry generic generic.single.private grouping
hashtables hashtables.private io io.binary io.encodings.binary
io.files io.pathnames kernel kernel.private layouts locals make
math math.order namespaces namespaces.private parser
parser.notes prettyprint quotations sequences sequences.private
source-files strings system vectors vocabs words ;
IN: bootstrap.image
: arch-name ( os cpu -- arch )
@ -540,3 +540,8 @@ PRIVATE>
: make-my-image ( -- )
my-arch-name make-image ;
: make-image-main ( -- )
command-line get [ make-my-image ] [ [ make-image ] each ] if-empty ;
MAIN: make-image-main

View File

@ -778,8 +778,8 @@ CONSTANT: all-primitives {
{
"tools.profiler.sampling.private"
{
{ "profiling" ( n -- ) "sampling_profiler" { object } { } f }
{ "(get-samples)" ( -- samples/f ) "get_samples" { } { object } f }
{ "set-profiling" ( n -- ) "set_profiling" { object } { } f }
{ "get-samples" ( -- samples/f ) "get_samples" { } { object } f }
}
}
{

View File

@ -1,10 +1,10 @@
! Copyright (C) 2008 Slava Pestov.
! Copyright (C) 2015 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: bootstrap.image checksums checksums.openssl cli.git fry
io io.directories io.encodings.ascii io.encodings.utf8 io.files
USING: bootstrap.image checksums checksums.openssl fry io
io.directories io.encodings.ascii io.encodings.utf8 io.files
io.files.temp io.files.unique io.launcher io.pathnames kernel
make math.parser namespaces sequences splitting system ;
make math.parser namespaces sequences splitting system unicode ;
IN: bootstrap.image.upload
SYMBOL: upload-images-destination
@ -21,7 +21,11 @@ SYMBOL: build-images-destination
or ;
: factor-git-branch ( -- name )
image-path parent-directory git-current-branch ;
image-path parent-directory [
{ "git" "rev-parse" "--abbrev-ref" "HEAD" }
utf8 <process-reader> stream-contents
[ blank? ] trim-tail
] with-directory ;
: git-branch-destination ( -- dest )
build-images-destination get
@ -43,14 +47,7 @@ SYMBOL: build-images-destination
] each
] with-file-writer ;
! Windows scp doesn't like pathnames with colons, it treats them as hostnames.
! Workaround for uploading checksums.txt created with temp-file.
! e.g. C:\Users\\Doug\\AppData\\Local\\Temp/factorcode.org\\Factor/checksums.txt
! ssh: Could not resolve hostname c: no address associated with name
HOOK: scp-name os ( -- path )
M: object scp-name "scp" ;
M: windows scp-name "pscp" ;
: scp-name ( -- path ) "scp" ;
: upload-images ( -- )
[

View File

@ -38,9 +38,9 @@ M: cache-assoc dispose* clear-assoc ;
PRIVATE>
: purge-cache ( cache -- )
[ assoc>> ] [ max-age>> ] bi V{ } clone [
dup [ assoc>> ] [ max-age>> ] bi V{ } clone [
'[
nip dup age>> 1 + [ >>age ] keep
_ < [ drop t ] [ _ dispose-to f ] if
] assoc-filter! drop
] assoc-filter >>assoc drop
] keep [ last rethrow ] unless-empty ;

View File

@ -401,6 +401,22 @@ HELP: day-of-year
}
} ;
HELP: week-number
{ $values { "timestamp" timestamp } { "[1,53]" integer } }
{ $description "Calculates the ISO 8601 week number from 1 to 53 (leap years). See " { $snippet "https://en.wikipedia.org/wiki/ISO_week_date" } }
{ $examples
"Last day of 2018 is already in the first week of 2019."
{ $example "USING: calendar prettyprint ;"
"2018 12 31 <date> week-number ."
"1"
}
"2020 is a leap year with 53 weeks, and January 1st, 2021 is still in week 53 of 2020."
{ $example "USING: calendar prettyprint ;"
"2021 1 1 <date> week-number ."
"53"
}
} ;
HELP: sunday
{ $values { "timestamp" timestamp } { "new-timestamp" timestamp } }
{ $description "Returns the Sunday from the current week, which starts on a Sunday." } ;
@ -573,6 +589,7 @@ ARTICLE: "calendar-facts" "Calendar facts"
days-in-month
day-of-year
day-of-week
week-number
}
"Calculating a Julian day number:"
{ $subsections julian-day-number }

View File

@ -194,3 +194,9 @@ IN: calendar
! pm
[ now 30 pm ] [ not-in-interval? ] must-fail-with
{ 1 } [ 2018 12 31 <date> week-number ] unit-test
{ 16 } [ 2019 4 17 <date> week-number ] unit-test
{ 53 } [ 2021 1 1 <date> week-number ] unit-test

View File

@ -40,10 +40,10 @@ CONSTANT: day-counts { 0 31 28 31 30 31 30 31 31 30 31 30 31 }
GENERIC: leap-year? ( obj -- ? )
M: integer leap-year? ( year -- ? )
M: integer leap-year?
dup 100 divisor? 400 4 ? divisor? ;
M: timestamp leap-year? ( timestamp -- ? )
M: timestamp leap-year?
year>> leap-year? ;
: (days-in-month) ( year month -- n )
@ -121,10 +121,10 @@ GENERIC: easter ( obj -- obj' )
h l + 7 m * - 114 + 31 /mod 1 + ;
M: integer easter ( year -- timestamp )
M: integer easter
dup easter-month-day <date> ;
M: timestamp easter ( timestamp -- timestamp )
M: timestamp easter
clone
dup year>> easter-month-day
swapd >>day swap >>month ;
@ -167,52 +167,52 @@ GENERIC: +second ( timestamp x -- timestamp )
{ [ day>> 29 = ] [ month>> 2 = ] [ leap-year? not ] } 1&&
[ 3 >>month 1 >>day ] when ;
M: integer +year ( timestamp n -- timestamp )
M: integer +year
[ + ] curry change-year adjust-leap-year ;
M: real +year ( timestamp n -- timestamp )
M: real +year
[ float>whole-part swapd days-per-year * +day swap +year ] unless-zero ;
: months/years ( n -- months years )
12 /rem [ 1 - 12 ] when-zero swap ; inline
M: integer +month ( timestamp n -- timestamp )
M: integer +month
[ over month>> + months/years [ >>month ] dip +year ] unless-zero ;
M: real +month ( timestamp n -- timestamp )
M: real +month
[ float>whole-part swapd average-month * +day swap +month ] unless-zero ;
M: integer +day ( timestamp n -- timestamp )
M: integer +day
[
over >date< julian-day-number + julian-day-number>date
[ >>year ] [ >>month ] [ >>day ] tri*
] unless-zero ;
M: real +day ( timestamp n -- timestamp )
M: real +day
[ float>whole-part swapd 24 * +hour swap +day ] unless-zero ;
: hours/days ( n -- hours days )
24 /rem swap ;
M: integer +hour ( timestamp n -- timestamp )
M: integer +hour
[ over hour>> + hours/days [ >>hour ] dip +day ] unless-zero ;
M: real +hour ( timestamp n -- timestamp )
M: real +hour
float>whole-part swapd 60 * +minute swap +hour ;
: minutes/hours ( n -- minutes hours )
60 /rem swap ;
M: integer +minute ( timestamp n -- timestamp )
M: integer +minute
[ over minute>> + minutes/hours [ >>minute ] dip +hour ] unless-zero ;
M: real +minute ( timestamp n -- timestamp )
M: real +minute
[ float>whole-part swapd 60 * +second swap +minute ] unless-zero ;
: seconds/minutes ( n -- seconds minutes )
60 /rem swap >integer ;
M: number +second ( timestamp n -- timestamp )
M: number +second
[ over second>> + seconds/minutes [ >>second ] dip +minute ] unless-zero ;
: (time+) ( timestamp duration -- timestamp' duration )
@ -291,8 +291,7 @@ GENERIC: time- ( time1 time2 -- time3 )
[ neg +year 0 ] change-year drop
] if ;
M: timestamp <=> ( ts1 ts2 -- n )
[ >gmt tuple-slots ] compare ;
M: timestamp <=> [ >gmt tuple-slots ] compare ;
: same-day? ( ts1 ts2 -- ? )
[ >gmt >date< <date> ] same? ;
@ -376,8 +375,9 @@ M: duration time-
GENERIC: days-in-year ( obj -- n )
M: integer days-in-year ( year -- n ) leap-year? 366 365 ? ;
M: timestamp days-in-year ( timestamp -- n ) year>> days-in-year ;
M: integer days-in-year leap-year? 366 365 ? ;
M: timestamp days-in-year year>> days-in-year ;
: days-in-month ( timestamp -- n )
>date< drop (days-in-month) ;
@ -538,6 +538,16 @@ M: integer end-of-year 12 31 <date> ;
: unix-time>timestamp ( seconds -- timestamp )
[ unix-1970 ] dip +second ; inline
: (week-number) ( timestamp -- [0,53] )
[ day-of-year ] [ day-of-week [ 7 ] when-zero ] bi - 10 + 7 /i ;
: week-number ( timestamp -- [1,53] )
dup (week-number) {
{ 0 [ year>> 1 - end-of-year (week-number) ] }
{ 53 [ year>> 1 + <year> (week-number) 1 = 1 53 ? ] }
[ nip ]
} case ;
{
{ [ os unix? ] [ "calendar.unix" ] }
{ [ os windows? ] [ "calendar.windows" ] }

View File

@ -52,15 +52,15 @@ MACRO: formatted ( spec -- quot )
GENERIC: day. ( obj -- )
M: integer day. ( n -- )
M: integer day.
number>string dup length 2 < [ bl ] when write ;
M: timestamp day. ( timestamp -- )
M: timestamp day.
day>> day. ;
GENERIC: month. ( obj -- )
M: array month. ( pair -- )
M: array month.
first2
[ month-name write bl number>string print ]
[ 1 zeller-congruence ]
@ -71,15 +71,15 @@ M: array month. ( pair -- )
1 + + 7 mod zero? [ nl ] [ bl ] if
] with each-integer nl ;
M: timestamp month. ( timestamp -- )
M: timestamp month.
[ year>> ] [ month>> ] bi 2array month. ;
GENERIC: year. ( obj -- )
M: integer year. ( n -- )
M: integer year.
12 [ 1 + 2array month. nl ] with each-integer ;
M: timestamp year. ( timestamp -- )
M: timestamp year.
year>> year. ;
: timestamp>mdtm ( timestamp -- str )

View File

@ -0,0 +1 @@
time

View File

@ -31,7 +31,7 @@ IN: calendar.unix
: timezone-name ( -- string )
get-time zone>> ;
M: unix gmt-offset ( -- hours minutes seconds )
M: unix gmt-offset
get-time gmtoff>> 3600 /mod 60 /mod ;
: current-timeval ( -- timeval )

View File

@ -28,10 +28,10 @@ IN: calendar.windows
[ [ wSecond>> ] [ wMilliseconds>> 1000 / ] bi + ]
} cleave instant <timestamp> ;
M: windows gmt-offset ( -- hours minutes seconds )
M: windows gmt-offset
TIME_ZONE_INFORMATION <struct>
dup GetTimeZoneInformation {
{ TIME_ZONE_ID_INVALID [ win32-error-string throw ] }
{ TIME_ZONE_ID_INVALID [ win32-error ] }
{ TIME_ZONE_ID_UNKNOWN [ Bias>> ] }
{ TIME_ZONE_ID_STANDARD [ Bias>> ] }
{ TIME_ZONE_ID_DAYLIGHT [ [ Bias>> ] [ DaylightBias>> ] bi + ] }

View File

@ -31,11 +31,11 @@ GENERIC: from ( channel -- value )
PRIVATE>
M: channel to ( value channel -- )
M: channel to
dup receivers>>
[ dup wait to ] [ nip (to) ] if-empty ;
M: channel from ( channel -- value )
M: channel from
[ self ] dip
notify senders>>
[ (from) ] unless-empty

View File

@ -60,10 +60,10 @@ C: <remote-channel> remote-channel
PRIVATE>
M: remote-channel to ( value remote-channel -- )
M: remote-channel to
[ id>> swap to-message boa ] keep send-message drop ;
M: remote-channel from ( remote-channel -- value )
M: remote-channel from
[ id>> from-message boa ] keep send-message ;
[

View File

@ -8,10 +8,10 @@ SINGLETON: adler-32
CONSTANT: adler-32-modulus 65521
M: adler-32 checksum-bytes ( bytes checksum -- value )
M: adler-32 checksum-bytes
drop
[ sum 1 + ]
[ [ dup length [1,b] <reversed> v. ] [ length ] bi + ] bi
[ [ dup length [1,b] <reversed> vdot ] [ length ] bi + ] bi
[ adler-32-modulus mod ] bi@ 16 shift bitor ;
INSTANCE: adler-32 checksum

View File

@ -5,7 +5,7 @@ IN: checksums.bsd
SINGLETON: bsd
M: bsd checksum-bytes ( bytes checksum -- value )
M: bsd checksum-bytes
drop 0 [
[ [ -1 shift ] [ 1 bitand 15 shift ] bi + ] dip
+ 0xffff bitand

View File

@ -38,67 +38,67 @@ CONSTANT: fnv1-256-basis 0xdd268dbcaac550362d98c384c4e576ccc8b1536847b6bbb31023b
CONSTANT: fnv1-512-basis 0xb86db0b1171f4416dca1e50f309990acac87d059c90000000000000000000d21e948f68a34c192f62ea79bc942dbe7ce182036415f56e34bac982aac4afe9fd9
CONSTANT: fnv1-1024-basis 0x5f7a76758ecc4d32e56d5a591028b74b29fc4223fdada16c3bf34eda3674da9a21d9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004c6d7eb6e73802734510a555f256cc005ae556bde8cc9c6a93b21aff4b16c71ee90b3
M: fnv1-32 checksum-bytes ( bytes checksum -- value )
M: fnv1-32 checksum-bytes
drop
fnv1-32-basis swap
[ swap fnv1-32-prime * bitxor fnv1-32-mod bitand ] each ;
M: fnv1a-32 checksum-bytes ( bytes checksum -- value )
M: fnv1a-32 checksum-bytes
drop
fnv1-32-basis swap
[ bitxor fnv1-32-prime * fnv1-32-mod bitand ] each ;
M: fnv1-64 checksum-bytes ( bytes checksum -- value )
M: fnv1-64 checksum-bytes
drop
fnv1-64-basis swap
[ swap fnv1-64-prime * bitxor fnv1-64-mod bitand ] each ;
M: fnv1a-64 checksum-bytes ( bytes checksum -- value )
M: fnv1a-64 checksum-bytes
drop
fnv1-64-basis swap
[ bitxor fnv1-64-prime * fnv1-64-mod bitand ] each ;
M: fnv1-128 checksum-bytes ( bytes checksum -- value )
M: fnv1-128 checksum-bytes
drop
fnv1-128-basis swap
[ swap fnv1-128-prime * bitxor fnv1-128-mod bitand ] each ;
M: fnv1a-128 checksum-bytes ( bytes checksum -- value )
M: fnv1a-128 checksum-bytes
drop
fnv1-128-basis swap
[ bitxor fnv1-128-prime * fnv1-128-mod bitand ] each ;
M: fnv1-256 checksum-bytes ( bytes checksum -- value )
M: fnv1-256 checksum-bytes
drop
fnv1-256-basis swap
[ swap fnv1-256-prime * bitxor fnv1-256-mod bitand ] each ;
M: fnv1a-256 checksum-bytes ( bytes checksum -- value )
M: fnv1a-256 checksum-bytes
drop
fnv1-256-basis swap
[ bitxor fnv1-256-prime * fnv1-256-mod bitand ] each ;
M: fnv1-512 checksum-bytes ( bytes checksum -- value )
M: fnv1-512 checksum-bytes
drop
fnv1-512-basis swap
[ swap fnv1-512-prime * bitxor fnv1-512-mod bitand ] each ;
M: fnv1a-512 checksum-bytes ( bytes checksum -- value )
M: fnv1a-512 checksum-bytes
drop
fnv1-512-basis swap
[ bitxor fnv1-512-prime * fnv1-512-mod bitand ] each ;
M: fnv1-1024 checksum-bytes ( bytes checksum -- value )
M: fnv1-1024 checksum-bytes
drop
fnv1-1024-basis swap
[ swap fnv1-1024-prime * bitxor fnv1-1024-mod bitand ] each ;
M: fnv1a-1024 checksum-bytes ( bytes checksum -- value )
M: fnv1a-1024 checksum-bytes
drop
fnv1-1024-basis swap
[ bitxor fnv1-1024-prime * fnv1-1024-mod bitand ] each ;

View File

@ -47,7 +47,7 @@ CONSTANT: n 0xe6546b64
PRIVATE>
M: murmur3-32 checksum-bytes ( bytes checksum -- value )
M: murmur3-32 checksum-bytes
seed>> 32 bits main-loop end-case avalanche ;
INSTANCE: murmur3-32 checksum

View File

@ -38,13 +38,13 @@ M: evp-md-context dispose*
: set-digest ( name ctx -- )
handle>> swap digest-named f EVP_DigestInit_ex ssl-error ;
M: openssl-checksum initialize-checksum-state ( checksum -- evp-md-context )
M: openssl-checksum initialize-checksum-state
maybe-init-ssl name>> <evp-md-context> [ set-digest ] keep ;
M: evp-md-context add-checksum-bytes ( ctx bytes -- ctx' )
M: evp-md-context add-checksum-bytes
[ dup handle>> ] dip dup length EVP_DigestUpdate ssl-error ;
M: evp-md-context get-checksum ( ctx -- value )
M: evp-md-context get-checksum
handle>>
{ { int EVP_MAX_MD_SIZE } int }
[ EVP_DigestFinal_ex ssl-error ] with-out-parameters

View File

@ -116,7 +116,7 @@ M: struct-mirror delete-at
M: struct-mirror clear-assoc
object>> reset-struct-slots ;
M: struct-mirror >alist ( mirror -- alist )
M: struct-mirror >alist
object>> [
[ drop "underlying" ] [ >c-ptr ] bi 2array 1array
] [

View File

@ -1,9 +1,11 @@
! Copyright (C) 2006, 2009 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
USING: alien.c-types alien.syntax classes.struct cocoa.runtime
core-graphics.types ;
core-graphics.types kernel literals layouts ;
IN: cocoa.types
CONSTANT: NSNotFound $[ 32bit? 0x7fffffff 0x7fffffffffffffff ? ]
TYPEDEF: long NSInteger
TYPEDEF: ulong NSUInteger

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -7,7 +7,7 @@ TUPLE: gray < color { gray read-only } { alpha read-only } ;
C: <gray> gray
M: gray >rgba ( gray -- rgba )
M: gray >rgba
[ gray>> dup dup ] [ alpha>> ] bi <rgba> ; inline
M: gray red>> gray>> ;

View File

@ -0,0 +1 @@
colors

View File

@ -6,12 +6,15 @@ lexer math math.parser sequences ;
IN: colors.hex
ERROR: invalid-hex-color hex ;
: hex>rgba ( hex -- rgba )
dup length {
{ 6 [ 2 group [ hex> 255 /f ] map first3 1.0 ] }
{ 8 [ 2 group [ hex> 255 /f ] map first4 ] }
{ 3 [ [ digit> 15 /f ] { } map-as first3 1.0 ] }
{ 4 [ [ digit> 15 /f ] { } map-as first4 ] }
[ drop invalid-hex-color ]
} case <rgba> ;
: rgba>hex ( rgba -- hex )

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -29,7 +29,7 @@ C: <hsva> hsva
PRIVATE>
M: hsva >rgba ( hsva -- rgba )
M: hsva >rgba
[
dup Hi
{

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -61,7 +61,7 @@ C: <ryba> ryba
PRIVATE>
M: ryba >rgba ( ryba -- rgba )
M: ryba >rgba
[
[ red>> ] [ yellow>> ] [ blue>> ] tri
[ ryb>rgb ] normalized

View File

@ -0,0 +1 @@
colors

1
basis/colors/tags.txt Normal file
View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

View File

@ -0,0 +1 @@
colors

Some files were not shown because too many files have changed in this diff Show More