first commit

This commit is contained in:
Cadey Ratio 2020-05-06 07:22:27 -04:00
commit 283911150a
17 changed files with 393 additions and 0 deletions

38
.drone.yml Normal file
View File

@ -0,0 +1,38 @@
kind: pipeline
name: default
workspace:
base: /lewa
steps:
- name: build ebook files
image: xena/pandoc
pull: always
commands:
- cd book/src && ./build.sh
volumes:
- name: book
path: /lewa/book
- name: build mdbook
image: xena/mdbook
pull: always
commands:
- cd book && mdbook build
volumes:
- name: book
path: /lewa/book
- name: build image
image: docker:dind
volumes:
- name: book
path: /lewa/book
- name: dockersock
path: /var/run/docker.sock
commands:
- sh -c 'docker build -t xena/lewa:$DRONE_COMMIT .'
volumes:
- name: book
temp: {}
- name: dockersock
host:
path: /var/run/docker.sock

1
.envrc Normal file
View File

@ -0,0 +1 @@
eval "$(lorri direnv)"

1
book/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
book

6
book/book.toml Normal file
View File

@ -0,0 +1,6 @@
[book]
authors = ["Christine Dodrill"]
language = "en"
multilingual = false
src = "src"
title = "L'ewa: A Personal Language"

4
book/src/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.epub
*.mobi
*.pdf
test.tex

6
book/src/SUMMARY.md Normal file
View File

@ -0,0 +1,6 @@
# Summary
- [Introduction](./intro/index.md)
- [L'ewa as a Diary Language](./intro/diary_language.md)
- [eBook Version](./intro/ebook.md)
- [Changelog](./intro/CHANGELOG.md)

18
book/src/build.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
FILES='
intro/index.md
intro/diary_language.md
intro/CHANGELOG.md
'
set -x
pandoc -o lewa.epub --epub-chapter-level=2 --resource-path=. title.md $FILES
pandoc -o test.tex -s --include-in-header sectionpagebreak.tex --variable=subparagraph --toc --toc-depth=2 --resource-path=. title.md $FILES
pandoc -o lewa.pdf --include-in-header sectionpagebreak.tex --variable=subparagraph --toc --toc-depth=2 --pdf-engine xelatex --resource-path=. title.md $FILES || exit
kindlegen lewa.epub
mkdir -p ../book
cp -vrf lewa.mobi ../book/
cp -vrf lewa.epub ../book/
cp -vrf lewa.pdf ../book/

View File

@ -0,0 +1,13 @@
## Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### [Unreleased]
#### Added
- Initial setup and formatting
- First Section on introduction stuff

View File

@ -0,0 +1,17 @@
## L'wea as A Diary Language
When I was younger, I used to keep a diary/journal file on my computers off and
on. I was detailed about what I was feeling and what I was considering and going
through. This all ended abruptly after my parents were snooping through my
computer in middle school and discovered that I was questioning fundamental
aspects of myself like my gender. I have never really felt comfortable keeping a
diary file since then. I have made a few attempts at this (including by using a
dedicated diary machine, air-gapped TempleOS machines and the like), but they
all feel too vulnerable and open for anyone to read them.
This is my logic for using a language that I create for myself. If people really
want to go through and take the time to learn the ins and outs of a tool I
created for myself to archive my personal thoughts, they probably deserve to be
able to read them. Otherwise, this would allow me to write my diary from pretty
much anywhere, even in plain sight out in public. People can't shoulder-surf and
read what they literally cannot understand.

7
book/src/intro/ebook.md Normal file
View File

@ -0,0 +1,7 @@
## eBook Edition
The following is the eBook edition of L'ewa: A Personal Language.
- [ePub (iBooks)](./lewa.epub)
- [Kindle](./lewa.mobi)
- [PDF](./lewa.pdf)

62
book/src/intro/index.md Normal file
View File

@ -0,0 +1,62 @@
# Introduction
I've been curious about how language works for a very long time. This curiosity
has lead me down many fascinating rabbit holes, but for a long time I have
either been cribbing off of other people's work or studying natural languages
that don't have a cohesive plan or core to them. [Constructed
Languages][conlangs] (or conlangs as I will probably be calling them from here
on out) are a simpler model of this. You might be familiar with
[Klingon][tlhnganhol] from the Star Trek series, the [various forms of
Elvish][elvish] as described by J. R. R. Tolkien or [Dothraki][dothraki] from
Game of Thrones. This series will show an example of how one of those kinds of
languages are created.
[conlangs]: https://en.wikipedia.org/wiki/Constructed_language
[tlhnganhol]: https://en.wikipedia.org/wiki/Klingon_language
[elvish]: https://en.wikipedia.org/wiki/Elvish_languages
[dothraki]: https://en.wikipedia.org/wiki/Dothraki_language
Recently a challenge came up on [/r/conlangs][rconlangs] called
[ReConLangMo][reconlangmo] and I've decided to take a stab at this and flesh
this out into a [personal language][perslang].
[rconlangs]: https://www.reddit.com/r/conlangs/
[reconlangmo]: https://www.reddit.com/r/conlangs/comments/gbgvu0/reconlangmo_2020/
[perslang]: https://en.wikipedia.org/wiki/Artistic_language#Personal_languages
## L'ewa Overview
The language I am going to create will be called L'ewa (l.ʔɛ.wa, also
romanized `lewa` for filesystems). This word is identical in English and in L'ewa.
It means "is a language". The name came to me in a shower a while ago and I'm
not entirely sure where it came from.
This language is being designed as a personal language to help me keep a diary
(more on that later) and to act as a testbed for writing a computational
knowledge engine, much like IBM's Watson. I do not expect anyone else to use
this language. I may pull this language into fiction (if that ever gets off the
ground) or into other projects as it makes sense.
Some of the high level things I want to try in this language are ways to make me
think differently. I'm following the weak form of the [Sapir-Whorf
hypothesis][sapirwhorf] by this logic. I want to see what would happen if I give
myself a tool that I can use to help myself think in different ways. Other
features I plan to include are:
[sapirwhorf]: https://en.wikipedia.org/wiki/Linguistic_relativity
- A [seximal][seximal] number system
- A predicate-argument system similar to [Lojban][lojban]
- Nounlessness (only having verbs for content words) like [Salishan][salishan]
languages
- An [a-priori][apriori] (or made up) vocabulary
- Grammatical markers for the identity of the thinker of a sentence/phrase/word
- Make each grammatical feature and word logical, or working in one way only
- Typeable with standard QWERTY en-US keyboards
- A decorative script that I'll turn into a font
[seximal]: https://www.seximal.net
[lojban]: https://lojban.pw/cll/uncll-1.2.6/xhtml_section_chunks/chapter-tour.html#section-bridi
[salishan]: https://en.wikipedia.org/wiki/Salishan_languages
[apriori]: https://en.wikipedia.org/wiki/Constructed_language#A_priori_and_a_posteriori_languages

View File

@ -0,0 +1,7 @@
\usepackage{titlesec}
\titleclass{\section}{top}
\newcommand\sectionbreak{\pagebreak}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.0in, right=1.0in}

12
book/src/title.md Normal file
View File

@ -0,0 +1,12 @@
---
title: "L'ewa: A Personal Language"
author: Christine Dodrill
rights: All Rights Reserved
language: en-US
links-as-notes: true
toc-depth: 2
fontfamily: noto-serif
abstract: |
A personal language for use in linguistics research and for a diary.
---

20
nix/dyson.nix Normal file
View File

@ -0,0 +1,20 @@
{ fetchurl, stdenv }:
stdenv.mkDerivation rec {
name = "dyson";
version = "0.1.1";
src = fetchurl {
url =
"https://xena.greedo.xeserv.us/files/${name}-linux-amd64-0.1.0.tgz";
sha256 = "08c6md2cfi5g91h23ydg5z14lkq252cdqd41x269mwk19q89nmna";
};
phases = "installPhase";
installPhase = ''
tar xf $src
mkdir -p $out/bin
cp ${name}-linux-amd64-${version}/${name} $out/bin
'';
}

26
nix/sources.json Normal file
View File

@ -0,0 +1,26 @@
{
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "f73bf8d584148677b01859677a63191c31911eae",
"sha256": "0jlmrx633jvqrqlyhlzpvdrnim128gc81q5psz2lpp2af8p8q9qs",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/f73bf8d584148677b01859677a63191c31911eae.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
"branch": "nixos-19.09",
"description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to",
"homepage": "https://github.com/NixOS/nixpkgs",
"owner": "NixOS",
"repo": "nixpkgs-channels",
"rev": "a7ceb2536ab11973c59750c4c48994e3064a75fa",
"sha256": "0hka65f31njqpq7i07l22z5rs7lkdfcl4pbqlmlsvnysb74ynyg1",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs-channels/archive/a7ceb2536ab11973c59750c4c48994e3064a75fa.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}

134
nix/sources.nix Normal file
View File

@ -0,0 +1,134 @@
# This file has been generated by Niv.
let
#
# The fetchers. fetch_<type> fetches specs of type <type>.
#
fetch_file = pkgs: spec:
if spec.builtin or true then
builtins_fetchurl { inherit (spec) url sha256; }
else
pkgs.fetchurl { inherit (spec) url sha256; };
fetch_tarball = pkgs: spec:
if spec.builtin or true then
builtins_fetchTarball { inherit (spec) url sha256; }
else
pkgs.fetchzip { inherit (spec) url sha256; };
fetch_git = spec:
builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; };
fetch_builtin-tarball = spec:
builtins.trace
''
WARNING:
The niv type "builtin-tarball" will soon be deprecated. You should
instead use `builtin = true`.
$ niv modify <package> -a type=tarball -a builtin=true
''
builtins_fetchTarball { inherit (spec) url sha256; };
fetch_builtin-url = spec:
builtins.trace
''
WARNING:
The niv type "builtin-url" will soon be deprecated. You should
instead use `builtin = true`.
$ niv modify <package> -a type=file -a builtin=true
''
(builtins_fetchurl { inherit (spec) url sha256; });
#
# Various helpers
#
# The set of packages used when specs are fetched using non-builtins.
mkPkgs = sources:
let
sourcesNixpkgs =
import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {};
hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath;
hasThisAsNixpkgsPath = <nixpkgs> == ./.;
in
if builtins.hasAttr "nixpkgs" sources
then sourcesNixpkgs
else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then
import <nixpkgs> {}
else
abort
''
Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or
add a package called "nixpkgs" to your sources.json.
'';
# The actual fetching function.
fetch = pkgs: name: spec:
if ! builtins.hasAttr "type" spec then
abort "ERROR: niv spec ${name} does not have a 'type' attribute"
else if spec.type == "file" then fetch_file pkgs spec
else if spec.type == "tarball" then fetch_tarball pkgs spec
else if spec.type == "git" then fetch_git spec
else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec
else if spec.type == "builtin-url" then fetch_builtin-url spec
else
abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}";
# Ports of functions for older nix versions
# a Nix version of mapAttrs if the built-in doesn't exist
mapAttrs = builtins.mapAttrs or (
f: set: with builtins;
listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set))
);
# fetchTarball version that is compatible between all the versions of Nix
builtins_fetchTarball = { url, sha256 }@attrs:
let
inherit (builtins) lessThan nixVersion fetchTarball;
in
if lessThan nixVersion "1.12" then
fetchTarball { inherit url; }
else
fetchTarball attrs;
# fetchurl version that is compatible between all the versions of Nix
builtins_fetchurl = { url, sha256 }@attrs:
let
inherit (builtins) lessThan nixVersion fetchurl;
in
if lessThan nixVersion "1.12" then
fetchurl { inherit url; }
else
fetchurl attrs;
# Create the final "sources" from the config
mkSources = config:
mapAttrs (
name: spec:
if builtins.hasAttr "outPath" spec
then abort
"The values in sources.json should not have an 'outPath' attribute"
else
spec // { outPath = fetch config.pkgs name spec; }
) config.sources;
# The "config" used by the fetchers
mkConfig =
{ sourcesFile ? ./sources.json
, sources ? builtins.fromJSON (builtins.readFile sourcesFile)
, pkgs ? mkPkgs sources
}: rec {
# The sources, i.e. the attribute set of spec name to spec
inherit sources;
# The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers
inherit pkgs;
};
in
mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); }

21
shell.nix Normal file
View File

@ -0,0 +1,21 @@
let
pkgs = import <nixpkgs> { };
nur = import (builtins.fetchTarball
"https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
dyson = pkgs.callPackage ./nix/dyson.nix { };
tex = with pkgs;
texlive.combine { inherit (texlive) scheme-medium noto titlesec; };
in pkgs.mkShell {
buildInputs = with pkgs; [
dyson
kindlegen
kubectl
kubectx
mdbook
nur.repos.mic92.pandoc-bin
tex
nur.repos.xe.zathura
];
}