HNHacker News
TopNewBestAskShowJobs

yomritoyj

1,351 karma · joined May 20, 2013

I teach economics at Ambedkar University, New Delhi. Personal website: http://www.jyotirmoy.net
submissionscomments
yomritoyj··on How to Write a Spelling Corrector
Versions in C, C++, Java, Haskell and Racket https://github.com/jmoy/norvig-spell
yomritoyj··on I Don’t Care How Well You Code, Understand Your Compensation
All programs also exist, in the sense you can program a computer to generate one by one all possible valid x86 instruction sequences. What programmers are doing is searching for one program among them that will solve their problem.
yomritoyj··on Habits of highly mathematical people
What you are saying is definitely true within mathematics and its applications. But the original article was about “The […] skills that students of mathematics […] will practice and that will come in handy in their lives outside of mathematics” and in the same spirit I wanted to point out habits of thought developed doing mathematics which have a negative effect when the problem you are facing cannot be fully formalized.
yomritoyj··on Habits of highly mathematical people
Mathematics promotes bad habits too. Example 1: paying too much attention to worst-case scenarios. When creating a mathematical proof you want to make sure that your conclusion holds in all possible scenarios allowed by your assumptions. In real life decision-making worst-case scenarios are really bad, really expensive to guard against but also really rare so often the best thing to do is to ignore them. You may find that hard to do psychologically if you spend too much time doing mathematics.

Example 2: being too parsimonious. When doing mathematics you have a clear cut objective (your conclusions) and your goal is to achieve it while using the least resources (assumptions). In real life a person thinking mathematically may put in just enough effort to fulfill the formally specified part of their objective while ignoring informal requirements that are assumed to be 'common sense' by non-mathematical people.

yomritoyj··on Category Theory for the Sciences
Thanks. I should have been more careful.
yomritoyj··on Category Theory for the Sciences
Category theory has served mathematicians well, but only because they had a great mass of concrete detail which needed to be abstracted away.

An abstract framework like category theory can actually be harmful where there isn't that much concrete detail to begin with. A personal example I faced was being overwhelmed by category theory jargon when starting to learn Haskell a couple of years back. My confidence returned only when I realized that there was just one category in play with types as the objects and functions as the arrows. The jargon was unnecessary. Today Haskellers discuss so many interesting issues about the language and its implementation which do not fit into the category theoretic framework at all.

yomritoyj··on India’s Reusable Launch Vehicle Demonstrator Successfully Flight Tested
The problems you point out are real, but they are the problems of class differences. India has a growing middle class, and this class needs markers to differentiate itself from the lower classes it has only recently left behind. Speaking English acts as a marker now, but if it went away for some reason I'm sure there would be new markers to take its place. Think of the kind of ‘Indian’ culture promoted by the government and the schools: Indian classical music, Indian classical dance, Sanskritised Hindi. They are as alien to the everyday lives of most people in India as English is. But they were created to give the elites and the government of India a high culture of their own which was not tainted by colonialism and whose command they could use to differentiate themselves from the non-elite.

The bar situation has an additional twist. Most bilingual people I know would use the Indian language with friends and family and English with strangers. So trying to start a conversation in Hindi may come across as being too familiar too soon.

yomritoyj··on JupyterLab: the next generation of the Jupyter Notebook
I guess the challenge is to do it efficiently in the presence of pointers, implicit or explicit.
yomritoyj··on JupyterLab: the next generation of the Jupyter Notebook
But you cannot recalculate if your calculation has trashed your inputs.And if it hasn't then the snapshot does not impose a cost. If you are willing to forego the opportunity to replay to save memory, just put the producer and consumer in the same cell.
yomritoyj··on JupyterLab: the next generation of the Jupyter Notebook
I love how notebooks allow the mixing of code and output and support incremental development by letting you choose which cells to execute. But I find the semantics horrible. Each time you execute a cell you do so in an environment that depends on your entire history and cannot be figured out by simply reading the notebook. I wish for a environment which would have the same semantics as a script but which would snapshot the environment at the entry to each cell so that when a cell is modified execution does not have to resume at the beginning. Even better if downstream data dependencies are tracked so that after modifying and reexecuting a cell we know which downstream results have become stale. Does such an environment exist?
yomritoyj··on Lambda crabs, part 1: A mathematical introduction to lifetimes and regions
I'm among the upvoters. I have been hearing a lot about Rust, and its unique feature is its memory management, but the official Rust documentation is not as clear as it could be. I was building up courage to go read the compiler sources, so I found the article very timely and useful.
yomritoyj··on Lambda crabs, part 1: A mathematical introduction to lifetimes and regions
Lattices are used to provide a theoretical basis for dataflow analysis in compilers. See Chapter 9 of Aho et al.'s book on compilers.

Ordered sets also occur in denotational semantics http://homepage.cs.uiowa.edu/~slonnegr/plf/Book/Chapter10.pd...

yomritoyj··on Comparing Arrays of Structures and Structures of Arrays (2013) [pdf]
Haskell's `vector` library does this for vectors of tuples.
yomritoyj··on Why now is the best time to study quantum computing (2014)
If we know now is the best time to study quantum computing then we can't know how much energy it will take to study it.
yomritoyj··on Bots won't replace apps, only better apps will replace apps
Why not just "AI bot, give me the best life possible"?

To be less flippant, declarative AI already exists where it is easy. An airline booking website already gives you the ways to getting to location x ASAP. But looking at the performance of current recommendation systems, and natural language processing systems, I doubt if in the near future we would have a bot that would be better than me in guessing whether my wife would prefer flowers or a dinner on a particular anniversary, unless it cheats by using my wife's private information, in which case she's going to hate me either way.

yomritoyj··on The Books I Kept
Interesting that the author chose the books they liked the most, rather than choosing books where print gave the greatest advantage over ebooks (say books with large photographs or illustrations, textbooks where being able to see a lot of text at once is useful).
yomritoyj··on In Retrospect: The Selfish Gene
It was Maynard-Smith and not Dawkins who introduced ESS.
yomritoyj··on A Badass Way to Connect Programs Together
From the title I thought that the ultimate monad tutorial had finally arrived.
yomritoyj··on Springer Textbooks More Than 10 Years Old Available for Free Legal Download
My selected and slightly annotated list, primarily probability and statistics https://www.jyotirmoy.net/posts/2015-12-29-springer-openacce...
yomritoyj··on Why I Still Use Python for High Performance Scientific Computing
Compare the implementation of a simple numerical program in Haskell

https://github.com/jmoy/avb-econ-hs/blob/f6d65af480c99045573...

to that in Julia

https://github.com/jesusfv/Comparison-Programming-Languages-...

Despite the Haskell program using the elegant facilities provided by REPA, the fact that mutable part (the `writePolicy`) has to be written in a different style than the pure parts since it is a monadic action seems cumbersome to me.

yomritoyj··on The 1970 Kidnapping of an N.Y.U. Computer
Not very stupid given how dependent post WW-II US science was on defence funding. Pursuing truth and beauty does not give you permission to turn a blind eye to the evil which supports your pursuit. I think Steven Levy captures this disconnect very well in a chapter in Hackers
yomritoyj··on What Makes Geeks Tick? A Study of Stack Overflow Careers [pdf]
From the abstract: “After finding a new job, users contribute 25% less in reputation-generating activity on Stack Overflow. By contrast, they reduce their non-reputation-generating activity by only 8% after finding a new job. These findings suggest that users contribute to Stack Overflow in part because they perceive this as a way to improve future employment prospects.”
yomritoyj··on Why I Still Use Python for High Performance Scientific Computing
Regarding Haskell specifically, Haskell makes it cumbersome to write code that mutates data structures, which is what you need to efficiently implement many numerical algorithms. But I'm a fan of Haskell's [REPA](https://hackage.haskell.org/package/repa) which provides multidimensional arrays with complete control over which operations are computed immediately and which are deferred and can be combined later with other operations. This allows many computations to be expressed in a high-level array-oriented way without incurring the cost of creating huge temporaries. C++ template libraries like Eigen can do this, but give much less control to the user on what is deferred.
yomritoyj··on Write like you talk
Paul Halmos in How to Write Mathematics says: “A good attitude to the preparation of written mathematical exposition is to pretend that it is spoken. Pretend that you are explaining the subject to a friend on a long walk in the woods, with no paper available; fall back on symbolism only when it is really necessary.”
yomritoyj··on The Life and Death of an Amazon Warehouse Temp
Those benefits ultimately came out of higher prices for consumers. So if the public still wants the benefits to continue, it just has to campaign for public provision for those benefits through higher taxes or contribute to private income transfer programs. That would be fairer since who gets the benefits will be decided on a democratic basis and not on who was well-connected or lucky enough to land a job in a unionized industry.

I'm not in the US, but from the news it seems that higher taxes are very unpopular there. So demonizing corporations seems to be an easy way out where you can empathize with unskilled workers while at the same time enjoying the benefits that come from the cheapening of their labour.

yomritoyj··on The Life and Death of an Amazon Warehouse Temp
The death was a tragedy. But not even the family blames Amazon for it. And the article does not really point to any evidence that the company was responsible. So I'm not sure why the its name is there in the headline. If Jeff had died while working at the building supply store would there have been an article about the life and time of workers at mom and pop stores?
yomritoyj··on Beware “mathiness”: Algebra and data to reinforce ideological preconceptions
Statistical mechanics is a subject for which it is very hard to pin down the conceptual foundations. To read a thermometer I need to be sure it has reached "thermal equilibrium" with the object being measured. But how do you define thermal equilibrium in terms of underlying mechanical ideas? How do we identify the mechanical systems to which the concept of temperature and thermal equilibrium can be meaningfully applied? See http://philsci-archive.pitt.edu/2691/1/UffinkFinal.pdf We would be accusing statistical mechanics of 'mathiness' were it not the case that we know how to make it work for very many systems of practical interest. The main problem with economics is that it does not work as often.
yomritoyj··on Ask HN: Books with a high signal to noise ratio?

    In Pursuit of the Traveling Salesman: Mathematics at the Limits of Computation
by William J. Cook.

Combinatorial optimization is very important for many practical problems and increase in computational power and improvement in algorithms has lead to an immense increase in the scale of problems which can be tackled. This book describes these developments through the lens of the travelling salesman problem

yomritoyj··on New deworming reanalyses and Cochrane review
One of the errors the replication found was that the STATA code of the original study had

matrix CLOSE_D = J([_N], 12, 1000)

when it should have been

matrix CLOSE_D = J([_N], 75, 1000)

When our public policy is based ultimately on results produced by code, I think we must train our social scientists more systematically in programming ("no magic numbers") and have more public scrutiny of the code (this replication happened 11 years after the original study).

yomritoyj··on The self-hating web developer
In intellectual pursuits like programming, it is easy to fall into the trap of thinking that only intellectually hard things are worthwhile. Which in turn leads us to think of an intellectual ladder with mathematics at the top. This causes us to disregard the creativity and effort required to produce useful things (such as websites) even when no intellectually hard problems need to be solved. I think this is a toxic frame of mind for anyone who is not a mathematician.
← PreviousPage 3 of 4Next →