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 Musical Chord Progression Arpeggiator
No, not unless you can fortuitously find a mode that has exactly the chords you need. But for some progressions there is no such mode. I believe "House of the Rising Sun" has such a progression, but I haven't exhaustively checked.
rntz··on Musical Chord Progression Arpeggiator
I like it! but I really wish this would allow you to borrow chords from other keys or modes. Even a song as simple as "The House of the Rising Sun" (which The Animals famously arpeggiated) borrows chords - it's in A minor but uses a D major chord, which you can think of as borrowed from the parallel major.
rntz··on Superintelligence: The Idea That Eats Smart People
Sure, that's fair. I think Bostrom is no Einstein. But I maintain that he's no crank, either. There's a lot of space in the world for people who are neither.
rntz··on The Idea of Lisp
I believe so, yes.
rntz··on Superintelligence: The Idea That Eats Smart People
1. Plenty of academics write books. 2. Comparing a paper and a book for length is obviously unfair. Bostrom has also written papers: https://en.wikipedia.org/wiki/Nick_Bostrom#Journal_articles_... 3. "Concrete theory" is vague. Is it a stand-in for "I won't accept any argument by a philosopher, only physicists need apply"?
rntz··on Superintelligence: The Idea That Eats Smart People
By this measure, I would say Bostrom is not a crank. Yudkowsky is less clear. I'd say no, but I'd understand if Yudkowsky trips some folks' crank detectors.
rntz··on Mdmath – LaTeX Math for Markdown inside of Visual Studio Code
> But I think I'd see a lot more use case for something that lets me do a very tiny amount of things, maybe just headings and bold and italic, and avoids not only ambiguity but any risk of ambiguity.

When you build that, let me know. Until then I'll be over here, using a Perl script from 2004 that still works just fine.

rntz··on Mdmath – LaTeX Math for Markdown inside of Visual Studio Code
I use markdown for writing blog posts, and I need arbitrary HTML all the time. For tables; or for custom syntax highlighting; for drop-down menus that let readers choose what PL they want to see examples in (http://www.rntz.net/post/2016-06-06-not-everything-is-an-exp... ); to put the numbers on section headings into the left-margin; etc, etc.

Basically, markdown has (at least) two use-cases:

1. A safe (if you do HTML sanitization properly) way to let people mark-up their input on web comment sites like HN, StackOverflow, etc. This is probably the most common use-case.

2. A web authoring tool. This was the intended use-case.

Supporting arbitrary HTML is absolutely inadmissible for (1); not having arbitrary HTML is basically inexcusable for (2). And yeah, I could write the posts in straight HTML, but honestly that's a pain. Why shouldn't there be a tool that makes writing styled-text-with-lists-and-headings easy but lets me drop down to HTML when I need to?

rntz··on Mdmath – LaTeX Math for Markdown inside of Visual Studio Code
I tried to switch from markdown.pl to Pandoc and encountered some problems, one of which remains an open issue (https://github.com/jgm/pandoc/issues/1841): https://twitter.com/arntzenius/status/745946799836381184

A telling comment on that github issue is "Actually, it's a bit unclear what the behavior should be." I think the real problem is the idea of "a default Markdown engine" is pretty impossible when Markdown doesn't even have a formal spec. Complex human-readable formats without a spec are never gonna be compatible between different implementations without extraordinary effort. (Hence the http://commonmark.org/ effort, which I applaud, but doesn't seem to have a 1.0 spec out yet.)

rntz··on Postmodernism Generator
> But anyone who has studied the Sokal hoax knows very well that _Social Text_'s editors were bullied into relaxing their peer-reviewed standards at Sokal's insistence.

This is misleading. First, Social Text at the time explicitly did not practice peer review. You can't relax standards that aren't there. Second, their editorial requests were, in their own words: "We requested him (a) to excise a good deal of the philosophical speculation and (b) to excise most of his footnotes." He refused, and they published anyway. Sokal was certainly playing at being a recalcitrant author, but if an author's recalcitrance causes you to publish an article full of gibberish, you have still published gibberish.

The Sokal affair is not some knock-down destruction of the fields of postmodern and cultural criticism, but it's certainly a blemish. I encourage anyone who is interested to read http://linguafranca.mirror.theinfo.org/9607/mst.html

> Occasionally propagating "postmodern" meme generators is a childish form of territorial demarcation

Or possibly it's just funny. Here's a similar one for discrete math: http://www.theproofistrivial.com/

rntz··on The Idea of Lisp
No, it's possible. The key insight is that a "rational number of unlimited precision" can be used to store an arbitrarily large amount of data; it can emulate a Turing machine's unlimited working tape.
rntz··on The Idea of Lisp
Often reference counting is considered distinct from GC; sometimes the term "tracing GC" is used to disambiguate. Refcounting & tracing GC have the same purpose, but different implementation techniques and performance implications; and perhaps more importantly, reference counting can't collect objects which cyclically reference one another.
rntz··on The Idea of Lisp
I have no reason to believe that Russell wrote a garbage collector for the first Lisp implementations. I used the adverb "properly" specifically because it's possible to implement Lisp without GC, but this isn't really a viable approach long-term. So to make Lisp practical, significant work on GC had to be (and was) done.
rntz··on The Idea of Lisp
> Also, recursion arises in a different form in lambda calculus than it does in the approach to computability that is based on general recursive functions. Again, I think that LISP is closer to Gödel here than to Church.

I think I understand most of the rest of your post, but I got lost here. Could you describe what difference you see here, and how it applies to LISP?

rntz··on The Idea of Lisp
The specification allows for this, yes. However, on some platforms (including linux glibc by default, I believe), malloc() never fails, but allocates virtual memory optimistically; the first you hear of an out of memory condition is when the system slows down due to paging, and the next thing you notice is when the OOM killer nixes a process.

Of course, other platforms, especially embedded ones, behave differently.

rntz··on The Idea of Lisp
"saving the world to disk and rebooting" sounds like a primitive form of garbage collection to me :)
rntz··on The Idea of Lisp
I don't like that you're being downvoted. You're making a fair point. I do like the second half of the article, for the record.

I think that attribution matters; albeit probably more the attribution to Church and Turing than to Steve Russell over McCarthy. It matters because if someone finds the ideas the article brings up interesting and wants to dig into them, they should know where to turn. The history of ideas informs future ideas to come.

I also think understanding the details of high-level ideas matters. The misconceptions about self-interpretation, for example, are quite deep: no language can ultimately be defined in terms of itself, but always in terms of something lower-level. Chase this thread far enough and you start studying transistors; or, in another direction, Goedel's incompleteness theorems.

rntz··on The Idea of Lisp
This article has many misstatements in its first half.

> John McCarthy wrote 6 easy things in machine code, then combined them to make a programming language.

John McCarthy didn't implement Lisp in machine code. Steve Russell did. Implementing Lisp properly in machine code is not easy; you have to write a garbage collector. To do that in the early 60s, you had to first invent garbage collection. Lisp was and is brilliant, but not as easily bootstrappable as this makes it out to be.

> It's not obvious that these six things are computationally complete (AKA Turing Complete).

`lambda` and function application alone are Turing-complete, as McCarthy would have known. The credit here belongs with Turing and Church, not McCarthy. `atom`, `cons`, `car` and all the rest are just icing on the cake of the lambda calculus when it comes to computability.

> All other meaning can be defined in terms of them.

Yes, and you can build everything on top of the SK combinator calculus if you like, but that doesn't make it a good idea. Lisp is surprisingly practical given how few core constructs it has, but real Lisp implementations have always added more primitives (eg. numbers and addition) for reasons of practicality.

> The language was defined in terms of itself as an interpreter. This is a proof by construction that the language is computationally complete.

No, it isn't. To prove Turing-completeness you need to show that you are as powerful as Turing machines. To do this it suffices to show that you can interpret a language already known to be Turing-complete. Showing you can interpret yourself does not suffice. It's easy to define a language which can do nothing useful except interpret itself, for example. (See also wyager's comment.)

> Well, Lisp is defined as an interpreter in terms of itself from the get-go, just like a Universal Turing Machine.

No. Defining a language only in itself is nonsense, for exactly the reason given above: it means nothing yet! It's like writing in a dictionary:

   qyzzyghlm, v. intr. To qyzzyghlm.
It explains nothing unless you already understand it!

> Lisp is a universal language because it can interpret its own code. While you can certainly write a JavaScript interpreter in JavaScript, none of the work is done for you.

Almost none of the work is done for you in Lisp either. The core of Lisp is just a relatively easy language to implement, while Javascript is a difficult one. Lisp is easy to implement because it has simple syntax (s-expressions) and few core constructs. The only thing that is special about implementing Lisp in Lisp is that Lisp uses s-expressions as its core data structure, so you don't have to invent an AST representation. The article, to its credit, explores this idea later.

rntz··on Talks that changed the way I think about programming
The "hole-driven" development style originated in dependently typed languages such as Agda and Idris, which I imagine Matthew's video was inspired by. So if you want to experience it right now, go learn Agda and use agda-mode in emacs. (Probably something similar exists for Idris. I don't know whether Coq has a notion of "holes".)
rntz··on Ask HN: What free or low-cost static site hosting do you use most?
www.nearlyfreespeech.net is cheap (really cheap, hence the name) and reliable - they've been around since 2002, and I've used them since 2008.
rntz··on Static typing will not save us from broken software
> Property based testing frameworks tend to show you the simplest concrete example of your error. Type checkers tend to show you the most abstract example of your error. Maybe if type checkers started to to incorporate more concrete examples of error, people would generally find them more appealing.

I think this is a really important insight! And in fact, there is some recent research about making type checkers produce counterexamples: http://lambda-the-ultimate.org/node/5355. Ergonomics of type systems is an unfortunately understudied area.

rntz··on The Math Myth
I think you are confusing the object-level and the meta-level (and incidentally confusing everyone who doesn't know advanced set theory).

In any case, if you want to talk about the computable reals, then call them computable reals. Don't say "reals" for "computable reals", even if you think the former don't exist. Unicorns don't exist either, but that doesn't justify defining "unicorn" as "a horse".

rntz··on The Math Myth
You don't need to understand anything about infinitesimals to understand 0.999... = 1. Perhaps you meant limits? The "standard" approach would be to point out that Σ_{i=1}^∞ 9/(10^i) = 1 (that is, the sum from i = 1 to infinity of 9/(10^i) is 1), and understanding an infinite summation requires the concept of a limit. (Of course, there are simpler proofs that use only basic algebra and intuition about decimals; a limit is just the most direct approach.)

You're spot-on about needing to understand there's a distinction between a number and its decimal representation, though.

rntz··on The Myth of RAM (2014)
For equality, yes, Theta works! But I care not just about equality but about comparison. In particular, it would be nice if the "natural" ordering on A(f) had the property that

    A(f) <= A(g) iff f is O(g)
Theta(g) is a set, and the most natural ordering on sets is subsetting/inclusion. However, Theta(x) is not a subset of Theta(x^2), even though x is O(x^2)! So the natural ordering on sets doesn't do what I want.

It might be possible to define an ordering on Theta-classes that does what I want, though.

Edit: I just saw your comment about O. I think O might just work! So instead of remembering big-O, Theta, and Omega, I can just use

    O(f) <= O(g)  for  f is O(g)
    O(f) = O(g)   for  f is Theta(g)
    O(f) >= O(g)  for  f is Omega(g)
Is that true?

(I think small-o might be slightly more complicated, unfortunately. It has a more unusual definition: https://en.wikipedia.org/wiki/Big_O_notation#Little-o_notati...)

rntz··on The Myth of RAM (2014)
Your claims about what little-o and big-O mean don't match the explanation at https://cathyatseneca.gitbooks.io/data-structures-and-algori...

That page says o(f) == O(f) and not Theta(f). When you say "small-o is a claim that your process can't be faster than -this-", that seems to match the definition of Omega(f). Did you mean that the author should have used big-Omega?

As a side-note, I've always thought that {big-O,Theta,Omega,small-o} notation was very confusing. We should just have a notation for "the asymptotic equivalence class of a function", let's say A(f). Then to say f \in O(g), we say A(f) <= A(g). To say f \in Theta(g), we say A(f) = A(g). f \in o(g) becomes A(f) < A(g). And so forth. Instead of lots of new notation, we add a single function A and re-use notation for orderings which everyone already knows. (Of course, I'm omitting the definition of the ordering on these equivalence classes, so maybe there is some difficulty in defining that...)

rntz··on Seven Puzzles You Think You Must Not Have Heard Correctly (2006) [pdf]
This is indeed the standard solution. There is also a more difficult version: Every prisoner is required to have the same strategy (so you cannot pick a unique person F). (Every thread runs the same program, and threads do not have access to a unique thread identifier.)
rntz··on Seven Puzzles You Think You Must Not Have Heard Correctly (2006) [pdf]
Ah, of course! That guarantees there are no "tails"; every name (& box) is part of exactly one cycle. And this is then a property of cycles of permutations generally. Thanks!
rntz··on Seven Puzzles You Think You Must Not Have Heard Correctly (2006) [pdf]
Couldn't I start in a "tail" leading to a cycle that doesn't include my name? Suppose my name is "A", and I proceed:

check box A - read name B; check box B - read name C; check box C - read name B

and now I'm in a B-C loop, and will never find my name.

rntz··on Types
(Static) types may be seen as propositions, but this is just one interpretation of them. We can also interpret types as sets (although this doesn't work out very well except in very simple languages), as domains (most commonly), as cpos, as relations over closed terms (PERs), and so forth.

The types-as-propositions interpretation is a particularly useful one because it lets us take ideas from the field of formal logic and apply them to programming. But it is only one interpretation, and not a definition of what types are.

I don't think it's possible to give "type" a good, short definition. For me John Reynolds' definition comes closest: "Type structure is a syntactic discipline for enforcing levels of abstraction." But that's rather a mouthful, and not a good introduction to what types are.

> A type is a proposition, and "This binding has one of these possible values" is merely one type of proposition.

The type that an expression or variable has does not correspond to the proposition that that expression has a certain set of possible values! You're mixing the object-level (the language & its types) with the meta-level (assertions about the language). This is a total misunderstanding of Curry-Howard. Rather, the values an expression might take on can be interpreted as proofs of the corresponding proposition.

rntz··on Sad Trombone Exoplanet Reality Check
Acceleration and gravity are entirely interchangeable. The feeling you get due to gravity is also because of something "pushing against you" - namely, the ground. If you didn't have the ground to push against, nor air to drag against you, you'd be in free fall, which is the same as being in zero gravity.
← PreviousPage 6 of 15Next →