Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
vjeux
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
121.
▲
by
vjeux
8y ago
Skip has a concept of a "intern heap" that contains all the values that are going to be used for memoization. By default everything is allocated on the stack/heap. When you want to memoize a function, then we move all the arg
122.
▲
by
vjeux
8y ago
This is something that was a big source of discussions in the team. The state we're in so far is that we have two different classes for those two use cases. The hashmap version of immutable maps are really useful for the "builder
123.
▲
by
vjeux
8y ago
Your explanation looks correct! The practical application is having a webserver that runs a bunch of requests in parallel but that can all share the same memoization cache. We don't want to lock the full memoization cache and therefore
124.
▲
by
vjeux
8y ago
Game development was a major driver for the design of Skip but for another reason: the GC. The big problem with languages with GC is that it is impredictable: when the amount of allocated memory globally passes a certain threshold, then a G
125.
▲
by
vjeux
8y ago
This goes far beyond having a local variables being assigned (assuming you mean the local being assigned and not mutating the object assigned to the local). For Skip to have to know that the actual instance is immutable, and that no one has
126.
▲
by
vjeux
8y ago
The ! syntax is really cosmetic, we could have gone the let/const route. The bigger aspect is deep immutability. Most languages implement memoize by doing pointer equality and have a notion of shallow immutability. But if someone mutat
127.
▲
by
vjeux
8y ago
The problem that the language is trying to solve is essentially building safe caches. Once a value is in the cache it cannot be changed from inside the program (the solution we opted for is to make it deeply immutable) and externally (if it
128.
▲
by
vjeux
8y ago
A lot of people have successfully coupled eslint with prettier, where they enable eslint rules that do those transforms with autofix.
129.
▲
by
vjeux
8y ago
You didn't ask me personally but feel free to email me, I've helped with the open sourcing effort: vjeux@fb.com
130.
▲
by
vjeux
8y ago
This is the technical term for what's left of the `=` sign. If you are from a JavaScript background, it is commonly called "destructuring assignment". The interesting about Skip is that local mutations are explicit with a ! i
131.
▲
by
vjeux
8y ago
Yeah, before joining the Skip team I worked on Prettier. Once you have an automatic formatter, you can't really go back, so I ported the core algorithm of prettier to Skip and built all the formatter for it. My biggest surprise was tha
132.
▲
by
vjeux
8y ago
We have js printed at the "OuterIST" phase right now. It's the phase just before we sent to the native backend which will generate llvm. You can go to the playground ( http://skiplang.com/playground/ ) a
133.
▲
by
vjeux
8y ago
We posted about some of those in the blog over the years. http://skiplang.com/blog Some of the interesting ones: - An overview of how memoization works and the MVCC model behind the scenes: http://skiplang.com&#x
134.
▲
by
vjeux
8y ago
Don’t you consider Hacker News to be social media? All the links are sourced and ranked from the community, plus all the comments.
135.
▲
by
vjeux
8y ago
Wrote a blog post that got featured on HN. Someone from Facebook reached out and after a series of interviews I got in.
136.
▲
by
vjeux
8y ago
For those like me who don't know what Furby is: "Furby is an American electronic robotic toy released in 1998 by Tiger Electronics. It resembles a hamster or owl-like creature and went through a period of being a "must-have&q
137.
▲
by
vjeux
8y ago
The link to the "famous 15 puzzle" is dead fyi http://bd.thrijswijk.nl/15puzzle/15puzzen.htm
138.
▲
by
vjeux
8y ago
Sorry about that, it has now been fixed
139.
▲
by
vjeux
8y ago
The goal of prettier is not to format code exactly as you would have written but to format it in a reasonable way. The upside is that as a developer you don’t need to worry about formatting yourself as you can just write code in a bad way,
140.
▲
by
vjeux
8y ago
> For dartfmt, I did my best to keep the original requirements even thought it meant a much more complex formatter. That made my implementation job harder. But it made the political job of convincing everyone inside Google (and most user
141.
▲
by
vjeux
8y ago
Yes! If you want something less mathematical, you can read the explanation of the various commands: https://github.com/prettier/prettier/blob/master/commands.md
142.
▲
by
vjeux
8y ago
You want to break --at some point--. The question is, who decides where to break? For gofmt, they decided that the person writing the code is going to make this decision everywhere. For prettier, we decided that the tool was going to make t
143.
▲
by
vjeux
8y ago
gofmt took a different approach where it respects the author's line breaks. So the following are all going to remain as is with gofmt: f(a, b) f( a, b) f(a, b, ) f(a, b) f( a, b,
144.
▲
by
vjeux
8y ago
I read this before working on prettier and it was a bit scary to be honest :) I wasn’t convinced that the exhaustive approach with weigths was a good idea. It makes it computationally super intensive and hard to predict what the printer wou
145.
▲
by
vjeux
8y ago
As a core contributor of some very popular github projects, I get a ton of emails from researchers wanting me to fill out surveys. It would be nice if it was somehow centralized instead of a lot of independent people trying to do the same w
146.
▲
by
vjeux
8y ago
That's true, I'll consider it, in the meantime here are some thoughts. When I started working on React Native, I thought that the most difficult thing would be to design a good set of APIs to make it easy to write mobile apps usin
147.
▲
by
vjeux
8y ago
The reality is that the way humans write code is complex and if you try to use simple rules it's going to look bad in many cases. What linters have been doing is to figure out --some-- rules that are general enough that can be enforced
148.
▲
by
vjeux
8y ago
I don't know :) I worked on prettier myself because I wanted to solve formatting for the language I was involved in. It turned out that the prettier infrastructure was actually really good for other languages so we used it for CSS, Mar
149.
▲
by
vjeux
8y ago
Another issue is that yapf uses an algorithm that is quadratic, so you end up with code you actually see in practice take seconds to minutes to format. The authors have been adding specific workarounds for some cases but it's a general
150.
▲
by
vjeux
8y ago
At Facebook we only tell you about lint violations for the lines you touch using arcanist from phabricator[1]. While it works great for most lint warnings, this hasn't worked that well for code formatters. The most successful strategy
More ›