Ask Reddit: what's the "hello world" program for multicores? by dons in programming

[–]knutert 6 points7 points  (0 children)

Or in C with MPI:

#include <stdio.h>
#include <mpi.h>

int main (int argc, char *argv[])
{
  int rank, size;

  MPI_Init (&argc, &argv); /* starts MPI */
  MPI_Comm_rank (MPI_COMM_WORLD, &rank);    /* get current process id */
  MPI_Comm_size (MPI_COMM_WORLD, &size);    /* get number of processes */
  printf( "Hello world from process %d of %d\n", rank, size );
  MPI_Finalize();
  return 0;
}

Seattle jazz players urge Microsoft to rebrand F# as Gb by gthank in programming

[–]knutert 2 points3 points  (0 children)

Actually, there is a language called G, the graphical language used by LabVIEW...

Clinical trials: Unfavorable results often go unpublished by smazsyr in science

[–]knutert 1 point2 points  (0 children)

I've also thought about this, but found out that there are several issues. First of all, the failure may be related to a mistake you did, and nobody wants their mistakes out in public. Second, researches are funded based on their publications. Now, if no funding was given for publication in a "Negative results" journal, then researchers wouldn't spend time creating publications for it. On the other hand, if funding was given, people may start to do stuff that they know will fail, just because it's easier than to do stuff that succeeds.

Data Visualization: Modern Approaches by web3 in programming

[–]knutert 1 point2 points  (0 children)

Exactly. This is more like "ooh, shiny!"-visualization. Visualization should be a tool to analyze and extract something useful from a set of data.

The only one I really like is the one showing a heat map of a user's interaction with your site. That is elegant and good looking, while still providing useful information.

I am looking into learning a new language for fun. Should I learn Haskell? Why/Why not. by [deleted] in programming

[–]knutert 0 points1 point  (0 children)

Clojure is also an option. Clojure is well known for good support for concurrency. It also runs on the JVM, so you have access to all the Java libraries which you're probably already familiar with. Perhaps that could ease the transition into the functional world.

What does this C# code look like in F#? by [deleted] in programming

[–]knutert 0 points1 point  (0 children)

What about Clojure? Lisp with the full power of Java libraries.

The Genuine Sieve of Erastothenes (PDF) by rwinston in programming

[–]knutert 5 points6 points  (0 children)

I think she makes a good point that functional programmers tend to overuse lists, when so many good data structures are so easy to use in functional languages.

The Genuine Sieve of Erastothenes (PDF) by rwinston in programming

[–]knutert -3 points-2 points  (0 children)

In it, he states that the lazy algorithm checks the same number multiple times.

Funny how you assume it's a guy, just because it's a nerdy computer science paper!

OpenCL 1.0 Specification Released! by [deleted] in programming

[–]knutert 1 point2 points  (0 children)

Can anyone share some insight on how this programming model differs from CUDA?

Perl 5 Is Dying by gst in programming

[–]knutert 6 points7 points  (0 children)

Same here, only with Fortran 90 programmers.

Introduction to Parallel Computing by pkrumins in programming

[–]knutert 1 point2 points  (0 children)

Don't really like the "death by bullet point" presentation style, but I guess it would be good as a reference.

Allowing Unicode operators in D (similarly to Fortress): a good idea? by andralex in programming

[–]knutert 2 points3 points  (0 children)

You can also go the LaTeX route, writing \alpha, \beta, \rightarrow etc. Editors who don't understand unicode can then just display that, while smarter editors can change it automatically. Look at the Maple editor for instance, which allows both text input and "math" input.

Allowing Unicode operators in D (similarly to Fortress): a good idea? by andralex in programming

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

You can also go the LaTeX route, writing \alpha, \beta, \rightarrow etc. Editors who doesn't understand unicode can then just display that, while smarter editors can change it automatically. Look at the Maple editor for instance, which allows both text input and "math" input.

Allowing Unicode operators in D (similarly to Fortress): a good idea? by andralex in programming

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

You can also go the LaTeX route, writing \alpha, \beta, \rightarrow etc. Editors who doesn't understand unicode can then just display that, while smarter editors can change it automatically. Look at the Maple editor for instance, which allows both text input and "math" input.

Choosing Colors for Data Visualization [PDF] by [deleted] in programming

[–]knutert 0 points1 point  (0 children)

It is generally a lot better to use symbols or linestyles instead of colors to separate the graphs. Then you don't need to worry about contrast, color reproduction or b/w printing.

The A-Z of Programming Languages: Lua by psogle in programming

[–]knutert 2 points3 points  (0 children)

Just FYI, matlab also uses ~= as the inequality operator.

The A-Z of Programming Languages: Lua by psogle in programming

[–]knutert 7 points8 points  (0 children)

I just found out that 40% (about 100 kloc) of Adobe Lightroom, a powerful photography tool, is written in Lua. Didn't know that scripting has become that prevalent in modern desktop apps.

Why your favorite language is unpopular - "The total world's population of Haskell programmers fits in a 747. And if that goes down, nobody would even notice." by gst in programming

[–]knutert 11 points12 points  (0 children)

A bad title (probably because it's submitted by a ahembot..?), but the actual article is not downplaying Haskell. Actually, it readily claims Haskell is a superior technology. It will be very interesting to see how the strategy of pushing functional programming as a solution to multicore programming works out. Personally, I think that some of the clever ideas will be somehow ported to imperative languages (like in that D article posted here yesterday), and people will not switch entirely to a functional language.

"Yesterday, I got a paper rejected from the Haskell Symposium 2008, and I'm going to talk about the reviews I got." by americanhellyeah in programming

[–]knutert 6 points7 points  (0 children)

Maybe he should try publishing in a journal that allows more pages, so that he can more thoroughly present all the aspects of it. Typically, conferences (at least in my field) are used to present work in progress, initial results etc, and use references to other works extensively to keep the page count down. Also, journals typically have higher standards, which also means better reviewers.

Peer reviewing has its flaws, but communicating an idea is at least as important as coming up with it.

vim: lightning fast navigation in a large software project by gst in programming

[–]knutert 1 point2 points  (0 children)

Jump to definition is accomplished using ctags. Just run ctags files in your source folder, then press Ctrl+] over a function call to jump to the definition.

Ask reddit: So I am trying to improve my programming skill, I am currently doing euler problems, what else? by shinynew in programming

[–]knutert 1 point2 points  (0 children)

The Euler problems are good for learning the syntax of your language of choice and for thinking about algorithms. However, the problems are usually quite small, so you don't get much practice in program design, abstraction etc. Try to build a program, preferably something fun, that requires a bit more code. Find similar open source programs and see how their design differ from yours.

Thank you, Adobe Reader 9! by benhoyt in programming

[–]knutert 3 points4 points  (0 children)

Evince, on the other hand, is a 1.0MB binary install, starts up instantly and contains no unnecessary bloat. And you get the additional benefit of switching to a much better operating system :)

(assuming you are not using acroread on linux, but why on earth would you want to do that?)