ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi. I'm pretty-much sold on the whole "functional programming" paradigm, although I still have a lot to learn. Haskell was my first FP language, but recently I've been getting into Scheme as well (after not being quite satisfied with Common Lisp).
Anyway, I also happen to have access to several supercomputers. Unfortunately (and suprisingly) no FP languages are installed on these systems, but I thought perhaps I could pioneer something. But I need to pick an FP languages that is fairly simple, easy to get installed, and makes it fairly easy to work with existing OpenMP and MPI infrastructures. Scheme is fairly simple, stable, easy to install, but I'm not sure about OpenMP/MPI support. Haskell is not particularly simple, stable, or easy to install. Could Scheme work for this? Or should I be looking at another language? (Erlang...?)
I've been meaning to get around to learning OCaml, which was my choice of functional languages to learn back when I was researching which one to learn. As far as I know, there are MPI bindings for it.
A while back I actually started using functional programming in R and with C++ partial specialization without even knowing it, so I decided it was time to get into a functional programming language. Your thread reminded me of that goal, so now I need to actually do it before I forget again!
I actually changed my mind about OCaml, possibly for a silly reason. The source of this reason is that it includes hyperbolic trig functions (e.g. cosh,) but not their inverses (e.g. acosh.) When trying to figure out why that is, I found that not only does a search of the OCaml mailing list archive fail (to function properly); there is also no "search" feature for the OCaml bug tracker and feature-request system, so I have no idea if I'm the only one who's noticed the omission. The absence of those functions isn't itself a big deal (easy enough to define with logarithms.) It's a strange thing to have forgotten, and I hit nothing but dead ends when trying to figure it out. It's also seemingly impossible to join the beginners' Yahoo group to ask the question. If it's so much work to find an answer to this simple question, I can't imagine trying to get any real work done with the language.
Lately I've been wondering how hard it would be to make MPI bindings for scheme - I thought I might give it a try during my personal time. I see that the newer (non-legacy) version of Guile has dynamic FFI. It seems to work fine with simple functions from libm, though I'm not sure how tossing MPI multithreading into the mix will affect things.
I'm pretty hesitant about using any FFI. I think I'd rather write native bindings and get it right from the beginning, unless I'm absolutely certain I'll never need to use data structures with the API.
Right now I'm reading up on Haskell, and I think I'll go with that. Why do you say it isn't stable? What OS runs your cluster?
I'm pretty hesitant about using any FFI. I think I'd rather write native bindings and get it right from the beginning, unless I'm absolutely certain I'll never need to use data structures with the API.
At the moment, I don't have the slightest idea how I would go about that. Could you point me to the right documentation?
Quote:
Right now I'm reading up on Haskell, and I think I'll go with that. Why do you say it isn't stable? What OS runs your cluster?
Thinking in terms of the GHC compiler, there tends be a lot of differences involved between various versions of the compiler, such as base module structure changes and lots of extensions getting added. This is not so much an issue if you write your own code, and you write it intelligently. But if your code depends on other peoples' modules you are going to run into issues. For example, I once wrote a video game in Haskell that compiles fine in 7.4 or 7.6. However, half the modules I was depending on for important functionality would not build correctly under 7.6.
On the other question: I should probably emphasize that it properly cannot be called my cluster, as I have no administrative control over it. However, it is running CLE4.
At the moment, I don't have the slightest idea how I would go about that. Could you point me to the right documentation?
It all depends on the language, but the means of writing bindings says a lot about the language. For one, it really helps you understand what the language is actually made of. Usually it's helpful if you can write bindings in C because that means a vast number of libraries are or can be supported in that language. I've really only written bindings/extensions for R and Python, but I usually look into if/how C libraries can be supported in a language I'm thinking about learning.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.