HNHacker News
TopNewBestAskShowJobs

SEMW

1,765 karma · joined March 18, 2012

http://simonwoolf.net

Currently: Elixir developer at ably.io

[ my public key: https://keybase.io/swoolf; my proof: https://keybase.io/swoolf/sigs/peGiDfVOfeAJ1dy6H68hG8PBmsdx6s1kXWY6rVhzUr8 ]

submissionscomments
SEMW··on Android 10
You can swipe at an angle (around 45° up or down) to open the menu, and straight out to go back. Not very intuitive/discoverable, but works pretty well once you get used to it
SEMW··on I am a horse in the land of booleans
The trouble is that `if(value)` or `value && ..` ends up getting used as an idiomatic shorthand for "if value is present" even in languages (such as javascript and python) where 0 is falsey. Because most of the time it works, so people do it. And then inevitably get bugs when the value happens to be 0.

This can get increasingly hard to reason about the more datatypes you add which interpret 0-ish values as falsey -- as there's always the temptation to do, for 'consistency' with integer truthiness, e.g. https://lwn.net/Articles/590299/ about the python behaviour of dates being falsey in the first second after midnight.

If `null` and `false` are the only falsey values (ala clojure, ruby, elixir etc), that's a rule that's really easy to internalise and reason about, so you never have to worry about things like whether your data type might be falsey in the first second after midnight (and also `if(values)` is actually a correct idiom).

SEMW··on Battling Entropy
You're making the (very common) mistake of taking a poetic English-language interpretation of a physical law -- which is necessarily lossy/imprecise, since the actual law is mathematical -- and over-interpreting the words without referring back to the actual law.

You can see the law (in the context of thermal & statistical physics) at https://en.wikipedia.org/wiki/Entropy_(statistical_thermodyn.... You can of course argue that 'disorder' isn't a good way of translating the maths into English, but shrug, it's the one people seem to have settled on. And of course, that's orthogonal to whether the actual law is true or not.

SEMW··on Wi-Fi Alliance introduces Wi-Fi 6
> imagine a light that can manage to penetrate a bathroom wall, and tell me you don’t think it’s maybe a bit too powerful for consumer use ;)

Visible light has a wavelength of a few hundred nanometers; wifi is around 10 centimeters. Material penetrability varies enormously between different wavelengths (and between materials). Harm to humans also various enormously, and in a way very different from penetrability (for example, some wavelengths of UVC are very harmful to human skin but can be almost completely blocked by a thin sheet of clear glass). Equating penetrability with either 'power' or harmfulness is not a useful intuition.

(incidentally, an incandescent light bulb emits on a blackbody spectrum, so some very small proportion of the energy it uses will be emitted at e.g. radio wave frequencies, which will certainly penetrate the bathroom wall)

SEMW··on Artificial intelligence is impossible
Sure, of course. That's a philosophical position known as Dualism[0].

The trouble is that what the author has done is base their argument on an assumption of dualism, but not made that assumption explicit. If made more explicit, the question-begging becomes more obvious: "If we assume there is something special and meta-physical about the human mind which is not replicable anywhere else, then artificial intelligence is impossible". Well, yeah. But putting it that way doesn't make for a very dramatic article...

[0] https://en.wikipedia.org/wiki/Mind%E2%80%93body_dualism

SEMW··on Artificial intelligence is impossible
The human brain, like everything else, ultimately runs on the laws of physics. If the laws of physics can be simulated on a computer, then the brain is theoretically simulatable on a computer. So any argument that a computer cannot even in theory do some thing that a human mind can do must be flawed, unless the assumption that of the simulatability of physics is wrong.

(This particular instance is thinly veiled question-begging; it takes as its assumption that a human mind is special ("A defining aspect of the human mind is its ability to create mutual information"), and proceeds to conclude exactly what it just assumed. See also: sloppy dualism — http://goodmath.scientopia.org/2013/01/17/sloppy-dualism-den... )

SEMW··on Bullshit Jobs
AFAICT none of the links you give offer any support for the claim that "psychiatry is bullshit".

Several, if anything, support the exact opposite (e.g "antidepressants to be more effective than psychotherapy" -- 'psychiatrist' is not a synonym of 'psychotherapist', a psychiatrist is a medical doctor specialising in mental illness, so is licensed to prescribe antidepressants). Most of the others are just not relevant to the claim ("Young children emerge from single potentially traumatic events psychologically unharmed" -- how exactly is that supposed to be evidence that psychiatry is bullshit? By some kind of hidden implication that just because thing X does not cause mental illness, therefore mental illnesses don't exist?)

SEMW··on Show HN: unicode.style
> How do screen readers handle other aspects of mathematical equations? For example, if I have an equation like "A equals B to the C", how do I represent this such that a screen reader will say it correctly?

This was one of the problems that MathML was built to solve, see https://accessibility.princeton.edu/blogs/mathml-accessible-...

SEMW··on Show HN: unicode.style
> But that's not what I wanted. I wanted Chrome's url bar to interpret those unicode code points as an italic version of the actual unicode code points I want. Chrome should add a check for edge cases like these and add branches to map the string to the corresponding non-styled code points automatically.

No, it shouldn't. They are semantically different code points. The _whole point_ is that they are semantically different code points (they're from the Mathematical Alphanumeric Symbols block, the purpose of which is for e.g. when you have a formula containing 𝘹 and 𝘅 as semantically different characters, where that difference needs to be preserved in copying & pasing, conveyed to screen readers, etc.

> Ooh, here's another one-- if you paste some unicode.style'd text into LibreOffice does it convert it to the "normal" code points and add the relevant styling? If not, it should, otherwise it's broken.

It really, really, really shouldn't, for the same reason as above.

Mathematical symbols are not a replacement for text styles and markup. Trying to make them that will destroy the thing they're actually useful for, the thing they can do that text styling can't do: preserve their semantics when transmitted in plain text (including for accessibility purposes).

This is not styling. It cannot be normalized away. They are semantically different characters.

https://www.unicode.org/faq/ligature_digraph.html#Pf6

SEMW··on Show HN: unicode.style
It doesn't and shouldn't.

The whole point of having Mathematical Alphanumeric Symbols as separate unicode code points, rather than just using normal latin characters with style markup, is so they can be used when the different letters have semantically different meanings -- in particular in maths when 𝘹 and 𝘅 can be in the same formula, representing different concepts. They're not a replacement for style markup.

In other words, they're different characters specifically so that screen readers can know to read them out loud differently!

Trying to 'fix' screenreaders by having them read anything that them as if they were normal latin characters, to accommodate people who like using the Mathematical Symbols block for fun in places which only allow plain text, would completely defeat the actual purpose of them.

https://www.unicode.org/faq/ligature_digraph.html#Pf6

SEMW··on Advice
By definition only one place can be the Schelling point: the one that, in the absence of any coordination, a plurality of people think would be picked as the one that a plurality of people think would be picked as... etc.
SEMW··on Comparison of Erlang Runtime System and Java Virtual Machine [pdf]
To clarify that a bit -- while the semantics are that erlang can only send messages between processes, what the BEAM actually does under the hood can certainly involve memory sharing, for efficiency reasons. E.g. binaries >64 bytes are stored outside of the individual process heaps, and are just sent as references rather than actually copied (unless sent to a proc on another node in a mesh, of course).

Since everything's immutable, from the programmer's point of view the behaviour is identical to if it was copied, so the sharing is an implementation detail that doesn't affect the semantics.

SEMW··on Gallery of programming UIs
To be fair, Google Docs' core offering is live collaborative editing, not 'being a CDN'. Sure, there are ways they can support each at different times if they really wanted to, but it seems perfectly reasonable for them to say that when it gets to an N that they'd have to put significant engineering effort into supporting, that that's not what it was designed for, and that if someone wants CDN behaviour do that they can always export the document and put it on an actual CDN
SEMW··on DNS over HTTPS
> performant is not considered a real word in English, although I commonly see it used...

This is close to being a contradiction in terms. The purpose of words is to communicate, and if a word is being successfully used to communicate -- which clearly it is -- what exactly does it mean to say that isn't "considered a real word"?

Also, "Considered" by whom? The dictionary? Dictionaries are descriptivist -- they record usage, they don't prescribe it [0]. If it isn't in the dictionary yet, that's only because the usage hasn't been used widely and/or for long enough that it meets the inclusion criteria [1].

(As it happens, "performant" is at the stage where it is starting to pass those thresholds, and is now in the OED [2])

[0] http://englishplus.com/news/news1100.htm

[1] http://public.oed.com/about/frequently-asked-questions/#qual...

[2] https://en.oxforddictionaries.com/definition/performant

SEMW··on Observable Universe contains 10x more galaxies than previously thought (2016)
No? The data for the makeup of energy in the universe is mostly from CMB anisotropy (plus various measures of how fast the universe is accelerating, like how much supernovae have been redshifted). Finding out that galaxies in the early universe used to be smaller and more numerous than previously thought doesn't much affect any of that. (there's quite a lot of different data sources now all pointing towards an omega_lambda of 0.7).

To be clear, per the article, the new discovery isn't about the early universe being a significantly different density (i.e. anything other than 'approximately flat', total omega ≈ 1) than the current one. Like, it's not that there was more mass-energy in it that's somehow vanished, rather that it's just distributed between more & smaller galaxies

SEMW··on Ask HN: What’s your favorite talk from 2017?
Matt Might's Codemesh 2017 keynote: "Winning the War on Error: Solving Halting Problem, Curing Cancer" https://www.youtube.com/watch?v=EVkHgKCqAcI
SEMW··on Bitcoin exchange Youbit shuts after second hack attack
https://en.bitcoin.it/wiki/Multisignature
SEMW··on Jeremy Corbyn: Imagine an Uber run co-operatively by their drivers
> Who would bear the risk? Who would bear the losses? Also, what would happen to bad drivers on the system, would they get fired like Uber fires them?

You're talking as if this were some bizarre new thought-experiment that no-one's properly thought through. Co-operative supermarkets exist. Co-operative department stores exist. Bad employees at Waitrose can get fired like at any other supermarket (though obviously they're generally better treated than at privately-owned ones).

You seem to be imagining a cooperative as a collection of free agents who have complete autonomy and can never be fired. That model probably exists, but that's not what people typically mean when they talk about cooperatives, especially in the context of the UK, as the politician in the OP is.

What they mean is a structure like the John Lewis Partnership (which has been around since 1929), wholly owned by a trust whose employees are its beneficiaries. Which means any profits are distributed among its employees, who also get a say in the running of the business. But it's still a limited company, so it's still run by its executive team (albeit one which is ultimately accountable to the employees), and risk, losses etc. all work as normal for a limited company.

SEMW··on The impossible dream of USB-C
Contra sibling comments, it technically isn't a legal requirement. It's entirely voluntary, a memorandum of understanding between manufacturers, facilitated by the EU.

Obviously 'voluntary' here deserves some scare quotes since the EU had made it very clear that it was willing to swing its sledgehammer and formally regulate if the manufacturers couldn't agree on a standard amongst themselves. Which would have been less good for everyone (including the EU), e.g. since formal legal regulations are a lot harder to change with the times, So they were pretty incentivized to work something out, and happily they did.

https://en.wikipedia.org/wiki/Common_external_power_supply

SEMW··on Judge blasts Waymo v. Uber lawyers, delays trial until December
Where did you get that that particular attorney is "obligated to be present"? He's not being sued, Uber is. Uber obviously has to be there in some capacity, but they have no shortage of lawyers, both inhouse and external counsel. (That particular one is external, he works for Morrison & Foerster).

IANAL.

SEMW··on The Absurdity of Nobel Prizes in Science
> The article address this argument though and says that the Foundation has already stretched the rules.

That bit of the article is arguably misleading. The foundation is not stretching its rules in awarding it to three people. That stretching (from one to three) was done immediately after Nobel's death as part of the settlement of his Will, and enshrined in the statutes of the foundation ("nor shall it be divided into more than three prizes at most")[0].

Whether it's possible to change it now to allow more than three is a question for someone who knows Swedish Trust law.

[0] https://www.nobelprize.org/nobel_organizations/nobelfoundati...

SEMW··on Bank Account That Pays 200x MORE Interest
I'm confused. They say they can give more interest because they don't have the costs of traditional banks. But then in the FAQ, they say that they're a middleman for a bank acct provided by a traditional bank ("Your money stays in an FDIC-insured deposit account provided by Beam's bank sponsor"), so the 'no costs' explanation makes no sense, they're adding an extra layer.

So where does the extra money come from? "Beam makes money by providing value-added services to our partnering bank and other financial service partners in the banking ecoysystem".

Well, that's... nonspecific. What services? What's the actual thing they'll be making money from? Why are they being vague about it? This smells of the nominal customer actually being the product, unroll.me style

SEMW··on TLS in Linux 4.13 kernel
Thanks Jonathan.

Everyone: the above gives a lot of very helpful context & explanation for this (from when the patch was first posted in Dec 2015)

SEMW··on Germany, in a First, Shuts Down Left-Wing Extremist Website
Of note: that quote's from a spokesperson for Die Linke, which is the direct descendent of the party (the SED) that governed Soviet-occupied east Germany between 1949 and 1990. Which was hardly well known for its high levels of freedom, of expression or otherwise
SEMW··on Erlang Garbage Collection Details and Why It Matters
Note that binaries >64 bytes are indeed stored in shared memory and reference counted. (Including utf8 strings (as opposed to charlists), which are binaries in erlang). See http://erlang.org/doc/efficiency_guide/binaryhandling.html#r... for more info
SEMW··on Elixir 1.5 released
An empty list in Elixir is [], and is truthy.

Parens aren't used for any collection type in Elixir ( `(1,2,3)` is just a syntax error), so the lispyness explanation for () being nil in Elixir, while neat, doesn't really make sense

SEMW··on MDN’s new design is in Beta
> It may be new but it is not a well-thought design. 110+ characters per line is hard to read and ugly

Er, not sure if you're looking at the before and after screenshots the wrong way round? The new design appears to reduce the number of characters per line from ~100 to ~80 (by increasing the body font size).

Compare first line of Array#slice in the old design:

"The slice() method returns a shallow copy of a portion of an array into a new array object selected"

vs the new:

"The slice() method returns a shallow copy of a portion of an array into a new array"

SEMW··on UK arms sales to Saudi Arabia ruled lawful
Heh. I think they tend to phrase it ".. so as to appear to have taken leave of [their] senses", to leave open the possibility of sanity :)

http://www.uniset.ca/other/cs6/2001EWCACiv789.html is a good example of a case where a government decision was overturned on Wednesbury irrationality grounds. (Ctrl-f for "judgment of the court" and start reading there)

SEMW··on UK arms sales to Saudi Arabia ruled lawful
Lots of people in this thread are acting as if the court held that the arms sale was moral, or even a good idea. Courts don't work like that (at least, Judicial Review cases in England don't).

The court was asked to block arms sales on the grounds that the gov'ts decision to sell arms to Saudi Arabia was Wednesbury unreasonable. For a decision to be Wednesbury unreasonable, it must be so irrational that no sensible person could have arrived at it.[0]

This is a really high bar.

The court held that the decision to sell arms didn't meet this bar. This was the expected outcome — it's pretty rare for government decisions to be overturned for Wednesbury irrationality. This case was a long shot by the CAAT. This doesn't mean the court thought arms sale was good, moral, or anything else. But English courts doesn't have the power to strike down decisions (that are within the power of the government to make under statute or common law) for not being good or moral.

(IANAL).

[0] https://en.wikipedia.org/wiki/Associated_Provincial_Picture_...

SEMW··on Things that Idris improves things over Haskell
I haven't yet tried Idris (or even Haskell), so I could be misunderstanding, but surely in a pure language, a function with a type of String -> Int can't 'blow up', it can only output an Int? So if you want to tell the difference, you'd use something that outputs a (Maybe Int) rather than an Int, which'd be a wrapper around `cast` that does validation you want

Looking at the interfaces tutorial[0], it gives an example of something similar:

    readNumber : IO (Maybe Nat)
    readNumber = do
      input <- getLine
      if all isDigit (unpack input)
         then pure (Just (cast input))
         else pure Nothing
[0] http://docs.idris-lang.org/en/latest/tutorial/interfaces.htm...
← PreviousPage 2 of 16Next →