HNHacker News
TopNewBestAskShowJobs

rntz

2,169 karma · joined May 25, 2009

www.rntz.net email: http://www.google.com/recaptcha/mailhide/d?k=018XOhLYKe9NqLdmoSmt6HsQ==&c=mcxnT-9mQPQEL6wailXqNUHk3aPs4Jv1T3vTJsNNAkg=
submissionscomments
rntz··on Ask HN: Which people and groups are researching new approaches to programming?
Hm, which bits of syntax are you confused by in particular?

At the beginning, when defining what types, expressions, contexts, etc. looks like. I use a bunch of BNF (https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form). I'm afraid I don't actually know a good introduction to BNF.

The clearest account I know of of the most critical part of my notation, namely inference rules (those things with the big horizontal bars), is in Frank Pfenning's notes for his course on Constructive Logic: http://www.cs.cmu.edu/~fp/courses/15317-f09/lectures/02-natd... (the full course of notes is at http://www.cs.cmu.edu/~fp/courses/15317-f09/schedule.html, but the one I've linked is most relevant)

A lot of the rest of my notation (types like A × B, A → B, expressions like λx.e, the judgment Δ;Γ ⊢ e : A meaning "e has type A in context Δ;Γ", and the inference rules themselves) is borrowed from fairly standard type-theory-of-functional-languages stuff. Standard books to read here are Types and Programming Languages by Benjamin Pierce (https://www.cis.upenn.edu/~bcpierce/tapl/); or Practical Foundations for Programming Languages by Bob Harper (https://www.cs.cmu.edu/~rwh/plbook/book.pdf). Those are pretty heavy books that cover a lot of ground, including stuff that's mostly irrelevant to my work. If you're interested, though, they're a great place to start learning about formal PL theory!

Was there anything else in particular you wanted to know about?

rntz··on The Monad Challenges: Jump start your understanding of monads
It's true that you don't need to know Haskell in order to learn about monads, but Haskell is a perfectly reasonable language in which to write a monad introduction.

Haskell is good for learning about monads for the same reasons monads tend to be heavily used in Haskell, but not in other languages. Monads are both part of Haskell's standard library, and have very useful special syntax (do-notation). Writing out monadic code explicitly gets to be a huge pain when using monads in another language. Typeclasses also make it convenient & easy to write code that's generic over any monad.

rntz··on The Monad Challenges: Jump start your understanding of monads
Ignore the instructions and grab putStrLn if you need it in order to check your work. The instructions about not using other modules are there to avoid you "cheating". Looking at your work is definitely not cheating and will not prevent you from learning :).

Also, just typing "fiveRands" and hitting ENTER at the repl will show you the value of fiveRands (or any other expression).

rntz··on Ask HN: Which people and groups are researching new approaches to programming?
Sean McDirmid's work on Glitch is an interesting (and distinctly contra- the current "FP all the things!" zeitgeist) approach to live programming: http://research.microsoft.com/en-us/people/smcdirm/

Conal Elliott's work on Tangible FP was an interesting attempt to unify functional and "visual" programming that has been mostly abandoned: http://conal.net/papers/Eros/ Hopefully some of its ideas may yet survive in other projects.

The Berkeley Orders of Magnitude project is somewhere at the intersection of database and PL research, aimed at handling orders of magnitude more data with orders of magnitude less code: http://boom.cs.berkeley.edu/ The Dedalus language in particular is interesting, as it integrates distributed- and logic-programming: http://www.eecs.berkeley.edu/Pubs/TechRpts/2009/EECS-2009-17...

Joe Armstrong's thoughts on a module- or namespace-less programming environment are interesting: http://erlang.org/pipermail/erlang-questions/2011-May/058768...

I've been meaning to write a blog post about the convergence of various ideas of what the future of programming might look like for a while now, so I have a bunch of notes on this topic. The OP & other folks have already mentioned most of the other projects in my notes - in particular Unison, Subtext, Eve, & Bret Victor's work.

My current line of work is on tackling a tiny little corner of what I see as the future's problems - trying to find a better way to combine database/relational programming and functional programming. My work is here (but the docs are almost entirely in type-theory-jargon at the moment, sorry! feel free to shoot me an email if you have questions): https://github.com/rntz/datafun

rntz··on Is Bitcoin breaking up?
> Its not as if somebodies coins will suddenly become worthless.

I think this is in fact the nightmare scenario that some folks are worried about.

I agree with you it's unlikely to happen, because it's in very few people's interests, but I think that the degree of danger is exactly what's causing people to try so vigorously to find ways to co-operate on this matter.

And it's true that browsers also have incentive toward compatibility. But the fact is, despite this incentive, browsers remain in many ways incompatible. And for the most part, nobody notices, because minor incompatibilities in browsers do not "fork" the web the same way an incompatibility in bitcoin protocol forks the blockchain.

rntz··on Read the TPP
Sure. What do you believe is the purpose of saying what that clause says rather than badsock's shorter and clearer "A party may only make laws that are consistent with this agreement"?

You seem to be suggesting that somehow the lengthier version is more precise. I don't see how. Am I missing something?

rntz··on Is Bitcoin breaking up?
The WWW's fundamental job is not to establish consensus. It is to communicate information. Incompatible changes to the web and incompatible changes to the bitcoin protocol have very different significance.
rntz··on Read the TPP
Then it seems to make even less sense, no?
rntz··on If too many users are wrong, it's probably your fault (2011)
This is the opposite of what the article is saying. The users weren't clicking randomly. They were clicking with a purpose, they just didn't understand the difference between their menu bars and the ones inside the image. They had a faulty mental model, not a faulty mouse.
rntz··on Category Theory and Declarative Programming
Monads themselves don't compose nicely. There's no guarantee that the composition of two monads is itself a monad, for example. That's why Haskell has monad transformers. But monad transformers are quite hard to reason about (they're not even commutative).

It's true that in a certain sense monads are "about composition", but that doesn't mean they aren't without issues, and I certainly think it's appropriate to call monads non-declarative. In fact, I think "being in a monad" is more or less the essence of what it is to be imperative - which is why they're useful! Quite often we want to be imperative.

The word "compositional" is quite vague. I wish people would stop tossing it around so lightly without explaining what they meant by it.

rntz··on Category Theory and Declarative Programming
Have a source for that paraphrasing of Felleisen and Sussman?

I don't know about Sussman, but I'd be surprised to hear Felleisen say that. My extremely loose characterization of Felleisen's view would be that the most important types are the ones in your head, which is not quite the same thing.

rntz··on Economic Inequality: The Simplified Version
It's wonderful when simplifying an argument exposes its problems more clearly. I now wish more writers would do this. Omit needless words, indeed!
rntz··on Economic Inequality: The Simplified Version
> And in the unlikely event I left no holes, some will say I'm backpedalling or doing "damage control."

There's nothing particularly wrong with doing damage control if you think people have misunderstood or misrepresented you. And PG is doing damage control here. Why else post such a "simplified version"?

rntz··on Scientists may have solved a mystery about sea-level rise
Welcome to science!

Also, not just flaws in methodology, but also flaws in its model, which is a more significant issue. Making better models & checking them against reality is a big part of science. It's not necessarily that the original author fucked up; it's that our knowledge of the world improves (we hope) over time.

rntz··on How Elon Musk and Y Combinator Plan to Stop Computers from Taking Over
> There's secrecy within most for-profit entities, what makes AI so different?

It's not about AI vs other fields, it's about research vs. engineering. Admittedly, that line is more blurry than most, especially in highly technologically competitive fields like AI and graphics (and less blurry in fields where the research-to-implementation gap is larger, like PL or algorithmic complexity).

rntz··on Why Japanese leaders attacked Pearl Harbor
> And the claim that "Japan had planned to declare war shortly before its planes bombed the US fleet at Pearl Harbor, but a series of errors by typists and translators prevented the Japanese embassy from giving Washington the declaration in time." is beyond absurd.

It appears to be the truth, or pretty close to it: https://en.wikipedia.org/wiki/Attack_on_Pearl_Harbor#Japanes...

rntz··on An interesting data structure with search time O(sqrt n)
I don't understand this bit:

> Now each of these arrays we organize as a max heap. Moreover, we arrange data such that the maximums of these heaps are in INCREASING order. That means the smallest element of the entire (initial) array is at the first position, then followed by the next 4 smallest organized in a max heap,

Just because the maximums of the heaps are increasing order doesn't mean that the minimum is at the front. It means the first element is smaller than the biggest element of the next four.

Consider, for example:

    1 4 3 2 0
1 < 4, certainly, but 1 > 0. What am I missing?
rntz··on An interesting data structure with search time O(sqrt n)
No.

Just as (e^n) grows faster (in the limit) than any polynomial of n, such as n^2 or n^100; likewise, log(n) grows slower than any polynomial of n, such as sqrt(n) = n^(1/2), or even n^(1/100).

They are both practically pretty slow-growing, though. It may well be that for practical sizes, constant factors matter more than the asymptotic difference on present computers.

rntz··on Programming Interactive Worlds with Linear Logic
Linear logic itself doesn't express goals or constraints, just what can be accomplished with a given set of resources.

In the example you gave:

    if $5 then pizza
    if $2 then beer
    $6!
    therefore, (pizza and $1) OR (beer and $4) OR (beer and beer and $2) OR (beer and beer and beer) OR $6
rntz··on The Autowende has begun
Electric car engines are efficient at converting electricity into motion. However, this neglects the efficiency of power plants at converting fuel into electricity, and the efficiency of transmission of electricity. Taking this into account, electric cars are generally about as bad for the environment as ordinary cars.

Of course, this depends on the cars compared, and more importantly, on how the electricity wherever you live is generated. The real point is: it's far more important to improve how we generate electricity than to get more butts in electric cars.

rntz··on An obsession with safe spaces is not just bad for education
Downvoting should be reserved for posts that do not contribute to the discussion, not used to express disagreement. The purpose of votes isn't to win a battle of beliefs, but to promote insightful discussion.

Honestly I think HN would be better without downvoting at all.

rntz··on Show HN: Parinfer – a simpler way to write Lisp
I see no reason they couldn't coexist. Parinfer to guess paren insertion; paredit to cover the operations parinfer can't infer.

I'm more concerned that Parinfer appears to be modal, based on whether you manage indentation or parens. This seems overly complicated; it would be nice if there's some elegant way to merge the features of both into one mode. But I don't know how to do this, and I haven't actually used Parinfer, so maybe there's nothing to worry about.

rntz··on Why nuclear energy is our best option at the moment
1ml = 1cm^3 of water weighs almost exactly 1 gram. A liter of water (1000ml = 1000 cm^3) weighs almost exactly a kilogram. http://www.wolframalpha.com/input/?i=weight%20of%201cm^3%20o...
rntz··on Swift Intermediate Language: LLVM conference slides [pdf]
SIL isn't open-source to my knowledge, so no. Maybe once/if Apple open-sources Swift, though? (They claim they will do that later this year.)
rntz··on The Importance of Recreational Math
Hint for the coin puzzle (rot13): As mentioned in the article, gur fbyhgvba trarenyvmrf gb nal cbjre bs guerr, gubhtu gur ahzore bs jrvtuvatf jvyy bs pbhefr inel.

Solution (rot13): Fcyvg gur pbvaf vagb guerr tebhcf bs guerr. Chg gjb tebhcf ba gur gjb fvqrf bs gur fpnyr, yrnivat gur guveq bss. Vs gurl ner rdhny va jrvtug, gur snxr pbva vf va gur guveq tebhc. Bgurejvfr vg vf va gur yvtugre bs gur gjb.

Qvfpneq gur tebhcf gur snxr vfa'g va. Chg gjb bs gur erznvavat pbvaf ba gur gjb fvqrf bs gur fpnyr. Ntnva, vs gurl ner rdhny va jrvtug, gur snxr vf gur guveq; bgurejvfr vg vf gur yvtugre bs gur gjb.

Guvf vf n grkgobbx qvivqr-naq-pbadhre nytbevguz. Gur xrl vafvtug vf gung lbh pna qvivqr ol n snpgbe bs guerr, abg whfg gjb.

rntz··on Will You Ever Be Able to Upload Your Brain?
Sure. I'm not opposed to ending death, and certainly not to work on extending healthy lifespan. I just don't think it qualifies as humanity's greatest problem.
rntz··on IA or AI?
> an inability to attain mathematical fluency excludes the next generation from any implied augmented intelligence benefits.

Well, only in some ways. I don't have to understand how a refrigerator works in order to use it. Improvements in quality of life produced by use of augmented intelligence ought to be accessible even to those without it.

rntz··on Will You Ever Be Able to Upload Your Brain?
No. Death is really not that bad; to be dead is no more evil than not to exist, because to be dead is to not exist. Dying itself is evil in that it causes grief to others still living; but while grief is painful, I do not think anyone would compare the evil of suffering grief to the evil of suffering slavery.

One might argue that death is bad on counterfactual grounds: if a person had not died, they could still be alive and happy, and isn't that better than them not existing? But this argument leads to the Repugnant Conclusion (https://en.wikipedia.org/wiki/Mere_addition_paradox)! So be very careful if you take this line of argument that you understand what you are saying.

I happen to be a total-happiness utilitarian, and do accept the repugnant conclusion. But ultimately all this means is that death is a mirror-image of birth - it ceases one hopefully-happy life; birth begins one. There is grief attached to death and joy attached to birth, but apart from that there is just as much imperative to maximize births as there is to prevent deaths - and one of these is far easier. This is, however, a deeply counterintuitive position that I don't expect many others to share.

This isn't Deep Wisdom. It's just utilitarianism, taken seriously.

rntz··on Europe's highest court has rejected the 'safe harbor' agreement
So wait - if Facebook, Google, etc. just made sure that every time an EU user submitted personal data, it was routed to US servers rather than EU ones, they would not be in violation of EU privacy law? What if they then send that data to the EU servers?

Then (from the company's perspective) I've accomplished the same ends, at a cost to the user (latency), and gone from illegal to legal.

That seems pretty ridiculous.

rntz··on Hexagonal Langton's Ant 2 – Colors, Gliders and Highways
BSPSPSPSPSP - This program/configuration appears to execute a random walk. Hard to be sure.
← PreviousPage 9 of 15Next →