HNHacker News
TopNewBestAskShowJobs

zefei

156 karma · joined March 3, 2012

http://zef.io/
submissionscomments
zefei··on Google and Mozilla are working on iOS browsers that aren't based on WebKit
The default _browser_ will mostly be Safari. But the moment webkit requirement is relaxed, all in-app browsers for Facebook, TikTok, Youtube, Instagram, etc will be replaced with their own forks without any respect for "do not track". They will become the second most used browsers on iPhone, not Firefox or Chrome.
zefei··on Google and Mozilla are working on iOS browsers that aren't based on WebKit
Some comments seem to be optimistic about the potential change from Apple. But once Apple relax webkit requirement from app store, it will mean all "do not track" cookie enforcement would be easily worked around.
zefei··on Avoid exception throwing in performance-sensitive code
I think what the article is addressing is likely not what is being discussed in this thread. The article ("Unfortunately, I often see solutions abusing exceptions" followed by using exceptions to replace if statements) is very likely discussing poor understanding of the topic from student assignment rather than actual code in the industry. Such mistakes (abuse of exceptions in the article) often go away once students become actual professionals because these mistakes are more easily caught during code review than other types of common mistakes.
zefei··on Why does science news suck so much?
It's just that science is easy to verify for the people that know how. If you are actual expect of any other topics (thus can verify if their news is any good), you'll find the news for those topics is at best as bad as for science, if not much worse. News cannot be 100% faithful to the material it covers, and the more you understand about the topics, the more discrepancy you can see.
zefei··on Lost “canceled” Squaresoft game 3156 Coro Coro located and preserved
0211 0311 0411
zefei··on Lost “canceled” Squaresoft game 3156 Coro Coro located and preserved
[pppp;;;;;]
zefei··on Google’s AI-powered ‘inclusive warnings’ feature is very broken
I don't believe this has anything to do with AI, it most likely is rule based (not the entire system, just inclusive warnings). People like to shit on AI, but AI wouldn't really make such ridiculous suggestions, only human can.

The suggestions look a lot like code linters in FAANG companies. People from the outside will be shocked at some of these "inclusive" linters if they take a look.

zefei··on Fast and precise type checking for JavaScript
Both flow and typescript are great tools. Typescript has much better tooling and great IDE integration, using typescript is a no-brainer for new projects. Flow's soundness does shine though once your codebase (and your team) becomes very big, as any unsafe cast can be reliably treated as error. I use flow at work, and so far my experience is that unsafe cast in flow always indicates a bad design or actual bug.
zefei··on A Constructive Look at TempleOS
Every time I read something about TempleOS, I was amazed by its concepts and Terry's dedication. I wonder if one day we could see something like "doom source code review" on TempleOS.
zefei··on MonolithFirst
I really hate people advocating micro services/libraries because they just migrated and "everything got much better". No, everything got much better because the known/actual problem domain changed and system is re-adjusted accordingly. When you start with very little knowledge of the problem domain, any fine-grained architecture is premature optimization, and what you really want is to rapidly expand your understanding of the problem.

Projects can fail in many ways, not trying to understand the problem better and not trying to re-adjust after are typical pitfalls. Migrating from monolith to micros is just a natural transition between SOME stages, and it shouldn't happen until you hit those stages. You may hit those stages very early, or sometimes never.

zefei··on The Evolution of Flux Frameworks
Compared to facebook's barebone flux library, the only real advantage these frameworks provide is about server side rendering. But I'm worried this will become irrelevant once facebook Relay is out.
zefei··on PathFinding.js
I think checking whether target is reachable has the same complexity as reaching it
zefei··on Snake: Full Python Scripting in Vim
Nice work! The pip/virtualenv loader is really great, and can make the plugin dev more purely focused on the plugin. I think this part can be a great standalone project.

But I don't know about the boilerplate functions, some of them feel useful (like output capturing, state preserving), while others are just shallow abstractions over the vim API, which is almost never good. Abstraction over API is only useful when it provides different and better semantics, like jQuery over DOM.

zefei··on Look Ma, no OS
It is you. See https://queue.acm.org/detail.cfm?id=2566628
zefei··on About Internet.org and net neutrality
It seems most people here are against this because of Facebook's (or other service providers') gain from it, but no one is arguing against Mark's actual point: "some access is better than none at all", which I think is more important.

Internet.org may not succeed at the end, because of the conflict of interests in many parties (corporate and political) involved in its running. But the idea of providing limited access for free is IMO very good and important, and arguing details before anything being done is at best unproductive.

All the people here already have internet access, and most without any limit or censorship. But can you try to think of this from POV of the users of internet.org? Not to think for the children in poor regions, but think AS those children.

Let me explain from my experience, where limit of access mostly comes from heavy censorship.

I was born in China at the end of the Culture Revolution. Fortunately, my family still had got TV when I was in elementary school, and we had internet when I was in high school. All the information, programs, news, cartoons, whatever contents from TV or internet were heavily censored. They were censored so heavily that I, as a kid, could not realize that they were censored at all. But I still enjoyed a lot of information, entertainment, knowledge from TV and internet as a kid. As an adult now, I hate and want to fight those censorship with all I have. But without TV or internet, I'd very unlikely to be able to code, or to write English, or anything I enjoy doing today.

To me, the limit of access that's forced by government doesn't differ much from the ones by corporates. But having some limited access to information is absolutely critical, when the ONLY other option is no access.

zefei··on Ask HN: Should I testify?
You are what defines your career, not the other way around. There are a lot of companies out there, some will see testifying as good, some bad. If your choice is true to yourself, and the company you want to work for really doesn't like that, I'd say eventually you will not go along well with that company and this acts as a "fail fast" filter.

Finding a good career path may take quite some time, but working for the wrong company can cost magnitudes of more time.

For most HN readers, including me, the answer is an obvious "testify", because we see it as a big plus. Do you want to work for people who see it as the right thing to do, or people who avoid it?

zefei··on 7GUIs – A Notational Usability Benchmark for GUI Programming
None of these are related with GUI frameworks (such as Swing, QT). They rely on lower graphic constructs, and are suitable at showing off graphic libraries (such as Cairo, Skia).
zefei··on Conception – An experimental modern IDE written in Go
Developers who re-invent/re-imagine some wheels usually realize at the end why the original wheels are designed like those. We, understandably, don't quite appreciate the work other people have done, where we consider their tradeoffs as mistakes. But when we do them ourselves, we eventually see the huge amount of conflicting goals, as tradeoff is the essence of engineering, or anything.

However, almost all the good new things came from some re-invention. Don't let the tradeoff scare you away from your original ideas. Maybe the whole interface doesn't beat what we have now, but there are quite a few very good stuff in your demo. And I believe some of them (zoomable overviews, widgets), can truly work better than what we have now. It somehow reminds me of Rob Pike's Acme editor, though they look very different.

zefei··on Vim Awesome
Can you elaborate? I think all modern package managers (vundle/neobundle/vimplug) do a pretty good job.
zefei··on Artificial Intelligence, Really, Is Pseudo-Intelligence
To say something is pseudo-intelligence or true intelligence, one has to define intelligence rigorously. That is more philosophical than people think, because how little we scientifically understand about intelligence, or consciousness, or even life.

For most of people, the intuition of intelligence is a bit naive, and nowadays intuition is often at the opposite of the truth. It often is along the line of "looking intelligent and knowing what it is doing”. Something like turing test describes the first part intuitively. But we soon found out that we wouldn’t call something “intelligent” even it passes turing test since the machine is unlikely to know why it is saying something, hence the latter part. But again, this is about consciousness or “strong AI”, which is even further away from our understanding than “intelligence”. How do we know that the machines that “look intelligent” don’t “know what they are doing”? Consciousness is very hard to define and even harder to inspect, and maybe someday machines begin to have consciousness even before we realize it? In fact, we already did this to most animals, thinking they are not intelligent or self-conscious while they are.

But to me, the psychology behind these definitions is very interesting and maybe quite important. No matter how we try to define intelligence, we wouldn’t call machines intelligent until they very much behave like us. Because to most people, intelligence is what defines humans, so they intuitively use their feelings of “does that feel human” to benchmark intelligence. And psychologically, we are exceptionally good at telling something “not human” from “feeling/looking/speaking like human”. But this is a very narrow and, if I dare to say, ignorant and self-centric view, because it implicitly relies on the thinking of “we are far more intelligent than any other life form, and human's intelligence is the only way intelligence can be work”.

Think about it, if there’s a super-intelligent being that observes our world, maybe to it, human’s intelligence is as primitive as fish, and trees aren’t far behind; and maybe, entities such like countries or the internet are actually of more intelligent “life” forms, just we haven’t realized that yet because they don’t look like us at all; and maybe, on the scale of intelligence from 0 to that super-intelligent, humans, birds and machines are clustered in a small range, though significantly larger than zero, still not far from it.

Although the research on human brains and a lot of our own stuff inspired the research of AI quite a lot, it is perfectly possible that we create something truly intelligent or conscious without us understanding human intelligence or consciousness fully. We can have a different kind of “intelligence”, and our researches are well on their way toward that. It’s very hard to see because we don’t understand intelligence, and maybe our hardware isn’t powerful enough to fully utilize our theories.

zefei··on Basic colour theory for programmers
This is an old article, and so wrong and vague in so many aspects of digital colors. It contains not much more than simple device-dependent RGB/HSV colors.

To use colors correctly (not many programmers can do this, in fact Chrome/Firefox/Safari don't show the same color for same RGB value on my machine), programmer needs to consider color profiles, gamma correction, white point etc. The sad truth is that RGB is mostly misunderstood from intuition, and most graphic libraries don't deal with device-dependencies at all. Luckily, most engineers don't have to deal with colors outside sRGB.

The absolute best place to read about digital colors (or image processing in general) is efg's references: http://www.efg2.com/Lab/Library/Color/Science.htm. It contains overwhelmingly large amount of info, but they are good info and quite essential for professional work.

zefei··on Vim After 11 Years (2013)
The stuff listed in this article are the places where Vim was trying to catch up with modern editors, not where Vim excels. Vim is an old editor, for modern features, Vim has been the one that's catching up, and luckily it did. But that has nothing do with why people love Vim.

Vim, in pure code editing sense, has two unique advantages that no other editors have or dare to have: modal editing and ubiquity.

Modal editing makes code editing absolutely DRY, as users can avoid any repetitive typing/clicking that they wish to avoid. It doesn't necessarily increase your code throughput much as a lot of the time you'll be thinking instead of typing, but it reduces the frustration of editing to almost zero when you do have to type, hence reducing distractions and cognitive load. Once you are familiar with Vim, its commands have close to one-to-one mapping to ANY ways you want to edit code.

For example, you want to change the html text two lines above? kkcit. Then come back to the place where you left? g;g;. Re-indent the lines? =ip. They look foreign and unintuitive to non-vim users, but are actually muscle memories for vim users. This is probably why vim users swear by it, but non-users find it hard to love.

Ubiquity is something you can only appreciate when you have to. If your work environment is Windows, this probably won't occur to you. But if you have to code in different OSes, or in SSH sessions, or in git commit, or in less/man commands, you'll find vim invaluable.

After all, Vim is just a tool, a very good one. But if your work doesn't have the need for it, you won't find it useful.

zefei··on Lecture 8: How to Start a Startup
Non-scalable things usually can still scale to tens or hundreds of customers, and those first tens or hundreds are the hardest customers to acquire for startups. The hardest thing for startups is to get started (hence gain insights to what problems are most important to solve first), and these non-scalable things are the fastest/easiest ways to start. For typical hackernews readers, solving problems and scaling are usually not too hard (challenging but quite doable), but getting started fast and finding THE problems are very very hard and often not fun to do.
zefei··on Amazon Must Be Stopped
Modern society always progresses at the cost of old, inefficient jobs, while redistributing the wealth from those destroyed markets. The only concern is whether the redistribution of wealth is towards equality or inequality. As long as wealth is transferred to more people, the overall gain of buying power will eventually create a better economy.

The problem is really not about monopoly, but whether the beneficiaries of these business contain a larger population.

zefei··on Isomorphic JavaScript
People love fancy/misused words, but eventually those wear out and lose to simpler, non-confusing words. Don't worry.

"Isomorphic Javascript" is a bad choice of word because coffeescript/typescript feels more "isomorphic" to Javascript than client/server js libraries.

zefei··on Which English?
It seems that the distance between American English and AAVE is very small, which is natural I guess.

I got 1. Ebonics 2. New Zealand 3. English (England) for dialect and 1. Turkish 2. German 3. Finnish for native language. I'm native Chinese currently living in California.

zefei··on Show HN: Remonit, a GeekTool-like monitoring app for the cloud
This is a personal project of mine, and is still a work in progress right now. I use it personally to show console outputs on my phone.

On Linux, you probably need to create a .desktop file for the app.