HNHacker News
TopNewBestAskShowJobs

c_shu

49 karma · joined December 24, 2016

https://github.com/cshu

http://stackoverflow.com/users/2419922/cshu

submissionscomments
c_shu··on Animals are no less emotional than we are
when an error occurs in a machine and the machine tries to recover, maybe that's also a form of pain. A machine is not necessarily less sophisticated than any living creature.
c_shu··on Someone has entered an AI in a Japanese mayoral race
Could it be a chance of political corruption even if all source code and data are open?
c_shu··on In Switzerland, it's now illegal to boil a live lobster
That's not the kind of torture i meant. Rifle or knife should be acceptable to most people. (This process is simple. Experienced butchers even work fast and clean.) Switzerland law is also about killing the lobster instantly so it's the same.
c_shu··on In Switzerland, it's now illegal to boil a live lobster
I agree that we should pay more attention to people that are suffering.

But I think the rationale of such laws is somewhat valid. Can you imagine a person who is totally emotionless when torturing an animal but is also very compassionate towards human beings?

I think in some ways human ethics and animal ethics are connected.

Though if you ask me whether Switzerland has gone too far, I'm still hesitant about yes/no.

c_shu··on Ask HN: What are the books you wish your colleagues had read?
They are not really bad. Reading about them can help you get familiar with how programmers usually name their patterns. But I don't think one needs to study "design patterns" to come up with code using builders, factories, and singletons. People should always know the optimal way to write their code (or almost optimal). They can come up with any design patterns when coding, instead of choosing some among the well-known ones.
c_shu··on Ask HN: Forced to choose Python
It depends on many factors. Choosing suitable tools for a project requires careful consideration.

Python is a popular language, but not the only one. So many languages exist for a reason. Of course you can always find justifications to reject a language, e.g. Python lacks compile time checking, C++ is outrageously difficult, Java code is full of boilerplates, Perl is a write-only language, PHP is just bad, etc. But all these languages are widely used for some reasons. Not only the popularity, you may also need to consider maintainability, performance, portability, libraries, licenses, etc.

c_shu··on The State of Atom's Performance
True. jEdit is one of the best editors i have used. Not my default editor but i use it from time to time and install it everywhere.
c_shu··on There Is Only One Cloud Icon (2011)
The same goes for many other icons. Like rss, wifi, and shutdown icon.

It makes sense, because once an icon becomes popular reinventing it with another design makes people confused.

c_shu··on Go is not (very) simple, folks
kindof, but not always.

C++ and C# are powerful complex languages. C and Java are simple languages. But I can find lots of elegant programs in C or Java. They don't make the programs feel complex.

Still it depends on the programmer. Programs in any language can vary drastically in readability.

c_shu··on What Happens If China Makes First Contact?
It depends on how big the gap between the power of aliens and earthlings is.

Some people believe that science advances should progress like explosion, and "Any sufficiently advanced technology is indistinguishable from magic". In this case the possibility of aliens being at the similar level with us is small.

But I think you have a point. Sometimes I doubt the speed of science advances. Maybe the aliens are not so far away from us and their astronautics is not much stronger than our level. They don't look like magicians. In this case things can be boring, may be just an age of discoveries for the aliens.

c_shu··on What Happens If China Makes First Contact?
If the aliens are strong enough to land their spaceship on earth, investigating all countries is probably a piece of cake for them. There is no reason for them to tie themselves to a certain country or area.

In another case, if they establish communication with a certain country/organization, but they cannot arrive, and somehow can only communicate with that certain country/organization, then it could be a different story.

c_shu··on What Happens If China Makes First Contact?
Is the octahedron on the picture supposed to be an alien spaceship?

It reminds me of a creature in a certain animation I watched.

c_shu··on Bitcoin Mining Now Consuming More Electricity Than Many Countries
Yes, human beings always do what's good for themselves.

There is a saying: Never underestimate the power of human wisdom!

They would never do negative-sum games or disastrous things like wars, arms races, environmental pollution, vicious competition, financial crisis, large-scale propaganda or persecution.

c_shu··on DéjàVu: a map of code duplicates on GitHub
like this one?

https://evertpot.com/npm-revoke-breaks-the-build/

c_shu··on Ask HN: What tech were you convinced would take the world by storm but didn't?
1. E-book and products like evernote/google keep. I rarely write things on paper now because I often experience the difficulty of copying/searching. On computers copying/searching is a breeze.

2. VoIP, Skype, WhatsApp, etc. Many years ago I thought they can totally replace traditional phone calls, at least for 99% users. But that didn't happen.

3. Technologies for telecommuting. Less congestion, less pollution. And it saves both time and money. But it's still not so popular. (In Asia, it's very rare.)

c_shu··on All 500 of the world's top 500 supercomputers are running Linux
Ideologies and violence caused so many disasters in history. At least money does not directly terrify us like that. Billionaires usually became victims of such disasters. In the end, money is not the ultimate power. It's violence that matters most on this planet.
c_shu··on A Minimalist Guide to SQLite
So you can insert/delete/update records without rewriting the whole file. And you get many other features like transaction, spill cache pages, fflush & fsync behind the scenes.
c_shu··on Using Java 9 Modularization to Ship Zero-Dependency Native Apps
No. 2.17 MB is NOT enormous. Usually there is no runtime library. In contrast, C or C++ runtime libraries can easily exceed that size. For example, vc_redist.x64.exe is 13.9 MB.
c_shu··on Front-End Checklist
Removing optional tags is recommended here: https://google.github.io/styleguide/htmlcssguide.html
c_shu··on Why favor PostgreSQL over MariaDB/MySQL?
Postgres has better license
c_shu··on Snowman: native code to C/C++ decompiler
Strange. Could it be related to labels as values? https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
c_shu··on The best defense against malicious AI is AI
it's kindof irrelevant to andrew ng's comments. It's about something like Cyberattacks. Something can be done very soon like tricking spam filters
c_shu··on Tiobe Index: Go language at all time high and in the top 10
Scala is too complicated. It reminds me of C++. But C++ is fast. People use it probably when performance is their first priority.

For practical reasons I just bear with C++. Use it as necessary.

I would rather not bear with another complicated language, unless there are compelling reasons.

I think it's unlikely that Scala can be useful to me in the near future, because there are so many good alternatives.

c_shu··on Ask HN: Why does visual programming suck?
Because each method has its pros and cons. It's a difference of generality and specificity.

Consider this list as a ranking: 0 and 1 >> alphabet >> Chinese >> picture.

All 4 methods can be useful in some cases. Chinese has tens of thousands of characters, some people consider the language close to pictures, but real pictures have more than that (infinite variants).

Chinese is harder to parse than alphabet, and picture is harder than Chinese. (Imagine a compiler than can understand arbitrary picture!)

c_shu··on Was object-oriented programming a failure? (2015)
One of the common nice features in OOP is polymorphism. You have a list/set/collection of objects which are of the same type, but also of different subtypes. They have the same behavior when calling some method and different behaviors when calling another method.

OOP is not a failure. But overengineering is another thing. (Sometimes I heard "Never write static function/method! Do it in OOP way!", though it doesn't make the code simpler or cleaner)

c_shu··on Ask HN: What are some well written/engineered open source software?
Boost
c_shu··on Ask HN: What are some well written/engineered open source software?
Isn't Chrome quite buggy and leaky? (for any user of Chrome.) The same goes for Chromium, right?
c_shu··on GCC is C++17 Complete
You have a point. Some people still write C++03 code because "My code will mostly work fine when I flip flag to C++11 anyway". But I always hope newer standards prevail, and make C++ great again.
c_shu··on GCC is C++17 Complete
Please always use "-std=c++14" when you can. There are a lot of subtle differences between c++11 and c++14.
c_shu··on Ask HN: What do you want to learn in 2017?
C++17 (Sigh. I use many languages but learning c++ takes me more time than all the other languages combined.)
Page 1 of 2Next →