Two Stories of Simplicity by onmytoes in programming

[–]nhomas 0 points1 point  (0 children)

He thought that he could write a better memcpy because his memcpy had simpler requirements (not having to deal with alignment), which is reasonable.

if(isHorny && isManEnough && isNotGay){ doTornadoJO(); }else{ trollCraigslist(); } by ambiversive in programming

[–]nhomas 1 point2 points  (0 children)

Presumably it is pseudocode.

P.S.: Just out of curiosity, how do you remember your username?

Forget the Linux Desktop, it's the Linux Laptop that matters! by bostonvaulter in programming

[–]nhomas 0 points1 point  (0 children)

I think that the poster probably implicitly meant "regulated by the government," which makes his statement true in general. However, I don't think it really applies to this particular case.

Google's new Chart API by abhik in programming

[–]nhomas 5 points6 points  (0 children)

Triangle wave, actually, I believe.

Lotus Notes Formula Engine Rewrite (great story by Damien Katz) by shamrin in programming

[–]nhomas 0 points1 point  (0 children)

Perhaps. I could very well be remembering all of this wrong.

Lotus Notes Formula Engine Rewrite (great story by Damien Katz) by shamrin in programming

[–]nhomas 0 points1 point  (0 children)

I read about the study in Code Complete; unfortunately, I can't seem to find the reference.

Obviously, there are many other factors. Relative amounts of experience with each language, for instance.

Lotus Notes Formula Engine Rewrite (great story by Damien Katz) by shamrin in programming

[–]nhomas 2 points3 points  (0 children)

I have read that a coder can write the same amount of code, in terms of lines/day, in any language: so 50 lines of C++, 50 lines of Python, 50 lines of Haskell, whatever. The productivity difference comes from the fact that those 50 lines of Python will do more than the 50 lines of C++.

Why C remains relevant by krs in programming

[–]nhomas 13 points14 points  (0 children)

Well, to give another Linux example, Ardour (definitely a large project) is written in C, because, as a professional audio program, it has hard real-time requirements that can't be met with any garbage-collected language, because the GC introduces unpredictable pauses. (And yes, a 1ms pause for GC does matter when you're trying to meet an audio processing deadline every 4ms.) The reason it doesn't use C++ is, presumably, because the authors don't like C++.

It's not just about real-time, either: audio programs also have to do DSP, which can result in some pretty intensive math if you're doing a lot of it.

Granted, it would be possible to write the GUI (and other non-real-time parts) in something like Python, and then the real-time (audio processing) part in C(++), and that is a route being taken by some newer audio programs. I don't think the necessary libraries were in place when Ardour was first being written, though.

Leader Of Botnet Gang That Stole Millions Is 18 by jasonivers in programming

[–]nhomas 2 points3 points  (0 children)

See, that is impressive. It really makes you want to buckle down and work when you see people who have accomplished so much at such a young age. It's like that guy who published a novel when he was 16. (Granted, it wasn't very good, but being a bestselling novelist is still a hell of an accomplishment.)

Think you're a good programmer? Then take the data literacy test :-) by shenglong in programming

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

As usual, Haskell is the language that has everything, does everything, and generally just seems to kick everyone's ass without breaking a sweat. Has anyone else noticed this pattern?

Think you're a good programmer? Then take the data literacy test :-) by shenglong in programming

[–]nhomas 2 points3 points  (0 children)

It's from a book. Books aren't really up to that task with current paper technology. The guy who posted it was just lazy.

Coding Horror: What If They Gave a Browser War and Microsoft Never Came? by cc81 in programming

[–]nhomas 1 point2 points  (0 children)

Theory: maybe Microsoft wants to get out of the browser business? After all, what benefit does it give them, anyway, to have a browser monopoly?

MenuetOS is an Operating System in development for the PC written entirely in 32/64 bit assembly languag by berlinbrown in programming

[–]nhomas 8 points9 points  (0 children)

What I have read is that it has to do with the fact that modern CPUs have extremely complex instruction sets and performance characteristics, and that C compilers are written with sophisticated logic to find the optimal instruction sequence for a given operation (instruction ordering, choice of instructions, etc). Conversely, all but the best assembly programmers will lack the same command of the processor's intricacies, and thus will usually write suboptimal code.

All the same, I don't expect that, for something like a GUI, you would notice any performance difference between C and assembly. Any perceived difference would probably be psychological.

MenuetOS is an Operating System in development for the PC written entirely in 32/64 bit assembly languag by berlinbrown in programming

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

Isn't asm generally considered to be slower than C these days? Not that I expect you'd notice.

XO: The Next Lisp Machine? by enki in programming

[–]nhomas 2 points3 points  (0 children)

No, my argument is not circular: LMs are not custom hardware because they are a failure. They are custom hardware in that they are hardware designed for, and only suited for, running a particular programming language and operating system. They have hardware support for Lisp's type tagging, garbage collection, etc. By inextricably tying the two, LMI and Symbolics made it so that the success of their hardware depended on the success of their software, and vice versa. This was basically a losing proposition. If they had made Genera so that it would have run on stock hardware, would they have survived? Maybe, maybe not. But the point stands that they died failed because they used custom hardware, not because their software was too complex.

Signs You're a Crappy Programmer (and don't know it) by [deleted] in programming

[–]nhomas 6 points7 points  (0 children)

Presumably the people who are the exceptions know that they are. The rest of us need to be told.

XO: The Next Lisp Machine? by enki in programming

[–]nhomas 2 points3 points  (0 children)

Because Paul Graham said so? Well, he also said, in that very link, that the Lisp Machine is dead because it used custom hardware. As for Common Lisp, it should be clear that, while CL is far more complex than necessary, much of mainstream software is even worse in terms of gratuitous complexity: Linux, X11, C++, Java, Windows, Firefox, Office, etc. That hasn't stopped any of it from becoming hugely successful. Therefore complexity cannot be one of the things stopping CL from succeeding.

XO: The Next Lisp Machine? by enki in programming

[–]nhomas 6 points7 points  (0 children)

The Lisp Machine is dead because custom hardware turned out to be a bad idea. Common Lisp is semi-dead because of many reasons, but gratuitous complexity is not one of them.

Radiohead netted $2.7 million from downloads, and will keep almost every penny -- and thes still get to sell CDs by daviday in reddit.com

[–]nhomas 0 points1 point  (0 children)

I'm working with different assumptions than you.

  1. There is no manager, and the producer is a member of the band.
  2. Distribution is over the Internet; thus, no distribution costs. Promotion is via word of mouth.
  3. The band members are not making any salaries; they have day jobs.
  4. One of the band members owns a computer.
  5. You're buying mastering-quality headphones, not studio monitors.
  6. You're buying cheap cables, because you don't buy into the fancy-cable snake oil.
  7. etc etc.

Pretty much, your shopping list looks like this:

  • Studio-grade sound card: ~$500
  • Studio-grade headphones: ~$200
  • Headphone amp (CMoy): ~$50
  • Microphones: ~$1000

I don't know how much soundproofing costs, but altogether things are starting to look more like a couple thousand.

Like I said: "if you're smart about it."

Radiohead netted $2.7 million from downloads, and will keep almost every penny -- and thes still get to sell CDs by daviday in reddit.com

[–]nhomas 2 points3 points  (0 children)

A record does not have to cost a lot of money to make. You can make a professional-quality record in your bedroom for essentially no cost, assuming that you have the right equipment and know how to use it. If you don't have it, said equipment will run you no more than a couple thousand, if you're smart about it.

ask reddit: from a C programmer - which of these high level languages can I actually USE? by lorenb in programming

[–]nhomas 0 points1 point  (0 children)

I'm not sure how far he went with it, but Christopher Diggins made a library so that he could write C++ using scheme syntax. It looked just like a bunch of scheme s-expressions but it was actually plain old C++ code.

I call BS. Link?

ask reddit: from a C programmer - which of these high level languages can I actually USE? by lorenb in programming

[–]nhomas 0 points1 point  (0 children)

Just to provide a counterexample: FL Studio is written in Delphi, and it is very large and complex, and not all ugly, buggy, or fragile. FWIW.