Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Pike Scripting Language 56

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!"
This discussion has been archived. No new comments can be posted.

Pike Scripting Language

Comments Filter:
  • LP-MUD strikes back (Score:5, Informative)

    by Jouni ( 178730 ) on Friday December 27, 2002 @10:08AM (#4965759)
    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

  • Why can't Python.Org [python.org] look as clean and well-designed, instead of something circa-1995?

    Maybe that's why we can't get a damn Slashdot icon.


  • Mod -1 offtopic, but the Vikings are from Norway not Sweden right? Someone please correct me.

  • Faster than ever! (Score:4, Interesting)

    by Pathwalker ( 103 ) <hotgrits@yourpants.net> on Friday December 27, 2002 @11:00AM (#4966088) Homepage Journal
    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 [roxen.com] 3.3 [roxen.com]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.
    • There's also Caudium [caudium.net] 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.

  • I love c#, i hate microsoft.. there is a dilema(sp?) there.

    Now i can use something as easy as c# and be more and more m$ free.

    I love the mono project (http://www.go-mono.com [go-mono.com]) but we all know sooner or later m$ is going to blow them out of the water in court :(

    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.
  • ...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 [dmoz.org] site out for a list of programming languages [dmoz.org]. It's nuts!
    • ...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 [geocities.com] 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.
      • That's a great language features decision article you wrote. They were exactly the issues I faced when designing an interpreted language. I came to the conclusion that there was little point in creating one (except for interest's sake) because thousands had trod down that road before me making the same mistakes, and probably better designs in the end. In the end it is just a matter of syntactic preference.
        PHP is interesting because it has the syntax of javascript and the $variable syntax of perl/shell scripts. When you live inside quotes as often as you do in PHP the $variable style is often preferable and results in less typing. I had not considered a hybrid approach as you offered in your article: use the dollar variable prefix inside of quotes and drop the dollar variable prefix outside of quotes. Great idea.
  • 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.
    • With wich of the 193 meanings of "static" in C++ would you expect it to be consistent?
      • 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
        • 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.

          • 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.
            • 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.

              • 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.

    • by Anonymous Coward
      There was actually a discussion before the release about if the path to deprecating "static" should be initiated in this release. We ran out of time, so we didn't, but in the next release you'll probably get a warning if you use "static" instead of "protected". The latter has been a reserved key word for quite some time.
    • 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.


  • So, when does MS Pike come out?
  • 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
  • Pike on Cygwin? (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?
    • Building Pike on Cygwin is not (yet) supported as can be seen in Pikefarm [ida.liu.se].

      Currently the only supported way of building Pike on WIN32/WIN64 systems is through rntcl.
      Hmm... It does however seem like nobody has released such a binary yet.

      • 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.
  • Has anyone had luck getting Pike installed on Mac OS X(10.1.x)/Darwin(1.4)?
    • Pike 7.4 seems to compile and link fine on Darwin 6.3 according to Pikefarm [ida.liu.se].
      It also almost passes the testsuite, except for a 2 second sleep that slept 2.12 seconds (which may be due to load on the test machine).
      I don't know of any reason why it wouldn't work fine on Darwin 1.4.
      • Well, it doesn't seem to be able to find GMP with the standard Dev Tools installed. Downloading GMP from the GNU site, and building and installing it seems to have eliminated the problem, though it occasionally gets a few warnings.
  • php [php.net] cannot be pike
    and pike cannot be php

E = MC ** 2 +- 3db

Working...