Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
byroot
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
61.
▲
by
byroot
1y ago
> Several of the people removed are employees or contractors of Ruby Central. Who? > Not to mention it's post-facto in that they did all of this before notifying anyone. Isn't that pretty much the number one rule when restri
62.
▲
by
byroot
1y ago
Organizations are necessarily slower to communicate than individuals, give them a couple days. People need to chill out before jumping to conclusions like that.
63.
▲
by
byroot
1y ago
> What we've witnessed over the past week Who is "we"? And what did they witness? All we got right now is one side of the story. It is indeed surprising such change wouldn't be immediately followed by a public announc
64.
▲
by
byroot
1y ago
Same. Python’s virtual env always seemed to me like a weirdly complicated workaround for the limitations of the Python package managers. Ruby/Bundler doesn’t have any of these problems, and nothing on their roadmap really excite me. E
65.
▲
by
byroot
1y ago
Yes, this is due to the effort to extract stdlib code into gems https://stdgems.org/ In your case, StringIO use to just be stdlib code so bundler (or rubygems) uses it. Later on it became a gem, so by requiring it before re
66.
▲
by
byroot
1y ago
> Dont feel obliged to further discuss Just clarifying this one: > I do not understand why the option to do so would not have helped in the hacker issue. Because users aren't omnipotent. When a user need to parse some JSON, they&
67.
▲
by
byroot
1y ago
> but why not let devs set `allow_duplicated_key: false` manually in contexts where it matters? Because that wouldn't have prevented the issue I linked to. Default settings are particularly important, because most of the gem's
68.
▲
by
byroot
1y ago
If you don't care about duplicated keys, all you got to do is to set the `allow_duplicated_key: true` option. The whole point of the article is to explain why while I have empathy for code owners that will be impacted by various change
69.
▲
by
byroot
1y ago
`json` is a "default gem": https://stdgems.org/ Meaning Ruby ships with that gem pre-installed, but it's still a gem and you can upgrade/downgrade it in your gemfile if you so chose. As for `require &quo
70.
▲
by
byroot
1y ago
No need to be worried about that. French law (like most others I presume?) is all about intent. e.g. to be convicted of trespassing, it has to be proven you knew you were trespassing, or at least that you reasonably should have known. So no
71.
▲
by
byroot
1y ago
From: https://www.lemonde.fr/pixels/article/2025/02/07/le-parquet-... Deepl translation of the relevant part: > At the heart of this investigation lies a legal innovation. Mr. Bothorel's ale
72.
▲
by
byroot
1y ago
> Would love feedback on the API design I'd suggest to drop the DSL, at the end of the day, a good old class with a constructor stored in a constant is much more more transparent: class PaymentService STRIPE_CIRCUIT = Br
73.
▲
by
byroot
1y ago
There's no need for ref counting, since Ruby has a mark & sweep GC. The interned string table uses weak references. Any string added to the interned string tables has the `FL_FSTR` flag set to it, and when a string a freed, if it h
74.
▲
by
byroot
1y ago
That's not quite how Ruby and similar languages like Python or JS work. Variables don't "contain" a string, they just point to objects on the heap. So: my_string = same_string = "Hello World" Here both
75.
▲
by
byroot
1y ago
Even if you have an incompatible codebase that you don't wish to convert, you'll be able to set `RUBYOPT="--disable-frozen-string-literal"` so it keeps running. And since that flag really doesn't require lots of wor
76.
▲
by
byroot
1y ago
First, only literal strings are concerned. Second, Rails's `String#html_safe` method's return value is a new instance, it doesn't mutate the receiver in place.
77.
▲
by
byroot
1y ago
Yes: https://bugs.ruby-lang.org/issues/20205#note-34
78.
▲
by
byroot
1y ago
> I'm just a bit surprised that they devised this long path The original plan was to make the breaking change in 3.0, but that plan was canceled because it broke too much code all at once. Hence why I proposed this multi-step plan t
79.
▲
by
byroot
1y ago
Nah. If anything it's NodeJS that ate Rails' lunch. Around 2013/2014 it took over as the defacto default stack for startup.
80.
▲
by
byroot
1y ago
Not certain what you mean by "virtual method cache", the Ruby VM has multiple layers of method cache (or call cache) but I've never heard any of them referred to as the "virtual method cache". For the inline call ca
81.
▲
by
byroot
1y ago
As a rule of thumb you never want to use OpenStruct. It's basically soft deprecated at this point because of its atrocious performance.
82.
▲
by
byroot
1y ago
The `method_missing` signature isn't correct since Ruby 3.0, as it doesn't handle keyword arguments. It should be: def method_missing(name, *args, **kwargs, &block) Starting from 3.1 it can be: def method_missin
83.
▲
by
byroot
1y ago
Shopify would benefit a ton from "some" namespaces. In a way, packwerk[0] was an attempt at bringing some namespaces benefits. But I don't personally think Shopify would benefit from this specific implementation of namespaces
84.
▲
by
byroot
2y ago
Can't believe this still has to be debunked. No Phlex certainly isn't 12x faster than ERB. It's noticeably slower than ERB, e.g.: https://github.com/KonnorRogers/view-layer-benchmarks/commit... In s
85.
▲
by
byroot
2y ago
Less extreme, but similar, a French researcher on his way to a conference was denied entry and his laptop and phone were searched and confiscated: > The source said the scientist in the space sector underwent a random check on > arriv
86.
▲
by
byroot
2y ago
That helps a bit but doesn't solve everything. If you want to make a CI performant, you'll need to use some of its features like caches, parallel workers, etc. And GHA usability really fall short there. The only reason I put up wi
87.
▲
by
byroot
2y ago
The Ruby concurrency story is fine, the problem is parallelism. I have a whole list of posts about all that. > it's not http/2 fault, but rather ruby My post is to be read primarily in the context of Ruby, as the intro clearly
88.
▲
by
byroot
2y ago
This may be true with some stacks, but my answer has to be understood in the context of Ruby where the only real source of parallelism is `fork(2)`, hence the natural way to write server is an `accept` loop, which fits HTTP/1 very well
89.
▲
by
byroot
2y ago
You are correct about the first assumption, but even without encryption dealing with multiplexing significantly complexify things, so I still stand by that statement. If you assume no multiplexing, you can write a much simpler server.
90.
▲
by
byroot
2y ago
> One thing the article gets wrong is that non-encrypted HTTP/2 exists Indeed, I misread the spec, and added a small clarification to the article.
More ›