LectronPusher
Joined 3 years ago
Joined 3 years ago
You can see all the options for `text` here: https://typst.app/docs/reference/text/text It will likely need some reorganization in time, but is quite functional.
The command line comes with a few defaults such as the open source Libertinus for text or New CMM for math, but may fall back to your System fonts for characters like emoji (and there are flags to disable system fonts). You can also set a specific path to look up font files.
And then the web app has plenty of fonts in an extensive dropdown, and supports dropping in custom font files that will be automatically recognized.
I believe one current limitation is bitmap fonts not working properly, but that is being actively developed by a contributor.
I'm optimistic that Typst won't run into the issues you mention. I see it as doing well at incorporating the knowledge of the past into simpler, better interfaces.
Here's an `if_then_else` example, modified from [0]:
-- declare an operator function with underscores:
if_then_else_ : {A : Set} -> Bool -> A -> A -> A
-- define the function:
if true then x else y = x
if false then x else y = y
-- call it:
if_then_else_ cond first second
-- or use it infix:
if cond then first else second
-- or partially apply "sections" of the operator:
-- this is really cool
(if_then first else second) cond
(if cond then_else second) first
if cond then first else_ second
if cond then_else_ first second
if_then first else_ cond second
(if_then_else second) cond first
Of course, the paper by Agda authors Danielsson and Norell, Parsing Mixfix Operators [1], is a classic discussion at the theory of mixfix operators in expression grammars (they take a stance of precedence as a DAG). But I do not often see cited the earlier and similarly titled dissertation by Jacob Wieland, Parsing Mixfix Expressions [2], which goes further into defining classes of ambiguity in both operator expressions and overloaded operators, expresses these in an Earley style parser, and in my view is far more practical for real language designers.[0] Agda Mixfix docs: https://agda.readthedocs.io/en/v2.6.4.3/language/mixfix-oper...
[1] Danielsson/Norell: https://scholar.google.com/scholar?q=parsing+mixfix+operator...
[2] Wieland: https://scholar.google.com/scholar?q=parsing+mixfix+expressi...
Oils goal is that OSH is just a new Bash implementation (although not bug-for-bug) but with an upgrade-path to the more modern YSH for real programming with type safety etc, but still as a shell language. One of their exciting ideas is using code as data in a somewhat lisp-like manner to allow function introspection in YSH etc.
Based on other comments it seems like Oil Shell is much more principled in working to actually understand Bash as it exists and presenting an alternative language. I would be interested in what differentiates Amber and whether they have a response to Oils?
Guess I'll need to find that link myself ;)
Edit: reading a bit further, it seems like Typst has the ability to do a lot of the snippets as-is ($->$ is \to, $in$ is \in, etc.), and since variables in Typst are usable by mere mortals, it's easier to hack in the language you already use. For example, I use `#let la = $lambda$` as a shortcut.
Highly recommend both books.
LLMs treat language as combinations of vectors of a very high dimension -- (x, y, z, a, b, c, d, ...). The neat thing is that we can combine these just like the 2D vectors and get meaningful results. If we have the vectors for the concepts "King" and "Woman", adding them gives a vector close to the one for "Queen"!
Once you know this, you can extrapolate and look for ways to categorize groups of vectors and combine them in new ways. As I read it, this research is about finding the vector weights for text from specific time periods -- i.e. January of 2021 -- and comparing them to the vectors for text from a different period -- i.e. March of 2021. It seems that all the operations are still meaningful, you can even do something like averaging vectors in January and March and getting ones that look like vectors in February!
[1]: https://www.scattered-thoughts.net/writing/zest-dialects-and...