HNHacker News
TopNewBestAskShowJobs

rkts

277 karma · joined August 16, 2007

submissionscomments
rkts··on Campuses getting less political as '60s professors retire
So, just to be clear: you're saying that anyone who cares more about gay marriage than the government's budget is crazy?
rkts··on Why Hygienic Macros Rock
> you would have to roll your own thunks by passing anonymous functions... all that boilerplate becomes tedious.

In many cases you could just define plain functions and have a way to denote what parts of the input should be converted to lambdas. I proposed something like this on the Arc forum, but it just got brushed aside. I still think it's a decent idea.

http://arclanguage.org/item?id=7216

rkts··on Why Hygienic Macros Rock
I agree that Lispers sometimes overestimate the usefulness of macros. A lot of supposedly powerful macros can be (and are, in other languages) replaced by plain functions. I ranted about this on the Arc forum recently, but no one seemed to share my concern.

Also, many common macros (e.g. HTML generators) confer a performance advantage by doing computation at compile time, but do not confer any expressive advantage.

But, this is not to say that macros can't increase expressivity. You agree that the creation of new languages (metalinguistic abstraction) is an important tool, right? Think of a macro as a compiler for an arbitrary language or sub-language into Lisp. Lisp's homoiconic syntax just makes such compilers extremely easy to write. The trade-off is that the homoiconic syntax is harder to read (IMO).

If you want an example of a useful macro, here's one I used in a recent program. The interface was a simple command line where commands and their arguments generally corresponded to functions and their arguments. Much of the code looked like this (highly simplified):

  (define (add a b) (print (+ a b)))

  (new-command 'add add "Adds two integers" (a integer) (b integer))
The program would then display "add" among the list of available commands, along with its description and syntax. When the user typed e.g. "add 1 2" it would validate the input and call add on it.

Obviously, there's a lot of duplication above, because the properties of a function (its name, its parameters, etc.) aren't available at runtime; theoretically some reflection system could provide this, but it would be kind of a mess. So I wrote a macro that unified define and new-command, roughly like this:

  (define-command add (a integer b integer)
    "Adds two integers"
    (print (+ a b)))
In short, I designed a domain-specific language to attack my problem, and Lisp made it easier than any other language would have.

Also, I'd suggest dropping the rhetoric about Lisp "culture," which you clearly have only a vague understanding of. Have some trust in your fellow humans.

rkts··on A kind reminder to the community: please (re)read the HN guidelines
This is definitely not going well:

"Be civil. Don't say things you wouldn't say in a face to face conversation.

"When disagreeing, please reply to the argument instead of calling names. E.g. 'That is an idiotic thing to say; 1 + 1 is 2, not 3' can be shortened to '1 + 1 is 2, not 3.'"

rkts··on A humorous introduction to Haskell
x++;

public static void main.

rkts··on Why Arc is bad for exploratory programming
I think that should be

  (xdef 'cos cos)
etc.
rkts··on Everything I want to do is Illegal
Yes, exactly. Too many people think society should be designed exclusively for them. They don't realize that what's good for them is not necessarily good for the world.
rkts··on Lisp Wins (Steve Yegge article)
Can you give a few examples of SML's "many, many restrictions"? The only things I can think of that fit that description are the value restriction and lack of first-class polymorphism, but neither of these should have a serious effect on productivity.
rkts··on Why Africa may never produce a Microsoft, Google, Yahoo, or Facebook
I don't get what you're saying about "genetic propagation" -- we aren't talking about a previously nonexistent gene spreading to every individual, just a change in the statistical distribution of genes. All that requires is for certain kinds of people to have babies faster than others.

In any event, I appreciate your taking the time to substantiate your claims. Doing so helps keep the quality of discussion here high.

rkts··on Why Africa may never produce a Microsoft, Google, Yahoo, or Facebook
Is God imaginary? No way! Implying that is the essence of atheism.

Giving something a nasty name isn't enough to prove that it's wrong. You have to actually refute it.

> Did white people steal the "rule the world" gene? Of course not.

Do you remember Biology 101? Populations change over time. Why are other species capable of evolving, but humans not?

I'm not saying that genetics are the explanation for this change, but again, if you're going to deny the possibility you have to actually provide some evidence.

rkts··on Donald Knuth's letter about teaching O notation in calculus classes
I think we have a false dichotomy here. What we call 'intuition' and 'rigor' are not necessarily opposed. I think the problem with math classes is not any lack or excess of rigor, but that they focus too much on details instead of the general principles from which those details are derived. Complicated formulas and procedures are presented for students to memorize without any understanding of their origin. It's mostly 'how,' a little 'what,' and never 'why.'
rkts··on How Stereotyping Yourself Contributes to Your Success (or Failure)
What point am I missing? That we should ignore reality to avoid hurting people?

I object to the article's claim that

> the roots of many handicaps actually lie in the stereotypes.... women’s performance on spatial and mathematical tasks is created by ... the stereotype of their spatial and mathematical inferiority

Stereotypes may contribute slightly to group differences, but they are not the primary cause of them.

rkts··on How Stereotyping Yourself Contributes to Your Success (or Failure)
Stereotypes probably do reinforce themselves somewhat. But this doesn't change my opinion that they are almost always true. Or at least, they are always grounded in fact. They may be exaggerated, outdated or oversimplified, but even so I think they are usually correct.
rkts··on Parents Rise Up Against A New Approach to Math
> why I think long multiplication/division became popular? It's easier to grade homework.

No, it became popular because it used to be necessary. Math education (at all levels) is designed to teach 'how' rather than 'what' and this made sense when computation was something you had to do on paper. As to why it hasn't adapted, my guess is politics. There are too many people who lack any capacity for abstract reasoning but squeak through math classes by memorizing rules and procedures. These people naturally make a fuss when the rules and procedures are taken away and they start doing poorly.

rkts··on Parents Rise Up Against A New Approach to Math
Amusingly, the methods she described are almost exactly how I do arithmetic. And when I can't solve a problem mentally I do just grab a calculator. I don't recall using long multiplication or long division since I was in elementary school.
rkts··on Ask Hackers: Opinions on OCaml?
He's criticized the lack of a generic print function, calling it "a face-smashing insult to usability."

http://steve.yegge.googlepages.com/when-polymorphism-fails

Note that like many of the alleged deficiencies of OCaml, this was a compromise for performance.

rkts··on Ask Hackers: Opinions on OCaml?
I love OCaml. It's Lisp + syntax + type safety + speed. Lots of speed. Theoretically, I know that Lisp is a more expressive language, but I always find myself programming in OCaml anyway--perhaps just because the code is easier for me to read.

I don't know why OCaml gets so little attention (and such bitter hatred from a few people), but maybe it's because its merits are mundane: it focuses on doing things right, rather than superficial coolness (Python) or lofty idealism (Haskell, Scheme). The result is a language that's very nice to use.

rkts··on Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.
To be clear, this is what ML's variant types are all about. You can easily create a list that contains e.g. both ints and chars:

  let mylist = [`Int 5; `Char '5']
Technically the elements have the same compile-time type, but the question is, what practical difference does that make? In what cases are variants an inadequate solution?
rkts··on Smjörið er brætt og hveitið smátt og smátt hrært út í það, þangað til það er gengið upp í smjörið.
No, it doesn't. Elements of a Java collection must all be of the same type. The elements may be implicitly coerced to a common supertype, but if you want to get the original types back you have to downcast--which is basically explicit dynamic typing.
rkts··on Learning Math
If you want fundmantal, intuitive understanding I suggest What is Mathematics? by Courant and Robbins. I got this after pg recommended it in an essay, and it's wonderful.
rkts··on PG: Clarification about Character Sets
An official implementation.
rkts··on "I'd just use an n-by-k array of closures to represent this."
The word "OOP" is so ill-defined that we can't begin to have a meaningful discussion unless you tell us precisely what you mean by it. In particular, what is an "object" and how is it different from a collection of closures?
rkts··on Ethan Herdrick (Biographicon): Running a startup on Scheme.
Functional programmers tend to avoid iterators since they aren't referentially transparent. Instead, operations on collections are expressed with higher-order functions that map or fold some function over each element. If you need a first-class "conventional interface" to sequential data, the preferred structure is the linked list.

Hash tables in functional-style languages often let you specify a hash function. That means the hash function is a property of the collection, rather than the objects in it. If you prefer a more "object-oriented" design, you can use an object system such as tinyclos to define a generic hash function. But Schemers usually like to avoid such complexity.

Looking at the PLT documentation, I see that its hash tables don't let you specify a hash function. That's definitely a shortcoming, though arguably not a serious one in practice. SRFI 69 gets this right.

rkts··on What Linux distro are you using for your servers ?
Hmm... well, BSD init is easier to use than SysV init. The ports system is also known for its simplicity. The source code is contained in a single CVS tree and the entire OS can be built with a few commands. The man pages and handbook are consistent and well written.

Much of the difference is subjective. FreeBSD feels coherently designed, whereas Linux is a patchwork of programs written by different people with different styles and philosophies.

I don't know a lot about Gentoo (most of my experience is with Debian and Slackware) but from what I understand, its purpose is to be as flexible as possible. That's a legitimate goal, but it seems to conflict with ease of use.

rkts··on What Linux distro are you using for your servers ?
I don't understand your question. Do you mean you want an aspect of FreeBSD that's easier to use?
rkts··on What Linux distro are you using for your servers ?
It typically has less to do with performance or stability than with ease of use. While Linux is piling on features, BSD focuses on clean design and quality of code and documentation. Linux is "do it now," BSD is "do it right."
rkts··on Two AI Pioneers. Two Bizarre Suicides. What Really Happened?
This story and the mention of MIT's "high suicide rate" remind me of something I've wondered about. Depression and suicide seem to be common among very smart people. Does anyone know why?
rkts··on PG: Arc Likely To Be Open-Sourced This Winter
The ISC license seems to fit your style.
rkts··on Ask YC: Anyone using *BSD for hosting instead of Linux?
I disagree strongly on the ports collection. I find it more flexible, up-to-date and easy to use than Debian's packages.
rkts··on Doctorow: How Your Creepy Ex-Co-Workers Will Kill Facebook
Simple solution: change your privacy settings.
← PreviousPage 3 of 4Next →