runjake
10 months ago
Lots of people questioning what Pike brings to the table. Be aware that Pike has been around for over 31 years[1]. It's kind of dead now and a lot of people have moved over to Lua[2] (which is over 32 years old!).
So long ago, that it took me a minute to recall having programmed a lot of CGI code with it, back in the Roxen web server[3] days.
1. https://en.wikipedia.org/wiki/Pike_(programming_language)#Hi...
lysace
10 months ago
It was great for certain niche applications, like:
* The Roxen web server
* The Opera Mini backend service (150k CPU cores, 5k servers, 150k pageloads/s, 3 million inline fetches per second, 100+ Gbit/s - 15 years ago)
I worked on both of those projects. Now I mostly program in Python. It's perhaps like 10x slower to run on average but since it won there's a module or three for anything so building stuff is faster.
Yay progress.
mrweasel
10 months ago
> since it won there's a module or three for anything.
I was just browsing the "Module tree reference" for Pike. There seems to be a crazy amount of modules for the language. Weirdly enough for web there's only CGI (and WebSockets for some reason), and the CGI module isn't really documented. Under protocols there seems to be everything I ever need.
lysace
10 months ago
We kind of went crazy with protocol support, starting early on. It was a good way to learn the protocols in depth. The late 90s was an exciting time. It eventually became a defining feature of the language's library.
But we were too busy having fun building the language to "market" it. This became a pattern.
nine_k
10 months ago
Python won because of its C interface was easy, so it's got Numpy, Scipy, Pytorch, OpenCV bindings, etc. For these use cases, the speed of the interpreter is mostly irrelevant.
On the web dev front, Python was lucky to get easy bolted-on async I/O (via greenlets), so it was more performant than Ruby (which was really slow 10 years ago), and Django was less magical than RoR.
yobbo
9 months ago
No, python had already won by the time django and numpy started.
Pike's C interface is better in most ways, but of course that might depend on tastes.
Python's easy syntax, accessible documentation, books and tutorials make the learning experience completely different. It's an excellent choice for low-effort small scripts and short-lived projects. It became widespread. At some point it started to be the chosen language in schools. Numpy and django (etc) followed from that.
Pike with modernised syntax (something like Swift?) could have been a contender web-language maybe 2005-2006 at the latest.
Pike's learning experience was always less welcoming. The module tree reference is great though.
em-bee
10 months ago
pike's C interface also looks very good. pike had built-in async I/O from the very beginning. the roxen webserver is built on async I/O. it doesn't fork, and on an overloaded system it is one of the last services standing because of that.
python likely caught up and overtook pike because it had better community support. one downside of pike is that it is slow to start, making it less convenient for quick scripts, which python was a lot better at, so python was more likely to replace perl in sysadmin work where short scripts matter more further helping its popularity.
mananaysiempre
9 months ago
Compared to its closest once-competitors—Lua and Tcl—I’d say CPython’s C API is the worst of the bunch, ergonomically speaking. (Can’t say anything about Perl.)
em-bee
10 months ago
pike and lua are nothing alike. it is more somewhere between python and java (kind of like a typed python). it may be comparable to go in some respects.
pike is suitable for large high performance standalone applications. basically everything that you would use python for as well but faster.
pike is also still under active development and maintenance, so far from dead.
minda
10 months ago
Why is it likely currently receiving traction on HN? Is there an effort to revive it amongst developers, or has something changed that would make it more relevant now?
forgotpwd16
10 months ago
Once every 2 or so years it's posted and upvoted due to appearing interesting ("dynamic language with C syntax", and perhaps other characteristics/features). Not really receiving traction. That said the language is mature enough, still gets updates, and there're meet ups so can assume there're developers using it.