Warning: this is an htmlized version!
The original is here, and the conversion rules are here. |
####### # # E-scripts on plzoo. # # 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/plzoo.e> # or at <http://angg.twu.net/e/plzoo.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/>. # ####### # «.plzoo-git» (to "plzoo-git") # «.calc-byte» (to "calc-byte") # «.example.levy» (to "example.levy") # (find-esgrep "grep --color -nH --null -e levy *.e") # (find-es "ml" "levy") # (find-es "ml" "levy-2017") # (find-es "ocaml" "plzoo-git") apti ocamlbuild ##### # # plzoo-git # 2020feb08 # ##### # «plzoo-git» (to ".plzoo-git") # (find-es "ocaml" "plzoo-git") # https://github.com/andrejbauer/plzoo * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) rm -Rfv ~/usrc/plzoo/ cd ~/usrc/ git clone https://github.com/andrejbauer/plzoo cd ~/usrc/plzoo/ export PAGER=cat git branch --list -a git for-each-ref git log --oneline --graph --all -20 make |& tee om make calc |& tee omcalc make all |& tee om ##### # # Compile calc with the byte-compiler # 2022mar18 # ##### # «calc-byte» (to ".calc-byte") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/usrc/plzoo/ git clean -dfx git reset --hard make |& tee om make BUILD=byte calc |& tee omcalc # (find-plzoofile "") # (find-plzoofile "Makefile") # (find-plzoofile "omcalc") # (find-plzoofile "omcalc" "ocamllex") # (find-plzoofile "src/") # (find-plzoofile "src/calc/") # (find-plzoofile "_build/") # (find-plzoofile "_build/src/") # (find-plzoofile "_build/src/calc/" "calc.byte") # (find-plzoofile "_build/src/calc/lexer.ml") # (find-fline "~/usrc/") # (find-fline "~/usrc/plzoo/") # (find-gitk "~/usrc/plzoo/") # (code-c-d "plzoo" "~/usrc/plzoo/") # (find-plzoofile "") # (find-plzoofile "Makefile") # (find-plzoofile "src/") # (find-plzoofile "src/lambda/") # (find-plzoofile "src/levy/") # (find-plzoofile "src/levy/example.levy") # (find-plzoofile "omcalc") # (find-es "ocaml" "ocamllex") ##### # # example.levy # 2020feb08 # ##### # «example.levy» (to ".example.levy") # (find-plzoofile "src/levy/") # (find-plzoofile "src/levy/example.levy") * (eepitch-shell) * (eepitch-kill) * (eepitch-shell) cd ~/usrc/plzoo/src/levy/ ~/usrc/plzoo/levy.native example.levy ~/usrc/plzoo/levy.native return (2 + 2) return (2 * 3) return (2 - 4) if 5 < 3 then return 1 else return 5 if 2 = 2 then return 1 else return 5 fun n : int => return (n + 3) fun n : int => if n < 0 then return (0 - n) else return n rec f : int -> F int is fun n : int => if n = 0 then return 1 else (do m <- (force f) (n - 1) in return (n * m)) return 42 let x = thunk (if 3 < 5 then return 1 else return 2) force (thunk (if 3 < 5 then return 1 else return 2)) let x = 3 + 5 in return (x * x) do x <- return (3 + 5) in return (x * x) let a = 5 let b = 10 + a let c = thunk (return b) let fact = thunk (rec f : int -> F int is fun k : int => if k = 0 then return 1 else (do m <- (force f) (k - 1) in return (k * m))) (force fact) 7 # Local Variables: # coding: utf-8-unix # End: