Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pcattori
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
JavaScript ternaries could be beautiful
(pedrocattori.dev)
1 points
by
pcattori
3y ago
|
0 comments
2.
▲
The Memories Folder
(pedrocattori.dev)
2 points
by
pcattori
4y ago
|
0 comments
3.
▲
by
pcattori
4y ago
Yep, totally could do that. But I like I mentioned here ( https://news.ycombinator.com/item?id=34659597 ) I wanted to keep the interfaces for `compileBrowser` and `compilerServer` since my mental model for it is that those tw
4.
▲
by
pcattori
4y ago
The manifest is an artifact produced by the browser compilation, but it can be shared _before_ the browser compilation writes its results to disk. I _could_ refactor to have "browser compilation phase 1", then assets manifest, and
5.
▲
by
pcattori
4y ago
The main trick on display here is that you can store a reference to the `resolve` method of a promise that normally would have to be called within the promise definition itself. Of course, you don't need a channel abstraction to do tha
6.
▲
by
pcattori
4y ago
Its a Typescript-ism for asserting that the value is not `undefined`. So you're telling the typechecker to trust you on this one
7.
▲
by
pcattori
4y ago
That's correct. The last three paragraphs of the article cover this and include links to libraries that have "full" channel implementations.
8.
▲
Go-like channels in 10 lines of JavaScript
(pedrocattori.dev)
41 points
by
pcattori
4y ago
|
59 comments
9.
▲
Your App's package.json Is Wrong
(pedrocattori.dev)
4 points
by
pcattori
4y ago
|
0 comments
10.
▲
Snake_case_is_the_best_case
(pedrocattori.dev)
4 points
by
pcattori
4y ago
|
3 comments
11.
▲
by
pcattori
10y ago
The point about "Inadequate data modelling facilities" is why I wrote Maps: https://github.com/pcattori/maps . Specifically, the "Named Maps" variants provide the same interface as `namedtuple` but