flowchart TB;
saty[.saty file]
md[.md file]
saty == parse ==> utast[untyped AST]
md == decode markdown ==> utast
subgraph frontend
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
(* | |
inspired by | |
- Flexiblly Extend Nested Structures - "Trees that Grow" in TypeScript | |
https://dev.to/igrep/flexiblly-extend-nested-structures-trees-that-grow-in-typescript-4347 | |
- 入れ子構造を自由に拡張する – TypeScript版「Trees that Grow」 (Japanese translation of above article) | |
https://eng-blog.iij.ad.jp/archives/18900 | |
*) | |
type 'a literal = [`Literal of int * 'lit] | |
constraint 'a = <literal: 'lit; ..> |
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
module type Reader = sig | |
type t | |
type stream | |
type elem | |
val make : stream -> t | |
val read : t -> (elem * t) option | |
end | |
module Option_syntax = struct | |
let (let*) = Option.bind |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(** | |
An OCaml implementation of a call-by-value abstract machine for lambda-calculus + | |
control, shift, control0, shift0, and prompt. | |
based on "A dynamic continuation-passing style for dynamic delimited continuations" | |
https://dl.acm.org/doi/10.1145/2794078 | |
*) | |
type variable = string | |
type term = | |
| Var of variable |
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
# visualize "Is this the simplest (and most surprising) sorting algorithm ever?" https://arxiv.org/abs/2110.01111 | |
require 'curses' | |
def show_array(i, j, arr) | |
Curses.clear | |
Curses.setpos(i, 0) | |
Curses.addstr('i') | |
Curses.setpos(j, 1) | |
Curses.addstr('j') | |
arr.each_with_index do |x, idx| |
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
;;; AST | |
(define-class <expr> () | |
()) | |
(define-class <int-expr> (<expr>) | |
((value :init-keyword :value))) | |
(define-class <binop-expr> (<expr>) | |
()) |
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
{ | |
"type": "cons", | |
"head": 1, | |
"tail": { | |
"type": "cons", | |
"head": 42, | |
"tail": { | |
"type": "nil" | |
} | |
} |
-
viはPOSIX BRE +
\<
,\>
,~
-
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_58
-
ただし
\{
,\}
はSUSv2 (1997) 以降? -
4.4BSD (1994) のviには
\{
,\}
は含まれないようである -
nviは
\{
,\}
を実装していない
-
NewerOlder