Skip to content

Instantly share code, notes, and snippets.

View vain0x's full-sized avatar
🐧
safe and sound, well-typed

vain0x vain0x

🐧
safe and sound, well-typed
View GitHub Profile
@vain0x
vain0x / Layout.elm
Created April 15, 2024 11:53 — forked from pchiusano/Layout.elm
Annotated layout trees
module Elmz.Layout where
import List
import Array (Array)
import Either(..)
import Graphics.Element as E
import Graphics.Element (Direction, Element, Position)
type Pt = { x : Int, y: Int }
@vain0x
vain0x / Main.hs
Created December 12, 2022 17:06 — forked from aradarbel10/Main.hs
A minimalistic example of bidirectional type checking for system F
{-# LANGUAGE StrictData, DerivingVia, OverloadedRecordDot #-}
{-
(compiled with GHC 9.4.2)
-}
{-
HEADS UP
this is an example implementation of a non-trivial type system using bidirectional type checking.
it is...
@vain0x
vain0x / LICENSE.md
Last active November 4, 2022 23:38 — forked from DanielSWolf/Program.cs
Console progress bar (for VB.NET)
// limit, limitf のテスト
#include "hspmath.as"
#include "hspda.as"
randomize
rndf_ini
assert limit(0x7FFFFFFF, 0, ) == 0x7FFFFFFF
assert limit(0x80000000, , 0) == 0x80000000
@vain0x
vain0x / LICENSE.txt
Last active December 16, 2015 16:10
Mery用diff構文定義ファイル
パブリックドメイン
@vain0x
vain0x / bm_array_extending.hsp
Last active March 23, 2016 11:12
配列拡張の速度のベンチマーク
// 配列の自動拡張の計測
// @require "benchmark.hsp" <https://gist.github.com/vain0/5aeda019eb11835987f4>
#define global total_size (50000)
#define global cnt_trial (5)
logmes "生成する配列の長さ = " + total_size
logmes "各テストの試行回数 = " + cnt_trial
assert cnt_trial >= 3
@vain0x
vain0x / benchmark.hsp
Created November 30, 2015 16:43
簡易ベンチマークモジュール (HSP3)
// ベンチマーク用モジュール
/*
// デバッグ用コードを除去
#undef _debug
#undef assert
#define global assert(%1) :
#undef logmes
#define global logmes(%1) :
//*/
@vain0x
vain0x / !_Codetter.md
Last active November 14, 2015 17:52
codetter にあげたもののまとめ

codetter にあげたもののまとめ

http://codetter.com/?tag=ue_dai

  • ペア比較マクロ
  • サブルーチン迷路
  • 単独実行モジュール
  • 文字列リテラルへのポインタを得るコマンド
  • 特定のマスを特定の歩数目で踏んで迷路を抜けるパズル
  • [Prolog]十字型にライトをスイッチしてすべてのライトを点けるパズル
  • [Prolog]魔法陣 (入る値が与えられている場合)
@vain0x
vain0x / dict_math_signs.txt
Last active October 19, 2023 17:21
数学記号辞書
|| ∨ 記号 (代替表記)
&& ∧ 記号 (代替表記)
! ¬ 記号 (代替表記)
|ー ├ 記号 (略記)
|= ⊨ 記号 (略記)
<: ⊂ 記号 (一般的でない代替表記)
<:= ⊆ 記号 (一般的でない代替表記)
:> ⊃ 記号 (一般的でない代替表記)
:>= ⊇ 記号 (一般的でない代替表記)
:: ∈ 記号 (一般的でない代替表記)