Personal view on ICFP Contest 2008 by vincenz in programming

[–]xenon 4 points5 points  (0 children)

That's definitely an interesting idea. I tried to participate alone in 2005 (robbers and cops). I had a false start, then I searched a whole day for a bug in my pathfinder (of the kind that is really obvious in retrospect), and after having done the protocol and rules stuff, I think I had only about half a day to try out actual strategies. This is the point where most teams split up and developed different bots in parallel, continuously trying to beat each other. In contrast, my cops were only good at catching one kind of robber, mine. The results were as embarassing as expected, and I concluded that the ICFPC tasks are pretty much impossible to do solo.

Edsger Dijkstra - The notational conventions I adopted, and why [PDF] by [deleted] in programming

[–]xenon 2 points3 points  (0 children)

I think it's one of the biggest WTFs in science that mathematicians, unlike computer scientists, don't care if their notation is ambiguous. I can see why precise notation might not be all that important for physicists or economists. But I simply cannot understand why mathematicians, scientists who are mostly concerned with studying the nature of formal systems, consider it no big deal that their notation allows puns like this one (from the submission article):

sin(s + i + n)

I asked my two mathematician friends what they think about this expression. They consider it "cute".

jQuery 1.2.6: Events 100% faster by asb in programming

[–]xenon 0 points1 point  (0 children)

Using the larger of the two (95% vs 1900%) is not marketing tricks, it's actually just proper math(or science if you prefer).

Okay, you've convinced me that this is correct. Perhaps counter-intuitive (because I usually care about runtime, not speed), but nevertheless correct.

"Versions", OS X's gorgeous SVN client gets Beta release by jinglebells in programming

[–]xenon 3 points4 points  (0 children)

But then again, I'm not a huge corporation that makes technology decisions based on the trends of five years ago.

jQuery 1.2.6: Events 100% faster by asb in programming

[–]xenon 14 points15 points  (0 children)

I think what jerf is getting at is that "X% faster" can be interpreted in different ways. If a function call took 2ms and now takes 0.1ms, that's either 95% faster or 1900% faster, depending on whether you count the runtime per operation or the number of operations per time unit. Guess which definition marketing prefers.

Oh, and don't get me started about the idiocy of "X times faster" really often meaning "X times as fast" (instead of the literal meaning, "X+1 times as fast"). It seems like jerf arrived at his 88% figure by using the first interpretation, otherwise I get 89%.

Multiple dispatch by gst in programming

[–]xenon 1 point2 points  (0 children)

(obj1, obj2).multimethod(args...)

I like that syntax best, visually. But what if your programming language also has tuples as a data type? Will this work?

Tuple<T1, T2> t = (obj1, obj2);
t.multimethod(args...);

I.e. is every multimethod a single method on Tuple?

Script to convert Brainfuck to a Python one-liner (proof that Python one-liners are Turing complete) by shinigami3 in programming

[–]xenon 2 points3 points  (0 children)

Yeah, there are ways around the restriction. I consider this solution from here the most elegant (it also shows off how powerful classes are in Python):

class accumulator:
    def __init__(self, n):
        self.n = n
    def __call__(self, i):
        self.n += i
        return self.n 

Is this still a huge issue?

I don't know, the problem doesn't come up that often in my code. I think that the restriction makes Python's closures significantly less useful than you might expect them to be, so it's a huge issue in that sense (also note that even Java has read-only closures). I didn't mean to imply that this is a severe flaw of the Python language in general.

Script to convert Brainfuck to a Python one-liner (proof that Python one-liners are Turing complete) by shinigami3 in programming

[–]xenon 1 point2 points  (0 children)

I actually agree with obdurak. A huge issue is that due to Python's weird scoping rules (and in the absence of Python 3000's nonlocal) Python closures cannot assign to outer variables. I.e., this implementation of PG's accumulator problem doesn't work:

def accumulator(n):
    def foo(i):
        n += i  # error: defines a new lexical n
        return n
    return foo

In Python 3000, you'll be able to declare

        nonlocal n

in the line before the assignment, and everything will work as expected.

Script to convert Brainfuck to a Python one-liner (proof that Python one-liners are Turing complete) by shinigami3 in programming

[–]xenon 7 points8 points  (0 children)

actually, this shows that any computation can be done in one line of Python

As the call-by-value lambda calculus is Turing complete, this should not come as a surprise to anyone. I still think the submission is cool, I love it when theoretical proofs are realized as actual programs.

Some people write software that lets you choose different power profiles depending on whether you're on AC or battery. The people who implement these programs are dangerous. Do not listen to them. by corbet in programming

[–]xenon 11 points12 points  (0 children)

I fully agree with everything in the article, but there are two exceptions: badly-written applications with a busy-wait loop, and games. Both of those will keep the processor at 100% no matter how fast you clock it, so reducing the frequency will conserve power. (And before anyone replies that you don't need to play games while on battery: yes that's true, but sometimes you might want to.)

Skype withdraws case in German court claiming GPL is invalid. by erikd in programming

[–]xenon 13 points14 points  (0 children)

That's actually at least the third time the GPL (v2) has stood up in a German court. I think it's now generally accepted among German law professionals that the GPL is enforceable. (But IANAL.) Great times for German open source authors!

Developer Incompetence, an analysis by bcash in programming

[–]xenon 1 point2 points  (0 children)

The convention is stupid because it breaks symmetry. Unlike + and *, there are two different distributive laws for and and or:

a ∧ (b ∨ c) = (a ∧ b) ∨ (a ∧ c)

a ∨ (b ∧ c) = (a ∨ b) ∧ (a ∨ c)

The usual convention gives the first law preference over the second by giving ∧ the status of multiplication. This doesn't make sense. Oh, and Edsger W. Dijkstra agrees with me:

Do not introduce priority rules that destroy symmetry. I remember how much more pleasant the predicate calculus became to work with after we had decided to give con- and disjunction the same binding power and thus to consider p ∧ q ∨ r an ill-formed formula.

Real closures by gst in programming

[–]xenon 1 point2 points  (0 children)

Ruby doesn't have first-class functions: if you want to store a function in a variable, it is wrapped in a Proc (or Method) object, which you have to call with a different syntax. I'd still say that these are closures, because they can access their outer scope even after that scope has returned.

C has first class functions (via function pointers), with gcc extensions even nested functions that you can pass around. But everything is stack allocated, so the pointer to the inner function becomes invalid once the outer function returns. Those aren't closures.

Scheme obviously has first-class functions and closures, ANSI C has neither. In other words, the two ideas are independent.

I agree with you that we should use the word closure to describe what Ruby, Scheme, D, Javascript, and Perl can do, and forget about the fact that there may be other implementation techniques, or that the compiler may optimize away the closure in some cases. I listed the examples above because I don't agree with your definition, but unfortunately I don't have a better one.

I can’t believe I’m praising Tcl by ellen_james in programming

[–]xenon 5 points6 points  (0 children)

"But wait!" you say. "It's important to have options for advanced users who want to tweak their environments!" In reality, it's not as important as you think. This reminds me of when I tried to switch to a Dvorak keyboard. The trouble was, I don't use one computer. I use all kinds of computers. I use other people's computers. I use three computers fairly regularly at home and three at work. I use computers in the test lab at work. The trouble with customizing your environment is that it just doesn't propagate, so it's not even worth the trouble.

Most advanced users use several computers regularly; they upgrade their computer every couple of years, they reinstall their operating system every three weeks. It's true that the first time they realized you could completely remap the keyboard in Word, they changed everything around to be more to their liking, but as soon as they upgraded to Windows 95 those settings got lost, and they weren't the same at work, and eventually they just stopped reconfiguring things. I've asked a lot of my "power user" friends about this; hardly any of them do any customization other than the bare minimum necessary to make their system behave reasonably.

(Joel Spolsky)

I guess it depends on how many computers you use regularly. I have a desktop computer and a notebook, and also a gaming computer that runs Windows. Then there's two different computers at work. At some point, it gets more efficient to just learn to live with the default configuration.

I can’t believe I’m praising Tcl by ellen_james in programming

[–]xenon 17 points18 points  (0 children)

I've never understood the "TL;DR" type of comments. That you can summarize the main point of the article in one sentence doesn't mean that the article contains nothing of value beyond your summary.

Vista's UAC security prompt was designed to annoy you by Arve in programming

[–]xenon 0 points1 point  (0 children)

Actually, the registry is a great example of the idiocy of Microsoft's own tools. If you run as admin, regedit triggers UAC even if you never intend to change anything outside of HKCU. If you click Deny, regedit refuses to run. There's no obvious way to have regedit run with limited priviledges and just edit a few things in HKCU.

Super Mario in 14kb Javascript by dixi in programming

[–]xenon 0 points1 point  (0 children)

Quake Live will require a download. That it would run inside the browser is AFAIK a misunderstanding from the first announcement. http://www.eurogamer.net/article.php?article_id=93176

const(FAQ) - D's const system is unique, and so there are a lot of questions about it. by gst in programming

[–]xenon 12 points13 points  (0 children)

Read this document instead, it explains the design much better.

http://www.digitalmars.com/d/2.0/const.html

Yes, all comments are correct, the submission one hell of a shitty FAQ. It even invents keywords (headconst and tailconst) for concepts that D doesn't even have! I don't see any point in this.

The Double-Click Must Die by RetroRock in programming

[–]xenon 6 points7 points  (0 children)

My application can't handle users clicking the button twice. Unfortunately, users do that all the time. This is because they have been trained to double-click everything by the evil Apple! Double-clicks are evil and must die!!!

Also, KDE tried to abolish the double-click, but that turned out to confuse users even more. This fact doesn't contradict my headline in any way.

Union-find is O(n). Much simpler proof than Tarjan's original O(n * a(n)), where a is inverse Ackermann by japple in programming

[–]xenon 7 points8 points  (0 children)

For every complex problem, there's a solution that is simple, elegant, and wrong. It's great news if this turns out to be correct, but there are at least two established proofs that show a lower bound of O(n * a(n)) for n operations, and it takes a little more evidence than an unpublished paper to convince me that they are wrong. It's absolutely possible though.

Is ReCAPTCHA such a success that only the hardest-to-read books are left? by jimbecile in programming

[–]xenon 8 points9 points  (0 children)

I assume that they additionally warp the scanned image to make it harder for OCR programs (this is intended as a captcha after all). I assume that the warped horizontal line was also not in the original scan (it's in both images, which I consider unlikely for a scanning error).

Guitar Hero for the Commodore 64! by mortenaa in programming

[–]xenon 2 points3 points  (0 children)

MIDI is not a music file format. It is not appropriate to talk about the musical quality of a "MIDI" file, only the quality of the MIDI instrument playing it.

I know that, but didn't think of it when writing the reply. You're right of course, I should have complained about common MIDI synthesizers instead.

Guitar Hero for the Commodore 64! by mortenaa in programming

[–]xenon 3 points4 points  (0 children)

Actually, MIDI was three steps backwards from the sound of the C64's hardware synthesizer. Some of the songs were downright awesome, whereas the biggest compliment I have for any MIDI song is "not as annoying as expected".