From d0921e60defa20594a88bf0d8e1f1761c1954ff5 Mon Sep 17 00:00:00 2001
From: Maria Zaitseva
-My name is Maria. I'm a software developer and AI researcher. I'm an avid
+My name is Maria. I'm a software developer and AI researcher. I'm an avid
note taker and a digital gardening enthusiast.
And this is my digital garden! I happen to own a lot of them.
Recently I had an epiphany that I should try to keep some
-amount of my notes in HTML format, for it shall swiftly outlive every other
+amount of my notes in HTML format, for it shall swiftly outlive every other
technology I use now.
(welcome :to tail-call.github.io)
+
(welcome :to tail-call.github.io)
\about{me}
\about{me}
-Two letter commands were common in UNIX because they were easy to type,
-and single letter commands were reserved for the user to define.
+ Two letter commands were common in UNIX
+ because they were easy to type, and single letter commands were reserved for the user to define.
@@ -74,12 +76,16 @@ %s
-s
+Unlike books, which may be torn, lost, given to another person without you ever remembering about it, URLs die in a different way: they stop opening. Or entirely different content is being put instead of what the URL once contained. + +
+Despite that, we still want to reference URLs like we reference our books, in a nice list at the end of the text. This almost works well with books because many instances of a book are typically printed. For a URL, it is common to be served by a VM on a cheap VPS server. diff --git a/lua.html b/lua.html new file mode 100644 index 0000000..23eaae5 --- /dev/null +++ b/lua.html @@ -0,0 +1,134 @@ + +
+Have you noticed the moon is a bit like a parenthesis? + +
+Things of amazing beauty were invented by humans: first it was Lisp, then it +was Forth, and then it was Lua - if there were other good languages, please +let me know + +
+
Language | +Year of Release | +Keywords | +
---|---|---|
Lisp | +1960 | +defun, cons, car, cdr, lambda, eval, cond | +
Forth | +1970 | +:, dup, drop, pick, roll | +
Smalltalk | +1972 | +new, yourself, super | +
Scheme | +1975 | +define, call/cc, set!, define-syntax | +
Common Lisp | +1984 | +defun, defmacro, defparameter, defclass, defpackage, loop | +
Python | +1991 | +def, class, nonlocal, async, yield, import | +
Lua | +1993 | +function, local | +
+The good thing about being a 1993 language is that you can be influenced by every other language that was released before that date. In Lua, I personally sense a great influence of every language mentioned in Table 1, and I like these influences + +
+conf: __index, __add, __le, __mode -- __init__, __str__, __add__ + +
+conf: _G -- globals() + +
+They say there's a man in the moon - if you look closely enough into moon's +surface, you will see a face. In case of Lua, the face you see in the moon +is of Roberto Ierusalimski [Wikipedia]. When I say this, I always want to add "it's the +same guy who made D" but D was made by Andrei Aleksandresku [Wikipedia], an entirely +different person1 + +
+One thing that comes to mind first when thinking about Lua is that it begins +indexing its arrays (aka tables) with 1 as opposed to 0, the starting index +of choice of 99% other programming languages. Both are nice choices, one is +more intuitive when thinking about high-level problems, the other is more +intuitive when dealing with things like memory or anything with an "offset". +A truly bad choice would be using -1 or 2 as base index + +
+The reason behind this is that Lua was indeed designed to be used by +non-programmers, who needed a very simple language to automate their daily +computations. It's a small niche, and we don't usually target it anymore when +developing software. We kind of collectively assume that programming is the +job of a programmer, and now that we have a lot of programmers, why would +you code instead of them? + +
+Another instance of this is that every assignment to a free variable introduces
+a global binding, visible across all modules. If you're a novice programmer,
+this is a win for you because you don't have to wonder why your variable
+suddenly became
+Metatables are the continuation of theme "we're giving you one multi-purpose +tool instead of many single-purpose utilities" that table has begun. Metatables +are your meta-programming tool, and with meta-programming you may achieve object +oriented programming (OOP) and other good stuff. Lua doesn't have macros, but +metatables make it possible to introduce custom syntax to a degree. Personally +I recommend against going for the urge of rolling out Your Own Object System +because it's not a natural style for Lua: whatever you need an object system +for (inheritance, overriding behavior, polymorphism), there are other, more +straightforward ways to implement these. Lua isn't very like Smalltalk, it's +almost trying to be the opposite of Smalltalk while pursuing similar goals in +its design diff --git a/style.css b/style.css index 8817897..e3b0b80 100644 --- a/style.css +++ b/style.css @@ -1,18 +1,19 @@ :root { --foreground: #413a7f; + --background: rgb(239 236 255); } -html { - font-family: KaTeX_Main, Lucida Grande, Helvetica Neue, Helvetica, Arial, sans-serif; - background-color: rgb(239 236 255); -} -a { - color: #d7569c; -} +html { + font-family: + KaTeX_Main, + Lucida Grande, + Helvetica Neue, + Helvetica, + Arial, + sans-serif; -a:visited { - color: #413a7f; + background-color: var(--background); } body { @@ -27,7 +28,33 @@ body { max-width: 700px; } +@media (min-width: 700px) { + body { + margin-top: 1rem; + margin-left: 3rem; + margin-right: 3rem; + } +} + +a { + color: #d7569c; +} + +a:visited { + color: #413a7f; +} + +sup { + font-size: 50%; +} + +p:target { + background: var(--background); +} + .slide { + padding-top: 0.5rem; + padding-bottom: 0.5rem; margin-left: 1rem; margin-bottom: 2rem; border-left: solid 1px var(--foreground); @@ -35,10 +62,3 @@ body { max-width: 650px; } -@media (min-width: 700px) { - body { - margin-top: 1rem; - margin-left: 3rem; - margin-right: 3rem; - } -}