Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
zesterer
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
10 ms
·
61.
▲
by
zesterer
4y ago
I think it was "value judgement" (dependent types allow dispatching over a value in the type system)
62.
▲
by
zesterer
4y ago
Rust gives each closure a unique type (see the `Fn` trait: https://doc.rust-lang.org/core/ops/trait.Fn.html ), allowing the compiler to always statically dispatch to the exact function body at compile-time. That sa
63.
▲
by
zesterer
4y ago
So... I want to preface this by saying that I'm very, very far from being an expert on this topic. Although Tao's compiler has a MIR optimiser, it only covers the basics (inlining, constant folding + symbolic execution, etc.). I t
64.
▲
by
zesterer
4y ago
They are made by a Rust library, but it's a library I wrote for this project (now used by others too): https://github.com/zesterer/ariadne
65.
▲
by
zesterer
4y ago
Thanks!
66.
▲
by
zesterer
4y ago
Go for it! IIRC it was suggested by someone else in the #langdev channel on the Rust Community Discord, so I can't claim to own the idea.
67.
▲
by
zesterer
4y ago
Good luck! Feel free to open a discussion topic or issue if you have any questions!
68.
▲
by
zesterer
4y ago
A typeclass (or in Rust, a trait) is something that describes a set of behaviours that must be implemented by a type (in OOP languages, abstract classes are broadly equivalent). For example, the typeclass `Eq` describes how values of a type
69.
▲
by
zesterer
4y ago
> Tao or Dao is the natural order of the universe whose character one's intuition must discern to realize the potential for individual wisdom It echoes how I feel when I write programs in languages with strong static type systems: t
70.
▲
by
zesterer
4y ago
Subtraction of natural numbers is non-total, and can result in negative numbers, which cannot be represented as a natural number. Most languages throw an exception, panic, etc. None of these are solutions I'm happy with. In Tao, natura
71.
▲
by
zesterer
4y ago
Fast enough for this approach to work for small examples. For longer examples, I'm less confident: I've yet to implement a proper module system (other than a slightly more principled version of C's #include) so this currently
72.
▲
by
zesterer
4y ago
> Curious how Tao is pushing the limits on that front? I don't want to put emphasis on "pushing the limits" because I'm still very new to language design and mostly self-taught. There are bigger and better languages p
73.
▲
by
zesterer
4y ago
Thanks for your kind words :)
74.
▲
by
zesterer
4y ago
In a previous revision of the language, I did! ( https://github.com/zesterer/tao/tree/old ). I decided against it because, in short, I find the trailing delimiters to be quite ugly. Because this is purely a per
75.
▲
by
zesterer
4y ago
Yes! As you say, the do notation + monads covers this, but I'm planning to remove it in favour of a slightly more general 'effect basin' syntax that I'm currently working on (syntactically similar to Rust's async +
76.
▲
by
zesterer
4y ago
Iosevka Fixed Slab Semibold
77.
▲
by
zesterer
4y ago
Yes. This is something I've been thinking about a lot, as it happens! In particular, one of the great benefits of pure languages from an optimisation standpoint is that unused values can always be optimised away, but this is not the ca
78.
▲
by
zesterer
4y ago
Pretty much! The language does support limited sugar for tuples without parentheses in some specific cases, such as `match` and `let`: let x, y = 5, 4 in ... match x, y in | 4, 7 => None \ _, y => Just y
79.
▲
by
zesterer
4y ago
They're more akin to 'destructuring' natural numbers into successors. Consider: data Nat = Zero | Succ Nat You could pattern match on this Nat, fetching the inner Nat, allowing the type system to prove that all cases are hand
80.
▲
by
zesterer
4y ago
For now, just total (i.e: functions can't panic, throw exceptions, etc.). I'd like to explore termination analysis in the future though!
81.
▲
by
zesterer
4y ago
Hey, author here. I definitely didn't expect to see Tao on Hacker News. As is probably obvious, the language is extremely early in its life, and it's not practical to write anything but trivial examples in it yet. Please don
82.
▲
by
zesterer
4y ago
REPLs are often difficult to reconcile with AoT compilation and static analysis, particularly in the context of things like type inference (at least, in a way that preserves semantics). It's on my mental todo list, but not a priority f
83.
▲
by
zesterer
4y ago
Tao isn't indentation-sensitive, so nested `match` expressions are ambiguous without the trailing \ branch. I don't know whether I'll keep this syntax though. I'm increasingly wondering whether it's better to just b
84.
▲
by
zesterer
4y ago
I am indeed "going nuts"! As mentioned in the README, I don't see Tao as a production-quality language (at least, for the foreseeable future). I'll leave that to the experts. Instead, I'm more interested in explorin
85.
▲
by
zesterer
4y ago
Channels are most definitely not easy to reason about in the slightest. Superficially, they might appear to be on the surface: but they're really not and have innumerable subtle cases and behaviours in the face of various kinds externa
86.
▲
by
zesterer
5y ago
I have some thoughts about this: https://github.com/zesterer/chumsky/issues/20#issuecomment-9... TL;DR: The best approach, in my view, is to detect whitespace in the lexer and emit fake delimiter tokens for t
87.
▲
by
zesterer
5y ago
As the author of the library, I'd like to note that I consider some of Chomsky's views to be... questionable. The choice of name was largely down to his work in the world of linguistics and parser theory.
88.
▲
by
zesterer
5y ago
My advice has always been: 'Write at least one parser by hand before using parser combinators. Then, never write parsers by hand ever again'.
89.
▲
by
zesterer
5y ago
I've been developing both throughout the development of Tao, my own hobby language. It's since developed quite an extensive syntax (see here for an example: https://github.com/zesterer/tao/blob/maste
90.
▲
by
zesterer
5y ago
The main points of focus for chumsky, beyond nom, are: - Ease of use + ergonomics - Backtracking 'by default' - High quality errors and error recovery Nom is very specifically designed for parsing input not intended to be read by
More ›