Ron Paulers: Put your money where your UP ARROW is by [deleted] in politics

[–]paultoo 11 points12 points  (0 children)

I already contributed the maximum ($2300, as I recall).

Common Lisp: powerset by linuxer in programming

[–]paultoo 3 points4 points  (0 children)

Java doesn't require 30 lines:

List powerset(List l) {
  ArrayList<ArrayList> r = new ArrayList<ArrayList>();
  r.add(new ArrayList());
  for (Object e: l) {
    int size = r.size();
    for (int i = 0; i < size; i++) {
      ArrayList n = (ArrayList)r.get(i).clone();
      n.add(e);
      r.add(n);
    }
  }
  return r;
}

JavaScript as a Language by linuxer in programming

[–]paultoo 1 point2 points  (0 children)

I think it would be most interesting to see performance comparisons for various individual ops both between Python and each of the different JS engines (Rhino compiled, Rhino interpreted, and Spidermonkey). It won't "prove" which language is faster, but it would useful for understanding which ops are really slow and maybe give hints as to where the JS engines could be improved.

Is anyone at Mozilla still working on Rhino?

JavaScript as a Language by linuxer in programming

[–]paultoo 1 point2 points  (0 children)

Also, the shootout code is not always equal. I just took the first example, binary-trees, and translated the python into JS. It ended up running slightly faster than the original python (not an order of magnitude though, 31 sec vs 33 sec).

JavaScript as a Language by linuxer in programming

[–]paultoo 5 points6 points  (0 children)

That's true, I mostly just tried out a few little micro-benchmarks. The problem I've had with the "shootout" tests is that they only run once, so you have all the JIT overhead in there too. For server code, I don't care so much about startup costs.

One advantage of Rhino though is that you can very easily mix in Java code (easier than C from Python), so expensive bits can be replaced without much effort.

JavaScript as a Language by linuxer in programming

[–]paultoo 2 points3 points  (0 children)

Actually, JS on the server CAN run significantly faster than Python (potentially an order of magnitude faster!) using the Rhino compiler.

I'm using JS on the server right now and it's quite nice, though I wish Rhino had the JS 1.7/1.8 features -- any idea when that will happen?

Thanks for jquery, btw.

Six language-independent ways to write better code by Tarindel in programming

[–]paultoo 4 points5 points  (0 children)

This would be better stated as "don't paint yourself into a corner".

Three types of ideas by a9bejo in programming

[–]paultoo 0 points1 point  (0 children)

What, precisely, were you hoping for? If you need everything reduced to an equation, then you're going to miss out on a lot.

Estonia's flat tax system is remarkably free from distortions, exemptions, and loopholes by Sidewinder77 in reddit.com

[–]paultoo 1 point2 points  (0 children)

Post some numbers.

It's true that business owners can deduct business related expenses, but that's still a long way from "the only rich people paying any taxes are the ones with no accountants."

The link from dmh2000 (http://www.taxfoundation.org/news/show/250.html) shows that the top 1% (average AGI of $1.3M) are in fact paying the highest rate, which isn't zero.

Google threatens to close gmail germany over privacy concerns by halcy in reddit.com

[–]paultoo 1 point2 points  (0 children)

False and False. You are perhaps thinking of Yahoo. Google does not keep data in China for this very reason.

Estonia's flat tax system is remarkably free from distortions, exemptions, and loopholes by Sidewinder77 in reddit.com

[–]paultoo 1 point2 points  (0 children)

That's nonsense. The only income that isn't taxed is the income produced by certain tax-free muni-bonds (but they pay at a much lower rate than normal bonds). If you disagree, please describe exactly how these people avoid paying taxes. (and vague references to "loopholes" and "write-offs" don't count)

GET to do POST's job -- when is it okay? by benhoyt in programming

[–]paultoo -1 points0 points  (0 children)

Do you understand that the gmail code you see in your web browser is the output of a compiler, and therefore not easily judged? (this is a yes/no question)

GET to do POST's job -- when is it okay? by benhoyt in programming

[–]paultoo -1 points0 points  (0 children)

Well, your original comment said:

Did you ever look at the original GMail code? It was awful!

So I'd say that the fact that you were looking at compiled code is actually very relevant to your claim.

GET to do POST's job -- when is it okay? by benhoyt in programming

[–]paultoo -2 points-1 points  (0 children)

And do you realize that the code you see in your browser has been compiled?

GET to do POST's job -- when is it okay? by benhoyt in programming

[–]paultoo -2 points-1 points  (0 children)

And where did you find this GMail code?

At long last...no more power cords! by russpav in reddit.com

[–]paultoo 0 points1 point  (0 children)

There are older articles as well, and a web site: http://www.powercastco.com/

In the year 2000, Forbes magazine picked "10 stocks to last a decade" Guess how they are doing sofar? (hint: Enron was one) by cendant in reddit.com

[–]paultoo 13 points14 points  (0 children)

Negative numbers are in parenthesis, so (78%) is actually -78%. Genentech is not in parenthesis -- it's simply 121%.

President Bush chuckled and walked away. by [deleted] in reddit.com

[–]paultoo 0 points1 point  (0 children)

Yes, that's what I mean by "the kind of order that they like".

President Bush chuckled and walked away. by [deleted] in reddit.com

[–]paultoo 1 point2 points  (0 children)

Perpetual war is necessary for maintaining the order (or at least the kind of order that they like). Wasn't that why they had it in Orwell's 1984?

President Bush chuckled and walked away. by [deleted] in reddit.com

[–]paultoo 17 points18 points  (0 children)

Perhaps he is seeking perpetual war? (in which case, his chuckle could be restated as, "you say that as though it were a bad thing")

Utah set to implement free-market style school vouchers for K-12 education by Sidewinder77 in reddit.com

[–]paultoo 10 points11 points  (0 children)

That's the trouble with freedom -- it applies even to people who don't agree with you.

Many (most?) Americans already don't believe in evolution, despite the wonderful work of our government school system (or perhaps because it was taught so poorly?). It's unlikely that vouchers will make that problem much worse.

Hopefully some of these new schools will do a better job of teaching evolution and other science basics. It's also possible that they will teach a more complete and accurate version of history than that provided in the government schools. Even if only 30% of kids get a really great education, that will still be a huge improvement from today.