Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
ptarjan
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
6 ms
·
1.
▲
by
ptarjan
7mo ago
HN Frontpage in Ingglish: https://ingglish.com/?url=https%3A%2F%2Fnews.ycombinator.com...
2.
▲
Show HN: Ingglish – What if English spelling made sense?
(ingglish.com)
6 points
by
ptarjan
7mo ago
|
3 comments
3.
▲
by
ptarjan
1y ago
https://www.vimgolf.com/ is what taught me to VIM
4.
▲
by
ptarjan
2y ago
The metric system seems like a similar analog to geometric algebra vs vector calculus. You are saying the same thing but the language you are using is much more internally consistent. Adoption has been bumpy given the US resistance but I th
5.
▲
by
ptarjan
3y ago
> As for detecting gravitational waves, except for violent events like black hole mergers, we don't detect any; what few such gravitational waves there are are far too weak for us to detect. I thought LIGO and VIRGO had been detecti
6.
▲
by
ptarjan
7y ago
My favorite time I had to do this was for a real-life situation. I wanted a script that was both a bash script (for speed) and a ruby script (if you installed it the default way). I came up with: https://github.com/sorbet&#x
7.
▲
by
ptarjan
7y ago
The parser for Sorbet was actually entirely given to us by GitHub. They were fabulous partners early on in the project and we're grateful for their contributions.
8.
▲
by
ptarjan
7y ago
Nice spelunking! Yeah, this word means nothing really. Sigil, pragma, directive, typed comment, whatever. Feel free to call it "dohicky" if you'd like.
9.
▲
by
ptarjan
7y ago
We believe that the main goal of a typechecker is to give you nice error messages. We've found giving names to things makes it easier for folks to reason about their errors, and introducing names for interfaces isn't that onerous
10.
▲
by
ptarjan
7y ago
Thank you! Ruby has been kind to us, we'd like to be kind back.
11.
▲
by
ptarjan
7y ago
Thanks for the idea. We used `params` because Method#parameters was what they called it in the standard library. I actually had it as `args` originally until someone pointed this out. https://ruby-doc.org/core-2.6.3/Met
12.
▲
by
ptarjan
7y ago
Thanks for pointing that out. It can be called all of those. We liked sigil from its connotation: > Google defines sigil as, “an inscribed or painted symbol considered to have magical power,” and we like to think of types as pretty magic
13.
▲
by
ptarjan
7y ago
Great find! Fixing now, thanks.
14.
▲
by
ptarjan
7y ago
Sorbet supports both formats. You can see the inline syntax on https://sorbet.run/
15.
▲
by
ptarjan
8y ago
Hi and thank you for working on RDL! We do love the project and spoke with Jeff Foster a few times last year. We did use your standard library annotations for Sorbet and have many fixes to them sitting in your pull request queue: https:&#x
16.
▲
by
ptarjan
8y ago
Thank you so much for all the interest! We're flattered and excited to see all the discussion about the project. Try it out: https://sorbet.run If you would like to get in touch with us about anything, please email us at so
17.
▲
by
ptarjan
8y ago
It is a similar idea, yes.
18.
▲
by
ptarjan
8y ago
(one of the authors here) We'd love that too! We're chatting with the Ruby folks to see if anything like that is feasible. We experimented with lots of other syntaxes (comments, yarddoc, .rbi files, monkey-patching stdlib classes
19.
▲
by
ptarjan
8y ago
(author of the demo site here) I just was looking for a quick editor for the demo, and ace seemed to work well for this. Thanks for the pointer to manaco, I'll look at that for next time. Using an editor in the browser won't be th
20.
▲
by
ptarjan
9y ago
Thanks! The buckets are already done per-user so it is very simple to make the constant factors be user-dependent. For my example in https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff... you would just set RE
21.
▲
by
ptarjan
9y ago
In a token bucket algorithm you don't actually have a separate replenish step, it is baked into the next check you do. Similar to how in the example you linked the removal of the old entries is baked into the check step. Check out my e
22.
▲
by
ptarjan
9y ago
This can be done either way, and is really infrastructure dependent. There are pros and cons on both sides. We opted to bake it into the web stack instead of in front so that we get all the benefits of existing infrastructure like log aggre
23.
▲
by
ptarjan
9y ago
Thanks so much. I'm really glad you liked it.
24.
▲
by
ptarjan
9y ago
Both should work. Token buckets only have to store two things (count and timestamp) where a timestamp set has to store all N timestamps. I like the simper approach since I don't actually need access to all the timestamps. If you look a
25.
▲
by
ptarjan
9y ago
We actually use the LUA scripts on Redis to guarantee the atomicity that the token bucket algorithm needs. Then the Ruby middleware does the HTTP 429 response logic. The code samples I provided are pretty close to what we use in production.
26.
▲
by
ptarjan
9y ago
We do have rate limits on some of our more crucial services (we don't use microservices per se, more like macroservices). One difference for internal rate limits is we set alerts whenever they fire so that we can track down the client
27.
▲
by
ptarjan
9y ago
Hi! I'm the author of the post and am happy to answer any questions you have. There is also a corresponding set of code examples at the bottom that might be of interest to you: https://gist.github.com/ptarjan/e38f4
28.
▲
by
ptarjan
11y ago
Could you open source your code?
29.
▲
Facebook Song
(facebook.com)
1 points
by
ptarjan
11y ago
|
0 comments
30.
▲
How Facebook’s Programming Tools Are Remaking Wikipedia, Baidu and Box
(wired.com)
4 points
by
ptarjan
12y ago
|
0 comments
More ›