Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
byroot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
31 ms
·
331.
▲
by
byroot
6y ago
> although it can kick start only after the first response comes in There is a RFC for a new 103 Early Hint response: https://tools.ietf.org/html/rfc8297 This would allow to to send `link` headers before the full re
332.
▲
by
byroot
6y ago
%Q or just % does interpolation: $ ruby -e 'a=5; puts %Q/[#{a}]/' [5] $ ruby -e 'a=5; puts %/[#{a}]/' [5]
333.
▲
by
byroot
6y ago
Your Ruby snippet is slower for two reasons: - IO.foreach is lazy, but then you call `Array#grep` on it which allocate a huge Array - `grep` populate the "last_match" object, `String#match?` is much faster. Try rifraf
334.
▲
by
byroot
6y ago
Just kind of? The title is totally misleading.
335.
▲
by
byroot
6y ago
The capability is there since 2.3 at least, but Matz doesn't want it by default, and prefer to leave it to libraries. If you use bootsnap, you use ".rbc" files already. Source: https://bugs.ruby-lang.org/issue
336.
▲
by
byroot
6y ago
> It’s possible the photos were propaganda, so they only took pictures of the “good” trenches, but every picture you see of allied trenches looked like ditches. It's not really propaganda, German trenches were on average much better
337.
▲
by
byroot
6y ago
> Indeed shopify itself use many components from rails eco-system built by Spree and Solidus community. I highly doubt that. Which ones do you have in mind?
338.
▲
by
byroot
6y ago
> If I've got that right You did. > it sounds functionally similar to the Python way It definitely is, however it allows to handle all operators by defining a single method, so it's a bit more usable. > does the coerce th
339.
▲
by
byroot
6y ago
You also have the Ruby solution of calling a `coerce` [0] method on the right hand side. [0] - https://github.com/ruby/ruby/blob/0703e014713ae92f4c8a2b31e3...
340.
▲
by
byroot
6y ago
> I wonder if they considered using something like ptrace to track which .rb files a given test suite loads? It's not really possible as we eager load the entire application on CI. And even if we didn't to trace depedencies lik
341.
▲
by
byroot
6y ago
No. That's inaccurate. Shopify is classic multitenant, but sharded.
342.
▲
by
byroot
6y ago
I work at Shopify. I can confirm that what you are saying is totally false.
343.
▲
by
byroot
6y ago
This isn't about SSD speed. Reading large file is comparable, but there is a very large overhead on the initial file access because of sandboxing. Opening (or deleting) an empty file is about 2.5x slower on OSX than on a Linux running
344.
▲
by
byroot
7y ago
Every single Shopify employee has a laptop they can take home.
345.
▲
by
byroot
7y ago
> It seems that the cost of an additional passenger on a train is almost zero It is. But the cost of the first passenger is massive. Think of all these rails (and the terrain under it you have to pay a hefty price for), all the bridges e
346.
▲
by
byroot
7y ago
That's pretty much where I was getting at. The stack he complains about is very barebone, and I doubt he'd have anything simpler with PHP or any other stack. > rake As you say it's a simple task runner like make. Maybe use
347.
▲
by
byroot
7y ago
This is the app antirez was complaining about: https://github.com/antirez/try.redis It's not even a Rails app. No idea what he was complaining about exactly, but certainly not Rails.
348.
▲
by
byroot
7y ago
To add to this, most webservers will use `sendfile(2)` for static files.
349.
▲
by
byroot
7y ago
The ideal process for Shopify’s needs based on the constraints we have to work with (CI speed, deploy speed, rate of changes, etc).
350.
▲
by
byroot
7y ago
Except that with the amount of activity on the repo it's simply impossible. Every new merge on master would require to rebase several hundred branches being worked on or awaiting reviewed. Multiply this with the hundreds of commits mer
351.
▲
by
byroot
7y ago
No, even with v1, the merge weren't manual. A bot would merge for you, but directly into master. Now the bot merges into a temporary that is fast-forwarded as the new master if CI validates it.
352.
▲
by
byroot
7y ago
It was tested. It's simply that between the time you pushed on your branch, and the time you merged, many other commits made it to the master branch, potentially breaking your branch.
353.
▲
by
byroot
7y ago
The queue is simply an automated "develop" branch.
354.
▲
by
byroot
7y ago
Only a very small subset of them: https://bugs.ruby-lang.org/issues/14240 $/ input record separator (default argument for "gets") $\ output record separator ("print" prints it a
355.
▲
by
byroot
7y ago
> The removal of the flip-flop operator Well that never happened. It was deprecated with the intention to remove it, but they backtracked: https://bugs.ruby-lang.org/issues/5400#note-25
356.
▲
by
byroot
8y ago
> part of the problem is its lack of consideration for large existing codebases running in production That's just untrue. Almost half of the Rails core team works at GitHub and Shopify which both have huge 10 years old codebases and
357.
▲
by
byroot
8y ago
Oh right. I was only thinking of revalidated requests. Thanks.
358.
▲
by
byroot
8y ago
> With `Vary`, there could be many entries matching any cache key I'm curious. Why can't the headers listed in the `Vary` header just be made part of the cache key?
359.
▲
by
byroot
8y ago
No the store doesn't need a supply chain. The distributor who deliver new, filled bottles can take the empty ones back. Which is quite efficient. That's how it works in Quebec for instance.
360.
▲
by
byroot
9y ago
> If Bootsnap is an opt cache I'm all for it. It does integrate with the ISeq API in recent MRIs to acts as an opt-cache yes. It's not what brings most of the performance gain though. > If it's some sort of `require
More ›