From 34270afac08c5ab0a2fd1dd9a388d34d51979d01 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Wed, 2 Feb 2022 21:54:28 +0000 Subject: Add APL site --- sites/apl.pmikkelsen.com/_images/screenshot.png | Bin 0 -> 27184 bytes sites/apl.pmikkelsen.com/_werc/config | 3 + sites/apl.pmikkelsen.com/_werc/lib/footer.inc | 1 + sites/apl.pmikkelsen.com/_werc/lib/top_bar.inc | 8 ++ sites/apl.pmikkelsen.com/_werc/pub/style.css | 122 ++++++++++++++++++++++ sites/apl.pmikkelsen.com/favicon.ico | Bin 0 -> 2576 bytes sites/apl.pmikkelsen.com/implementation-status.md | 5 + sites/apl.pmikkelsen.com/index.md | 52 +++++++++ 8 files changed, 191 insertions(+) create mode 100644 sites/apl.pmikkelsen.com/_images/screenshot.png create mode 100644 sites/apl.pmikkelsen.com/_werc/config create mode 100644 sites/apl.pmikkelsen.com/_werc/lib/footer.inc create mode 100644 sites/apl.pmikkelsen.com/_werc/lib/top_bar.inc create mode 100644 sites/apl.pmikkelsen.com/_werc/pub/style.css create mode 100644 sites/apl.pmikkelsen.com/favicon.ico create mode 100644 sites/apl.pmikkelsen.com/implementation-status.md create mode 100644 sites/apl.pmikkelsen.com/index.md (limited to 'sites/apl.pmikkelsen.com') diff --git a/sites/apl.pmikkelsen.com/_images/screenshot.png b/sites/apl.pmikkelsen.com/_images/screenshot.png new file mode 100644 index 0000000..ec56a32 Binary files /dev/null and b/sites/apl.pmikkelsen.com/_images/screenshot.png differ diff --git a/sites/apl.pmikkelsen.com/_werc/config b/sites/apl.pmikkelsen.com/_werc/config new file mode 100644 index 0000000..0c946e0 --- /dev/null +++ b/sites/apl.pmikkelsen.com/_werc/config @@ -0,0 +1,3 @@ +masterSite=apl.pmikkelsen.com +siteTitle='APL9' +siteSubTitle='An APL for Plan 9' diff --git a/sites/apl.pmikkelsen.com/_werc/lib/footer.inc b/sites/apl.pmikkelsen.com/_werc/lib/footer.inc new file mode 100644 index 0000000..2deed52 --- /dev/null +++ b/sites/apl.pmikkelsen.com/_werc/lib/footer.inc @@ -0,0 +1 @@ +Powered by werc © Peter Mikkelsen 2022 \ No newline at end of file diff --git a/sites/apl.pmikkelsen.com/_werc/lib/top_bar.inc b/sites/apl.pmikkelsen.com/_werc/lib/top_bar.inc new file mode 100644 index 0000000..4c23cf3 --- /dev/null +++ b/sites/apl.pmikkelsen.com/_werc/lib/top_bar.inc @@ -0,0 +1,8 @@ +
+ APL9 source code | + pmikkelsen's site | + 9front +
+ +
+
diff --git a/sites/apl.pmikkelsen.com/_werc/pub/style.css b/sites/apl.pmikkelsen.com/_werc/pub/style.css new file mode 100644 index 0000000..1002606 --- /dev/null +++ b/sites/apl.pmikkelsen.com/_werc/pub/style.css @@ -0,0 +1,122 @@ +body { display: flex; flex-wrap: wrap; font-family: sans;} +header { flex-basis: 100%; flex-shrink: 0; } +article { flex-basis: 60%; padding-left: 1em; } +footer { flex-basis: 100%; flex-shrink: 0; } +header nav { display: flex; justify-content: space-between; } +nav a, header a { text-decoration: none ; color: inherit; } +header h1 span { margin-left: 1em; font-size: 50%; font-style: italic; } +.mainContent > nav { flex-basis: content; padding-right: 1vw; min-width: 16em; } +nav ul { display: flex; flex-direction: column; list-style-type: none; list-style-position: outside; padding-left: 0; } +nav li ul { padding-left: 0.6em } +footer { display: flex; justify-content: space-between; } + +/* cut here to leave vanity behind */ + +body { margin:0; padding: 0; font-size: 84%; font-family: Helvetica, Verdana, Arial, 'Liberation Sans', FreeSans, sans-serif; } +a { text-decoration: none; color: } +a:hover { text-decoration: underline; } +.thisPage { color: black; } + +/* header and top bar */ +header nav { background-color: rgb(100,135,220); color: white; padding: 0.3em; border-bottom: 2px solid black; font-size: 91%; } +header h1 { background-color: #ff6d06; color: black; margin: 0; border-bottom: 2px solid black; font-weight: normal; padding: 0.25ex; font-size: 233%; } +header a:hover { text-decoration: none; } + +/* sidebar */ +.mainContent > nav { border-right: 1px solid #ddd; padding: 0; } +.mainContent > nav > div { border-bottom: 1px solid #ddd; } +.mainContent > nav > div a { color: rgb(0, 102, 204); display: block; text-transform: capitalize; font-weight: bold; padding: 0.25em 1ex 0.25em 2mm; font-size: 102%} +.mainContent > nav > div a:hover { color: white; background-color: rgb(100,135,220); border-left: black solid 0.2em; text-decoration: none; } +.mainContent > nav > div p { font-weight: bold; margin: 0 0 0.5em 2mm; padding: 1em 0 0 0; } + +/* main copy */ +article { padding: 0.5ex 0 5vh 1vw; } +article h1, article h2 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; border-bottom: 2px solid rgb(0,102,204); } +article h3, article h4, article h5 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; } +article h6, article h7, article h8 { color: rgb(0,102,204); font-weight: bold; margin: 2em 0 0 0; } +article a { color: rgb(0,102,204); } +article a:hover { color: rgb(100,135,220); } +article pre { font-size: 1.2em; } + +/* footer */ +footer { color: white; background-color: rgb(100,135,220); } +footer a { color: inherit; } +footer div { padding: 1em; } + +/* tables */ +table { border: 1px solid rgba(128,128,128,0.5); padding: 0; } +th { color: white; background-color: rgb(100,135,220); } +tr:nth-child(odd) { background-color: rgba(128,128,128,0.1) } + +/* modifications */ +img { + max-width: 100%; + border: 1px solid black; +} + +body { + +} + +header h1 { + background-color: #c2d2c6; +} + +html { + font-size: 1.2em; +} + +header nav, footer { + background-color: #442a13; +} + +code > pre { + border: 2px solid #442a13; + background-color: #c2d2c6; + width: max-content; + padding: 0 0.5em; +} + +.mainContent > nav > div a, article a:hover { + color: #442a13; +} + +.mainContent > nav > div a:hover { + color: #442a13; + background-color: #c2d2c6; +} + +article h1, article h2 { + color: #c48f3b; + border-bottom: 2px solid #442a13; +} + +article a, .thisPage, footer, header nav { + color: #c48f3b; +} + +footer { + padding: 0.5em; + flex-shrink: 1; + flex-basis: unset; +} + +header { + flex-basis: unset; +} + +html { + display: flex; + min-height: 100%; +} + +body { + flex-direction: column; + flex: 1; + background-color: #e3dfd7; +} + +.mainContent { + display: flex; + flex-grow: 1; +} \ No newline at end of file diff --git a/sites/apl.pmikkelsen.com/favicon.ico b/sites/apl.pmikkelsen.com/favicon.ico new file mode 100644 index 0000000..745367e Binary files /dev/null and b/sites/apl.pmikkelsen.com/favicon.ico differ diff --git a/sites/apl.pmikkelsen.com/implementation-status.md b/sites/apl.pmikkelsen.com/implementation-status.md new file mode 100644 index 0000000..d0a0e07 --- /dev/null +++ b/sites/apl.pmikkelsen.com/implementation-status.md @@ -0,0 +1,5 @@ +# Implementation status + +*Overall: usable, but slow. It crashes and leaks memory sometimes* + +... to be written ... \ No newline at end of file diff --git a/sites/apl.pmikkelsen.com/index.md b/sites/apl.pmikkelsen.com/index.md new file mode 100644 index 0000000..da0a9fc --- /dev/null +++ b/sites/apl.pmikkelsen.com/index.md @@ -0,0 +1,52 @@ +# Introduction + +This is the website for APL9, which is an APL implementation written in C on and for Plan 9 (9front specifically, but the other versions should work as well). + +Work started in January 2022, when I wanted to do some APL programming on 9front, but +no implementation existed. The focus has been on adding features and behaving (on most points) like [Dyalog APL][1]. Speed is poor, since many primitives are implemented in terms of each other, which is not optimal, but it helped me implement stuff easier. + +*Note:* development is still very much on-going. Some primitives may be implemented wrong at this point, since it can be hard to implement them without ever having used them ☺. + +# Features + +* Dfns work, but the error guards are not implemented yet +* Function trains +* Most primitive functions from [Dyalog APL][1] +* Some of the primitive operators from [Dyalog APL][1] +* Box printing (by default) + +For more information, see [Implementation Status](/implementation-status). + +# Notable differences from Dyalog APL + +* No bracket axis +* No bracket indexing +* No tradfn syntax +* No complex numbers (might change later) +* `⍺⍺` is changed to `⍶` +* `⍵⍵` is changed to `⍹` +* Outer product `∘.` is changed to `⌾` +* Dop self reference `∇∇` is changed to `∆` and `⍙` for monadic and dyadic operators respectively + +# Installation + +Installation is as simple as cloning and running `mk`. + + git/clone https://git.sr.ht/~pmikkelsen/APL9 + cd APL9 + mk + % set the BIN environment variable if + % you don't want it to install globally + mk install + +The resulting binary is installed as `apl`. At the time of writing, +it doesn't take command line arguments (apart from -t and -m for debugging). + +I haven't yet figured out a good way to type the APL glyphs on 9front, so you have to come up with something on your own. And remember to use a font that can display the glyphs! + +# Screenshot + +[![A picture of APL9 in action][2]][2] + +[2]: /_images/screenshot.png +[1]: https://dyalog.com \ No newline at end of file -- cgit v1.2.3