:root { --sidebar-width-on-desktop: calc(var(--base-font-size) * (266 / 15)); --body-width-on-desktop: 45.75rem; } @media only screen and (min-width: 56.25rem) { #content-wrap { display: flex; position: initial; flex-direction: row; flex-grow: 2; width: calc(100vw - (100vw - 100%)); max-width: inherit; height: auto; min-height: calc(100vh - var(--final-header-height-on-desktop, 10.125rem)); margin: 0 var(--sidebar-width-on-desktop, 13.6rem) 0 calc(var(--sidebar-width-on-desktop, 13.6rem) * -1 / 2); } #main-content { position: initial; width: var(--body-width-on-desktop, 45.75rem); max-width: var(--body-width-on-desktop, 45.75rem); max-height: 100%; margin: 0 auto; padding: 2rem 1rem; } #page-content { max-width: min(90vw, var(--body-width-on-desktop, 45.75rem)); } #side-bar { position: -webkit-sticky; position: sticky; top: 0; left: 0; grid-area: side-bar; width: var(--sidebar-width-on-desktop, 13.6rem) !important; min-width: var(--sidebar-width-on-desktop, 13.6rem) !important; max-height: 100vh; padding-right: 2.5rem; padding-left: 0.5rem; overflow-y: scroll; transition: translate 300ms cubic-bezier(0.4, 0.0, 0.2, 1), background-color 300ms cubic-bezier(0.4, 0.0, 0.2, 1), padding 300ms linear, margin 300ms linear; border: none; border-color: rgba(var(--swatch-tertiary-color, 170, 170, 170), 0.4); background-color: rgba(var(--sidebar-bg-color, 255, 255, 255), 0); translate: calc(var(--sidebar-width-on-desktop, 13.5rem) * -1 - 1rem); direction: rtl; scrollbar-width: thin; -ms-scroll-chaining: none; overscroll-behavior: contain; scrollbar-color: rgba(var(--swatch-primary-darker), 0.1) /* Thumb */ rgba(var(--swatch-tertiary-color), 0.05); /* Track */ } #side-bar::-webkit-scrollbar-track { background-color: rgba(var(--swatch-secondary-color, 244, 244, 244), 0.8); } #side-bar::-webkit-scrollbar, #side-bar::-webkit-scrollbar-thumb, #side-bar::-webkit-scrollbar-corner { width: 0.5rem; border-right-width: calc(100vw + 100vh); border-right-style: inset; border-color: inherit; background-color: rgba(var(--sidebar-bg-color, 255, 255, 255), 0); } #side-bar:is(:hover, :active, :focus-within) { margin-right: 2.25rem; padding-right: 0.25rem; overflow-x: hidden; overflow-y: auto; border-color: rgba(var(--swatch-primary-darker), 1); background-color: rgba(var(--sidebar-bg-color, 255, 255, 255), 1); translate: calc(var(--sidebar-width-on-desktop, 1rem) - var(--sidebar-width-on-desktop, 0)); scrollbar-color: rgba(170, 170, 170, 1) /* Thumb */ rgba(252, 252, 252, 1); /* Track */ scrollbar-color: rgb(var(--swatch-primary-darker, 170, 170, 170), 1) /* Thumb */ rgb(var(--swatch-menubg-color, 252, 252, 252), 1); /* Track */ } #main-content::after { content: " "; display: flex; position: fixed; top: 0; left: 1rem; align-items: center; justify-content: center; width: 1rem; height: 100%; max-height: 100%; transition: left 300ms cubic-bezier(0.4, 0.0, 0.2, 1), background-position 300ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 300ms cubic-bezier(0.4, 0.0, 0.2, 1); background: url("https://scp-wiki.wdfiles.com/local--files/component%3Acollapsible-sidebar/sidebar-tab.svg"); background-attachment: fixed; background-repeat: no-repeat; background-position: center left 1rem; background-size: 1rem 12.875rem; pointer-events: none; } #side-bar:is(:hover, :active, :focus-within) + #main-content::after { left: calc(var(--sidebar-width-on-desktop, 14.5rem) * -1); width: 0rem; transition: left 300ms cubic-bezier(0.4, 0.0, 0.2, 1), background-position 300ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 300ms cubic-bezier(0.4, 0.0, 0.2, 1); opacity: 0; background-position: center left calc(var(--sidebar-width-on-desktop, 14.5rem) * -1); font-size: 0em; } #main-content::before { content: " "; position: absolute; z-index: 9; top: var(--final-header-height-on-desktop, 0); left: 0; width: var(--sidebar-width-on-desktop, 14.5rem); height: calc(100% - var(--final-header-height-on-desktop, 0.688rem) - 2.313rem); margin-bottom: calc(var(--final-header-height-on-desktop, -2.313rem) * -1 - 2.313rem); transition: translate 300ms cubic-bezier(0.4, 0.0, 0.2, 1), opacity 300ms cubic-bezier(0.4, 0.0, 0.2, 1); opacity: 0.5; background-color: rgb(var(--swatch-alternate-color, 0, 0, 0)); pointer-events: none; translate: calc(var(--sidebar-width-on-desktop, 14.5rem) * -1 + 1rem); } #side-bar:is(:hover, :active, :focus-within) + #main-content::before { translate: 0; opacity: 0; } #side-bar .side-block { margin-top: 1em; padding-left: 0.25em; border-right-width: 0rem; border-left-width: 0rem; border-radius: 0; background-color: rgb(0, 0, 0, 0); direction: ltr; } #side-bar .scpnet-interwiki-wrapper { direction: ltr; } /* Print Friendly Formatting by Estrella */ body.print-body { --sidebar-width-on-desktop: 0; } body.print-body #main-content::before, body.print-body #main-content::after { display: none; } }
package yukis_example
// -1.abs ::= (-1).abs
// in rust: -1.abs ::= -(1).abs
mod Std.Ops
pub infixl 3
def && : Bool -> Lazy Bool -> Bool =
| True _ => True
| False v => v ()
pub infixl 3
def || : Bool -> Lazy Bool -> Bool =
| True v => v.force
| False _ => False
pub infixl 3
def and : Bool -> Bool -> Bool =
| True True => True
| _ _ => False
pub infixl 3
def or : Bool -> Bool -> Bool =
| False False => False
| _ _ => True
pub fixl 3
def not : Bool -> Bool =
| True => False
| False => True
if cond
| a +=1
else
| sdd
pub
— outfixes can only be fix 0
def (` `) (l : t) (f : t -> u -> out) (r : u) : out =
f l r
— can be like: 1 `add » mult 3` 2 === mult 3 <| add 1 2
pub trait Coerce a b =
pub implicit
coe : a -> b
pub trait Add l r =
Out : T
pub infixl 2
+ : l -> r -> Out
— desugar to struct with typeclass mark (which means that the item could be instantiated)
pub trait Assign l r =
pub infix 10
:= : (RefMut l) -> r -> () \ St h
pub default
impl : Assign (RefMut t) r =
:= l r = l.write r
pub trait AddAssign l r [Assign l _] [Add l r] =
pub infix 10
+= : (RefMut l) -> r -> () \ St h
/—
desugar to declaration
{anomyous} : [Assign l r] -> [Add l r] -> [Add.Out === l] -> AddAssign l r
{anomyous} = { (+=) l r = l := l + r } : AddAssign
-/
pub default
impl [Add.Out === l] : AddAssign l r =
+= l r = l := l + r
pub impl [Sub l r] [s : Neg r] : Add l r =
Out = s.Out
+ l r = l - neg r — (Sub l r).(-) & s.neg
end — Std.Ops
mod Std.Primitives
// bottom type _|_ with no constructor
pub type Void
// unit type with sole constructor
pub type Unit =
| ()
// natural number that guarantees optimization
pub type Nat =
| Z
| S Nat
// gADT syntax : decl the exact type of the datatype
pub type List : T -> T =
| Nil : List a
| Cons : a -> List a -> List a
pub def [] = List.Nil
pub def +> = List.Cons
pub impl : Nat =
plus | l Z => l
| l (S r) => S <| l `plus` r
minus | l Z => l
| Z v@(S r) => panic f(args "a Nat cannot be negative `-{}`" [v.into Int])
| (S l) (S r) => S <| l `minus` r
pub type Lazy t =
| ({ }) t
pub type Thunk t =
| Mk (RefMut ThunkExt(t))
pub impl : Thunk t =
new : Lazy t -> Thunk t
new v = Thunk.Mk (^! Mk(v))
type ThunkExt t =
| Mk (Lazy t)
| Store t
pub impl : Coerce t (Thunk t) =
#[lang param_passed_lazily]
coe (#lazy v) = new v
pub impl : Coerce (Thunk t) t =
coe Mk fv@(RefMut v) =
match v
| Mk f =>
let v = f.coe
fv := Store v
v
| Store v => v
pub impl : Coerce t (Lazy t) =
#[lang param_passed_lazily]
coe (#lazy v) = { v }
pub impl : Coerce (Lazy t) t =
coe { v } = v
#[lang variable_ref]
pub type Ref t : Type =
| ^ t : Ref t
pub impl : Coerce (Ref t) t =
coe (^ v) = v
pub impl [Coerce (Ref t) t] : Ref t =
pub (!) = coe
#lang variable_refmut
pub type Mut t =
| ^! t : Mut t
pub impl : Coerce (Mut t) t
coe (^! v) = v
pub impl [Coerce (Mut t) t] : Mut t =
pub
! = coe
pub
write : Mut t -> () \ St h
write = /- compiler builtin -/
#[lang listlike] — enable syntactic sugar like [a, b, c]
#[lang flat_matched]
pub type List t =
| Nil
| (::) t (List t)
#[lang flat_matched] — enable syntactic sugar like (_*, a, b) (a, _*@body, rest)
pub type (&) t u =
| (,) t u
infixr 0 (,)
trait Tuples t =
L : T ; R : T
left : t -> L
right : t -> R
pub default
impl : Tuples t =
left self = self
right self = self
pub impl : Tuples Pair t u =
left (l, _) = l
right (_, r) = r
pub impl : Pair t u =
at : [s : Tuples a] -> a
-> ('m = 0) -> (m s : Idx)
-> match m
| Z => s.L
| S n => at (s.R) n
at | self Z => self.left
| self (S n) => (self.right) `at` n
— for Arr, the heterogeneous loop could be optimized into offset calculations
pub type Arr t n =
| ([ ]) (t |* n)
pub infixl 1
(|*) : t -> n -> T
(|*) | t Z => t
| t (S Z) => t , t
| t (S n) => t , t |* n
pub struct Rc t =
| New — defaulted priv
count : Nat
pub value : t
/- desugar to:
- pub type Rc t
- | New : Priv (count : Nat, value : t)
- type Priv t | Mk : t
- pub impl : Rc t
- count : Self -> Nat
- count (New (Mk value), _) = value
- pub
- value : Self -> t
- value (New (Mk _), value) = value
-/
end
mod Std.Algorithm
pub
quick_sort : Vec a -> (a -> a -> Bool) -> (Idx & Idx) -> Vec a
quick_sort list (pred = (<=)) ((l = 1, r = list.len)as range) = match list
| [] => []
| [x] => [x]
| x +> xs =>
let lo, hi = partition xs [] []
qsort lo ++ [x] ++ qsort hi
partition : Vec t -> Vec t -> Vec t -> (Vec t & Vec t)
partition xs lo hi
| [] _ _ => reverse lo, reverse hi
| y +> ys _ _ =>
if pred y x
(partition ys (y+>lo) hi) — implicitly coe to Lazy
else {
partition ys lo (y+>hi)
}
qsort : Vec a -> (a -> a -> Bool) -> (Idx & Idx) -> Vec a
qsort list (pred = (<=)) ((l = 0, r = list.len)as range) =
let i = ^!l
let j = ^!r
let pivot = list.at [l]
todo!()
end — Std.algorithm
mod Std.Controls
pub
if : Bool -> (() -> t \ e) -> Option t \ e
if | True body => Some <| run body
| False _ => None
pub infixl 10
(else) : Option t -> (() -> t \ e) -> t \ e
(else) | None body => run body
| (Some v) _ => v
pub infixl 10
(elif) : Option t -> Lazy Bool -> (() -> t \ e) -> Option t \ e
(elif) | (Some v) _ _ => Some v
| None cond body => if cond body
pub
while : Lazy Bool -> (() -> t \ e) -> Option t \ e
while | True body => let v = body()
with Break
| break | Some v => Option v
| None => None
with None
| False _ => None
pub
pub
run : (() -> t) -> t
run f = f()
pub
region : 'Lt -> ('Lt -> () -> t) -> t
region 'lt f = run f 'lt
end — Std.controls
mod Std.Effect.DefaultHandlers
hnd : Console — : \ Console -> \ IO
Write v = Std.Intrinsic.Io.Console.write v
Read line = Std.Intrinsic.Io.Console.read line
hnd : Growing — stack growing, defaulted tco
@ f = resume f()
— syntactic sugar: when f followed by parens closely, f's priority is lifted
end
mod MyProject
— TODO open type — extensible datatype
— sub-effect: ?Throw allows <> and < Throw | e >
type Ab extends Cd
| A
…
match x
| _, _, _, _, last => todo
| head, body@_*, last => todo
| Http.Head, rest => todo
eff Example =
| Ask : String -> String
— desugar :
— ask_effect : String -> (a : String) & (continuation : String -> ()) \ Example
h = Example
— desugar :
— h = {…} : Example
| Ask a = "answering: " ++ a
— desugar :
— ask_handler : (a : String) & (continuation : String -> ()) \ Example -> ()
f = Ask()
run f() with h
— equivalent to `handler` in Koka and `(run …)with` in Flix
infixl 0
with : (() -> ? \ e) -> (? \ e -> ()) -> ? ()
with f hnd = hnd f
use Std.Time.LocalDateTime
param '(a : T) '(b : T) (c : a -> b -> t) (Named = c)
f : Named -> d
f c = …
g : d
g 'a 'b c = …
— CanBeUnnamed
eff HourOfDay =
GetCurrentHr : () -> Int32
greeting : () -> String \ HourOfDay
greeting () =
let h = HourOfDay.GetCurrentHr()
if (h <= 12)
"Good morning"
elif (h <= 18)
"Good afternoon"
else
"Good evening"
main : Unit \ IO
main =
run
println « greeting ()
handler = HourOfDay ::
— anonymous instance like "impl :", but for instance,
— inner shadows outer, like how handlers work
GetCurrentHr _ resume =
let dt = run LocalDateTime.now
resume dt.getHour
— since they are only instances "capturing the environment of outer scope"
— we can `return` instead of `resume`
— `run` to isolate scopes (or region)
— or:
let handle = hnd named : — anonymous instance & inferred type
GetCurrentHour _ resume =
let dt = LocalDateTime.now()
resume dt.getHour
let result <- println greeting()
ret result
— when indented, `in` keyword can be eliminated
— or:
println greeting ()
handler = HourOfDay.GetCurrentHr _ resume =
let dt = run LocalDateTime.now
resume dt.getHour
end — my_project
尽日The COUNTOVER
世界の再構築を行う機械の作成
你好:给我整不会了
可见上方行间距可随line-height变化
-
- _
test
-
- _
« SCP-CN-xxxx | SCP-CN-XXXX | SCP-CN-xxxx »
仅限相关站点内人员读取
禁止未经授权的访问
确认 CN-4+/XXXX 级安保权限
本文件剩余部分只限于监督者议会书面批准后公开,违者处死。
所有迭代之上相同的部分
第1迭代的文本
第2迭代的链接
在此添加模块以增加更多迭代
所有迭代之下相同的部分
ssss:打不
空气是死的,人是活的。人吸进了太多空气,就不得不固化,也会死去。
他问:“你是这么想的吗?”我摇头,然后点头,哭了一阵后把头放回地上。
这一切必须从那场新年的雪说起,四周笼罩着回忆一般的迷雾,正好是叙述的氛围。
其实那不是真的。我承认那并不是真的,所以我才要说。那又有什么用呢,你应该——他反悔了,转移话头,说,还不如去找个树洞。我同意,往衬有潮湿泥土的浅坑里又倒了一壶水,想着能否让里面的足球浮上来。我只是不想委屈他。我不踢足球。是你在说话吗。没有区别?什么叫做没有区别?为什么?只想要,只想要,现在……不,我回来就是为了——放屁!冰开始沸腾,而水正在升华。很满意这段插曲,暗示了后面的汹涌。够了!然后我意识到一切都有点过分,不只有他们,还有他和我。雾气笼罩。你先停停吧。没那么着急,你这样和加了感叹号没什么两样。他抹去脸颊上的泪水,仍是眼眶湿润地把我抱起,我不敢依偎,也没法依偎。让故事继续吧,一切就都会值得。还是他在说话。算了,他是对的。
勉强请你先回到那个冬天,当大雪给中国盖上了医师的白大褂,血罂粟在死亡下展开。不想太麻烦,但我不怕突然,不知是否你也如此。但总之,时间还在继续流动,在外部。穿着羽绒服的蓝色小孩闯进了雪里,鹅毛那一片片半空中兜兜转转,似乎永远也不会落下来,那是硫酸,二氧化硫晶体和过去许多年沉淀的悲鸣。他就那样融化,皮肉稀烂剥离,溺死在凝固的梦里。景物是抽象的形状,省略得不远不近。终于如愿以偿,在此层的尾。
所以我们失去了海。他点了点头,毫不费力1。还有更多,我补充道。
你回去吧,你在听吗?不,我回来就是为了——你听过吗?
好吧,既然连我自己也不能同情自己,也就不奢求更多了。过冷二氧化硫。
另一个你会问,那不是过去的事吗?
下雪的部分改自我大约十岁时候写的一篇文章,把 800 字删到了大概 200 字吧,那时确实正在过年。
其实部分写的有点离题。在我不解释的情况下大概是看不懂什么的吧(土下座)。
时钟往回拨二十年,那时我还不知道有她存在,她第二次决定去死。
她说要死得干干净净的,真狠。
是用很多个点子拼凑而成的,不知道衔接的痕迹有没有暴露出来。感觉氛围没把握好。在叙事线上是上一篇的前传,时间线上发生在上一篇之后。







