This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install SATySFi 0.1.0~alpha+2022.09.19 in a new OPAM switch created at the current directory | |
opsm switch create . | |
opam repository add satysfi-external https://github.com/gfngfn/satysfi-external-repo.git | |
opam repository add satyrographos https://github.com/na4zagin3/satyrographos-repo.git | |
opam repository add satyrographos-alpha https://github.com/na4zagin3/satyrographos-repo-alpha.git | |
opam install satysfi.0.1.0~alpha+2022.09.19 | |
// Remove the current switch at the current directory | |
opam switch remove . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
intv = 30; | |
total = 25; | |
rows = 5; | |
translate([80,45,0]) | |
for (i=[0:29]) { | |
idx = i % rows; | |
cyc = (i - idx) / rows; | |
ofs = cyc * total; | |
translate([idx * intv + ((cyc % 2) * intv / 2), ofs, 0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Commands: | |
% $ satyrographos install -a '%fonts' -a '%libraries' | |
% $ satysfi autogen-examples.saty | |
% | |
% Note: | |
% You could use `-system-font-prefix 'system:'` as follows, which probably makes SATySFi fail due to unsupported features. | |
% $ satyrographos install -a '%fonts' -a '%libraries' -system-font-prefix 'system:' | |
@require: stdjabook | |
@require: math |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed abstract class T1 | |
object T1 { | |
case class A(x: Int) extends T1 | |
case class B(x: Double) extends T1 | |
case class C(x: String) extends T1 | |
implicit val ordA: Ordering[A] = (a, b) => a.x compare b.x | |
implicit val ordB: Ordering[B] = (a, b) => a.x compare b.x | |
implicit val ordC: Ordering[C] = (a, b) => a.x compare b.x | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- references: | |
-- The Book of Numbers, J. H. Conway and R. K. Guy, New York: Springer-Verlag, 1996, pp. 15–16. ISBN 0-387-97993-X. | |
import Data.Tuple | |
import Data.List | |
unfoldBase :: (Integral a)=> a -> a -> [a] | |
unfoldBase b = unfoldr (\ x -> if x == 0 then Nothing else Just (swap $ quotRem x b)) | |
onesPlace :: (Integral a)=> a -> [String] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip でインストールした trachet 0.0.7 です。 | |
# 起動時のコマンドラインは | |
# $ trachet -o /dev/pts/27 bash | |
# で、emacs 上でのアラビア語入力のテストを終えた後落ちました。 | |
# 落ちた時の入力はたぶん「 <cr> <esc> : w q <nl> 」で、どこで落ちたかはわかりません。 | |
Traceback (most recent call last): | |
File "/usr/bin/trachet", line 9, in <module> | |
load_entry_point('trachet==0.0.7', 'console_scripts', 'trachet')() |