HNHacker News
TopNewBestAskShowJobs

Patient0

1,250 karma · joined August 14, 2009

I'm a software developer working in London.

Projects: http://patient0.github.com/FirstClassLisp/

submissionscomments
Patient0··on The perfect programming language
He praises XSLT and says that all data should be stored as XML!? This article is surely a troll...
Patient0··on Principal Component Analysis
This was a great article - I'd been wanting to understand PCA. Particularly liked the digression on Lagrange multipliers.
Patient0··on Inventing Monads
" The only technical catch is that you aren't allowed to change the type of the contents in the function. That means if you start with something of type A in the container, you have to get a container containing something of type A at each stage of the pipeline."

I don't think this is correct. What doesn't change is the overall type constructor (e.g. if you start with a list, you'll still end up with a list... If you start with an IO action, you'll still have an IO action). But the type that is wrapped by the container can and usually does change. e.g. if you "map" over a list of A's, you'll get a list of whatever type your map function returns - still a list, but a list of B's, not a list of A's. fmap :: (a->b) -> [a] -> [b].

Patient0··on For Better Computing, Liberate CPUs from Garbage Collection
I was simply stating that RAII does not solve the memory fragmentation issues. Many GC's do solve the memory fragmentation issue.
Patient0··on For Better Computing, Liberate CPUs from Garbage Collection
I agree that RAII does not solve everything - in particular, issues with memory fragmentation. However, I prefer the direction being taken by Rust and suggested by the top level poster: rather than having to run a separate thread which tries to infer which resources are no longer needed, with potentially large runtime costs, instead augment the language semantics with a clear ownership model, and thereby give the compiler enough information to generate code that runs in a stable, predictable memory footprint.
Patient0··on For Better Computing, Liberate CPUs from Garbage Collection
In the ~15 years I spent building software in C++ I don't recall a single time that I wished for garbage collection. By using RAII techniques, it was always possible (nay, easy!) to write code that cleaned up after itself automatically. I always found it easier to reason about and debug programs because I knew when something was supposed to be freed, and in which thread. The only time that use of simple reference counted smart pointers did not work was when you had cyclic references: but cyclic object graphs caused other problems in any case - so I would always refactor my design to avoid creating them in the first place.

In contrast, in the ~10 years I spent working in Java, I frequently ran into problems with programs which needed an excessive amount of memory to run. I spent countless frustrating hours debugging and "tuning" the JVM to try to reduce the excessive memory footprint (never entirely successfully). And of course, as soon as your JVM needed to interact with native code (e.g. a quant library written in C++), you were even worse off, because there was no language support whatsoever for ensuring when, or even if, some native memory would be freed. It made it even harder to debug these leaks - because the "leak" was always very complicated to reproduce.

Garbage collection is an oversold hack - I concede there are probably some situations where it is useful - but it has never lived up to the claims people made about it, especially with respect to it supposedly increasing developer productivity.

Patient0··on Apollo 15 postage stamp incident
Suspect he was referring to the frequency of the parent poster's comments: https://news.ycombinator.com/threads?id=chazzyluc
Patient0··on Recursive Drawing
This is nice - is there any way to find out who wrote it?
Patient0··on Ask HN: Who is hiring? (April 2019)
Bank of America | London, UK | Onsite |

We require a strat/technologist to work in the Cross Asset Strats team. We work outside of the traditional IT organisation and sit on the trading floor in London, responding directly to end-user requests.

Our team writes programs in Python that run on the Bank’s strategic platform, Quartz, to answer questions that relate to the entire global markets trading business.

Please get in touch if any of the following apply to you:

* You love to program and are comfortable with a variety of programming languages and paradigms (e.g. Lisp, Haskell, C++, Python).

* You have written your own scripting language, or at least know how you might go about it

* You appreciate functional programming concepts and writing algorithms in a functional style

* You have good mathematical abilities and want to learn more about using mathematical techniques to analyse data

* You have financial and quantitative knowledge, and would like to learn more

If you are interested, please email your c.v. to paul.hollingsworth@baml.com.

Patient0··on McCarthy's Ambiguous Operator (2005)
I suppose this is a good time to point out the toy Lisp interpreter I wrote a while ago: http://patient0.github.io/FirstClassLisp/

It supports first class macros, continuations, and has the amb "operator" (implemented using a macro of course!): https://github.com/Patient0/FirstClassLisp/blob/master/Lisp/...

Patient0··on Derivatives of Regular Expressions (2007)
See also: http://matt.might.net/articles/parsing-with-derivatives/
Patient0··on Peter Thiel Pledges to Support Trump’s 2020 Campaign
The problem is that the market is not great at solving "Tragedy of the Commons" situations. The ideal solution, IMO, is to agree a cap on CO2 emmissions, but make them tradable, so that the market can be used to figure out the most efficient way to limit the emissions.
Patient0··on Redefining the Kilogram
Fun fact: the metre was was originally defined to be 1/10 millionth the distance from the pole to the equator (so that the circumference of the Earth would be 40 million metres).
Patient0··on Bellman's lost in a forest problem
I disagree - I think if you described this to a layman they would always be more interested in optimising for the worst case. For example if I had an algorithm that on average will get me out in 1 mile but in the worst case might take me 100 miles then that's not very useful if I was trying to decide how much supplies to take.

The concept of an arithmetic mean is quite artificial - there's other ways you could define "average" such as the median.

Also, in my experience, optimising for the average case is often the easier problem to solve.

Patient0··on Introduction to Calculus with Derivatives
Found a link on the Web archive: https://web.archive.org/web/20080117115912/http://www.karlsc...
Patient0··on Introduction to Calculus with Derivatives
Yes, that's my point. The article is giving an incorrect definition of what a limit is. The target audience does not know what a limit is or how it is defined. The use of imprecise and incorrect language will confuse these people more than it will help.
Patient0··on Introduction to Calculus with Derivatives
The history seems to be summarized well in this wikipedia entry: https://en.wikipedia.org/wiki/(%CE%B5,_%CE%B4)-definition_of...
Patient0··on Introduction to Calculus with Derivatives
"That change c never truly goes away, but it is so small that it doesn't really matter: if you make c small enough, the derivative is basically 8. So we're just going to pretend that all the cs are so small they have become zero."

My first calculus teacher taught us derivatives in a similar way - but I have to say that, for me, this imprecise language confused me. When and why is it OK to pretend that c is zero!?

Further on, the official definition using a limit claims that the "c->0" means "make c as small as possible". But that's not what it means. Again, this is imprecise language that confuses more than it explains. What does "as small as possible" even mean? If we want to make it as small as possible, why not set it to 0!? How small is small enough?

I think somewhere in this article there should be a precise definition of what a limit is, using epsilon and delta.

It should be saying something using the words "arbitrarily close" and "sufficiently small".

Something like : "we can make the approximation on the left arbitrarily close to the expression on the right by choosing any value of c sufficiently close to 0, even though the expression might be undefined when c=0. Epsilon: you tell me how close you want the approximation to be. Delta: I tell you how small c needs to be".

There used to be a great website that was precise but also informal: karlscalculus.org - but sadly it appears to be down now.

Patient0··on What is the Kullback-Leibler divergence?
I've recently discovered this excellent lecture series by David Mackay available on YouTube: https://youtu.be/y5VdtQSqiAI

He also wrote the accompanying text book which is available for free download: http://www.inference.phy.cam.ac.uk/itprnn/book.pdf

I was really impressed by these lectures, and was dismayed to learn that he died from cancer a couple of years ago.

Patient0··on A map of London as it was during the era of the Tudor monarchs
Fascinating to discover I am currently sitting where there used to be a Franciscan monastery!
Patient0··on Bullshit jobs and the yoke of managerial feudalism
Here's another way that an employee can misunderstand their own job: Suppose you have an employee who is working for Megabureaucracy Inc. Megabureaucracy is a company that's losing money. The employee witnesses waste and inefficiency throughout the company in everything they do.

However, that individual employee may be doing work which means that Megabureaucracy is losing less money than it would if the employee did nothing. The employee might conclude that they are in a "bullshit job" - but actually what they are doing is adding value, even though they are part of an enterprise that as a whole is subtracting value. i.e. they are causing it to subtract less value than it otherwise would.

The same logic applies for employees that are working in an inefficient department of a company that is efficient in aggregate. Helping an organization that is inefficient to be less inefficient is still economically valuable - but to the individuals concerned they may consider their own jobs as economically valueless.

Patient0··on Giant shipload of soybeans drifts off China, victim of trade war with US
Aside from the standard economic arguments, there is also the crony capitalism argument: Trump has discovered that because he has unilateral power over tariffs and subsidies, this gives him the power of life and death over individual industries and companies. https://johnhcochrane.blogspot.com/2018/07/trade-war.html?m=...
Patient0··on Algorithm recovers speech from a potato-chip bag filmed through glass (2014)
"If I'm sitting next to a swimming pool, and somebody dives in - and she's not too pretty, so I can think of something else - I think of the waves and things that have formed in the water. And, uh, when there's lots of people have dived in the pool there's a very great choppiness of all these waves all over the water and to think that it's possible, maybe, that in those waves there's a clue as to what's happening in the pool. That some sort of insect or something with sufficient cleverness could sit in the corner of the pool and just be disturbed by the waves, and by the nature of the irregularities and bumping of the waves have figured out who jumped in where and when and where what's happening all over the pool. And that's what we're doing when we're looking at something. Uh, the light that comes out is ... is waves, just like in the swimming pool except in three dimensions instead of the two dimensions of the pool it's they're going in all directions. And we have a eighth of an inch black hole into which these things go ... which, uh, is particularly sensitive to the parts of the waves that are coming in a particular direction it's not particularly sensitive when they're coming in at the wrong angle which we say is from the corner of our eye. And if we want to get more information from the corner of our eye we swivel this ball about so that the hole moves from place to place. Then ... uh, it's quite wonderful that we can see ... figure out so easy. That's really because the light waves are easier than the ... the waves in the water are a little bit more complicated it would have been harder for the bug than for us but it's the same idea. Figure out what the thing is that we're looking at at a distance."

Transcribed from footage included in the documentary "The Last Journey of a Genius" (1989) by Christopher Sykes, a BBC TV production in association with WGBH Boston and Coronet/MTI Film and Video.

https://www.youtube.com/watch?v=1qQQXTMih1A

Patient0··on The art of stealing
Reminds me of this Roald Dahl short story: https://en.wikipedia.org/wiki/Parson%27s_Pleasure_(short_sto...
Patient0··on Can They Make Government Jobs as Cool as Google and Goldman?
Maybe it's PR: http://paulgraham.com/submarine.html
Patient0··on Introducing Multi-Leg Options Strategies
Minor nitpick: buy a call and sell a put to make a synthetic forward position
Patient0··on How to get rich without getting lucky
I would recommend reading "How to get rich" by Felix Dennis. He had a sense of a humour, but was quite wise too.
Patient0··on Switzerland: First country to have national referendum about Sovereign Money
Here's a good explanation of what the sovereign money initiative is (and why it is probably a bad idea) from the chairman of the Swiss central bank: https://snb.ch/en/mmr/speeches/id/ref_20180116_tjn
Patient0··on Switzerland: First country to have national referendum about Sovereign Money
This may help with that: https://snb.ch/en/mmr/speeches/id/ref_20180116_tjn
Patient0··on Duolingo Suddenly Has Over Twice as Much Language Learning Material
I am currently using Duolingo to learn French and finding it tremendously useful as a way to practise. It's only been for the last 3 weeks or so but I feel that it is working much better for me than if I was trying to learn from videos or books. I should say however that I am also taking weekly face to face French lessons (it was my teacher who recommended Duolingo)
← PreviousPage 2 of 9Next →