HNHacker News
TopNewBestAskShowJobs

GlitchMr

1,509 karma · joined May 17, 2013

submissionscomments
GlitchMr··on Calculating Go type sets is harder than you think
Additionally, they do in fact have a timeout for build process in the Go playground. I tried running https://go.dev/play/p/mwyBUjcKvAo, and it says "timeout running go build".
GlitchMr··on Nvidia releases open-source GPU kernel modules
According to README:

> There will likely only be one git commit per driver release.

GlitchMr··on Experience Report: 6 months of Go
> `filepath.Clean()` is not called `filepath.Canonicalize()`

Canonicalization of a path is a different operation, as a name suggests it returns a canonical path to a resource. The idea being that if you happen to have two paths that refer to the same file (say, `/bin/sh` and `/usr/bin/sh`) then you should be able to pass those to path canonicalization function to get the same string for both. This is not what `filepath.Clean` does, so calling it `Canonicalize` would be confusing.

For example, in Rust the following program when run in Rust playground (https://play.rust-lang.org/?version=stable&mode=debug&editio...) will output /usr/bin/dash:

    fn main() -> std::io::Result<()> {
        println!("{}", std::fs::canonicalize("/bin/sh")?.display());
        Ok(())
    }
Meanwhile, Go's `Clean` function is only concerned about lexical processing and ignores the file system entirely and would return `/bin/sh` here, as none of rules `Clean` uses apply.
GlitchMr··on Show HN: Prevent your computer sleeping with just a webpage
Most of the JavaScript is two empty videos encoded in WebM or MP4, encoded using Base64 to be stored in plain text, and picked depending on what the web browser supports. Considering I doubt that video formats are designed with empty videos in mind, this is probably not too bad. As for why videos are here, they are a fallback in case web browser doesn't provide Screen Wake Lock API (in particular, Safari and Firefox don't).
GlitchMr··on What made the NES so interesting?
The problem is that Nintendo is not consistent about NES palettes either. Their different emulators all have different palettes, https://emulation.gametechwiki.com/index.php/Famicom_color_p... goes as far as to suggest their latest emulator (the one that is part of Nintendo Switch Online service) has as many as 12 different palettes where the palette picked depends on a game. Nintendo did have NES-based arcade systems that used RGB, however the problem is that their color choices were really ugly.
GlitchMr··on It's always been you, Canvas2D
Google, Facebook, Reddit, Amazon, TikTok. I entered main pages of those websites, and they tried reading pixels of an invisible canvas for whatever reason.
GlitchMr··on Consent, GDPR and Google Analytics
GDPR recital 23 says the following:

> In order to ensure that natural persons are not deprived of the protection to which they are entitled under this Regulation, the processing of personal data of data subjects who are in the Union by a controller or a processor not established in the Union should be subject to this Regulation where the processing activities are related to offering goods or services to such data subjects irrespective of whether connected to a payment. In order to determine whether such a controller or processor is offering goods or services to data subjects who are in the Union, it should be ascertained whether it is apparent that the controller or processor envisages offering services to data subjects in one or more Member States in the Union. Whereas the mere accessibility of the controller's, processor's or an intermediary's website in the Union, of an email address or of other contact details, or the use of a language generally used in the third country where the controller is established, is insufficient to ascertain such intention, factors such as the use of a language or a currency generally used in one or more Member States with the possibility of ordering goods and services in that other language, or the mentioning of customers or users who are in the Union, may make it apparent that the controller envisages offering goods or services to data subjects in the Union.

GlitchMr··on Consent, GDPR and Google Analytics
This is such a weird argument. Let's say those things are true (and I think they are reasonably true).

- When an EU citizen requests a US internet resource, they provide a US server with their IP address

- An IP address is PII (well, personal data as far GDPR is concerned, but that's a nitpick)

- The CIA could record that

I don't think how you would go to a conclusion from those that "it is illegal to provide any internet resource to anyone in the EU".

First, it's worth noting that GDPR only applies to companies that specifically target its services at individuals in the EU. Targeting means having an EU office, using an EU domain, providing EU languages such as Polish or allowing payments in EU currencies. If your service makes no effort to provide service specifically for European users there is no need to worry about GDPR - even if you are in the US.

Second, while US services targeting individuals in the EU are legally problematic, this doesn't affect other countries - so I see no reason to say "any" here. For example, a Japanese server is free to provide services at individuals in the EU provided they comply with GDPR as EU has an adequacy decision for Japan.

Also, I would like to point out you can replace US with North Korea in this argument. I think it would be ridiculous to say that if European Union were to disallow sending personal data to North Korea (including IP address) then it would mean that it's illegal to provide any internet resource to anyone in the EU.

GlitchMr··on Nerdle = Like Wordle but with Equations
You don't have to play hard mode. No need to guess what you deduced already, you can make a guess that doesn't use your previous deductions.
GlitchMr··on Nintendo Switch game cartridges taste offensively bad (2017)
Nintendo has a lot of money, a failure of a home console after Wii U probably would kill their home console division (no reason to continue making products if they all fail), but it wouldn't kill the company as a whole, in particular they would keep making handheld consoles.

Since Sony has entered home console market, Nintendo was essentially unable to compete with them. Nintendo 64, GameCube and Wii U weren't successful compared to PlayStation. Wii and Switch on the other hand succeeded by doing something completely different to what PlayStation did.

GlitchMr··on Yuzu: Nintendo Switch Emulator
Unlike other ARM CPUs, M1 optionally supports x86 memory model, that said, it doesn't matter outside of x86 emulation.
GlitchMr··on In place of a legal notice, here is a blessing
Entrapment can only be committed by government agents.
GlitchMr··on Show HN: No Trash Search
Pretty nifty project. I'm curious what whitelist are you using, would it be possible to list allowed domains somewhere publicly.

One suggestion that I have is to remove w3schools.com from the whitelist. MDN is a much better source for information about web development.

GlitchMr··on Unicode Normalization Forms: When ö ≠ ö
The `filename-sanitizer` library you have linked has the following comment.

                # FIXME: improve HFS+ handling, because it does not use the standard NFD. It's
                # close, but it's not exactly the same thing.
                'hfs+': (255, 'characters', 'utf-16', 'NFD'),
I wonder what does that mean...
GlitchMr··on Website moves the “change cookie settings” button when you hover over it
It is intentional. It's caused by `funnyButton` function which after beautifying looks like this.

            funnyButton() {
                document.addEventListener("mouseover", e => {
                    if (e.target.closest(".chefcookie__button--settings")) {
                        if (window.innerWidth < 1e3 || r.default.isTouch() || r.default.isMobile()) return;
                        if (!0 === this.funnyButtonStop || !0 === this.funnyButtonAnimation) return;
                        this.funnyButtonAnimation = !0;
                        let e = document.querySelector(".chefcookie__button--settings"),
                            t = parseInt(e.getAttribute("data-mode") || 1);
                        e.setAttribute("data-mode", t % 2 + 1), setTimeout(() => {
                            this.funnyButtonAnimation = !1
                        }, 550)
                    }
                }), document.addEventListener("click", e => {
                    e.target.closest(".chefcookie__button--settings") && (this.funnyButtonStop = !0)
                })
            }
GlitchMr··on Website moves the “change cookie settings” button when you hover over it
Yes. You should be updating your web browser regularly, otherwise you will be affected by security vulnerabilities.
GlitchMr··on Gobolinux : Redefining Linux filesystem hierarchy
> PostgreSQL table and column names aren't case sensitive

They are case-sensitive. The thing is however that is that PostgreSQL will automatically lowercase names that aren't explicitly double quoted.

GlitchMr··on Unicode Normalization Forms: When ö ≠ ö
Filenames in HFS+ filesystem (an old filesystem used by Mac OS X) are normalized with a proprietary variant of NFD - this is a filesystem feature. APFS removed this feature.
GlitchMr··on You block ads in your browser, why not in your city?
Are you in European Union? I imagine the consent banner may skipped when not in European Union.
GlitchMr··on You block ads in your browser, why not in your city?
Out of curiosity, I decided to check your website with adblocker turned off. After rejecting (!) GDPR consent, the website decided to send my personal information to the following companies: Google, Facebook, Amazon, Ad Lightning, Setupad, UniConsent, Adagio, ID5, Criteo, Magnite, RTB House, Casale Media, EMX Digital, Adform, Pubmatic, Between Digital, Lijit Networks, AppNexus, 33Across, Adx Premium, Sharethrough, Smart Adserver, OpenX, BRealTime, bumlam.com (couldn't find information about owner of this domain), BidSwitch, Getintent, Yahoo, and more - at some point I gave up trying to figure out who owns given domain names.

The privacy policy which is quite hidden on the website (https://www.photopea.com/privacy.html) says nothing about that. All it says is the following:

> We use third party tracking tools to improve the performance and features of the Service (e.g. Google Analytics). Such tools are created and managed by parties outside our control. As such, we are not responsible for what information is actually captured by such third parties or how such third parties use and protect that information.

This won't fly under GDPR, just saying. Not only you are responsible for third party behavior, but you didn't even mention all tracking scripts that are directly used (I see Facebook Pixel Code right in the source code for photopea.com). You are in Czech Republic, right? I think it is in European Union.

GlitchMr··on Ask HN: Intercepting HTTPS – How can we trust anything?
Browsers require certificates to be in Certificate Transparency logs. Therefore, a valid certificate would need to be submitted to CT logs, and a Certificate Authority found to generate certificates without permission would quickly find themselves removed out of browsers' trusted CA lists.
GlitchMr··on Hex-rays is moving to a subscription model
If I had to guess, they probably don't care about home usage of Hex-rays. Businesses have more to lose when using cracked versions of Hex-rays.
GlitchMr··on Italy fines Amazon record $1.3B for abuse of market dominance
I disagree with you here. I live in Poland which has a very popular e-commerce website known as Allegro.pl - it's very similar to Amazon. It has its own version of Prime which is known as Allegro Smart which provides benefits such as free shipping and easy returns. A seller that wants to make their products have Smart badge don't have to use Allegro's own delivery method (Allegro One). The requirements for a Smart badge are as follows:

- have at least 5 positive reviews

- at least 98% rating (if their deliveries are slow, they shouldn't expect a high rating from customers)

- passing Allegro transaction identifier to a delivery service

- they have to provide at least one of the following parcel delivery services as a delivery method: Poczta Polska (which is owned by government), DPD or UPS

Amazon forces third-party sellers to use Fulfilment by Amazon in order to have Prime badge, something that a very similar service doesn't do.

GlitchMr··on Hetzner now provides IPv6 only dedicated servers
Freedom of speech is not absolute in United States either, see https://www.uscourts.gov/about-federal-courts/educational-re....
GlitchMr··on ‘Trojan Source’ Bug Threatens the Security of All Code
Well, technically the rule only talks about entries that "fail to compile". An entry that still compiles is fine, see rule 12. In practice this means the Unicode abuse like this is only allowed in strings.
GlitchMr··on We Need Software Updates Forever
> It runs but can't connect to modern Wi-Fi without an update, which it can't access without an update to its firmware (a classic catch-22).

In this case the issue is that PSP is so old that its hardware simply cannot connect to WPA2 networks (it can connect to WPA and WPA/WPA2 Mixed networks however). This is not something that a software update can fix.

Also, honestly, internet access is honestly not very useful for PSP, especially now. Pretty much all games have shutdown their online services, games themselves can be played from Universal Media Disc, and the web browser is pretty much useless with modern web, and with 32MB/64MB of RAM that the console has I don't think Sony could update web browser even if they wanted to.

GlitchMr··on Thunderbird 91.0
Updates are delayed to give add-on developers time to update their add-ons to be compatible with Thunderbird 91 if changes are necessary.
GlitchMr··on History of Hacking the Nintendo 3DS [pdf]
It's not Pikachu related. My guess is that PIC stands for picture. PICA200 was a GPU designed for embedded devices, most notably used by 3DS, but there are other devices that have used it.
GlitchMr··on When static makes your C code 10 times faster
Without `static`, compiler exports a symbol.

    $ cat value.c 
    int value = 42;

    int get_value() {
        return value;
    }

    $ make value.o
    gcc    -c -o value.o value.c

    $ nm value.o
    0000000000000000 T get_value
                     U _GLOBAL_OFFSET_TABLE_
    0000000000000000 D value
This symbol, not being `const` can be modified by any other compilation unit.

    $ cat main.c
    #include <stdio.h>

    int value;
    int get_value();

    int main() {
        value = 123456789;
        printf("%d\n", get_value());
    }

    $ make main.o
    gcc    -c -o main.o main.c

    $ cc value.o main.o

    $ ./a.out
    123456789
Compiler when generating an object file has to assume the value of exported non-const symbol can change. It's necessary to tell the compiler that the value cannot change, either by not exporting the symbol by using `static` or making the value of it `const`. In example provided in your article `static` makes sense (or even `static const`) as I don't think there is a reason to export this global.
GlitchMr··on Safari 15 on Mac OS, a user interface mess
I don't think the logo is bad myself, it is a tiny change overall.

However, it's worth noting it was shown alongside wordmark, and the font used by that wordmark (a modified version of Ginto Nord Black) is... not great, in particular I think the letter "i" looks somewhat off in relation to other characters in word "Discord" - I don't know what's wrong with it, I'm not a typographer.

That said, because the wordmark is not seen often (pretty much the main page and the page announcing new logo), in practice it's fine. After logging in to Discord there is no real reason to go back to the main page.

Also, out of curiosity, I checked the videos you linked to, pretty much all consider the logo to be fine, but they all criticize the font or the letter "i" specifically (even the video called "discord's new logo is alright").

← PreviousPage 2 of 9Next →