Slashdot Mirror


Pike Scripting Language

ulrikp writes "The vikings have done it again! The Swedes at Linköping University (home of the cool Lysator archives) have released a new version of their Pike scripting language. It is similar to C++ and C#, but is apparently more type-safe than either. It is interpreted, and runs on many OS's, including Linux, Solaris, and Windows. Check it out!"

23 of 56 comments (clear)

  1. LP-MUD strikes back by Jouni · · Score: 5, Informative
    Just a bit of trivia; the Pike language is based on LPC which was the language designed to drive LP-MUDs, after its creator Lars Pensjö. The language is easy to pick up and robust - I like to think of it like object oriented C with better string handling.

    The MUD systems built with the language are very interesting as well; they generally have a central "game driver" object that handles the game objects and their heart beats with an internal call queue approach. This was guaranteed to keep the world and objects "live" at all time even if some of them failed. It was very common to have new areas being built on MUDs while the game was running, new objects being coded and recompiled on the fly.

    Most of the MMORPG games built today have nowhere near this level of sophistication that MUDs reached back in the 80's. Maybe some of them would do well to look at Pike. :-)

    Welcome back, LPC! We missed you!

    Jouni

    --
    Jouni Mannonen | Game Designer, Consultant
  2. Re:Check the license! by Pathwalker · · Score: 3, Insightful

    So being able to take your pick of the GPL, LGPL, and MPL is not free enough for you?

  3. Re:great looking website by greenhide · · Score: 2

    Yeah, but check out the University's webpage! Maybe it's just my browser (Chimera), but the text is so small, it's unreadable!

    --
    Karma: Chevy Kavalierma.
  4. Faster than ever! by Pathwalker · · Score: 4, Interesting
    For me, the big improvement is this:
    On systems with IA32, SPARC or PPC32 processors Pike can use native machine code as byte code. This byte code can then be executed directly outside the virtual machine and give a ~30% performance boost compared to the old byte code.


    Hopefully the last few bits of code in Roxen 3.3 that keep it on Pike 7.2 should be cleaned up soon. The last time I tried running the CVS version of Roxen on Pike 7.4, I only had problems with logging.
    1. Re:Faster than ever! by peter+hoffman · · Score: 2

      There's also Caudium which is a fork of the Roxen 1.3 code base. Version 1.3 runs with Pike 7.4.

      Anyone who likes AOLserver but not Tcl should look at Roxen (and/or Caudium) as they are both single process multi-threaded web servers with built-in scripting.

  5. Re:Am I missing something in the title of this. by wilhelm9 · · Score: 2, Informative

    The vikings originated from the entire scandinavian peninsula including Denmark. The difference is that the eastern vikings mostly traded eastwards on the rivers of todays Russia, while the the vikings from todays Norway travelled westward on the Atlantic Ocean.

  6. Re:Excellent Mwhaha ;x by ++good-duckspeak · · Score: 2, Funny
    This is so similar to c#! I love it. C++ and C are too time consuming, Java blows ass, c# is a happy medium. C# is the perfect mix of RAD and Power IMHO.

    Way to be insensitive. Some of us have no choice but to use C. I've heard conditions at other shops are so bad that the developers are forced to use Java.

    --
    Why is Triangle Man so MEAN?
  7. Re:Am I missing something in the title of this. by Neck_of_the_Woods · · Score: 2


    Sweet, thanks for the clarification.

    --
    Neck_of_the_Woods
    #/usr/local/surf/glassy/overhead
  8. Never ceases to amaze me... by runswithd6s · · Score: 2

    ...the variants of programming languages available to us. Just when you think you've got your "favorite" language pegged, along comes another to tempt and tease you. Just check out the dmoz.org site out for a list of programming languages. It's nuts!

    --
    assert(expired(knowledge)); /* core dump */
    1. Re:Never ceases to amaze me... by Tablizer · · Score: 2, Interesting

      ...the variants of programming languages available to us. Just when you think you've got your "favorite" language pegged, along comes another to tempt and tease you.

      I think the problem is that everybody has their own preferences which no one language can match (it is a combinatorial problem). Thus, they make their own. I once set out to document most of the key decisions in building a scripting language. Of course I have my own pet draft language also :-)

      I wonder if it would be possible to set a bunch of option switches/selectors based on the possible features like those in the above link, and one can then make themselves a language close to their heart just by setting parameters. IOW, a fully configurable interpreter. Now *that* would be an impressive programming feat.

  9. Gartuitous, annoying differences by pauljlucas · · Score: 2
    After browsing the documentation, there seem to be several gratuitous differences. One of the most annoying I came across is the meaning of "static" for a class:
    This means that this member variable or method is only available to methods in the same class, and in subclasses (static in Pike does not at all mean the same thing as static in C++. Instead, it is similar to protected in C++.)
    So why not use protected and spare developers the confusion? Differences just to make your language different are bad.
    --
    If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
    1. Re:Gartuitous, annoying differences by __past__ · · Score: 2

      With wich of the 193 meanings of "static" in C++ would you expect it to be consistent?

    2. Re:Gartuitous, annoying differences by pauljlucas · · Score: 2

      Learn to read: I said that protected should have been used instead of static, i.e., that protected should be consistent. There is only one meaning for protected

      --
      If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
    3. Re:Gartuitous, annoying differences by grubba · · Score: 2, Informative

      The reason is historical. The static keyword was inherited from C at a time when there was a one class/file limitation in the compiler. The interpretation was then similar to the interpretation of static for global symbols in object files.


      NB: It wasn't until late 1996 there was a syntax in Pike for having multiple classes/file.

    4. Re:Gartuitous, annoying differences by Salamander · · Score: 2

      Lighten up. The grandparent was at least half a joke, and I - like anyone who has grumbled in the past about C/C++/Java's overloading of one reserved word to mean many different things - found it pretty amusing.

      There is only one meaning for protected

      Really? Consider the following:

      class foo: protected bar {
      protected:
      int ugh;
      };

      Note how the two occurrences of "protected" don't have anything like the same meaning. As I just said, this overloading of reserved words is annoying, and deserves to be made fun of.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    5. Re:Gartuitous, annoying differences by pauljlucas · · Score: 2
      Note how the two occurrences of "protected" don't have anything like the same meaning.
      They mean exactly the same thing. Go read a C++ book.
      --
      If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
    6. Re:Gartuitous, annoying differences by Salamander · · Score: 2

      Piss off. I've read 'em, they say exactly the opposite of what you're saying. You're just one of those people who can never admit you're wrong.

      --
      Slashdot - News for Herds. Stuff that Splatters.
    7. Re:Gartuitous, annoying differences by pauljlucas · · Score: 2
      I've read 'em, they say exactly the opposite of what you're saying.
      Then either (a) you've been reading the wrong thing or (b) you don't understand what you're reading.
      You're just one of those people who can never admit you're wrong.
      I do admit when I'm wrong, but I'm not wrong in this instance.

      protected means that only derived classes have access. Protected inheritance means that only derived classes can do the conversion from derived to base class, i.e., they have knowledge of the inheritance and, to them, it's treaded just like public cinheritance.

      Protected data members or members functions means that only derived classes can use them.

      Hence, protected means exactly what I said: only derived classes have access, i.e., one meaning of protected.

      Sorry if you don't understand the answer, but that is the answer. Your understanding is not required for it to be correct.

      --
      If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
  10. Haven't seen this question by Quill_28 · · Score: 2

    Why would I want to use Pike?

    It's fast(for scripting language)
    It's OOP's.
    It's multi-platform.

    Anything else?

    Does it excel at any one area or is it just better(why?) than the other scripting language out there.

    Or was this just a college project and they wanted to share?

    Not trying to troll here, just curious

    1. Re:Haven't seen this question by eMBee · · Score: 3, Interesting
      it is typed.

      i don't think any other scripting language offers type checking.


      greetings, eMBee.

      --
      Gnu is Not Unix / Linux Is Not UniX
  11. Re:Excellent Mwhaha ;x by torpor · · Score: 2

    Hey man, back off on C.

    --
    ; -- the corruption of government starts with its secrets. a truly free people keep no secrets. --
  12. Pike on Cygwin? by truth_revealed · · Score: 2, Informative

    I can build and run Pike okay on Linux, but building on Cygwin complains about unresolved externals (shmget and other shm* functions). I then #undef'd the appropriate code in memory.c to disable shared memory support, and re-make. Pike.exe appears to link without errors or warnings but the final pike.exe is not functional. All pike scripts appear to run, but do nothing and print no error but the shell returns "10" when queried via echo "$?".
    Any ideas?
    Is Pike supported on Cygwin?

    1. Re:Pike on Cygwin? by truth_revealed · · Score: 2

      Thanks for the info. The Pike platform build success grid does not look very encouraging for platforms other than IA32 Linux. Too bad - Pike is an excellent language - much better and faster than any interpreted C-like language I have used. Pike also appears to be roughly 2 to 4 times faster than Perl 5.x and all free ECMAScript implementations. I'm a Pike convert. I'll hack on Pike under Cygwin disabling stuff until it works. I suspect that disabling native code generation might do the trick.