HNHacker News
TopNewBestAskShowJobs

marksomnian

936 karma · joined February 3, 2015

DevOpsian and unsalvageable tinkerer.
submissionscomments
marksomnian··on Nintendo Switch Emulator: Progress Report December 2023
This is (I believe) the PR that fixed this specific issue: https://github.com/Ryujinx/Ryujinx/pull/5933

In short, no - from my understanding, it does actually fix the underlying issue, rather than special-casing the game. I wouldn't be surprised if there are a few edge cases like that which are special-cased, particularly for older games (when "abuse" of CPU/GPU quirks was more common to eke out extra performance).

marksomnian··on Sony software updates breaks movie theater projectors
No need to spoof the GPS signal, pop open the lid and replace the GPS chip with one that outputs an attacker-controlled time signal. I suppose it could encrypt this signal with some certificate burned into the silicon, but that could still (slowly and painfully) be reverse-engineered.

GP’s point stands, you can’t enforce a time lock with cryptography primitives. That’s the fundamental issue with DRM - you’re trying to restrict someone from getting your ciphertext, while at the same time allowing them to get to it if they meet certain (non-cryptographic) conditions, which standard cryptography just can’t do.

marksomnian··on European Super League: Uefa and FIFA rules banning breakaway league unlawful
Original ruling: https://curia.europa.eu/juris/document/document.jsf?text=&do...
marksomnian··on The saga of the Closure compiler, and why TypeScript won
Interesting note: React itself uses the Closure Compiler https://legacy.reactjs.org/blog/2017/12/15/improving-the-rep...
marksomnian··on My favorite Erlang program (2013)
It’s a binary protocol though, which means that this specific scenario isn’t an issue as far as I’m aware (the only ways of making arbitrary JS-controlled network requests are XHR/fetch(), which is only HTTP, and WebSockets, which have a handshake mechanism to ensure that the other side is really expecting a WS connection, which Erlang won’t be).
marksomnian··on Making sense of React Server Components
It's not explicitly demonstrated, but the Revalidating Data example (https://nextjs.org/docs/app/building-your-application/data-f...) would do it - calling revalidatePath/revalidateTag from a Server Action will (if the current route matches the path/tag) cause the route to get re-rendered as part of the same round trip.
marksomnian··on Making sense of React Server Components
If you mean updating the page as the result of a mutation, Server Actions (https://nextjs.org/docs/app/building-your-application/data-f..., still in alpha) can do that - Next can re-render a route and send the newly updated UI as part of the response (this is a Next-specific feature, but I can't see why other frameworks couldn't implement a similar pattern around RSCs).
marksomnian··on Making sense of React Server Components
Dan Abramov (React core team, formerly of Meta) talks about this in a Twitter thread: https://twitter.com/dan_abramov/status/1654688751342301184

In short, it's because Vercel invested engineer-years into piloting RSCs as part of a production framework and making Next the guinea pig. Next wasn't actually the first framework to try RSCs - Hydrogen (Shopify) and Gatsby both tried early versions of it and provided feedback, but Next is the first to implement it to the point that it can be considered stable.

The long-term goal is that RSCs aren't a Next-only concept - for example the Remix team said that they wouldn't implement them until they became more stable (https://twitter.com/ryanflorence/status/1678416472010260480), but are working on it now (https://twitter.com/ryanflorence/status/1697253955376722092). But the React team has always historically favoured trying new features in production to iterate on the API (this happened a lot internally at Meta), and this was an opportunity to do that.

marksomnian··on We put half a million files in one Git repository (2022)
But what do you do as soon as one of the submodules has a dependency on another? I imagine you might not hit it in your simple case, but I feel like scenarios like that are where the advantages of monorepos lie.

To take a concrete example, I'm working on a codebase that houses both a Node.js server-side application and an Electron app that communicates with it (using tRPC [0]). The Electron app can directly import the API router types from the Node app, thus gaining full type safety, and whenever the backend API is changed the Electron app can be updated at the same time (or type checks in CI will fail).

If this weren't in a monorepo, you would need to first update the Node app, then pick up those changes in the Electron app. This becomes risky in the presence of automated deployment, because, if the Node app's changes accidentally introduced a breaking API change, the Electron app is now broken until the changes are picked up. In a monorepo you'd spot this scenario right away. (Mind you, there is still the issue of updating the built Electron app on the users' machines, but the point remains - you can easily imagine a JS SPA or some other downstream dependency in its place.)

[0]: https://trpc.io/

marksomnian··on We put half a million files in one Git repository (2022)
Is it? I'm slightly struggling to understand what benefit you gain from having the "parent" repo but also having individual submodules. Sure, working in each individual project's module makes cloning faster, until you need to work on a module that references another module (at which point you need to check out the parent repo or risk using the wrong version), and now every change you make needs two commits (one to the sub-repo, and one to the base to bump the submodule reference),
marksomnian··on Things you forgot (or never knew) because of React
Plus, the power of being able to treat JSX as any other JS object means that you can use standard JS constructs like loops - slightly contrived example:

  const items = [];
  let runningTotal = 0;
  for (const item of someArray) {
    runningTotal += item;
    items.push(<li>Item {item}; running total {runningTotal}</li>);
  }
  return (<ul>{items}</ul>);
The closest example I can find in Vue would require a computed property to implement something like this.
marksomnian··on tRPC – Build and consume typesafe APIs without schemas or code generation
Dropping in a tRPC use case that I've really got a lot of mileage out of: communication between the Electron main and renderer processes using https://github.com/jsonnull/electron-trpc. Traditional Electron IPC is hard to do type safely, which electron-trpc solves, and the react-query integration (meaning you get automatic type-safe hooks to issue the requests) is really nice.
marksomnian··on tRPC – Build and consume typesafe APIs without schemas or code generation
I imagine you could write a custom tRPC link to send the data over something like MQTT which may be better for an embedded client - there's prior art in the likes of electron-trpc, showing how tRPC could be adapted to non-HTTP transports. Not sure how that interacts with the JSON-RPC bits of the subscription protocol though, if there's no way around it then plain MQTT may be better suited to your use case.
marksomnian··on tRPC – Build and consume typesafe APIs without schemas or code generation
It slows down the iteration cycle - when you make a change to your API definitions you'd need to push the change to either a schema repository or into production, then regenerate the API - at which point, if you've accidentally introduced a breaking change, your frontend is already broken - you can work around this with CI that detects breaking changes, but it requires a fair amount of work. Having them in a monorepo means that breaking API changes can fail CI and never make it into production.
marksomnian··on tRPC – Build and consume typesafe APIs without schemas or code generation
I think part of why tRPC shines is because it's tightly coupled to TypeScript (and especially Zod, its schema validation library of choice - many of its features map 1:1 onto TypeScript concepts that don't exist in many other languages), which means it can avoid many of the issues that OpenAPI generators have. I'd also like to see a good TS-first OpenAPI client - Fern [0] is probably the closest I've seen.

In general in my experience, when you take away the constraint of inter-language interop, you get much smoother DX because you can take advantage of language features. A good example would be the lack of native date/time types in JSON - valuable for interop because different languages handle dates differently, but painful when you're going to/from the same language. Web applications are a special case, because the client-side is effectively constrained to either JavaScript or WebAssembly (except you'd still need at least some JS in the latter case), so it follows that you'll get the best DX if you have JS or TS on both sides of the stack, especially if you can set up your project in a way that lets you share code between both. Not always an option, but I've always felt more productive (as a full-stack dev) when I've been using TS on both the client and server, compared to TS on the client and another language on the backend.

[0]: http://buildwithfern.com/

marksomnian··on How to get ChatGPT to stop apologizing?
Doesn’t that predispose that it knows which parts of the distribution do and don’t have mistakes, and therefore that it knowingly makes mistakes unless you ask it not to? That doesn’t seem right to me and I’d be really surprised if this actually makes it stop hallucinating - seems more like something you’d put in the prompt without knowing why because it “seems to” produce better output (i.e. cargo cult prompt engineering).
marksomnian··on The Wikimedia Foundation joins Mastodon and the Fediverse
There's some (vague, nonspecific) goals in the Google Doc linked on the phab ticket (though someone did point out that the doc was created weeks after the ticket was filed).
marksomnian··on The Wikimedia Foundation joins Mastodon and the Fediverse
It's not linked there (or on any Wikitech pages I can find), but I can imagine there's a secondary concern of *.wikimedia.org cookies getting sent to third parties - e.g. Stack Overflow has separate second-level domains (stackoverflow.email/stackoverflow.blog) for their 3rd-party-hosted email service and blog for exactly this reason (cf. https://nickcraver.com/blog/2017/05/22/https-on-stack-overfl...)
marksomnian··on The Wikimedia Foundation joins Mastodon and the Fediverse
There's some background at https://phabricator.wikimedia.org/T337586 - a wikimedia.org subdomain was out of the question due to security concerns (it'd involve giving a third party a SSL certificate for wikimedia.org) [1], and wikimediafoundation.org was ruled out because it could cause confusion about volunteers' relationship to the Foundation [2]

[1]: https://phabricator.wikimedia.org/T337586#8932905 [2]: https://phabricator.wikimedia.org/T337586#8936483

marksomnian··on The Wikimedia Foundation joins Mastodon and the Fediverse
Some background at https://phabricator.wikimedia.org/T337586
marksomnian··on A tiny Docker image to serve static websites
Adding to some of the other responses, one reason I chose to deploy a SPA I'm working on as a Docker image is atomicity - if I want to deploy a newer version I simply switch out the tag in my container orchestrator's config (Nomad in this case, but the same principles apply to k8s and friends) and it's guaranteed that the new deployment will be pristine, without the risk of leftover files from a rsync or similar - and if I need to roll back I do the exact same.
marksomnian··on WebRTC-HTTP ingestion protocol (WHIP)
Very interested to see if there is development in the WebRTC streaming ingest world. As far as I remember, the last major implementation was Mixer’s FTL (which has an open-source SDK implemented in OBS, but the server side was proprietary - though it has been reverse-engineered).

Also interested in comparisons between WebRTC and SRT, in particular for low-latency high-quality streaming (the niche between traditional streaming like RTMP and more conventional WebRTC apps where latency trumps quality).

marksomnian··on Trying Out Generics in Go
In theory yes, because generic types are monomorphised, so I would expect performance to be no less bad than implementing each individually.
marksomnian··on In Response to Oversight Board, Trump Suspended for Two Years
Out of interest, have you read https://www.techdirt.com/articles/20200531/23325444617/hello...?
marksomnian··on Behind GitHub’s new authentication token formats
Surely you can just strip off the prefix in the application layer before sending it to Postgres? You still get the benefits, while being able to use the native query.
marksomnian··on Busiest hour ever in the history of Gov.uk 17M page requests just 21 5xx errors
GDS are clearly aware of this problem and are working on this as well, with "GOV.UK Accounts" [0]

https://gds.blog.gov.uk/2020/09/22/introducing-gov-uk-accoun...

marksomnian··on Ask HN: Was 20% time a good policy for Google's working culture?
I really don't get what you're saying here. You get paid for 100% of your time, you just get to work on something beyond your direct responsibilities that still benefits Google for 20% of it.

If you're alluding to "120% time", fair enough, but that's not what GP was referring to.

marksomnian··on macOS has checked app signatures online for over 2 years
The other main issue is bandwidth. For a CRL, Apple has to serve the full list of revoked serial numbers (or some shard of it), even if 90% of users don’t have 90% of the revoked apps installed. I can’t remember where I read this, but I recall that after the Heartbleed disclosure one CA saw their CRL traffic grow by some number in the gigabits per second. Bandwidth is relatively cheap, but still not free (without even considering the argument of “do I need to know that the cert for an app that I will never use is revoked?”).
marksomnian··on Vaccine hopes rise as Oxford jab prompts immune response among old and young
Randomised Controlled Trial - essentially, take a population, give half of them the vaccine, and half a placebo, and study the reaction.

What you're referring to (voluntarily infecting people) are challenge trials, which are also being discussed, but are still somewhat ethically dubious.

marksomnian··on Easy-wg-quick – Creates WireGuard configuration for hub and peers with ease
NetworkManager seems to handle it fairly well, if you’re running a OS/distro/network stack/desktop that uses it
← PreviousPage 2 of 10Next →