Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on "other" Forths. # # Note 1: use the eev command (defined in eev.el) and the # ee alias (in my .zshrc) to execute parts of this file. # Executing this file as a whole makes no sense. # An introduction to eev can be found here: # # (find-eev-quick-intro) # http://angg.twu.net/eev-intros/find-eev-quick-intro.html # # Note 2: be VERY careful and make sure you understand what # you're doing. # # Note 3: If you use a shell other than zsh things like |& # and the for loops may not work. # # Note 4: I always run as root. # # Note 5: some parts are too old and don't work anymore. Some # never worked. # # Note 6: the definitions for the find-xxxfile commands are on my # .emacs. # # Note 7: if you see a strange command check my .zshrc -- it may # be defined there as a function or an alias. # # Note 8: the sections without dates are always older than the # sections with dates. # # This file is at <http://angg.twu.net/e/fortho.e> # or at <http://angg.twu.net/e/fortho.e.html>. # See also <http://angg.twu.net/emacs.html>, # <http://angg.twu.net/.emacs[.html]>, # <http://angg.twu.net/.zshrc[.html]>, # <http://angg.twu.net/escripts.html>, # and <http://angg.twu.net/>. # ####### # «.forth-systems» (to "forth-systems") # «.cmforth» (to "cmforth") # «.muforth» (to "muforth") # «.c4th» (to "c4th") # «.c4th-dosemu» (to "c4th-dosemu") # «.4word» (to "4word") # «.timbre» (to "timbre") # «.ficl» (to "ficl") # «.maslicke-colorforth» (to "maslicke-colorforth") # «.sod32» (to "sod32") # «.amrforth» (to "amrforth") # «.chuck-quote» (to "chuck-quote") # «.tile-forth» (to "tile-forth") # «.forthos» (to "forthos") # «.f83» (to "f83") # «.twee-editors» (to "twee-editors") # «.xcolorforth» (to "xcolorforth") # «.retroforth» (to "retroforth") # «.retro-2011» (to "retro-2011") # «.laforth» (to "laforth") # «.rubyforth» (to "rubyforth") # «.rubyforth-uploading» (to "rubyforth-uploading") # «.rubyforth-angg» (to "rubyforth-angg") # «.rubyforth-demos» (to "rubyforth-demos") # «.modal-logic» (to "modal-logic") # «.inspect» (to "inspect") # «.R_stack_broken» (to "R_stack_broken") # «.R_stack» (to "R_stack") # «.ruby-and-prim-blocks» (to "ruby-and-prim-blocks") # «.miniforth-article-corr» (to "miniforth-article-corr") # «.foerthchen» (to "foerthchen") # «.factor» (to "factor") # «.joy» (to "joy") # «.stacle» (to "stacle") # «.forth-chips» (to "forth-chips") # «.lbforth» (to "lbforth") # «.reforth» (to "reforth") # «.svfig-2019-chuck» (to "svfig-2019-chuck") # «.strange-loop-2013» (to "strange-loop-2013") # «.forth-dimensions» (to "forth-dimensions") # «.miniforth-and-joy» (to "miniforth-and-joy") ##### # # forth-systems # 2019dec08 # ##### # «forth-systems» (to ".forth-systems") # https://github.com/ForthHub/wiki/wiki/Forth-Systems # https://github.com/ForthHub/discussion/issues/19 Forth Systems ###### # # F21 emulator # ###### # (find-es "dos" "dosemu_slink_4dos") cd $S/http/www.ultratechnology.com/ # (find-fline "$S/http/www.ultratechnology.com/") # (find-fline "$S/http/www.ultratechnology.com/f21emu/") # (find-fline "$S/http/www.ultratechnology.com/f21sim/") rm -Rv /tmp/dos/f21emu mkdir /tmp/dos/f21emu cd /tmp/dos/f21emu unzip -L $S/http/www.ultratechnology.com/f21emu/f21emu12.zip dos -c -e 8192 dos -c -x 8192 # http://www.spiritone.com/~fwarren/fpc.html unzip -l /snarf/ftp/ftp.taygeta.com/pub/Forth/Compilers/native/dos/FPC/fpc36.zip ######### # # dynoof 0.1.5 # ######### cd /usr/src/ rm -Rv dynoof-0.1.5/ tar -xvzf /snarf/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/dynoof-0.1.5.tgz cd /usr/src/dynoof-0.1.5/ # (find-fline "/usr/src/dynoof-0.1.5/README.Linux") # (find-fline "/usr/src/dynoof-0.1.5/Makefile" "mkindex >Indexes.ah") # diff -e Makefile~ Makefile ed Makefile <<'---' 76c ./mkindex >Indexes.ah . w --- make config |& tee omc make |& tee om # 99nov10: not working, gcc gives a funny error: # (find-fline "/usr/src/dynoof-0.1.5/om" "fixed or forbidden register 0 (ax)") ####### # # bigforth 23nov97 # ####### cd /snarf/http/www.informatik.tu-muenchen.de/~paysan/ bunzip2 bigforth-bin-23nov97.tar.bz2 bunzip2 bigforth-data-23nov97.tar.bz2 bunzip2 bigforth-src-23nov97.tar.bz2 bunzip2 bigforth-src-29dec97.tar.bz2 cd /usr/src/ rm -Rv bigforth/ tar -xvf /snarf/http/www.jwdt.com/~paysan/bigforth-bin-23nov97.tar tar -xvf /snarf/http/www.jwdt.com/~paysan/bigforth-data-23nov97.tar tar -xvf /snarf/http/www.jwdt.com/~paysan/bigforth-src-23nov97.tar # tar -xvf /snarf/http/www.jwdt.com/~paysan/bigforth-src-29dec97.tar cd /usr/src/bigforth/ make all |& tee oma # for i in (*.scr) # do ~/ICON/scr2str $i | tr ~/ICON/scr2str assem486.scr > assem486.st ~/ICON/scr2str bench.scr > bench.st ~/ICON/scr2str complex.scr > complex.st ~/ICON/scr2str disass.scr > disass.st ~/ICON/scr2str edit.scr > edit.st ~/ICON/scr2str fft.scr > fft.st ~/ICON/scr2str file.scr > file.st ~/ICON/scr2str fileint.scr > fileint.st ~/ICON/scr2str fileop.scr > fileop.st ~/ICON/scr2str float.scr > float.st ~/ICON/scr2str forth.scr > forth.st ~/ICON/scr2str ftast.scr > ftast.st ~/ICON/scr2str infix.scr > infix.st ~/ICON/scr2str oof.scr > oof.st ~/ICON/scr2str oofsampl.scr > oofsampl.st ~/ICON/scr2str output.scr > output.st ~/ICON/scr2str pipes.scr > pipes.st ~/ICON/scr2str savemod.scr > savemod.st ~/ICON/scr2str sedit.scr > sedit.st ~/ICON/scr2str startup.scr > startup.st ~/ICON/scr2str stream.scr > stream.st ~/ICON/scr2str struct.scr > struct.st ~/ICON/scr2str target.scr > target.st ~/ICON/scr2str tasker.scr > tasker.st ~/ICON/scr2str tools.scr > tools.st ~/ICON/scr2str vectors.scr > vectors.st ~/ICON/scr2str xwidgets.scr > xwidgets.st glimpseindex -H . *.st *.str *.m # From a hint Bernd Paysan gave me... # cat > tags.str <<'EOF' : tags context @ LIST> dup 2- w@ (view file? . cell+ .name cr ; cr ." ----" cr tags cr bye EOF bigforth "include forth.scr include tags.str" \ > forthker.tags forthker "include startup.scr include tags.str" \ > bigforth.tags bigforth 'include xwidgets.scr include edit.scr include login.str '\ 'include ptty.str include tags.str' \ > xbigforth.tags ~/ICON/ftags < forthker.tags > TAGS.forthker ~/ICON/ftags < bigforth.tags > TAGS.bigforth ~/ICON/ftags < xbigforth.tags > TAGS.xbigforth # rm TAGS ln -s TAGS.xbigforth TAGS # (find-bftag "create") # (find-bffile "README" 27) export BROWSER=/usr/src/netscape/netscape # Indented lines mean "type yourself". Each line is a different thing/demo. xbigforth ed edit.scr include minos.str designer open include testwidgets.str include gears.m gears open # (find-bffile "Makefile") # (find-bffile "startup.st" 24) # (find-bffile "forth.st" 1311) # (find-bffile "forth.st" 280) # (find-bffile "fileint.st" 654) # (find-bffile "forth.st" 2479) # (find-bffile "forth.st" 1441) # (find-bffile "forth.st" 1496) # *.st *.str *.m # (find-bffile "edit.st" 928) ####### # # Bigforth 11apr1999: preparing it to run # ####### cd $S/http/www.jwdt.com/~paysan/ for i in bin-glibc bin-libc5 data doc src edata-ShinyMetal edata-wood; do bunzip2 -v bigforth-$i-11apr1999.tar.bz2 gzip -v -9 bigforth-$i-11apr1999.tar done # See it PAYSAN=$S/http/www.jwdt.com/~paysan tar -tvzf $PAYSAN/bigforth-bin-glibc-11apr1999.tar.gz tar -tvzf $PAYSAN/bigforth-data-11apr1999.tar.gz tar -tvzf $PAYSAN/bigforth-doc-11apr1999.tar.gz tar -tvzf $PAYSAN/bigforth-src-11apr1999.tar.gz tar -tvzf $PAYSAN/bigforth-edata-ShinyMetal-11apr1999.tar.gz tar -tvzf $PAYSAN/bigforth-edata-wood-11apr1999.tar.gz rm -Rv /usr/src/bigforth/ mkdir /usr/src/bigforth/ cd /usr/src/ PAYSAN=$S/http/www.jwdt.com/~paysan tar -xvzf $PAYSAN/bigforth-bin-glibc-11apr1999.tar.gz tar -xvzf $PAYSAN/bigforth-data-11apr1999.tar.gz #tar -xvzf $PAYSAN/bigforth-doc-11apr1999.tar.gz tar -xvzf $PAYSAN/bigforth-src-11apr1999.tar.gz #tar -xvzf $PAYSAN/bigforth-edata-ShinyMetal-11apr1999.tar.gz #tar -xvzf $PAYSAN/bigforth-edata-wood-11apr1999.tar.gz # cd /usr/src/bigforth/ echo ': rr s" /home/root/FORTH/emacs.rr" included ;' >> bigforth.cnf rm bigforth make bigforth |& tee ombf # rm bigforth forthker.sys # make |& tee om # rm bigforth.sys # make bigforth.sys |& tee om2 # rm xbigforth.sys *.bfm # make xbigforth.sys |& tee om2 for i in *.scr; do echo $i; ~/ICON/deblock < $i > ${i}z; done # My first mail to the bigforth list: # (find-fline "$MAIL" "Hi bpaysan,") ####### # # Bigforth 11apr1999: learning more # ####### # (find-bffile "ediwind.str" "file-menu:") # (find-bffile "tools.scrz" ": see") # (find-bffile "forth.scrz" "\n: cfa@") hex : foo1 ( "w" -- addr ) name find 0= abort" not found" ; : foo2 ( "w" -- addr ) foo1 >name ; : ncount ( addr -- addr+1 count ) dup c@ 1f and swap 1+ swap ; : foo3 ( "w" -- ) foo2 ncount type ; foo2 see 20 - 40 dump foo3 see foo2 see .name : words. ( -- ) context @ list> cr . ; : words.2 ( -- ) context @ list> cr dup . cell+ .name ; words.2 : foo0 ( "w" -- addr ) foo2 4 - ; : ndump ( addr -- addr+ ) 0 do count 2 u.r space loop ; : .word3 ( addr -- ) dup . cell+ ncount 2dup type + 5 ndump ; : words.3 ( -- ) context @ list> cr .word3 drop ; : "addr:" ( x -- x ) dup 8 u.r ." : " ; : "<word>" ( addr -- addr+4 ) dup @ 8 u.r space 4 + ; : "<byte>" ( addr -- addr+1 ) dup c@ 2 u.r space 1 + ; : "<name>" ( addr -- addr+ ) ncount 2dup type space + ; : "<flags+name>" ( addr -- addr+ ) "<byte>" 1- "<name>" ; : .word4 ( addr -- addr+ ) "addr:" "<word>" "<flags+name>" 5 ndump ; foo0 see cr .word4 . ' foo0 . 3 u.r # (find-bffile "minos-load.str" ": S[") # (find-bffile "forth.scrz") # (find-bffile "bigforth.c") # (find-bffile "Makefile" "forthker.sys:") # (find-bffile "xwidgets.scrz" "script.icn") # (find-bffile "menu.str") # (find-bffile "Makefile") # (find-bffile "README") # (find-paysanfile "bigforth-bin-glibc-11apr1999.tar.gz") # (find-paysanfile "bigforth-src-11apr1999.tar.gz") # (find-bffile "ombf") gcc -Wall -DDATE='"'"$(date '+%d%b%Y' | tr '[A-Z]' '[a-z]')"'"' \ -DINSTDIR='"'"/usr/local/lib/bigforth"'"' -E bigforth.c > bigforth.E # (find-bffile "bigforth.E") ls -i /lib /usr/lib /usr/X11R6/lib | sort # (find-bffile "menu.str") # (find-fline "~/s") # (find-fline "~/s2") # (find-enode "Editing Binary Files") # (find-efile "hexl.el") ##### # # Idéias pro meu Forth # ##### No início não tenho nenhum word de divisão (acho). A coisa mais básica é saber parsear um word e encontrar o correspondente a ele no dicionário. De repente isso pode até ser feito em C, que é fácil de debugar, e que vai me permitir alterar a estrutura do dicionário mais facilmente. # (find-fline "$S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/") # (find-fline "$S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/linux-eforth-1.0c.tar.gz") # (find-fline "$S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/e/eforth.S") # (find-fline "$S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/e/Makefile") cd /tmp/ cp $S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/e/eforth.S . cp $S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/e/Makefile . gcc -o eforth eforth.S cd $S/ftp/ftp.taygeta.com/Taygeta/Forth/Linux/e/ # (find-fline "/snarf/ftp/ftp.IAEhv.nl/pub/users/mhx/") # (find-fline "$S/http/www.ultratechnology.com/") ##### # # yforth # ##### pdsc /big/slinks2/dists/slink/main/source/interpreters/yforth_0.1beta-9.dsc cd /usr/src/yforth-0.1beta/ debian/rules binary |& tee odrb s@1, s@2, s@4, ##### # # perpol # 2000jul06 # ##### # «perpol» # (find-es "anatocc" "easynasm") # (find-fline "/usr/src/easynasm/easynasm" "--leavejunk") #* rm -Rv /usr/src/perpol/ cd /usr/src/ tar -xvzf $S/http/www.boswa.com/misc/forth/perpol.tgz cd /usr/src/perpol/ # (find-fline "/usr/src/perpol/") # (find-fline "/usr/src/perpol/notes.txt") # (find-fline "/usr/src/perpol/notes.txt" "Usage:") # (find-fline "/usr/src/perpol/perpol") cd /usr/src/perpol/samples/ /usr/src/perpol/perpol arith.ppl /usr/src/easynasm/easynasm --leavejunk arith.asm ./arith #* # (find-fline "/usr/src/perpol/samples/") # (find-fline "/usr/src/perpol/samples/arith.ppl") # (find-fline "/usr/src/perpol/samples/arith.asm") # (find-fline "/usr/src/perpol/samples/easynasm.temp.asm") # (find-fline "/usr/src/perpol/samples/easynasm.temp.c") ##### # # eforth # 2000jun23 # ##### # «eforth» # (code-c-d "eforth" "/usr/src/eforth-1.0e/") #* rm -Rv /usr/src/linux-eforth-1.0e/ rm -Rv /usr/src/eforth-1.0e/ cd /usr/src/ tar -xvzf $S/http/fare.tunes.org/files/asm/linux-eforth-1.0e.tar.gz mv linux-eforth-1.0e/ eforth-1.0e/ cd /usr/src/eforth-1.0e/ # NUF? doesn't like buffered terminals and so # WORDS and DUMP and SEE aren't working well. # Fix it with a crude hack. # (find-eforthfile "eforth.4th" "NUF?") # (find-eforthfile "eforth.S" "NUF?") #diff -c eforth.S~ eforth.S |& tee ~/o patch -p0 <<'%%%' *** eforth.S~ Wed Jun 16 12:36:30 1999 --- eforth.S Sat Jun 24 18:47:30 2000 *************** *** 1842,1847 **** --- 1842,1848 ---- /* Return false if no input, else pause and if CR return true. */ __COLON(4,"NUF?",NUFQ) + .long DOLIT,0,EXIT /* Edrx: always return 0 immediately */ .long QKEY,DUPP .long QBRAN,NUFQ1 .long DDROP,KEY %%% cd /usr/src/eforth-1.0e/ make test |& tee omt grep -v '^[ ]*$' eforth.s > eforth.s- echo 'WORDS BYE' | eforth echo ; echo echo 'SEE DUMP' | eforth | dd count=1 2> /dev/null ; echo # (find-node "(zsh)Redirection") #* # (find-eforthfile "eforth.S") # (find-eforthfile "eforth.S" "#define __COLON") # (find-eforthfile "eforth.S" "#define __CODE(") # (find-eforthfile "eforth.s-") # (find-eforthfile "eforth.S" "macros to debug eForth") # (find-eforthfile "eforth.S" "debugging functions") # (find-eforthfile "eforth.S" "GDB macros") # (find-node "(gdb)Auto Display" "display/FMT") # (find-node "(gdb)Memory" "x/NFU") # (find-node "(gdb)Auto Display" "enable display") ##### # # eforth: trying to rewrite DUMP and WORDS without NUF?. # 2000jun23 # ##### #* # (find-eforthfile "eforth.4th" ": WORDS") # (find-eforthfile "eforth.S" "\"WORDS\"") # (find-eforthfile "eforth.s-" "\"WORDS\"") cd /usr/src/eforth-1.0e/ ./eforth <<'---' CONTEXT @ @ .ID CONTEXT @ @ 1 CELLS - @ .ID CONTEXT @ @ 1 CELLS - @ 1 CELLS - @ .ID BYE --- #* # (find-eforthfile "eforth.4th" ": DUMP") # (find-eforthfile "eforth.S" "\"DUMP\"") # (find-eforthfile "eforth.s-" "\"DUMP\"") cd /usr/src/eforth-1.0e/ ./eforth <<'---' : D ( a -- a+16 ) BASE @ >R HEX DUP 16 dm+ DROP SPACE SPACE DUP 16 _TYPE 16 + CR R> BASE ! ; : FOOBIE ." Hi!" CR ; : 1+2 1 2 + ; ' DUMP 16 - D D D .S DROP ' FOOBIE 16 - D D D .S DROP ' 1+2 16 - D D D .S DROP CONTEXT @ @ 160 - D D D D D D D D D D D D BYE --- #* cd /usr/src/eforth-1.0e/ eforth & cat /proc/$(pidof eforth)/maps % # (code-c-d "eforth" "/usr/src/eforth-1.0e/") # (find-eforthfile "") # (find-eforthfile "eforth.4th") # (find-eforthfile "test.4th") # (find-eforthfile "eforth.4th" ": WORDS") eeg /usr/src/eforth-1.0e/eforth # Buggy! ##### # # cmForth # 2000jul20 / 2019dec08 # ##### # «cmforth» (to ".cmforth") # https://github.com/ForthHub/cmFORTH # (code-c-d "taygeta" "$S/ftp/ftp.uni-bremen.de/pub/mirrors/Taygeta-Archive/") # (find-taygetafile "Archive/others/") # (find-e20file "jka-compr.el") # Where is the .arc support? # (find-e20file "arc-mode.el") # It only understands the dir structure. # (find-fline "~/FORTH/") #* cd ~/FORTH/ cat cmforth.blk.txt \ | awk '{ if ($0 ~ /«/) printf "\\ «screen_%d:»\n", n++; else print }' \ |& tee cmforth.blk.txt2 cat cmforthx.scr.txt \ | awk '{ if ($0 ~ /«/) printf "\\ «screen_%d:»\n", n++; else print }' \ |& tee cmforthx.scr.txt2 #* # (find-fline "~/FORTH/cmforth.blk.txt2") # (find-fline "~/FORTH/cmforthx.scr.txt2") # (find-angg "FORTH/cmforth.blk.txt2" "screen_33:") # (find-angg "FORTH/cmforth.blk.txt2" "screen_1:") # (find-angg "FORTH/cmforthx.scr.txt2") # http://rm-f.net/~orange/arc/cmforth.zip # http://rm-f.net/~orange/devel/forth/cmforth.zip # http://rm-f.net/~orange/arc/forth/ # http://rm-f.net/~orange/arc/forth/pygmy15.zip # http://rm-f.net/~orange/arc/forth/pygtools.zip # (find-shttpfile "rm-f.net/~orange/arc/cmforth.zip") # (find-shttpfile "rm-f.net/~orange/devel/forth/cmforth.zip") # (find-shttpfile "rm-f.net/~orange/arc/forth/") # (find-shttpfile "rm-f.net/~orange/arc/forth/pygmy15.zip") # (find-shttpfile "rm-f.net/~orange/arc/forth/pygtools.zip") ##### # # muforth # 2019dec08 # ##### # «muforth» (to ".muforth") # http://c2.com/cybords/pp4.cgi?muforth/README ##### # # f-cpu docs # 2000oct30 # ##### # Interesting mainly because it is "free"; # Seems to have a bloated architecture. #* rm -Rv /tmp/manual/ cd /tmp/ tar -xvzf $S/http/www.mime.up8.edu/~whygee/fcpu_manual.tgz cd /tmp/manual/ ./run.me # (find-fline "/tmp/manual/") #* ##### # # c4th # 2000jan16 # ##### # «c4th» (to ".c4th") # (find-shttpw3 "www.users.qwest.net/~loveall/") unzip -l $S/http/www.users.qwest.net/~loveall/binary/c4th100.zip unzip -l $S/http/www.users.qwest.net/~loveall/binary/4thice22.zip unzip -l $S/http/www.users.qwest.net/~loveall/binary/Debug05.zip #* rm -Rv /usr/src/c4th/ cd /usr/src/ unzip $S/http/www.users.qwest.net/~loveall/binary/c4th100.zip mkdir /usr/src/c4th/4thice/ cd /usr/src/c4th/4thice/ unzip $S/http/www.users.qwest.net/~loveall/binary/4thice22.zip mkdir /usr/src/c4th/debug/ cd /usr/src/c4th/debug/ unzip $S/http/www.users.qwest.net/~loveall/binary/Debug05.zip # (find-htetfile "Assembly-HOWTO.txt.gz") # (find-sftpfile "x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip") mkdir /usr/src/c4th/ta2as/ cd /usr/src/c4th/ta2as/ unzip -L $S/ftp/x2ftp.oulu.fi/pub/msdos/programming/convert/ta2asv08.zip cp -v ta2as.exe .. #* # «c4th-dosemu» (to ".c4th-dosemu") # (find-es "dos" "dosemu-0") # (find-fline "/usr/src/c4th/") cd /usr/src/c4th/ cp -v * /tmp/testdos/ #* # (find-fline "/usr/src/c4th/") # (find-fline "/usr/src/c4th/!Readme.1st") # (find-fline "/usr/src/c4th/!Readme.1st" " QUICK START:") cat > $EEG <<'---' dir cls c4th.com tcl: ac {^[} square {^]} {dup * ;} ^_ ^M tcl: ac {^[} cube {^]} {dup square * ;} ^_ ^M tcl: ac ^X 4 ^_ "square ." ^M tcl: ac ^X 5 ^_ "cube ." ^M tcl: ac bye ^M exitemu --- eeg2 -c allowtcl dos #* ##### # # timbre # 2001feb11 # ##### # «timbre» (to ".timbre") # (find-shttpw3 "www.compusmart.ab.ca/rc/Timbre/timbre.htm") # (find-shttpw3 "www.compusmart.ab.ca/rc/Timbre/TimbreUnitII.html") gv $S/http/www.compusmart.ab.ca/rc/Timbre/Resources/papers.ps/bilingual.ps & gv $S/http/www.compusmart.ab.ca/rc/Timbre/Resources/papers.ps/cwoc.ps & gv $S/http/www.compusmart.ab.ca/rc/Timbre/Resources/papers.ps/ithastim.ps & gv $S/http/www.compusmart.ab.ca/rc/Timbre/Resources/papers.ps/stackver.ps & gv $S/http/www.compusmart.ab.ca/rc/Timbre/Resources/papers.ps/tranfram.ps & #* rm -Rv /usr/src/timbre/ mkdir /usr/src/timbre/ cd /usr/src/timbre/ tar -xvzf $S/http/www.compusmart.ab.ca/rc/Timbre/V.7/Unix.tar.Z mv -v Unix/* . rmdir Unix cd /usr/src/timbre/Sources/ #mv Makefile Makefile.orig #sed "s/^ @ / /g" < Makefile.orig > Makefile #make sun |& tee omsun # gcc -g -o sun -O -Dunix -Dfpos_t=int kernel.c ii.c io.c library.c \ shells.c xtras.c theend.c localio.c signals.c file.c aoloader.c \ timeout.c auto.c ties.c timbre.c memmove.c cp -v sun ../timbre cd /usr/src/timbre/Scripts/ cd /usr/src/timbre/Scripts/ForthtoC/ cat > $EEG <<'---' bye --- eeg /usr/src/timbre/timbre for i in timbre.[ch]; do mv $i $i.orig; tr \\r \\n < $i.orig > $i; done # (find-timbrefile "Scripts/") # (find-timbrefile "Scripts/ForthtoC/") # (find-timbrefile "Sources/") # (find-timbrefile "Sources/kernel.c") #gcc -g -I/usr/src/timbre/Sources -o timbre timbre.c gcc -g -I/usr/src/timbre/Sources -o timbre timbre.c |& tee ogcc #* # (code-c-d "timbre" "/usr/src/timbre/") # (find-timbrefile "") # (find-timbrefile "Sources/") # (find-timbrefile "Sources/README") # (find-timbrefile "Sources/Makefile" "sun :") ##### # # 4word # 2001feb19 # ##### # «4word» (to ".4word") # (to "c4th-dosemu") #* rm -Rv /usr/src/4word/ cd /usr/src/ unzip $S/http/www.users.qwest.net/~loveall/binary/4word15.zip cd /usr/src/4word/ tr -d \\r < 4word.lst > 4word.lst.u cd /usr/src/4word/ cp -v * /tmp/testdos/ # (code-c-d "4word" "/usr/src/4word/") # (find-4wordfile "") # (find-4wordfile "ColorMan.txt") # (find-4wordfile "ReadMe.txt") # (find-4wordfile "ReadMe.txt" "'words' and 'dis'") # (find-4wordfile "ReadMe.txt" "Hex Control ASCII MODE") # (find-4wordfile "ReadMe.txt" "only 13 control keys which are:") # (find-4wordfile "ReadMe.txt" "4word dbg help:") # (find-4wordfile "4word.asm" "':'") # (find-4wordfile "4word.asm" "$code\tmacro") # (find-4wordfile "4word.asm" "do macro") # (find-4wordfile "g.bat") # (find-4wordfile "4word.lst") # (find-4wordfile "4word.lst.u") # (find-angg ".emacs" "hscroll-keys-mode") # (find-enode "Display Vars" "`tab-width'") # (progn (find-4wordfile "4word.lst.u") (hscroll-keys-mode 1)) # (progn (find-4wordfile "4word.lst.u") (setq tab-width 4)) #* cat > $EEG <<'---' dir cls 4word N 5 N 6 + u. bye rem 4word fload 4wboot.p rem 4word fload 4wboot.p fload 4wdbg.p fload 4wcedit.p de cls 4word fload 4wBoot.p fload 4wDbg.p fload 4wCedit.p N A 1 - . : square ] dup ] * ; 2 square . tcl: ac {^[^[quare^]dup^]* ; 3 quare . ^M} ' square dis tcl: ac { } { } { } ' quare ' dis dbg tcl: ac { } { } { } { } { } { } { } { } { } { } { } { } words tcl: ac { } { } { } bye exitemu --- eeg2 -c allowtcl dos #* ##### # # ficl # 2001dec01 / 2019feb10 # ##### # «ficl» (to ".ficl") # http://ficl.sourceforge.net/ # http://ficl.sourceforge.net/links.html # http://ficl.sourceforge.net/oop.html # http://ficl.sourceforge.net/parsesteps.html #* rm -Rv /usr/src/ficl/ mkdir /usr/src/ficl/ cd /usr/src/ficl/ tar -xvzf $S/http/prdownloads.sourceforge.net/ficl/ficl300a.tar.gz # Only ReadMe.txt was in . mv -v ficl/* . rmdir ficl #* cd /usr/src/ficl/ make -f Makefile.linux |& tee om #* cd /usr/src/ficl/ cat > $EEG <<'---' words see space bye --- eeg ficl #* # (code-c-d "ficl" "/usr/src/ficl/") # (find-ficlfile "") tar -tvzf $S/http/www.geocities.com/SiliconValley/Bay/2334/4th-33a.tgz ##### # # Mark Slicker's version of Chuck's ColorForth, compilable from Linux # 2001nov30 # ##### # «maslicke-colorforth» (to ".maslicke-colorforth") # (find-shttpfile "www.oakland.edu/~maslicke/colorforth/") # (find-shttpw3 "www.oakland.edu/~maslicke/colorforth/") #* rm -Rv /tmp/colorforth/ mkdir /tmp/colorforth/ cd $S/http/www.oakland.edu/~maslicke/colorforth/ && \ cp -diPpvR * /tmp/colorforth/ cd /tmp/colorforth/ cp -v $S/ftp/ftp.ultratechnology.com/COLOR.COM . # (find-fline "/tmp/colorforth/") # (find-fline "/tmp/colorforth/compile") as -o color.o color.s if test -a color.o; then objcopy -O binary color.o color.com cp color.com color.com.orig # rm color.o dd if=COLOR.COM of=color.com \ ibs=1024 obs=1024 bs=1024 count=51 seek=12 skip=12 fi #* # (find-fline "/tmp/colorforth/") # (find-fline "/tmp/colorforth/write_floppy") cd /tmp/colorforth/ dd if=color.com of=/dev/fd0 #* # (find-fline "/tmp/colorforth/") # (find-fline "/tmp/colorforth/color.s" ".include \"boot.s\"") # (find-fline "/tmp/colorforth/boot.s") ##### # # sod32 # 2001dec05 / 2016aug10 # ##### # «sod32» (to ".sod32") # https://lennartb.home.xs4all.nl/forth.html # https://lennartb.home.xs4all.nl/sod32.tar.gz * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rv ~/usrc/sod32/ tar -C ~/usrc/ -xvzf \ /home/edrx/snarf/https/lennartb.home.xs4all.nl/sod32.tar.gz cd ~/usrc/sod32/ cp -v sod32.doc sod32.doc.txt make asm386 |& tee om ./sod32 forth.img 134 2 * . words S" sod32.4" \ SOD32 forth.img CR BYE # (code-c-d "sod32" "~/usrc/sod32/") # (find-sod32file "") # (find-sod32file "README") # (find-sod32file "README" "make asm386") # (find-sod32file "sod32.doc.txt") # (find-sod32file "sod32.doc.txt" "1.3 SPECIAL INSTRUCTIONS") ##### # # amrforth # 2001dec10 # ##### # «amrforth» (to ".amrforth") #* rm -Rv /usr/src/amrforth/ tar -xvzf $S/http/www.amresearch.com/amrforth/amrforthv5.0beta-024.tar.gz \ -C /usr/src/ cd /usr/src/amrforth/ #* # (code-c-d "amr" "/usr/src/amrforth/") # (find-amrfile "") # (find-amrfile "source/README" "amrForth hardware") ##### # # isforth # 2001dec14 # ##### #* rm -Rv /usr/src/isforth/ mkdir /usr/src/isforth/ cd /usr/src/isforth/ tar -xvzf $S/http/retro.tunes.org/pub/isforth/isforth-tcn-08-15-01.tgz #* # (code-c-d "isforth" "/usr/src/isforth/src/") # (find-isforthfile "README") # (find-isforthfile "") ##### # # retro4b # 2001dec14 # ##### #* rm -Rv /usr/src/retro/ cd /usr/src/ unzip $S/http/retro.tunes.org/pub/retro4b.zip cd /usr/src/retro/ #* # (code-c-d "retro" "/usr/src/retro/") # (find-retrofile "readme") # (find-retrofile "") ##### # # pigmy # 2001dec10 # ##### http://rm-f.net/~orange/arc/cmforth.zip http://rm-f.net/~orange/devel/forth/cmforth.zip http://rm-f.net/~orange/arc/forth/ http://rm-f.net/~orange/arc/forth/pygmy15.zip http://rm-f.net/~orange/arc/forth/pygtools.zip http://www.colorforth.com/cf.html http://www.colorforth.com/forth.html http://www.colorforth.com/parsed.html http://www.colorforth.com/chars.html http://www.colorforth.com/simulation.html http://www.colorforth.com/temperature.html ##### # # The "five lines/two years" quote # 2001dec05 # ##### # «chuck-quote» (to ".chuck-quote") # http://www.ultratechnology.com/mmeta.html # (find-shttpw3 "www.ultratechnology.com/mmeta.html" "about five lines") Mike Perry relates a story about Chuck's CAD system which ran on the board whose design it had been written for. Chuck showed Mike that he had written the core of the CAD application in about five lines of code. When Mike asked him how long it had taken, he replied, "Oh, about two years." ##### # # tile-forth # 2002sep16 # ##### # «tile-forth» (to ".tile-forth") # (code-c-d "tile" "$usr_src/tile-forth-2.1/") # (find-tilefile "") #* rm -Rv $usr_src/tile-forth-2.1/ cd $usr_src/ tar -xvzf $S/http/ftp.gnu.org/non-gnu/tile-forth/tile-forth-2.1.tar.gz cd $usr_src/tile-forth-2.1/ #* ##### # # forthos # 2002dec23 # ##### # «forthos» (to ".forthos") lynx http://cliki.tunes.org:8000/Forth%20OSes tar -tvzf $S/http/www.forthos.org/dist/forthos07.tz # (code-c-d "forthos" "/tmp/forthos/") # (find-forthosfile "") # (find-forthosfile "") #* rm -Rv /tmp/forthos/ mkdir /tmp/forthos/ cd /tmp/forthos/ tar -xvzf $S/http/www.forthos.org/dist/forthos07.tz #* cd /tmp/forthos/ make clean make |& tee om #* # (code-c-d "forthos" "/tmp/forthos/") # (find-forthosfile "README.ForthOS" "Support for Multiboot") # (find-forthosfile "multiboot.h") # (find-forthosfile "Makefile") # (find-forthosfile "Makefile" "-Tforthos.lnk") # (find-forthosfile "forthos.lnk") # (find-forthosfile "om") # (find-progoutput "cd /tmp/forthos; cpp -D__ASM__ -DCONS_POSIX -DCONS_VGA < eforth.asm") # (find-forthosfile "") # From c.l.f., 2008jul10: # qemu -cdrom forthos.iso -hda forth.Image -boot d # http://www.forthos.org/setup.html #### # # Laxen & Perry's Forth83 # 2003apr15 # #### # «f83» (to ".f83") lynx $S/http/www.eforth.com.tw/academy/library/ #* rm -Rv ~/tmp/f83/ mkdir ~/tmp/f83/ cd ~/tmp/f83/ lha x $S/http/www.eforth.com.tw/academy/zip/f83v2-ms.lzh # (find-lua50ref "file:read") for i in *.blk; do lua50e ' while 1 do r = io.read(64); if not r or r=="" then break end print(r) end ' < $i > $i.txt done for i in *.blk; do lua50e ' lines = {}; tinsert = table.insert; getn = table.getn while 1 do r = io.read(64); if not r or r=="" then break end tinsert(lines, r) end nscreen = 0 for i=1,getn(lines),16 do print("\\ «"..nscreen.."»") for j=i,i+15 do if lines[j] then print(lines[j]) end end nscreen = nscreen+1 end ' < $i > $i.e done #* # Update, 2007nov20: # ftp://ftp.taygeta.com/pub/Forth/Compilers/native/dos/F83/ #### # # Twee editors # 2003apr18 # #### # «twee-editors» (to ".twee-editors") #* lynx http://www.users.qwest.net/~loveall/Twee.htm #* lynx $S/http/www.users.qwest.net/~loveall/Twee.htm #* # (code-c-d "ue" "/tmp/ue.1.25/") # (find-uefile "README") # (find-uefile "ue.c") rm -Rv /tmp/ue.1.25/ cd /tmp tar -xvzf $S/http/www.users.qwest.net/~loveall/binary/ue.1.25.tgz cd /tmp/ue.1.25/ gcc ue.c -O2 -fomit-frame-pointer -o ue ; strip ue ; ls -al ue #* #### # # Xcolorforth # 2003may01 # #### # «xcolorforth» (to ".xcolorforth") # (code-c-d "xcf" "$usr_src/XcolorForth/") # (find-xcffile "") # (find-xcffile "README") # (find-progoutput "grep-available SDL") #* rm -Rv $usr_src/XcolorForth/ cd $usr_src/ tar -xvzf $S/http/www.oakland.edu/~maslicke/colorforth/XcolorForth.tar.gz cd $usr_src/XcolorForth/ #* ##### # # cmForth source # 2007feb28 # ##### # http://www.eforth.com.tw/academy-n/chips/Harris%20Rtx2000/ # http://www.eforth.com.tw/academy-n/chips/Harris%20Rtx2000/Rtx2000_5.htm ##### # # retroforth (inspired by cmForth) # 2007mar13 # ##### # «retroforth» (to ".retroforth") # (find-es "retro") # http://retroforth.net/wiki/ # http://retroforth.com/handbook/ # http://retroforth.com/get/source/9.2.10-hosted-source.tar.gz # http://charleschilders.com/repos/snapshot/retro-9.3.tar.gz # «retro-2011» (to ".retro-2011") # (find-es "retro") # (find-es "cvs" "fossil") # http://rx-core.org/rx.fossil/index # http://rx-core.org/dev/playground.fossil/index * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) mkdir /tmp/re/ cd /tmp/re/ fossil clone http://rx-core.org/rx.fossil rx.fossil mkdir rx-core cd rx-core fossil open ../rx.fossil # To pull the latest changes: fossil pull fossil update cd /tmp/re/ tar -cvzf ~/tmp/rx-core.tgz rx-core/ # (find-fline "~/tmp/rx-core.tgz") # (find-available "lzh") # (find-status "lha") # (find-vldifile "lha.list") # (find-fline "/usr/doc/lha/") ##### # # Richard E. Haskell's "The Forth Course" # 2007jun10 # ##### # http://www.cse.secs.oakland.edu/haskell/HC12Book/4course.zip # Based on F-PC, written in 1990. ##### # # LaForth # 2007nov20 # ##### # «laforth» (to ".laforth") # http://www.eforth.com.tw/academy-n/chips/More%20on%20forth%20engines/volume12/volume12_4.htm # ?[ ... ][ ... ]? # [[ ... ?[ ... ?[ ... ?[ ... ]] # [[ ... ?[ ... ?[ ... ?[ ... ]]? # [[ ... ?] # [[ n1 =?[ ... ][ # n2 =?[ ... ][ # n3 =?[ ... ][ # default ]]? \ Marc Simpson's implementation: * (eepitch-gforth) : ?[ postpone if ; immediate : ][ postpone else ; immediate : ] postpone then ; immediate : .bool ?[ ." True" ][ ." False" ] ; -1 .bool True 0 .bool False # http://www.zyvra.org/laforth/ # http://www.zyvra.org/laforth/forth.zip ##### # # rubyforth (by Marc Simpson) # 2007dec09 # ##### # «rubyforth-old» (to ".rubyforth-old") # Firefox -> Gmail -> /tmp/ -> ~/tmp/ # (find-fline "/tmp/") # (find-sh0 "cp -v /tmp/rubyforth-186+.tar.gz ~/tmp/") # (find-fline "~/tmp/rubyforth-186+.tar.gz") # (find-sh0 "cp -v /tmp/rubyforth-198.tar.gz ~/tmp/") # (find-fline "~/tmp/rubyforth-198.tar.gz") #* rm -Rf ~/usrc/rubyforth/ tar -C ~/usrc/ -xvzf ~/tmp/rubyforth-198.tar.gz cd ~/usrc/rubyforth/ #* # (code-c-d "rubyforth" "~/usrc/rubyforth/" :anchor) # (code-c-d "rubyforth" "~/rubyforth/" :anchor) # (find-rubyforth "") # (find-rubyforth "rubyforth") # (find-rubyforth "forth.rb") # (find-rubyforth "primitives.rb") # (find-rubyforth "kernel.rb") # (find-rubyforth "stack.rb") # (find-rubyforth "file.rb") # (find-rubyforth "inspector.rb") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) *;; rubyforth has no prompt, this may confuse comint... * (eexterm-kill "A") * (eexterm "A") cd ~/usrc/rubyforth/ ruby1.8 -r forth.rb words *;; More demos here: *;; (find-anggfile "rubyforth/") *;; (find-anggfile "rubyforth/test.fs") *;; (find-rubyforth "") *;; (find-rubyforth "scripts/") *;; (find-rubyforth "scripts/f83.fs") *;; (find-rubyforth "demos/") *;; (find-rubyforth "demos/deblock.fs") * (eexterm-kill "A") * (eexterm "A") cd ~/usrc/rubyforth/ cat scripts/f83.fs | ruby1.8 -r forth.rb ##### # # on uploading marc's RubyForth tarballs to twu # 2008jan07 # ##### # «rubyforth» (to ".rubyforth") # «rubyforth-angg» (to ".rubyforth-angg") # «rubyforth-uploading» (to ".rubyforth-uploading") # (find-angg "rubyforth/") # (find-angg "rubyforth/README.too") # http://angg.twu.net/rubyforth/ # http://angg.twu.net/rubyforth/README.too.html # http://angg.twu.net/rubyforth/rubyforth-0.23.tar.gz # http://angg.twu.net/rubyforth/blocks.tar.gz # http://rubyforth.sourceforge.net/ # http://rubyforth.sourceforge.net/blocks.tar.gz # http://rubyforth.sourceforge.net/rubyforth-0.23.tar.gz #* rm -Rfv ~/usrc/rubyforth-0.23/ tar -C ~/usrc/ -xvzf \ $S/http/rubyforth.sourceforge.net/rubyforth-0.23.tar.gz cd ~/usrc/rubyforth-0.23/ #* cd ~/usrc/rubyforth-0.23/ for i in $(find * -type f | sort); do cp -av $i ~/rubyforth/$i; done #* # To update my makefile: # (find-sh "tar -tvzf \ $S/http/rubyforth.sourceforge.net/rubyforth-0.23.tar.gz \ | cut -b 64- | sort \ | awk '{printf \" rubyforth/%s\\n\", $0}'") # (find-blogme3file "anggmake.lua") # (find-blogme3file "anggmake.lua" "rubyforth/") # (code-c-d "rubyforth" "~/usrc/rubyforth-0.19/") # (find-rubyforthfile "") # (find-rubyforthsh "find * -type f | sort") # To upload the binaries to angg/slow_html/: * (eepitch-eshell) * (eepitch-kill) * (eepitch-eshell) # (find-twusfile "rubyforth/") # (find-twusfile "rubyforth/demos/") # (find-angg "rubyforth/") # (find-angg "rubyforth/demos/") cd (ee-twusfile "rubyforth/") cp -v $S/http/rubyforth.sourceforge.net/rubyforth-0.23.tar.gz . cd (ee-twupfile "rubyforth/") cp -v $S/http/rubyforth.sourceforge.net/rubyforth-0.23.tar.gz . # Older scripts... cd ~/rubyforth/ # http://rubyforth.sourceforge.net/rubyforth-0.19.tar.gz cp -v $S/http/rubyforth.sourceforge.net/rubyforth-0.19.tar.gz \ (ee-twusfile "rubyforth/") # http://rubyforth.sourceforge.net/blocks.tar.gz cp -v $S/http/rubyforth.sourceforge.net/blocks.tar.gz \ (ee-twusfile "rubyforth/") cd ~/rubyforth/demos/ cp -v cmforth.blk (ee-twusfile "rubyforth/demos/") cp -v f83kernel.blk (ee-twusfile "rubyforth/demos/") ##### # # rubyforth demos # 2008jan02 # ##### # «rubyforth-demos» (to ".rubyforth-demos") # (find-angg ".emacs" "eepitch-rubyforth") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rv /tmp/rubyforth/ mkdir /tmp/rubyforth/ cd /tmp/rubyforth/ wget http://angg.twu.net/rubyforth/rubyforth-0.19.tar.gz tar -xvzf rubyforth-0.19.tar.gz cd /tmp/rubyforth/rubyforth-0.19/ # (find-angg ".emacs" "eepitch-rubyforth") # (code-c-d "rubyforth" "/tmp/rubyforth/rubyforth-0.19/" :anchor) # (find-rubyforthfile "") * (eepitch-rubyforth) * (eepitch-kill) * (eepitch-rubyforth) 1 2 + . see nip see r@ see rot : .bool ( f -- ) if ." True!" else ." False!" then ; -1 .bool 0 .bool see .bool defer foo ' words is foo foo ' .s is foo foo prim pwd push(Dir.pwd) : .pwd pwd . ; .pwd \ prim chdir Dir.chdir(pop) \ : cd bl parse chdir ; \ " /usr" chdir \ cd /tmp \ prim (ls) system("ls " + pop) \ : ls 0 parse (ls) ; \ ls -l \ ls -l e* include tools/system.fs system ls ls ls *.rb \ (find-rubyforthfile "") \ (find-rubyforthgrep "grep -nH -e prim *") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd /tmp/rubyforth/rubyforth-0.19/ ./install.sh /tmp/rubyforth/ cd /tmp/rubyforth/ ./rubyforth 1 2 + . include tools/system.fs ##### # # modal and intuitionistic logic in RubyForth # 2008jun21 # ##### # «modal-logic» (to ".modal-logic") # (find-rubybookw3m "tut_containers.html") # (find-rubyforthfile "demos/") # (find-angg "rubyforth/demos/") # (find-angg "rubyforth/demos/modaltv.fs") * (eepitch-ruby) * (eepitch-kill) * (eepitch-ruby) v = ["\\Pyr", 1, 1, 0] w = ["\\Pyr", 0, 1, 1] class Array def mand(w) r = [self[0]]; 1.upto(self.length-1) { |i| r[i] = self[i] * w[i] }; r end def mor(w) r = [self[0]]; 1.upto(self.length-1) { |i| r[i] = [self[i],w[i]].max }; r end end v.mand(w) v.mor(w) ##### # # inspect # 2008jun27 # ##### # «inspect» (to ".inspect") # (find-fline "~/rubyforth/kernel.rb" "def enter_forth") # (find-fline "~/rubyforth/file.rb") # (find-fline "~/rubyforth/primitives.rb") * (eepitch-rubyforth) * (eepitch-kill) * (eepitch-rubyforth) 0 parse foo bar . : ruby: ( -- ) 0 parse ruby-eval ; ruby: print 1+2 ruby: push ["foo", ["bar", "plic"]] dup . ruby: print(pop.inspect) ruby: prim "..", "print(pop.inspect)" ruby: push ["foo", ["bar", "plic"]] .. ruby: prim "[]", "push []" ruby: prim "push", "pop.push(pop)" [] 44 swap push 33 push .. [] .. 44 swap [] 44 . . [] 44 .. .. ##### # # R_stack v.1 (broken) # 2008jun27 # ##### # «R_stack_broken» (to ".R_stack_broken") * (eepitch-rubyforth) * (eepitch-kill) * (eepitch-rubyforth) : ruby: ( -- ) 0 parse ruby-eval ; ruby: def parse_line; push(0); parse; end ruby: def R_stack; $R_stack; end ruby: def R_stack_init; $R_stack = []; end ruby: def R_stack_push; $R_stack.push(pop); end ruby: def R_stack_concat; $R_stack.concat; end ruby: prim "R[", "R_stack_init; R_stack_push(parse_line)" ruby: prim "R:", "R_stack_push(parse_line)" ruby: prim "R]", "print R_stack_concat" R[ foo bar R: plic plic R] ruby: print ["foo", ["bar", "plic"]] ruby: print ["foo", ["bar", "plic"]].to_s ruby: print ["foo", ["bar", "plic"]].inspect + "88" prim: hello print "hello world" ;; (find-rubybookw3m "ref_c_array.html#concat") ;; (find-fline "~/rubyforth/primitives.rb") * (eepitch-ruby) * (eepitch-kill) * (eepitch-ruby) print 1 + 2 ##### # # R_stack # 2008jun27 # ##### # «R_stack» (to ".R_stack") * (eepitch-rubyforth) * (eepitch-kill) * (eepitch-rubyforth) : ruby: ( -- ) 0 parse ruby-eval ; prim .. print(pop.inspect) prim \n push "\n" prim [] push [] prim push pop.push(pop) prim []concat d=pop;s="";pop.each{|t|s = s + d + t};push(s) variable R_stack : R_stack_init ( -- ) [] R_stack ! ; : R_stack_push ( str -- ) R_stack @ push ; : R_stack_concat ( -- str ) R_stack @ \n []concat ; : R[ R_stack_init 0 parse R_stack_push ; : R: 0 parse R_stack_push ; : R] R_stack_concat . ; : R] R_stack_concat ruby-eval ; R[ print 1 + R: 2 R] : prim: parse-word [] 0 parse over push ; : prim> 0 parse over push ; : ;prim \n []concat swap make , does> @ ruby-eval ; prim: .hello prim> print "Hello primitive world!\n" prim> push 10 prim> push 10 prim> puts (pop + pop) ;prim ##### # # ruby-and-prim-blocks # 2008jun28 # ##### # «ruby-and-prim-blocks» (to ".ruby-and-prim-blocks") * (eepitch-rubyforth) * (eepitch-kill) * (eepitch-rubyforth) prim \n push "\n" prim make-prim prim(pop, pop) : ruby: 0 parse ruby-eval ; : R[ 0 parse ; : R: \n + 0 parse + ; : R] ruby-eval ; : P[ parse-word 0 parse ; : P: \n + 0 parse + ; : P] swap make-prim ; R[ print 1 + R: 2 R] \ Marc's syntax: alias R: prim> ##### # # Corrections on the miniforth article # 2008jun30 # ##### # «miniforth-article-corr» (to ".miniforth-article-corr") (code-ps "minifproof" "~/tmp/miniforth-proof.pdf") (code-pdftotext "minifproof" "~/tmp/miniforth-proof.pdf") ;; (find-minifproofpage 1) ;; (find-minifprooftext) words as executed -> words are executed given by `read' -> given by `{\tt read}' only one mode -- `interpret' -> only one mode -- `{\tt interpret}' 5 dup . -- 25 ok -> 5 dup . 25 ok : SQUARE DUP * ; ok : CUBE DUP SQUARE * ; ok 5 CUBE . 125 ok in mode "forth" -> in mode {\tt "forth"} It can be read aloud as this: Define two new words: SQUARE: run DUP, then multiply; CUBE: run DUP, then run SQUARE, then multiply. Now put 5 on the stack, CUBE it, and print the result. [quotes?] where are are -> where we are Propor fonte menor pras listagens grandes 32 lines of code 5 blank lines 13 lines of comments # (find-THLw3m "miniforth-article.html") subj = [=[ %L _F["\n"] = function () end %L _F[""] = function () mode = "stop" end %L _F["[L"] = function () eval(parsebypattern("^(.-)%sL]()")) end [L DS = { n = 0 } push = function (stack, x) stack.n = stack.n + 1; stack[stack.n] = x end pop = function (stack) local x = stack[stack.n]; stack[stack.n] = nil; stack.n = stack.n - 1; return x end _F["5"] = function () push(DS, 5) end _F["DUP"] = function () push(DS, DS[DS.n]) end _F["*"] = function () push(DS, pop(DS) * pop(DS)) end _F["."] = function () io.write(" "..pop(DS)) end L] ]=] -- Now run it. There's no visible output. pos = 1 mode = "interpret" run() -- At this point the dictionary (_F) has eight words. -- ( Program 3b: a first program in miniforth ) After running Program 3b the system is already powerful enough to run simple Forth programs like, for example, 5 DUP * . Note that to `run' that what we need to do is: ##### # # Foerthchen # 2008oct21 # ##### # «foerthchen» (to ".foerthchen") # (find-es "anatocc" "fasm") # http://maschenwerk.de/foerthchen/ # http://maschenwerk.de/dl/foerthchen-current.tgz #* rm -Rv ~/usrc/foerthchen8/ tar -C ~/usrc/ -xvzf \ $S/http/maschenwerk.de/dl/foerthchen-current.tgz cd ~/usrc/foerthchen8/ #* cd ~/usrc/foerthchen8/ rm -v foer.bin foerthchen make FASM=$HOME/usrc/fasm/fasm # foerthchen.asm [12]: # STATIC = 1 # error: reserved word used as symbol. #* * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/usrc/foerthchen8/ ./foerthchen words cr 2 3 + (.) 10 emit : cr 10 emit ; : . (.) cr ; 2 3 + . # (code-c-d "fchen" "~/usrc/foerthchen8/") # (find-fchenfile "") # (find-efunction 'eepitch-latex) (defun eepitch-fchen () (interactive) (ee-eepitch-comint "~/usrc/foerthchen8/" "foerthchen" "foerthchen")) ;; The examples below are broken - ;; comint waits for a prompt, and blocks... * (eepitch-fchen) * (eepitch-kill) * (eepitch-fchen) words 2 3 + (.) 10 emit * (eepitch-fchen) * (eepitch-kill) * (eepitch-fchen) : cr 10 emit ; : . (.) cr ; 2 3 + . words cr ##### # # Factor # 2011nov20 # ##### # «factor» (to ".factor") # (find-es "factor" "factor") # http://en.wikipedia.org/wiki/Factor_(programming_language) # Freenode: #concatenative # http://factorcode.org/ # http://github.com/slavapestov/factor/ # http://concatenative.org/wiki/view/Factor/GIT%20repository # http://concatenative.org/wiki/view/Factor/Building%20Factor * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rfv ~/usrc/factor/ rm -Rfv ~/bigsrc/factor/ cd ~/bigsrc/ tar -C ~/bigsrc/ -xvzf ~/tmp/factor-git.gz git clone git://factorcode.org/git/factor.git # ^ should be "update"... tar -cvzf ~/tmp/factor-git.gz factor/ cd ~/bigsrc/factor/ ./build-support/factor.sh update |& tee obfu # (code-c-d "factor" "~/bigsrc/factor/") # (find-factorfile "") # (find-factorfile "build-support/") # (find-factorfile "build-support/factor.sh") # (find-factorfile "extra/lua/lua.factor") # Core bootstrap completed in 36 minutes and 40 seconds. # Bootstrap completed in 36 minutes and 40 seconds. # Bootstrapping is complete. # Now, you can run Factor: # /home/edrx/bigsrc/factor/factor -i=factor.image * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/bigsrc/factor/ ./factor -i=factor.image ./factor -i=factor.image.fresh # http://re-factor.blogspot.com/ ##### # # Joy # 2011dec17 # ##### # «joy» (to ".joy") # (find-es "joy") ##### # # Dirk Laurie's Stacle # 2019oct05 # ##### # «stacle» (to ".stacle") # https://mail.google.com/mail/ca/u/0/#inbox/FMfcgxvzKkvdWLgQqJPTjHCqrgzSMChM # https://github.com/dlaurie/stacle # http://lua-users.org/lists/lua-l/2020-01/msg00069.html Dirk Laurie passing # https://www.sun.ac.za/english/Lists/news/DispForm.aspx?ID=6628 Dirk Laurie passing * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rfv ~/usrc/stacle/ cd ~/usrc/ git clone https://github.com/dlaurie/stacle cd ~/usrc/stacle/ git branch --list -a git for-each-ref PAGER=cat git log --oneline --graph --all -20 # (find-fline "~/usrc/") # (find-fline "~/usrc/stacle/") # (find-gitk "~/usrc/stacle/") # (code-c-d "stacle" "~/usrc/stacle/") # (find-staclefile "") # file:///home/edrx/usrc/stacle/doc/forthvm.html ##### # # forth-chips # 2019dec08 # ##### # «forth-chips» (to ".forth-chips") # http://www.greenarraychips.com/ ##### # # lbforth # 2019dec08 # ##### # «lbforth» (to ".lbforth") # https://github.com/larsbrinkhoff/lbForth # (find-git-links "https://github.com/larsbrinkhoff/lbForth" "lbforth") # (find-es "lisp" "sbcl") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # rm -Rfv ~/usrc/lbForth/ cd ~/usrc/ git clone https://github.com/larsbrinkhoff/lbForth cd ~/usrc/lbForth/ git branch --list -a git for-each-ref PAGER=cat git log --oneline --graph --all -20 # (find-fline "~/usrc/") # (find-fline "~/usrc/lbForth/") # (find-gitk "~/usrc/lbForth/") # (code-c-d "lbforth" "~/usrc/lbForth/") # (find-lbforthfile "") # (find-lbforthfile "README.md") cd ~/usrc/lbForth/ make |& tee om # Error: # In file included from /usr/include/string.h:25:0, # from targets/c/params.c:1: # /usr/include/features.h:364:25: fatal error: sys/cdefs.h: No such file or directory # # include <sys/cdefs.h> # # (find-sh "locate sys/cdefs.h") ##### # # reforth # 2019dec08 # ##### # «reforth» (to ".reforth") # https://github.com/seanpringle/reforth # (find-git-links "https://github.com/seanpringle/reforth" "reforth") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # rm -Rfv ~/usrc/reforth/ cd ~/usrc/ git clone https://github.com/seanpringle/reforth cd ~/usrc/reforth/ git branch --list -a git for-each-ref PAGER=cat git log --oneline --graph --all -20 # (find-fline "~/usrc/") # (find-fline "~/usrc/reforth/") # (find-gitk "~/usrc/reforth/") # (code-c-d "reforth" "~/usrc/reforth/") # (find-reforthfile "") # (find-reforthfile "README.md") ##### # # SVFIG 16Nov2019 - Forth Day - Fireside Chat (Chuck Moore) # 2019dec27 # ##### # «svfig-2019-chuck» (to ".svfig-2019-chuck") # http://www.youtube.com/watch?v=3ML-pJFa8lY SVFIG 16Nov2019 - Forth Day - Fireside Chat (Chuck) # (find-youtubedl-links "/sda5/videos/" "SVFIG_16Nov2019_-_Forth_Day_-_Fireside_Chat_Chuck" "3ML-pJFa8lY" ".mp4" "{stem}") # (find-youtubedl-links "/sda5/videos/" "SVFIG_16Nov2019_-_Forth_Day_-_Fireside_Chat_Chuck" "3ML-pJFa8lY" ".mp4" "chuckmoore2019") # (code-video "chuckmoore2019video" "/sda5/videos/SVFIG_16Nov2019_-_Forth_Day_-_Fireside_Chat_Chuck-3ML-pJFa8lY.mp4") # (find-chuckmoore2019video) # (find-chuckmoore2019video "0:00") ##### # # strange-loop-2013 # 2020jan08 # ##### # «strange-loop-2013» (to ".strange-loop-2013") # https://kylecordes.com/2013/chuck-moore-strange-loop-2013 <kenrestivo> found a ted talk https://www.youtube.com/watch?v=tb0_V7Tc5MU but not the strange loop one <technomancy> try this https://www.infoq.com/presentations/power-144-chip/ ##### # # forth-dimensions # 2020oct08 # ##### # «forth-dimensions» (to ".forth-dimensions") # http://www.forth.org/fd/contents.html # http://www.forth.org/fd/index.pdf # http://www.forth.org/fd/AuthorSort.pdf # http://www.forth.org/fd/FD-V01N1.pdf # http://www.forth.org/fd/ # (code-pdf-page "fdindex" "$S/http/www.forth.org/fd/index.pdf") # (code-pdf-text "fdindex" "$S/http/www.forth.org/fd/index.pdf") # (find-fdindexpage) # (find-fdindextext) * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) # for v in 01 02 03 04 05 06 07 08 09; do for v in 10 11 12 13 14 15; do for i in 1 2 3 4 5 6; do psne http://www.forth.org/fd/FD-V${v}N${i}.pdf done done ;; Test: (fdim-fname "42" "5") (defun fdim-fname (vol issue) (ee-template0 "$S/http/www.forth.org/fd/FD-V{vol}N{issue}.pdf")) ;; Test: (fdim-code-c-d "42" "5") (defun fdim-code-pdf (vol issue) (let* ((fname (fdim-fname vol issue)) (c (ee-template0 "fdvol{vol}n{issue}")) (codepdfpage (ee-template0 "(code-pdf-page \"{c}\" \"{fname}\")")) (codepdftext (ee-template0 "(code-pdf-text \"{c}\" \"{fname}\")"))) (ee-template0 " {codepdfpage}\n {codepdftext}\n"))) ;; Test: (fdim-finds "42" "5") (defun fdim-finds (vol issue) (let* ((c (ee-template0 "fdvol{vol}n{issue}")) (findpage (ee-template0 "(find-{c}page 1)")) (findtext (ee-template0 "(find-{c}text)"))) (ee-template0 "# {findpage}\n# {findtext}\n"))) (defun fdim-dolist (code) (dolist (vol (ee-split "01 02 03 04 05 06 07 08 09 10 11 12 13 14 15")) (dolist (issue (ee-split "1 2 3 4 5 6")) (eval code)))) (find-eoutput-rerun "o" '(progn (insert "(progn\n") (fdim-dolist '(insert (fdim-code-pdf vol issue))) (insert ")\n"))) (find-eoutput-rerun "o" '(fdim-dolist '(insert (fdim-finds vol issue)))) ##### # # miniforth-and-joy # 2020oct27 # ##### # «miniforth-and-joy» (to ".miniforth-and-joy") # https://news.ycombinator.com/item?id=24452741 Bootstrapping a Forth in 40 lines # \-> https://news.ycombinator.com/item?id=24467719 Same here. I've been down the rabbit hole of Forth and embedded systems for about a month now. I've been learning more and more every night since I got started in it, and it has also consumed entire weekends. It's fascinating. The "hook" for me was seeing things like ifs and loops being written in Forth itself from simpler primitives. I've always been a fan of bootstrapping a general purpose computing environment from a small set of primitives, and Forth lets you do exactly that. > I'm bored of the internet and browsers. I want to have fun with software AND hardware I can 100% relate to that feeling. Discovering Forth has been therapeutic for me in a sense. I spend the day dealing with AWS and Java and logs and metrics for large distributed systems, and that brings me zero joy or motivation. I spend my work days looking forward to my time with Forth in the evening. I think it was CollapseOS that sent me down this rabbit hole :) # RubyForth and MiniForth can be an answer to this: # http://groups.google.com/group/comp.lang.forth/msg/446988d72234f64d # F83 http://www.forth.org/eforth.html # Other links (2007nov21) http://www.falvotech.com/blog/index.php?/archives/200-Forth-Day-Report.html http://home.hccnet.nl/a.w.m.van.der.horst/forthprojects.html http://home.hccnet.nl/a.w.m.van.der.horst/ciforth.html http://www.complang.tuwien.ac.at/papers/ertl02.ps.gz http://groups.csail.mit.edu/medg/people/psz/Licklider.html http://toka.s3.amazonaws.com/toka.html http://www.complang.tuwien.ac.at/forth/objects/opinion.html # Goto: http://groups.google.com/group/comp.lang.forth/msg/d7903e3c8cd09dc4 http://home.earthlink.net/~neilbawd/goto.txt # Neon: http://groups.google.com/group/comp.lang.forth/browse_thread/thread/7b2d8f109b6565c0 http://members.talkamerica.net/douglashoffman@talkamerica.net/neon+.zip # OO primitives: http://groups.google.com/group/comp.lang.forth/browse_thread/thread/f3de672b8a96874a http://www.vpri.org/pdf/tr2006003a_objmod.pdf # FORGET http://groups.google.com/group/comp.lang.forth/browse_thread/thread/bbbfa3092920e257 # System guide to FigForth: http://groups.google.com/group/comp.lang.forth/browse_thread/thread/c8ce13c08897701f http://www.eforth.com.tw/academy-n/library/System%20Guide.htm http://www.forth.org/library/eforth_SOC/eforth_SOC_source/figforth/guide.ZIP http://groups.google.com/group/comp.lang.forth/msg/61d97368dfdbc2f8 http://xkcd.com/644/ http://xkcd.com/645/ http://www.imd.uni-rostock.de/veroeff/ef95.pdf http://www.forth.org/svfig/videos/ http://www.karig.net/os/ http://thinking-forth.sourceforge.net/ http://www.annexia.org/_file/jonesforth.s.txt https://hackaday.com/2017/01/27/forth-the-hackers-language/ https://github.com/kragen/stoneknifeforth https://github.com/anse1/stubforth https://jupiter-ace.co.uk/Forth_general_practical_computing8108.html As you learn Forth, it learns from you https://news.ycombinator.com/item?id=40736174 As you learn Forth, it learns from you (1981) (jupiter-ace.co.uk) # Local Variables: # coding: utf-8-unix # End: