576 karma · joined Jul 4, 2009 (17y ago) · 130 submissions
comment 9mo ago · link · parent
2.
Show HN: Ingglish – What if English spelling made sense?(ingglish.com ↗)
6 points · by ptarjan · 9mo ago · 3 comments
comment 1y ago · link · parent
comment 2y ago · link · parent
Adoption has been bumpy given the US resistance but I think in the long run it (or something even more consistent) will win out. Similarly I think geometric algebra will be adopted. Maybe not in our lifetimes but eventually.
comment 2y ago · link · parent
I thought LIGO and VIRGO had been detecting gravitational waves for the last 4 years pretty regularly (i.e. once a week).
comment 6y ago · link · parent
I came up with: https://github.com/sorbet/sorbet/blob/master/gems/sorbet/bin...
comment 7y ago · link · parent
We aren't opposed to eventually support it, but we'd like to see how it goes with the current form first.
comment 7y ago · link · parent
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/Method.html#method-i-paramet...
As for the syntax change, we are actually on our 8th iteration of the syntax. We really wanted this to NOT be a fork of Ruby so finding something compatible was very important. For example that's why it has the weird `sig {` syntax too, we didn't want to have to cause load-time and cyclic dependencies from adding type signatures.
comment 7y ago · link · parent
comment 8y ago · link · parent
We did use your standard library annotations for Sorbet and have many fixes to them sitting in your pull request queue: https://github.com/plum-umd/rdl/pull/68 https://github.com/plum-umd/rdl/pull/72 https://github.com/plum-umd/rdl/pull/57 . We stopped submitting more since these weren't being upstreamed.
Before we started our project, I evaluated rolling out RDL instead of building our own typechecker. Trust me, I would MUCH rather use an existing project than have to build our own, but sadly it just didn't scale to our millions of lines of code.
I'm more than happy to chat about the details of why we didn't use RDL if you'd like to email me at sorbet@stripe.com. Thanks again for your great project, we're standing on the shoulders of giants.
comment 8y ago · link · parent
Try it out: https://sorbet.run
If you would like to get in touch with us about anything, please email us at sorbet@stripe.com.
In the presentation at RubyKaigi (which will be available online soon) we explicitly mentioned we'd like to chat with folks trying to scale Ruby into the millions of lines of code, or folks also working on similar typechecking projects. Of course feel free to email even if you aren't in those groups, but I wanted to get your attention if you were.
comment 8y ago · link · parent
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 to be callable) and the `sig` syntax seems to be the easiest for folks to use inside Stripe.
After writing sigs for the past few months, I don't dislike it as much as I thought I would. You get the syntax highlighting and autocomplete of your editor, while `sig` and `T` are short enough to not feel like too much boilerplate.
We're very open to other suggestions if you have any for other syntax suggestions. Just email us at sorbet@stripe.com.
comment 8y ago · link · parent
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 the final product. We're planning on integrating into your editor of choice instead.
comment 9y ago · link · parent
For my example in https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff... you would just set REPLENISH_RATE to be a different value for different users.
comment 9y ago · link · parent
Check out my example: https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff... on line 23 with
local filled_tokens = math.min(capacity, last_tokens+(delta*rate))
that adds in any tokens that should drip into the bucket since the last check.comment 9y ago · link · parent
comment 9y ago · link · parent
If you look at the concurrent request limiter I do indeed keep all the timestamps there in a Redis set. That one was more error prone to write in practice as I often would accidentally hit Redis storage limits.
comment 9y ago · link · parent
So yes, our Redis traffic is strictly higher than our whole API requests per second. This is actually pretty easy since Redis scales pretty well horizontally (the keys shard well) in addition to being able to handle many orders of magnitude more traffic than a normal web stack per machine.
Thanks for linking to your blog post. I like the simplicity of not having to enter the web stack at all. I'm not very familiar with varnish, how do you end up doing the actual rate limiting algorithm? I see you making a hash but not dripping tokens into a bucket.
comment 9y ago · link · parent
One difference for internal rate limits is we set alerts whenever they fire so that we can track down the client and see what they were doing. It is much easier to do that when you own both sides of the pipe.
comment 9y ago · link · parent
There is also a corresponding set of code examples at the bottom that might be of interest to you: https://gist.github.com/ptarjan/e38f45f2dfe601419ca3af937fff...
29.
1 points · by ptarjan · 11y ago · discuss
30.
How Facebook’s Programming Tools Are Remaking Wikipedia, Baidu and Box(wired.com ↗)
4 points · by ptarjan · 12y ago · discuss