Merge branch 'master' of git://factorcode.org/git/factor
commit
ff037a65df
|
@ -7,7 +7,7 @@ USING: alien alien.c-types generic io kernel math namespaces
|
||||||
io.nonblocking parser threads unix sequences
|
io.nonblocking parser threads unix sequences
|
||||||
byte-arrays io.sockets io.binary io.unix.backend
|
byte-arrays io.sockets io.binary io.unix.backend
|
||||||
io.streams.duplex io.sockets.impl math.parser continuations libc
|
io.streams.duplex io.sockets.impl math.parser continuations libc
|
||||||
combinators ;
|
combinators io.backend ;
|
||||||
IN: io.unix.sockets
|
IN: io.unix.sockets
|
||||||
|
|
||||||
: pending-init-error ( port -- )
|
: pending-init-error ( port -- )
|
||||||
|
@ -189,7 +189,7 @@ M: local protocol-family drop PF_UNIX ;
|
||||||
M: local sockaddr-type drop "sockaddr-un" c-type ;
|
M: local sockaddr-type drop "sockaddr-un" c-type ;
|
||||||
|
|
||||||
M: local make-sockaddr
|
M: local make-sockaddr
|
||||||
local-path
|
local-path normalize-pathname
|
||||||
dup length 1 + max-un-path > [ "Path too long" throw ] when
|
dup length 1 + max-un-path > [ "Path too long" throw ] when
|
||||||
"sockaddr-un" <c-object>
|
"sockaddr-un" <c-object>
|
||||||
AF_UNIX over set-sockaddr-un-family
|
AF_UNIX over set-sockaddr-un-family
|
||||||
|
|
|
@ -9,9 +9,6 @@ IN: random.mersenne-twister
|
||||||
|
|
||||||
<PRIVATE
|
<PRIVATE
|
||||||
|
|
||||||
: curry2 ( w quot1 quot2 -- quot1 quot2 )
|
|
||||||
>r over r> [ curry ] 2bi@ ; inline
|
|
||||||
|
|
||||||
TUPLE: mersenne-twister seq i ;
|
TUPLE: mersenne-twister seq i ;
|
||||||
|
|
||||||
: mt-n 624 ; inline
|
: mt-n 624 ; inline
|
||||||
|
@ -27,7 +24,7 @@ TUPLE: mersenne-twister seq i ;
|
||||||
r> bitxor bitxor r> r> set-nth ; inline
|
r> bitxor bitxor r> r> set-nth ; inline
|
||||||
|
|
||||||
: calculate-y ( y1 y2 mt -- y )
|
: calculate-y ( y1 y2 mt -- y )
|
||||||
[ nth mt-hi ] [ nth mt-lo ] curry2 bi* bitor ; inline
|
tuck [ nth mt-hi ] [ nth mt-lo ] 2bi* bitor ; inline
|
||||||
|
|
||||||
: (mt-generate) ( n mt-seq -- y to from-elt )
|
: (mt-generate) ( n mt-seq -- y to from-elt )
|
||||||
[ >r dup 1+ mt-wrap r> calculate-y ]
|
[ >r dup 1+ mt-wrap r> calculate-y ]
|
||||||
|
|
Loading…
Reference in New Issue