factor: LOG: ; fix games
parent
0b88c0a86f
commit
5a2f541c61
|
@ -39,7 +39,7 @@ particle_t-array{
|
||||||
S{ particle_t f float-array{ 0.3 0.3 } float-array{ 0 0 } 4.0 }
|
S{ particle_t f float-array{ 0.3 0.3 } float-array{ 0 0 } 4.0 }
|
||||||
S{ particle_t f float-array{ 0.5 0.15 } float-array{ 0 0 } 1.0 }
|
S{ particle_t f float-array{ 0.5 0.15 } float-array{ 0 0 } 1.0 }
|
||||||
S{ particle_t f float-array{ 0.5 0.1 } float-array{ 0 0 } 9.0 }
|
S{ particle_t f float-array{ 0.5 0.1 } float-array{ 0 0 } 9.0 }
|
||||||
}
|
} ;
|
||||||
|
|
||||||
: integrate-particles! ( particles dt -- particles )
|
: integrate-particles! ( particles dt -- particles )
|
||||||
[ verlet-integrate-particle ] curry map! ;
|
[ verlet-integrate-particle ] curry map! ;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
USING: kernel logging ;
|
USING: kernel logging ;
|
||||||
in: jamshred.log
|
in: jamshred.log
|
||||||
|
|
||||||
LOG: (jamshred-log) DEBUG
|
LOG: (jamshred-log) DEBUG ;
|
||||||
|
|
||||||
: with-jamshred-log ( quot -- )
|
: with-jamshred-log ( quot -- )
|
||||||
"jamshred" swap with-logging ; inline
|
"jamshred" swap with-logging ; inline
|
||||||
|
|
|
@ -144,9 +144,9 @@ main-responder [ <404> <trivial-responder> ] initialize
|
||||||
] bi
|
] bi
|
||||||
] recover ;
|
] recover ;
|
||||||
|
|
||||||
LOG: httpd-hit NOTICE
|
LOG: httpd-hit NOTICE ;
|
||||||
|
|
||||||
LOG: httpd-header NOTICE
|
LOG: httpd-header NOTICE ;
|
||||||
|
|
||||||
: log-header ( request name -- )
|
: log-header ( request name -- )
|
||||||
[ nip ] [ header ] 2bi 2array httpd-header ;
|
[ nip ] [ header ] 2bi 2array httpd-header ;
|
||||||
|
@ -209,7 +209,7 @@ symbol: params
|
||||||
: ?refresh-all ( -- )
|
: ?refresh-all ( -- )
|
||||||
development? get-global [ [ refresh-all ] with-global ] when ;
|
development? get-global [ [ refresh-all ] with-global ] when ;
|
||||||
|
|
||||||
LOG: httpd-benchmark DEBUG
|
LOG: httpd-benchmark DEBUG ;
|
||||||
|
|
||||||
: ?benchmark ( quot -- )
|
: ?benchmark ( quot -- )
|
||||||
benchmark? get [
|
benchmark? get [
|
||||||
|
@ -223,7 +223,7 @@ symbol: request-limit
|
||||||
|
|
||||||
request-limit [ 64 1024 * ] initialize
|
request-limit [ 64 1024 * ] initialize
|
||||||
|
|
||||||
LOG: httpd-bad-request NOTICE
|
LOG: httpd-bad-request NOTICE ;
|
||||||
|
|
||||||
: handle-client-error ( error -- )
|
: handle-client-error ( error -- )
|
||||||
dup request-error? [
|
dup request-error? [
|
||||||
|
|
|
@ -5,7 +5,7 @@ words kernel arrays shuffle tools.annotations
|
||||||
prettyprint.config prettyprint debugger io.streams.string
|
prettyprint.config prettyprint debugger io.streams.string
|
||||||
splitting continuations effects generalizations parser strings
|
splitting continuations effects generalizations parser strings
|
||||||
quotations fry accessors math assocs math.order
|
quotations fry accessors math assocs math.order
|
||||||
sequences.generalizations ;
|
sequences.generalizations lexer ;
|
||||||
in: logging
|
in: logging
|
||||||
|
|
||||||
SYMBOLS: DEBUG NOTICE WARNING ERROR CRITICAL ;
|
SYMBOLS: DEBUG NOTICE WARNING ERROR CRITICAL ;
|
||||||
|
@ -139,7 +139,7 @@ PRIVATE>
|
||||||
|
|
||||||
SYNTAX: LOG:
|
SYNTAX: LOG:
|
||||||
! Syntax: name level
|
! Syntax: name level
|
||||||
scan-new-word dup scan-word
|
scan-new-word dup scan-word ";" expect
|
||||||
'[ 1array stack>message _ _ log-message ]
|
'[ 1array stack>message _ _ log-message ]
|
||||||
( message -- ) define-declared ;
|
( message -- ) define-declared ;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ C: <plain-auth> plain-auth ;
|
||||||
1 minutes >>read-timeout
|
1 minutes >>read-timeout
|
||||||
no-auth >>auth ; inline
|
no-auth >>auth ; inline
|
||||||
|
|
||||||
LOG: log-smtp-connection NOTICE
|
LOG: log-smtp-connection NOTICE ;
|
||||||
|
|
||||||
: with-smtp-connection ( quot -- )
|
: with-smtp-connection ( quot -- )
|
||||||
smtp-config get server>>
|
smtp-config get server>>
|
||||||
|
@ -91,7 +91,7 @@ ERROR: bad-email-address email ;
|
||||||
: quit ( -- )
|
: quit ( -- )
|
||||||
"QUIT" command ;
|
"QUIT" command ;
|
||||||
|
|
||||||
LOG: smtp-response DEBUG
|
LOG: smtp-response DEBUG ;
|
||||||
|
|
||||||
: multiline? ( response -- ? )
|
: multiline? ( response -- ? )
|
||||||
3 swap ?nth char: - = ;
|
3 swap ?nth char: - = ;
|
||||||
|
|
Loading…
Reference in New Issue