On Wed, Jul 23, 2014 at 6:49 AM, Guillaume Collet <bilouweb@free.fr> wrote:What platform?
> First, I need to install Pike... I didn't got it work.
There's been a new 7.8 release made, but currently there's no Windows
installer for it. You can still use 7.8.700 on Windows:
http://pike.lysator.liu.se/pub/pike/all/7.8.700/Pike-v7.8.700.msi
On Linux, I like to build my own Pike from source. (This is partly
because I have a few patches which haven't yet been accepted into the
core - preventing some obscure segfaults in GTK2, mainly.) You can get
Pike from several distros' repositories, or you can fetch the source
and build, whichever you're more comfortable with.
On a Mac, I'm not sure what's best to use. I have an unofficial build
that includes GTK, or you can use the prebuilt 7.8.700, or you can
build from source as with Linux.
http://pike.lysator.liu.se/download/pub/pike/all/7.8.700/
Cool!
> But after that, I will try to write some bioinformatic codes of my own,
> currently in C++
> I want to see if I can get better performances with Pike.
>
> But the web server side is also interesting... in fact, I think I will try a
> little bit of many things ;)
You probably won't get better performance with Pike than with C++, but
you may well get something comparable. Pike's more similar to Python
than to C/C++; it's a high level language, designed to be easy to
write reliable code in. It might well not run faster, but it'll be a
LOT faster to get something that won't crash - for one thing, Pike
takes care of memory management. You can simply work with strings,
instead of allocating buffers and making sure you have enough room.
And strings store Unicode, not just bytes; important in today's
international world. Integers store arbitrary precision, so you'll
never have to worry about wraparound. Arrays are real things that can
be passed around; so are mappings, which are like std::unordered_map
(I think; I never used unordered_map much), and multisets. Functions
are first-class objects too, which is HUGELY helpful.
Here's a handy reference for the object model Pike uses. It's written
about Python, but the two follow the same structure.
http://nedbatchelder.com/text/names.html
It's cheap and fast to pass objects around, nothing gets copied unless
you ask for it.
ChrisA