Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Garlef
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
451.
▲
by
Garlef
6y ago
No (At least not yet: open research question). But neither can "repeated multiplication". How would you multiply 2 with itself "a half" times?
452.
▲
by
Garlef
6y ago
I learned adding from counting disjoint unions of dots. I learned multiplication from counting squares of dots. But agreed: I learned about exponentiation first via repeated multiplication.
453.
▲
by
Garlef
6y ago
To me, "disjoint union", "direct product" and "set of maps" (as a special case of "internal hom") are the central keywords in what I wrote: Concepts from category theory.
454.
▲
by
Garlef
6y ago
I'm personally more scared of set theory.
455.
▲
by
Garlef
6y ago
From what I know: This is still an open question. Here's a list of some approaches. https://mathoverflow.net/questions/310004/categorifications-...
456.
▲
by
Garlef
6y ago
Neither is more foundational than the other. So I think the use of "just" is not justified here. https://mathoverflow.net/questions/360578/category-theory-an...
457.
▲
by
Garlef
6y ago
My favourite way of thinking about these operations comes from category theory: * addition: the cardinality of the disjoint union of two sets * multiplication: the cardinality of the direct product of two sets * exponentiation: a^b is the c
458.
▲
by
Garlef
6y ago
Same thing is happening with other products - for example Magic: The Gathering. https://www.youtube.com/watch?v=oEOB5sltnC8 And companies build their products around this: https://secretlair.wizards.com
459.
▲
by
Garlef
6y ago
> More pragmatically, regardless of what the spec says, a ton of JSON tooling assumes the order doesn't matter and relying on it would be a big mistake. Agreed. But this does not mean that a tool should break it. My assumption would
460.
▲
by
Garlef
6y ago
I checked the spec again: It's unclear: At one point it says "An object is an unordered set of name/value pairs." while in the actual grammar it is ordered: object '{' ws '}' &
461.
▲
by
Garlef
6y ago
> JSON can be made prettier by sorting the JSON object members by element keys. This seems to be a bad idea. The JSON language spec has ORDERED object members. But the order is arbitrary (precisely the one given in the JSON string) and d
462.
▲
by
Garlef
6y ago
Looks very interesting. I would love to see an online repl/playground for this, similar to the TS playground ( https://www.typescriptlang.org/play/ ).
463.
▲
by
Garlef
6y ago
You could just read linear = m b x -> b + m * x as (linear = m b x -> b + m * x) and assume this to be an expression given to some kind of macro ;)
464.
▲
by
Garlef
6y ago
> But the number of positive tests should have gone down considerably > "Israeli study finds 94% drop in -> SYMPTOMATIC <- COVID-19 cases with Pfizer vaccine" Asymptomatic cases still spread the virus.
465.
▲
by
Garlef
6y ago
The correct term would be "composition in an enriched category". The morphism objects in this context are usually not called arrows. I think the other poster meant "elements in the set of morphisms" when they said "
466.
▲
by
Garlef
6y ago
Amazon revenue 2019: 280.5 billion USD Still they feel that they need to steal 0.062 billion USD from their employees? Why?
467.
▲
by
Garlef
6y ago
> The whole thing is just about arrow composition! There's much much more to it. For example, a version of the yoneda lemma also holds for metric spaces (instead of a set of arrows between to things, you simply have a number indicat
468.
▲
by
Garlef
6y ago
If you're receiving JSON data, you can not validate the data at compile time. But yes: I think TS is missing a way to derive runtime functionality from the type definitions - at least in the cases, where the types describe plain JSON.
469.
▲
by
Garlef
6y ago
Out of interest: What was the context where you needed the validation? In most contexts, the reasonable approach would be to only do runtime validation at your system boundaries and not anywhere inbetween.
470.
▲
by
Garlef
6y ago
Yes. But do long names even help? I imagine, in such a project the system of generics can be so complex that a new dev cannot use them to their intent without completely understanding the code.
471.
▲
by
Garlef
6y ago
Regarding "don't use `x as Y` but instead use type guards". Type guards have a runtime overhead, don't they? (You could argue: "If TS can not infer the type at this point so neither can you. Better to check at runti
472.
▲
by
Garlef
6y ago
This is definitely something that typescript constantly lures you into. I recently switched back to JS for a prototype of a programming language. I immediately felt more productive. At times, the TS systems feels like a theorem prover. Unti
473.
▲
by
Garlef
6y ago
> Black boxes There are a few black boxes most people are very happy not to peek into; Having these black boxes is a huge productivity win: * Compilers * Garbage Collection * OS Kernels * File systems * Docker * App Stores / package
474.
▲
by
Garlef
6y ago
Yes. But do they automagically create and maintain database indexes for the most common requests made by your webclients?
475.
▲
by
Garlef
6y ago
I think the post is a bit unfortunate in its wording and this seems to have sent you off on a wrong track. From how I read it, this the post is not specifically about JS and a discussion of the specific technologies mentioned but rather con
476.
▲
by
Garlef
6y ago
Well... would this satisfy you? (I removed the _add part for convenience. You could still argue that `_concat` is not a literal... if by literal you mean a primitive provided by the language itself. Note that i'm not claiming that this
477.
▲
by
Garlef
6y ago
Here's what I use: https://github.com/gbegher/groth/blob/460852a71859f149ecf9b5... Did not cause any roadblocks so far.
478.
▲
by
Garlef
6y ago
Actually, this is mostly possible. Except for some issues regarding the stack size when resolving the types. (But I think there are more efficient implementations using more copy and paste, making this actually work) playground link: https
479.
▲
by
Garlef
6y ago
The point of listing the second point was to paraphrase/summarize archetypes and contrast it to a more plausible explanation (the first point). Here's some hyperbole explaining why the first point offers the simpler explanation. T
480.
▲
by
Garlef
6y ago
I guess this could be enhanced to also serve as an input device. Combined with either microphones reacting to the reflections of the ultrasound or a high res theremin perhaps?
More ›