Please create an account to participate in the Slashdot moderation system


Forgot your password?
Check out the new SourceForge HTML5 internet speed test! No Flash necessary and runs on all devices. ×

Comment Re:More features. (Score 1) 184

If they are using a C++ compiler, they are likely using it to code in C (or FORTRAN).

So how much are they saving by rolling their own vtables instead of the ones the compiler will generate for them? How much smaller are their executables because they used #defines everywhere instead of templates? Does the fact that they use functions instead of overloaded operators really give them an edge, in terms of size or performance? Does ending every function call in "if (err) goto endx" really save space and time over having a single try-catch block somewhere?

Comment Re:More accessible alternatives? (Score 2) 156

It depends on exactly what you are after. Sedgewick has/had a few books called "Algorithms in C++/Pascal/??" that was decent light coverage. "Algorithms + Data Structures = Programs" by Wirth is pretty good, but I don't think it was ever translated out of Pascal. And the current modern approach is Google (I only recommend that one as a supplement).

P.S.: One of the Sedgewick books had several errors in the algorithms, so be sure you don't get the first edition.

Comment Re:The dumbing down is real (Score 1) 156

Well...there are partial orderings where the order can only be determined between parts of the covered domain, but global consistency is a requirement. I can imagine cases where time at which something was noticed was blended with the value of what was noticed which could yield contradictory interpretations if you ignored the time, and various other permutations.

The GPs actual claim is, as you say, rubbish, but it may be a simplified abstraction of an underlying true statement. (Or he could be a troll.)

Comment Re: Why not extend "Concrete Mathematics"? (Score 2) 156

Introduction to Algorithms by Cormen et. al. is a good book and covers part of the same space.

I do agree that he uses MIX more than is needed, but it's necessary for a part of what he covers. For other parts C would be a superior substitute. And while I keep several works on algorithms on my shelves, and rarely turn to Knuth, we something isn't covered well elsewhere, that's where I turn.

Comment Re:The "math" of AOCP very important in real world (Score 1) 156

Some of them *are* just like programmers. Others... well, be kind.

That said, all of the higher level languages tend to obscure computational complexity to the point where I can frequently only tell exactly which approach is better by measuring after writing the code in more than one way. Too much magic dust between the level at which I'm writing at and the level it compiles to. But I still think that to be a decent programmer you need to understand things like index registers, storage allocation, and probably accumulators, even though no current chip has them (at the assembler level...probably at the microcode level).

OTOH, if I'm working at the assembler level, then synchronizing thread data visibility is beyond me. (Well, so is most stuff. I haven't done assembler language programming on any modern chip. The last one was the Z80.)

But without the assembler background (MIX would count) you can't build a good mental model of C, and without a good mental model of a basic compiler language, you can't really understand a dynamically allocated vector (or array, depending on your language).

I'm not sure that starting at the top, Python/PHP/Ruby/Scratch/Logo/etc., and building your understanding down will ever work. I haven't seen any good examples. (OTOH, I've certainly seen examples of starting at assembler and then not being able to build up, so perhaps.)

It used to be said that a good programmer tried to learn a new language every year. But that was back when languages were both very different and small. Still, I'd recommend that any programmer work his way through some sort of assembler, C, Scheme, Erlang, and Java. C++ is too big to include. Ada and Eiffel would be good additions, but don't add anything really important. Smalltalk seems to be dieing out, but you should pick up the Scratch dialect, which shouldn't take as much as a week. If you want you could substitute Logo or Lisp for Scheme. The idea here isn't to really master the languages. Just to learn them enough to create something fairly simple, a bit beyond "Hello, World", but not necessarily as fancy as tic-tac-toe.

And anyone who does that counts as a "real programmer", even if they prefer to use Javascript or php...or even bash. Some others will also count as "real programmer", because being a "real programmer" is a matter in interest rather than skill or experience. An inclusive test isn't an exclusive test.

FWIW, I once taught someone to code in Fortran, and he went on to become a professional programmer, but he wasn't a "real programmer", because his interests were in business and astrology, not programming. He *was* a skilled programmer. He was quite intelligent. But that wasn't where his interests were, so he wasn't a "real programmer".

Comment Ah, the noble savage (Score 5, Funny) 128

Serene, peaceful, in tune with nature, never takes more than he gives... And wipes out numerous complete (and unique) species.

Considering that Europeans still have to suffer demands for reparation for such things as slavery, colonisation, and the crusades, one cannot help but wonder if a demand for compensation for the irreparable damage to the ecosystem made by the aboriginals is also possible.

Comment Re:Wyoming = big coal country (Score 3, Insightful) 425

Wind power in particular could also be a great way to ensure that grazing rights on lands are maintained, since there's no reason why a wind farm and ranching would have to be incompatible, and with the land already being several stages away from being pristine, no reason not to continue to leave grazing rights.

Comment Re:Good idea, bad name (Score 1) 151

There haven't been that many stories, but a few stories have gotten a large amount of publicity, often repeatedly. And there's selection bias, too.

This doesn't prove that it's an incorrect assumption that Tesla drivers try to get the car to drive itself. Just a week ago I saw an electric wheelchair jay walking diagonally across a four lane boulevard (official speed limit 35 mph) while the driver of the wheelchair was busily engaged in texting on their phone. But notice that nobody EVER claimed THAT was safe behavior. So if anything that's evidence that renaming the "autopilot" wouldn't help;

Comment Re:Remember when (Score 1) 54

You missed "it's faster than C!! Well, it will be faster than C in the future! Well, it will be faster than C once we have JIT. Well, it will be faster than C once JIT actually optimizes things as promised... Any day now..."

"The year is 2017, and Oracle launches the last of America's deep database probes. After his systems are unexpectedly frozen by garbage collection, Solaris 12 and its pilot Captain Larry 'Buck' Ellison are blown out of their trajectory into an orbit which freezes his life support systems, and returns Larry Ellison to Earth five-hundred years later."

Comment Re:One obvious improvement (Score 1) 186

I've got to disagree...though not totally. ISTM that overloaded operators need to be marked, rather than eliminated. I once suggested that overloaded operators be enclosed in pipe chars, e.g. |+|, but nearly any mark would do. And this be only used for operators. I also wanted to allow alternative symbols, names, etc. to be used for operators, but there I ran into the precedence problem

Comment Re:One obvious improvement (Score 1) 186

That old story again. You know what the + operator does? It adds two things together. How it does that is really none of your business.

You probably think that you know what happens when you write x + y. Well, you don't. It all depends on the type: if x and y are integer, an integer addition instruction is used. If they are floating point a floating point addition instruction is used. And if one is integer and the other floating point there is first a conversion, and then a floating point addition. If one is a pointer and the other an integer, there is a multiplication, an integer addition, and perhaps pointer normalisation (only on obscure architectures). So that simple '+' already means a lot of different things. Given you already have to deal with all that, I really don't see the problem for allowing addition for user-defined types as well, like BCD, or bignum, or complex, or matrix, or whatever.

Comment Re:Readability? (Score 1) 186

The language that's easy to read is the one you know well. I've used Python enough to think that it's easier to read than C or often C++ code that does the same thing. C's problems is indirections via multiple levels of pointers and macros. With C++ it is just that the language as a whole is too large, and I only know parts of it well, though it can include C's problems as well (but it doesn't need to).

Comment Re:The toxic community worries me. (Score 1) 186

I've looked at Nim a couple of times, most recently earlier this month. I didn't get much beyond looking, as I need various libraries as well as the basic language, but it did look interesting. If you only need one or two external libraries it might be worth your while to look at it more deeply than I did.

But I really doubt that their code generation averages as fast as decently hand-crafted code. But it may well be a lot faster to write.

Slashdot Top Deals

1 Mole = 007 Secret Agents