Recent submissions

Comment · 3 months ago
2 letter TLDs/country-code TLDs, are determined by ISO 3166-1 alpha-2 country codes, and having a country code doesn't necessarily mean a country or a state.

There are a bunch on there that I wouldn't consider states, e.g. both UN/EU are exceptionally reserved and have `.un` and `.eu`. Antarctica also has `.aq`.

The Heard Island and McDonald Islands has `.hm`, and it's not a state (since it has no population) but I guess it is controlled by Australia.

Comment · 4 months ago
Comment · 4 months ago
Comment · 6 months ago
You can try looking at this manga posted by a Japanese person that was detained for marijuana possession https://xcancel.com/kime_neko/status/1634511023167381504. It's in Japanese, but you can use a machine translator and/or look at the drawings.

The facilities and food look slightly better (maybe because it's a detention centre in Tokyo), but it mostly matches. Although the mangaka seemed to have a much more positive outlook on it, probably because they could read all the Japanese books they wanted and speak to their cellmates in Japanese.

Comment · 6 months ago
Not for the ones you buy in Japan, since those are legal.

But, it's not unheard of to get randomly stopped by the police and searched, especially in touristy areas like train stations. Unless you're a Japanese citizen, you have to show ID, and although the searches are optional, most people agree to them.

For customs, usually a few people from each plane are searched.

Anecdotally, if you're a tourist, they're usually looking for medicine that was legal outside of Japan, but illegal within Japan, with small amounts leading to being detained for 23 days (like in this blog post). And if they decide to prosecute you, you'd probably get a suspended sentence (so no prison time), but you'd get deported and a temporary ban from coming back to Japan.

Comment · 6 months ago
You can still easily buy it here, but the over-the-counter pills are always mixed with other ingredients to make it more difficult to convert them into amphetamines.

E.g. Contac 600 Plus can be found in basically all drug stores and it has 120mg of Pseudoephedrine, 100mg Caffeine, 8mg Chlorpheniramine, and 0.4mg of Belladonna Extract. It sounds like it'll actually be illegal to import into Japan, since 120/(120 + 100 + 8 + 0.4) is over 10%, but I've previously just walked into a drug store and bought a packet.

Comment · 6 months ago
The author mentions it in a YouTube video: https://www.youtube.com/watch?v=Q2epTf2IW1g (at the 2:20 mark).

But essentially, somebody else sent her a package with something illegal in it that she didn't ask for. The police took her passport for a few months and searched her house. After a few months, she got her passport returned to her, she left Japan temporarily, but when she came back, they arrested her "to ensure [she] wouldn't flee while they finished the investigation".

She also mentioned it was "the most normal type of thing you can think of"; it might have been something like pseudoephedrine/Sudafed. That's a common over-the-counter drug in other countries but it's very illegal here in Japan (unless it's under 10%, or you buy it from Japan)!

Edit: Importing pseudoephedrine above 10% concentrations is illegal, but you can legally buy some higher concentrations over-the-counter while in Japan.

Comment · 6 months ago
At least in Japan on iOS, they have their own app, and it’s great.

You can find a seat first, then order directly from your seat, for delivery to your seat (helpful since some McDonald’s in Japan are really busy, and are very vertical, so you might need to climb up some two/three floors to find a seat!).

You can even order McDelivery and they’ll deliver McDonald’s to your house on McDonald’s branded mopeds.

It’s also been pretty fast, even on a slow internet connection.

The only two problems I’ve had with it are:

- Although the menu and the rest of the app is translated to English, sometimes coupons are only in Japanese, and not translated to English (I’m guessing these might be store-specific) (although it’s easy enough to translate that using your phone’s translator) - I’ve had Apple Pay occasionally be down and fail to work, which forced me to redo my whole order, then realize that Apple Pay is still down, then do my entire order again with a different payment method. Although it’s only happened twice a few months ago, so it could be something that they’ve already fixed (or I’m quite unlucky).

Edit: Forgot to add, but no issues like what basch seems to experience with their country’s McDonald’s app. The Japanese one always gives me a sorted list/map view of my closest McDonald’s to pick from, with any favourites marked at the too.

Comment · 1 year ago
I think there are two slightly different issues here!

1. SVGs generated by Mermaid use the SVG 2 features, but other than browsers, most libraries only support SVG 1.1 features, i.e. <https://github.com/mermaid-js/mermaid/issues/2102>, which is what the other comment mentioned.

2. Mermaid requires a browser layout engine to render the diagrams (your issue), i.e. <https://github.com/mermaid-js/mermaid/issues/3650>. This is something I also really want to fix (I maintain the [`mermaid-js/mermaid-cli`][1] project and we need to use Puppeteer/Headless Chrome to render mermaid diagrams, which isn't ideal.) However, I don't think this would be easy, since we'd need a browserless tool that supports a browser-like layout engine (although I'm hoping that [Servo][2] might eventually be able to support it).

And if you do want to do headless renders of Mermaid diagrams, I'd recommend using (or adapting, since the code is all MIT licensed and I'm not aware of one that uses Selenium):

- <https://github.com/mermaid-js/mermaid-cli>, which uses Puppeteer as the headless browser API.

- <https://github.com/remcohaszing/mermaid-isomorphic>, which uses Playwright as the headless browser API.

And make sure that whatever server is doing the headless renders of Mermaid diagrams has all the correct fonts installed!

[1]: https://github.com/mermaid-js/mermaid-cli

[2]: https://servo.org/

Comment · 2 years ago
POSIX does actually define what a "text file" is, but the definition is a bit unusual:

See https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1...

> 3.387 Text File

> A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the <newline> character.

So, if you have some non-printable characters like BEL/␇/ASCII 0x07, that's still a text file.

(and I believe what bytes count as a valid character depend on your `LC_CTYPE`).

But the moment you have a line longer than {LINE_MAX} bytes (which can depend on which POSIX environment you have), suddenly your text file is now a binary file.

Comment · 2 years ago
Comment · 2 years ago
Comment · 2 years ago
You should try the Moondrop Space Travel, you can buy them for USD 24.99 on Amazon.

- Moondrop is a pretty well known brand in the ChiFi (Chinese Hi-Fi) space.

- They support AAC so they even have good audio quality on Apple/iPhone devices (most cheap earbuds only use cheap Android codecs).

- Normally, their latency is pretty high, but they do have a low-latency mode in case you ever want to play games + take a call.

- It's Bluetooth 5.3 and communicates directly to each earbud (e.g. if you want, you can only use one at a time).

- And, they have active noise cancellation that's surprisingly good (in fact, it's amazing for $25!).

IMO, the main downsides are:

- Their app is meant to be horrible (I didn't even bother to install it). Not a big deal, unless you want to play around with EQ, customizing what the touch controls do, or upgrade the firmware.

- There's no way to control the volume via touch controls (although maybe the app allows you to change this)

- Even though it supports Bluetooth 5.3, I don't think it supports Bluetooth LE Audio and the LC3 codec.

These earbuds are probably completely uneconomical to recycle, but at least at $25, they probably didn't have too much of an environmental impact when they were created (assuming that the cost of the item is roughly correlated with the environmental impact of the item).

Comment · 2 years ago
Comment · 3 years ago

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton