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