This file contains hidden or 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
| 責任を負うものについて、話したことがありましたね。 | |
| 先生は、シッテムの箱のシステム管理者であるA.R.O.N.Aさんから | |
| 次の3点について講習を受けませんでしたか? | |
| #1) 他人のプライバシーを尊重すること。 | |
| #2) タイプする前に考えること。 | |
| #3) 大きな力には大いなる責任が伴うこと。 | |
| ?「にははは……!大きな力だあ……!え?大いなる責任?なんですかそれ?」 |
This file contains hidden or 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
| #[derive(Debug, Clone)] | |
| enum Expr { | |
| Int(u32), | |
| Succ, | |
| Apply(Box<Expr>, Box<Expr>), | |
| Comp(Box<Expr>, Box<Expr>), | |
| Times(Box<Expr>, Box<Expr>), | |
| } | |
| enum ExprRes { |
This file contains hidden or 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
| //! Execution result: | |
| //! ``` | |
| //! running 2 tests | |
| //! test bench1 ... bench: 0.31 ns/iter (+/- 0.00) | |
| //! test bench2 ... bench: 0.34 ns/iter (+/- 0.09) | |
| //! ``` | |
| #![feature(test)] | |
| extern crate test; |
This file contains hidden or 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
| -- Original: https://zenn.dev/kirimin/articles/3abcada2b1646f by kirimin https://github.com/kirimin | |
| -- convention of voice/text file: "num_character_content" + ".wav" or ".txt" | |
| -- Replace configs here | |
| local TEXT_DIR = "/Users/mikuroxina/Documents/Projects/Scripts/pencil-puzzles/05/voices/" -- folder contains txt and wav | |
| local AUDIO_TRACK = 2 -- number of audio track placed character voices | |
| local CHARACTERS = { "中国うさぎ" } -- names of character, used in file name | |
| -- -------------------------------------------------- |
This file contains hidden or 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
| use std::marker::PhantomData; | |
| #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] | |
| pub enum Z {} | |
| #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] | |
| pub struct S<Z>(PhantomData<Z>); | |
| /// `Int<M, N>` represents an integer `M - N`. | |
| #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] | |
| pub struct Int<M, N>(i64, PhantomData<(M, N)>); |
This file contains hidden or 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
| /// Finds the ceiling value of square root of `n`. | |
| pub fn ceil_sqrt(n: i64) -> i64 { | |
| let mut base = (n as f64).sqrt() as i64 - 1; | |
| while (base + 1) * (base + 1) <= n { | |
| base += 1; | |
| } | |
| base | |
| } |
This file contains hidden or 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
| {-# LANGUAGE LambdaCase #-} | |
| {-# OPTIONS_GHC -Wno-name-shadowing #-} | |
| module Lib ( | |
| (+++), | |
| chainL, | |
| chainR, | |
| char, | |
| delimited, | |
| integer, |
This file contains hidden or 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
| import Control.Monad.State.Lazy | |
| import Data.Map.Strict qualified as Map | |
| import Data.Maybe | |
| -- Operator token in AST | |
| data Op = Plus | Minus | And | Or deriving (Show) | |
| -- Variable name in AST | |
| newtype VarName = VarName String deriving (Show, Ord, Eq) |
This file contains hidden or 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
| export type SizedArray<N extends number, T> = SizedArrayInner<N, T, []>; | |
| type SizedArrayInner< | |
| N extends number, | |
| T, | |
| Acc extends unknown[], | |
| > = N extends PositiveInteger<N> | |
| ? number extends N | |
| ? T[] | |
| : N extends Acc["length"] |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "html" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| "strings" | |
| "time" |
NewerOlder