Live data from Hacker News

Pike – a dynamic programming language with a syntax similar to Java and C

pike.lysator.liu.se

61–70 of 75 posts

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#61
post #23

Brings back some memories of the webserver Roxen that had a GUI, if I remember correctly. It still seems to be semi-alive, although the download page looks broken. https://en.wikipedia.org/wiki/Roxen_(web_server) EDIT: Github repo https://github.com/pikelang/Roxen

the problem is that the owners of the roxen company are not interested in the community. that was a change that happened more than 20 years ago, and some believe that it was the downfall of roxen and pike as FOSS products.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#62
post #50

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... 2. http…

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.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#63
post #62
post #50

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... 2. http…

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. Y…

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

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#64

the question i always ask: WHY anther language.

Well, I mean you'd have to ask that regarding: Java, C#, Rust, Go, and so many other languages, they are all younger. Why create those when Pike, C and Perl was already around?

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#65
post #62

Earlier quoted context omitted.

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. Y…

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

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.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#66
post #59
post #50

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... 2. http…

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?

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.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#67
post #62
post #50

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... 2. http…

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. Y…

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.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#68
post #67
post #62

Earlier quoted context omitted.

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. Y…

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.

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.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#69
post #7

Of all the strengths that Java and C have, I would not call syntax one of them. :) So this title seems quite strange. Not the sales pitch I would make. It is understandable though, considering this language is 30+ years old. Probably not the decision you would make if you were to design it today: Switch statement with labels+fallthrough instead of a switch/match expression (even Java replaced that one with a switch e…

pike is based on LPC which stands for "Lars Pensjö C" which was developed in 1989. at the time C dominated the language landscape. sufficiently popular alternatives were BASIC, pascal, lisp, smalltalk, TCL and perl. i don't think there was much else. at least in the unix world. lars probably was familiar with C and that's what he based the language on. i think python was really the first non-C-like language that became very popular.

i am not a fan of the C syntax myself, but at the time, i was mostly familiar with it, and i wasn't even considering the idea that there could be a better syntax.

later though i did develop a preparser that would allow me to write pike in a python like syntax. it was a hack made as an april fools joke. but it was actually working. it was called nessie.

Re: Pike – a dynamic programming language with a syntax similar to Java and C

#70

Earlier quoted context omitted.

From what I remember of working with Pike, the best part was probably the included image module. Maybe I will install Pike again just to see if I still like it. https://pike.lysator.liu.se/docs/man/chapter_13.html

Turns out there is no Pike package for FreeBSD, no port, and the Pike git repository has a FreeBSD subdirectory last updated 22 years ago. But ./configure && gmake && gmake install seemed to work, or at least it runs and nothing weird has happened so far.

pike used to be in bsd ports. probably the maintainer stopped working on that. it is still being tested. it builds but currently the testsuite fails:

http://pike.lysator.liu.se/development/pikefarm/8.0.xml

http://pike.lysator.liu.se/development/pikefarm/9.0.xml

if you dig through you'll find 3 or 4 failed tests out of thousands.

Post reply on HN