summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--$template.html4
-rw-r--r--haskell/cabal-lib.html16
-rw-r--r--haskell/cabal-lib.md20
-rw-r--r--natlang/meruhenchikku.html18
-rw-r--r--natlang/meruhenchikku.md26
5 files changed, 68 insertions, 16 deletions
diff --git a/$template.html b/$template.html
index 9eb8665..fe80663 100644
--- a/$template.html
+++ b/$template.html
@@ -48,8 +48,8 @@ html, body {
padding-top: 0px;
padding-bottom: 0px;
margin: 0;
- /* Have a fallback to local mononoki for offline pages */
- font-family: mononoki-webfont, mononoki, monospace;
+ /* Have a fallback to local mononoki for offline pages; include IPAGothic for Japanese text */
+ font-family: mononoki-webfont, mononoki, IPAGothic, monospace;
font-size: 12pt;
}
code {
diff --git a/haskell/cabal-lib.html b/haskell/cabal-lib.html
index 4008c82..281d56b 100644
--- a/haskell/cabal-lib.html
+++ b/haskell/cabal-lib.html
@@ -1,5 +1,5 @@
<h2>About <code>cabal install --lib</code></h2>
-<p><strong>TL;DR: Don't use it, add the library to your <code><em>package-name</em>.cabal</code> or <code>package.yaml</code> instead, or use a <a href="https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script">cabal script</a>. After you learn more about the downsides, you can reconsider. See the &quot;What to do instead&quot; section below.</strong></p>
+<p><strong>TL;DR: Don't use it, add the library to your <code><em>package-name</em>.cabal</code> or <code>package.yaml</code> instead, or use a <a href="https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script">cabal script</a>, or use <code>cabal repl -b</code>. After you learn more about the downsides, you can reconsider. See the &quot;What to do instead&quot; section below.</strong></p>
<hr />
<p>Suppose you are new to Haskell, or at least new to the current (2023) Haskell tooling, and would like to install a program written in Haskell.
For example, say you would like to install a Haskell formatter, say <code>fourmolu</code>, and find that installing Haskell packages uses a tool called <code>cabal</code>.
@@ -100,7 +100,14 @@ This is in <code>~/.ghc/<em>architecture</em>-<em>OS</em>-<em>ghcversion</em>/en
<p>As mentioned, the compiled packages are still around (in <code>~/.cabal/store/ghc-<em>version</em>/</code>), but removing those is tricky -- do not try it, cabal likes to maintain its own consistent set of packages in the &quot;store&quot;.
Removing the entire store folder for a particular GHC version is safe, however -- even though this does of course mean that you may need to recompile a lot of things later. :)</p>
<h2>What to do instead</h2>
-<p>Create a project!
+<p>If you just wanted a <code>ghci</code> session with some libraries in scope, use e.g. <code>cabal repl -b parsec -b time</code>.
+(<code>-b A</code> is short for <code>--build-depends=A</code>.)
+This will build those packages, if necessary, and then start a <code>ghci</code> session with those packages in scope.</p>
+<p>If you want something slightly more permanent than a single <code>ghci</code> session, you can make a <em>cabal script</em>.
+This allows you to effectively make a self-contained project inside a single Haskell file.
+You specify the dependencies in a special comment block at the top of the file.
+See <a href="https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script">the documentation</a> for more details.</p>
+<p>If you want more than that: create a project!
The intended mode of operation of the modern Haskell tooling, that is <code>cabal</code> or <code>stack</code>, is to always work inside of a <em>project</em>.
Often, &quot;project&quot; basically means &quot;package&quot;, but you can have projects with multiple packages in them (using a <code>cabal.project</code> file, see <a href="https://cabal.readthedocs.io/en/3.10/cabal-project.html">the docs</a>).</p>
<p>Creating a package is easily done using <code>cabal init --simple</code> inside a fresh directory.
@@ -114,7 +121,4 @@ A package (a single thing in the package repository, should you decide to upload
<strong><code>cabal</code> will automatically ensure that a consistent set of versions is compiled and made available, if at all possible.</strong>
You can also add <a href="https://cabal.readthedocs.io/en/3.10/cabal-package.html#pkg-field-build-depends">version bounds</a> to your dependencies if you want to apply some proper software engineering principles.</p>
<p>(If you want to use <code>stack</code> instead of <code>cabal</code>, try <a href="https://docs.haskellstack.org/en/stable/GUIDE/">their getting started guide</a>.)</p>
-<h3>An even lighter-weight alternative</h3>
-<p>An alternative to creating a project is to make a <em>cabal script</em>: this allows you to effectively make a self-contained project inside a single Haskell file.
-You specify the dependencies in a special comment block at the top of the file.
-See <a href="https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script">the documentation</a> for more details.</p>
+<p><em>Edited 2025-03-03 to include <code>cabal repl</code> as an alternative.</em></p>
diff --git a/haskell/cabal-lib.md b/haskell/cabal-lib.md
index 6b6c7ca..dc3b79e 100644
--- a/haskell/cabal-lib.md
+++ b/haskell/cabal-lib.md
@@ -1,6 +1,6 @@
## About `cabal install --lib`
-**TL;DR: Don't use it, add the library to your <code>*package-name*.cabal</code> or `package.yaml` instead, or use a [cabal script](https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script). After you learn more about the downsides, you can reconsider. See the "What to do instead" section below.**
+**TL;DR: Don't use it, add the library to your <code>*package-name*.cabal</code> or `package.yaml` instead, or use a [cabal script](https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script), or use `cabal repl -b`. After you learn more about the downsides, you can reconsider. See the "What to do instead" section below.**
---
@@ -150,7 +150,16 @@ Removing the entire store folder for a particular GHC version is safe, however -
## What to do instead
-Create a project!
+If you just wanted a `ghci` session with some libraries in scope, use e.g. `cabal repl -b parsec -b time`.
+(`-b A` is short for `--build-depends=A`.)
+This will build those packages, if necessary, and then start a `ghci` session with those packages in scope.
+
+If you want something slightly more permanent than a single `ghci` session, you can make a _cabal script_.
+This allows you to effectively make a self-contained project inside a single Haskell file.
+You specify the dependencies in a special comment block at the top of the file.
+See [the documentation](https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script) for more details.
+
+If you want more than that: create a project!
The intended mode of operation of the modern Haskell tooling, that is `cabal` or `stack`, is to always work inside of a _project_.
Often, "project" basically means "package", but you can have projects with multiple packages in them (using a `cabal.project` file, see [the docs](https://cabal.readthedocs.io/en/3.10/cabal-project.html)).
@@ -169,9 +178,4 @@ You can also add [version bounds](https://cabal.readthedocs.io/en/3.10/cabal-pac
(If you want to use `stack` instead of `cabal`, try [their getting started guide](https://docs.haskellstack.org/en/stable/GUIDE/).)
-
-### An even lighter-weight alternative
-
-An alternative to creating a project is to make a _cabal script_: this allows you to effectively make a self-contained project inside a single Haskell file.
-You specify the dependencies in a special comment block at the top of the file.
-See [the documentation](https://cabal.readthedocs.io/en/3.10/getting-started.html#run-a-single-file-haskell-script) for more details.
+_Edited 2025-03-03 to include `cabal repl` as an alternative._
diff --git a/natlang/meruhenchikku.html b/natlang/meruhenchikku.html
new file mode 100644
index 0000000..f7fdbd2
--- /dev/null
+++ b/natlang/meruhenchikku.html
@@ -0,0 +1,18 @@
+<h2>メルヘンチック</h2>
+<p>The title is a Japanese word meaning &quot;fairy-tale-like&quot;, and can be transcribed as &quot;meruhenchikku&quot;.
+Notes on pronunciation: both <em>e</em> are roughly the first <em>e</em> in <em><u>e</u>nter</em>; the <em>r</em> is a single-tap &quot;r&quot; as in Spanish &quot;caro&quot;; both <em>u</em> are roughly the stressed sound in English &quot;you&quot; halfway between the initial &quot;i&quot; and the final low &quot;u&quot;; the <em>ch</em> is like an English &quot;ch&quot; but brought closer to &quot;t&quot; while also raising its pitch; and the <em>i</em> is short but with the quality of English &quot;beat&quot;, not English &quot;bit&quot;.
+The double <em>k</em> indicates a small pause.</p>
+<p>The etymology of this word is funny.
+In German, there is word <em>Märchen</em> that means &quot;fairy-tale&quot;; its adaptation into Japanese phonology became &quot;meruhen&quot; (メルヘン).
+The &quot;-chikku&quot; part, however, comes from English.</p>
+<h3>English</h3>
+<p>There are a number of adjectives ending in <em>-ic</em> in English: romantic, alcoholic, metallic, etc.
+These generally come from Latin <em>-icus</em> (<a href="https://en.wiktionary.org/wiki/-icus#Latin">wiktionary</a>) where English dropped the <em>-us</em>/<em>-um</em> ending as usual.
+This originally came from Proto-Indo-European <em>-kos</em> (<a href="https://en.wiktionary.org/wiki/-cus#Latin">wiktionary</a>).
+Some of the <em>-icus</em> words in Latin happen to have a <em>t</em> in front of it, and hence some English words also do: romantic, galactic, etc.</p>
+<p>While <em>-ic</em> is not particularly productive any more in English, it appears in enough words its meaning would be clear if it is added as-is to an existing word.
+Adding <em>-tic</em> to a word in English for this purpose would make little sense.</p>
+<h3>Japanese</h3>
+<p>However, Japanese is not bound by such compunctions and decided that <em>-tic</em> is what the suffix shall be, rendered in Japanese phonology as &quot;chikku&quot; (チック) because they don't naturally have a clean &quot;t&quot;, nor a &quot;k&quot; without a following vowel.
+Naturally, thus, it makes perfect sense to build the word <em>Märchen-tic</em>, i.e. meruhenchikku: fairy-tale-like.</p>
+<p>That's all I had, hope you considered this a good use of 3 minutes of your time.</p>
diff --git a/natlang/meruhenchikku.md b/natlang/meruhenchikku.md
new file mode 100644
index 0000000..52b350f
--- /dev/null
+++ b/natlang/meruhenchikku.md
@@ -0,0 +1,26 @@
+## メルヘンチック
+
+The title is a Japanese word meaning "fairy-tale-like", and can be transcribed as "meruhenchikku".
+Notes on pronunciation: both _e_ are roughly the first _e_ in _<u>e</u>nter_; the _r_ is a single-tap "r" as in Spanish "caro"; both _u_ are roughly the stressed sound in English "you" halfway between the initial "i" and the final low "u"; the _ch_ is like an English "ch" but brought closer to "t" while also raising its pitch; and the _i_ is short but with the quality of English "beat", not English "bit".
+The double _k_ indicates a small pause.
+
+The etymology of this word is funny.
+In German, there is word _Märchen_ that means "fairy-tale"; its adaptation into Japanese phonology became "meruhen" (メルヘン).
+The "-chikku" part, however, comes from English.
+
+### English
+
+There are a number of adjectives ending in _-ic_ in English: romantic, alcoholic, metallic, etc.
+These generally come from Latin _-icus_ ([wiktionary](https://en.wiktionary.org/wiki/-icus#Latin)) where English dropped the _-us_/_-um_ ending as usual.
+This originally came from Proto-Indo-European _-kos_ ([wiktionary](https://en.wiktionary.org/wiki/-cus#Latin)).
+Some of the _-icus_ words in Latin happen to have a _t_ in front of it, and hence some English words also do: romantic, galactic, etc.
+
+While _-ic_ is not particularly productive any more in English, it appears in enough words its meaning would be clear if it is added as-is to an existing word.
+Adding _-tic_ to a word in English for this purpose would make little sense.
+
+### Japanese
+
+However, Japanese is not bound by such compunctions and decided that _-tic_ is what the suffix shall be, rendered in Japanese phonology as "chikku" (チック) because they don't naturally have a clean "t", nor a "k" without a following vowel.
+Naturally, thus, it makes perfect sense to build the word _Märchen-tic_, i.e. meruhenchikku: fairy-tale-like.
+
+That's all I had, hope you considered this a good use of 3 minutes of your time.