HN user

namelosw

2,144 karma
Posts5
Comments634
View on HN

I believe that "single source of truth" is a principle that should always be followed

Theoretically and conceptually I agree. But in practice there are a lot of programming languages aren’t as expressive. People prefer codebases with duplications rather than visitor patterns everywhere. In essence, visitor pattern is a tool to solve multi-dimensional abstraction problems, just like type classes in Haskell or CLOS in Common Lisp. But it’s so verbose and non-straightforward so more often than not it’s not worth it even conceptually it’s a legit case for “single source of truth”.

Why TUIs are back 3 months ago

It doesn't really make sense to me. I've been using Emacs and Vim for decades, and have been using Claude Code for months, but I moved to Codex GUI and the VSCode Claude Code plugin eventually. The biggest problem is that monospaced fonts are not really the best for reading, and with coding agents, people should be reading text most of the time.

The current implementation isn't command-line, but a re-implemented GUI in disguise, awkward and even more buggy. Why should I use that over a GUI? I would prefer Electron over those TUI unless I have to SSH.

I know it's too sharp for many people, but I've also heard a lot of people say they really enjoy touching the sharp corners of MacBooks repeatedly during boring meetings...

Should QA exist? 4 months ago

I worked with an excellent QA once, and that changed my perspective completely as a dev.

A great QA can understand the features of a product quickly, turn those concepts into some sort of grid or matrix in their mind, then pull a bunch of paths and scenarios with estimated priorities and probabilities at a fast and efficient pace, all with great coverage. They can also identify features contradicting each other more quickly than product people.

I think a good QA is capable of being a great vibe coder nowadays, too. If you can write great test suites (write names only), agents nowadays are able to turn those specs into decent codebases. Comparatively, I know a lot of decent dev having not very good taste in testing, who often write overlapping tests or missing important paths.

This hasn't been my experience either. I personally find the max plan is very generous for day-to-day usage. And I don't even use compact manually.

However, when I tried out the SuperPower skill and had multiple agents working on several projects at the same time, it did hit the 5-hour usage limit. But SuperPower hasn't been very useful for me and wastes a lot of tokens. When you want to trade longer running time for high token consumption, you only get a marginal increase in performance.

So people, if you are finding yourself using up tokens too quickly, you probably want to check your skills or MCPs etc.

If tones were completely irrelevant regarding understandably then they would have disappeared long ago.

Probably because it's a legacy and disappearing slowly? Modern Mandarin only has four tones left and has already lost tone patterns.

Do you know there's a "robot tone" in Chinese? It's simply swap every character to the flat or the first tone. Though it's under the stereotypical false assumption that robots have troubles with tones, kids in the late last century often communicated in that tone for fun without issues.

At the end of the day, vocal Chinese is always ambiguous with or without tones and in practice heavily relies on context. It requires written language to truly fix that.

The Codex App 6 months ago

It's essentially asking application developers to wipe ass for OS developers like Microsoft. It's applaudible when you do it, understandable when you don't.

Even though OpenAI has a lot of cash to burn, they're not in a good position now and getting butchered by Anthropic and possibly Gemini later.

If any major player in this AI field has the power to do it's probably Google. But again, they've done the Flutter part, and the result is somewhat mixed.

At the end of the day, it's only HN people and a fraction of Redditors who care. Electron is tolerated by the silent majority. Nice native or local-first alternatives are often separate, niche value propositions when developers can squeeze themselves in over-saturated markets. There's a long way before the AI stuff loses novelty and becomes saturated.

The Codex App 6 months ago

The situation for Desktop development is nasty. Microsoft had so many halfassed frameworks and nobody knows which one to use. It’s probably the de facto platform on Windows IS Electron, and Microsoft use them often, too.

On MacOS is much better. But most of the team either ended up with locked in Mac-only or go cross platform with Electron.

Well, as a northern guy, I do find myself able to understand Mandarin even from Yunnan easily without prior learning. The harder ones for me, like the Hefei dialect, are because the pronunciation is very different, not the tone. Nanjing dialect, on the otherhand, is also from the same Jianghuai Mandarin group as Hefei, which is perfect intelligentable for me.

Even for non-Mandarin/Guanhua, such as the Shanxi dialect, I can understand them because the pronunciation is much closer to mine, just the tones are completely novel.

Impressive work! The idea and the UI is very intuitive.

Though, as a guy who speaks perfect mandarin from Beijing, I’m struggle even to pass the easy ones… So it can definitely used some improvements. The example 你好吃饭了吗 returns hào → hǎo, fān → fàn, le → liǎo. The first two are the model listen my tone mistakenly, and the last one should be le instead of liǎo in this context.

Also I see in the comment section people are worry about tones. I can guarantee tones are not particularly useful and you can communicate with native speakers with all the tones messed up and that’s perfectly fine. Because as soon as you leave Beijing, you’ll find all the tones are shuffled because of every region has their own dialect and accents, which doesn’t stop people from communicate at all. So don’t let tone stuff slow your learning process down.

The phrase "Tibiwangzi" (Character amnesia) was popular long before the digital age. Back when I was a child in the 90s, middle-aged and old people often found themselves unable to recall specific characters.

I somehow kept the habit of handwriting for years. But as a guy in my early 30s, I do notice characters fade away from my brain from time to time, which wasn't a thing at all in the 20s. And to my surprise, some of the characters are fairly frequently used - I was just completely stuck when I was trying to recall them.

Probably that's how brains and organs peaked and will slowly break down over the following decades just like hard drives.

That's not gonna work for real-world projects. Real-world apps often have larger edits than locking individual cells/cards e.g. Move columns or replace large chunks of spreadsheets in Google Sheets, or Ctrl-A to select all and then drag to move.

Also, if you consider latency, locking does not work well because client B might do operations before he/she even acknowledges the lock from client A because of latency.

I've seen Tao Te Ching's translation on the HN front page for several times. It seems people are interested in it.

The thing with Tao Te Ching is it's too ambiguous because: 1) The Chinese language is very overloaded and thus very ambiguous. 2) Classical Chinese is even more so. 3) Tao Te Ching is intentionally filled with clever puns which makes it more ambiguous.

The problem with translations is the translator has to interpret source texts into specific meanings in the target languages. It's like opening Schrödinger's cat box, or unwrapping monads in Haskell and Rust, which essentially deduct multiple possibilities into a single deterministic value.

If you're really into it, you probably want to learn some basic Chinese and classical Chinese (lucky they're not so different from each other), and figure out how to look up in the dictionaries. It's probably not as difficult as it sounds - all you need to do is decrypt with dictionaries.

Maybe there should be a new form of digital translation, just like hovering texts on Duolingo and it will display all the possible meanings of the word/expression.

It's essentially creating states/variables then garbage collect it upon completing. There are several things you can do:

Remember it in your brain: It's like let the state occupying one of the 16 registers in your brain. Later it will automatically offloads in the hard disk in your brain but there's a chance it gets lost or cannot be recalled reliably. Not recommend. But I do this more recently because I realised I don't have to do everything.

The stateless approach: Do it immediately so you don't need to bear the state/variable. Even though sometime it disrupts my current tasks, I find this approach is surprisingly relieving - less debts. Just like software engineering - minimise states because they're evil.

External storage approach: Write it down on paper or an app. There are trade offs between the tool you're using, but the key is to minimise the cost of your moves.

For pen and paper I tried different configurations until I can always comfortably carry them in my pocket.

For digital approaches I'm currently shovel things to Linear. Make sure you're fluent with shortcuts so you can create tasks and jump around like a breeze. I also use Arc browser and pin it in the third slot so I can jump to Linear with <Cmd-3> without even thinking about it.

Wow that's fast. But it sounds dangerous.

The last time I attempted to run at full speed after not running for years, I struggled to keep up and lost my balance. I started tilting forward slowly and eventually fell then slide on the ground for a while, resulting in multiple scratches on my face, front pelvis, etc.

The problem is that the industry has't figured out how to properly pricing LLM applications yet.

Before LLM, it's perfectly possible to spin up a SaaS on 5$ Digital Ocean VM and charge $4.99 per seat monthly. If you're using low overhead techs like Go and SQLite you might get away pretty far with a decent user base.

But LLM is inheirently costly compared to those traditional apps. No matter if you're calling OpenAI or DIY your own GPU cluster it's gonna be way more expensive. Spin your own GPU might ended to be more expensive because utilization problems and upfront costs.

The subscription model was kind of the silver-bullet for SaaS but it's probably not going to work well in the AI era.

OpenAI, Elevenlabs, Runway, and Midjourney: they have subscription model but the quota is strict and tight. The "unlimited" plan is simply pay-as-you-go.

Early wave of LLM products with unlimited subscription models like Github Copilot and Notion AI are probably pricing way too low. $7 or $10 is way too low to support heavy usage.

But charging $50 might scare most user away because it exceeded people's expectation for SaaS. And probably still end up losing money. And hobby users may ended up paying too much for the core users - that will lead us back to sophisticated pricing tiers like Elevenlabs and Runway.

Are there alternatives? I dunno. Maybe implement bring-your-own-key properly? Like OAuth but for LLMs? It's definitely interesting to see how things will turn out eventually.

And apps like Notion and Obsidian have to use web technologies because there are simply no alternatives.

Even those React rich text editors don't support React Native.

It's just way too hard to solve this problem for medium-sized teams.

First, OCD may require professional help if you can't manage it rationally.

With that being said, managing personal projects is simpler than "management" which involves human interations.

In short, start with a basic pen, paper or notepad-like software. Update it as shortcomings appear. Managing is like designing data structures or databases: it involves "reads" and "writes" (I actually mean "search and read" and "search and write", to be percise), starts simply, and is designed around use cases.

I've applied this to cooking. I used to struggle finding spices in a deep drawer. I realized they were organized like a stack, making it difficult to reach the ones at the back. I moved them to a wider drawer. The frequent used ones shuffles to the front, whereas the less used are left in the back. And with time, I memorized their rough locations.

This process mirrored data structure design: starting with a minimal structure (linked list), moving to a more complex one when it becomes slow (search trees), and further improving it when it gets imbalanced (AVL tree). You'll not going to invent red–black tree in the first place - even copy it from the text book is a pain.

This perspective can be applied to anything - digital data, paper systems, or physical spaces. 'Reads' and 'writes' costs are determined by the system you use. System efficiency depends on its use case and time as costs are "amortized".

A few examples:

Diary: Easy to write, harder to read. Low overhead makes it enjoyable to write.

Dictionary: Takes longer to write, quicker to read. The large audience justifies the high writing cost for well-organized indexes.

Research notes: Balanced read-write (citations and knowledge graph). Constantly evolving knowledge even makes folders inadequate, hence the popularity of software like Obsidian and systems like Zettelkastens. But such systems take efforts to build so most people adopt instead of developing their own.

RDBMS: Balanced read-write but difficult to develop.

Kafka-ish DB: Designed for high-speed writing. RDBMS is too slow for its use case due to constant indexing.

Your system will depend on your use case, which will emerge over time.

Interesting.

This is like DeepFloyd but probably combined with OpenAI's strength in NLP field.

I remember Ilya Sutskever often mentioned how multimodal is important in multiple interviews. ControlNet can produce more impressive results for sure, but the model being able to have strong understanding of multimodals like language and light and space as a unified modal will push the industry forward towards the goal of AGI.

Heck no.

If you do some "real world pizza making" instead of toying, that function would be like at least 1k lines, including how you carefully shape the dough, how to handle exceptions when you tear some holes, and how you should observe and rotate in the oven by how much, how you should redo it if the roller blade just didn't cut through properly, so on and so forth. Of course it's better to have top-down overview like prepare -> bake -> box otherwise the readers will surely lose themselves in details without figuring out what is happening.

People in the game industry told me their horror story of helping designers with a Lua script that they were writing over the years. And it turned out the "Lua script" was a single file, with 100k+ lines, that bearly had several functions in it. That would be SO linear.

See we agree? :)

Yeah. I was trying to explain why the chaotic parts are there and there are quite some notable exceptions.

I think to be honest there you need to say cities not towns

TBH I was very hesitant to pick the word town or city or any others because in my mind it was the generic "城/Cheng" in Chinese. I find the nouns are often culturally specific as cities, castles, churches, and towns are European-oriented and more specific than "Cheng".

Also, but I wouldn't really consider Shanghai a southern city, would you?

It's a southern city. Geographically speaking, China was divided by the Yangtze and the Yellow River into three 1/3 parts. Shanghai is located on the Yangtze so it's in the South. The south/north divider is the Qin Mountain range and Huai River line [0]. That's the line where the culture, climate, and pretty much everything differs drastically.

pick one--Tianjin

Well, that's a sophisticated example that I happen to know about (I just realized there's even a wiki but in Chinese [1]):

- Almost every taxi driver in Beijing who has been to Tianjin told me how they got so frustrated with the road system. It's not hard to guess, since the roads are around the river and not as perpendicular as Beijing.

- But the old Tianjin was a squared town before the Western countries moved in. The town resides to the west of the river, exactly within today's north, east, south, and west roads (Dong, Xi, Nan, and Bei Malu). In the center it's the drum tower. Outside there were walls and moans and all that.

- So it didn't appear to be particularly chaotic to me at that time, at least there were quite some designs as you can see. And it wasn't nearly as important historically until the West started to settle in China. At least compared to Xi'an, Luoyang, Kaifeng, Zhengzhou, etc.,

- Later, the Western countries set up settlements along the river both on the east and west banks. The city started to grow. That's where the messy road system comes from.

but what about the suburban places

But yeah, many suburban areas are a mess. While I kind of agree there is some chaotic nature, most culture does that without professional modern urban planning departments. Slums are very, very common outside the first world. Back in the old days in Europe, slums were also easy to be seen outside cities and castles.

Another factor is Tianjin was way messier decades ago. In 1976, there was a great earthquake and Mao died. A lot of the buildings were destroyed or damaged, and a lot of people would then rebuild their houses without proper knowledge and skills. Most of those were lost in the cultural revolution. People would randomly put together bunker-like stuff in random places and call it home. The same situation happened in Beijing - you can find Hutongs in Beijing are very chaotic, which should have been less so before the cultural revolution. Here's a video about the Beijing side of the story [2].

It permeates the very fabric of Chinese culture

Honestly, I'm not very sure of it. On one hand, it's indeed chaotic as we can often see. There are also Chabuduo (good enough) and Meibanfa (there's nothing can be done) cultures. On the other hand, the Chinese also like to pursue regularity such as a lot of things have to be made in the shape of squares and circles. Numbers in designs and shapes have to be "stable" as 4 and 8. Those are not just for nobles, normal people do care and sometimes OCD about that, too.

I don't know man, if anything, Chinese culture is full of contradictions and confusion as always :)

[0] https://en.wikipedia.org/wiki/Qinling%E2%80%93Huaihe_Line [1] Wiki on old Tianjin (Chinese version only, unfortunately) https://zh.wikipedia.org/zh-hk/%E5%A4%A9%E6%B4%A5%E8%80%81%E... [2] https://youtu.be/3uo47m-1gQ4

This is definitely a characteristic of Chinese culture urban "planning" (operative term is the quotes).

You can see the same "ad hoc"-ratic development "philosophy" at work in Chinese cities today.

First, it was 4000 years ago when the Chinese culture was completely different.

Other than that, it's still not entirely accurate. If anything, the planning is very diverse or bumps between extremes in China. You can check out Beijing or any historically important town with walls on the map. Most of those cities are carefully designed in square shape, and every important building is facing towards the south. Things are intentionally majestic. Form over practically sometimes.

Most of the examples you have mentioned are southern cities, which are probably heavily influenced by the Suzhou garden design. The most famous Suzhou garden is the Humble Administrator's Garden [0]. The idea of the garden is to use a lot of obstacles and irregular shapes to segment zones. In terms of practicality, it creates more "rooms" instead of wasting space with empty squares. In terms of aesthetics, it creates discoverability where every turn provides a different scene. But most importantly, it's carefully non-majestical to not offend the emperor - the holy ruler of the absolute monarchy (who can easily execute any a whole clan at will without justification). You can also feel the uneasiness even in the garden's name itself.

But indeed, a lot of Chinese cultured towns are chaotic by nature. My personal take is regions like Europe and Japan with feudal backgrounds are sufficiently decentralized with proper hierarchy, making every piece of land plan things for themselves, the lords, the church, and the guilds can design and interact back and forth. However, China is purely top-down and lacks organizations between the imperial court and individual levels (the feudal system was brutally wiped out 2000 years ago and made very few unsuccessfully comebacks). Any non-imperial organizations like mansions guides are highly discouraged as those are seen as potential threats. Chinese society in modern terms is a "flat organizational structure", and its people are just individuals (clans and families are often forced apart, and shuffled between lands). As a result, we can see towns as official projects are built in orthodox ways, which are the rest are littered with ad-hocness.

Actually, in the South, there were also quite some fortresses that were well-designed and typically resided in difficult terrains such as Tulou [1] (man, they look like Apple Park). Because they were large clans living in remote provinces, the imperial court had a hard time dealing with them so often the court didn't bother.

In my experience, the one exception is Hong Kong

As a guy who spends most of my time living in Beijing, my first impression of Hong Kong is its chaotic (in a good way, I love it). You probably know Hong Kong is the most important reference for those cyberpunk concept artworks. Singapore, IMO, is more well thought out beforehand in terms of urban planning.

[0] https://en.wikipedia.org/wiki/Humble_Administrator%27s_Garde... [1] https://en.wikipedia.org/wiki/Fujian_tulou

It’s just that they produce some of the least intuitive code imaginable.

I agree because I have seen this a lot.

JavaScript has many missing features. This is not one of them.

While I do agree that abusing Observable might leads to messy code, it's very valuable in highly interactive apps. It provides proper abstraction/algebra which letting you tackle problems like tripple click, which might be extremely tedious to solve otherwise.

And interactivity is one of the natrual thing modern browser should empower developer to achieve (at least for non-die-hard no-JS person).

But we already have them via the ReadableStream and TransformStream APIs.

I do appreciate that you appreciate simplicity and this sentiment in general. But I feel similar sentiments that led JavaScript to stagnent for a long time (ES6 is just ES4 but more than a decade later).

People like Douglas Crockford found the parity in JavaScript and Lisp, and summarized the beauty in his works. While his book is one of my favorite programming book, the sentiment (JavaScript don't need features because of closure, Lisp-like and all that) was so popular at time, which probably contributes to the stagnant.

(Microsoft and friends was probably happy about this that the web wasn't taking over so fast and they can shit everybody with IE6 for years, and then the mobile and their walled gardens were taking over. In other word, the web had even greater potential in between IE6 and mobile era)

People could really try re-implement their React apps without modern tooling to feel the pain: No ES6 module and abuse closure then cat the all files into one giant ball, only to mess up the order and dependencies. Or without reactivity, updating states everywhere which leads to confusing bugs that making apps out of sync., etc