HackerTrans
トップ新着トレンドコメント過去質問紹介求人

silverlyra

no profile record

コメント

silverlyra
·3 か月前·議論
after word spreads of easy pickings, funds swell into bankruptcy rate contracts. the success stabilizes average losses across Kalshi portfolios; the bankruptcy rate falls.

after smart money then moves to predicting the period of the oscillations, …
silverlyra
·2 年前·議論
I was curious and dug into the Go client code. You linked to the definition of KV – the easiest way to create one is with NewKV [1], which internally creates a RetryKV [2] wrapper around the Client you give it.

RetryKV implements the KV methods by delegating to the underlying client. But before it delegates an immutable request (e.g., range), it sets the request retry policy to repeatable [3].

Retries are implemented with a gRPC interceptor, which checks the retry policy when deciding whether a request should be retried [4].

The Jepsen writeup says a client can retry a request when “the client can prove the first request could never execute, or that the request is idempotent”. In my (cold) read of the code, the Go client stays within those bounds.

For non-idempotent requests, the Go client only retries when it knows the request was never sent in the first place [5]. For idempotent requests, any response with gRPC status unavailable will be retried [6].

Unlike jetcd, the Go client’s retry behavior is safe.

[1] https://github.com/etcd-io/etcd/blob/main/client/v3/kv.go#L9... [2] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go... [3] https://github.com/etcd-io/etcd/blob/main/client/v3/retry_in... [4] https://github.com/etcd-io/etcd/blob/main/client/v3/retry_in... [5] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go... [6] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go...
silverlyra
·2 年前·議論
The linked issue was reported on an Android player app; the underlying yt-dlp issue seems to be https://github.com/yt-dlp/yt-dlp/issues/10397 (intermittent HTTP 403 Forbidden responses from YouTube when downloading videos).
silverlyra
·2 年前·議論
If you want to precisely capture when a field must be present (or will always be set on the server), the field_behavior annotation captures more of the nuance than proto2's required fields: https://github.com/googleapis/googleapis/blob/master/google/...

You could (e.g.) annotate all key fields as IDENTIFIERs. Client code can assume those will always be set in server responses, but are optional when making an RPC request to create that resource.

(This may just work in theory, though – I’m not sure which code generators have good support for field_behavior.)
silverlyra
·2 年前·議論
yes – the trawling pattern in the GIF is over (part of) the area marked as damaged in the NRK article: https://www.nrk.no/tromsogfinnmark/this-is-what-the-damaged-...
silverlyra
·2 年前·議論


  Location: San Francisco Bay Area (Oakland)
  Remote: yes
  Willing to relocate: no
  Technologies: Rust, Go, TypeScript, Kubernetes, AWS, Terraform, GraphQL
  Résumé/CV: https://lyra.engineer/resume.pdf
  Github: https://github.com/silverlyra
  Email: lyra+hn [at] omg.lol
I'm an experienced infrastructure and full-stack engineer. Over my time working at Medium, I led the redevelopment of its production environment, migrating the whole site and all services onto Kubernetes, and facilitating safe continuous deployment for all engineering teams. I can serve as a tech lead of a team or a project, working across a company to get things done, and also as a staff+-level IC in smaller companies or greenfield projects.
silverlyra
·2 年前·議論
If you use SharedArrayBuffers in worker threads, use Atomics.wait to block, and then terminate the worker which would've called Atomics.notify – yes, if no timeout is used on the notify.

But I don't know of any other way this would happen.
silverlyra
·2 年前·議論
I believe that day has already come: https://nodejs.org/docs/latest-v20.x/api/worker_threads.html...

When you create a Worker with the worker_threads module, Node spawns a new V8 isolate in the same process: https://github.com/nodejs/node/blob/v20.12.1/src/node_worker...

It’s much more isolation than C threads – the entry point for a thread is a whole module (not a function), and threads must use message passing to communicate. They can share memory, but only via [Shared]ArrayBuffer objects. They're in the same OS process, but each have their own global process object.

But I think it'd meet your need for an in-process isolated execution environment, which you can terminate from the main thread after a timeout.
silverlyra
·2 年前·議論
> Hertz could have become the EV rental company if they turned every rental office they have in the US to a fast charging center

They did build out fast charging – but at some locations, the local electric utility couldn't support it:

> While the company had installed its own charging network as part of the electrification push that started in 2021, some older airports, such as New Jersey’s Newark, don’t get enough power from the electricity grid or lack the infrastructure to support the number of so-called Superchargers that Hertz needed to get EVs back on the road in a half-hour or less. Once a Tesla was returned to those locations, Hertz employees often had to drive them for miles to find a Supercharger[…]

The image of Hertz staff driving around Jersey, searching for an open supercharger any time a Tesla needed a fast turnaround … tragicomedy.

I would think that only a gradual pilot rollout of Tesla rentals could have saved this from getting out of hand. Instead they ordered 100,000 full-price Teslas, and congratulated themselves on getting a lock on a market … a market which proved to be much smaller and more expensive to serve than they'd imagined.
silverlyra
·2 年前·議論


  curl -sL https://github.com/backblaze-b2-samples/cloudflare-b2/raw/main/README.md | head -n 1
  # Cloudflare Worker for Backblaze B2
yes, it's a worker
silverlyra
·2 年前·議論


  Location: San Francisco Bay Area (Oakland)
  Remote: yes
  Willing to relocate: no
  Technologies: Rust, Go, TypeScript, Kubernetes, AWS, Terraform, GraphQL
  Résumé/CV: https://lyra.engineer/resume.pdf
  Github: https://github.com/silverlyra
  Email: lyra+hn [at] omg.lol
I'm an experienced infrastructure and full-stack engineer. Over my time working at Medium, I led the redevelopment of its production environment, migrating the whole site and all services onto Kubernetes, and facilitating safe continuous deployment for all engineering teams.

I can serve as a tech lead of a team or a project, working across a company to get things done, and also as a staff+-level IC in smaller companies or greenfield projects.
silverlyra
·2 年前·議論
Looks like it does – you can add a rule to set the enabled option to false for all devDependencies. It’s the third example in the docs for the enabled option:

https://docs.renovatebot.com/configuration-options/#enabled
silverlyra
·2 年前·議論
> when this was a primarily agrarian country

it sounds ironic, but much of the shift to suburban development patterns in the USA was indeed driven by the Great Migration into cities – specifically, the migration of formerly-enslaved Black Americans out of the rural south and into cities. US public policy was very explicit about disinvesting in cities and destroying vibrant urban neighborhoods, replacing them with freeways and parking lots.

today, large portions of US cities are zoned for exclusively single-family homes, and other zoning requirements like parking minimums, and minimum setback and lot sizes continue to slow urban, transit-oriented redevelopment.
silverlyra
·2 年前·議論
and this gets me wondering; what could we accomplish if we took 0.2% of the time we spent writing (let alone reading) internet comments, and instead used that time to engage in our state democratic processes, and help update our public school education standards to build a robust civil society!

my high school made sure I knew how to use both a band saw and a stand mixer; why not a courtroom? that's a systemic failure we could yet address
silverlyra
·2 年前·議論
hey, fwiw, I don’t regret your raising it, and I appreciate that you’ve been engaging with me :)

I would love for this thread to accomplish something other than meta rifraff, so — I’ve never worked as an Apple Store floor sales person, but:

> In the 90's, a USB cable was just four braided wires – literal copper wires which link copper pins in your [computer] with your [printer]. Two of them carried the data, and the other carried power and ground. This worked, and it was an affordable, easy-to-implement standard which spread like dandelion seeds on the wind.

> Now in the 2020's, we have USB-C. Have you ever had a kind of “friend” who tries to be “everything to everyone“? Well, that‘s USB-C.

> We fixed some things with USB A and mini – er, micro – B, like how hard they were to plug in, and how you invariably seemed to find yourself holding them upside down more than 50% of the time!

> And, well, engineers being engineers, and USB standing for universal serial bus, we tried to also solve all other problems at the same time. Like you couldn’t use a USB cable for video, or to power an air fryer.

> So, these days, USB cables are more than braids of copper wire. They are “active” cables! meaning they have a microchip inside. Even our cables became little computers.

> And we kept backwards compatibility with USB, so that if you use a plug adapter, you can take an original 90’s USB mouse and plug it right into your brand new iPhone n±1!

> Or nowadays, you might grab the wrong cable in your kitchen, and plug your toaster oven into your iPhone. yikes! I know you came in to the store today with a simple-seeming question, and we’ve been standing here now for minutes, and I apologize – but now I hope I can answer your question about why this cable isn’t recognized by your new phone.

> When an active cable is plugged in, the chip inside the cable “negotiates” with the chip inside the device. For a device you hold in your hand and use without thinking about it, like your phone, we have made the negotiator more stringent than we did in our tablet. :)
silverlyra
·2 年前·議論
I would gladly say you’re welcome – yet I believe your edit exacerbates the issue

you speak of a “secret” Made For iPhone program as if that’s still some conspiracy – https://mfi.apple.com/

my read of the article is that the EU commissioner advised Apple that if the company attempted to negate the USB-C regulations by only allowing full access to Apple devices connected via a cable with an Apple-approved MFi chip… that indeed they would be held accountable by the EU. had that been the case, it would be Apple continuing its regime of connector control over its users’ devices, as it has done up til now by insisting on MFi-certified Lightning cables
silverlyra
·2 年前·議論
hi, I also read this website and sometimes comment on it. after I read your comment, I ran the query “apple usb-c eu commissioner warning” through an internet search engine, and I found this article – https://www.macrumors.com/2023/05/04/eu-warns-apple-about-li...

> It was rumored in February that Apple may be planning to limit charging speeds and other functionality of USB-C cables that are not certified under its "Made for iPhone" program. […] In response to this rumor, European Commissioner Thierry Breton has sent Apple a letter warning the company that limiting the functionality of USB-C cables would not be permitted and would prevent iPhones from being sold in the EU when the law goes into effect.

I would posit that a commenter with a sincere wish to dispel “conspiracy theories” might instead take a moment to do that search themselves instead of posting this (pardon me) inflammatory remark!
silverlyra
·3 年前·議論
now I am wondering about the net social benefit of solar power disincentivizing third-shift (overnight) production. cheaper electricity during the day makes it relatively more expensive to operate heavy industry plants 24/7.

the heavy investment that goes into those plants incentives operators to drive (and staff) them 24/7, but there are hidden social costs (negative externalities) of having so many people out of diurnal rhythm. maybe massive solar power buildout, with sharply cheaper daytime electricity, would relieve people from working “graveyard shifts” – and maybe that’d be a good thing
silverlyra
·3 年前·議論
When seeing Prettier as a software tool, to consider Prettier more “foundational” than (e.g.) TypeScript or V8 does seem like an inversion of hierarchy [1] – but viewed as history, as a practice, Prettier’s accomplishment of making automatic code formatting (à la `go fmt` or Python `black`) widespread in JavaScript, the lingua franca of programming, is foundational.

All that time spent staring at code that could have been more readable, or writing style guides and reformatting code, is now spent doing what we were trying to do in the first place. And now, speeding up the time we wait to apply formatting or check it in CI by rewriting it in Rust™ gives us a bit more of that time back. :)

[1]: https://youtu.be/ar9WRwCiSr0
silverlyra
·3 年前·議論
Wow, thank you for posting this. I’ve been kinda curious to try Fish over the years, but seeing this message from one of the maintainers – how mature and well-reasoned, how both charmingly joking and firmly assertive it is – now really gets me thinking that I’ve been missing out on using an excellent project.