HackerTrans
TopNewTrendsCommentsPastAskShowJobs

SmartHypercube

no profile record

Submissions

The Law of Leaky Abstractions (2002)

joelonsoftware.com
1 points·by SmartHypercube·11 ngày trước·0 comments

The Death of the Author

en.wikipedia.org
3 points·by SmartHypercube·5 tháng trước·0 comments

Many small queries are efficient in SQLite

sqlite.org
42 points·by SmartHypercube·6 tháng trước·1 comments

Everything you never wanted to know about file locking (2010)

apenwarr.ca
91 points·by SmartHypercube·6 tháng trước·17 comments

Guide to Scroll Anchoring

developer.mozilla.org
2 points·by SmartHypercube·2 năm trước·1 comments

Position-try fallback options and conditional hiding in CSS

developer.mozilla.org
1 points·by SmartHypercube·2 năm trước·1 comments

[untitled]

1 points·by SmartHypercube·2 năm trước·0 comments

Show HN: I made a game testing your prompting skills

app4.hc11.org
10 points·by SmartHypercube·2 năm trước·2 comments

comments

SmartHypercube
·7 tháng trước·discuss
I love SQLite's quality and their docs explaining this kind of things. However, not all parts of SQLite have the same level of quality. I was very disappointed when I found bugs related to its JSON functions (and several other similar bugs related to other features):

SQLite supports a set of JSON functions that let you query and index JSON columns directly, which looks very convenient—but be careful:

1. `json('{"a/b": 1}') != json('{"a\/b": 1}')`

Although the two objects are identical in terms of JSON semantics, SQLite treats them as different.

2. `json_extract('{"a\/b": 1}', '$.a/b') is null`, `json_extract('{"\u0031":1}', '$.1') is null`, `json_extract('{"\u6211":1}', '$.我') is null`

This issue only exists in older versions of SQLite; the latest versions have fixed it.

In many cases you can't control how your JSON library escapes characters. For example, `/` doesn’t need to be escaped, but some libraries will escape it as `\/`. So this is a rather nasty pitfall, you can end up failing to match keys during extraction with seemingly no reason.
SmartHypercube
·9 tháng trước·discuss
I got bitten by this: user agent stylesheet contains "button {align-items: flex-start}" (at least in Chrome). The default behavior is "stretch". Spent an hour debugging why my flexboxs' sizes are wrong. I still want to use correct HTML elements as much as possible, but I do think using <div>s everywhere makes my small side projects so much easier, since I don't have to remember all the non-default behaviors.
SmartHypercube
·2 năm trước·discuss
Safari is the only major browser still not supporting scroll anchoring.
SmartHypercube
·2 năm trước·discuss
A common requirement for tooltips is that they should appear above or below some other elements, depending on the position, in order to make sure they stay inside the screen. CSS now has native support for this.
SmartHypercube
·2 năm trước·discuss
I've always wanted to give IPv6 more chances to see if I can take advantage of its features early, but every attempt has left me very disappointed. Issues I noticed during my recent research:

- GitHub does not support IPv6.

- Docker containers do not have IPv6 by default.

- Many programs default to listening on 0.0.0.0 or 127.0.0.1 when they start, which means they only listen on IPv4. On Linux, listening on :: defaults to listening on both IPv4 and IPv6 simultaneously, but few programs do this. Python asyncio even disabled this feature[1].

- I've always heard that using IPv6 can sometimes lead to high latency or low bandwidth on certain websites, or even resource loading failures. Why isn’t there a convenient tool to compare these differences? It would be great if browsers could switch between IPv4-only, IPv6-only, and dual-stack modes. I’d like to seriously compare the effects on some websites rather than being silently affected.

- Two large ISPs, Hurricane Electric and Cogent, do not have IPv6 peering[2], so they are not interconnected, and many other ISPs have similar issues.

- Very few VPS providers offer /64 IPv6 addresses, which would allow different containers to be assigned freely within a machine. Some only provide a single /128, while others offer very few addresses per machine.

- Many people might only know how to use iptables/nftables for firewalls and forget about IPv6, leading to situations where using IPv6 can bypass the firewall. I’m not talking about issues caused by the lack of NAT (NAT is not a good firewall!), but more generally about cases where you want to disable forwarding between two network interfaces.

I stumbled upon two old posts that I found quite amusing:

In 2011, someone said[3] “It's not terribly useful to have IPv6 only websites at the moment. Check back in 5-10 years though ;)”

In 2014, someone said[4] “The Internet is growing really fast, in a few years, the IPv6 network will be bigger than IPv4, so, with IPv4, you'll be out of the real Internet. Go ahead man! Upgrade your IP!! Change is a good thing.”

[1]: https://github.com/python/cpython/blob/5f5c0b9c23238dc0a1fdb...

[2]: https://adminhacks.com/broken-IPv6.html

[3]: https://www.reddit.com/r/ipv6/comments/gnh69/what_ipv6only_w...

[4]: https://askubuntu.com/questions/309461/how-to-disable-ipv6-p...
SmartHypercube
·2 năm trước·discuss
[flagged]
SmartHypercube
·2 năm trước·discuss
> That's what it is like watching some people try to use LLM's.

Exactly. I made a game testing prompting skills a few days earlier, to share with some close friends, and it was your comment that inspired me to translate the game into English and submitted to HN. ( https://news.ycombinator.com/item?id=41545541 )

I am really curious about how other people write prompts, so while my submission only got 7 points, I'm happy that I can see hundreds of people's own ways to write prompts thanks to HN.

However, after reading most prompts (I may missed some), I found exactly 0 prompts containing any kind of common prompting techniques, such as "think step by step", explaining specific steps to solve the problem instead of only asking for final results, few-shots (showing example inputs and outputs). Half of the prompts are simply asking AI to do the thing (at least asking correctly). The other half do not make sense, even if we show the prompt to a real human, they won't know what to reply with.

Well... I expected that SOME complaints about AI online are from people not familiar with prompting / not good at prompting. But now I realized there are a lot more people than I thought not knowing some basic prompting techniques.

Anyway, a fun experience for me! Since it was your comment made me want to do this, I just want to share it with you.
SmartHypercube
·2 năm trước·discuss
Thank you for your feedback!

However, I'm really confused. I am color blind (red-green) so I always try to make the life of other color blind people (and myself) easier. I hate red and black. When I was young and in school, I find that most people think the contrast between red and black is great, so teachers use red ink to mark our homework, and other students use red ink to mark important parts of their notes. It is very, very difficult for me to tell which line is red and which line is black.

In the article I was inspired by ( https://www.chiark.greenend.org.uk/~sgtatham/quasiblog/findl... ), the author used red and black. I have to try really hard to see which edges are marked. So I don't want to give other color blind people like me a hard time in my game.

I do understand that there are other more rare color blind types (e.g. blue) and I would like to make my game accessible to all users. My experience is that most non-color-blind people also find the contrast between blue and black is enough. I used blue ink instead of red ink to mark important things in school, and teachers and other students can differentiate them easily.

No offense, but may I kindly remind you to check your monitor setup and whether you are color blind? Perhaps there are something wrong with your monitor screen and you are not aware of it?