HNHacker News
TopNewBestAskShowJobs

gardaani

1,590 karma · joined August 31, 2018

submissionscomments
gardaani··on JPEG XL
When is JPEG XL ready for use? Wikipedia [1] says that Part 4 will be released in 2022?

[1] https://en.wikipedia.org/wiki/JPEG_XL#Standardization_status

gardaani··on Code in ARM Assembly: Registers Explained
Thanks! I had a closed look at them and the naming is starting to make sense: Q=quad, D=double, S=single, H=half, B=byte (except the article claims that V=128bit and there's no mention of H or B)

For general purpose registers: X=long (64-bit), W=word (32-bit)

gardaani··on Code in ARM Assembly: Registers Explained
Is there a reason for giving registers a different name depending on its value's length (D0 = 64-bit, S0 = 32-bit)?

I can never remember which names are mapped to the same register. I've had that issue on x86 and I'll have that issue on ARM.

I loved how Motorola 68000 made it simple. Each command had a dot-letter suffix indicating the length: move.b d0, d1

gardaani··on Stripe Tax
Paddle has a good article about this: "..the taxes apply not only to where your company has a physical presence (an office or employees) but to where your customers are based." https://paddle.com/blog/global-sales-taxes-for-software-comp...

It seems to be a huge mess. Even if you know how much to pay for different countries, registration for paying taxes can be painful.

gardaani··on IconVG is a compact, binary format for simple vector graphics
Google has Android Vector drawables: https://developer.android.com/guide/topics/graphics/vector-d... . I think that they are compiled to binary XML (undocumented).

It would be nice to see size and performance comparisons between IconVG, SVG native (gzipped), Haiku vector images and AVD binary format.

gardaani··on RFC 4180: Common Format and MIME Type for CSV Files (2005)
The reason I don't like CSV is that CSV files can use any text encoding: ASCII, ISO-8859, UTF-8.. It's not nice to try to guess the encoding when reading files.

RFC 4180 also fails to define the default text encoding. It seems that text encoding can be given only when MIME type is given for the file.

JSON is so much easier.

gardaani··on I quit my job to focus on SerenityOS full time
He has a lot of happy commits! :^) https://happy-serenityos.linus.dev
gardaani··on Coinbase outages
According to Binance, Bitcoin just went down from $42k to $30k in 2 hours. Elon Musk selling his cryptocurrencies??
gardaani··on Google Docs will now use canvas based rendering
Isn't Flutter intended exactly for this use case? If Google Docs won't use Flutter then I'd say Flutter has failed badly.
gardaani··on Fungi on Mars? Evidence of Growth and Behavior from Sequential Images [pdf]
It would be really neat if we had a robot on Mars that could just drive over, pick something up and put it under a microscope and in a test tube.

Where are Curiosity and Perseverance when they are needed??

gardaani··on Intent to issue €2.5M fine to Disqus over GDPR breaches
"Disqus breached the accountability principle by wrongfully considering the GDPR did not apply to data subjects in Norway"

Interesting that Norway isn't part of EU, but they implement GDPR.

gardaani··on Using <details> for menus and dialogs (2019)
Which one is better for accessible menus: <details> or using a checkbox hack? I assume both require some aria attributes to mark that the element is a menu.
gardaani··on Show HN: Emojicons
Ouch. We have come to the point where rendering a favicon requires a full web browser rendering engine.
gardaani··on Unicode Proposal – Textile Care Symbols
Underwear should be washed on 60 degrees to prevent any germs spreading.
gardaani··on PostGIS – Spatial and Geographic Objects for PostgreSQL
Here's an interesting performance comparison of PostgreSQL with PostGIS and MongoDB. PostgreSQL outperformed MongoDB in almost all their cases. https://link.springer.com/article/10.1007/s10707-020-00407-w

I've decided to use PostgreSQL in my projects.

gardaani··on USB 3.0* Radio Frequency Interference on 2.4 GHz Devices (2012)
When I connect my external SSD to my MacBook, wifi dies because it operates at 2.4 GHz. I fix it by placing a metal plate (such as a mobile phone) over the wire between MacBook and SSD. It also helps to switch from the left side USB port to the right side USB port.
gardaani··on All my servers have an 8 GB empty file on disk
Early Symbian apps are an excellent example how to write apps so that they don't crash when storage or memory becomes full. They just show an error dialog and the user can still use the system to free storage or memory. Modern phone apps either crash or the entire phone crashes in similar situations.
gardaani··on Sensible macOS Defaults
"the dealbreaker for me was dropping 32 bit support"

Funny. I decided to drop Ubuntu Linux because they dropped support for 32 bit CPUs. I switched to FreeBSD.

gardaani··on Firefox 86.0
Would it make sense to skip AVIF and add JPEG XL instead or wait for WebP2? JPEG XL and WebP2 have better image features, such as progressive loading.
gardaani··on Where Everything Went Wrong: Error Handling and Error Messages in Rust (2020)
I totally agree. I love Swift's guard let. It makes early returning [1] easy:

    guard let value = optvalue else {
        return // optvalue is none
    }
There has been several proposals [2][3] to fix it in Rust but they don't seem to go anywhere.

I'm using this in my own code now to unwrap or return (it looks stupid):

        let value = if let Some(value) = optvalue {
            value
        } else { // optvalue is none
            return;
        };

[1] https://szymonkrajewski.pl/why-should-you-return-early/

[2] https://github.com/rust-lang/rfcs/issues/2616

[3] https://github.com/rust-lang/rfcs/pull/1303

gardaani··on Svgrepo: Browse SVG vectors and icons
Creating your logo yourself will protect against copyright claims, but it won't protect against trademark violations.

Apple sued Prepear because Prepear's logo looked too much like the Apple logo [1]. Prepear spent lots of money to defend themselves and finally made a small change to the logo to make Apple happy.

I think the lesson is to be prepared to change icons and logos swiftly when another legal entity sues for copyright or trademark violation.

[1] https://9to5mac.com/2021/02/09/apple-and-prepear-reach-an-ag...

gardaani··on SVG: The Good, the Bad and the Ugly
W3C is defining SVG Native [1], which is a subset of the full SVG spec. The plan is to use it in font files and it should be a nice format for native apps. It removes support for CSS, the style attribute and lots of extra syntax. Even the XML parsing is made simpler by not requiring support for XML entities. Compression with gzip should create fairly small files.

By reusing the SVG format, it is still compatible with existing tools, such as Adobe Illustrator and Inkscape (meaning that they can open SVG Native files).

Adobe even has an open source renderer for SVG Native [2].

[1] https://svgwg.org/specs/svg-native/

[2] https://github.com/adobe/svg-native-viewer

gardaani··on Dependency Confusion: How I Hacked Into Apple, Microsoft and Other Companies
At the moment, there's a story about github1s.com on the front page of HN and people are asking how to give it access to their company private repos [1][2]. Scary.

[1] https://news.ycombinator.com/item?id=26087017

[2] https://news.ycombinator.com/item?id=26086789

gardaani··on How to run FreeBSD 13 in QEMU on Apple Silicon Mac
Linux can be run on Virtualization.framework on Mac M1 without qemu [1].

Would it be possible to run FreeBSD similarly without qemu?

[1] https://github.com/evansm7/vftool

gardaani··on Apple Silicon M1 supports “billion of colors” a.k.a. HDR 10-bit output
Yeah, Apple documentation isn't always so great. A month ago HT210980 still claimed that MacBook Air M1 can't play HDR on external displays [1]. It nice that they have now updated that document.

[1] https://web.archive.org/web/20201218041928/https://support.a...

gardaani··on AVIF support enabled by default in Firefox 86
Safari already supports playing MP4 in <img> tags [1]. I think that's how "animated GIF" type of animations should be handled in the Web.

It's silly that there are video formats with excellent compression but image formats want to reinvent it (such as animated PNG, animated WebP, animated AVIF...). It just adds extra complexity to image formats.

[1] https://developer.apple.com/documentation/webkit/delivering_...

gardaani··on How to convert existing web extensions for Safari
uBlock Origin is GPL licensed software. GPL isn't compatible with the App Store Terms of Service: https://www.fsf.org/news/2010-05-app-store-compliance
gardaani··on App privacy labels now live on the App Store
Apple seems to want to show privacy labels even for anonymized data which isn't linked to the user. Here's their App Store app showing category "Data Not Linked to You": https://support.apple.com/en-us/HT211971
gardaani··on App privacy labels now live on the App Store
Another strange one is "Browsing History: Information about content the user has viewed that is not part of the app, such as websites"

Apple requires apps to have a web site for customer support. Almost every web server logs anonymous data about visited pages. So, almost every apps need to have "Browsing History" checked??

gardaani··on Apple’s “Extended Dynamic Range” Brings HDR to Non-HDR Displays
> The problem is sources of color data that don't have a tag. CSS is a big offender. CSS doesn't specify the colorspace of colors, so typically browsers will just send whatever is in there directly to the display.

CSS defines that all hex and rgb() colors are always in the sRGB colorspace. There is also support for other colorspaces, such as P3 and Adobe RGB. [1]

The Safari web browser does color management for wide gamut displays correctly, so #ff0000 looks correct and not too vibrant. The biggest offenders are Chrome and Firefox, because they are not color managed. Those web browsers (and Windows) give you the wrong colors.

> There are also plenty of images out there that don't include color space tags, so it's undefined as to what colors they're actually trying to display. Some software assumes sRGB.

Images without colorspace tags have been defined to be sRGB images by the web specs [1] and all web browsers should already do that. Other software may do something else, as you said. I hope all software will copy how web does it.

[1] https://www.w3.org/TR/css-color-4/

← PreviousPage 5 of 9Next →