factor: SYMBOL: foo foo [ bar ] initialize -> INITIALIZED-SYMBOL: foo [ bar ]
parent
8bb69eadf9
commit
00fb574a8d
|
@ -4,9 +4,7 @@ USING: assocs cocoa.messages compiler.units core-foundation.bundles
|
|||
hashtables init io kernel lexer namespaces sequences vocabs ;
|
||||
IN: cocoa
|
||||
|
||||
SYMBOL: sent-messages
|
||||
|
||||
sent-messages [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: sent-messages [ H{ } clone ]
|
||||
|
||||
: remember-send ( selector -- )
|
||||
dup sent-messages get set-at ;
|
||||
|
@ -25,9 +23,7 @@ SYNTAX: \selector:
|
|||
[ remember-send ]
|
||||
[ <selector> suffix! \ cocoa.messages:selector suffix! ] bi ;
|
||||
|
||||
SYMBOL: super-sent-messages
|
||||
|
||||
super-sent-messages [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: super-sent-messages [ H{ } clone ]
|
||||
|
||||
: remember-super-send ( selector -- )
|
||||
dup super-sent-messages get set-at ;
|
||||
|
@ -35,9 +31,8 @@ super-sent-messages [ H{ } clone ] initialize
|
|||
SYNTAX: \super:
|
||||
scan-token unescape-token dup remember-super-send
|
||||
[ lookup-method suffix! ] [ suffix! ] bi \ super-send suffix! ;
|
||||
SYMBOL: frameworks
|
||||
|
||||
frameworks [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: frameworks [ V{ } clone ]
|
||||
|
||||
[ frameworks get [ load-framework ] each ] "cocoa" add-startup-hook
|
||||
|
||||
|
|
|
@ -24,11 +24,8 @@ SPECIALIZED-ARRAY: void*
|
|||
over first large-struct? [ "_stret" append ] when
|
||||
make-sender dup infer define-declared ;
|
||||
|
||||
SYMBOL: message-senders
|
||||
SYMBOL: super-message-senders
|
||||
|
||||
message-senders [ H{ } clone ] initialize
|
||||
super-message-senders [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: message-senders [ H{ } clone ]
|
||||
INITIALIZED-SYMBOL: super-message-senders [ H{ } clone ]
|
||||
|
||||
:: cache-stub ( signature function assoc -- )
|
||||
signature assoc [ function sender-stub ] cache drop ;
|
||||
|
|
|
@ -4,13 +4,9 @@ USING: assocs combinators compiler.units fry grouping kernel
|
|||
namespaces sequences sets stack-checker.dependencies words ;
|
||||
IN: compiler.crossref
|
||||
|
||||
SYMBOL: compiled-crossref
|
||||
INITIALIZED-SYMBOL: compiled-crossref [ H{ } clone ]
|
||||
|
||||
compiled-crossref [ H{ } clone ] initialize
|
||||
|
||||
SYMBOL: generic-call-site-crossref
|
||||
|
||||
generic-call-site-crossref [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: generic-call-site-crossref [ H{ } clone ]
|
||||
|
||||
: all-dependencies-of ( word -- assoc )
|
||||
compiled-crossref get at ;
|
||||
|
|
|
@ -25,9 +25,7 @@ IN: compiler.utilities
|
|||
: pad-tail-shorter ( seq1 seq2 elt -- seq1' seq2' )
|
||||
2over longer length swap [ pad-tail ] 2curry bi@ ;
|
||||
|
||||
SYMBOL: yield-hook
|
||||
|
||||
yield-hook [ [ ] ] initialize
|
||||
INITIALIZED-SYMBOL: yield-hook [ [ ] ]
|
||||
|
||||
: alist-most ( alist quot -- pair )
|
||||
[ [ ] ] dip '[ [ [ second ] bi@ @ ] most ] map-reduce ; inline
|
||||
|
|
|
@ -4,9 +4,7 @@ USING: kernel words words.symbol sequences lexer parser fry
|
|||
namespaces combinators assocs math ;
|
||||
IN: cpu.x86.assembler.syntax
|
||||
|
||||
SYMBOL: registers
|
||||
|
||||
registers [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: registers [ H{ } clone ]
|
||||
|
||||
: define-register ( name num size -- word )
|
||||
[ create-word-in ] 2dip {
|
||||
|
|
|
@ -12,9 +12,7 @@ GENERIC: definition-icon ( definition -- path )
|
|||
|
||||
<<
|
||||
|
||||
SYMBOL: icons
|
||||
|
||||
icons [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: icons [ H{ } clone ]
|
||||
|
||||
: define-icon ( class name -- )
|
||||
[ swap icons get set-at ]
|
||||
|
|
|
@ -9,11 +9,9 @@ SINGLETONS: big-endian little-endian ;
|
|||
: compute-native-endianness ( -- class )
|
||||
1 int <ref> char deref 0 = big-endian little-endian ? ; foldable
|
||||
|
||||
SYMBOL: native-endianness
|
||||
native-endianness [ compute-native-endianness ] initialize
|
||||
INITIALIZED-SYMBOL: native-endianness [ compute-native-endianness ]
|
||||
|
||||
SYMBOL: endianness
|
||||
endianness [ native-endianness get-global ] initialize
|
||||
INITIALIZED-SYMBOL: endianness [ native-endianness get-global ]
|
||||
|
||||
HOOK: >native-endian native-endianness ( obj n -- bytes )
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ USING: arrays accessors continuations kernel math system
|
|||
sequences namespaces init vocabs combinators ;
|
||||
IN: game.input
|
||||
|
||||
SYMBOLS: game-input-backend game-input-opened ;
|
||||
SYMBOL: game-input-backend
|
||||
|
||||
game-input-opened [ 0 ] initialize
|
||||
INITIALIZED-SYMBOL: game-input-opened [ 0 ]
|
||||
|
||||
HOOK: (open-game-input) game-input-backend ( -- )
|
||||
HOOK: (close-game-input) game-input-backend ( -- )
|
||||
|
|
|
@ -5,8 +5,7 @@ IN: gobject-introspection.common
|
|||
|
||||
SYMBOL: current-namespace-name
|
||||
|
||||
SYMBOL: implement-structs
|
||||
implement-structs [ V{ } ] initialize
|
||||
INITIALIZED-SYMBOL: implement-structs [ V{ } ]
|
||||
|
||||
: implement-struct? ( c-type -- ? )
|
||||
implement-structs get-global member? ;
|
||||
|
|
|
@ -5,11 +5,9 @@ gobject-introspection.common gobject-introspection.repository kernel
|
|||
locals namespaces parser sequences sets ;
|
||||
IN: gobject-introspection.types
|
||||
|
||||
SYMBOL: type-infos
|
||||
type-infos [ H{ } ] initialize
|
||||
INITIALIZED-SYMBOL: type-infos [ H{ } ]
|
||||
|
||||
SYMBOL: standard-types
|
||||
standard-types [ V{ } ] initialize
|
||||
INITIALIZED-SYMBOL: standard-types [ V{ } ]
|
||||
|
||||
TUPLE: type-info c-type ;
|
||||
|
||||
|
|
|
@ -142,9 +142,7 @@ M: word set-article-parent swap "help-parent" set-word-prop ;
|
|||
[ $title ($blank-line) ]
|
||||
[ article-content print-content nl ] bi ;
|
||||
|
||||
SYMBOL: help-hook
|
||||
|
||||
help-hook [ [ print-topic ] ] initialize
|
||||
INITIALIZED-SYMBOL: help-hook [ [ print-topic ] ]
|
||||
|
||||
: help ( topic -- )
|
||||
help-hook get call( topic -- ) ;
|
||||
|
|
|
@ -6,9 +6,7 @@ namespaces parser sequences source-files.errors system
|
|||
tools.errors vocabs vocabs.hierarchy ;
|
||||
IN: help.lint
|
||||
|
||||
SYMBOL: lint-failures
|
||||
|
||||
lint-failures [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: lint-failures [ H{ } clone ]
|
||||
|
||||
TUPLE: help-lint-error < source-file-error ;
|
||||
|
||||
|
|
|
@ -5,9 +5,7 @@ help.stylesheet io io.styles kernel literals namespaces parser
|
|||
random sequences ui.theme ;
|
||||
IN: help.tips
|
||||
|
||||
SYMBOL: tips
|
||||
|
||||
tips [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: tips [ V{ } clone ]
|
||||
|
||||
TUPLE: tip < identity-tuple content loc ;
|
||||
|
||||
|
|
|
@ -30,13 +30,9 @@ M: link summary
|
|||
] "" make ;
|
||||
|
||||
! Help articles
|
||||
SYMBOL: articles
|
||||
INITIALIZED-SYMBOL: articles [ H{ } clone ]
|
||||
|
||||
articles [ H{ } clone ] initialize
|
||||
|
||||
SYMBOL: article-xref
|
||||
|
||||
article-xref [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: article-xref [ H{ } clone ]
|
||||
|
||||
GENERIC: valid-article? ( topic -- ? )
|
||||
GENERIC: article-title ( topic -- string )
|
||||
|
|
|
@ -7,9 +7,7 @@ multiline xml xml.data xml.writer xml.syntax html.components
|
|||
html.templates ;
|
||||
IN: html.templates.chloe.syntax
|
||||
|
||||
SYMBOL: tags
|
||||
|
||||
tags [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: tags [ H{ } clone ]
|
||||
|
||||
: define-chloe-tag ( name quot -- ) swap tags get set-at ;
|
||||
|
||||
|
|
|
@ -30,9 +30,7 @@ ERROR: bad-request-line < request-error parse-error ;
|
|||
: read-request-header ( request -- request )
|
||||
read-header >>header ;
|
||||
|
||||
SYMBOL: upload-limit
|
||||
|
||||
upload-limit [ 200,000,000 ] initialize
|
||||
INITIALIZED-SYMBOL: upload-limit [ 200,000,000 ]
|
||||
|
||||
: parse-multipart-form-data ( string -- separator )
|
||||
";" split1 nip
|
||||
|
|
|
@ -197,9 +197,7 @@ LOG: httpd-benchmark DEBUG
|
|||
|
||||
TUPLE: http-server < threaded-server ;
|
||||
|
||||
SYMBOL: request-limit
|
||||
|
||||
request-limit [ 64 1024 * ] initialize
|
||||
INITIALIZED-SYMBOL: request-limit [ 64 1024 * ]
|
||||
|
||||
LOG: httpd-bad-request NOTICE
|
||||
|
||||
|
|
|
@ -9,8 +9,7 @@ ERROR: unknown-image-extension extension ;
|
|||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOL: types
|
||||
types [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: types [ H{ } clone ]
|
||||
|
||||
: (image-class) ( type -- class )
|
||||
>lower types get ?at [ unknown-image-extension ] unless ;
|
||||
|
|
|
@ -185,9 +185,7 @@ M: stdin cancel-operation
|
|||
size-read-fd <fd> init-fd <input-port> >>size
|
||||
data-read-fd <fd> >>data ;
|
||||
|
||||
SYMBOL: dispatch-signal-hook
|
||||
|
||||
dispatch-signal-hook [ [ drop ] ] initialize
|
||||
INITIALIZED-SYMBOL: dispatch-signal-hook [ [ drop ] ]
|
||||
|
||||
: signal-pipe-fd ( -- n )
|
||||
OBJ-SIGNAL-PIPE special-object ; inline
|
||||
|
|
|
@ -6,11 +6,10 @@ kernel kernel.private locals math namespaces sequences sorting
|
|||
strings system unicode vocabs ;
|
||||
IN: io.directories.search
|
||||
|
||||
SYMBOL: traversal-method
|
||||
|
||||
SYMBOLS: +depth-first+ +breadth-first+ ;
|
||||
|
||||
traversal-method [ +depth-first+ ] initialize
|
||||
INITIALIZED-SYMBOL: traversal-method [ +depth-first+ ]
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
|
|
@ -24,8 +24,7 @@ handler
|
|||
server-stopped
|
||||
secure-context ;
|
||||
|
||||
SYMBOL: running-servers
|
||||
running-servers [ HS{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: running-servers [ HS{ } clone ]
|
||||
|
||||
ERROR: server-not-running threaded-server ;
|
||||
|
||||
|
|
|
@ -10,9 +10,7 @@ IN: logging
|
|||
|
||||
SYMBOLS: DEBUG NOTICE WARNING ERROR CRITICAL ;
|
||||
|
||||
SYMBOL: log-level
|
||||
|
||||
log-level [ DEBUG ] initialize
|
||||
INITIALIZED-SYMBOL: log-level [ DEBUG ]
|
||||
|
||||
: log-levels ( -- assoc )
|
||||
H{
|
||||
|
|
|
@ -111,9 +111,7 @@ PRIVATE>
|
|||
: watch-vars ( word vars -- )
|
||||
dupd '[ [ _ _ ] dip (watch-vars) ] annotate ;
|
||||
|
||||
SYMBOL: word-timing
|
||||
|
||||
word-timing [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: word-timing [ H{ } clone ]
|
||||
|
||||
: reset-word-timing ( -- )
|
||||
word-timing get clear-assoc ;
|
||||
|
|
|
@ -8,9 +8,7 @@ words ;
|
|||
IN: tools.deprecation
|
||||
|
||||
SYMBOL: +deprecation-note+
|
||||
SYMBOL: deprecation-notes
|
||||
|
||||
deprecation-notes [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: deprecation-notes [ H{ } clone ]
|
||||
|
||||
TUPLE: deprecation-note < source-file-error ;
|
||||
|
||||
|
|
|
@ -12,9 +12,7 @@ PRIMITIVE: (get-samples) ( -- samples/f )
|
|||
PRIMITIVE: profiling ( n -- )
|
||||
PRIVATE>
|
||||
|
||||
SYMBOL: samples-per-second
|
||||
|
||||
samples-per-second [ 1,000 ] initialize
|
||||
INITIALIZED-SYMBOL: samples-per-second [ 1,000 ]
|
||||
|
||||
<PRIVATE
|
||||
SYMBOL: raw-profile-data
|
||||
|
|
|
@ -5,8 +5,7 @@ summary tools.test tools.test.private ;
|
|||
IN: tools.test.fuzz
|
||||
|
||||
! Fuzz testing parameters
|
||||
SYMBOL: fuzz-test-trials
|
||||
fuzz-test-trials [ 100 ] initialize
|
||||
INITIALIZED-SYMBOL: fuzz-test-trials [ 100 ]
|
||||
|
||||
: fuzz-test-failures* ( trials generator: ( -- ..a ) predicate: ( ..a -- ? ) -- failures )
|
||||
'[
|
||||
|
|
|
@ -18,9 +18,7 @@ SYMBOL: +test-failure+
|
|||
|
||||
M: test-failure error-type drop +test-failure+ ;
|
||||
|
||||
SYMBOL: test-failures
|
||||
|
||||
test-failures [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: test-failures [ V{ } clone ]
|
||||
|
||||
T{ error-type-holder
|
||||
{ type +test-failure+ }
|
||||
|
@ -44,8 +42,7 @@ t restartable-tests? set-global
|
|||
swap >>error
|
||||
error-continuation get >>continuation ;
|
||||
|
||||
SYMBOL: long-unit-tests-enabled?
|
||||
long-unit-tests-enabled? [ t ] initialize
|
||||
INITIALIZED-SYMBOL: long-unit-tests-enabled? [ t ]
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
|
|
@ -207,11 +207,9 @@ M: cocoa-ui-backend system-alert
|
|||
: install-app-delegate ( -- )
|
||||
NSApp FactorApplicationDelegate install-delegate ;
|
||||
|
||||
SYMBOL: cocoa-startup-hook
|
||||
|
||||
cocoa-startup-hook [
|
||||
INITIALIZED-SYMBOL: cocoa-startup-hook [
|
||||
[ "MiniFactor.nib" load-nib install-app-delegate ]
|
||||
] initialize
|
||||
]
|
||||
|
||||
M: cocoa-ui-backend (with-ui)
|
||||
"UI" assert.app [
|
||||
|
|
|
@ -179,9 +179,7 @@ CONSTANT: default-icon-path "resource:misc/icons/Factor_128x128.png"
|
|||
default-icon-path binary file-contents
|
||||
] [ drop f ] recover ;
|
||||
|
||||
SYMBOL: icon-data
|
||||
|
||||
icon-data [ default-icon-data ] initialize
|
||||
INITIALIZED-SYMBOL: icon-data [ default-icon-data ]
|
||||
|
||||
: vocab-icon-data ( vocab-name -- byte-array )
|
||||
dup vocab-dir { "icon.png" "icon.ico" } [
|
||||
|
|
|
@ -502,17 +502,7 @@ SYMBOL: nc-buttons
|
|||
: handle-wm-dwmcompositionchanged ( hWnd uMsg wParam lParam -- )
|
||||
3drop [ window ] keep ?make-glass ;
|
||||
|
||||
SYMBOL: wm-handlers
|
||||
|
||||
: add-wm-handler ( quot: ( hWnd Msg wParam lParam -- LRESULT ) wm -- )
|
||||
dup array?
|
||||
[ [ execute( -- wm ) add-wm-handler ] with each ]
|
||||
[ wm-handlers get-global set-at ] if ;
|
||||
|
||||
: remove-wm-handler ( wm -- )
|
||||
wm-handlers get-global delete-at ;
|
||||
|
||||
wm-handlers [
|
||||
INITIALIZED-SYMBOL: wm-handlers [
|
||||
H{
|
||||
${ WM_CLOSE [ handle-wm-close 0 ] }
|
||||
${ WM_PAINT [ 4dup handle-wm-paint DefWindowProc ] }
|
||||
|
@ -548,7 +538,15 @@ wm-handlers [
|
|||
${ WM_CANCELMODE [ handle-wm-cancelmode 0 ] }
|
||||
${ WM_MOUSELEAVE [ handle-wm-mouseleave 0 ] }
|
||||
} expand-keys-set-at
|
||||
] initialize
|
||||
]
|
||||
|
||||
: add-wm-handler ( quot: ( hWnd Msg wParam lParam -- LRESULT ) wm -- )
|
||||
dup array?
|
||||
[ [ execute( -- wm ) add-wm-handler ] with each ]
|
||||
[ wm-handlers get-global set-at ] if ;
|
||||
|
||||
: remove-wm-handler ( wm -- )
|
||||
wm-handlers get-global delete-at ;
|
||||
|
||||
SYMBOL: trace-messages?
|
||||
|
||||
|
|
|
@ -165,9 +165,7 @@ M: world remove-gadget
|
|||
2dup layers>> member-eq?
|
||||
[ layers>> remove-eq! drop ] [ call-next-method ] if ;
|
||||
|
||||
SYMBOL: flush-layout-cache-hook
|
||||
|
||||
flush-layout-cache-hook [ [ ] ] initialize
|
||||
INITIALIZED-SYMBOL: flush-layout-cache-hook [ [ ] ]
|
||||
|
||||
GENERIC: begin-world ( world -- )
|
||||
GENERIC: end-world ( world -- )
|
||||
|
@ -206,12 +204,11 @@ TUPLE: world-error error world ;
|
|||
|
||||
C: <world-error> world-error
|
||||
|
||||
SYMBOL: ui-error-hook ! ( error -- )
|
||||
INITIALIZED-SYMBOL: ui-error-hook [ [ rethrow ] ] ! ( error -- )
|
||||
|
||||
: ui-error ( error -- )
|
||||
ui-error-hook get [ call( error -- ) ] [ die drop ] if* ;
|
||||
|
||||
ui-error-hook [ [ rethrow ] ] initialize
|
||||
|
||||
: draw-world ( world -- )
|
||||
dup draw-world? [
|
||||
|
|
|
@ -30,9 +30,7 @@ M: operation command-word command>> command-word ;
|
|||
: operation-gesture ( operation -- gesture )
|
||||
command>> +keyboard+ word-prop ;
|
||||
|
||||
SYMBOL: operations
|
||||
|
||||
operations [ <linked-hash> ] initialize
|
||||
INITIALIZED-SYMBOL: operations [ <linked-hash> ]
|
||||
|
||||
: object-operations ( obj -- operations )
|
||||
operations get values
|
||||
|
|
|
@ -3,7 +3,11 @@
|
|||
USING: colors colors.constants colors.hex namespaces ;
|
||||
IN: ui.theme
|
||||
|
||||
SYMBOL: theme
|
||||
SINGLETON: light-theme
|
||||
|
||||
SINGLETON: dark-theme
|
||||
|
||||
INITIALIZED-SYMBOL: theme [ light-theme ]
|
||||
|
||||
HOOK: toolbar-background theme ( -- color )
|
||||
HOOK: toolbar-button-pressed-background theme ( -- color )
|
||||
|
@ -91,9 +95,6 @@ HOOK: labeled-border-color theme ( -- color )
|
|||
|
||||
HOOK: table-border-color theme ( -- color )
|
||||
|
||||
SINGLETON: light-theme
|
||||
theme [ light-theme ] initialize
|
||||
|
||||
M: light-theme toolbar-background color: grey95 ;
|
||||
M: light-theme toolbar-button-pressed-background color: dark-gray ;
|
||||
|
||||
|
@ -180,8 +181,6 @@ M: light-theme labeled-border-color color: grey85 ;
|
|||
|
||||
M: light-theme table-border-color color: FactorTan ;
|
||||
|
||||
SINGLETON: dark-theme
|
||||
|
||||
M: dark-theme toolbar-background color: solarized-base02 ;
|
||||
M: dark-theme toolbar-button-pressed-background color: solarized-base0 ;
|
||||
|
||||
|
|
|
@ -6,9 +6,7 @@ IN: unix.signals
|
|||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOL: signal-handlers
|
||||
|
||||
signal-handlers [ H{ } ] initialize
|
||||
INITIALIZED-SYMBOL: signal-handlers [ H{ } ]
|
||||
|
||||
: dispatch-signal ( sig -- )
|
||||
signal-handlers get-global at [ in-thread ] each ;
|
||||
|
|
|
@ -18,9 +18,7 @@ PRIMITIVE: (dlsym-raw) ( name dll -- alien )
|
|||
|
||||
HOOK: dlerror os ( -- message/f )
|
||||
|
||||
SYMBOL: libraries
|
||||
|
||||
libraries [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: libraries [ H{ } clone ]
|
||||
|
||||
TUPLE: library { path string } dll dlerror { abi abi initial: cdecl } ;
|
||||
|
||||
|
@ -90,9 +88,7 @@ M: library dispose dll>> [ dispose ] when* ;
|
|||
2dup library-dll dlsym-raw
|
||||
[ 2nip ] [ no-such-symbol ] if* ;
|
||||
|
||||
SYMBOL: deploy-libraries
|
||||
|
||||
deploy-libraries [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: deploy-libraries [ V{ } clone ]
|
||||
|
||||
: deploy-library ( name -- )
|
||||
dup libraries get key?
|
||||
|
|
|
@ -13,14 +13,11 @@ IN: bootstrap.syntax
|
|||
":"
|
||||
";"
|
||||
"<PRIVATE"
|
||||
"<WINDOWS"
|
||||
"<UNIX"
|
||||
"<LINUX"
|
||||
"<MACOS"
|
||||
"WINDOWS>"
|
||||
"UNIX>"
|
||||
"LINUX>"
|
||||
"MACOS>"
|
||||
"<UNIX" "UNIX>"
|
||||
"<LINUX" "LINUX>"
|
||||
"<MACOS" "MACOS>"
|
||||
"<WINDOWS" "WINDOWS>"
|
||||
"<FACTOR" "FACTOR>"
|
||||
"B{"
|
||||
"BV{"
|
||||
"C:"
|
||||
|
@ -49,6 +46,7 @@ IN: bootstrap.syntax
|
|||
"SINGLETON:"
|
||||
"SINGLETONS:"
|
||||
"BUILTIN:"
|
||||
"INITIALIZED-SYMBOL:"
|
||||
"SYMBOL:"
|
||||
"SYMBOLS:"
|
||||
"CONSTANT:"
|
||||
|
@ -157,7 +155,6 @@ IN: bootstrap.syntax
|
|||
"'let["
|
||||
"FUNCTOR:"
|
||||
"VARIABLES-FUNCTOR:"
|
||||
"INITIALIZED-SYMBOL:"
|
||||
"STARTUP-HOOK:"
|
||||
"SHUTDOWN-HOOK:"
|
||||
} [ "syntax" create-word drop ] each
|
||||
|
|
|
@ -5,18 +5,14 @@ source-files.errors summary ;
|
|||
IN: compiler.errors
|
||||
|
||||
SYMBOL: +compiler-error+
|
||||
SYMBOL: compiler-errors
|
||||
|
||||
compiler-errors [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: compiler-errors [ H{ } clone ]
|
||||
|
||||
TUPLE: compiler-error < source-file-error ;
|
||||
|
||||
M: compiler-error error-type drop +compiler-error+ ;
|
||||
|
||||
SYMBOL: +linkage-error+
|
||||
SYMBOL: linkage-errors
|
||||
|
||||
linkage-errors [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: linkage-errors [ H{ } clone ]
|
||||
|
||||
TUPLE: linkage-error < source-file-error ;
|
||||
|
||||
|
|
|
@ -117,14 +117,16 @@ PRIVATE>
|
|||
|
||||
GENERIC: error-in-thread ( error thread -- * )
|
||||
|
||||
SYMBOL: thread-error-hook ! ( error thread -- * )
|
||||
DEFER: rethrow
|
||||
|
||||
INITIALIZED-SYMBOL: thread-error-hook [ [ die drop rethrow ] ] ! ( error thread -- * )
|
||||
|
||||
M: object error-in-thread
|
||||
thread-error-hook get-global call( error thread -- * ) ;
|
||||
|
||||
: in-callback? ( -- ? ) CONTEXT-OBJ-IN-CALLBACK-P context-object ;
|
||||
|
||||
SYMBOL: callback-error-hook ! ( error -- * )
|
||||
INITIALIZED-SYMBOL: callback-error-hook [ [ die rethrow ] ] ! ( error -- * )
|
||||
|
||||
: rethrow ( error -- * )
|
||||
dup save-error
|
||||
|
@ -135,10 +137,6 @@ SYMBOL: callback-error-hook ! ( error -- * )
|
|||
if
|
||||
] [ pop continue-with ] if-empty ;
|
||||
|
||||
thread-error-hook [ [ die drop rethrow ] ] initialize
|
||||
|
||||
callback-error-hook [ [ die rethrow ] ] initialize
|
||||
|
||||
: recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
|
||||
[
|
||||
[
|
||||
|
|
|
@ -4,11 +4,8 @@ USING: assocs continuations continuations.private kernel
|
|||
kernel.private namespaces ;
|
||||
IN: init
|
||||
|
||||
SYMBOL: startup-hooks
|
||||
SYMBOL: shutdown-hooks
|
||||
|
||||
startup-hooks [ V{ } clone ] initialize
|
||||
shutdown-hooks [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: startup-hooks [ V{ } clone ]
|
||||
INITIALIZED-SYMBOL: shutdown-hooks [ V{ } clone ]
|
||||
|
||||
: do-hooks ( symbol -- )
|
||||
get [ nip call( -- ) ] assoc-each ;
|
||||
|
|
|
@ -4,11 +4,9 @@ USING: assocs init io io.encodings io.encodings.utf8 kernel
|
|||
namespaces system ;
|
||||
IN: io.backend
|
||||
|
||||
SYMBOL: io-backend
|
||||
|
||||
SINGLETON: c-io-backend
|
||||
|
||||
io-backend [ c-io-backend ] initialize
|
||||
INITIALIZED-SYMBOL: io-backend [ c-io-backend ]
|
||||
|
||||
HOOK: init-io io-backend ( -- )
|
||||
|
||||
|
|
|
@ -167,9 +167,7 @@ SYMBOL: bootstrap-syntax
|
|||
call
|
||||
] with-manifest ; inline
|
||||
|
||||
SYMBOL: print-use-hook
|
||||
|
||||
print-use-hook [ [ ] ] initialize
|
||||
INITIALIZED-SYMBOL: print-use-hook [ [ ] ]
|
||||
|
||||
: parse-fresh ( lines -- quot )
|
||||
[
|
||||
|
|
|
@ -36,9 +36,7 @@ TUPLE: error-type-holder type word plural icon quot forget-quot { fatal? initial
|
|||
|
||||
GENERIC: error-type ( error -- type )
|
||||
|
||||
SYMBOL: error-types
|
||||
|
||||
error-types [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: error-types [ V{ } clone ]
|
||||
|
||||
: define-error-type ( error-type -- )
|
||||
dup type>> error-types get set-at ;
|
||||
|
|
|
@ -124,9 +124,7 @@ TUPLE: alien-callback-params < alien-node-params
|
|||
|
||||
GENERIC: wrap-callback-quot ( params quot -- quot' )
|
||||
|
||||
SYMBOL: wait-for-callback-hook
|
||||
|
||||
wait-for-callback-hook [ [ drop ] ] initialize
|
||||
INITIALIZED-SYMBOL: wait-for-callback-hook [ [ drop ] ]
|
||||
|
||||
M: callable wrap-callback-quot
|
||||
swap [ callback-parameter-quot ] [ callback-return-quot ] bi surround
|
||||
|
|
|
@ -33,11 +33,9 @@ ERROR: bad-escape char ;
|
|||
{ char: \) char: \) }
|
||||
} ?at [ bad-escape ] unless ;
|
||||
|
||||
SYMBOL: name>char-hook
|
||||
|
||||
name>char-hook [
|
||||
INITIALIZED-SYMBOL: name>char-hook [
|
||||
[ "Unicode support not available" throw ]
|
||||
] initialize
|
||||
]
|
||||
|
||||
: hex-escape ( str -- ch str' )
|
||||
2 cut-slice [ hex> ] dip ;
|
||||
|
|
|
@ -52,7 +52,11 @@ IN: bootstrap.syntax
|
|||
dup [ define-fry-specifier ] curry each ;
|
||||
|
||||
[
|
||||
{ "]" "}" ";" ">>" "UNIX>" "MACOS>" "LINUX>" "WINDOWS>" } [ define-delimiter ] each
|
||||
{
|
||||
"]" "}" ";" ">>"
|
||||
"UNIX>" "MACOS>" "LINUX>" "WINDOWS>"
|
||||
"FACTOR>"
|
||||
} [ define-delimiter ] each
|
||||
|
||||
"PRIMITIVE:" [
|
||||
current-vocab name>>
|
||||
|
@ -89,6 +93,9 @@ IN: bootstrap.syntax
|
|||
os windows? [ ".windows" parse-platform-section ] [ drop ] if
|
||||
] define-core-syntax
|
||||
|
||||
"<FACTOR" [
|
||||
"FACTOR>" parse-multiline-string "" parse-platform-section
|
||||
] define-core-syntax
|
||||
|
||||
"USE:" [ scan-token use-vocab ] define-core-syntax
|
||||
|
||||
|
@ -172,14 +179,11 @@ IN: bootstrap.syntax
|
|||
(parse-tuple-definition) 2drop check-builtin
|
||||
] define-core-syntax
|
||||
|
||||
"SYMBOL:" [
|
||||
scan-new-word define-symbol
|
||||
] define-core-syntax
|
||||
|
||||
"SYMBOLS:" [
|
||||
";" [ create-word-in [ reset-generic ] [ define-symbol ] bi ] each-token
|
||||
"INITIALIZED-SYMBOL:" [
|
||||
scan-new-word [ define-symbol ] keep scan-object '[ _ _ initialize ] append!
|
||||
] define-core-syntax
|
||||
|
||||
![[
|
||||
"INITIALIZED-SYMBOL:" [
|
||||
scan-new-word [ define-symbol ]
|
||||
[
|
||||
|
@ -187,6 +191,15 @@ IN: bootstrap.syntax
|
|||
scan-object dupd [ initialize ] curry curry ( -- ) define-declared
|
||||
] bi
|
||||
] define-core-syntax
|
||||
]]
|
||||
|
||||
"SYMBOL:" [
|
||||
scan-new-word define-symbol
|
||||
] define-core-syntax
|
||||
|
||||
"SYMBOLS:" [
|
||||
";" [ create-word-in [ reset-generic ] [ define-symbol ] bi ] each-token
|
||||
] define-core-syntax
|
||||
|
||||
"STARTUP-HOOK:" [
|
||||
scan-new-word scan-object
|
||||
|
|
|
@ -26,8 +26,7 @@ CONSTANT: default-vocab-roots {
|
|||
trim-tail-separators dup vocab-roots get ?adjoin
|
||||
[ add-vocab-root-hook get-global call( root -- ) ] [ drop ] if ;
|
||||
|
||||
SYMBOL: root-cache
|
||||
root-cache [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: root-cache [ H{ } clone ]
|
||||
|
||||
ERROR: not-found-in-roots path ;
|
||||
|
||||
|
@ -71,16 +70,13 @@ PRIVATE>
|
|||
SYMBOL: load-help?
|
||||
|
||||
! Defined by vocabs.metadata
|
||||
SYMBOL: check-vocab-hook
|
||||
check-vocab-hook [ [ drop ] ] initialize
|
||||
INITIALIZED-SYMBOL: check-vocab-hook [ [ drop ] ]
|
||||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOL: require-when-vocabs
|
||||
require-when-vocabs [ HS{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: require-when-vocabs [ HS{ } clone ]
|
||||
|
||||
SYMBOL: require-when-table
|
||||
require-when-table [ V{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: require-when-table [ V{ } clone ]
|
||||
|
||||
: load-conditional-requires ( vocab -- )
|
||||
vocab-name require-when-vocabs get in? [
|
||||
|
|
|
@ -25,9 +25,9 @@ DEFER: fortran-ret-type>c-type
|
|||
DEFER: fortran-arg-type>c-type
|
||||
DEFER: fortran-name>symbol-name
|
||||
|
||||
SYMBOL: library-fortran-abis
|
||||
INITIALIZED-SYMBOL: library-fortran-abis [ H{ } clone ]
|
||||
|
||||
SYMBOL: fortran-abi
|
||||
library-fortran-abis [ H{ } clone ] initialize
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
|
|
@ -6,10 +6,8 @@ IN: alien.handles
|
|||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOLS: alien-handle-counter alien-handles ;
|
||||
|
||||
alien-handle-counter [ 0 ] initialize
|
||||
alien-handles [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: alien-handle-counter [ 0 ]
|
||||
INITIALIZED-SYMBOL: alien-handles [ H{ } clone ]
|
||||
|
||||
: biggest-handle ( -- n )
|
||||
-1 32 bits ; inline
|
||||
|
|
|
@ -6,8 +6,7 @@ IN: audio.loader
|
|||
|
||||
ERROR: unknown-audio-extension extension ;
|
||||
|
||||
SYMBOL: audio-types
|
||||
audio-types [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: audio-types [ H{ } clone ]
|
||||
|
||||
: register-audio-extension ( extension quot -- )
|
||||
swap audio-types get set-at ;
|
||||
|
|
|
@ -6,8 +6,7 @@ io.pathnames kernel math namespaces sequences splitting
|
|||
system-info unicode ;
|
||||
IN: cli.git
|
||||
|
||||
SYMBOL: cli-git-num-parallel
|
||||
cli-git-num-parallel [ cpus 2 * ] initialize
|
||||
INITIALIZED-SYMBOL: cli-git-num-parallel [ cpus 2 * ]
|
||||
|
||||
: git-command>string ( quot -- string )
|
||||
utf8 <process-reader> stream-contents [ blank? ] trim-tail ;
|
||||
|
|
|
@ -198,11 +198,9 @@ TUPLE: code-file
|
|||
: write-dest-file ( xml name ext -- )
|
||||
append utf8 [ write-xml ] with-file-writer ;
|
||||
|
||||
SYMBOL: kindlegen-path
|
||||
kindlegen-path [ "kindlegen" ] initialize
|
||||
INITIALIZED-SYMBOL: kindlegen-path [ "kindlegen" ]
|
||||
|
||||
SYMBOL: codebook-output-path
|
||||
codebook-output-path [ "resource:codebooks" ] initialize
|
||||
INITIALIZED-SYMBOL: codebook-output-path [ "resource:codebooks" ]
|
||||
|
||||
: kindlegen ( path -- )
|
||||
[ kindlegen-path get "-unicode" ] dip 3array try-process ;
|
||||
|
|
|
@ -14,8 +14,7 @@ VARIANT: cuda-abi
|
|||
SYMBOL: cuda-modules
|
||||
SYMBOL: cuda-functions
|
||||
|
||||
SYMBOL: cuda-libraries
|
||||
cuda-libraries [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: cuda-libraries [ H{ } clone ]
|
||||
|
||||
SYMBOL: current-cuda-library
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ ENUM: dns-opcode QUERY IQUERY STATUS ;
|
|||
ENUM: dns-rcode NO-ERROR FORMAT-ERROR SERVER-FAILURE
|
||||
NAME-ERROR NOT-IMPLEMENTED REFUSED ;
|
||||
|
||||
SYMBOL: dns-servers
|
||||
INITIALIZED-SYMBOL: dns-servers [ initial-dns-servers >vector ]
|
||||
|
||||
: add-dns-server ( string -- )
|
||||
dns-servers get push ;
|
||||
|
@ -424,4 +424,3 @@ UNIX>
|
|||
: with-dns-servers ( servers quot -- )
|
||||
[ dns-servers ] dip with-variable ; inline
|
||||
|
||||
dns-servers [ initial-dns-servers >vector ] initialize
|
||||
|
|
|
@ -40,8 +40,7 @@ TUPLE: b-rep < identity-tuple faces edges vertices ;
|
|||
: <b-rep> ( -- b-rep )
|
||||
V{ } clone V{ } clone V{ } clone b-rep boa ;
|
||||
|
||||
SYMBOL: sharpness-stack
|
||||
sharpness-stack [ V{ t } ] initialize
|
||||
INITIALIZED-SYMBOL: sharpness-stack [ V{ t } ]
|
||||
|
||||
: set-sharpness ( sharp? -- ) >boolean sharpness-stack get set-last ;
|
||||
: get-sharpness ( -- sharp? ) sharpness-stack get last ;
|
||||
|
|
|
@ -10,8 +10,7 @@ ERROR: unknown-models-extension extension ;
|
|||
|
||||
<PRIVATE
|
||||
|
||||
SYMBOL: types
|
||||
types [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: types [ H{ } clone ]
|
||||
|
||||
: models-class ( path -- class )
|
||||
file-extension >lower types get ?at
|
||||
|
|
|
@ -8,11 +8,9 @@ IN: gml.macros
|
|||
|
||||
TUPLE: macro macro-id timestamp log ;
|
||||
|
||||
SYMBOL: next-macro-id
|
||||
next-macro-id [ 0 ] initialize
|
||||
INITIALIZED-SYMBOL: next-macro-id [ 0 ]
|
||||
|
||||
SYMBOL: macros
|
||||
macros [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: macros [ H{ } clone ]
|
||||
|
||||
SYMBOL: current-macro
|
||||
|
||||
|
|
|
@ -8,9 +8,7 @@ IN: gml.runtime
|
|||
|
||||
TUPLE: gml-name < identity-tuple { string read-only } ;
|
||||
|
||||
SYMBOL: gml-names
|
||||
|
||||
gml-names [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: gml-names [ H{ } clone ]
|
||||
|
||||
: >gml-name ( string -- name ) gml-names get-global [ \ gml-name boa ] cache ;
|
||||
|
||||
|
@ -172,9 +170,7 @@ MACRO: gml-primitive (
|
|||
)
|
||||
swap '[ _ inputs @ _ outputs ] ;
|
||||
|
||||
SYMBOL: global-dictionary
|
||||
|
||||
global-dictionary [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: global-dictionary [ H{ } clone ]
|
||||
|
||||
: add-primitive ( word name -- )
|
||||
>gml-name global-dictionary get-global set-at ;
|
||||
|
|
|
@ -7,8 +7,7 @@ io.encodings.utf32 io.encodings.utf8 io.files kernel literals
|
|||
math namespaces sequences strings ;
|
||||
IN: io.encodings.detect
|
||||
|
||||
SYMBOL: default-encoding
|
||||
default-encoding [ latin1 ] initialize
|
||||
INITIALIZED-SYMBOL: default-encoding [ latin1 ]
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
|
|
@ -8,8 +8,7 @@ IN: irc.messages.base
|
|||
TUPLE: irc-message line prefix command parameters trailing timestamp sender ;
|
||||
TUPLE: unhandled < irc-message ;
|
||||
|
||||
SYMBOL: string-irc-type-mapping
|
||||
string-irc-type-mapping [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: string-irc-type-mapping [ H{ } clone ]
|
||||
|
||||
: register-irc-message-type ( type string -- )
|
||||
string-irc-type-mapping get set-at ;
|
||||
|
|
|
@ -8,11 +8,9 @@ IN: managed-server.chat
|
|||
|
||||
TUPLE: chat-server < managed-server ;
|
||||
|
||||
SYMBOL: commands
|
||||
commands [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: commands [ H{ } clone ]
|
||||
|
||||
SYMBOL: chat-docs
|
||||
chat-docs [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: chat-docs [ H{ } clone ]
|
||||
|
||||
CONSTANT: line-beginning "-!- "
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ IN: marvel
|
|||
|
||||
! http://developer.marvel.com/docs
|
||||
! Register for an api key.
|
||||
SYMBOLS: marvel-base-url marvel-public-key marvel-private-key ;
|
||||
SYMBOLS: marvel-public-key marvel-private-key ;
|
||||
|
||||
marvel-base-url [ "http://gateway.marvel.com/v1/public/" ] initialize
|
||||
INITIALIZED-SYMBOL: marvel-base-url [ "http://gateway.marvel.com/v1/public/" ]
|
||||
|
||||
: calculate-hash ( ts -- hash )
|
||||
number>string
|
||||
|
|
|
@ -36,14 +36,10 @@ SYMBOL: boot-flags
|
|||
SYMBOL: builder-debug
|
||||
|
||||
! URL for counter notifications.
|
||||
SYMBOL: counter-url
|
||||
|
||||
counter-url [ "http://builds.factorcode.org/counter" ] initialize
|
||||
INITIALIZED-SYMBOL: counter-url [ "http://builds.factorcode.org/counter" ]
|
||||
|
||||
! URL for status notifications.
|
||||
SYMBOL: status-url
|
||||
|
||||
status-url [ "http://builds.factorcode.org/status-update" ] initialize
|
||||
INITIALIZED-SYMBOL: status-url [ "http://builds.factorcode.org/status-update" ]
|
||||
|
||||
! Password for status notifications.
|
||||
SYMBOL: status-secret
|
||||
|
@ -62,9 +58,7 @@ SYMBOL: docs-username
|
|||
SYMBOL: docs-directory
|
||||
|
||||
! URL to notify server about new docs
|
||||
SYMBOL: docs-update-url
|
||||
|
||||
docs-update-url [ "http://builds.factorcode.org/docs-update" ] initialize
|
||||
INITIALIZED-SYMBOL: docs-update-url [ "http://builds.factorcode.org/docs-update" ]
|
||||
|
||||
! Boolean. Do we upload package binaries?
|
||||
SYMBOL: upload-package?
|
||||
|
@ -106,8 +100,6 @@ SYMBOL: upload-timeout
|
|||
1 hours upload-timeout set-global
|
||||
|
||||
! Optional: override ssh and scp command names
|
||||
SYMBOL: scp-command
|
||||
scp-command [ "scp" ] initialize
|
||||
INITIALIZED-SYMBOL: scp-command [ "scp" ]
|
||||
|
||||
SYMBOL: ssh-command
|
||||
ssh-command [ "ssh" ] initialize
|
||||
INITIALIZED-SYMBOL: ssh-command [ "ssh" ]
|
||||
|
|
|
@ -2,9 +2,7 @@ USING: alien.fortran combinators kernel math namespaces
|
|||
sequences system system-info ;
|
||||
IN: math.blas.config
|
||||
|
||||
SYMBOLS: blas-library blas-fortran-abi deploy-blas? ;
|
||||
|
||||
blas-library [
|
||||
INITIALIZED-SYMBOL: blas-library [
|
||||
{
|
||||
{ [ os macosx? ] [ "libblas.dylib" ] }
|
||||
{ [ os windows? ] [ "blas.dll" ] }
|
||||
|
@ -12,7 +10,7 @@ blas-library [
|
|||
} cond
|
||||
] initialize
|
||||
|
||||
blas-fortran-abi [
|
||||
INITIALIZED-SYMBOL: blas-fortran-abi [
|
||||
{
|
||||
{ [ os macosx? cpu x86.32? and ] [ intel-unix-abi ] }
|
||||
{ [ os macosx? cpu x86.64? and ]
|
||||
|
@ -31,6 +29,6 @@ ou will need to install a third-party BLAS library and configure Factor. See `\"
|
|||
{ [ os linux? ] [ gfortran-abi ] }
|
||||
[ f2c-abi ]
|
||||
} cond
|
||||
] initialize
|
||||
]
|
||||
|
||||
deploy-blas? [ os macosx? not ] initialize
|
||||
INITIALIZED-SYMBOL: deploy-blas? [ os macosx? not ]
|
||||
|
|
|
@ -7,8 +7,7 @@ splitting strings ;
|
|||
IN: modern.compiler
|
||||
|
||||
<<
|
||||
SYMBOL: left-decorators
|
||||
left-decorators [ HS{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: left-decorators [ HS{ } clone ]
|
||||
>>
|
||||
<<
|
||||
: make-left-decorator ( string -- )
|
||||
|
@ -31,9 +30,8 @@ LEFT-DECORATOR: recursive
|
|||
left-decorators get in? ;
|
||||
|
||||
<<
|
||||
SYMBOL: arities
|
||||
! Initialize with : foo ( -- ) .. ; already
|
||||
arities [ H{ } clone 2 "" pick set-at ] initialize
|
||||
INITIALIZED-SYMBOL: arities [ H{ } clone 2 "" pick set-at ]
|
||||
>>
|
||||
<<
|
||||
: make-arity ( n string -- )
|
||||
|
@ -82,8 +80,7 @@ ARITY: \: 2
|
|||
arities get at ;
|
||||
|
||||
<<
|
||||
SYMBOL: variable-arities
|
||||
variable-arities [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: variable-arities [ H{ } clone ]
|
||||
>>
|
||||
<<
|
||||
: make-variable-arity ( n string -- )
|
||||
|
@ -399,4 +396,4 @@ M: object fixup-arity ;
|
|||
|
||||
: postprocess-modern ( seq -- seq' )
|
||||
collapse-decorators [ fixup-arity ] map flatten ;
|
||||
]]
|
||||
]]
|
||||
|
|
|
@ -9,8 +9,7 @@ IN: robots
|
|||
! visit-time is GMT, request-rate is pages/second
|
||||
! crawl-rate is seconds
|
||||
|
||||
SYMBOL: robot-identities
|
||||
robot-identities [ { "FactorSpider" } ] initialize
|
||||
INITIALIZED-SYMBOL: robot-identities [ { "FactorSpider" } ]
|
||||
|
||||
TUPLE: robots site sitemap rules rules-quot ;
|
||||
|
||||
|
|
|
@ -3,8 +3,7 @@
|
|||
USING: smtp namespaces accessors kernel arrays site-watcher.db ;
|
||||
IN: site-watcher.email
|
||||
|
||||
SYMBOL: site-watcher-from
|
||||
site-watcher-from [ "factor-site-watcher@gmail.com" ] initialize
|
||||
INITIALIZED-SYMBOL: site-watcher-from [ "factor-site-watcher@gmail.com" ]
|
||||
|
||||
: send-site-email ( watching-site body subject -- )
|
||||
[ account>> email>> ] 2dip
|
||||
|
|
|
@ -3,9 +3,7 @@
|
|||
USING: kernel namespaces assocs accessors words sequences classes.tuple ;
|
||||
IN: smalltalk.classes
|
||||
|
||||
SYMBOL: classes
|
||||
|
||||
classes [ H{ } clone ] initialize
|
||||
INITIALIZED-SYMBOL: classes [ H{ } clone ]
|
||||
|
||||
: create-class ( class -- class )
|
||||
"smalltalk.classes" create-word ;
|
||||
|
|
|
@ -6,9 +6,9 @@ io.sockets.secure fry oauth1 urls ;
|
|||
IN: twitter
|
||||
|
||||
! Configuration
|
||||
SYMBOLS: twitter-source twitter-consumer-token twitter-access-token ;
|
||||
INITIALIZED-SYMBOL: twitter-source [ "factor" ]
|
||||
|
||||
twitter-source [ "factor" ] initialize
|
||||
SYMBOLS: twitter-consumer-token twitter-access-token ;
|
||||
|
||||
<PRIVATE
|
||||
|
||||
|
|
Loading…
Reference in New Issue