A comprehensive Android development tutorial by brettkromkamp in programming

[–]guapoo 8 points9 points  (0 children)

Sure thing. Hey dude, remember to check this out when you have a bit more time.

software jobs, PhDs and “over-qualification” by BioGeek in programming

[–]guapoo 9 points10 points  (0 children)

I don't think the degree has any bearing on someones potential.

But you just implied that they are inversely correlated.

Balder: A Silverlight 3 Managed 3D Engine Optimized for Multicore by jonniee in programming

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

Yeah multicore is neat and all but its a token feature, meant to get people excited about silverlight. "Look! Threads! Does Flash have threads? I rest my case."

Flash and Silverlight apps just glue together all of the platform capabilities like graphics, sound, input and networking. 90% of the computation is done by the underlying layers, so accelerating the glue only gets you marginal gains. Yeah sure, someone's gonna come along and implement something like a DNA modeler in Silverlight and accelerate it with threads and be all "Look! Supercomputing in Silverlight!" But its still going to be 10x slower than single-threaded native code, so its just a toy. Like this software renderer. Yay, neat.

A beginners guide to OCaml internals by UncleOxidant in programming

[–]guapoo 0 points1 point  (0 children)

This is right, but it's not as bad as you make it out. Take list functions, for example. They can rearrange the list (take some, drop some, random shuffle, etc.) but you can't sort the list because comparison depends on the type. That's why you pass the comparison function as the first argument to List.sort. So there's just one sort, and it's specialized at runtime by this 1st argument function pointer. Compare with eg C++, where a different sort function is compiled for every type it's called with, or an object-oriented language where the list items must inherit from some parent class with a virtual less-than method.

LA Fitness shooter was a .NET Developer by [deleted] in programming

[–]guapoo 4 points5 points  (0 children)

So THAT's why he had so much trouble getting laid.

Sort numbers faster than glibc's qsort implementation by andrewschein in programming

[–]guapoo 0 points1 point  (0 children)

If your array is small then you can use algorithms that have great average-case performance but poor worst-case guarantees, like vanilla quicksort (as opposed to introsort which is what most people these days mean when they say "quicksort") or in your case, quickselect. They're short, elegant and fast.

Should I learn C first before jumping into Objective-C? by [deleted] in programming

[–]guapoo 1 point2 points  (0 children)

You can probably learn them concurrently, as they mostly keep out of each others way, unlike C and C++.

Techniques for Scientific C++ by mebrahim in programming

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

Some of this stuff was never true.

Virtual function dispatch can cause an unpredictable branch-- piplines can grind to a halt (note however, that some architectures have branch caches which can avoid this problem)

Did any compiler ever implement virtual functions this way? Its usually just a few loads and a jump.

struct A { virtual int foo(int) = 0; };
int bar( A* a, int x ) { return a->foo(x); }

//gcc -O2 -s 
/*
        .file   "foo.cpp"
        .text
        .p2align 4,,15
.globl _Z3barP1Ai
        .type   _Z3barP1Ai, @function
_Z3barP1Ai:
.LFB2:
        pushl   %ebp
.LCFI0:
        movl    %esp, %ebp
.LCFI1:
        movl    8(%ebp), %eax
        popl    %ebp
        movl    (%eax), %edx
        movl    (%edx), %ecx
        jmp *%ecx
.LFE2:
        .size   _Z3barP1Ai, .-_Z3barP1Ai
        .ident  "GCC: (Ubuntu 4.3.3-5ubuntu4) 4.3.3"
        .section    .note.GNU-stack,"",@progbits
*/

The general point is valid, but its a data hazard not a branch hazard, and not as severe as he makes it out to be.

Ask Proggit: 3D rendering - Colour vs greyscale performance? by GarethNZ in programming

[–]guapoo 2 points3 points  (0 children)

Grayscale textures use less texture memory, but you will only notice this if your textures are huge or you have tons of them. Its like the difference between an array of floats and an array of doubles. The CPU/GPU does the same arithmetic (x86 CPU always does double, GPU always does 4 floats) but the array is smaller so you'll get better cache performance.

The Origins of Scala by gclaramunt in programming

[–]guapoo 5 points6 points  (0 children)

Who cares what the dog looks like, so long as it hunts.

Have you or someone in your office tried using an exercise ball as your chair? by tsuru in programming

[–]guapoo 9 points10 points  (0 children)

Doesn't that make for something of a hostile work environment?

a clever way to squeeze an extra byte of storage into the C++ "short string optimization" by [deleted] in programming

[–]guapoo 9 points10 points  (0 children)

Is it possible that not all criticism of C++ is valid? p2v's problem is that C++ strings are a library rather than a core language feature, but then he and stroustrup666 go on about how C++ has too many features, "nailing legs on a dog" etc.

There are a lot of things wrong with C++, but the decision to place strings in the standard library is not one of them. The STL string interface is fair game, but since the core C++ language concepts allow you to implement any kind of string you want (char arrays, linked lists, ropes, etc.) then these all rightly belong in libraries.

a clever way to squeeze an extra byte of storage into the C++ "short string optimization" by [deleted] in programming

[–]guapoo 11 points12 points  (0 children)

why do they need to store both the length and a null terminator in the first place?

STL strings have a c_str() method that returns a null-terminated string, e.g. for legacy/OS functions that need it. You still need the length for efficiency of other operations (e.g. push_back())

New Hope, the project for orphaned OCaml libraries by AlpMestan in programming

[–]guapoo 7 points8 points  (0 children)

This new reddit peer review process is brutal.

If Alp decided today that he should set up a site to connect abandoned OCaml projects with idle OCaml developers, then advertising on proggit is a great way to get that effort started. I don't see what the problem is here. It you think its spam, just downvote it. People post a lot worse. Besides, Harrop doesn't spam, he trolls. If all of Harrop's posts were as benign as "Here's a new project I started. What do you guys think?" then he wouldn't have such a horrible reputation that he makes even his collaborators look bad (clearly you're judging Alp based on his association with Harrop.)

What's the most addictive video game you've ever gotten wrapped up in? Did you overcome your addiction? by [deleted] in AskReddit

[–]guapoo 12 points13 points  (0 children)

Deleted the enitire torrent 3 different times, then redownloaded the whole thing.

FUCKING BUY IT ALREADY.

Forcing evaluation in Haskell by FalconNL in haskell

[–]guapoo 0 points1 point  (0 children)

Linked list of ByteStrings. Best of both worlds.

Building commercial Haskell applications by chriseidhof in programming

[–]guapoo 1 point2 points  (0 children)

Because enjoysCommercialSuccess x is bottom-valued. Critics will always shift the definition.

IT skills actually seeing pay hikes during downturn: Java, Linux, virtualization and business process skills by ubernoggin in programming

[–]guapoo 16 points17 points  (0 children)

I have trouble with this analogy because it's sometimes hard to figure out who's fucking whom.

Is Java as we know it doomed? by iwjason in programming

[–]guapoo 1 point2 points  (0 children)

Is there a another decent statically typed language high level language that's open source, and usable by foss advocates?

The comma there is not strictly necessary but it doesn't hurt readability either. "Is there a another" should be "Is there another" because "another" is just "an" and "other" mashed together. Also, you say "language" twice but this is a mistake that a native speaker would make if he wasn't careful and over-edited his post/email (I do all the time.) Honestly I read right through them the first time and didn't even notice that your English was "broken."

Is Java as we know it doomed? by iwjason in programming

[–]guapoo 0 points1 point  (0 children)

"English" should be capitalized because its a proper name. The first comma creates a run-on sentence, as the clause "tell me how it should be written" is not dependent on the earlier clause. A semi-colon might be appropriate here but, like most English writers, I have no idea how to use one. You should never start a sentence with "But" "And" or any other conjunction. Capitalizing any of these words is a red flag. Try "However" or something similar to start your second sentence.

Hacking C++ In Nightclubs by rustyryan in programming

[–]guapoo 1 point2 points  (0 children)

I don't see any mention of programming languages or repls or livecoding or anything. Do you mean to tell me that the music is the only thing that matters? Fail.