HNHacker News
TopNewBestAskShowJobs

qwph

412 karma · joined February 17, 2008

language geek
submissionscomments
qwph··on About the Cruft
There's a tiny kernel of truth to the line-counting argument - if you find yourself repeatedly typing the same patterns of code over and over again, and there's no way to refactor it so that the pattern's expressed only once, then yes, then you're probably using a language with weak abstraction capabilities.

But yeah, trying to arrange all languages along a single "axis of power" is a pretty pointless exercise...

qwph··on About the Cruft
I would have liked to have seen the code for the 4 languages. Maybe that's just me.
qwph··on Hippies, Nerds, and Lumpenprogrammers
I appear to be a hippie, for this definition of hippie, anyway...
qwph··on Python insights
Aha! There's actually no difference (i think) between:

1, 2

and:

(1, 2)

That seems to make sense.

qwph··on Python insights
Interesting. It seems that (according to my Python prompt)

  x, y = 1, 2
and

  [x, y] = 1, 2
and even

  x, y = [1, 2]
are all identical in function. Are there any (subtle) distinctions between the three?
qwph··on Developers needed; Hackers need not apply
Why choose the second over the first?

To give Blub programmers the warm-and-fuzzies, one assumes...

qwph··on Lisp Plus Plus
There's a fine line between madness and genius, and as far as I can tell, this seems to be exactly on the line. I think I might have to download the source...
qwph··on The single assignment cargo cult
Although some people, when faced with a problem they don't understand, will just give up and do something else instead.

Admittedly, I don't have any metrics on how many people have abandoned Erlang because of single assignment, or Lisp because of the parentheses, but I'm sure such people exist.

And you might say that it's their loss, and I'd probably agree with you.

qwph··on Secrets of the Little Blue Box (1971)
I never had a blue box, but I would have loved to have had one as a child.

I did once manage to hack a pulse dial phone into making a call by tapping the receiver disconnect button, which is pretty tame by comparison, but it seemed tremendously exciting at the time.

I think I also used to dial random 3-digit numbers starting with * or # just to see what would happen.

qwph··on Digg is Dead
I'd say it's more that the smaller the community, the greater the chance that the community as a whole can agree on what constitutes signal and what constitutes noise.
qwph··on Digg is Dead
Rumours of [insert name of company]'s death have been greatly exaggerated.
qwph··on Hey language snobs: don't pinch pennies
Does it start with a 'P'?
qwph··on Common Lisp Quick Reference
Now I have a quick reference, I might start using Common Lisp.
qwph··on Learning To Drive a Stick Shift: Why Programmers Should Know C/C++
Are you talking about the ability to hide a base class method with a derived class method? It's not really considered a good idea to do such a thing, but it's an inevitable consequence of mixing early- and late-binding in the same language

Yes. It sounds like we agree that overriding a non-virtual method is a bad idea, and i think "mixing early- and late-binding" probably captures it quite well. The C++ compiler makes the programmer decide whether to use early or late binding, and handle the consequences.

In some other languages (let's say Self, for example), the distinction between early and late binding is handled by the compiler, so it's invisible at source level, and all methods are (implicitly) virtual unless the compiler can prove that a static call is safe, in which case it can inline the call. That means that the "early-binding conflict" situation can't arise in a language like Self.

qwph··on Learning To Drive a Stick Shift: Why Programmers Should Know C/C++
OK. It's a poor example. I think the problem with C++ is that it contains far too much syntax, and there are all manner of weird edge cases which you basically have to learn by rote. (For example, how templates interact with the preprocessor and vice versa).

And why is the keyword 'virtual' even necessary? Surely all methods should be virtual by default (and the compiler ought to be able to replace virtual calls with direct calls based on the type information). Can anyone cite an example of where you'd actually want to call different methods depending on whether you're using a base or a derived pointer?

I think trying to bolt an OO model onto C while retaining 100% source compatability was an interesting idea, but it turned out to be a bad one in the long run. 90% of the complexity in C++ you don't actually need, you can get by just fine with C, and you have the added bonus that you can hold pretty much the entire language and a significant portion of the standard library in your head the whole time whilst you code, which I never managed to do with C++.

Admittedly, my experience is probably informed by having to maintain some seriously hideous C++ code over the last 10 years.

So, there, C++ is a complicated language. Some might say it's too complicated, but I guess everyone has to do their own cost/benefit analysis on that.

Is that better?

qwph··on Learning To Drive a Stick Shift: Why Programmers Should Know C/C++
Sure, if you know (to pick just one example) what a protected abstract virtual base pure virtual private destructor is, then yes, you're probably right to choose C++ over C.

(http://amalp.blogspot.com/2007/10/what-is-protected-abstract...)

qwph··on Using your browser URL history to estimate gender
You might want to try making contact with other users of the sites you frequent... ;)
qwph··on Ruby Internals
I remember looking at the Ruby source code about a year ago, so it may have drastically improved since then, but I remember it being a bit of a mess. But it is quite fun to step through the code in gdb and you can learn quite a lot by hacking on it or implementing a DLL extension.

If trolling through language implementations is your kind of thing, I'd suggest having a look at Lua or Python as well (I never got Perl to configure, let alone compile) - then you can compare and contrast with the way things are done in Ruby.

qwph··on Defender of the Favicon - Playable Defender Clone in a Favicon
Ah, so that's where I'm going wrong... ;)
qwph··on Why you should never be a startup girlfriend
I've lost more than one someone over the years. To be honest, the most important thing is being happy with yourself, whether you're in a relationship or not.
qwph··on Why you should never be a startup girlfriend
Losing someone (like most other things) gets easier the more times you do it...
qwph··on The Shaggy God - Richard Stallman in Boston Magazine
From the article:

"In 1991, all that was left was the kernel, the brain within the brain of the computer, and thus the most essential component of any operating system, and the hardest part to create. Before Stallman could finish building his, an ingenious young Finnish computer scientist named Linus Torvalds—who was initially inspired by a Stallman speech at the Polytechnic University in Helsinki the year before—played off a Unix-like operating system called Minix to develop a free software system of his own. Incomplete in other respects, it had the kernel that Stallman's lacked—one that meshed so beautifully with the GNU system that it seemed destined for it. Strictly speaking, the complete operating system should have been called GNU/Linux, representing the combined contributions of Stallman and Torvalds. Stallman always insists on the term, pronouncing it "GNU slash Linux." But in the popular mind, it came to be known as only Linux. Stallman has never gotten over that."

qwph··on 8 Ways To Quit Mousing Around
Speaking as someone with mouse-induced RSI, this is great news. I can't wait!
qwph··on Sounding black hurts your income; so does sounding southern
Assuming 40 hours a week, an extra $0.88 an hour works out at $152.53 a month.
qwph··on Do you suffer from Programmer's Apathy?
I read that halfway, and feel more apathetic now than I did when I started...
qwph··on LHC: Better safe than sorry.
I'll bet you that the universe is not destroyed... :)
qwph··on Bjarne Stroustrup of C++ fame dissects the history of his famed programming language
Why do you hate Forth?
qwph··on The Ultimate Code Kata
Learning Smalltalk is a great idea, but be warned - its workflow is very different to most other languages (for example, it doesn't really have a command line in the same sense that Ruby or Python does). If you can get over the first couple of weeks of frustration, you'll probably learn a lot.
qwph··on Inventions they said would never work
(I'm not really disagreeing with you, but) you have the benefit of hindsight.

Admittedly, I haven't invented any great stuff, but if I were to claim that it'll never be possible for a human being to travel at greater than light speed, am I going to look narrow-minded in n years time? (where n=10, 100, 1000)

qwph··on Inventions they said would never work
Yeah, I'd agree - but making predictions is a notoriously tricky business.

Any statement about the future (which is, by definition, uncertain) has some percentage chance of looking absurd in retrospect - and it's a lot harder to make a correct prediction than a wrong one.

← PreviousPage 5 of 6Next →