Skip to content

Instantly share code, notes, and snippets.

View puripuri2100's full-sized avatar
🦾

Naoki Kaneko puripuri2100

🦾
View GitHub Profile

Compilation speed: string-same vs strig-explode

  • Measure the time required to compile the document sub.saty and explode.saty.
  • We measure the time 9 times after 3 times of warming up, and average the middle 5 values.

Result

string-sub: 24.000 seconds

string-explode: 24.507 seconds

@puripuri2100
puripuri2100 / public.md
Last active May 9, 2020 02:07
新型コロナウイルスに関連する開成学園の対応まとめ(暫定)

2020/3/9記述

2/27(木)朝に教師から「生徒が感染するのは最悪避けられないが、教師のことは頑張って守る方針に学校は傾いている」という趣旨の発言を得る。

放課後に部長会開催

連絡事項は勧誘会についてのみ。 連絡終了後、春休み中の活動場所の分配を行う。 このとき、「合宿なども行われれ、全て通常通りの活動となる」という条件で分配した。

@puripuri2100
puripuri2100 / make-satysfi.sh
Last active September 5, 2019 12:36 — forked from zr-tex8r/make-satysfi.sh
Make SATySFi
#!/bin/bash
set -eux
apt -y update
apt -y install m4 unzip curl
yes '' | sh <(curl -sL https://raw.githubusercontent.com/ocaml/opam/master/shell/install.sh)
opam init --auto-setup --comp 4.06.0 --disable-sandboxing
eval $(opam env)
@require: list
module SnowmanLog : sig
val log : unit
end = struct
let (^^>) s1 s2 = s1 ^ string-unexplode [10] ^ s2
@puripuri2100
puripuri2100 / test.satyh
Last active May 26, 2019 05:43
小数点以下の桁数を揃える
let show-float-fix fl n =
let string = show-float fl in
let main-fl =
let n = round fl in
let fl-n = float n in
fl -. fl-n
in
let main-string = show-float main-fl in
let st-len = string-length main-string in
let-rec add-zero n =
@puripuri2100
puripuri2100 / nest.satyh
Last active May 26, 2019 05:06
{|a|b|c|}を受け取ったら[[{1};a];[{2};b];[{3};c]] にしてくれる関数
let-mutable it-num <- 0
let add-num-list it-list =
let () = it-num <- 0 in
let add-num it =
let () = it-num <- !it-num + 1 in
(it, !it-num)
in
List.map add-num it-list
@puripuri2100
puripuri2100 / sekaisi.pdf
Last active May 25, 2019 11:50
世界史まとめ(仮)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@puripuri2100
puripuri2100 / todo.md
Last active March 10, 2023 16:08
SATySFiで作るパッケージ
@puripuri2100
puripuri2100 / README.md
Last active May 30, 2020 04:33
Compilation speed: pdfLaTeX vs SATySFi

Compilation speed: pdfLaTeX vs SATySFi

  • Measure the time required to compile the document udhrmain.tex.
  • We measure the time 9 times after 3 times of warming up, and average the middle 5 values.

Result

  • pdfLaTeX: 0.817 seconds
@puripuri2100
puripuri2100 / local.satyh
Last active March 13, 2019 09:53
SATySFiの`\app`の括弧の色を変える
% Author : T.Suwa and puripuri2100
% LICENSE : LGPL v3
@require: math
@require: color
let half-length hgt dpt hgtaxis fontsize =
let minhalflen = fontsize *' 0.5 in
let lenappend = fontsize *' 0.1 in
length-max minhalflen ((length-max (hgt -' hgtaxis) (hgtaxis +' dpt)) +' lenappend)