docs: some initial groundwork #2
2 changed files with 75 additions and 71 deletions
|
@ -2,76 +2,9 @@
|
||||||
#import "graphics.typ"
|
#import "graphics.typ"
|
||||||
#import graphics: arrow
|
#import graphics: arrow
|
||||||
|
|
||||||
#show: conf.with(title: [iOwO design], subtitle: [don't worry, we're just dreaming])
|
#show: conf.with(
|
||||||
|
title: [iOwO design],
|
||||||
// highlight important terms in bold
|
subtitle: [don't worry, we're just dreaming],
|
||||||
#let expand(it) = {
|
|
||||||
("("
|
|
||||||
+ upper(it.first())
|
|
||||||
+ "|"
|
|
||||||
+ it.first()
|
|
||||||
+ ")"
|
|
||||||
+ it.clusters().slice(1).join()
|
|
||||||
+ "s?")
|
|
||||||
}
|
|
||||||
#let singlify(it) = {
|
|
||||||
it = lower(it)
|
|
||||||
if it.ends-with("s") {
|
|
||||||
it = it.slice(0, -1)
|
|
||||||
}
|
|
||||||
it
|
|
||||||
}
|
|
||||||
#let terminate-recursion(it) = {
|
|
||||||
let clusters = it.text.clusters()
|
|
||||||
clusters.insert(1, "\u{FEFF}")
|
|
||||||
clusters.join()
|
|
||||||
}
|
|
||||||
// even though it looks like this could be automated with a `query`,
|
|
||||||
// this'd require wrapping the whole document in a show rule
|
|
||||||
// at which point `query` doesn't find anything anymore
|
|
||||||
#let terms = (
|
|
||||||
"source",
|
|
||||||
"AST",
|
|
||||||
"graph IR",
|
|
||||||
"runtime",
|
|
||||||
|
|
||||||
"optimizer",
|
|
||||||
"scheduler",
|
|
||||||
"VM",
|
|
||||||
|
|
||||||
"command",
|
|
||||||
"pipeline",
|
|
||||||
"input", "argument", "consumer",
|
|
||||||
"output", "streamer",
|
|
||||||
"modifier",
|
|
||||||
)
|
|
||||||
#let terms-trigger = regex(terms.map(expand).join("|"))
|
|
||||||
#show raw: it => {
|
|
||||||
// avoid making terms in codeblocks bold
|
|
||||||
show terms-trigger: terminate-recursion
|
|
||||||
it
|
|
||||||
}
|
|
||||||
#show terms-trigger: strong
|
|
||||||
|
|
||||||
// color codeblocks
|
|
||||||
// haskell hl seems to work ok for this
|
|
||||||
#show raw.where(lang: "iowo", block: true): it => {
|
|
||||||
raw(it.text, lang: "haskell", block: true)
|
|
||||||
}
|
|
||||||
|
|
||||||
// actual content lol
|
|
||||||
|
|
||||||
#outline(
|
|
||||||
indent: auto,
|
|
||||||
fill: line(
|
|
||||||
length: 100%,
|
|
||||||
stroke: (
|
|
||||||
cap: "round",
|
|
||||||
join: "round",
|
|
||||||
thickness: 0.5pt,
|
|
||||||
paint: luma(75%),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
= Type data model
|
= Type data model
|
||||||
multisamplednight marked this conversation as resolved
Outdated
|
|||||||
|
@ -107,7 +40,7 @@ However, this also makes the architecture somewhat more complicated. So here we
|
||||||
open base.png >|
|
open base.png >|
|
||||||
open stencil.png >|
|
open stencil.png >|
|
||||||
mask
|
mask
|
||||||
|> show12
|
|> show
|
||||||
|> (invert | show)
|
|> (invert | show)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,49 @@
|
||||||
heading: (font: "Montserrat", weight: "regular"),
|
heading: (font: "Montserrat", weight: "regular"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#let expand(it) = {
|
||||||
|
("("
|
||||||
|
+ upper(it.first())
|
||||||
|
+ "|"
|
||||||
|
+ it.first()
|
||||||
|
+ ")"
|
||||||
|
+ it.clusters().slice(1).join()
|
||||||
|
+ "s?")
|
||||||
|
}
|
||||||
|
#let singlify(it) = {
|
||||||
|
it = lower(it)
|
||||||
|
if it.ends-with("s") {
|
||||||
|
it = it.slice(0, -1)
|
||||||
|
}
|
||||||
|
it
|
||||||
|
}
|
||||||
|
#let terminate-recursion(it) = {
|
||||||
|
let clusters = it.text.clusters()
|
||||||
|
clusters.insert(1, "\u{FEFF}")
|
||||||
|
clusters.join()
|
||||||
|
}
|
||||||
|
// even though it looks like this could be automated with a `query`,
|
||||||
|
// this'd require wrapping the whole document in a show rule
|
||||||
|
// at which point `query` doesn't find anything anymore
|
||||||
|
#let terms = (
|
||||||
|
"source",
|
||||||
|
"AST",
|
||||||
|
"graph IR",
|
||||||
|
"runtime",
|
||||||
|
|
||||||
|
"optimizer",
|
||||||
|
"scheduler",
|
||||||
|
"VM",
|
||||||
|
|
||||||
|
"command",
|
||||||
|
"pipeline",
|
||||||
|
"input", "argument", "consumer",
|
||||||
|
"output", "streamer",
|
||||||
|
"modifier",
|
||||||
|
)
|
||||||
|
// yes, the shadowing is intentional
|
||||||
|
#let terms = regex(terms.map(expand).join("|"))
|
||||||
|
|
||||||
#let conf(
|
#let conf(
|
||||||
title: none,
|
title: none,
|
||||||
subtitle: none,
|
subtitle: none,
|
||||||
|
@ -44,6 +87,20 @@
|
||||||
radius: 0.25em,
|
radius: 0.25em,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// highlight important terms in bold
|
||||||
|
show raw: it => {
|
||||||
|
// avoid making terms in codeblocks bold
|
||||||
|
show terms: terminate-recursion
|
||||||
|
it
|
||||||
|
}
|
||||||
|
show terms: strong
|
||||||
|
|
||||||
|
// color codeblocks
|
||||||
|
// haskell hl seems to work ok for this
|
||||||
|
show raw.where(lang: "iowo", block: true): it => {
|
||||||
|
raw(it.text, lang: "haskell", block: true)
|
||||||
|
}
|
||||||
|
|
||||||
// document title
|
// document title
|
||||||
if title != none {
|
if title != none {
|
||||||
align(
|
align(
|
||||||
|
@ -56,6 +113,20 @@
|
||||||
v(0.25cm)
|
v(0.25cm)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// outline and other prelude info
|
||||||
|
outline(
|
||||||
|
indent: auto,
|
||||||
|
fill: line(
|
||||||
|
length: 100%,
|
||||||
|
stroke: (
|
||||||
|
cap: "round",
|
||||||
|
join: "round",
|
||||||
|
thickness: 0.5pt,
|
||||||
|
paint: luma(75%),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
// content itself
|
// content itself
|
||||||
doc
|
doc
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue
I think we should remove this entire section from this document for now, since I'm working on this in a different document