Merge branch 'master' of git://factorcode.org/git/factor

db4
Slava Pestov 2008-03-31 16:22:36 -05:00
commit ff037a65df
2 changed files with 3 additions and 6 deletions

View File

@ -7,7 +7,7 @@ USING: alien alien.c-types generic io kernel math namespaces
io.nonblocking parser threads unix sequences
byte-arrays io.sockets io.binary io.unix.backend
io.streams.duplex io.sockets.impl math.parser continuations libc
combinators ;
combinators io.backend ;
IN: io.unix.sockets
: 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 make-sockaddr
local-path
local-path normalize-pathname
dup length 1 + max-un-path > [ "Path too long" throw ] when
"sockaddr-un" <c-object>
AF_UNIX over set-sockaddr-un-family

View File

@ -9,9 +9,6 @@ IN: random.mersenne-twister
<PRIVATE
: curry2 ( w quot1 quot2 -- quot1 quot2 )
>r over r> [ curry ] 2bi@ ; inline
TUPLE: mersenne-twister seq i ;
: mt-n 624 ; inline
@ -27,7 +24,7 @@ TUPLE: mersenne-twister seq i ;
r> bitxor bitxor r> r> set-nth ; inline
: 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 )
[ >r dup 1+ mt-wrap r> calculate-y ]