HNHacker News
TopNewBestAskShowJobs

ekr

730 karma · joined January 27, 2013

h2ofarmer@proton.me
submissionscomments
ekr··on Ask HN: What is the one habit that you adopted and it changed your life?
Now, I can't conclusively assert that it has changed my life, but I've been roughly following the guidelines given in "Perfect Health Diet" and I've experienced some general improvements in physical and mental health (although I wouldn't say they are groundbreaking, there could be lots of confounding variables). But lots and lots of people strongly support this book and claim significant benefits (this again is not a strong and conclusive argument that the book is actually correct is significant in its effect).

Perfect Health Diet (https://www.amazon.com/Perfect-Health-Diet-Regain-Weight/dp/...), despite the very unscientific name, it's the result of the work of two scientists into optimizing their diet for better health. It walks through what's essential in a human diet (micro-, macro nutrients), and also compares to the diet of various traditional tribes, other mammals. The book documents a clear cause-and-effect network between many nutritional issues and the resulting diseases. I learnt a lot about the mammal metabolism from this book.

The most significant factor arguing for this book is that almost every assertion is supported by a multitude of significant studies.

Some quick takeaways: * dose makes the poison: for almost every nutrient the body needs, there's a certain interval in which that nutrient is beneficial, above which that nutrient is toxic. (yes, this may seem tautologically true, but it's important) * the diet of the ancestral man, and most wild mammals is strongly based on saturated and mono-unsaturated fats. This is in strong contrast with the modern American diet, which is strongly based on carbohydrates. As the book carries on the explain, those fats are the exception to the above takeaway, those two types of fat pass through the organism with very little stress to organs, it's a simple reaction which results in no toxic by-products. * there are some commonly consumed things which are actively harmful and are associated with a range of diseases. Some of those are grains.

(anyway, it's been some time since I've read it, I do recommend it as a very well thought out book on nutrition for those interested.)

ekr··on Ask HN: What is the one habit that you adopted and it changed your life?
It's the first time I've heard of TM, and having experienced some benefits from more traditional meditation in the past, I was curious.

So I ran into this document, which offers a comprehensive introduction into TM: http://minet.org/Documents/TM-FAQ .

Later edit:

My personal unqualified opinion on the matter: too much involvement of religion and bullshit in this program. While there is a scientific basis to the benefits of meditation, TM is not the most direct and straightforward way to reaching that, as it seems to be organized more as a money-making machine than as a non-profit for helping people.

Personally, meditation has helped me a lot in getting rid of anxiety, letting go of a lot of worries and stress, and simply having a better mental well-being, and with that comes a higher level of cognitive performance and general effectiveness. But I haven't stuck to a habit of focusing the attention towards breathing or anything like that, although I've practiced many forms. At this point it is simply a set of thought patterns, when I notice that I'm in an undesirable mental state, I simply breath, and let go, in a sort-of automatic fashion. This may be something entirely different from meditation, but I think it's a result of that practice.

For a while I've actually considered meditation to be counter-productive. In most matters, if something is causing you stress and worry, there's an evolutionary purpose in that stress and worry, and namely it's pushing you to solve the problem that's at the cause of it. Meditation in a way relaxes that push for solving the issue, that stubbornness, and also helps you let go of desires and wishing the world was in a certain way. It has the effect of making you more grateful and accepting of the state of things. But of course, there are some people for whom this stress and worry is kicked into overdrive by small things, and getting rid of that effect provides an immense benefit to their well-being and productivity, and I count myself to that group. But still, I think meditation is great in moderation, like most things.

ekr··on Brand New ODroid Single Board Computer
Odroid was never the cheapest option, but they provided outstanding software support and great product reliability.

Now, in the x86 space both of those things (software support, reliability) are not an issue. Besides, there are much cheaper options available on the market (e.g. https://s.click.aliexpress.com/e/cSJOvljS , same platform with 4GB ddr4, 64gb emmc, case, power supply for ~$140 shipping included).

So I reckon you're right, this product won't be too successful.

ekr··on In Praise of Mediocrity
Testosterone levels drop significantly with age, and that probably explains the lack of competitiveness and increasing agreeableness in older people.
ekr··on Ask HN: What are the best textbooks in your field of expertise?
I would also add "ML for the working programmer", which is, perhaps surprisingly, more about functional programming than the particularities of ML. In any case, it is a great book.
ekr··on Ask HN: What things have richly rewarded the time invested in mastering them?
> Learning x86 assembler back in school: knowing what everything comes down to in the end has no price.

I think going a couple of steps lower, learning electrodynamics (from a book like morin&purcell), and then electronics (art of electronics), will give you even more satisfaction.

ekr··on Burnout vs. Major Depressive Disorder (2014)
https://web.archive.org/web/20170811212743/http://www.burnou...
ekr··on Ask HN: What would it take to have a DM feature on HN?
For those wondering, DM stands for direct messaging (I hope I wasn't the only one).
ekr··on A Haskell Compiler – Slides on GHC Implementation (2013)
http://www.scs.stanford.edu/11au-cs240h/notes/ghc.html
ekr··on Electricity Map – Live CO2 emissions of electricity consumption
The core of the problem is game-theoretic in nature, a coordination problem, related in some ways to the tragedy of the commons.

Unless one of the entities involved goes out of their way at personal loss to fix the issue, all agents are operating optimally and yet, we're slowly headed to a minor environmental disaster on our only inhabitable planet.

ekr··on Using FOIA Data and Unix to halve major source of parking tickets
On the one hand, this is a really neat hack. On the other hand, given the current situation with cars, pollution in cities (air quality, noise-level etc), global warming, I would personally think twice before doing something that would make car driving easier and more pleasant, as that simply incentivizes more driving. (getting a ticket might be a small inconvenience, but it does contribute to creating a slight aversion to driving).

Sure, this may seem a bit "evil", and the better solution is reducing negative externalities through taxing, which is a more transparent and ethical solution, but most of us don't have that level of power and influence within local councils and governments.

ekr··on Ask HN: Plenty of large sites down; Reddit.com, GNU.org, Discord, coincidence?
GNU.org relying on a cloud provider? Isn't that going against the GNU philosophy a bit?
ekr··on Ask HN: Securely run code uploaded by users
I was once thinking of implementing such an online judge. Looking through the existing implementations, most restrict the syscalls available to the untrusted process, and run in a chroot.

On freebsd, you'd use something like capsicum. On linux, something like seccomp. Although, nowadays I imagine people would think of just running in a VM or a container.

ekr··on If monads are the solution, what is the problem?
Actually, that is not entirely true. The monad bind operator introduces a data dependency which is responsible for the sequencing itself, not the actual implementation of the bind (i.e. it is a result of the type of the bind).

But I do agree with the general idea that Haskell as a language is still a leaky abstraction, you still need to understand a lot of behind-the-scenes stuff, like how the RTS interacts with the OS ABI, how concurrency is implemented, the consequences of laziness and so on. Just knowing the denotational semantics of the language is not enough.

ekr··on One in three fish caught never makes it to the plate – UN report
My experience of this is that 10-15 years ago, when I was a child, my dad would often take us on road trips by car, sometimes arriving home late into the night. (the trips were around Central Europe)

The headlights, windshield and parts of the body were always significantly covered by dead insects.

For the past 5 years or so however, they have almost always been perfectly clean. This has amazed me.

ekr··on Researchers suggest that R.E.M. sleep serves to warm the brain
It doesn't make any sense at all to me either. Because of the difference in specific heat and heat conductivity of water vs air, an animal that can sleep under-water (even whilst alternating the sleeping part of their brain), surly doesn't need to warm its brain while on sleeping on land.

(But I'm no expert.)

ekr··on OpenBSD, C, httpd and SQLite – Web App stack
It's slow because of its design, i.e. spawning a new process for each request; so it's not because of the OS.
ekr··on Web Framework Benchmarks
Until your app gets on HN/Slashdot/Reddit etc and experiences the hug of death.

Jokes aside, I do agree that from a developer's standpoint, the optimal way to act (optimising for business success) is as you say, ignore performance at first. But from an engineering/craftsmanship standpoint, it should really bother you to have an inefficient system.

Just think of all that extra CPU load, and all the CO2, all the coal burnt to sustain it ...

ekr··on Microsoft acquires Github
> Direct-X has had a history of being the superior graphics API to OGL.

That view is fairly one-sided, to say the least. The history is presented in this StackExchange thread: https://softwareengineering.stackexchange.com/questions/6054....

But to summarize: OpenGL was the standard before D3D was created. D3D has been a step behind OpenGL in features and performance up to about D3Dv7. Then the OpenGL ARB screwed up, with Microsoft among the members (some hypothesize that Microsoft were attempting to sabotage OpenGL).

ekr··on How I Came to Write D (2014)
At least Facebook is currently heavily investing in Haskell (using it for some core infrastructure, and having hired some core GHC contributors).

MSFT is also contributing to Haskell by supporting Haskell-related research, and employing Simon Peyton Jones.

Jane Street Capital is also heavily investing in OCaml.

While these languages are occupying a different niche than D, they are more arguably innovative/ integrate way more research / plt theory.

ekr··on Ask HN: Learning multiple languages vs. mastering one
programming language theory
ekr··on Ask HN: Learning multiple languages vs. mastering one
There's much more to programming/software engineering/software craftsmanship than just the language. Firstly, the majority of the languages used in the industry really only have superficial differences, they are all implementing the same OOP semantics, with minor differences and are mostly isomorphic to each other up to some syntactic sugar.

To really gain some knowledge out of learning a new language you should ideally cross boundaries to a new paradigm. The most commonly cited example now is Haskell, which is a fairly state-of-the-art language in terms of PLT research, and is a great illustration of the functional paradigm, due to its purity. The consensus among haskellers is that the code is much more concise + higher-level (case in point Xmonad being roughly 1/10th of the equivalent C software packages), much more type-safe and also easier to refactor etc. IMO, after I became productive in Haskell, programming in other languages seemed a bit like writing assembly (there's nothing wrong with assembly, in fact, optimising code down to cpu cycles was a favorite pastime of mine some time ago). Also, the boilerplate is much less significant compared to most other languages. (Case in point, again do the recent research in generics, GHC can automatically derive instances for various type classes. For instance, the most popular JSON package, aeson has the ability to automatically generate ToJson/FromJson classer for your types with no user code).

One downside of Haskell is that it may have a steeper learning curve, to really master it. Most of the reading will be from research papers and functional programming journals, but all this learning really does translate into a skill that pays off.

So my personal advice: if you really want to learn a new language, you should go with a different paradigm, e.g. Haskell if you're new to functional programming. But I would suggest instead just building stuff, and if you notice that your implementations are pushing your current language to its limits, see how other languages fare.

But IMHO, if you want to grow as a software engineer, you should just build stuff, build an operating system, build a compiler, build a database, build a web server, a game engine etc. You will cover far more theory and the learn more skills than just learning a new syntactic sugar.

ekr··on Ask HN: Learning multiple languages vs. mastering one
> However, as a practical matter, learning just Java and Python really well will cover most areas of software development.

I disagree, given that both are interpreted languages, that excludes (practically) most embedded, low-level, high-performance software. Sure, you can use stuff like micropython, but it is not as practical as C is in that domain.

ekr··on How Strenuous Exercise Affects Our Immune System
My personal experience with long (100miles+) cross-country mtb riding (with lots of climbing) is that in fact, catching a cold after such a strenuous ride is way more common than the base rate. This is also the experience reported by most professional cyclists (check TdF reports).

My under-researched model of how this happens, is that there is a lot of tear-and-wear in the muscles where the effort is happening, which leads to inflammation, and that's where the white-blood cells might end up.

ekr··on TSMC Kicks Off Volume Production of 7nm Chips
This makes me hope that maybe all those chipmakers will finally move on from that extremely long-lived 28nm node. It has been heavily used since 2011-2012 and even companies like Qualcomm have been using it as recently as last year in the lower-end range of products. Companies like Allwinner, Rockchip, Amlogic have yet to release a single chip on newer nodes.

What this means is that the 28nm node has been the cheapest now for 7 years running. Usually, when new nodes came up, the cost per transistor initially was lower, while the yields are slowly improving. But after ~1-2 years, the new node was always more cost-effective then older nodes, per-transistor.

This wasn't the case with the 28nm, which stuck around for 7 whole years, and still seems to be the most cost-effective. But surely, now with 7nm available that won't be the case for much longer. Good riddance.

ekr··on Tell HN: My best productivity hack
This can be improved a bit:

Step 1: sudo vim /etc/hosts

Step 2: Go

127.0.0.1 facebook.com

127.0.0.1 youtube.com

127.0.0.1 twitter.com

127.0.0.1 instagram.com

Step 3: ZZ

ekr··on Why is everyone so busy? (2014)
(this is only a very quick and dirty exposition.)

Humans, like every other organism on this Earth, have been shaped by evolution, which has instilled a set of adaptations into them.

Like most other species, there is a competition for mates, reproduction opportunities and resources within the sexes. So, along the ages, humans have acquired a set of adaptations that "maximize" wealth, status, (whether they still work in the current environment as opposed to the ones in which these adaptations evolved is another question). So, in essence, humans who tended to work more, tended to obtain more resources/wealth thereby becoming more attractive reproductive prospects. You also get more opportunities to help fellow tribe members, improving your status within your community etc. In other words, a highly competitive arms race has emerged.

However, only in recent times, intellectual work has become more common, where the size of the input is not proportional to the quality of the output.

There is another dimension to this. Many humans today work in corporate environments where there is an intense competition for advancing in a rigid hierarchical structure. These advances are strongly correlated with income growth, and power and control over many work-related issues, which is strongly related to status. In these environments, it is often difficult to actually measure the output quality and quantity of each human, partly because there is little incentive to do that, partly because people doing the measurement are not the most technically knowledgeable in the field, but mostly because they are humans themselves and thus have their own interests (namely improving their reproductive prospects themselves, so they need to forge allegiances that stabilize their positions etc). Promoting the most capable worker is sometimes outside their interests. So in this environment, many other cues are used to evaluate the worth of employees, many completely unrelated to their capabilities and work. So, marketing oneself becomes an important aspect in this economy.

One clear way to signal to others that you are very dedicated to the company and an important employee is to spend more time at the office than the others. Busyness is a signal of importance/status and value to the company. Of course, people actually interested in performing high quality intellectual work will know that time spent on a task is only one (minor) factor ...

ekr··on Why Is SQLite Coded in C? (2017)
Other than HaikuOS, I can't think of any other real-world kernel written in C++. Linux, all BSDs, Windows NT, Hurd are all C. I'm not sure but I think XNU is C as well (the wiki lists it as C/C++).
ekr··on Ask HN: Can't code for hours since it became a job
Sounds like the overjustification effect (https://en.wikipedia.org/wiki/Overjustification_effect).
ekr··on The Curiously Elastic Limits of Endurance
What I find the most interesting, is sometimes there a person who comes along, completely unaware of that limit, of the supposed difficulty or scale of the challenge (common knowledge among the others), and breaks that limit seemingly without effort. The story of George Dantzig is just one example that comes to mind (https://en.wikipedia.org/wiki/George_Dantzig).
← PreviousPage 4 of 10Next →