News for hackers. Stuff that matters.
Re:Pike Programming Language by macintux on Friday May 20, 2022 @06:26PM (#31453285)
Haven’t figured out what its value proposition is, but the about page has more details than the homepage.

https://pike.lysator.liu.se/about/

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @03:43AM (#31456056)
the key value for me is that i can replace compiled code at runtime. this allows to build large long running systems that can be changed without needing to restart. this is a feature that comes out of LPC which was designed for online games where it was necessary to add new content and fix bugs while the game was running since the developers of the game were the advanced players themselves.

roxen uses that to allow reloading modules. the way it works there is that any currently active instances keep running with the old version, but new instances get the new version. since modules are freshly instantiated for each http request this works very well.

there is also open-sTeam which went a step further to use proxy objects, that is, any sTeam object is a proxy to the actual pike object, so my code will only reference sTeam objects which allows the pike objects in the background to be replaced without my code needing to update the object reference because the proxy handles that behind the scenes.

open-sTeam is not actively developed anymore by its original developers, but there is a copy of it here: https://gitlab.com/societyserver/sTeam and i still maintain and use it for myself. (i have added a half-assed REST API so i can do modern web development with it. (realss.com is an example of that. i can connect to sTeam using vi to update the text content and custom code (which is stored inside sTeam as source too))

besides in pike and LPC i have only seen the ability to update code at runtime in smalltalk and lisp. i am not aware of any other language offering something like that.

Re:Pike Programming Language by BuGlessRB on Saturday May 21, 2022 @09:54AM (#31457934)
On a related note, I have created the SPike daemon: git://devel2.cuci.nl/spike .

It's written in Pike, is being actively maintained, with roughly the following featureset:

- Meaningful error messages on compiled modules.

- Smart auto-recompilation of modules (mtime based).

- Auto-fallback to last-known-good modules on compilation failure.

- Two classes for module development: Spike.Base and Spike.Site

  + Spike.Base implements a log() and listenport() primitive.

  + Spike.Site adds filesystems, databasepools and a configuration system
    per site.
- Live configuration reload through SIGHUP (no downtime).

- Integrated HTTP and WebSocket dispatch engine.

- Transparent proxy support.

- Auto-gzip compression on both static and dynamic content.

- Integrated and configurable logging mechanism to syslog.

- Completely Shuffler-ised (maximal offloading of communication overhead to pure C and the kernel).

- Less filling: 29KB of source code (single file).

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @12:29PM (#31459286)
interesting, is there more documentation, examples?

are there similar systems in other languages so people can get an idea what to compare it to?

btw, welcome to hackernews.

everyone, if you didn't already recognize the nickname, BuGlessRB is famous for being the creator of procmail :-)

Re:Pike Programming Language by BuGlessRB on Saturday May 21, 2022 @03:02PM (#31460782)
I have several active implementations now (in active use for the past 2 years), I guess I could easily water some of those down into a few examples.

With regard to similar systems... Good question. Comparable solutions:

- Ruby Passenger daemon. Almost feature parity with the Enterprise version, except for the "cool robot logo".

- Python Flask framework.

- Apache with mod_php or php-fpm.

- Roxen.

With respect to procmail, yes, indeed, and I picked up its maintenance again, and released a new version recently.

Re:Pike Programming Language by BuGlessRB on Saturday May 21, 2022 @10:00AM (#31457994)
Another related note, I created Remixml, a descendant of RXML in Roxen, but now Javascript based (client side or NodeJS):

https://www.npmjs.com/package/remixml

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @12:34PM (#31459323)
nice, i have been waiting for someone to make that. it's the logical next step of the evolution for RXML
Re:Pike Programming Language by LargoLasskhyfv on Friday May 20, 2022 @06:48PM (#31453498)
1998:

https://www.linuxjournal.com/article/3012

> The Roxen Challenger HTTP Web Server is a marvel ahead of its time. That's a bold, hard-to-prove statement for a web server when compared to the amazing success of the Apache HTTP Server. Before you stop reading, you should consider that there is nothing wrong with having two subtly different, yet very good tools.

Re:Pike Programming Language by randallsquared on Saturday May 21, 2022 @06:57AM (#31456835)
Roxen was definitely far easier to use than Apache, but PHP was a second-class citizen on Roxen, and "Roxen including RXML and Pike" was directly competing with "Apache plus mod_php" (and/or ColdFusion? I never used that, so not sure) though I don't know that the creators understood that at that time.

There were a number of contributions to Roxen's oblivion, to include

RXML was a very high level XML-based scripting language, but you had to drop to Pike to do some things; PHP was a single language that was clunkier than Pike but didn't seem like two separate languages to learn.

Since Roxen started so early, there was some terminological divergence already in 2000 between it and the rest of the webserver world.

Roxen created a 2.x of the web server and RXML syntax that was notably nicer and more modern-seeming, but also much slower for some use cases, so some Roxen 1.x users resisted upgrading -- so much so that when the company gave up, the community-maintained Roxen, Caudium, was based on 1.x, not 2.x, even though 2.x had been out for many years.

From the outside perspective, Roxen seemed to treat consulting or enterprise sales as its bread and butter, in which the webserver was a sort of force multiplier or secret sauce, which directly conflicted with a goal of growing the Roxen user community.

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @08:10AM (#31457172)
I don't know that the creators understood that at that time

yes, this is right, this was not well understood. part of the problem was that the concept of web development frameworks was not established yet. later it would have been easier to say that roxen competes with frameworks such as django or rails, but at the time roxen was promoted as a webserver, and so people expected a drop-in replacement for apache. in fact, roxen might have done better if it had been using apache as a http protocol frontend.

in a sense roxen/pike suffers the same challenge as smalltalk and lisp do today. you can do powerful things in those languages and environments, but they don't fit into the mold of what everyone else was doing. you kind of have to give up your existing ecosystem and start from scratch learning new tools and concepts.

RXML was a very high level XML-based scripting language, but you had to drop to Pike to do some things; PHP was a single language that was clunkier than Pike but didn't seem like two separate languages to learn.

i wouldn't see it that way. anyone who learned programming could see that html/xml/rxml was not a programming language but sophisticated markup.

for some time there were two camps, those that wanted code and markup mixed in one file, and those that wanted to keep it separate.

php favored the mixed approach and python went for the latter. roxen with pike also was firmly in the latter camp.

however it seems that it took a while before the latter approach became more popular and by that time multiple alternatives such as python and ruby were available.

Caudium, was based on 1.x, not 2.x, even though 2.x had been out for many years.

i was part of that team. the primary issue was not performance, but compatibility. roxen 2 could not handle some of the more complex rxml people had created with roxen 1.

the most notable reaction i remember that per hedbor, the primary developer of roxen, was disappointed that we had forked roxen 1 and not roxen 2. he was understandably and rightfully proud of his work. but unfortunately it took some time before roxen 2 was able to achieve enough compatibility with roxen 1 to make a lot of old rxml work in roxen 2. another notable detail is that the fork was lead by his very brother david.

and for the curious, the name caudium came from us looking up the word "fork" in a latin dictionary. we didn't find a nice sounding translation, but there was this reference of a roman town near a river-fork whose name we all liked, so that is what we picked.

Re:Pike Programming Language by randallsquared on Saturday May 21, 2022 @09:21AM (#31457645)
Hey, thanks for the corrections and clarifications!

> anyone who learned programming could see that html/xml/rxml was not a programming language but sophisticated markup.

Leaving aside the "pike" tag, I guess I agree... my original statement was based on the path dependence of having written my first ever production application "in" RXML. ;)

Re:Pike Programming Language by BuGlessRB on Saturday May 21, 2022 @03:27PM (#31460967)
Well, I concur; back in the days, I have created quite a few websites with business logic in RXML.

I'd think that both RXML and its Javascript based successor Remixml are both Turing complete and can be used as generic programming languages (within reason). Which is not to say that creating complicated applications in those languages is a good idea.

Re:Pike Programming Language by WalterGR on Friday May 20, 2022 @06:53PM (#31453551)
> you should consider that there is nothing wrong with having two subtly different, yet very good tools.

It's amusing that this needs to be said when writing for a particular audience.

Re:Pike Programming Language by IshKebab on Saturday May 21, 2022 @03:42AM (#31456051)
Well it is wrong. There is something wrong with having two subtly (depending on how subtle it is) different tools. There's duplication of effort, community split, interoperability hassles (depending on the something), extra support burden if other people have to support both, etc.

I don't think anyone would agree that having 110V, 220V, 50Hz and 60Hz is good. Or subtly different railway gauges. Or Windows and Unix style line endings.

There are a couple of upsides too - increased competition, backup in case one project goes in a crazy direction, etc.

But it's silly to pretend there's nothing bad about it.

Though anyway in this case I think "a marvel ahead of its time" is not a "subtle difference".

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @03:49AM (#31456084)
roxen and apache were not two subtly different tools, they were, and still are, miles apart. the way you use them and develop for them is completely different. roxen not only replaces apache but also perl, php or any other language that you develop your websites with. therefore roxen does not even compete with apache, but it also competes with laravel, django or rails. the fact that those later frameworks need apache to serve their content is rather incidental.

rails was first released in 2004. django in 2005, laravel in 2011. i used roxen (and it's predecessor spinner) in 1994!! that's literally a decade earlier. i think the only possibly competing tool available at the time was cl-http in lisp[0]. (AIDA/Web for smalltalk was created in 1996, as was WebObjects, Java EE came in 1999. that's all i could find so far)

[0]: at the time i was looking for a better alternative to the available ncsa and cern webservers. i remember ordering a student version or something like that of franz lisp so i could try it. and i was put off by having to write lisp code just to serve static files. that was what made me keep looking until i found spinner.

Re:Pike Programming Language by IshKebab on Saturday May 21, 2022 @10:09AM (#31458079)
> roxen and apache were not two subtly different tools, they were, and still are, miles apart

Yeah that's what I suspected (read to the end of my comment).

Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @12:45PM (#31459446)
right, my bad. i should have acknowledged that.
Re:Pike Programming Language by em-bee on Saturday May 21, 2022 @04:19AM (#31456208)
i see more upsides to multiple similar tools:

the ability to try different approaches to solve the same problem

avoiding lengthy arguments over how to implement a feature

the ability to take risks in the development

...

imagine we'd all be stuck with sendmail or perl.

of course when you get to the 10th video editor it starts getting ridiculous. there certainly are some areas where i wish some projects could join forces to create better results.

Re:Pike Programming Language by nazgulsenpai on Friday May 20, 2022 @07:28PM (#31453841)
I don't follow; are you implying Linux users (the particular audience) don't like having multiple tools for specific use cases or that the author's statement goes without saying?
Re:Pike Programming Language by cschep on Friday May 20, 2022 @10:32PM (#31454773)
Often when there are two (or more) very good tools for a single task (e.g. editing text) there breaks out a Holy War, rather than people being happy for each other to use their preferred, each excellent in their own way, option. Seems to me this is what the parent comment is nodding to.
Re:Pike Programming Language by WalterGR on Sunday May 22, 2022 @10:46AM (#31468753)
Precisely.

Checking more recent comments, it looks like a Holy War has broken out over whether there should be Holy Wars. Priceless!

Re:Pike Programming Language by macintux on Friday May 20, 2022 @08:46PM (#31454253)
I wasn’t trying to denigrate it: I was genuinely curious what it’s good or bad at.

Every language has a reason to exist, although for many it’s simply because it can.

Re:Pike Programming Language by forgotpwd16 on Friday May 20, 2022 @07:08PM (#31453681)
It's a descendant of a language used for multi-player adventure games originating in early 90s. Guess its value will be it being a C look-alike scripting language. According to its comparison page compared to Python "is faster, has a more advanced type system, and better support for OOP".
Re:Pike Programming Language by diggernet on Friday May 20, 2022 @07:08PM (#31453676)
That's a great question. I know I'm looking forward to reading HN thoughts on it.

For my part, as someone who has only dabbled in it, I can say that it appeals to me though I have difficulty elucidating why. I think partly because it is well suited to creating servers, due to its background in MUD and WWW servers.

Re:Pike Programming Language by tored on Saturday May 21, 2022 @08:57AM (#31457453)
Good question, perhaps strictly typed dynamic C like language with an event loop and a large standard library.