Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>phasetr sample</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- KaTeX -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.css" integrity="sha384-Xi8rHCmBmhbuyyhbI88391ZKP2dmfnOl4rT9ZfRI7mLTdk1wblIUnrIq35nqwEvC" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/katex.min.js" integrity="sha384-X/XCfMm41VSsqRNQgDerQczD69XqmjOOOwYQvr/uuC+j4OPoNhVgjdGFwhvN02Ja" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.0/dist/contrib/auto-render.min.js" integrity="sha384-+XBljXPPiv+OzfbB3cVmLHf4hdUFHlWNZN5spNQ7rmHTXpd7WvJum6fIACpNNfIR" crossorigin="anonymous"
@phasetr
phasetr / gist:2ee21423608012f33179578ee4b1bf0c
Created April 10, 2022 06:45
MacでのFSACエラー:何故`have 'arm64', need 'x86_64'`と言われるのか
Process fsac stderr finished
Failed to load /usr/local/share/dotnet/host/fxr/6.0.3/libhostfxr.dylib, error: dlopen(/usr/local/share/dotnet/host/fxr/6.0.3/libhostfxr.dylib, 0x0001): tried: '/usr/local/share/dotnet/host/fxr/6.0.3/libhostfxr.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libhostfxr.dylib' (no such file), '/usr/lib/libhostfxr.dylib' (no such file)
The library libhostfxr.dylib was found, but loading it from /usr/local/share/dotnet/host/fxr/6.0.3/libhostfxr.dylib failed
- Installing .NET prerequisites might help resolve this problem.
https://go.microsoft.com/fwlink/?linkid=2063366
@phasetr
phasetr / P651-what-is-just.scm
Last active October 11, 2021 00:13
素数夜曲P.651で突如出てきた `just?` は何者?
;;; P.648
(define (collatz n)
(cond ((= n 1) '(1))
((even? n) (cons n (collatz (/ n 2))))
(else (cons n (collatz (+ (* 3 n) 1))))))
;;; P.650
(define (peak n)
(map (lambda (i) (apply max (collatz i)))
(iota 1 n)))
@phasetr
phasetr / 2021-09-01_stat.ipynb
Created September 1, 2021 13:00
勉強会で作った内容
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@phasetr
phasetr / 2021-08-13-computation-for-ergodicity.tmp.ipynb
Created August 13, 2021 06:59
2021-08-13-computation-for-ergodicity
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\RequirePackage{plautopatch}
\documentclass[uplatex,dvipdfmx,a5paper]{jsarticle}
\usepackage{hyperref}
\usepackage{pxjahyper}
\usepackage{cite}
\usepackage{xcolor}
\hypersetup{
% 枠に色はつかないがリンクの文字列には色がつく
colorlinks=true,
struct Point
x::Int
y::Int
end
mutable struct Point{T}
x::T
y::T
end
println(Point{Int} <: Point) # true
println(Point{Int} <: Point{Number}) # false
@phasetr
phasetr / p2.fsx
Created August 28, 2020 15:38
Project Euler 2 by F#
// # Even Fibonacci numbers
// - [URL](https://projecteuler.net/problem=2)
// ## Problem 2
// Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
// > 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
// By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
//
// フィボナッチ数列の新しい項はその前の二項の和として得られる。
// フィボナッチ数列の値が 400 万を超える前の偶数の値を取る項の和を調べよ。
#nowarn "40"
@phasetr
phasetr / tex-memo.md
Last active August 25, 2020 15:52
大規模TeXのコンパイルを通す

大規模TeXのコンパイルを通す

このドキュメントのメモ

  • あとでブログに移すが、とりあえずやったことを気軽にメモしつつ、公開であわよくば識者からのコメントを頂く。
  • 前も別PCで同じエラーが出てちょっと対処したがもうほとんど何も覚えていないから、とりあえず記録を取って再発時または PC 交換時の再設定用に役立てる。
  • 規模感
    • texファイル: 8MB 程度
    • PDF:およそ 7000 ページで 23MB
    • label:3500 個程度で ref もそれなりにたくさんしている。
  • ファイル編集環境(念のため)