Slashdot Mirror


Thoughts On The Pike Programming Language?

bilboyablan asks: "Ive stumbled upon the Roxen Web server , mostly implemented in the Pike programming language. I got curious about Roxen, but even more about Pike, and it seems to me like a quite solid scripting OO language, with a C-like syntax, and with a quite good documentation (user manual) to boot. So it seems intriguing to me why Pike hasnt gotten a wider acceptance. So, if some of you fellow Slashdotters have had any experience with Pike (outside of Roxen), could you maybe drop a few lines on it? "

235 comments

  1. Pike? by stevarooski · · Score: 1

    Ok, moment of honesty: I've never heard of it. Could someone please post some information? Or some urls? Any alternative to perl (which I DO use a lot and appreciate, but. . .) would be most welcome.

    -S

    http://students.washington.edu/steve0/
    steve0@u.washington.edu

    --

    - - - - - - - -
    Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
    1. Re:Pike? by ZxCv · · Score: 2

      Pike is definitely a very good alternative to Perl-- much better OO, socket support, (easy) threading, support for a good number of platforms, and IMHO is easier to pick up than Perl. I think the homepage is at http://pike.idonex.se, but I know its on Freshmeat too.

      --

      Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
    2. Re:Pike? by stevarooski · · Score: 1

      Thanks! -S

      http://students.washington.edu/steve0/
      steve0@u.washington.edu

      --

      - - - - - - - -
      Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
    3. Re:Pike? by the_other_one · · Score: 2

      The whole thing sounds fishy to me

      --
      134340: I am not a number. I am a free planet!
  2. Pike with Gtk bindings by moibus · · Score: 4

    Pike has Gtk bindings too and my (limited) experience with them has been good. Seems like a pretty cool language. There's a good Pike resource site at http://www.pike-community.org/.

    --
    -moibus http://moibus.jfm.net/
  3. Yeah, but what does it have to offer? by ZanshinWedge · · Score: 2

    Sure it's decent, but what does it have that's special? Learning any new language is a significant investiture of resources and time, and if there's nothing special about it, why spend the time? Might as well spend the time learning something new that you know is "bankable".

    1. Re:Yeah, but what does it have to offer? by moibus · · Score: 3
      How will you know until you investigate? It used to be that only M$ was "bankable" in terms of OSes. I'd hate to think what would have happened if noone just went and played with new stuff. Seems to me that an OO C-like scripting language with Gtk and lots of other bindings and modules is pretty interesting at least on the surface.

      Python offers alot of OO features but has a limitation I can't deal with: it considers indentation as syntax. Pike might make a better language for OO scripting than Python given its syntax.

      The point is that it's worth looking at and that innovation and new ideas, even if they turn out to be lame, shouldn't be swept under the carpet because "we've already got one of those." I would much rather see a discussion of the actual features of the language than questions like "what's the point?"

      (BTW I have no interest in Pike other than it looks pretty interesting and appears to already have alot of useful features)

      --
      -moibus http://moibus.jfm.net/
    2. Re:Yeah, but what does it have to offer? by Anonymous Coward · · Score: 1
      Python offers alot [sic] of OO features but has a limitation I can't deal with: it considers indentation as syntax.

      Why do you consider this a limitation?

      You should be indenting your code consistently anyway...it makes it much easier for other people to see exactly what your code does with only a glance.

      So why bother with braces as well? If you are indenting your code, why not just use that to indicate levels of code?

      I occasionally forget a closing brace in C/C++/Perl code. It's a pain in the ass to track down. The compiler gives you an ever-so-helpful message like ``Unexpected EOF''. You basically have to go through all of the changes you've made...with the levels of indentation, that can't happen. That's good.

    3. Re:Yeah, but what does it have to offer? by Jeffrey+Baker · · Score: 2

      That, or you could get an editor that is smart enough to match braces.

      If two braces match at different indentation levels, therein lies your bug (probably).

    4. Re:Yeah, but what does it have to offer? by davidhedbor · · Score: 4
      To mention a few things:
      • C-like syntax. Not a very important point, but when it comes to learning the language it's much easier than say Perl if you come from a C/C++ background. It's basically a highly evolved LPC (of LPMUD fame).
      • A very powerful Image package. Can load tons of formats natively including Photoshop (psd) and Gimp (xcf). Used by Roxen to do all kinds of graphics generation on-the-fly.
      • Powerful datatypes - mappings, multisets, shared strings. Nothing unique, but Pike's are very scalable. Also string handling is rather powerful.
      • Integrated bignum support. Pike 7 can handle arbritrary size integers without any special effort from the programmers point of view.
      • Very good and easy to use socket handling. Not strange since the main app written in Pike is a webserver.
      • Good object orientation, easy-to-use abstracted database handling, very nice GTK bindings and lots of more things I have forgotten about etc.

      Now to some drawbacks - we all know that everything isn't all good.

      • Shared strings, and datatypes in general, does have a memory overhead. Usually not noticable but if you deal with LOTS of short strings for example, you'll notice it. Nothing really unique to Pike though, but it's worth mentioning.
      • Not very wide spread usage and historically not very well documented. There are no Pike books, but there is a good tutorial now (check out http://docs.roxen.com).
      • Slower than C - can't be avoided. Slower and faster than Java (depending on what you do), sometimes slower than perl. Unfortunately I have forgotten the URL to the site that had benchmarks.
      • Less mature than some other languages. Syntax still changes, although backwards compatibility usually isn't major problem.
      • More things I'm sure. I just can't think of anything right now.

      I hope this is helpful.

    5. Re:Yeah, but what does it have to offer? by FFFish · · Score: 2

      "...but it [Python] considers indentation as syntax..."

      Oh, GET OVER IT ALREADY!

      My god. So it uses indents. So fscking what?

      [rant on]
      Unless you're the type of useless programmer who should be taken out back and shot for writing a mishmash of mal-indented code that is so visually inconsistent that no one wants to maintain your shit, you're already using whitespace that already is syntax -- visual syntax for your brain to keep track of your structures.

      I suggest that anyone so tightassed that they can't cope with whitespace as syntax is someone who no one would want on a project team, because the collision of formating styles will cause conflict.
      [rant off]

      My god. What some people will whinge on about!

      --

      --

      --
      Don't like it? Respond with words, not karma.
    6. Re:Yeah, but what does it have to offer? by FFFish · · Score: 2

      That, or you can get an editor that is smart enough to indent. Or convert braces to spaces.

      I mean, really, of all the things to not like about Python (lack of static typing, even as an option, which makes errors in variable assignments an all too easy mistake, for example), whitespace is the silliest of all possible protests against the language.


      --

      --

      --
      Don't like it? Respond with words, not karma.
    7. Re:Yeah, but what does it have to offer? by Anonymous Coward · · Score: 1

      Pick one:

      1. 1) Mydol
      2. 2) A bowl of hot steaming grits down your pants
      3. 3) Some of that $4 crack that the moderators smoke.
      Because you definitely need at least one of the two, but I'm not sure which.
    8. Re:Yeah, but what does it have to offer? by Amphigory · · Score: 2
      You complain about the fact that Python uses indentation for syntax. From this, I conclude that you are not a Python programmer, since I have NEVER heard someone who had actually written more than 50 lines of Python complain about the indentation.

      It's not a bug, it's a feature.

      --

      --
      -- Slashdot sucks.
    9. Re:Yeah, but what does it have to offer? by jacobm · · Score: 3

      Sorry, you just triggered my pet-peeve-o-meter. Nothing personal.

      The phrase 'X is the most of all possible Y' is, err, the most annoying of all possible figures of speech. :) How can you possibly say that "whitespace is the silliest of all possible protests against [Python]"? Sure, it's a pretty silly protest, but the silliest possible? That's pretty severe, don't you think? In fact, there are much sillier complaints about Python, I'm sure. In fact, I think I'll take your post as a challenge to think of sillier arguments, and I accept. Here's a list:

      Top Ten Sillier Things than Whitespace to Protest About Python

      10. Using a language called 'Python' might give people a cavalier attitude towards snakes.
      9. Python might not be Y2K compliant.
      8. Object-oriented languages suxXxor. You have to use dots all over the place.
      7. The Python interpreter doesn't automatically call the C preprocessor- you have to do it yourself.
      6. Python is Turing-complete. I hate that!
      5. MSVC has no idea how to compile it- can this possibly be a good language?
      4. Clearly it was a language designed by perverts. 'Hey baby, wanna program my Python?' Sickos.
      3. How could a guy named Guido possibly come up with a good language?
      2. The way the code looks reminds me too much of CLR. Bad memories, man.
      1. By taking a perfectly good language and naming it 'Python,' that's one less language that might become popular that could be called 'Ninja.'

      So whitespace is, at the very most, the eleventh-silliest possible complaint against Python. There may be others- could it be possible that the set of complaints about Python has no silliest element? Further research into that topic is necessary, I think. (As is research into how this post relates in any way to what I think about Pike.)
      --
      -jacob

      --
      -jacob
    10. Re:Yeah, but what does it have to offer? by moibus · · Score: 1
      How is this on topic? The point of my post had nothing to do with Python. The fact that I dislike Python due to its use of whitespace as syntax is completely irrelevant to Pike. It was an illustration. Don't get so bent out of shape.

      Now with regards to Python and whitespace, the indentation issue is one of the _first_ things that keeps me from writing code in Python. Therefore I mention it. Is it the only thing I don't like? No. It is the most important? Probably not. It just happens to be the first one I think of. My post wasn't a litany of gripes about Python, it was an exhortation to people to actually explore new languages before tossing them aside. The point stands, regardless of Python gripes.

      Get a grip.

      --
      -moibus http://moibus.jfm.net/
    11. Re:Yeah, but what does it have to offer? by elflord · · Score: 2
      How will you know until you investigate?

      Why should he even bother investigating unless someone can explain what it has that other languages don't ?

      Python offers alot of OO features but has a limitation I can't deal with:

      Looks like you haven't tried very hard.

      it considers indentation as syntax. Pike might make a better language for OO scripting than Python given its syntax.

      If it really doesn't have anything over python except a different style of syntax, I don't think I'll even bother. "Like Python but with different syntax" doesn't cut it, especially when pythons syntax works just fine for those that actually use it.

    12. Re:Yeah, but what does it have to offer? by paraax · · Score: 1

      Just wanted to indicate that this is indeed a evolved form of LPC. It was once named ùLPC several years ago. I guess they wanted to get beyond the perception of this being a "game" programming language. I've always enjoyed this as a scripting language, though, as I got my start coding on muds and with C programming.

    13. Re:Yeah, but what does it have to offer? by lcrawford · · Score: 1

      learning a new language is trivial, so long as it is based on one or more that you alrealdy know. Like after learning C, Pascal, and Basic, Perl took me a week, because it was a conglamaration of the concepts in the languages I alrealdy knew. If you cannot pick up new languages quickly, I suggest you find some an practice. It is a good skill to have.

    14. Re:Yeah, but what does it have to offer? by ZanshinWedge · · Score: 1
      I think more accurately it would be called a "limitation that may be useful under some circumstances". Sure it's annoying to miss a brace here and there, but properly formatted code makes that easy to spot. And sometimes the standard formatting is not the best choice. Occasionally putting the statement and the control structure on the same line helps if both are small (such as a big block of else-ifs with really short "blocks" for each case). Limiting what you can do to prevent you from doing something "wrong" seems to be very popular, but I prefer freedom. That's one of the reasons why perl is so popular. Perl doesn't have the anal retentive idea that it needs to be orthogonal or that it needs to force you not to do things that may or may not be stupid.

      when I go into the shop I don't want to play with nerf tools and plastic scissors, I want a table saw, I want a grinder, I want a stick welder, I want a sledge hammer, I want a hack saw, I want a drill press, I want real tools. And yes, these things can be dangerous, but they are also enormously powerful. If you can't work with the tools without cutting off your thumb perhaps you should take up embroidery.

    15. Re:Yeah, but what does it have to offer? by ZanshinWedge · · Score: 1

      Heh, if you only took a week to learn all of perl then I'd hate to see the code you write. To learn a language well requires experience dealing with it, and that will always take time and effort.

    16. Re:Yeah, but what does it have to offer? by Dwonis · · Score: 1

      But don't you indent properly anyway? You should.

      Python is a great language for breaking bad indentation habits.

      "It's not a bug, it's a *feature*!"

      --------
      "I already have all the latest software."

    17. Re:Yeah, but what does it have to offer? by eMBee · · Score: 1
      right, pike and python are very similar, featurewise. if you are happy with python, you do not need to look at pike,
      pike offers you pythons features in a C syntax.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    18. Re:Yeah, but what does it have to offer? by scrytch · · Score: 2

      "...but it [Python] considers indentation as syntax..."

      Oh, GET OVER IT ALREADY!


      No. And I am tired of your god damned superior
      attitude. I just pushed a PHP project off my "project stack", and have a perl project prioritized now. Just below this is a syntax translator for python that removes the indent requirement by using a syntax similar to MOO (or algol, or shell, depending on what you imprinted on. It still doesn't require braces or semicolons, but is free of this weird and frankly offensive cultural jihad of yours against the "unclean" syntax, meaning just about every other language in existence (except your illustrious company of early FORTRAN and RPG).

      It will generate compatible .pyc code, and I will translate the standard python library to it. I entirely aim to put an end to this nonsense once and for all.

      ... soon as I stop making it leak a stray colon into the compiler. I'm one lexical token away from knocking this idiocy down and claiming python as MY language too.
      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
    19. Re:Yeah, but what does it have to offer? by Dwonis · · Score: 1

      Why not?

      Anyway, show me some coding style that isn't boneheaded that's illegal in Python, anyway.
      --------
      "I already have all the latest software."

  4. pike rocks by ZxCv · · Score: 2

    i've used pike quite a bit since i first discovered it. its great-- support for many platforms, better OO than any other scripting language, pretty strong threading support-- and i wouldnt hesitate to recommend it, especially to those comfortable with C.

    --

    Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
  5. Haiku by 575 · · Score: 3

    Hark, one more language
    A powerful new system
    Named after a fish

    1. Re:Haiku by pboulang · · Score: 1

      That's a bad haiku
      You forgot that a pike could
      also be a stick

      --

      This comment is guaranteed*

      *not guaranteed

    2. Re:Haiku by 575 · · Score: 1

      Object Orient
      You, too, can program in Pike
      Its not just a stick

    3. Re:Haiku by elbuddha · · Score: 1

      proper haiku should
      only have four syllables
      in the last line

    4. Re:Haiku by SeanNi · · Score: 2

      A starship captain A good programming language Straight ahead, warp five

      --
      It's a fine line between trolling and karma-whoring... and I think I just crossed it.
      - Sean

      --
      It's a fine line between trolling and karma-whoring... and I think I just crossed it.
      - Sean
    5. Re:Haiku by elbuddha · · Score: 1

      doh, I was wrong. never mind

    6. Re:Haiku by Evangelion · · Score: 1


      Not just fish or sticks.
      There are brilliant people too,
      from which this name comes.

    7. Re:Haiku by webrunner · · Score: 3

      this is a bad haiku
      about pike because it doesnt follow the haiku syntax
      at all.

      ----
      Oh my god, Bear is driving! How can this be?

      --
      ADVENTURERS! - ANTIHERO FOR HIRE - CARDMASTER CONFLICT
    8. Re:Haiku by lisle · · Score: 1

      Thinking of Christopher? He's only make-believe.

    9. Re:Haiku by Evangelion · · Score: 1


      yeah, yeah :P i pronounced brilliant wrong, so sue me.

    10. Re:Haiku by 575 · · Score: 1

      Wailing horrid pain
      Torture, agony, and grief
      Files scream, deleted

    11. Re:Haiku by dgph · · Score: 2

      I remember Pike
      He had a light bulb only
      To flash yes or no

    12. Re:Haiku by mbell · · Score: 1

      wtf is the deal with all these Haikus? I don't know about anyone else, but I'm already sick of them. It seems every article has at least 4 or 5 haikus moderated up as funny? Anyway, just had to get that off my chest.
      -Mike Bell

    13. Re:Haiku by Anonymous Coward · · Score: 1

      W T F Haikus?
      I'm already sick of them
      Got that off my chest

    14. Re:Haiku by jetpack · · Score: 1

      Silly slashdotter
      Pike was a cripled captain
      Don't you watch Star Trek?

    15. Re:Haiku by Anonymous Coward · · Score: 1

      I don't like Haiku.
      I don't think I ever will.
      A poem should rhyme.

    16. Re:Haiku by 575 · · Score: 1

      Ev'ry thought express'd
      In poetic verse or prose
      Annoys you like hell

    17. Re:Haiku by electricmonk · · Score: 1
      • Stupid Slashdotters
      • Haiku for Japanese
      • It dislikes English
      --
      Friends don't let friends use multiple inheritance.
    18. Re:Haiku by h2odragon · · Score: 1

      Cheater.

    19. Re:Haiku by 575 · · Score: 1

      There once was a crippled old captain
      Yes or no, he'd say by contraption
      Imagine his shock
      When abducted by Spock
      If he could, he'd say "Damn that sly Vulcan!"

    20. Re:Haiku by 575 · · Score: 1

      There once was a poster of nonsense
      In his limerick, Nantucket not referenced
      In a move sure to please
      Local authorities
      Sought to revoke his poetic license

    21. Re:Haiku by balthan · · Score: 2

      But along came Kirk
      Took over the captain's chair
      Now...have...bad...acting...

    22. Re:Haiku by extrasolar · · Score: 2

      A good Haiku liked
      By Moderators who
      Mark it off-topic

    23. Re:Haiku by jetpack · · Score: 1

      It is a sad day
      Moderators smoke bad crack
      Damn, I got no points.

  6. Interesting... by gordyf · · Score: 2

    According to the pike web site, it is a high-level interpreted language, syntax similar to C, and has an "image processing module" capable of producing anti-aliased text and can do other drawing operations (image scaling, etc). It has a crypto toolkit and can interface with SQL databases. It's even GPL'd and works on quite a few different platforms. Looks like it's from Sweden.

    Sounds pretty cool to me.

  7. Windows support by alleria · · Score: 2

    As stupid as this sounds, not having windows support that's readily available in the form of a downloadable binary is a big blow to the language. (actually, last I checked a while back, not even the source was officially supported ... I haven't tried compiling with Cygwin / GCC.)

    Sure, we're talking about the OS from hell created by Satan himself here, but since it's widely used, not supporting it well bites ya.

    1. Re:Windows support by Soch · · Score: 1

      you COULD always just give up using the OS from hell - join us Mac users in purgatory... give up on scripting... to hell with it. (OKOK I also have PC, but I don't tell my friends that, and neither should you!!!)

      --
      Everything and everyone is an aspect of Gd. So remember to show proper respect!
    2. Re:Windows support by rifter · · Score: 1

      You could always use AppleScript... };)>

    3. Re:Windows support by Anonymous Coward · · Score: 1

      I've been watching Pike over a year now but what keeps me from jumping into it is:

      #1. Extremely complex build process for win32
      #2. Lack of dynamic module loading on win32 (like on UNIX)

      So, I'm waiting.

      Bryce

    4. Re:Windows support by brycedooley · · Score: 1

      BTW, Python Windows support ROCKS!

      --
      I have the substance of things hoped for. I have the anticipation of things unseen.
  8. no like pike - like roxen by pawal · · Score: 1

    I don't like Pike, but I definitely like the Roxen Webserver. It is also GPL, and I use it as much as I can. Roxen supports PHP4 now, and I like that better for web development.

    1. Re:no like pike - like roxen by eMBee · · Score: 1
      care to explain why?
      you can get a lot more power out of roxen if you write pike modules...

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  9. Pike -- too low level by Jonathan · · Score: 2

    I played around with Pike for a while, and my gripe with it is that it is too C-like. At least what I want out of scripting language is a high-level environment like Perl or Python. Of course, horses for courses.

    1. Re:Pike -- too low level by eMBee · · Score: 1
      hmm, the only thing that would make it more 'low' level would be that you have to declare variables, is there anything else?
      i guess it's a question of taste, and i can understand your point...

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    2. Re:Pike -- too low level by davidhedbor · · Score: 1

      Why do you say that? Generally a pike program is about a 10th of the size of the same program written in C. Some languages, for example PHP4 are almost mimicking C (most PHP4 modules are simply wrappers to C functions). Pike is higher level than C. It might help if you explain why you think its too low level.

    3. Re:Pike -- too low level by paraax · · Score: 1

      Yes, you do declare variables, but without having to worry about memory management. int main() { string a; int *b; int i; a = "Hello"; b = ({ 1, 2 }); a += " World"; b += ({ 3, 4 }); write( a +"\n" ); while( i != sizeof( b ) ) write( b[i++] +"\n" ); return 0; } Basically most of the same functions as C with variable memory allocation handled for you. And that doesn't go into some of the more advanced variable types available.

    4. Re:Pike -- too low level by eMBee · · Score: 1
      make that array(int) b; the * for arrays has been removed in pike 7.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    5. Re:Pike -- too low level by riffraff · · Score: 1

      Actually, it hasn't. Testing it with Pike 7.0.43, the *b syntax works.

      I would have done the loop differently, though:

      foreach(b, int i)
      write(i+"\n");

      There is probably a better way to do it, but I haven't used Pike that often yet either, although I am writing an on/off -line pop3 mail reader with pike and pigtk (gtk+ bindings).

    6. Re:Pike -- too low level by eMBee · · Score: 1
      oh, i guess it depends on the warning level, then, makes sense...

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  10. Pike by roman_mir · · Score: 4

    When C was introduced it quickly won the hearts of computer programmers as a high level language that still feels like a low level one (close to Assembler memory management.) It was not like Fortran, Ada or Basic, it allowed something that was never there before C. We have C++ that can do all that C does, we have Python and Perl that can do somethings in more convenient ways, there is Java and VB etc.
    How easy is it to introduce a new language that will catch up with the masses? Java and Python are good examples of such languages. Java allowed many programmers do what C++ does in the sence of OO but easier to learn, Python has the power of Perl plus it allows use of other language libraries. These are clearly improvements (no I am not saying Java is better than C++, I am saying there was (is) a market for this language for those who want some (not all) power of C++ and they want it fast and easy to learn).

    Maybe in order for a language to become widely accepted it must present something new from marketing point of view not only from functional point of view.
    Still it is not impossible that pike will find its own audience. How many of you use ML, Prolog, Lisp or Scheme in your everyday life? But these languages have their own purpose, their own market niche, mainly AI R&D.
    If Pike has something new to offer, it'll be used.

    1. Re:Pike by Kaufmann · · Score: 1

      How many of you use ML, Prolog, Lisp or Scheme in your everyday life?

      *raises hand*

      I do, actually. And not just for AI either - heck, most of my AI work to date has been limited to glorified tree searching and some work with NLP.

      And let it be said that I love it too. The completeness of Common Lisp... the elegance of Scheme... the power of OCaml. (BTW, Schelog provides most Prolog features as a Scheme extension. It's very useful.)

      --
      To the editors: your English is as bad as your Perl. Please go back to grade school.
    2. Re:Pike by gaw · · Score: 1

      How many of you use ML, Prolog, Lisp or Scheme in your everyday life? But these languages have their own purpose, their own market niche, mainly AI R&D.

      I've never actually heard of ML being particularly popular for AI applications. It was originally developed for theorem proving applications (which if you stretch it, might be considered AI), and remains popular in that area, and has also gained considerable popularity with programming language theorists.

  11. Are you blind? by ZxCv · · Score: 3

    There is a Win32 binary download right there on the Pike download page. Granted, the install process wasn't your typical windows GUI install, but was nonetheless painless and simple. Good thing you checked it out before you said something.

    --

    Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
    1. Re:Are you blind? by alleria · · Score: 1

      Jeez, chill. I said _last I checked_.

    2. Re:Are you blind? by sholden · · Score: 1

      Last I checked linux didn't even support CD-ROM
      drives.

    3. Re:Are you blind? by ZxCv · · Score: 1

      that wouldnt, but this would:

      not having windows support that's readily available in the form of a downloadable binary

      --

      Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
  12. A good example of Pike in action by IronGorilla · · Score: 4

    The world's largest amateur fantasy and sci fi art/writing site is powered by it. Every page is automatically generated by pike whenever one of the thousands of artists on board update their page. The URL is http://elfwood.lysator.liu.se and yes, I'm a member (though my gallery shall remain anonymous as my intention here is not to plug myself though I will say I joined when there was less than 100 people involved) and a voulentier staff member on the webpage.

    I'm not sure, but I THINK that Roxen and Pike were created at the Lysator computer club at Linkopeg university in Sweeden, who as you can see in the above link, are hosting Elfwood. The URL for the Lysator computer club is http://www.lysator.liu.se Of course, there's a high probability of me being wrong about that being where Roxen and pike came from.. but I seem to remember that's what someone told me.

    1. Re:A good example of Pike in action by IronGorilla · · Score: 1

      I just double checked and Lysator is, in fact, where Roxen and Pike originated from, according to this page, though its exact words in regards to Roxen are "developed mostly by Lysator members."

    2. Re:A good example of Pike in action by kinkie · · Score: 2

      Roxen was initially (circa 1993) by Per Hedbor as Spider at Lysator. It was later renamed as Spinner, and then Roxen for trademark-related reasons. There should be some historic background info at http://docs.roxen.com/

      --
      /kinkie
    3. Re:A good example of Pike in action by QZS4 · · Score: 2

      And, by the way, Roxen is the name of a fair-sized lake at Linköping. If you wanted to know...

  13. Re:Scriptlanguages are bad by roman_mir · · Score: 5

    well that is a strange statement. Most script languages are hard to use for those who do not know how to use them.
    Here is another one: Unix IS user-friendly, it just chooses its friends very carefully.

    Why are scripting languages hard to use? I use sh, csh, ksh, awk, sed, Perl, Python, jsp, asp and even Dos batch files in primitive basic. What is so hard about 'em?

    Translated languages under Unix/Linux have the same precedence level as compiled binaries (under DOS bat files are secondary). Translated languages don't even have to be compiled! It is true that I have not seing a good IDE for awk or csh but it does not mean the language is bad.

  14. Just Like Perl! by dew · · Score: 2
    Wow! Look at this: it's a new programming language! Gosh, it looks like Perl, smells like perl, feels like perl...

    Only without the years of development, the thousands of freely available modules, the extreme flexibility, the massive cross-platform portability (you can configure perl for your toaster), integration with Apache, Database support, tens of thousands of existing experts and freely available sample scripts, a huge set of some of the world's best programming language documentation, and (let's not forget) its own poetry (what other language can claim that?), having the core built by one of the coolest people on earth (read and laugh!).

    Maybe Pike is amusing, but next to a language like Perl, is it really needed? And can you really claim that Pike has "character" when you can't even write poetry? (Yes, I am a Perl bigot.)

    BTW, Hello world in perl? perl -e 'print "hello, world\n";' on the command line will do the trick. Ha!

    David E. Weekly

    --

    David E. Weekly
    Code / Think / Teach / Learn
    h4x0r for

    1. Re:Just Like Perl! by Angst+Badger · · Score: 2

      Maybe Pike is amusing, but next to a language like Perl, is it really needed?

      Yes. Even if Perl wasn't a horribly designed language (to the extent that it was designed at all) with so many inherent flaws that it's amazing it gets used at all, much less commands the popular acclaim it gets. BASIC and COBOL are better-designed languages than Perl.

      But Perl's enormous set of weak points aside, a diversity of tools is always a good thing. Not only do different languages and design methodologies have differing strengths suited to different problems, but a wider variety of tools better suits the variety of personalities among developers.

      God forbid we ever end up in a world in which platform/language/methodology partisans have locked up all progress because their sacred cow is "good enough" or because of a misguided belief in portability. It only sounds good until the faddish wave of popularity you're riding has passed; other people's monochromatic fantasies are rarely as appealing.

      If I was in charge, everyone would use ANSI C under some variety of Unix, and eschew all interpreted languages, object-orientation, and GUIs. Be as glad that I am not in charge as I am that you are not.

      Moral: If it makes sense in biological evolution, it probably does in software as well. Diversity is a good thing.

      --
      Proud member of the Weirdo-American community.
    2. Re:Just Like Perl! by perhe · · Score: 2
      Well, It does not look like perl, it does not smell like perl, and it does most definately not feel like perl.

      Actually, it's about as different from perl as a scripting language can possible be.

      And pike has quite good documentation, actually. See the tutorial as an example.

      And hello world in pike: pike -e 'write("hello, world\n");' which is actually exactly the same size as your perl example...

      Btw, hello world in a window in pike:

      pike -e 'GTK.setup_gtk();
      GTK.Window( GTK.WindowToplevel )
      ->add( GTK.Label( "Hello world\n") )
      ->show_all();
      GTK.main();'

      And hello world written with a TTF font in a window:

      pike -e 'GTK.setup_gtk();
      GTK.Window( GTK.WindowToplevel )->
      add( GTK.Pixmap( GDK.Pixmap( Image.TTF( "foo.ttf" )()
      ->write("Hello World" ) ) ) )
      ->show_all();
      GTK.main();'

    3. Re:Just Like Perl! by Me2v · · Score: 1

      Yes. Even if Perl wasn't a horribly designed language (to the extent that it was designed at all) with so many inherent flaws that it's amazing it gets used at all, much less commands the popular acclaim it gets. BASIC and COBOL are better-designed languages than Perl.

      I work with COBOL every day. Almost exclusively. That, and Rexx. COBOL is a well-designed language, more or less, to a certain extent. But COBOL has a very specific purpose behind it. Now, Perl. I work with Perl quite a bit as well. It's my toolkit of choice. For anything from a simple one-liner to a full-blown application, Perl can do it. The moral of this story is, don't mistake idiotic programming technique, or the inability of a programmer to grasp simple logic, with a fallacy in the language. Perl was developed to allow the programmer to do a number of tasks quickly and easily. If the programmer is stupid, it makes absolutely no difference what language is used. I've seen C, COBOL, VB, and others, that would just make you cry, they were so poorly written. But they compiled and ran. God help the poor fool that has to maintain them.

      But Perl's enormous set of weak points aside,

      See above. Perl has few weaknesses. It's most glaring weakness is idiot pseudo-programmers. It's second weakness is people who don't know anything about Perl badmouthing it.

      a diversity of tools is always a good thing. Not only do different languages and design methodologies have differing strengths suited to different problems, but a wider variety of tools better suits the variety of personalities among developers.

      Ah, common ground. I'm sure Pike will have a place in the heart of millions soon. Personally, I'm tired of having to watch spacing (a la COBOL and Python). Those are the worst compile errors--"Oops, sorry, your period is in column 73, therefore it doesn't exist!". C is by far my favorite language, with Perl running a close 2nd. I've done quite a bit with Javascript and a smattering of VB. Having another language to add to the mix would be good, if that language does something better and easier than what I already have.

      God forbid we ever end up in a world in which platform/language/methodology partisans have locked up all progress because their sacred cow is "good enough" or because of a misguided belief in portability. It only sounds good until the faddish wave of popularity you're riding has passed; other people's monochromatic fantasies are rarely as appealing.

      I disagree on the portability issue. You presumably have no idea of the money spent by companies transporting programs from one platform to another. Or maybe you do, I dunno. But it's a staggering amount. My company is gearing up to spend several million to replatform just one system. Why do do you think consultants are so popular right now? What people want is a way to pick up a program and plop it down on another platform and run it right away, or at least compile it without having to change anything. COBOL fits that description, as does Java. C to a great extent (but C can also be written very platform specific). And, oh, yeah, mustn't forget Perl! C++? Well, pray to God it's not used any MFCs!! For Pike not to have good cross-platform support is a very large drawback. Fortunately, the nature of Open Source will soon remedy that situation, I'm sure.

      If I was in charge, everyone would use ANSI C under some variety of Unix, and eschew all interpreted languages, object-orientation, and GUIs. Be as glad that I am not in charge as I am that you are not.

      C would be good. I wouldn't mind that. Couldn't live without the interpreted languages, however. And I love my (non-Microsoft) GUIs. So, I will be glad that you're not in charge. =P

      Moral: If it makes sense in biological evolution, it probably does in software as well. Diversity is a good thing.

      Maybe we should start having diversity training which focuses on software rather than people? I know some of my MS-centric managers could definitely use some software-diversity training!

      --
      Matthew Vanecek For 93 million miles, there is nothing between the sun and my shadow except me. I'm always getting i
    4. Re:Just Like Perl! by TheInternet · · Score: 2

      Maybe Pike is amusing, but next to a language like Perl, is it really needed?

      If we can accept the fact that Perl is not perfect, and take the time to understand what it is that people don't like about Perl, and do like about other languages, then everyone -- especially the Perl developer community -- will be much better off. Just thoughtlessly claiming that Perl is the best language there is or ever will be is totally counterproductive (though a great way to waste a Saturday).

      - Scott

      ------
      Scott Stevenson

      --
      Scott Stevenson
      Tree House Ideas
    5. Re:Just Like Perl! by elflord · · Score: 2
      Just thoughtlessly claiming that Perl is the best language there is or ever will be is totally counterproductive

      He didn't claim "perl was the best". But one certainly wonders why move to pike when there's perl and python. What can one do in pike that one can't do in perl or python ?

    6. Re:Just Like Perl! by TheInternet · · Score: 2

      But one certainly wonders why move to pike when there's perl and python. What can one do in pike that one can't do in perl or python ?

      Thanks for proving my point. :)

      I think we too quickly dismiss looking into Perl alternatives because people seem to feel that Perl is "good enough."

      - Scott

      ------
      Scott Stevenson

      --
      Scott Stevenson
      Tree House Ideas
    7. Re:Just Like Perl! by Shadowlore · · Score: 1

      uhhh...he did mention an alternative. That's what the 'perl and python' and 'perl or python' comments would indicate. Perhaps you read them differently. I know I often confuse commenting in favor of multiple languages with claiming that one of those languages is 'good enough'. ;-)

      --
      My Suburban burns less gasoline than your Prius.
    8. Re:Just Like Perl! by elflord · · Score: 2
      I think we too quickly dismiss looking into Perl alternatives because people seem to feel that Perl is "good enough."

      Huh ? I do look into and even use perl alternatives as indicated in my post. For example, python because IMO it has better OO. However, I don't use an alternative unless it does something better than the tools that I'm already using. I haven't really seen the pike boosters make a compelling case for pike. OTOH, the perl and python crowds certainly make good cases for those languages.

    9. Re:Just Like Perl! by eMBee · · Score: 1
      since you mention perl and python, i assume you agree, that python has something that perl has not.
      i assume you will also agree that this 'more' of python is not just it's syntax.
      from that we can conclude that in python you can to things that you can not do in perl

      now:
      in pike you can do the same 'more' that you can do in python, but with a C syntax.

      you can therefore conclude that you should move to pike, if you don't like pythons syntax.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    10. Re:Just Like Perl! by eMBee · · Score: 1
      do they?
      what compelling case does the python crowd make compared to pike?
      none, because most are not aware of it's existance.

      otoh, it's hard to make a case for pike compared to python, because they are very similar in functionality.
      and when we try to make a case compared to perl, we immideately get confronted with: "but python already does that"

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    11. Re:Just Like Perl! by elflord · · Score: 2
      THat's a logical argument, but not a very compelling one. You'd be hard pressed to find many people who've written more than say 1000 lines of python and *still* have a major problem with its syntax.

    12. Re:Just Like Perl! by eMBee · · Score: 1
      how is python more dynamic? (i am not saying that it is not, i am just wondering how you measure the dynamicness of a language)
      from what i know about python, i do not think that is is more like perl.
      and pike is not really as close to java either.
      java has totally different string handling, where as pike and python are rather similar here.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    13. Re:Just Like Perl! by eMBee · · Score: 1
      how does the existence of corbascript contradict my statement?
      please explain why i can't do with pike what i can do with python?

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  15. Reminiscent of LPC by HalB · · Score: 2

    It's reminiscent of LPC, the language found in the popular line of mud known as LP. I would not be surprised if it was based on LPC.

    1. Re:Reminiscent of LPC by Redin · · Score: 2

      Good spotting. :) Pike was developed by the Lysator member Fredrik Hubinette who were and is
      a whizard on LPC programming. If I remeber it right its first name was micro-LPC.

    2. Re:Reminiscent of LPC by pingflood · · Score: 1
      uLPC, that is indeed correct. If I recall correctly, he was working on it when I left Lysator back in '95 or so. :-) Didn't he develop it from scratch to avoid the licensing/copyright hassles he'd have to face if he based it on the improved LPC interpreter he'd worked on? My memory's foggy.

      -pf

    3. Re:Reminiscent of LPC by davidhedbor · · Score: 1

      Pike, or LPC as it was used to be called, is based syntactically on LPC. However there is no shared code due to the license of LPC (couldn't be used commercially I believe). Before LPC, there was LPC4, which _was_ based on LPC. It was also written by Fredrik but was abandoned in favor of what became Pike.

      Hope that clarifies that some.

    4. Re:Reminiscent of LPC by kinkie · · Score: 2

      MicroLPC was a rewrite-from-scratch of LPC for licensing issues (LPC didn't allow for commercial purposes) and performance reasons. Pike is MicroLPC renamed, plus tons of improvements.

      --
      /kinkie
  16. Re:Haiku typo by Evangelion · · Score: 2

    Not just fish or sticks.
    There are brilliant people
    from which this name comes.

    it would help if i actually knew how to talk...

  17. That's not a haiku. by Wakko+Warner · · Score: 1
    Last line's 6 syllables.
    --


    "One World, one Web, one Program" - Microsoft promotional ad

    --
    "Remember when the U.S. had a drug problem, and then we declared a War On Drugs, and now you can't buy drugs anymore?"
    1. Re:That's not a haiku. by drivers · · Score: 1

      Last line's 6 syllables.

      [Files] [scream], [de][let][ed]

      You must be thinking that files is two sylables, but it is only one sylable, whether or not you pronounce it fIl of fI&l.

      (where: I = i in ice. & = a and u in abut)

      see also: www.m-w.com (Merriam Webster)

    2. Re:That's not a haiku. by isaac_akira · · Score: 2

      Wakko cannot count.
      Used his two hands and two thumbs.
      Not enough fingers.

    3. Re:That's not a haiku. by 575 · · Score: 4

      There once was an impatient poster
      He cried out "That haiku's not kosher!"
      The rest of us pounced
      His poor ego was trounced
      Maybe next time he'll look a bit closer

    4. Re:That's not a haiku. by belloc · · Score: 2

      Step 1. Flip on ESPN2.

      Step 2. Watch NASCAR race.

      Step 3. Notice how moronic announcer pronounces "tire" or "oil".

      Step 4. Note to self how words that people using a more common English dialect pronounce with two syllables can in some dialects be pronounced as one.

      Step 5. Apply to Haiku in question.

      --
      I got more rhymes than Jamaica got Mangoes.
    5. Re:That's not a haiku. by Donut2099 · · Score: 1

      though not in haiku
      that poem deserves kudos
      so, this bud's for you

    6. Re:That's not a haiku. by 575 · · Score: 1

      There once was a prose-writing man
      Who tried lim'ricks to please all his fans
      His spirit was moved
      At least one had approved
      Cracks the bud, smiles in thanks, shakes his hand

  18. How is this by 348 · · Score: 2
    Different that CLIPS?

    I looked at the links and also checked through Google, but from what I can see it's very similar to CLIPS, moreso than PERL.

    --

    More race stuff in one place,
    than any one place on the net.

    1. Re:How is this by keffy · · Score: 1
      Different than CLIPS? !?!?

      Could we possibly be thinking of the same CLIPS here? The slightly wacky expert systems language with the slightly uglified Lispish syntax? I see almost nothing similar between CLIPS and Pike -- in data structures, in intended purpose, in syntax, in anything.

      One of the distinguishing features of CLIPS is that a lot of control flow is implicit, in the sense that interesting stuff happens for free without the programmer spelling out the steps. Like the way Prolog does backtracking depth-first search without having its hand held all the way. From the material on the Pike web-page, it looks like Pike is just like every other imperative language in requiring the programmer to spell out the algorithm in detail. Less excruciating detail than in C, maybe, but still more excruciating that plenty of other existing scripting languages.

      Perhaps it's not the same Pike we're thinking of?

  19. Re:Pike sucks, Kirk kicks ass by kfort · · Score: 1

    thanks, I guess I have fans?

    Kirk

  20. My first hyperlinked Haiku by 575 · · Score: 1

    Catalyst, I am
    Ever posting in poems
    Check my User Info

    1. Re:My first hyperlinked Haiku by Lemm · · Score: 1

      OI! Five seven five!
      NO! That haiku's final line
      has six syllables!


      (note: 575 spelt, to avoid confusion and a holy war about pronunciation. :) )

      --
      No boom today. Boom tomorrow. Always boom tomorrow. BOOM!
    2. Re:My first hyperlinked Haiku by 575 · · Score: 1

      Five Seven Five shrugs
      Mass-producing poetry...
      Bound to make mistakes!

  21. Made in Sweden. by pibben · · Score: 1

    Yes thats right, it's made in Sweden. By some people at university of Linköping. (Probably the best univ. in Sweden when it comes to computer-related education.)

  22. Re:Scriptlanguages are bad by be-fan · · Score: 2

    UNIX is NOT user friendly if you don't do the things that UNIX doesn't like. Windows is not friendly if you don't do the things that Windows doesn't like. If rm -rf * is your style, the UNIX is your game. If right-click->Delete is your style, then BeOS is your bag. Windows is only your bag if you need to run a program. If you're running a server, good luck if you try to do it in windows. If your running a desktop, god help you if you try to run it on UNIX. I am quite experianced with Linux, but it still amazes me how much crap I have to put up with to do simple desktop things like install a new 3D card driver. (I'm not kidding by the way, it is ridiculously easy in Windows. More so in BeOS where the system automatically installs drivers.) Of course I've dabbled in networking, and am amazed at how easy UNIX makes it.

    --
    A deep unwavering belief is a sure sign you're missing something...
  23. Re:http://www.ctrl-c.com/morons.html by cheese63 · · Score: 1

    hahah, dude, that's awesome

  24. Too many languages? by mangu · · Score: 2
    How easy is it to introduce a new language that will catch up with the masses?

    I wish it was harder. So many languages today claim to be "easier to learn than C", but that appears to be their only advantage. Once one learns to program, what good is such a language?

  25. Lisp is *not* only for AI. by weisserw · · Score: 3

    From "On Lisp" by Paul Graham:

    "Not so long ago, if you asked what Lisp was for, many people would have answered 'for artificial intelligence.' In fact, the association between Lisp and AI is just an accident of history. Lisp was invented by John McCarthy, who also invented the term 'artificial intelligence.' His students and colleagues wrote their programs in Lisp, and so it began to be spoken of as an AI language. This line was taken up and repeated so often during the brief AI boom in the 1980's that it became almost an institution."

    The truth is that Lisp (and its dialects) is an extraordinarily versatile and powerful language. It is suitable for just about anything, including operating system design (people have and are still writing great operating systems in lisp) and application programming (emacs anyone?), especially involving embedded scripting languages. The features which make Lisp unique (first class functions, lexical closures, powerful macros, etc. etc.) also make it able to adapt to practically any problem in computer science and solve it both elegantly and efficiently.

    Perhaps more than any other language, Lisp has taken a bad rap as of late, usually by people who haven't put any effort into learning it, or worse yet, people who have never tried it at all. I challenge those of you who took Lisp for granted as some sort of "AI language" to actually try it for yourself. At first you may find it awkward to adapt to Lisp's style of programming, but eventually you'll come to realize that the reason you felt awkward was because what you were doing before was not a very good method of programming or problem solving in general.

    -W.W.

    --
    "Well it should be obvious to even the most dim-witted individual who holds an advanced degree in hyperbolic topology...
    1. Re:Lisp is *not* only for AI. by psj · · Score: 1

      I'd use Scheme every day if I thought I could get away with it.

  26. Python does NOT have all of the power of Perl by tilly · · Score: 2

    Where are closures?

    If you wonder why I mention them, then you have never tried functional programming techniques.

    Regards,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
    1. Re:Python does NOT have all of the power of Perl by bluebomber · · Score: 1
      Where are closures? If you wonder why I mention them, then you have never tried functional programming techniques.

      While I agree that python does not have *all* the power of perl, note that python does provide lambda expressions (limited to an expression, so it's less powerful than a fully generalized mechanism).

    2. Re:Python does NOT have all of the power of Perl by Chalst · · Score: 2

      Time to plug Objective CaML (ocaml): possibly the top performing
      functional programming languages, with one of the worlds most talented
      compiler teams, a really nice way of combining functional programming
      and object orientation, an elegant language kernel, and superb
      supporting libraries and tools.

    3. Re:Python does NOT have all of the power of Perl by Cedric+Adjih · · Score: 1


      Python does NOT have all of the power of Perl
      <br>
      Where are closures?
      <br>
      If you wonder why I mention them, then you have never tried functional programming techniques.
      </em>
      <p>
      This is half-intentionnal. You aren't expected to use functional programming techniques in Python, but to use objects.<p>
      This is very debatable, but at least people won't argue forever whether to use closures or objects in a particular context, and you can do mostly what closures could do.<p>For instance, if you need a callback either pass an object "o" and later call a well-known function "o.callbackFunction(args)", or pass a bound method "m=o.callbackFunction", and later call "m(args)".

    4. Re:Python does NOT have all of the power of Perl by mbaker · · Score: 1

      Or a lambda expression or a function object.

    5. Re:Python does NOT have all of the power of Perl by Anonymous Coward · · Score: 1

      If I cared about functional programming, I'd use a functional language, and not something that resembles a sendmail configuration.

    6. Re:Python does NOT have all of the power of Perl by RedGuard · · Score: 1

      If a language allows side-effects it isn't
      a *pure* functional language. Even languages
      like Haskell have limited side-effects to implement
      I/O.

    7. Re:Python does NOT have all of the power of Perl by Shadowlore · · Score: 1

      No Lamba? Thank you for playing, please try again.

      --
      My Suburban burns less gasoline than your Prius.
    8. Re:Python does NOT have all of the power of Perl by roman_mir · · Score: 1

      Yes, I use all of the above languages.
      When I took csc324 at UofT course site we had to do so much, it seemed I was only doing that course (me and my partner) we didn't have time for anything else. ML, Lisp, Scheme, Prolog - those were the days. course description
      Lovely languages, later I took AI were we only were using Lisp. So for me Lisp automatically translates to AI...

    9. Re:Python does NOT have all of the power of Perl by mbaker · · Score: 1

      From the parent of my comment:
      > For instance, if you need a callback either pass
      > an object "o" and later call a well-known
      > function "o.callbackFunction(args)", or pass a
      > bound method "m=o.callbackFunction", and later
      > call "m(args)".

      From my comment:
      > Or a lambda expression or a function object.

      Perhaps you should read a little more carefully before you comment in an arrogant and condescending fashion. The alternative is somewhat insulting, and very much frustrating.

    10. Re:Python does NOT have all of the power of Perl by Chalst · · Score: 2

      If it supports impure features then it is an impure functional prgramming language.

      A functional programming language is a programming language that
      supports a purely functional programming style. Ocaml is widely used
      as a langugae to teach people functional programming: see the book
      `The Functional Approach to Programming by Cousinot and Mauny.

    11. Re:Python does NOT have all of the power of Perl by Chalst · · Score: 2

      Not true. Haskell encapsulates side effects in monads, allowing the
      sequencing of side effects to be described in purely functional code.

  27. The fortune answers that better than I can... by tilly · · Score: 3

    Trifles make perfection, and perfection is no trifle. -- Michelangelo

    Lambda expressions ain't closures.

    Tom Christiansen recently made the very interesting point that any programmer who has not been exposed to all of the imperative, objective, functional, and logical styles has one or more conceptual blind spots. In his words, "It is like knowing how to boil but not to fry. Programming is not something you master in 5 easy steps."

    Perl smoothly supports building real system in any and all combinations of those programming styles. This is no small feat, even if it wasted on most of the monkeys currently giving Perl a bad name by pumping out glorified print statements...

    Cheers,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
    1. Re:The fortune answers that better than I can... by gaw · · Score: 1

      Okay, I've seen the first three done, but I'm curious to see one does logic programming in Perl? Of course, you could write the code to implement it, but that's not quite the same.

    2. Re:The fortune answers that better than I can... by gaw · · Score: 1

      That wasn't my point. The poster said you could do logic programming *in* Perl. Of course you can implement a logic programming system in Perl, but that's not the same as what the original poster implied.

    3. Re:The fortune answers that better than I can... by Salamander · · Score: 2

      ?Perl smoothly supports building real system in any and all combinations of those programming styles

      Are these things _possible_ in perl? Yes. Does perl _support_ them in any meaningful way? No. Not any more than assembler does.

      --
      Slashdot - News for Herds. Stuff that Splatters.
  28. Re:Pike is an interesting alternative... by perhe · · Score: 2
    Actually, pike does use bytecode, the actual source-code is not interpreted as it is run.

    The major difference between java and pike is that pike does not have a formalized byte-code syntax (at least not yet).

    This makes saving bytecompiled files on disk hard, you have to compare the pike version used to dumped the file with the version you are running, if they are different, you have to dump them again.

    So it is not currently possible to distribute pike programs without source-code (unless you also distribute the pike version that should be used to run them)

    The pike compiler also does quite a lot of optimizations, both on the syntax tree generated by the bison (LR) parser, and a peephole optimizer that works on the generated bytecode.

    So, what I wanted to say really is that pike is interpreted in exactly the same way that java is. interpreted.

  29. About Pike. by Cedric+Adjih · · Score: 4
    I've just downloaded and played a bit with the language. Basically, if I understood properly:
    • It is in fact quite close to Java.
    • It has garbage collection (or is it reference counting ? I created some circular dependencies and it didn't seem to collect).
    • It has high level types: string, array, mapping, multiset. It has simple syntax for defining constants with those objects, and basic operation on them (like lists, dictionnaries, hashes in Perl or Python).
    • It has OO, looks less hackish than Perl, but just doesn't look as clean as Java. Is class-shared data possible ?
    • The variables have to be declared. It is not statically typed though, and it has a "mixed" type which is a placeholder for any type (something like Delphi's "Variant").
    • It tries hard to be like C. Exactly the same declaration syntax, operators, control flow structures. Worrying point: it also has the preprocessor.
    • It is probably less dynamic than Perl or Python (I couldn't set the method of one object to be another, at runtime).

    Basically it is closer to Java than to scripting languages because of the declarations. It might be simpler to use than Java if, for instance, you used the "mixed" type (can hold any object) everywhere, because you don't need casts ; it still looks heavier than Tcl, Perl or Python.

    1. Re:About Pike. by perhe · · Score: 3
      Pike has both GC and refcounting. The gc is run now and then to remove circular structures (when there is enough garbage to collect, basically, using heurestics) or when you call gc() explicitly.

      Class shared data is not possible as such, but you can write, as an example:

      class Shared
      {
      int a;
      int b;
      float c;
      }

      Shared shared = Shared();

      class DaClass
      {
      void use_shared()
      {
      write( "a is "+shared->a+"\n");
      }
      }

      You can access the parent scope in classes (and functions (and funtions in functions etc)

      It is closer to java than C when it comes to declarations and such, IMHO. It also has quite a lot of similarities to lisp. Not the syntax (even if map( array, lambda( int elem ) { return elem+1; } ) does look rather lispish) but the internals and some of the programming structures are closer to lisp than C.

  30. About Pike - license issue. by Cedric+Adjih · · Score: 1
    I also forgot to mention an important point, the license. Pike is GPL. It means that embedding into an application would require it to be GPL.

    This might be a problem for commercial software (like Blender), or for free software not GPL-compatible.

    1. Re:About Pike - license issue. by Anonymous Coward · · Score: 1

      I would be surprised if a license couldn't be bought from Roxen IS, who "ows" Pike. They have taken great care to make sure that all parts can be relicensed, since they themselves sell pike-based products.

  31. Re:Lisp is NOT a functional programming language by Anonymous Coward · · Score: 2



    Does Lisp have referential transparency, or does it allow side effects and sequenced statements? Does it have an advanced type system, which supports type checked algebraic types (advanced generic typing)? Does it have universal lazy evaluation? Does it automatically curry functions?

    Lisp is old hat, my friend. If you are going to preach to us about expressive programming languages, pick something more up-to-date. At least you have ventured beyond the "C is everything" mentality... too bad you got stuck in the 1970/1980s, with Lisp. Lisp has great historical value, but other than that, it has been out classed by Haskell, www.haskell.org

    Cute little Object Oriented scripting languages, like Pike, are cool and all, but other than their aesthetic value, they add very little to advanced programming languages. It is yet another Object Oriented PL ...and no, we do NOT need another BASIC. Thanks ;-)

  32. Roxen use at RealNetworks by robla · · Score: 3
    Our entire website is powered by Roxen (and thus Pike). Having been indoctrinated in Perl and Python, I'll have to admit that when I first became a web developer here and took on learning Yet Another Language I was less than amused.

    However, I have to say that I'm impressed with the eye toward performance in Pike (most of the Roxen webserver itself is written in Pike), and the responsiveness of the maintainers when it comes to supporting the product.

  33. Re:Lisp is NOT a functional programming language by weisserw · · Score: 2

    I don't know what "referential transparency" means. Yes, Lisp allows side effects and sequences. Yes, there are advanced type systems of that kind available -- Lisp is an extremely extensible language.

    I'm not exactly sure what the point of universal lazy evaluation is, but you can do it in Lisp if you want to. Likewise, there's no particular reason why you can't curry functions automatically, but I'm not sure why you'd want to. Functions in lisp don't need to be curried because they can take more than one argument.

    I agree with your comments on Pike...languages which don't compile themselves are so lame (*cough*Perl*cough*).

    Haskell is a pretty cool language, but I wouldn't say it has "outclassed" Lisp. There aren't too many advocates of functional programming left nowadays...lets not belittle each other with petty in-fighting.

    -W.W.

    --
    "Well it should be obvious to even the most dim-witted individual who holds an advanced degree in hyperbolic topology...
  34. Re:Interesting... But off topic by Anonymous Coward · · Score: 1

    you didn't define a return type for your main () function. You will be shot. It _should_ be int and include a return (0);

  35. pike history (was: Just Like Perl!) by eMBee · · Score: 1
    Only without the years of development

    not really true.
    pike actually goes back to the late 80ties when lars pensjö first wrote lpc.

    check the history of pike here.

    if you are interrsted in the history of a language and want to enter the world of lpc read some paragraphs about lpc and lpmuds: history, what is lpc
    what is an lpmud, lpc servers (the lpmud servers listed there are essentially lpc dialects)
    (Profezzorn, mentioned here, is the author of pike)

    another interresting introduction to lpc.
    (what is said here in 2.1 and 2.2 is essentially true for pike and roxen: just replace "lpc objects" with "roxen modules" and lpmud with roxen and most other occurances of lpc with pike :-)

    here the history to one of the lpc dialects.

    go back even further and find out how lpc was started in the first place.

    as you can see, pike has a very lively history and a lot of background.

    greetings, eMBee.
    --

    --
    Gnu is Not Unix / Linux Is Not UniX
  36. Pike offers performance by robla · · Score: 1
    What Pike offers is great performance and *tight* integration with a high-performance, high-stability web server. I haven't done the benchmarks myself, so I can't offer statistics, but anecdotally, the fact that the web server itself is written mainly in Pike, and the server does pretty well is a good indication. Also anecdotally, I've seen many systems deployed here at RealNetworks that perform very well, and I know that they benchmark well. Maybe I can prod some other more knowledgeable folks here to post. :)

    As far as learning a new language goes, it's not that bad, really (it's far from being my "native tongue", so to speak). I find myself reverting to Perl when I want to knock something out quickly, but Pike is not so different as to slow me down all that much.

  37. Almost void? I think not... by tilly · · Score: 1

    Please do not confuse conciseness with lack of information. Python does not support a basic programming notion that Perl does, one which is key for a well-known and powerful style of programming. That is a significant difference.

    What more should I have said?

    Regards,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
    1. Re:Almost void? I think not... by kovi · · Score: 1

      >Python does not support a basic programming notion that Perl does,
      >What more should I have said?

      Well, you could be a little more specific and explain this to the rest of us, mere humans...
      I'd really love to know WTF is a basic programming notion.
      Regards,
      kovi

  38. Re:Interesting... But off topic by rifter · · Score: 1

    erm.. yeah he did...

  39. Language performance comparisons(was:Yeah, but... by eMBee · · Score: 1
    Preliminary results for C, Awk, Java, Perl, Pike, and Tcl are now available here

    greetings, eMBee.
    --

    --
    Gnu is Not Unix / Linux Is Not UniX
  40. Re:The Truth about Pike by porky_pig_jr · · Score: 1

    Yo, bratha. We need a new language 'RAP'.

  41. too many scripting languages by jetson123 · · Score: 4
    Pike, Python, Perl, Tcl, JavaScript, Ruby, etc. are all very similar: dynamically typed, byte code interpreted, procedural/OO languages.

    In addition, there is a plethora of interesting, powerful interpreters for languages that go beyond traditional scripting: EiC (ANSI C interpreter), CINT (C++ interpreter), Hugs/Haskell, CAML-Light, Scheme, Icon, CLisp/CommonLisp, Squeak/Smalltalk-80, etc.

    Next time you feel the urge to invent a new scripting language, think about doing something genuinely new, rather than coming up with a language that is merely an incompatible, incremental improvement of something existing.

    If you can't formulate some new idea that your language implements that isn't easily added to Python or Perl, I'd say, don't bother and work on one of the existing languages instead. Many of the existing languages need more libraries and better foreign function interfaces, and several of the existing languages would benefit from new implementations in C++ and/or Java, etc.

    1. Re:too many scripting languages by eMBee · · Score: 1
      pikes history goes back to lpc which was started in 1989/90,
      perl started in 1987,
      and python in 1991

      in order to consider adding features to an existing language it must be known and used widely enough to consider it worth it over just rewriting another one from scratch...

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  42. Why change for change's sake? by ffatTony · · Score: 1

    With my limited experience with and knowledge of pike I really don't see that it offers anything different. People went to c, c++, java, perl, because they fill a gap or offer a more elegant way to do something. Learning a language is easy, but mastering it is hard... why bother if the language really isn't different enough or truly necessary? This is why I've always had reservations about roxen as well.

    Its good to learn and create, but why make something for which there really isn't a need. Python and perl are fine, why use pike?

    Perhaps there is some specialty for which pike excels? If this is the case please reply and I'll take another look at it.

    1. Re:Why change for change's sake? by eMBee · · Score: 1
      pike does fill a gap for me.
      it is the only typed and interpreted language with a syntax very close to c (the only thing closer, would be interpreted c itself).
      there is no other language which provides this.

      greetins, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    2. Re:Why change for change's sake? by ffatTony · · Score: 1

      How often should one reconsider ones opinions?

      As often as possible. And you mispelled PERL :)

    3. Re:Why change for change's sake? by rjb · · Score: 1
      A free C interpreter does exist: look up EiC.

      Still, Pike rocks. "OOP for the rest of us", you might say ;-)

      PS. Anyone know what happened to ddns.org?

  43. Think "upgrade path"! by leonbrooks · · Score: 1

    If you hook a user on Roxen or Pike, you can then point out that they can have it without the (check one or more) [_] expense [_] instability [_] insecurity [_] licence issues [_] embarrassment [_] opacity of running it under Windows. Odd it is that something named Windows opaque should be.

    --
    Got time? Spend some of it coding or testing
  44. GIMP EMACS SIAG Gnumeric etc etc by leonbrooks · · Score: 1

    If you define "functional" as useful, rather than the more esoteric AI term, LISP does seem to be functional. It passes the FSF test of being able to send mail. Someone's even written a window manager in which all of the config and fanciness is LISP.

    Yes, you can also do this in PERL, but it's a constant discipline not to do it in write-only fashion.

    --
    Got time? Spend some of it coding or testing
    1. Re:GIMP EMACS SIAG Gnumeric etc etc by John+Allsup · · Score: 2
      If you define "stable" as 'not crashing', then Linux is very unstable because 'applications keep crashing on me'...

      General rule of thumb: when language conventions are defined, stick with them.

      In any case, the name 'functional' comes from the fact that the language is built around the evaluation of functions (in the maths sense, i.e.
      f : -> n |-> 1/sqrt{n}
      defining "functional" as useful basically means that you have to find a new, more convoluted name such as "function-evaluational langauge".
      John
      --
      John_Chalisque
  45. OO is obsolete-- Hackers, use your brains! by Tom7 · · Score: 2

    Well, I know I'm in the tiny minority, but I use ML every day.

    The universe does not need more C-like OO scripting languages! OO is far from being the Mecca of language concepts. There are vast worlds of unexplored programming paradigms that lead to much more expressive, beautiful, and useful programming languages. There's nothing fundamentally more difficult about these languages and paradigms (though there are fundamental reasons why they're better, sometimes), just a reluctance for the programming masses to try something new. Or perhaps Sun's clever marketing of Java. Or whatever.

    It saddens me to find us caught up using out-dated ideas and getting excited over syntactic sugar, marketing buzzwords, and a "getting things done" (think: RAD=perl=VB) mentality. Hackers have a duty to advance the state of the art by embracing new technology, because the suits don't care. Do the world a favor and learn/develop a new *different* programming language today!

    1. Re:OO is obsolete-- Hackers, use your brains! by Gromer · · Score: 1

      I'd be very curious to hear some examples of other unexplored paradigms. Personally, I agree that OO is no mecca. No language/design paradigm can turn bad ideas into good ones. However, at least for a substantial number of problems, OO is the most effective, clear, and straightforward method of solving them. Just to name one, ray-tracing is inherently and fundamentally object-oriented, and I really doubt it could be approached more beautifully or elegantly in any other paradigm.

      --
      "Never let your sense of morals prevent you from doing what is right" -Salvor Hardin
    2. Re:OO is obsolete-- Hackers, use your brains! by thogard · · Score: 1

      > ray-tracing is inherently and fundamentally object-oriented, and I really doubt it could be approached more beautifully or elegantly in any other paradigm.

      Is there any ray tracer that is in common use (for a ray tracer) that uses OOD at the core level?

    3. Re:OO is obsolete-- Hackers, use your brains! by jilles · · Score: 2

      some examples of other unexplored paradigms:

      intentional programming: see microsoft research and do a search on google (please open your mind, it's just bill gates pouring money into legitimate research). If they pull this of it will be one of the most interesting things to happen in computer programming since the invention of the compiler.

      Self: a little outdated now but there are still some interesting ideas in it (many of them were used to develop Java). You can find it somewhere on sun's website.

      Subject oriented programming: There's some very interesting research going on in this area. IBM is the place to look for SOP.

      Aspect oriented programming: Also very interesting. Check Xerox' research site and be sure to give their compiler a try.

      Anybody serious about exploring new paradigms should take a look at the above. There are several related research projects going on but these are the most important ones. All of them are driven by the realization that OO is just not good enough for modeling the entire world.

      I checked out the Pike website briefly. I can't discover any exciting language features in it. It is yet another OO scripting language. Maybe it will find its niche like so many other languages do but there's nothing revolutionary to be found there. I'm not a language designer but what would interest me is a scripting language that supports one of the paradigms above. Especially AOP would seem very useful in a scripting language.

      --

      Jilles
    4. Re:OO is obsolete-- Hackers, use your brains! by Ian+Bicking · · Score: 2
      Self: a little outdated now but there are still some interesting ideas in it (many of them were used to develop Java). You can find it somewhere on sun's website.
      This page seems to have a lot of links, and self.sunlabs.com is the official word.

      SELF wasn't really a big new paradigm, though. It worked on a few interesting ideas: dynamic compilation (which became Java's JIT), prototype-based OO, and a new widget system (Morphic, which lives on in Squeak).

      I think prototypes are an interesting alternative to classes for OO programming, and it's something that hasn't been very seriously pursued since then. It's a purification of OO in some ways, as too is SELF's insistence that all access to instance variables be through method calls.

      Alan Kay, who coined "object oriented", said before that he really named it incorrectly, because he felt message passing was a more interesting and powerful concept. I think SELF moved more in that direction.
      --

    5. Re:OO is obsolete-- Hackers, use your brains! by Pig+Bodine · · Score: 1

      Is this a troll? Object orientation isn't the only way to re-use code. Check out the paper "Why Functional Programming Matters" that someone else cited in this discussion. It deals mostly with toy problems, but it does succesfully point out that functional programming (whether in Lisp or a purely functional language) offers some very flexible methods for code re-use.

    6. Re:OO is obsolete-- Hackers, use your brains! by Gromer · · Score: 1

      To my knowledge, no, at least not technically. PovRay is supposed to be in the midst of a C++ rewrite, but no public activity as yet. On the other hand, one could argue that ray-tracers written in non-OO languages are still essentially OO, with a variety of unpleasant hacks to make them act OO. Still, writing one without those hacks would be nice.

      Ray-tracing is something of a hobby of mine, and with any luck I will have just such a project open for business on SourceForge within a few months. We'll see if I'm motivated enough to get it moving.

      --
      "Never let your sense of morals prevent you from doing what is right" -Salvor Hardin
  46. Whitespace as a matter of principle by Mr+Z · · Score: 2

    Or, it could be that people who find the indentation policy objectionable won't stay around long enough to write at least 50 lines of Python.

    I personally take pains to indent my code in a consistent manner, but for me, consistent is anything but simplistic. For instance, I might just put a very short block (such as an if statement with a short 'then' clause) all on one line for economy of space. Also, I have very particular ways of wrapping long lines, and of aligning similar elements across many lines. It's all very consistent and clean. It's also possibly somewhat unique to me. At the very least, I need only pay attention to my rules and the rules of whatever team I'm on, and not the language author's.

    In other words, I've become very accustomed to the idea that whitespace belongs to the programmer and not the programming language. I'm not ready to relinquish my control over whitespace now that I've moved away from languages (such as BASIC, FORTRAN, etc.) that wanted to control it for themselves.

    Note: I have looked over Python's whitespace rules, and I find them mostly reasonable. Still, I object on principle.

    --Joe
    --
    1. Re:Whitespace as a matter of principle by elflord · · Score: 2
      Or, it could be that people who find the indentation policy objectionable won't stay around long enough to write at least 50 lines of Python.

      IOW, they were too inflexible and narrow minded to give it a fair go.

      In other words, I've become very accustomed to the idea that whitespace belongs to the programmer and not the programming language.

      In other words, you've got this preconceived notion that there's "one true way" ( ie braces ) to do syntax. Well that's not really true. Python's syntax might not be the worlds best, but it's certainly not bad enough to justify running away and screaming in horror ! I find it amazing that people who are willing to put up with the syntax used in languages like C and perl are so frightened of python.

    2. Re:Whitespace as a matter of principle by moibus · · Score: 1
      It's not a matter of frightened, it's a matter of just not liking it. I've written Python, Perl, Tcl, Pike, Lisp, sh, C, C++, etc, etc. Whitespace shouldn't be syntax, IMO. If you disagree, no problem, use Python all you want. I won't. I don't believe the look of source code should be enforced in the language; it's like legislating morality, it just doesn't work. Good programmers will write good code and most of the time it will be readable and reasonably indented and formatted. Bad programmers will write bad code and no language will make that go away.

      The point of this thread was not that Python is lame or great or anything else, it was that Pike is at least worth a look. In passing I mentioned that I much preferred its syntax to Python's. Cope.

      --
      -moibus http://moibus.jfm.net/
    3. Re:Whitespace as a matter of principle by Fizgig · · Score: 1

      For instance, I might just put a very short block (such as an if statement with a short 'then' clause) all on one line for economy of space.

      Well, maybe you know this, but you can actually do that in python. "if a: b()" is valid. Interesting thing is that this is actually faster than putting it on two lines, since the python interpretor would have to increment the line number (so that an thrown exception prints the right line number, and other things).

      Not that this makes your point invalid (I happen to like Python's indent stuff, but you're more than welcome to disagree); just thought I'd point it out.

    4. Re:Whitespace as a matter of principle by TheCarp · · Score: 2

      > While the critical number of lines to write is
      > probably greater than 50 (maybe several
      > hundred), it is obvious you haven't reached it,
      > so in this respect, you know less than us who
      > did.

      Ok I take issue with this statment.

      I have never Programmed in Python. I want to try it out, even though I am initially repulsed by the whitespace thing (I am used to C style languages, so I am uncomfortable with this...I admit that this is my personal bias and nothing more)...

      however...You seem to be implying that anyone who uses python long enough will find out that they love it, and they love this feature of it. I don't think that this is true.

      Python Syntax WILL be a problem for some people, just as C syntax is a problem for some people. There is no "One True Way" that will please everyone.

      --
      "I opened my eyes, and everything went dark again"
    5. Re:Whitespace as a matter of principle by scrytch · · Score: 2

      > IOW, they were too inflexible and narrow minded to give it a fair go.

      What do you consider a fair go? Until they agree with you? I am not unenlightened, I have tried the indent way. I reject the philosophy of whitespace as block scope. Honestly, you sound like the door to door preacher that tells me about God's gift of eternal life. I reject them too. Not out of ignorance or fear, out of knowledge.

      Rejection sucks, don't it?

      --
      I've finally had it: until slashdot gets article moderation, I am not coming back.
  47. Pike & Roxen by Machina · · Score: 1

    I actually use pike in a work environment, since we run Roxen as our webserver. In general, I've liked it, as well as its integration with roxen. Here are my few good and bad points about it

    • Good Points
    • The manual is pretty decent. I'd hope for more short examples of code for some of the different functions, but in general, it has been a real asset (Roxen's manuals on the other hand, I've found to be rather lacking and frustrating. A downside to an otherwise good webserver).
    • Easy interpreted language for c/c++/java programmers to pick up. Most of my previous programming knowledge being from school, Pike was a LOT easier to pick up and use compared to working and learning perl.
    • Bad points
    • One complaint I've had, is how it returns the NULL values from a mySQL database. It likes to return it as a 0, instead of just being a null value, which has caused a few problems.

    Nonetheless, I've liked it so far and most of my problems have been the lack of good documentation for Roxen, compared to problems with Pike itself. I'm not really the best to evaulate languges(give me some time though), but if you know c/c++, it's a good interpeted language to move too.

    1. Re:Pike & Roxen by davidhedbor · · Score: 1

      The bad point, NULL being printed as "0" in RXML, is fixed in Roxen now. It was a bug mainly because no one noticed it before. I generally never use NULL fields for example, since are (IMHO) bad from a database perspective. :)

  48. Re:Lisp is NOT a functional programming language by Anonymous Coward · · Score: 2

    I was not belittling you. I belittled the your love for Lisp. There are many like you, who get introduced to Lisp, as THE functional programming language... I wish more schools taught modern languages, as opposed to outdated languages (*cough* Prolog *cough*).

    Automatic currying of functions reduces the amount of parens needed, when using functions of one argument or N arguements. Lisp has a parens fetish that gets a little messy now and then. Its not to not have to use them as much, as Haskell allows.

    "Referential transparency" does not exist when there are side effects. Referential transparency allows transparent threading of your application. Think about have your app automatically run on 4 CPUs, without any code rewriting. Referential transparency also allows more simplistic proof of the properties of your code.

    Please hook me up with some good resources on advanced Lisp type systems. Last time I checked, standard Lisp had no type system. A horrid weakness.

    Universal lazy evaluation means that your data structures and functions are evaluated in a lazy manner. If you do not understand what I mean by that, then there is no way you can truely experience the beauty of modern functional programming. I know that Lisp may have lazy lists, but I know that overall, it has strict evaluation over its functions/data structures. Here is an example:

    f x y = x + 10


    Lazy evaluation:
    ] f (sqroot 2349 + 7/346) (sqroot 343568 + 7/346)
    ~ (sqroot 2349 + 7/346) + 10
    ~ (48.4867...) + 10
    ~ "After this point, the remainding expression is returned. If it needs to be evaluated furthur, because a function needs a more reduced form, then it is automatically reduced. However, it will only be reduced furthur, it is needed."

    Strict evaluation (like Lisp, but using Haskell syntax):
    ] f (sqroot 2349 + 7/346) (sqroot 343568 + 7/346)
    ~ f (48.4867...) (586.1669...)
    ~ (48.4867...) + 10
    ~ 58.4867...
    Notice how strict evaluation does more work than is needed? Sure, my example is trivial and silly, but there are cases, where it is not as trivial. Lets say I wanted to define functions over a boolean data type:

    And True y = y
    And False y = False


    Lazy example evaluation:
    ] And (Not False) (And (Not True) (And True False))
    ~ And True (And (Not True) (And True False))
    ~ (And (Not True) (And True False))


    Strict (ala Lisp):
    ] And (Not False) (And (Not True) (And True False))
    ~ And (Not False) (And False (And True False))
    ~ And (Not False) (And False False)
    ~ And (Not False) False
    ~ And True False
    ~ False

    Note how strict evaluation continuously evaluates the second argument of And, even when it is not needed (the first arguement was False). If real life applications, Lazy evaluation allows for greater modularity in application design. Here is a paper, for you to read, if you care to furthur your knowledge of functional programming and the great benefits of lazy eval: Why FP Matters

    I am sorry, but you have to learn why Lisp has been outclassed to understand. Its hard to just show people with a few examples. The paper I linked should be a good start. Many of the parts of Lisp that have been outclassed, cannot just be added on to Lisp. They are fundamental changes that would have to take place, to modernize Lisp. It would no longer be Lisp at all.

    Also, read this entire book (its good, trust me): Good FP Book

    I argue with you because you show potential. I won't even bother to discuss FP with most of the other people on this board. Many of them truely thing that Perl is a really good language. Its not even worth trying to argue with someone that burried.

  49. Re:Pike? Anonymous Coward by stevarooski · · Score: 1

    GREAT links, moderate that one up! Thank you!!!! Ignorance cured.

    How many languages that do relatively the same thing do we need???

    -S

    http://students.washington.edu/steve0/
    steve0@u.washington.edu

    --

    - - - - - - - -
    Don't worry, being eaten by a crocodile is just like going to sleep in a giant blender.
  50. Re:Another Haiku by slickwillie · · Score: 1

    There once was a programmer named Mike
    "An new language, yeah that's what I'd like"
    He searched high and low
    But it was Slashdot, you know
    Where he first found a URL to Pike.

    What's that? Not a haiku?

  51. Pike v.s. Java by Anonymous Coward · · Score: 2

    as from my past years experience with Java & Pike (or even LPC), I feel that Pike though not as clean as Java, it has its advantages of being flexible and handy:

    1. Pike has multiple-inheritance. Java becomes really frustrating & painfully to write when I am dealing large scale OO project because of its single-inheritance nature. The interface thing is really troublesome, how many times do you have to copy&paste functions just because they are not in your parent class?
    2. Pike allows functions to be passed around. This is definitely a win towards Jav anonymous class implementation. Why do you have to declare YET ANOTHER CLASS when you just want to have a simple callback? Being able to pass functions around is definitely a win of flexibility.
    3. Pike has in-built syntax for dynamic data types. Arrays are inherantly dynamic sized, and able to hold values of different data types in the same array. Java insists creating a Vector class in which only objects can be stored. Pike also allows operator overloading, so an array or mapping (hashtable) concatenation is as simple as A + B. I write Pike programs often 1/2 of the length of a Java program to achieve the same thing.
    4. Pike is oh-so-easy to learn for C or C++ programmers than any of Java, Perl, Tcl and Python. My early experience was with LPC when I was learning my way to code LPmud, and I picked it up almost in 2 hours or such. I wished LPC could be a general purpose language at that time simply because I found it the easiest language to code. This was when Java was still in its 1.0 beta stage. I learned Java later and did large project with it, but never felt it has any advantage over LPC except it is more wildly supported. Then I came to know Pike. As a successor of LPC, Pike did an exellent job of being a general purpose language with a very powerful set of modules ranging from Database, SMTP to GTK.

    Pike certainly has its disadvantage of being less well known, and less supported compared to the SUN & IBM boosted Java, but Pike has a much better license though. Pike's byte-code interpretor is solid but still pales when compared with those new JIT compilers for Java. It still has a long way to go in order to become a main stream language, or will it ever?

    What the heck, as long as it fits my need and serves its purpose greatly, I am satisfied.

    1. Re:Pike v.s. Java by eMBee · · Score: 1
      what in pike is not as clean as in java?
      could you elaborate?

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    2. Re:Pike v.s. Java by Anonymous Coward · · Score: 1
      Just to name a few aspects:
      1. To allow a generic datatype such as "mixed" is often considered not clean because it allows ambiguity. Java is strongly typed, but Pike is only strongly typed if you code it that way.
      2. Multiple inheritance, especially with an interpretation of its own, does not make Pike as clean as Java.
      3. Syntax wise, because of operator overloading, it confuses me sometimes with the '[] thingy when I look at source codes of some Pike modules.
      4. Modules in Pike is not as cleanly defined and enforced as Packages in Java. Though I actually find the above points gave me more flexibility in Pike. It depends on how you look at the problem.
    3. Re:Pike v.s. Java by eMBee · · Score: 1
      ahh, thank you.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
    4. Re:Pike v.s. Java by kinkie · · Score: 2

      An example in comparative sizes between Java and Pike: my thesis paper involved writing a net management system in Java.
      I prototyped the application in Pike.
      The prototype was 8k pike lines, the final app was 60k Java lines, and IT DID THE EXACT SAME THINGS.

      Also, due to its prototype nature, I modeled the pike program to do things the same way I'd do them in Java, thus the actual numbers if I had followed the correct programming style for Pike would be even more extreme

      --
      /kinkie
    5. Re:Pike v.s. Java by MacOSNeedsDeath · · Score: 1
      This is offtopic, but I feel the need to point out that multiple inheritence is not a good way to add utility methods to your classes. One of your goals in OO framework design should be to minimize inheritence. If you find yourself reusing certain functions over and over again, you should be doing what smart C++ programmers do: Making them static members of a utility class.

      Why is this important? Maintainability. The more classes you inherit from, the more difficult it is to untangle the polymorphic web when you want to change the implementation. (Imagine what the Awful Window Toolkit designers would have done with multiple inheritence. involuntary shudder)

      The worst framework designs I've seen are those that inherit from linked lists and other similarly primitive data types. The absolute worst. Amatuers.

    6. Re:Pike v.s. Java by kinkie · · Score: 2

      It was a client-server app, which made heavy use of applets, RMI, runtime object inspection (Beans-like), JNI and JavaCC parsers (I only counted the grammar lines, not the generated parser's).

      Also, I'd figure that about one fourth to one third of the total size are comments, documentation and similar stuff. Still, the important fact is the actual code ratio, rather than the overall size.

      --
      /kinkie
  52. The documentation is NOT good by ryanr · · Score: 2

    SecurityFocus' webserver is Roxen. A bunch of our webforms are combinations of RXML, pike and a few other things. I also had never heard of Pike or Roxen until I started here, and Elias forced me to learn it.

    Anyway, my point is that I had to try to learn Pike by reading said documentation. It's really not very good. It's well organized, but it's incomplete, and lacks good examples. In many cases, I had to make inferences about how something worked by trying it and watching the errors.

    The docs especially fall down when it come to how Pike works (differently) when called from Roxen via the tag. For example, I think it took me about 5 hours of searching the docs, mailing list archives, and other code already on our site to figure out how to get variables between the RXML scope and the scope.

    Not that it's all bad, of course. There are some real nice features in RXML/Pike when it comes to forms processing, database hooks, etc.. variables submitted via forms appear in RXML code like first-class variables.

    1. Re:The documentation is NOT good by davidhedbor · · Score: 1
      Check out the new tutorial. It does a great job teaching the basic, and more advanced, aspects of Pike. Prior to that tutorial, it didn't really have such a thing.

      When it comes to Roxen 2.0, there is not yet a programming manual. It's being worked on however. And instead of spending 5 hrs searching you should have sent an email to the Roxen mailinglist and you'd received an answer within less than 1 hr I'm sure.

    2. Re:The documentation is NOT good by ryanr · · Score: 2

      I'll check out the tutorial, thanks.

      It's good to know that I'd get such a quick answer from the list, but pride dictates that I not go asking how to assign values to variables on a mailing list. :)

      But the point I was trying to make was that a simple example would have done wonders for me.

    3. Re:The documentation is NOT good by davidhedbor · · Score: 1

      Since there is no programming manual for Roxen 2.0, that's a problem. Roxen 1.3 had a limited, and certainly not extensive enough, programming documentation. As I said before, Roxen IS is working on this obvious problem. And yes, examples is where the manuals are lacking the most.

    4. Re:The documentation is NOT good by Shadowlore · · Score: 1
      And instead of spending 5 hrs searching you should have sent an email to the Roxen mailinglist and you'd received an answer within less than 1 hr I'm sure.

      Unless, of course you were mentioning a bug in Roxen. I don't know how much this translates to Pike's suppor tcommunity, but the Roxen one leaves a lot to be desired. More so on the part of the Roxen folks themselves. This has been one of the larger reasons I have not spent the time to bother learning pike.

      --
      My Suburban burns less gasoline than your Prius.
  53. Re:Better OO than Self? by Tripp+Lilley · · Score: 1

    Self rules. Too bad you posted AC, otherwise I'd let you in on my two dirty little secrets: implementations of classless OOP (a la Self) for Perl and Python, complete with robust persistence, including code storage. I guess you'll just have to wait for the release :)

  54. Re:Lisp is NOT a functional programming language by extrasolar · · Score: 2

    I am interested. I will have to read that paper you linked to when I boot into my GNU/Linux partition (with a postscript viewer).

    "I argue with you because you show potential. I won't even bother to discuss FP with most of the other people on this board. Many of them truely thing that Perl is a really good language. Its not even worth trying to argue with someone that burried."

    I can understand your point of view, amongst much of the language zealotry. But I hope you can still share your thoughts. What intrigued me was the following:

    ""Referential transparency" does not exist when there are side effects. Referential transparency allows transparent threading of your application. Think about have your app automatically run on 4 CPUs, without any code rewriting. Referential transparency also allows more simplistic proof of the properties of your code."

    Are there any papers you can reference about this?

  55. PHP with Roxen by Frodo · · Score: 1

    PHP 4 has support for Roxen, so if you like Roxen and not want to move to Pike, you might be interested in it.

    --
    -- Si hoc legere scis nimium eruditionis habes.
  56. Re:Scriptlanguages are bad by Frodo · · Score: 1
    I use sh, csh, ksh, awk, sed, Perl, Python, jsp, asp and even Dos batch files

    You need PHP for the list to be full :)

    --
    -- Si hoc legere scis nimium eruditionis habes.
  57. From a sysadmin's perspective.... by jhr · · Score: 1

    From the perspective of a sysadmin, the roxen/pike combo leave lots to be desired. I was recently working for a company that did its entire web hosting business with pike and roxen, and I was not impressed with the stability of the roxen web server. The roxen process apparently dies at odd intervals (much like older versions of CERN httpd), and so requires a 'start' script to be running in order to restart it when this happens.

    Another big complaint is the fact that there is no mod_perl equivalent for roxen. At the company I was working for, we had several users who ran their own perl programs, and because roxen could not instantiate a perl vm (like apache does with mod_perl) it had to start a perl process to execute that program. For those of you who did lots of perl stuff before mod_perl came along, you know how bad this is.

    But the argument from the roxen/pike advocates is to tell people to write their code in pike. But it's not that simple. Some people have perl scripts that work just fine...why should they have to convert them?

    I've also had some experience with the way pike handles regular expressions. Perl's RE engine is *much* faster than pike's. If you're doing text processing or pattern recognition, Perl is the way to go.

    I suppose I've gotten spoiled with not having to declare variables in Perl...if you need a variable, you just declare it right there. Not so in pike. It requires explicit declarations at the beginning of the function (be it main, or whatever). Java forces you to do this also, but at least it allows you to declare the variables wherever you need to.

    All in all, I'm still not sold on the combo. My current employer uses apache/mod_perl and perl with some in-house apache modules written in C, all running on linux. I have not seen a more stable setup. It just works.

    Perhaps pike and roxen will mature and be a viable solution in the near term. But I would not stake a business on a non-mainstream technology. The simple reason for this is that there aren't very many people to answer your questions. But pike is fun to play with, and roxen does some really neat things....things that could be integrated into apache with modules, but just haven't been yet.

    Enough of my rambling. Did I mention this is my FIRST POST?

    mp3.com - s/revolt/revolution/g

    1. Re:From a sysadmin's perspective.... by davidhedbor · · Score: 1

      FYI, Roxen 2.0 / Pike 7 has embedded support for PHP4 and Java. There is also a working Perl interface in beta (possibly pre-beta) state for 2.1/7.1.

    2. Re:From a sysadmin's perspective.... by davidhedbor · · Score: 1

      Comment on the regexps: Yes, regexp support in Pike is definitely lacking compared to Perl - regexps is where Perl is better than just about every other languages. There is no denying it. Better support for Pike is planned, but it's not as easy as using a preexisting package since Pike has "invisible" support for 16 and 32 bit strings in addition to 8 bit strings. That complicates things from a regexp engine point of view.

      When it comes to Roxen / Pike stability - Real Networks use it A LOT, and I mean massive traffic. There are generally no problems with stability there, except when the occasional bug pops up (not only in Roxen/Pike but in clients accessing the servers).

      Also, although in raw benchmarks Roxen does perform worse than for example Apache it often works better in real world apps. Also when you start comparing to PHP or Perl, Roxen/RXML/Pike doesn't look that bad anymore.

  58. I thought that was common knowledge by tilly · · Score: 2

    The major problems that happen with multi-threading are largely due to the potential for unexpected interactions. If it is easy to show that there are no undocumented side-effects of a given piece of code, then it is far easier for an optimizer to move around when and where it is executed.

    If there are potential side-effects then it can't do that unless it can prove that the side-effects in point A don't have any interaction (intended or unintended) with side-effects in point B.

    Cheers,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
  59. Re: "ai" by kevin805 · · Score: 2

    I don't remember where I read it, but someone once described AI as "everything we haven't yet gotten a computer to do". Theorem proving isn't AI anymore, because a computer can do it. Similarly, pattern recognition, chess, and natural language queries aren't really considered part of AI anymore.

    Sort of sad for the AI people, though, since any progress they make is immediately removed from their domain of research.

  60. Re:Lisp is NOT a functional programming language by nowonder · · Score: 1

    As somebody who learned Haskell first and fell in
    love with it from first view, I nevertheless find
    myself rather using Common Lisp for rapid
    prototyping. You can just program so much dirtier
    (setf, print, etc.).

    Also don't underestimate Prolog. You might want
    to check out the Ciao Prolog system
    (http://www.clip.dia.fi.upm.es/Software/Ciao/).
    It is good for some surprises.

    Finally Haskell is not the end of it all, too.
    Take a look at Curry, a Haskell-like language
    incorporating the functional AND the logic
    programming paradigm
    (http://www-i2.informatik.rwth-aachen.de/~hanus/ curry/).

    --
    -- NoWonder of WonderWorks/OmegaProject
  61. [Re:sysadmin's perspective] check again! by Stenad · · Score: 1

    Please check the validity of your statements.

    The roxen process apparently dies at odd intervals
    Not anymore, the Roxen team has made a great effort to get things stable.

    there is no mod_perl equivalent for roxen
    There is now, and inline PHP and Java for the Roxen server. Hopefully the feature will surpass Apache stupid limitations on how many perl-modules you can have (I have not tried the thing yet...).

    It requires explicit declarations at the beginning of the function
    NO it does not! Check the documentation again. You can declare and re-declare variables anywhere and initialize them with any construct!

    1. Re:[Re:sysadmin's perspective] check again! by verx · · Score: 1
      The roxen process apparently dies at odd intervals
      Not anymore, the Roxen team has made a great effort to get things stable.

      Tt still crashes. Roxen 2.0.50 on FreeBSD 4.0
      Sometimes strange things happen with Roxen.
      But i still like it and hope it will develop into a very stable and featureful web server.

    2. Re:[Re:sysadmin's perspective] check again! by schon · · Score: 1

      The 2.0 series is still a development version - major portions of code have been rewritten, and the instability should be expected.

      Try 1.3.122, I'm sure you'll find it very stable.

  62. Of course its common knowledge! by extrasolar · · Score: 2

    I often find myself asking people on the street about programming multithreading. I must *really* be dumb because the stupidity of my question causes blank stares.

    Probably because I am an American.

    :)

  63. 575, you rock! by tamarik · · Score: 1

    THese jokers saying Haiku is limited to these silly rules of syllables and such? English teachers in elementry school tried to teach us this 'way'. Haiku expresses a thought; that's all. With economy. 575, I hope you don't mind my repeating some of yours. Rythym and lingering content; light, pleasent taste.

    Thank you

  64. Re:About Pike. (long) by kinkie · · Score: 5

    Pike is close to java in that they are both follow C syntax somewhat, extending it to OO concepts.

    It is unlike java in that while Java is strongly typed and you have to use typecast, Pike is as strongly-typed as you wish. You can use the mixed type to completely defeat any typechecking, or you can use classes and call them by name to be as strongly-typed as you wish.
    Also notice that pike's concept of "class compatibility" is somewhat different from all other strongly typed OO languages, as it doesn't call into play inheritance. If two classes have similar signatures (names and types of public methods and variables), they are compatible.

    Another novel approach Pike has is to function and operator overloading.
    With C++ (and Java, if I remember correctly), overloading is defined by having different functions take different numbers and types of arguments: i.e.
    void foo (int arg);
    void foo (char* arg);
    They are distinguishable at compile-time because the function signature is extended to its arguments' types, usually via name mangling.

    Pike insteads allows arguments to be of different types. The above example would translate to:
    void foo (int|string arg).
    The programmer can then use runtime type information to discriminate.

    Pike has both refcounting and garbage collection. It is quite uncommon to see the gc in action, as it will kick in when some percentage (I think half) of the object references are deemed garbage (it uses some adaptive algorithm to determine when to run). Or when explicitly invoked.

    About static typing, see above. It can be as strict (or as lax) as the programmer wishes. It is refreshing to have some "mixed tmp" variable in a function and use it for loops etc.

    About control flow structures, it has some more than C (i.e. foreach()).
    The preprocessor if used wisely can be a nice weapon. For instance, you can detect the interpreter's version and use threads when possible. Of course, this also means that it allows people to write messy code. But they'd do it anyways...

    It can be as dynamic as you wish. For instance, setting a method of another object can be done using a "function"-type variable:

    class foo {
    private int foo_bar() {
    werror "foo";
    }
    function bar=_bar;
    }
    class gazonk {
    private int gazonk_bar() {
    werror "gazonk";
    }
    object foo_object=foo();
    void create() { /* constructor */
    foo_object->bar=gazonk_bar;
    }
    }

    I could have also used anonymous functions (lambda) here.
    i.e.
    function foo_bar=lambda() {werror "foo";}

    A nice thing about the language is that it doesn't try to hide details from the user. It is known what is handled by reference (every composite type, classes, objects, functions) and what is by value (basic types). It allows runtime inspection (via the indices, and typeof operators), remote objects, etc.

    Since functions are primary objects, the whole runtime library follows a very consistent callbacks-based approach. This comes very handy when doing asynchronous I/O (one of Pike's strong points) or GTK programming.

    About its "product placement" in terms of heavy-ness. It has some at-large programming helpers (more than TCL), and its syntax is less shell-ish than TCL's. Perl is IMO simpler for very simple tasks, but heavier for more complex ones (especially when need to go further than the string-array-hash types, and references come into play. Pike is much easier in this respect).
    Python, I don't know really.I've never used it. I suspect that Pike and Python play roughly in the same league, neither clearly besting the other. I find Pike very convenient in I/O-related task, X programming (although here TCL/TK is better), and some simple text-manipulation tasks, requiring little text manipulation and a bit of variables-juggling.

    About the runtime environment, Pike offers a two-pass compiler (no forward declarations), a mixed static+dynamic names binding model (intra-object references are static, inter-object they are dynamic), and a nice (but not comparable to CPAN) runtime library, including some nice DB-connectivity options.

    --
    /kinkie
  65. Ruby by adnt · · Score: 1

    If you want a real OO scripting language, pick Ruby www.ruby-lang.org, avoid C-like pike.

    1. Re:Ruby by brycedooley · · Score: 1

      I really like Ruby but I really wish it supported compiled code like in Python. A .py vs. a .pyc

      Maybe someday.

      --
      I have the substance of things hoped for. I have the anticipation of things unseen.
  66. ... and then there's vi by Mr+Z · · Score: 1
    Well, maybe you know this, but you can actually do that in python. "if a: b()" is valid.

    Well, at least that much is cool. And yes, I was aware of it, but only recently.

    Now if there were only a way to tell vi how to "indent block" and "unindent block" when the language lacks explicit block delimiters, then perhaps I'd be happier about it. (I'm a heavy user of the vi key sequences >% and <% to indent and unindent blocks.)

    I'll stop careening offtopic now. :-)

    --Joe
    --
    1. Re:... and then there's vi by FFFish · · Score: 2

      AFAIK, there is a vi macro set that does do automagic indentation.

      I could be completely wrong, having never used it. But I can't imagine there's much point to having it if it doesn't do that.


      --

      --

      --
      Don't like it? Respond with words, not karma.
  67. Re:Lisp is NOT a functional programming language by greenrd · · Score: 1

    What you say may all be true, but it still has Lots of Irritating Silly Parantheses.

    In other words, it tends to be harder to read (and write) than say Java.

  68. Another Paradigm by Tom7 · · Score: 1

    My current favorite is the functional paradigm as seen in ML and Haskell and OCaml. Lots of people find this bizarre, but after a little practice (took me about a semester and a half -- I hated it at first) I can hardly bear to use anything else. For a little evangelism from Bell Labs (including some of ML's other unprecedented features), check out:

    http://cm.bell-labs.com/cm/cs/what/smlnj/sml.htm l

    Actually, last year I did my final project for computer graphics (a ray tracer) functionally in ML. It was pretty slow (mainly due to vector bounds checking -- so it would be slow in Java too, for instance), but it wasn't really that hard to do.

    Another reply to this message lists some other interesting (slightly more obscure) ideas that could wind up in languages of the future.

  69. (OT) Christopher who? by yerricde · · Score: 1

    ...

    --
    Will I retire or break 10K?
  70. Re:WTF? Why has this been moderated up to 4? by roman_mir · · Score: 1

    Well, do you often see comments that generate over 50 responses?

  71. (OT) After haiku... by yerricde · · Score: 1

    ...limerick is the most common verse form on weblogs. A limerick is a five-line poem with rhyme scheme aabba and largely amphibrachic 3-3-2-2-3-meter.

    ObPike: what's it got that python hasn't got?

    --
    Will I retire or break 10K?
    1. Re:(OT) After haiku... by eMBee · · Score: 1
      ObPike: what's it got that python hasn't got? c-syntax and typed variables.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  72. LOL (Re:Yeah, but what does it have to offer? by FFFish · · Score: 2

    Touche'. :-) I wish I could give you a moderation point for funny, even if I had to steal one from my own posting.

    --

    --

    --
    Don't like it? Respond with words, not karma.
  73. Re:Language performance comparisons(was:Yeah, but. by Jonathan+White · · Score: 1

    The above is misleading in that in uses the Blackdown JDK as opposed to one of the optimized IBM JDKs.

  74. Re:Lisp is NOT a functional programming language by schani · · Score: 2

    Does Lisp have referential transparency? Yes, of course, if you abstain from using side effects.

    Does Lisp allow side effects and sequenced statements? Yes, of course, if you are willing to give up referential transparency.

    Does Lisp have strict typing? No, it doesn't. On the other hand, Haskell does not have dynamic typing or does it?

    Does it have universal lazy evaluation? No, of course not. If you need lazy evaluation, you can use it. If you don't, don't.

    Does it automatically curry functions? No, it doesn't. If you need it, do it yourself. Currying is also not easy when you have advanced lambda list features like keyword and optional arguments.

    Plus, Lisp has a feature I haven't seen in any other language: The defmacro facility. It practically allows one to invent a new language for the problem at hand. This is something that no Lisp-bashers seem to even acknowledge. I wonder why...

    Lisp is not a language that forces you to do something in one an only one way. If you want to program imperatively, do it. If you want functional programming, you can do that also. Use lazy evaluation if you need it, not because you have to.

    bye
    schani

  75. Pull out your search engine :-) by tilly · · Score: 1

    Seriously, closures are a very specific notion. If you have not seen them it will take you a while to understand what they are, and longer to see why people want them.

    Why not start with some documenta tion? I have neither the ability nor the desire to fully explain an entire philosophy of programming in a brief post. Go and read a FAQ if you want to start down that path.

    If this seems needlessly arrogant, ask yourself a question. If you wanted to make a comment on the calculus in a forum where some are mathematicians and some are high-school students, would you feel it sufficient to mention that your comment only will make sense to people who understand calculus? This situation is exactly parallel to that.

    Cheers,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
    1. Re:Pull out your search engine :-) by kovi · · Score: 1

      >If this seems needlessly arrogant
      Nope, it's just that I didn't consider closures as a "basic programming notion" for perl. Neither did documentation from the links you provided...

      >forum where some are mathematicians and some are high-school students,

      /. isn't such forum and discussions are open to anybody... So is perl or Python, anybody can use them...
      Therefore the arogance is not that you bashed me for not reading docs, the arogance is that you were lazy enough not to _explain_ your point. This situation is exactly in parallel to the infamous 'Me too...' "discussions" form Usenet. Specificly, you message reads "I also think Python has problems and lacks certain features considered as basic in the other languages"
      Because of that, some people think your comment is void. In contrast to the message from dejanews you found...

  76. Not quite so simple by tilly · · Score: 1

    First I think that few people who didn't already know what closures are could make heads or tails of your description. Certainly the concept of having multiple functions out there returned from the same one, each with independent data takes getting used to. The related idea of having multiple functions, each sharing specified data while not sharing other data is even more complex.

    As for OO vs closures - that is really a question of philosophy. An OO philosophy encourages a particular structure on your code where all of your configuration information winds up scattered across your various class definitions. But in real life often you want to have some of that per class configuration information hidden away, but you would like to centralize other parts of it.

    For instance when you are dealing with reports, the per field definition of where that field is coming from, what data validity checks you have on it, etc is all stuff that really should be centralized. OTOH per field information about how its display should be formatted, what column headings to use, etc is stuff that you want to centralize, periodically reorganize, etc.

    I personally find that a functional approach lends itself more naturally for me to choosing to centralize display information into a single nested data structure. Yes, there are OO patterns to do the same thing. They look very ugly to me. For me having that choice is a win. But explaining that is more than a question about length of code. It is a philosophical comment

    I have a friend who migrated from Perl to Python back when Python was able to treat regular expressions as first class objects and Perl did not. (It does now.) He commented to me a while ago that Python people claimed that anything you could do with closures you could do just as well without them in Python. He doesn't quite agree. Here are his thoughts.

    Cheers,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
  77. You guys are just now finding this thing??? by Brew+Bird · · Score: 1

    I have been enoying the ease of use with Roxen since 1996 or so... It has come a LONG LONG way since then... I think the 'coolest' thing about the web server was how it handled shell type scripts as CGI... pipeing a traceroute to the output for a web page actually resulted in roxen holding open the HTTP connection and 'streaming' the output to the browser, as opposed to apache, which buffered the output and then sent it as a page update...

    People thought it was the coolest hack they had ever seen! (and they all though I was doing something cool with CGI baahahaha)

    As usuall, we get some people who will automaticly slam anything that they don't know much about. So be it. Your opinion will be logged as being worthless, and your reputation for lacking intellectal honesty will haunt you forever...

  78. Re:Scriptlanguages are bad by Alan+Daniels · · Score: 1

    And also TCL, just to be fair (even though I like Python better). :-)

  79. Re: "ai" by gaw · · Score: 1

    Theorem proving in most cases has never been a part of AI research. It is possible to implement a theorem prover using AI principles, but most real theorem provers work through applied a rigerously developed formal system, which is very much unlike how a human generally tries to solve the same sorts of problems.

  80. Re:Lisp is NOT a functional programming language by Tom7 · · Score: 1


    Haskell certainly does support data tagging ("dynamic typing"), but you're not forced to use this feature. There's no way to statically check lisp programs for type safety or to avoid runtime type-checks.

    The defmacro facility can be simulated pretty easily in Haskell because of lazy evaluation. If you're an ML fan (like myself) and use strict evaluation, all the functionality you'd need here can be simulated (a little bit less prettily, but then again you don't have all those parentheses!) with infix operators and suspended computations.

    One other serious shortcoming of lisp (that's even in such underachieving little brothers as Java) is the inability to hide the representation of data structures. Ouch.

    I wont treat lisp as heavy-handedly as our friend here does, but it really isn't as advanced as the two most popular functional languages Haskell and ML. Mainly this is because of its extremely simplistic (elegant, maybe) type system. It's a great historical piece and even occasionally useful today as a scripting language (viz: emacs), but it's not the language of the future.

  81. Type System by Tom7 · · Score: 1

    A type system allows your code to be statically checked for consistency. The links you've given us are lisp references. Lisp just has two types: atoms and cons cells.

    Ever get an "undefined" variable at *run time* with a lisp program? That kind of nonsense doesn't happen with modern programming languages, and that's because of their type system.

  82. Re:Lisp is NOT a functional programming language by stevey · · Score: 1

    Still without Lisp how would we customize our Emacs?


    Steve
    ---
  83. For all you ex- and current Mudders by Sabby · · Score: 1

    One nice thing about Pike is that its based on LPC, which if any of you are LPMudders, can be a good thing. A lot of us wasted a lot of our college (and post college) years programming in LPC ... and then to suddenly have that skill turn into something useful. Whoooiie!

    1. Re:For all you ex- and current Mudders by eMBee · · Score: 1
      indeed!
      if you are an lpc-programmer looking for a job, there are companies out there looking for pike programmers

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  84. It isn't? by tilly · · Score: 2

    Fooled me!

    First of all when I say "basic programming notion" I mean in general. Not for one language or another, but rather a notion that will come up in many languages.

    It doesn't happen in C. It does in JavaScript. It doesn't in Java. It does in Smalltalk. It doesn't in Python. It does in Perl. It doesn't in VB. It does in Lisp.

    Perl is specifically designed to allow "baby-talk". This is considered a feature. So you can program in Perl without knowing what a closure is. But if you don't know what a closure is, you won't know what lexical scope is. If you don't understand the difference between lexical and dynamic scope then you won't understand what the different between my and local is. If you don't understand that difference then you won't understand why Perl gurus keep on telling people to use my instead of local, and why use strict encourages people very strongly to do that. And if you don't understand that, then you will suffer needless pain from time to time.

    As for what /. is, yes it is a forum with many people of different backgrounds. Like it or not, sometimes someone will have a point to make and that point will make no sense to people who do not understand a lot of concepts like "closure", "lexical scope", and "functional programming". There are lots of people who understand all that, and lots who do not. So I specifically said that my comment was one that would only make sense to people who had been exposed to functional programming.

    Regards,
    Ben

    --
    My usual seat in the cluetrain is at A HREF="http://pub4.ezboard.com/biwethey.ht
  85. Re:He's probably a Perl programmer. by Snafoo · · Score: 1

    Whitespace;What->is($this{whitespace})@f_which||qr /youspeak?/;

    --
    - undoware.ca
  86. proper but not proper by 10am-bedtime · · Score: 1

    "bad" from wasted words follow syntax 'til you bleed sweet strong blind rushing

  87. Yet another C clone? by QBasic_Dude · · Score: 1

    Pike tries very hard to be C, too hard in my humble opinion. Programming languages are tools -- they should be useful instead of trying to imitate popular programming languages. Why not use C instead?

    1. Re:Yet another C clone? by eMBee · · Score: 1
      because in c you have to deal with memory handling, no string type, no oo, need to compile, no runtime evaluation, no weak typing...
      for me, plenty of reasons not to use c.

      greetings, eMBee.
      --

      --
      Gnu is Not Unix / Linux Is Not UniX
  88. Note from the author by profezzorn · · Score: 1
    Thanks everybody, it seems I don't have to do much to defend my language, since people who use it seems to be doing it for me. :)

    To all of you who have downloaded Pike I would just like to point out that you can email me at hubbe@hubbe.net if you have questions, or you can speak with me interactively at the roxen developers chat, which can be found on the Roxen community website. Happy hacking.

    Fredrik Hubinette
  89. Could've fooled me... by smurfi · · Score: 1
    or pass a bound method "m=o.callbackFunction", and later call "m(args)".

    That's exactly what a closure is -- you use a function "m" which is dynamically bound to some kind of environment. Whether that environment happens to be an object, or just some variables which have been conveniently defined in the code lines surrounding your function doesn't really matter.

    Perl just is damn convenient in that it lets you use both concepts equally easily. With Python you need to go the object-ish way when your program's logic becomes sufficiently complex.

    NB, the Perl way to code up the above m is

    $m = sub { $obj->method(@_); }

    ...

    $m->(args...)

    which arguably doesn't look as nice as the Python way, but (IMHO) that's a feature because I see better what's really happening.

  90. Verse writer in Bud drinking shock! by Lemm · · Score: 1

    He's a Bud man, eh?
    In that case, I must proclaim
    to the guy: "WAZZZZUUUUUUUUP!"

    --
    No boom today. Boom tomorrow. Always boom tomorrow. BOOM!