HNHacker News
TopNewBestAskShowJobs

zebracanevra

919 karma · joined July 18, 2014

submissionscomments
zebracanevra··on Cloudflare R2 Pricing
Yes, very true. I think sometimes you may have to do extra work like calculating hashes, but that can likely be taken from the B2 response if it's compatible with R2 or calculated beforehand.

Couple that with the low latency KV and it all shouldn't be too hard to get going! On that note, I hope the overall latency of R2 isn't too bad. I assume it'll all work with CF caching though. B2 was never too good in regard to latency.

I wonder... would the TOS allow storing a huge video on B2, proxying it on the fly to R2, redirecting the user to that, then deleting it afterwards? It does say you'd be charged by gb-month stored...

zebracanevra··on Cloudflare R2 Pricing
I wonder how feasible it would be to keep cold assets on Backblaze B2 and automatically move them to R2 if they get hot enough.

Better yet, seeing as how you get free transfers between Backblaze and Cloudflare, I wonder if the 10ms cpu limit on free workers (or 50ms paid) would be enough to do the entire process on CF's servers.

zebracanevra··on Noto emoji, a new black and white emoji font with less color
I don't understand this criticism in relation with this new "black and white" font. All (non-emoji) fonts are monochrome, and the designer will change the colour as they see fit. Most emoji fonts OTOH were always the same colour regardless of the surrounding text, making designs harder. This font allows it to be coloured and bolded, making it easier to use in a cohesive design.

Colour is a key affordance, and this font only makes it easier to achieve a good UX.

zebracanevra··on I Avoid Async/Await
99% of the time you'll be storing promises in order to await on them in the same async method.

Those other 1% of times make for quite intuitive solutions, I think. For example, a cache. Most caches are request => already finished response, but with a lookup of promises you can easily do request => in-progress responses, for de-deplication.

zebracanevra··on I Avoid Async/Await
If you're doing nothing in between your async calls, using .then/.catch might be simpler.

As soon as you need to introduce local variables and complex control structures, not having shared closures between your .then methods becomes extremely limiting. Hence, the async/await sugar.

About having to add await to ensure your error is handled with the try catch — not putting an await before a promise is something I use all the time. Being able to store tasks/promises and reuse/await them later is a clear advantage to other types of async code (such as coroutines).

zebracanevra··on Dum: An NPM scripts runner written in Rust

    it looks like this could have been implemented in any native language
I use this 30 line bash script, with a dependency on jq. It works for me, and is pretty much instant.

https://pastebin.com/raw/cnDk9zs4

zebracanevra··on Dum: An NPM scripts runner written in Rust
In the past, tools were slow, so everyone was forced to use "watch" modes in their tools, so startup time didn't matter much.

Nowadays, we have esbuild and a whole suite of other tools that run in <10ms, so a slow startup time is dreadful.

zebracanevra··on Monitorian (Windows monitor control app)
Never knew this protocol existed!

And as usual, Nirsoft have a tool: https://www.nirsoft.net/utils/control_my_monitor.html

On my monitor I can even adjust the dark boost settings too (0xEF on the VG279QM)

zebracanevra··on The SSD Edition: 2021 Drive Stats Review
CT250MX500SSD1 is 250gb yet the report shows it as 500gb?
zebracanevra··on Show HN: I made a web game called Almost Pong
Impossible to play on a 280hz monitor. I see you're using Date.now() to calculate the delta. Instead, use the first argument given to you by requestAnimationFrame for higher resolution, which is a DOMHighResTimeStamp[0]

[0] https://developer.mozilla.org/en-US/docs/Web/API/DOMHighResT...

zebracanevra··on Ask HN: Why do I have to use two sliders (system+app) to adjust volume in 2022?
On modern Windows, the system has a volume, and then each app also has a slider in the mixer settings.

Most programs, for example Spotify, then provide another slider on top of that.

A notable outlier is foobar2000. When you change the volume slider in the app, it actually changes it's mixer volume.

zebracanevra··on Fetch API has landed into Node.js
Is there any chance to break spec and allow manual redirect handling? the fetch API makes a lot of sense in a browser, but imo this is a pretty crucial feature that undici's implementation lacks. [0]

Deno decided to break spec [1][2] so the following code works fine:

    fetch('https://httpbin.org/status/302', {redirect: 'manual'})
      .then(res => console.log(res.status, res.headers))
In undici this will succeed but with res.status 0 and no headers, as per spec. You aren't allowed to see the content of a redirect, like in a browser.

[0] https://github.com/nodejs/undici/issues/1072 [1] https://github.com/denoland/deno/pull/8353 [2] https://github.com/denoland/deno/issues/4389

zebracanevra··on Get to Know the New Topics API for Privacy Sandbox
Google claims that untargeted ads bring in 52% of the revenue of targeted ads.

https://www.blog.google/products/ads/next-steps-transparency...

IMO, untargeted random ads are just spam because they aren't relevant. It's like the crap on the back of a shopping receipt...

zebracanevra··on Get to Know the New Topics API for Privacy Sandbox
I hope proposals like this are eventually accepted.

I think it's safe to assume that we are trending towards: people caring more about privacy, browser fingerprinting getting harder, VPNs being standard (e.g. thanks to Apple), and third party cookies for tracking are either prevented by major browsers or governments have legislated against them.

In that situation, at the end of the day, ads will still be here, and targeted ads are necessary for ads to be useful for both user and advertiser.

These measures, where your user agent says what ads would be useful to you, seem perfect to me. For the average user, they give just enough info to ad providers to not be invasive, and for someone who absolutely does not want that, they could likely turn an option on to give random topics.

Right now though, one can argue that this actually gives more data than before (i.e. tracking + topics instead of just tracking), but try to think about the situation in the future.

(I'll still block ads.)

zebracanevra··on Typejuice: Docs generator for .d.ts files inspired by godoc
For that use case, maybe try https://www.jsdocs.io/ ?

Works well in my tests.

Here's some discussion from when it was last posted: https://news.ycombinator.com/item?id=27107832

zebracanevra··on Should You Use Upper Bound Version Constraints?

  If a library requires pyparsing>=3 and another library requests pyparsing<3, that’s the end, you are out of business.
This article is very much only applicable to Python and other package managers that don't scope dependencies. I think nuget (.NET) also works like this.

In Nodejs land, if you depend on pkg v3, and another dependency needs v2, they'll happily co-exist with no trouble, as long as those v2 and v3 didn't need to talk to each other. If you did only want one version of a package, that is also supported with peerDependencies.

zebracanevra··on Why are German numbers backwards?
Sorry, but English speaking countries that use DMY simply say "4th of January", and it in no way doesn't make sense.
zebracanevra··on YouTube Dislikes Viewer
I use the Like button because it adds the video into the private "Liked" playlist. Handy, one click, good workflow.
zebracanevra··on Javascript RORO pattern
FWIW, VS Code has "inlay hints" added in August 2021 which provide one solution to this problem: https://i.imgur.com/1NUmYON.png

https://code.visualstudio.com/updates/v1_60#_inlay-hints-for...

zebracanevra··on Google digital advertising antitrust litigation [pdf]
equating it to be merely like HTTPS in terms of publishers giving up control over their content.

Where did you read that? I was under the impression that SXG is more similar to things like IPFS, where you can have content signed by its origin (or in IPFS, content addressed by its hash). Once that is achieved, any other site (e.g. a CDN like Google or Cloudflare) can cache and serve it securely and with authentication.

You can sign whatever content you want with SXG, it isn't limited to AMP.

zebracanevra··on Netlify Leaking User Data in Querystrings (Again)
Netlify's caching for dynamic data has been broken for a long time.

For example, Functions cache on the path only, excluding any query strings. This was reported in May 2020 [0], still unfixed. This means you cannot have any content that you want cached in a query string. It must go in the path.

I just deployed a test site now[1]. Try modifying the query string params. No matter what you change, the first request/response is cached (for 10 seconds 'cache-control: public, max-age=10')

[0]: https://answers.netlify.com/t/netlify-function-with-query-st...

[1]: https://zen-blackwell-f7a1bd.netlify.app/.netlify/functions/...

zebracanevra··on We halved the publish size of modular AWS SDK for JavaScript clients
If you're having trouble with node_modules size, do yourself a favour and try PNPM[0]. It's another npm/yarn. It installs each npm module into a local store first, then creates a bunch of hardlinks and symlinks in your project's node_modules. End result, no matter how many duplicate dependencies you have installed (for example this AWS SDK), you only store one of them on your disk. Plus, it's super fast.

[0] https://pnpm.io/

zebracanevra··on Mechanical sympathy for QR codes: making NSW check-in better
I find that the codes will in fact scan if you use a third party QR app. Luckily, the URL will open directly to the Service NSW app's sign in page, so whoever was in charge of that got something right.

I can't wait to see how dreadful the vaccination passport apps will be. With the current "digital certificate" being a pdf with zero security, it is sure to be laughable.

zebracanevra··on [dead]
GBoard allows you to remove words, and the gesture is very simple. For example, "pepsi" is corrected to "Pepsi" but who wants that. So, just type "pepsi", and "Pepsi"'ll appear in the bar above the keyboard. Drag it up, and it won't be corrected again. Easy. As usual with gestures, zero affordance...
zebracanevra··on Ask HN: Are you also getting extremely obvious spam bypassing Gmail's filters?
I was getting multiple emails like this per day a couple of weeks ago: https://i.imgur.com/m8nmpTr.png

But they seem to have stopped... for now. It was quite aggravating.

zebracanevra··on Cloudflare Images Now Available to Everyone
but this is an image resizing service, right? shouldn't you be uploading the highest quality original source?

I would've thought the workflow for these would be to upload a high quality source, and then the service creates lower quality/optimised variants.

I guess you have a limit as it is priced on total images stored and not storage/cpu used...

zebracanevra··on Chrome user agent string reduction
these user agent values leak data about your system, why would you want them to be sent unencrypted? loads and loads of new web APIs are moving to HTTPS only. this is not a Google specific thing.

It's worth to note that Mozilla's position on this proposal is "harmful": https://github.com/mozilla/standards-positions/issues/552

zebracanevra··on Using Saliency in progressive JPEG XL images
See https://lists.webkit.org/pipermail/webkit-dev/2021-May/03184... and https://lists.webkit.org/pipermail/webkit-dev/2021-May/03185...

> image format support depends on OS library support, rather than anything in WebKit. [...] to be clear, Apple’s OSes do not currently support JPEG XL.

zebracanevra··on Using Saliency in progressive JPEG XL images
See https://github.com/libjxl/libjxl/pull/466 for more details.

As far as I understand it, the synthetic mode compresses better for (as you can guess) synthetic content. So if you're encoding a mixed content screenshot, you'll get better quality and size by encoding the photos and UI separately.

zebracanevra··on Using Saliency in progressive JPEG XL images
It doesn't matter too much (for the web) as you can use <picture> and <source> and specify multiple jxl/avif/webp/jpeg sources, and the browser will choose the first type it understands. These elements are widely supported.

Hopefully JXL doesn't become yet another image format (927)... some features of it are incredible. For example, you can have mixed lossless/lossy content in one image. No longer will you need to choose between a lossy or lossless format: the encoder would intelligently segment the image.

← PreviousPage 3 of 4Next →