HNHacker News
TopNewBestAskShowJobs

mrkgnao

1,913 karma · joined March 29, 2016

submissionscomments
mrkgnao··on Addendum to “Curl is C”
https://github.com/jameysharp/corrode
mrkgnao··on Open Source License Business Perception Report
Is it because it's an adjective here?
mrkgnao··on Jeff Bezos Is Now the World's Second Richest Person
"It's full of contradictions!"

"So is independence!"

mrkgnao··on New male contraceptive may be submitted for Indian approval this year
I can't even...

> At the moment it is the woman who retains control over the moment at which that melting in the bones feeling is allowed to over-take the firm "no this would ruin my life" feeling in the head.

Is not the whole point of contraception insurance againt emotional losses of control?

mrkgnao··on New male contraceptive may be submitted for Indian approval this year
Not American, and the only place I've heard of March Madness is on reddit in a reference to ... guess what? :)

http://fortune.com/2017/03/16/vasectomies-during-march-madne...

mrkgnao··on New male contraceptive may be submitted for Indian approval this year
Young, educated people in Indian urban centers are essentially a demographic that doesn't need to be targeted because they're almost always sensible enough. Take away any of those three conditions, and the need for proper education among that group becomes harder -- as does the difficulty of reaching, convincing, and actually implementing any sustainable "culture of contraceptive use" among them.

It's what you'd expect where adults, especially lower- or lower-middle-class adult women, will almost never talk about sex, resorting to grown-up versions of "wee-wee", or oblique "that time of the month"-ish circumlocutions, if they do at all.

India also has a pretty grim history of adult men being forced to undergo (often botched) sterilization during the infamous Emergency declaration in around 1977, with a significant number of casualties. This kind of history obviously muddies the waters (as if the almost-institutional cultural reluctance to engage with these matters wasn't enough).

https://en.wikipedia.org/wiki/Compulsory_sterilization#India

https://en.wikipedia.org/wiki/The_Emergency_(India)#Forced_s...

I must say, though, that there are more TV ads than ever, and even the occasional billboard (which residents' unions will often try to shutter on the grounds of "public morality") for condoms or contraceptive pills. AFAIK (and it's no wonder why) the government doesn't advertise morning-after pills at all, but Indian Big Pharma does (and, again, I doubt how many of the people who'd actually benefit from the ads see them or act upon the information). Unlike the situation in the US, here the driver is some kind of ill-defined "decency" rather than the threat of swift retaliation from an enraged petty deity: not that it makes much of a difference.

mrkgnao··on New male contraceptive may be submitted for Indian approval this year
Huh, you weren't kidding:

https://www.scientificamerican.com/article/periodic-abstinen...

although we do have this:

> "You really can't extrapolate from this paper," says David Grimes, an obstetrician-gynecologist and vice president of biomedical affairs at the nonprofit public health organization Family Health International. "Naive readers see these results, and they think [STM] is the greatest thing since laptop computers. The researchers on this paper went back and cherry-picked this data from an ongoing study from the past 20 years. They chose the users who were the best users for this method."

and there aren't any references there at all. Besides, the requirement that a couple perfectly adhere to the rules is pretty ... unergonomic.

(caveat: I'm of course not remotely anti-contraception, but it was a fun couple of searches)

mrkgnao··on Measuring What Matters: Diversity at Uber
The colorscheme on the "US Race and Ethnicity" ... ring? ... chart seems purposefully difficult to decipher. On a phone, the colors seem to blend into each other.
mrkgnao··on A Constructive Look at TempleOS (2015)
From the TempleOS homepage:

> No police state. Nothing is different from 1990 except we don't have any enemies. The World has gadgets to amuse itself. Eliminate fat-ass government jobs. Eliminate CIA, NSA and TSA. Don't fucken touch my computer, CIA ------. Githib is to register and control dangerous people and code. No cloud.

One needs the context. It's very stream-of-consciousness-y.

mrkgnao··on Uber takes its self-driving cars off the road after one flipped over in Arizona
IOW, Tesla will be to Uber as Uber wants to be to its drivers.
mrkgnao··on Uber takes its self-driving cars off the road after one flipped over in Arizona
https://en.wikipedia.org/wiki/Prediction_market?
mrkgnao··on An Indian Ocean island with a community that has been there for 60K years (2015)
Related, probably from an old HN story:

http://www.probashionline.com/madhumala-chattopadhyay-first-...

mrkgnao··on UK Home Secretary says encryption on messaging services is unacceptable
Thought-experimentally: could we potentially be able to scan message databases for the absence of certain phrases, using something like [1], but in a probabilistic manner akin to that of a Bloom filter? This would ensure that law enforcement would be able to flag certain keywords with a nonzero (and nontrivial) false-positive rate. That way, repeated flags end up identifying potentially interesting members of society, without proof and with data inadmissible as reliable evidence in a court of law.

Of course, one runs the risk of the existence of false positives being forgotten, TLA/government pressure to reduce the false positive rate, and so on. But I think this is a slightly interesting way to (partially) preserve privacy while satisfying lawmakers who demand that there be some way for them to listen in on (what should ideally be completely private) data. (This is, of course, only possible once one drops the axiom of privacy being an absolute right: I don't personally support doing this at all.)

[1]: https://crypto.stanford.edu/portia/papers/HardNDB.pdf

mrkgnao··on Haskell Concepts in One Sentence
Well, a monad is parameterized over a type (so Maybe is the monad, not Maybe a -- or State s, Writer w, and so on), so GP could be said to have a point: Monad (with a capital m) is the (type)class of datatypes which do all those things.

But, honestly (my silly rules-lawyering aside), a monad "is" an endofunctor and two particular nice natural transformations that satisfy some coherence conditions. This is at the other extreme of the pedagogical utility/clarity scale, since it is the final (if opaque) answer to any definitional ambiguity.

Functors and applicative functors precede monads in (pretentious cough) modern Haskell pedagogy, as championed by the (thankfully non-pretentious) Learn You A Haskell, as well as the Haskell Wikibook. Reading the relevant chapters is a good start. :)

http://learnyouahaskell.com/

https://en.wikibooks.org/wiki/Haskell

mrkgnao··on How Subtle Class Cues Can Backfire on a Resume (2016)
https://books.google.co.in/books/about/Weapons_of_Math_Destr...
mrkgnao··on Haskell Concepts in One Sentence
The "categorical" definition of monads uses return and, instead of bind,

  join :: m(m a) -> m a
You don't need to specify it if you already have bind/>>= and return/pure, since they can be derived from each other.

For instance, purely by "following the types",

  f :: a -> m b
  fmap f :: m a -> m (m b)
  join (fmap f) :: m a -> m b
In other words,

  (>>=) :: m a -> (a -> m b) -> m b
  ma >>= f = join (fmap f ma)
is a perfectly good definition of bind I you have join.
mrkgnao··on The Night Watch (2013) [pdf]
Literally small-spirited?
mrkgnao··on The Night Watch (2013) [pdf]

    Syntax error: unmatched thing in thing from std::nonstd::__map<_Cyrillic, _$$$dollars>const basic_string<epic_mystery,mongoose_traits<char>,__default_alloc_<casual_Fridays = maybe>>
mrkgnao··on The Mathematics Autodidact’s Aid (2005) [pdf]
My Hackernews!

http://www.logicmatters.net/tyl/

mrkgnao··on The Mathematics Autodidact’s Aid (2005) [pdf]
Pugh, by any chance?
mrkgnao··on The Mathematics Autodidact’s Aid (2005) [pdf]
You're not stupid. At least, there is very little chance that the math you're trying to work on right now requires super-normal cognitive abilities of any sort: it's more about learning to be comfortable with the ambiguity or lack of comprehension that the process of learning entails. Here's a grab-bag of stuff that have helped me (and still do) lift myself out of "damn I'm dumb" situations such as the one you seem to find yourself in.

"Does math have to be ambiguous or cryptically written? That doesn't sound right."

Well, no. Sometimes, the solution is just "get a better book" (although, see [-1]). However, even extremely well-written books will skip over certain details (which ones they elide depends on the target audience), for the simple reason that it

a) massively shortens the book

b) maintains the "flow" well, instead of stopping every few sentences to distract the reader with ideas not directly relevant to the argument

c) acts as a natural method to help people choose materials: if you're hitting things you can't understand or even parse every two lines, maybe you'd be better served by coming back to it a while later?

In other words, the skipped details and "why would that be the case?" are going to be there even in books that are considered masterpieces of mathematical writing, and everyone encounters them and learns to deal with them. So what do you do when you hit the inevitable "yeah, right, that's trivial, suuuuuure" next time? To paraphrase someone I can't place right now, you either go under it, over it, around it, and -- if all those fail -- then ($deity willing or no) you push right through it. (Exercise for the cough careful cough reader: what do I mean?)

Less faux-metaphorically, try

* skipping forward a little -- new ideas do not have to be learned and absorbed linearly; case in point: the next paragraph goes into detail on this :)

* checking out another book on the same topic

* asking a question on "MSE" / math.stackexchange.com (the /r/math subreddit is good too)

* checking out the extremely friendly MSE chatroom, which I credit with fixing a ton of my "I am just stupid" moments

* looking for lecture notes (shameless plug: [0]) online

* (failing everything above) spending a day walking around your house with your hands squeezing your head from the sides, trying to mimic the romantic picture of the tortured-genius lonewolf-mathematician-in-training and somehow trying to become more intelligent by increasing the density of your brain matter until you've triumphed over whatever puny margin-note was keeping you occupied

Also note that mathematical understanding and intuition always, always grow organically. You often end up understanding something "properly" years after you stop struggling with it, and it only gets better as you learn things and see how disparate ideas fit together or even become special cases of a general concept, or variations upon a basic theme. This is touched upon in Terry Tao's excellent career advice essays[3], which are aimed at students learning to make sense of the (mathematical) world: in particular, I'd recommend

* https://terrytao.wordpress.com/career-advice/there%E2%80%99s...

* https://terrytao.wordpress.com/career-advice/does-one-have-t...

Grothendieck talks about his journey (see [4]) himself, and his writing is beautiful (if also prone to creating a ton of hope in young people encountering this anecdote for the first time). It's profound, but not an authoritative account of what it means to do mathematics, by any means (just like Hardy's A Mathematician's Apology).

> Since then I’ve had the chance in the world of mathematics that bid me welcome, to meet quite a number of people, both among my “elders” and among young people in my general age group who were more brilliant, much more ‘gifted’ than I was. I admired the facility with which they picked up, as if at play, new ideas, juggling them as if familiar with them from the cradle–while for myself I felt clumsy, even oafish, wandering painfully up an arduous track, like a dumb ox faced with an amorphous mountain of things I had to learn (so I was assured) things I felt incapable of understanding the essentials or following through to the end. Indeed, there was little about me that identified the kind of bright student who wins at prestigious competitions or assimilates almost by sleight of hand, the most forbidding subjects. In fact, most of these comrades who I gauged to be more brilliant than I have gone on to become distinguished mathematicians. Still from the perspective or thirty or thirty five years, I can state that their imprint upon the mathematics of our time has not been very profound. They’ve done all things, often beautiful things in a context that was already set out before them, which they had no inclination to disturb. Without being aware of it, they’ve remained prisoners of those invisible and despotic circles which delimit the universe of a certain milieu in a given era. To have broken these bounds they would have to rediscover in themselves that capability which was their birthright, as it was mine: The capacity to be alone.

Some of the stuff on this page[1] is very helpful, whatever your current level of knowledge. Ctrl-F "tendrils". You might find Thurston's essay "On Proof and Progress in Mathematics" (arXiv link: [2]) interesting too. Good luck!

[-1] There are some well-known books that students are almost always advised to come back to later (and there are probably more that they're advised to not bother with, ha).

[0]: http://refinator.herokuapp.com/

[1]: http://math.stanford.edu/~vakil/potentialstudents.html

[2]: https://arxiv.org/abs/math/9404236

[3]: https://terrytao.wordpress.com/career-advice/

[4]: https://quomodocumque.wordpress.com/2010/07/05/the-capacity-...

mrkgnao··on Amsterdam Airport Launches API Platform
Having watched season 2 of The Wire last week, that brings up some interesting ideas...
mrkgnao··on Losing a dog can be harder than losing a relative or friend
You swapped a couple letters around there. Haven't seen that line in a long time.
mrkgnao··on Losing a dog can be harder than losing a relative or friend
> so that we can all live forever

At what cost?

mrkgnao··on 2038: Only 21 years away
> BSD-based distributions have the advantage of being able to rebuild everything from scratch, so they do not need to maintain user-space ABI compatibility in the same way.

I don't understand, not knowing much about BSD. Is this an LTS/support thing? Can someone explain?

mrkgnao··on The Antidesktop (2002)
s/awesome\(.*\)perator/xmonad\1fx/ for me.
mrkgnao··on Bootstrapping a Type System (2010)
You can obviously write a code generator for all the functions you need once you write an AI good enough: by eliminating extraneous features like generics, Go leaves you free to actually solve problems that matter.

(/s)

Edit: I won't speak about the obvious, but anyone going back in my post history and concluding "Haskell Evangelism Strikeforce with an axe to grind" with a smirk is probably mistaken. There are well-designed languages whose goals may not perfectly align with mine (hello C/Elm/Clojure) and then there are some whose confusing inconsistency of design is, well ... confusing.

mrkgnao··on Three Months of Go, from a Haskeller’s perspective (2016)
Glasgow Haskell Compiler
mrkgnao··on Three Months of Go, from a Haskeller’s perspective (2016)
A thunk is an unevaluated value. Better, it's an unevaluated piece of code that returns a value when it's required.

For instance, you can write

    x = [1..]
which gives you a list of all the positive integers. Because of laziness (which thunking enables), this line runs just fine. The compiler allocates a thunk for x, saying "okay, I know what x is now". But x is never fully evaluated (because we don't really have enough memory!): it's only evaluated as far as needed. Indeed, typing

    head x -- this is 1
makes the interpreter print the first element of the list. The rest is still in a thunk. In memory, we have something like

     [1,<unevaluated thunk>]
Now you can try doing

    head (tail x) -- this is 2
which evaluates the list only as far as the second element. Right now, in memory, the list looks something like

     [1,2,<unevaluated thunk>]
You can do similar things with basically any other datatype, enabling cool stuff like [1].

However, having to evaluate (or "force") thunks repeatedly in tight loops can obviously degrade performance: printing a Haskell list like [1..10] requires you to evaluate the first element, print it, then force the next thunk to print the 2, and so on. Comparing this to the equivalent in basically any other (strict) language, we see that a lot of indirection is removed, because the endless wrapping/unwrapping is replaced with a simple linked list of 10 elements. (I'm sure GHC is smart enough to optimize the thunking away in this toy case sufficiently.)

One might also say that a thunk is a "promise" (I'm not familiar with the JS concept of the same name, which I think is related to async things instead) to give you a certain value by calculating it only when you need it (if you do at all: a thunk stays unevaluated when you're done running the program, it's GC'd away).

[1]: http://jelv.is/blog/Lazy-Dynamic-Programming/

mrkgnao··on Three Months of Go, from a Haskeller’s perspective (2016)
Are you on NixOS by any chance? There is a problem with /run filling up that you can fix by using

    TMPDIR=/tmp stack whatever
I switched back to Arch a while back, and I'm not sure if this problem still exists on the NixOS side. (Of course, you can always choose a bigger /run size in configuration.nix.)
← PreviousPage 11 of 19Next →