]> gitweb.factorcode.org Git - factor.git/log
factor.git
12 months agohttp.client: parse body in errors as json if content-type is application/json http-client-json-error 2783/head
Doug Coleman [Sat, 15 Apr 2023 20:57:51 +0000 (15:57 -0500)]
http.client: parse body in errors as json if content-type is application/json

12 months agodiscord: handle errors in bot, e.g. message too large from `help discord:dispatch...
Doug Coleman [Sat, 15 Apr 2023 20:51:39 +0000 (15:51 -0500)]
discord: handle errors in bot, e.g. message too large from `help discord:dispatch-message`

max size is 4k so split up messages or truncate

12 months agodiscord: remove breakpoint
Doug Coleman [Sat, 15 Apr 2023 20:39:06 +0000 (15:39 -0500)]
discord: remove breakpoint

12 months agodiscord: look up discord ops as singletons
Doug Coleman [Sat, 15 Apr 2023 20:28:44 +0000 (15:28 -0500)]
discord: look up discord ops as singletons

basic bot:

GENERIC: discord-help-bot ( json opcode -- )

M: object discord-help-bot 2drop ;

M: MESSAGE_CREATE discord-help-bot drop
    { [ reply-command ] [ reply-echo ] } 1|| drop ;

launch bot:

discord-bot-config get
[ discord-help-bot ] >>user-callback
discord-connect

12 months agodiscord: on reconnect we create a new <discord-bot> so set user-callback on config...
Doug Coleman [Sat, 15 Apr 2023 13:50:47 +0000 (08:50 -0500)]
discord: on reconnect we create a new <discord-bot> so set user-callback on config instead

12 months agoio.sockets: add using
Doug Coleman [Sat, 15 Apr 2023 06:39:04 +0000 (01:39 -0500)]
io.sockets: add using

12 months agohttp2.server: fix using
Doug Coleman [Sat, 15 Apr 2023 03:36:43 +0000 (22:36 -0500)]
http2.server: fix using

12 months agodiscord: add a basic bot functionality
Doug Coleman [Sat, 15 Apr 2023 01:38:35 +0000 (20:38 -0500)]
discord: add a basic bot functionality

discord-bot-config get discord-connect
[ discord-help-bot-handler ] >>user-callback

12 months agodiscord: add dispose and format better and callback is now ( discord-bot json opcode...
Doug Coleman [Fri, 14 Apr 2023 04:18:36 +0000 (23:18 -0500)]
discord: add dispose and format better and callback is now ( discord-bot json opcode-string -- )

12 months agodiscord: add user-callback, reconnects
Doug Coleman [Mon, 10 Apr 2023 14:17:23 +0000 (09:17 -0500)]
discord: add user-callback, reconnects

Example:
: handler ( bot json -- ) 2drop ;

discord-bot-config get discord-connect
[ handler ] >>user-callback

12 months agobuild-from-source: fix merge conflict
Doug Coleman [Mon, 10 Apr 2023 14:16:25 +0000 (09:16 -0500)]
build-from-source: fix merge conflict

12 months agodiscord: handle more messages
Doug Coleman [Mon, 3 Apr 2023 04:03:11 +0000 (23:03 -0500)]
discord: handle more messages

12 months agohttp.websockets: don't send if the socket is disposed
Doug Coleman [Mon, 3 Apr 2023 04:02:55 +0000 (23:02 -0500)]
http.websockets: don't send if the socket is disposed

12 months agodesctructors: add if-disposed
Doug Coleman [Mon, 3 Apr 2023 03:59:18 +0000 (22:59 -0500)]
desctructors: add if-disposed

12 months agocli.git: add git-tag to get all the tags
Doug Coleman [Mon, 3 Apr 2023 03:57:53 +0000 (22:57 -0500)]
cli.git: add git-tag to get all the tags

12 months agobuild-from-source.macosx: add basic python3 compilation
Doug Coleman [Mon, 3 Apr 2023 03:55:20 +0000 (22:55 -0500)]
build-from-source.macosx: add basic python3 compilation

12 months agobuild-from-source: python version numbers are not all semver, find the latest one
Doug Coleman [Mon, 10 Apr 2023 01:59:17 +0000 (20:59 -0500)]
build-from-source: python version numbers are not all semver, find the latest one

12 months agojson: add json-null>f
Doug Coleman [Mon, 3 Apr 2023 03:42:28 +0000 (22:42 -0500)]
json: add json-null>f

12 months agoio.launcher: use process-lines
Doug Coleman [Mon, 3 Apr 2023 03:41:45 +0000 (22:41 -0500)]
io.launcher: use process-lines

12 months agoprotocols: fix typo, remove error
Doug Coleman [Wed, 29 Mar 2023 05:05:59 +0000 (00:05 -0500)]
protocols: fix typo, remove error

12 months agohttp: remove some dead code but i wanted to keep it in git history
Doug Coleman [Wed, 29 Mar 2023 05:01:45 +0000 (00:01 -0500)]
http: remove some dead code but i wanted to keep it in git history

12 months agohttp: allow using ws:// or wss:// and use it in discord
Doug Coleman [Wed, 29 Mar 2023 04:59:57 +0000 (23:59 -0500)]
http: allow using ws:// or wss:// and use it in discord

wss:// adds the websocket upgrade headers to the request and then gets replaced by https://

12 months agoprotocols: add an alternative to getservbyport
Doug Coleman [Wed, 29 Mar 2023 04:57:58 +0000 (23:57 -0500)]
protocols: add an alternative to getservbyport

getservbyport doesn't support ws:// wss://

12 months agobittorrent: add two fields to magnet links
Doug Coleman [Wed, 29 Mar 2023 03:36:41 +0000 (22:36 -0500)]
bittorrent: add two fields to magnet links

12 months agounix.ffi: typo, prot -> proto
Doug Coleman [Wed, 29 Mar 2023 02:39:00 +0000 (21:39 -0500)]
unix.ffi: typo, prot -> proto

12 months agohttp: add delete-header
Doug Coleman [Fri, 14 Apr 2023 01:22:16 +0000 (20:22 -0500)]
http: add delete-header

12 months agoaws: Add vocabulary that can do v4 signing
Doug Coleman [Fri, 14 Apr 2023 01:13:50 +0000 (20:13 -0500)]
aws: Add vocabulary that can do v4 signing

from factor:

"https://ec2.us-east-1.api.aws" <get-request>
"ec2"
"us-east-1"
[=[ export AWS_ACCESS_KEY_ID="asdfasdfasdf"
export AWS_SECRET_ACCESS_KEY="xxxxxxxxxxxxx"
export AWS_SESSION_TOKEN="abcdefgverylongsessiontoken"
]=] string>aws-creds
sign-aws-request http-request

for debugging with curl built from source with cmake:

./src/curl --verbose --request GET \
  'https://ec2.us-east-1.api.aws/?Action=DescribeKeyPairs' \
  --aws-sigv4 aws:amz:us-east-1:ec2 \
  --user "${AWS_ACCESS_KEY_ID}:${AWS_SECRET_ACCESS_KEY}" \
  --header "x-amz-security-token: ${AWS_SESSION_TOKEN}" \
  --header 'Accept: application/json'

12 months agocalendar: removing weekdays-between2
John Benediktsson [Thu, 13 Apr 2023 22:17:45 +0000 (15:17 -0700)]
calendar: removing weekdays-between2

12 months agocalendar: fix end-of-week modifying the input
John Benediktsson [Thu, 13 Apr 2023 22:04:30 +0000 (15:04 -0700)]
calendar: fix end-of-week modifying the input

12 months agocodebase-analyzer: more useful by printing the files. automake,nmake,CAPSfiles, etc
Doug Coleman [Thu, 13 Apr 2023 03:54:21 +0000 (22:54 -0500)]
codebase-analyzer: more useful by printing the files. automake,nmake,CAPSfiles, etc

12 months agoopenai: adding support for the OpenAI API
John Benediktsson [Thu, 13 Apr 2023 03:52:23 +0000 (20:52 -0700)]
openai: adding support for the OpenAI API

12 months agobuild-from-source.windows: thought postgres worked but no
Doug Coleman [Fri, 7 Apr 2023 19:16:20 +0000 (14:16 -0500)]
build-from-source.windows: thought postgres worked but no

official support was dropped but i think you can still compile it if you
get the right command

12 months agobuild-from-source.windows: Support all builds on win32
Doug Coleman [Fri, 7 Apr 2023 18:44:31 +0000 (13:44 -0500)]
build-from-source.windows: Support all builds on win32

main difference is you give cmake `-A Win32` and msbuild
`/p:Platform=Win32`

some libraries have some features disabled, like pcre and some
compression libraries. this is because cmake finds them in
strawberryperl which i have installed as 64bit, so 32bit obviously can't
link against them. if this is a problem, we can build them alongside
(again? cairo seems to build a lot already) and link them

12 months agocuda: fix ffi, it's size_t (32bit on win32, 64bit on win64)
Doug Coleman [Fri, 7 Apr 2023 18:43:19 +0000 (13:43 -0500)]
cuda: fix ffi, it's size_t (32bit on win32, 64bit on win64)

cuDeviceTotalMem_v2 can't get vram sizes above 4GB
probably need to use directx apis to get real vram on win32

12 months agobuild-from-source: Add cpu info to temp-directory for 32 vs 64bit and
Doug Coleman [Fri, 7 Apr 2023 06:06:02 +0000 (01:06 -0500)]
build-from-source: Add cpu info to temp-directory for 32 vs 64bit and
arm vs intel

12 months agoopenssl: x64 library is called libssl-3-x64.dll, x86 is called
Doug Coleman [Fri, 7 Apr 2023 06:05:19 +0000 (01:05 -0500)]
openssl: x64 library is called libssl-3-x64.dll, x86 is called
libssl-3.dll

12 months agowindows.shell32: add a bunch of guids for SHGetKnownFolderPath
Doug Coleman [Fri, 7 Apr 2023 05:16:46 +0000 (00:16 -0500)]
windows.shell32: add a bunch of guids for SHGetKnownFolderPath

12 months agozoneinfo: add back metadata
John Benediktsson [Fri, 7 Apr 2023 00:05:51 +0000 (17:05 -0700)]
zoneinfo: add back metadata

12 months agozoneinfo: update to tzdata-2023c
John Benediktsson [Fri, 7 Apr 2023 00:04:57 +0000 (17:04 -0700)]
zoneinfo: update to tzdata-2023c

12 months agocrontab: add some words to calculate cron start times
Doug Coleman [Thu, 6 Apr 2023 23:28:29 +0000 (18:28 -0500)]
crontab: add some words to calculate cron start times

12 months agocrontab: make parse-cronentry optional in API
John Benediktsson [Thu, 6 Apr 2023 17:01:18 +0000 (10:01 -0700)]
crontab: make parse-cronentry optional in API

12 months agocrontab: fixing another case
John Benediktsson [Thu, 6 Apr 2023 16:58:13 +0000 (09:58 -0700)]
crontab: fixing another case

12 months agowebsites.concatenative: tweak the cgit responder
John Benediktsson [Thu, 6 Apr 2023 16:06:23 +0000 (09:06 -0700)]
websites.concatenative: tweak the cgit responder

12 months agocrontab: handle more non-standard day-of-week fractions
John Benediktsson [Thu, 6 Apr 2023 15:48:34 +0000 (08:48 -0700)]
crontab: handle more non-standard day-of-week fractions

12 months agosolr: add very basic solr vocab to expand on later
Doug Coleman [Thu, 6 Apr 2023 14:30:04 +0000 (09:30 -0500)]
solr: add very basic solr vocab to expand on later

12 months agosets.extras: Add diffs word for comparing sets
Doug Coleman [Thu, 6 Apr 2023 14:21:47 +0000 (09:21 -0500)]
sets.extras: Add diffs word for comparing sets

12 months agostring-server: add a stress-test that serves 300k length strings
Doug Coleman [Thu, 6 Apr 2023 14:19:09 +0000 (09:19 -0500)]
string-server: add a stress-test that serves 300k length strings

repros https://github.com/factor/factor/issues/2771

! "localhost" 1239 <inet> utf8 [ read-contents ] with-client
! 100 <iota> >array [ drop "127.0.0.1" 1239 <inet4> binary [ read-contents [ all-eq? ] [ length ] bi 2array ] with-client ] parallel-map
! 100 <iota> >array [ drop "127.0.0.1" 1239 <inet4> binary [ read-contents [ [ CHAR: a = ] all? ] [ length ] bi 2array ] with-client ] parallel-map
! 50 <iota> >array [ drop "127.0.0.1" 1239 <inet4> binary [ read-contents [ [ CHAR: a = ] all? ] [ length ] bi 2array ] with-client ] parallel-map ! 40,000,000

12 months agochrome-tools: Add a way to copy curl/fetch commands from chrome-tools
Doug Coleman [Thu, 6 Apr 2023 14:11:54 +0000 (09:11 -0500)]
chrome-tools: Add a way to copy curl/fetch commands from chrome-tools

12 months agoiso-codes: add a way to get the debian iso files for languages etc
Doug Coleman [Thu, 6 Apr 2023 13:03:40 +0000 (08:03 -0500)]
iso-codes: add a way to get the debian iso files for languages etc

12 months agocrontab: support day=7 for Sunday, non-standard
John Benediktsson [Thu, 6 Apr 2023 04:01:14 +0000 (21:01 -0700)]
crontab: support day=7 for Sunday, non-standard

12 months agowebsites.concatenative: use ~/cgit
John Benediktsson [Thu, 6 Apr 2023 03:53:10 +0000 (20:53 -0700)]
websites.concatenative: use ~/cgit

12 months agomemoize: change zero-input memoize to store { called output }
John Benediktsson [Thu, 6 Apr 2023 03:09:25 +0000 (20:09 -0700)]
memoize: change zero-input memoize to store { called output }

12 months agocli.git: fix stack effect
Doug Coleman [Thu, 6 Apr 2023 02:32:48 +0000 (21:32 -0500)]
cli.git: fix stack effect

12 months agotools.completion: adding EDITOR: tab completion
John Benediktsson [Wed, 5 Apr 2023 22:33:56 +0000 (15:33 -0700)]
tools.completion: adding EDITOR: tab completion

12 months agomemoize: fix a few more zero input cases
John Benediktsson [Wed, 5 Apr 2023 22:24:24 +0000 (15:24 -0700)]
memoize: fix a few more zero input cases

12 months agocrontab: fix 2/26 * * * *
John Benediktsson [Wed, 5 Apr 2023 22:23:49 +0000 (15:23 -0700)]
crontab: fix 2/26 * * * *

12 months agomemoize: add another test case, only ( -- ) was broken
John Benediktsson [Tue, 4 Apr 2023 20:58:48 +0000 (13:58 -0700)]
memoize: add another test case, only ( -- ) was broken

12 months agomemoize: fix memoization of no-arg words
John Benediktsson [Tue, 4 Apr 2023 20:52:56 +0000 (13:52 -0700)]
memoize: fix memoization of no-arg words

13 months agogenerators: fix docs help-lint
Doug Coleman [Tue, 4 Apr 2023 00:55:21 +0000 (19:55 -0500)]
generators: fix docs help-lint

13 months agobuild-from-source.windows: add openal to build all
Doug Coleman [Sun, 2 Apr 2023 17:12:28 +0000 (12:12 -0500)]
build-from-source.windows: add openal to build all

13 months agoAdd generator article
Keldan Chapman [Sat, 1 Apr 2023 10:43:55 +0000 (12:43 +0200)]
Add generator article

13 months agobuild-from-source: do not copy renamed libssl DLLs
Benjamin Pollack [Mon, 3 Apr 2023 17:15:01 +0000 (13:15 -0400)]
build-from-source: do not copy renamed libssl DLLs

We were copying the DLLs build by the OpenSSL build process to the old
names we depended on in the Factor source code.  But since we're no
longer doing that, these steps are no longer needed.

13 months agoopenssl: use proper DLL names for Windows
Benjamin Pollack [Mon, 3 Apr 2023 17:11:23 +0000 (13:11 -0400)]
openssl: use proper DLL names for Windows

The preferred DLL name for OpenSSL appears to have pivoted to be
"libssl-3-<platform>.dll" at some point, and likewise for libcrypto.
We need to look for them with the new name; otherwise, we end up
needing two separate copies of libcrypto with slightly different names
to avoid giving ourselves DLL hell.

13 months agocrypto.xor: fix path
Doug Coleman [Tue, 28 Mar 2023 06:18:43 +0000 (01:18 -0500)]
crypto.xor: fix path

13 months agocrypto.xor: move to basis for websockets
Doug Coleman [Tue, 28 Mar 2023 05:23:33 +0000 (00:23 -0500)]
crypto.xor: move to basis for websockets

13 months agohttp.client: fix docs
Doug Coleman [Tue, 28 Mar 2023 05:21:17 +0000 (00:21 -0500)]
http.client: fix docs

13 months agohttp.client: move <PRIVATE section
Doug Coleman [Tue, 28 Mar 2023 04:57:12 +0000 (23:57 -0500)]
http.client: move <PRIVATE section

13 months agodiscord: add basic discord bot support
Doug Coleman [Tue, 28 Mar 2023 04:06:25 +0000 (23:06 -0500)]
discord: add basic discord bot support

- go to discord developer portal https://discord.com/developers/applications
- make a discord application
- add a bot to that app
-- enable PRESENCE INTENT, SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT (as desired)

! For websockets
t{ discord-bot-config
    { token "...from discord developer portal..." }
    { application-id "10885523740" } ! from developer portal
    { guild-id "1357300335" }        ! from "developer mode" in discord client, right click the server and "copy id"
    { channel-id "1089175837623" }   ! from "developer mode", right click channel and "copy id"
    { permissions 2048 }             ! intentions (2048 is send messages)
}
discord-connect

! For REST api
T{ discord-bot-config
    { client-id "bot id from dev portal" }
    { client-secret "from dev portal" }
}

13 months agohttp.client: support upgrading to websockets
Doug Coleman [Tue, 28 Mar 2023 03:55:15 +0000 (22:55 -0500)]
http.client: support upgrading to websockets

13 months agobuild-from-source.windows: build openal
Doug Coleman [Sat, 25 Mar 2023 04:42:15 +0000 (23:42 -0500)]
build-from-source.windows: build openal

13 months agobuild-from-source.windows: build blas and use more qw{}
Doug Coleman [Sat, 25 Mar 2023 04:14:16 +0000 (23:14 -0500)]
build-from-source.windows: build blas and use more qw{}

sadly can't use qw{ } for blas..

13 months agocli.git: add a way to git fetch and git reset hard instead of just a
Doug Coleman [Sat, 25 Mar 2023 00:35:44 +0000 (19:35 -0500)]
cli.git: add a way to git fetch and git reset hard instead of just a
regular pull

13 months agoio.launcher: Add run-processes and docs
Doug Coleman [Sat, 25 Mar 2023 00:35:25 +0000 (19:35 -0500)]
io.launcher: Add run-processes and docs

13 months agosequences.extras: simplify fry-map-as
Doug Coleman [Fri, 24 Mar 2023 23:11:06 +0000 (18:11 -0500)]
sequences.extras: simplify fry-map-as

13 months agobuild-from-source.windows: use jom for parallel openssl compilation
Doug Coleman [Tue, 21 Mar 2023 08:34:28 +0000 (03:34 -0500)]
build-from-source.windows: use jom for parallel openssl compilation

it's much faster

13 months agobuild-from-source.windows: don't find freetype2 in strawberry perl
Doug Coleman [Tue, 21 Mar 2023 07:46:32 +0000 (02:46 -0500)]
build-from-source.windows: don't find freetype2 in strawberry perl

force a build from submodules. can't do this from all of them because
gperf didnt seem to work like this

13 months agobuild-from-source: create the temp directory
Doug Coleman [Tue, 21 Mar 2023 06:13:43 +0000 (01:13 -0500)]
build-from-source: create the temp directory

13 months agoboostrap.image.upload: if we are in master or main, upload boot images to both
Doug Coleman [Thu, 16 Mar 2023 23:39:28 +0000 (18:39 -0500)]
boostrap.image.upload: if we are in master or main, upload boot images to both

13 months agotools.test: rename TEST: to DEFINE-TEST-WORD:
Doug Coleman [Wed, 15 Mar 2023 02:20:09 +0000 (21:20 -0500)]
tools.test: rename TEST: to DEFINE-TEST-WORD:

13 months agobasis, extra: remove unfinished changes from #2774
razetime [Wed, 15 Mar 2023 06:26:03 +0000 (11:56 +0530)]
basis, extra: remove unfinished changes from #2774

13 months agoMerge pull request #2774 from factor/w4-warnings
Raghu R [Wed, 15 Mar 2023 05:24:22 +0000 (10:54 +0530)]
Merge pull request #2774 from factor/w4-warnings

correct nmakefile to remove /W4

13 months agovm:remove w4 from nmakefile w4-warnings 2774/head
razetime [Wed, 15 Mar 2023 05:23:33 +0000 (10:53 +0530)]
vm:remove w4 from nmakefile

13 months agovm: nmakefile \W4 warning related changes
razetime [Wed, 15 Mar 2023 05:22:36 +0000 (10:52 +0530)]
vm: nmakefile \W4 warning related changes

13 months agovm: nmakefile \W4 warning related changes
Raghu R [Wed, 15 Mar 2023 04:29:28 +0000 (09:59 +0530)]
vm: nmakefile \W4 warning related changes

13 months agosequences: clarify some mutable vs resizeable notes in sequence docs
Doug Coleman [Wed, 15 Mar 2023 00:49:51 +0000 (19:49 -0500)]
sequences: clarify some mutable vs resizeable notes in sequence docs

13 months agoFix example
Dave Carlton [Tue, 14 Mar 2023 22:28:25 +0000 (17:28 -0500)]
Fix example

Added same note for other destrucives.

13 months agoMake reference to resizable more explict.
Dave Carlton [Tue, 14 Mar 2023 21:18:29 +0000 (16:18 -0500)]
Make reference to resizable more explict.

13 months agoassocs.extras: add delete-keys-of
Doug Coleman [Wed, 8 Mar 2023 03:31:54 +0000 (21:31 -0600)]
assocs.extras: add delete-keys-of

13 months agohttp: add set-headers utility word
Doug Coleman [Wed, 8 Mar 2023 03:31:38 +0000 (21:31 -0600)]
http: add set-headers utility word

13 months agodocs: fix spacing
Doug Coleman [Sat, 11 Mar 2023 13:12:10 +0000 (07:12 -0600)]
docs: fix spacing

13 months agohelp: switch IRC links to Discord change-the-chat-url 2770/head
Benjamin Pollack [Thu, 9 Mar 2023 21:44:14 +0000 (16:44 -0500)]
help: switch IRC links to Discord

The IRC server, while it still exists, has extremely low traffic, and isn't
reliably checked by the developers.  This switches those references to
instead be our Discord, which is quite active.

13 months agosequences.extras: Fix map-product documentation
Giftpflanze [Sun, 12 Mar 2023 19:10:08 +0000 (20:10 +0100)]
sequences.extras: Fix map-product documentation

13 months agowebsites.factorcode: add link to cgit
John Benediktsson [Wed, 8 Mar 2023 21:52:25 +0000 (13:52 -0800)]
websites.factorcode: add link to cgit

13 months agoRevert "webapps.mason: make docs/dev"
John Benediktsson [Wed, 8 Mar 2023 20:45:55 +0000 (12:45 -0800)]
Revert "webapps.mason: make docs/dev"

This reverts commit b6bb1863f11a71ef6794e878ecb011dd9b0280c5.

13 months agoRevert "webapps.mason: different approach"
John Benediktsson [Wed, 8 Mar 2023 20:45:53 +0000 (12:45 -0800)]
Revert "webapps.mason: different approach"

This reverts commit 5431edcea1bef2e0345cd1aa517843ba5971d1cc.

13 months agohashtables.wrapped: fix help-lint
John Benediktsson [Wed, 8 Mar 2023 20:43:24 +0000 (12:43 -0800)]
hashtables.wrapped: fix help-lint

13 months agohashtables.wrapped: fix help-lint
John Benediktsson [Wed, 8 Mar 2023 19:14:38 +0000 (11:14 -0800)]
hashtables.wrapped: fix help-lint

13 months agowebapps.mason: different approach
John Benediktsson [Wed, 8 Mar 2023 18:07:52 +0000 (10:07 -0800)]
webapps.mason: different approach

13 months agowebapps.mason: make docs/dev
John Benediktsson [Wed, 8 Mar 2023 17:55:14 +0000 (09:55 -0800)]
webapps.mason: make docs/dev

13 months agohashtables.wrapped: add protocol documentation
razetime [Wed, 8 Mar 2023 16:49:10 +0000 (22:19 +0530)]
hashtables.wrapped: add protocol documentation