HackerTrans
TopNewTrendsCommentsPastAskShowJobs

LectronPusher

no profile record

comments

LectronPusher
·2 года назад·discuss
You would likely be interested in Jamie Brandon's work on the Zest language [1] which has planned "lax", "strict", and "kernel" modes for varying levels of performance/safety

[1]: https://www.scattered-thoughts.net/writing/zest-dialects-and...
LectronPusher
·2 года назад·discuss
Adding a font is just `#set text(font: "besley")` or you can use a list for fallback like `#set text(font: ("jost", "noto sans")`. Then you can select weight, italic/bold, opentype features, ligatures, etc. as options on `text` with the same syntax.

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.
LectronPusher
·2 года назад·discuss
I'm actually currently doing some research on operator precedence and syntax, so it's fun to see such a relevant post! One of my favorite syntaxes for custom operators comes from Agda and allows for easy definition of mixfix operators. Agda uses underscores to stand-in for operands in the name of arbirtrary functions (i.e. `_+_` as the sum). But when fully qualified with all underscores, this will act like a normal function (`_+_ 3 4 == 7`). But, uniquely among languages I've seen, it allows for partial application of arguments with operands in place, making it much easier to create new curried functions.

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...
LectronPusher
·2 года назад·discuss
I haven't seen a mention of the Oil Shell (https://oilshell.org) project's OSH/YSH yet and I'm quite surprised.

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?
LectronPusher
·2 года назад·discuss
Link seems broken?
LectronPusher
·2 года назад·discuss
The pareto optimal essay?
LectronPusher
·2 года назад·discuss
I liked a quote from a No Boilerplate video [0] noting how some of the most commonly used Rust libraries hadn't had any git commits in multiple years: "They're not abandoned, they're done."

[0] https://youtu.be/Z3xPIYHKSoI?si=qHLJyUu6yqbIQUr7
LectronPusher
·2 года назад·discuss
I initially took the title as asking why diamonds or sapphire are harder than uglier rocks.

Guess I'll need to find that link myself ;)
LectronPusher
·2 года назад·discuss
This is also the reason behind the name XKCD
LectronPusher
·2 года назад·discuss
I agree with other commenters that paper and pencil are the way to go for true learning, but the other week I left my notebook at home for a lecture, and was able to keep good notes with Typst, although my typing speed isn't excellent. Curious what other people think about Typst vs Latex for notes?

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.
LectronPusher
·3 года назад·discuss
This is a major plot point of the book A Beautifully Foolish Endeavor, sequel to An Absolutely Remarkable Thing. The main antagonist uses high quality VR to trick the brain into full reality from someone else's perspective. The effect on society is grim, and when society is being actively graded by aliens on its worth, this is a big problem.

Highly recommend both books.
LectronPusher
·3 года назад·discuss
A vector is a position in a dimensional space. In 2D space a vector is a point (x, y) like (1, 3) or (-2.5, 7.39). We can also do simple math on vectors like addition: (1, 3) + (2, -1) = (3, 2).

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!