HNHacker News
TopNewBestAskShowJobs

remywang

812 karma · joined October 3, 2020

https://remy.wang
submissionscomments
remywang··on Just 'English with Hanzi'
There's so much wrong with this article. For starters, no one speaks Classical Chinese/Wenyanwen. Not now, not ever. It was designed for writing only, and the conciseness was to preserve bamboo (but stayed because it conveyed a sense of authority). Most importantly, modern Chinese remains challenging after all of the "westernization" events used as examples in the article, and the difficulty is not just because you get a new set of characters. On top of the writing system, you need to learn the tones, new phonemes like x, zh, q, and an entirely new vocabulary that shares very little cognates with English. And the grammar is different, with Chinese relying on much less conduction and requires much more context to understand.
remywang··on The LCA problem revisited [pdf]
Thanks a lot for the wonderful slides, I used them to learn suffix arrays!
remywang··on The LCA problem revisited [pdf]
Spoiler alert: there is at least one typo in the slides.

A preprint of the paper is available here: https://web.archive.org/web/20250708141740/https://www.ics.u...

remywang··on Show HN: s@: decentralized social networking over static sites
Yes that's correct.

edit: I guess an easy fix is to append a cryptographic hash to the post ID, but yeah currently I'm assuming you trust your friends.

remywang··on Show HN: s@: decentralized social networking over static sites
1. Right after initialization you'll be prompted to export the private key and store it somewhere safe, e.g. your password manager

2. You don't need to know unless you want to implement the protocol! To use (the very barebones) implementation all you need to do is fork the repo & give access, which I admit can be too much for family/friends so you might have to set it up for them (and I bet they'd be stoked to have a website of their own!)

remywang··on MacBook Neo
Basic question: will this be able to run any app built for M chip? I suppose so because both a18 and the M chips are ARM?
remywang··on GNU Texmacs
Said paper in html rendered by texmacs [1] and past discussion [2]

1: https://www.texmacs.org/joris/ffnlogn/ffnlogn.html

2: https://news.ycombinator.com/item?id=24991447

remywang··on GNU Texmacs
The animation in presentation mode is really impressive, I’ve never seen something like that not even in ppt
remywang··on GNU Texmacs
What was the main motivation for the fork? Looks like texmacs itself is still actively maintained: https://github.com/texmacs/texmacs
remywang··on Ask HN: Distributed SQL engine for ultra-wide tables
What are the columns and why are there so many of them? The standard approach is to explode into many tables and introduce joins as you said. Why don’t you want joins?
remywang··on SQL Studio
Not to be confused with SQLite studio, which is open source and actively maintained for nearly 20 years https://sqlitestudio.pl/
remywang··on SQL Studio
“Made by a single developer” is only a selling point if it is someone with a strong track record to maintain the software, otherwise it’s just saying the bus factor is 1.
remywang··on Pragmatic Bitmap Filters in Microsoft SQL Server [pdf]
From CIDR 2026: https://www.vldb.org/cidrdb/2026/index.html
remywang··on Hacker News front page now, but the titles are honest
Was hoping for a self aware roast: one weird trick to keep sending your LLM slop to top of HN (/s, I enjoyed it very much)
remywang··on Show HN: I made a spreadsheet where formulas also update backwards
A bidirectional formula is also known as an integrity constraint in databases (plus some triggers for restoring the constraint upon updates)!
remywang··on GNU Unifont
I also made some fonts for playdate based on unifont: https://github.com/remysucre/cuniform
remywang··on Show HN: md0 - Simple Markdown Subset
I needed some format that's easy to parse and render for an embedded browser, so I pulled out a very simple subset of markdown's syntax. As soon as it's done I realized I just wrote a spec for HN comments :)

If you know the [gemtext][1] format for the [gemini][2] protocol, md0 is basically that but supports inline links and happens to also be valid markdown. Oh, and this post is also valid md0. You can see it in action on [Playdate][3] here:

![md0 on Playdate][4]

[1]: https://geminiprotocol.net/docs/gemtext-specification.gmi [2]: https://en.wikipedia.org/wiki/Gemini_(protocol) [3]: https://play.date [4]: https://github.com/remysucre/ORBIT/blob/main/demo.gif

remywang··on SQL nulls are weird
> the word UNKNOWN itself isn't used in SQL

That leads to an even more confusing point, that some systems (at least SQLite) overloads NULL to mean UNKNOWN, for example `SELECT 1 WHERE NULL = (NULL = NULL)`.

And the dangerous thing about NULLs is not when they are explicitly used in the query as a literal (as I did for brevity), but when they appear in tables. It's perfectly reasonable to assume `SELECT COUNT( * ) FROM t;` should be the same as `SELECT COUNT( * ) from t WHERE t.x = t.x OR t.x <> t.x`, but they are not the same because the latter does not return NULL rows. This has lead to real query optimizer bugs. For more examples see this paper https://dl.acm.org/doi/10.14778/3551793.3551818

remywang··on SQL nulls are weird
Except that NULL is not the same as UNKNOWN! NULL is a data value (like integers) that can appear in data expressions (like NULL + 1) and comparisons (like NULL = 1) whereas UNKNOWN is a truth value that can appear in boolean/logical expressions constructed from logical connectives like AND, OR, NOT.

A data expression always evaluates to a data value, and usually whenever any part of the expression is NULL, the entire expression evaluates to NULL.

A comparison evaluates to a truth value, and usually when a comparison invovles a NULL it returns UNKNOWN. This leads to weird behaviors where both `SELECT 3 WHERE NULL = NULL;` and `SELECT 3 WHERE NULL <> NULL;` returns nothing (because the query engine does not output a row if the predicate returns UNKNOWN on it).

What you listed above only comes into play for boolean/logical connectives like AND, OR, NOT, and in that case we follow 3-valued logic.

And there's more annoying corner cases when you deal with DISTINCT. The situation is so hopeless that SQLite has a whole table documenting divergent behaviors of NULL in different systems: https://www.sqlite.org/nulls.html

remywang··on Show HN: I made a tiny camera with super long battery life
This is fantastic! I’ve been looking for something like this to take on my runs forever, as I hate bringing my phone while running. Also for people who want to replace their phone with a smartwatch, the only thing missing is this.
remywang··on How to check if two SQL tables are the same
grading homework
remywang··on How to check if two SQL tables are the same
My guess is that t1 = t2 seems cheap but is actually expensive, so you might accidentally write very slow queries if it were built into the language.
remywang··on How to check if two SQL tables are the same
Author here! This was mostly intended for entertainment, and partly to demonstrate the idea of "relations as vectors" and "queries as polynomials". But I guess I'll indulge myself a bit more:

> Just use sqldiff

sqldiff is sensitive to ordering, e.g., it'll say the relation [1, 2] is different from [2, 1] (I consider them to be the same because they are the same multiset). You'd need to sort with ORDER BY first, but that also requires listing all attributes explicitly like the GROUP BY solution (ORDER BY * doesn't work).

> What about CHECKSUM

It's also sensitive to ordering, and I was told different tables can have the same CHECKSUM (hash collisions?).

> Are the tables the same if they only differ by schema?

I'd say no. Perhaps a better definition of "the same" is that all SQL queries (using "textbook" SQL features) return the same result over the tables, if you just replace t1 with t2 in the query. Wait, but how do you know if the results are the same... :)

> There are better ways to compare tables

Absolutely, my recursive query runs in time O(N^N) so I'm sure you can be a little better than that.

← PreviousPage 3 of 3