HNHacker News
TopNewBestAskShowJobs

derekzhouzhen

637 karma · joined September 7, 2021

submissionscomments
derekzhouzhen··on Build Personal Web Applications
A personal web application is one that is written by me, hosted by me, and have a grand total of one user, me.
derekzhouzhen··on Run Linux containers on Android, no root required
This is exactly Termux's point, to subvert Android into linux cheaply. Same for MinGW or MSYS2. I want to invest as few as possible on Andriod or Windows, while still able to use them in the way that I prefer.
derekzhouzhen··on Emailing a one-time code is worse than passwords
How is it different from plain old password?

1) User goes to BAD website and enter credentials

2) BAD website use GOOD website to check if credential is valid

3) Pwned

It is just MITM attack. The moment you go to BAD and enter credential (password or one time code) you are done.

derekzhouzhen··on The HTML Hobbyist (2022)
My blog is essentially my journal; no one else reads it. However, knowing someone else _might_ read it is making me spend the effort to write in better style, to watch my language, so I would not be embarrassed by myself. That's the value of blog over journal for me.
derekzhouzhen··on Making TRAMP faster
I used to use TRAMP but now I just run terminal emacs through mosh. Everything just work and snappy, if you can live without the emacs GUI.
derekzhouzhen··on Plain Vanilla Web
Yes, you can kiss reactivity good-bye and just render the whole page on any state change.

No, generating HTML string and setting innerHTML is unsafe and slower than necessary. It is better to create DOM elements programmatically. HTML is for serialization of the DOM tree; if everything is done in javascript then you don't need HTML as an intermediate step.

derekzhouzhen··on Plain Vanilla Web
You can use shadow-dom without using web-component. web-component and shadow-dom are orthogonal to eachother:

* web-component is a way to attache javascript to certain elements. There are other ways to do it, but sometime this way feel cleaner, like when you do server-side rendering and not using any javascript framework.

* shadow-dom is a way to organize your styles. As you said there are other ways to do it, but I find it useful because it offers full isolation, and is compatible with browsers 3 years back.

derekzhouzhen··on But what if I want a faster horse?
Me too, but you and I cannot afford a faster horse, or even the same horse we once had. The horse they use to offer was an illusion, a bait for the new Tiktok thing. Sooner or later, people will forget that horses once exist.
derekzhouzhen··on The Frontend Treadmill
The frontend world gave you many fancy toys; but they all come with hidden cost. It is your choice: do you want to stay on or get off this treadmill? My need is modest, so I got off. I rewrote my simple SPA from Svelte to SolidJS to no framework at all. Now I have ~1000 LOC javascript, ~500 LOC CSS, all written by myself. No framework, no package, no build step. If you want to see it in action:

https://airss.roastidio.us

It is a fully functional RSS reader. You are welcome to poke under the hood. The key insight is that I don't need reactivity, if re-rendering everything at every event is fast enough.

I believe this style of barebone SPA programming can scale up to at least 10,000 LOC javascript.

derekzhouzhen··on Ask HN: Which RSS reader do you use?
If you are this picky, then write your own. That's what I did:

https://airss.roastidio.us/

You are welcome to use but don't complain the lack of functionality. I wrote it to suit my own need.

derekzhouzhen··on The Static Site Paradox
_realized_ utility.

Also, the article is about fully managed Wordpress vs self-hosted (or PaaS hosted) SSG. If the choice is between self-hosted Wordpress vs self-hosted SSG, I bet the outcome will be very different.

Now, you may wonder why the OP was not make an apple to apple comparison, like fully managed Wordpress vs fully managed SSG. Well, fully managed SSG does not exists, because it won't sell!

derekzhouzhen··on The Static Site Paradox
There is no paradox at all: simplicity is beautiful but complexity sells. The author thinks that value come from realized utility. However, in most market segments, value came from perception. With complexity (even useless ones), you can boost perceived value. How do you impress people when all the greatness is under the hood?

I use several SSGs and wrote one myself. I still can't recommend any SSG to people willing to pay.

derekzhouzhen··on Why Gumroad Didn't Choose Htmx
I wish more people publish negative testimony like you do. It shows guts.
derekzhouzhen··on We accidentally burned through 200GB of proxy bandwidth in 6 hours
I feel your pain, but I refuse to cave. Say, 10% of the links fail to load, so what? It is their loss, not mine.
derekzhouzhen··on Cohost to shut down at end of 2024
I think "ethical" in the context of social media means not doing surveillance capitalism. ie: don't cash on user data. Moderation is a orthogonal topic.
derekzhouzhen··on Cohost to shut down at end of 2024
I doubt an ethical social media will ever work. It is either irrelevant or a money black hole.
derekzhouzhen··on Google Is Keeping Cookies in Chrome After All
Name is misleading. It is not about cookies in general, but 3rd party cookies. Google's own tech doc is here:

https://developers.google.com/privacy-sandbox/3pcd/chips

you can still enable CHIPS in chrome but it won't happen for the mass after all.

derekzhouzhen··on Show HN: OpenOrb, a curated search engine for Atom and RSS feeds
No. but you can try the search here:

https://roastidio.us/search

derekzhouzhen··on Show HN: OpenOrb, a curated search engine for Atom and RSS feeds
> If you put your 10 favourite blogs in there, it'll search just those blogs...

10 feeds will not give you much recall. I have 50K+ feeds, 1M+ posts, and it just starts to give somewhat respectable results.

derekzhouzhen··on I no longer maintain my Emacs projects on Sourcehut
If I do not want contributor, then I'd just use plain git through SSH on my own VPS.
derekzhouzhen··on Ask HN: Experience Starting a Blog
If you don't want negative feedback, don't publish anything. You need the negative feedback; what you don't want is toxic feedback not aiming at you, but at other readers, and try to steal eyeballs for themselves.
derekzhouzhen··on This page exists only if someone is looking at it
Neat. A simple enhancement could be letting the server to cache the content for a short period of time, and push the cached webpage in the static rendering. This way:

* non js enabled clients can see the page, think robots, SEO, etc.

* js enabled clients can help to perpetuate the content

* if the last js enable client had a network glitch, the content is still available.

derekzhouzhen··on [dead]
Yes, this is a blatant ad, and an ad for a very unethical service no less. However, they are an enemy of my enemy (Gmail). I don't want to have anything to do with them but I wish them luck.
derekzhouzhen··on Emacs 29.1
My point is: the api of of emacs is fairly stable. And your point is?

I have ~80 lines outside the customize variable block added by emacs. Nothing too fancy but there are a few hot keys and functions that I can't live without.

derekzhouzhen··on Emacs 29.1
> maintenance of the .emacs files

What maintenance? I have not changed a single line of my .emacs file for 3 years.

derekzhouzhen··on The Gemini protocol seen by this HTTP client person
Your 10k items are probably only 2MB. Spending 5s to parse a 2MB text file is very slow, even for Perl. If you are distributing your file to users, that's 5s for each one of them. If you convert it to html and distribute the html file, your user will spend 1s in parsing, tops. This is exactly why I said Markdown makes a very bad interchange format.
derekzhouzhen··on The Gemini protocol seen by this HTTP client person
No, Markdown is a format for authoring HTML. It makes a very bad interchange format because the it leaves too much ambiguity in parsing. Also, parsing speed of Markdown is much slower than the parsing speed of a strictly conforming XML file.
derekzhouzhen··on Don’t open the details in a modal window, have it be a separate page
I'd even argue all html modals are bad designs; including alerts, forms, and confirmations. HTML modals are poor emulations of native dialog boxes; they try to address rendering performance problems that no longer exist.
derekzhouzhen··on Are We Sixel Yet
For working on remote machines, I need 3 things:

* show multiple terminals on screen. The best solution is to use a tiling window manager. Both MacOS and Windows have limited windows tiling capabilities. * run long term TUI applications (like editors). The best solution is mosh. * run long term CLI applications (like shells). The best solution is dtach.

tmux helps all 3, but not particular good at either.

derekzhouzhen··on Show HN: A social network to share articles you've read
Hiding the original URL and copying the content verbatim could get you in trouble.
Page 1 of 11Next →