parent
dcd69d4dc5
commit
86b934fae3
6
Makefile
6
Makefile
|
@ -98,6 +98,12 @@ linux-ppc:
|
|||
LIBS="-ldl $(DEFAULT_LIBS)"
|
||||
$(STRIP) $(BINARY)
|
||||
|
||||
solaris solaris-x86:
|
||||
$(MAKE) $(BINARY) \
|
||||
CFLAGS="$(DEFAULT_CFLAGS) -D_STDC_C99 -Drestrict=\"\" " \
|
||||
LIBS="-ldl -lsocket -lnsl $(DEFAULT_LIBS) -R/opt/PM/lib -R/opt/csw/lib -R/usr/local/lib -R/usr/sfw/lib -R/usr/X11R6/lib -R/opt/sfw/lib"
|
||||
$(STRIP) $(BINARY)
|
||||
|
||||
windows:
|
||||
$(MAKE) $(BINARY) \
|
||||
CFLAGS="$(DEFAULT_CFLAGS) -DFFI -DWIN32" \
|
||||
|
|
|
@ -10,8 +10,9 @@ Factor is fully supported on the following platforms:
|
|||
|
||||
Linux/x86
|
||||
Linux/AMD64
|
||||
Microsoft Windows 2000 or later
|
||||
Mac OS X/PowerPC
|
||||
Solaris/x86
|
||||
Microsoft Windows 2000 or later
|
||||
|
||||
The following platforms should work, but are not tested on a
|
||||
regular basis:
|
||||
|
@ -19,6 +20,7 @@ regular basis:
|
|||
FreeBSD/x86
|
||||
FreeBSD/AMD64
|
||||
Linux/PowerPC
|
||||
Solaris/AMD64
|
||||
|
||||
Other platforms are not supported.
|
||||
|
||||
|
@ -38,6 +40,7 @@ parameters to build the Factor runtime:
|
|||
linux-ppc
|
||||
macosx
|
||||
macosx-sdl
|
||||
solaris
|
||||
windows
|
||||
|
||||
Note: If you wish to use the Factor UI on Mac OS X, you must build with
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
! Load the HTTP server first (contrib/httpd/load.factor).
|
||||
|
||||
USING: errors generic hashtables html http io kernel math
|
||||
namespaces parser prettyprint sequences strings words ;
|
||||
USING: errors generic hashtables html http io kernel math memory
|
||||
namespaces parser prettyprint sequences strings threads words ;
|
||||
IN: factorbot
|
||||
|
||||
SYMBOL: irc-stream
|
||||
|
@ -63,20 +63,16 @@ M: ping handle-irc ( line -- )
|
|||
receiver get nickname get = speaker receiver ? get say ;
|
||||
|
||||
: irc-loop ( -- )
|
||||
[
|
||||
irc-stream get stream-readln
|
||||
[ dup print flush parse-irc irc-loop ] when*
|
||||
] [
|
||||
irc-stream get stream-close
|
||||
] cleanup ;
|
||||
irc-stream get stream-readln
|
||||
[ dup print flush parse-irc irc-loop ] when* ;
|
||||
|
||||
: factorbot
|
||||
"irc.freenode.net" connect
|
||||
"factorbot" login
|
||||
"#concatenative" join
|
||||
irc-loop ;
|
||||
[ irc-loop ] [ irc-stream get stream-close ] cleanup ;
|
||||
|
||||
: factorbot-loop [ factorbot ] try factorbot-loop ;
|
||||
: factorbot-loop [ factorbot ] try 30000 sleep factorbot-loop ;
|
||||
|
||||
: multiline-respond ( string -- )
|
||||
<string-reader> lines [ respond ] each ;
|
||||
|
|
Loading…
Reference in New Issue