Pike: A Language with Teeth

A quick history and some examples for using this popular European scripting language.

The body of this article is still being converted and will be available shortly.

______________________

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Pike: A Language with Teeth

Anonymous's picture

"Although it is not as full featured as Python

or Perl, it is full of useful aspects and has a relatively strong European user base."

Why ? Where ? What ? I don't think any of these languages has a feature that Pike does not. But Pike offers things that the others don't (for example lambda-expressions or a proper type system - things that are not available in Perl).

Re: Pike: A Language with Teeth

Anonymous's picture

yea.. i would be carefull with those perl guys..

they might have things you wouldn't even be able to think of (not that anyone really needs it..)

pike has one thing it really can be proud of:

speed.

Re: Pike: A Language with Teeth

Anonymous's picture

> Pike offers things that the others don't (for

> example lambda-expressions [...] things that

> are not available in Perl).

This is not correct. I do not know the syntax of lambda expressions in Pike. But you can convert

Lx.body

to

sub { my($x) = @_; body> }

in Perl. More exactly: Perl provides anonymous procedures in conjunction with lexical closures.

-- Andreas Borchert (borchert@mathematik.uni-ulm.de)

Re: Pike: A Language with Teeth

Anonymous's picture

Python has a Curses-module that I miss in Pike.
And it has a sound-module, which I don't know anything about.

Perl can be used in Pike-code, so Pike has all of it features ;-)

Re: Pike: A Language with Teeth

Anonymous's picture

The Caudium Group (Caudium.Net) are maintaining Pexts (PikeExtensions) - a set of modules implementing what's missing in Pike (or implementing it in the _right_ way). There's a both a curses and a newt module in there. You can check pexts from their CVS (Pexts cvs at sf.net).

A few Pike links

Anonymous's picture

For some more info about Pike, including some (very simple) sample code,
you can check out this site.

A recent web application done in Pike can be found
here.

Source samples garbled

Anonymous's picture

Too bad the formating of the source samples got botched somehow.

You can't have (true) newlines in pike string literals, you must use

"
" instead -- as in C.

Re: Source samples garbled

jhs's picture

Seems your comment got mangled too. :) (the " " should be a C-style "backslash-n" sort of.)

In fact, there is a construct in pike for strings with newlines in them too, though. You can write #"a string

that spans multiple lines in this fashion".

Re: Source samples garbled

Anonymous's picture

Waah! that bit me, too. Let's see if this works:

string a_string_that_ends_in_newline = "Foo!\n";

/* darn, it looked OK in the preview, using Plain Old Text mode! */