Live data from Hacker News

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

pike.lysator.liu.se

41–50 of 75 posts

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

#41

Earlier quoted context omitted.

I mean let's be fair: back then MUD nerds were using LambdaMOO's "moo" language and LPmud's "LPC" before things like Python were mainstream or serious, Perl pre-5.0 was terrifying and limited, and Ruby wasn't even on the radar. So when we went to go do "serious" work we kinda missed them. Your options in 1991, 92, 93 were earlier perls, shell + awk/sed, or maybe tcl or a lisp/scheme if you were lucky . The languages…

LambdaMOO was ahead of its time in many ways: lists are immutable, but there was a handy splice operator. Verbs could have aliases and wildcards or both, allowing for some interesting namespace-like behavior. Would have been nice if they could have completely decoupled the built in parser before development died off, but it should be a pretty simple task nowadays, and some places like E_MOO managed to soft-code some…

LambdaMOO versions from sometime in the mid-90s and up (and offshoots like ToastStunt and also my rewrite, mooR) let you override the builtin parser with $do_command.

And the builtin one I wrote in mooR is built to be pluggable (Rust trait) so should be possible to swap it out.

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

#46
post #29

Pike is described as a "dynamic" language, so I was expecting purely dynamic typing, yet the language uses Java/C-style variable declarations with explicit types. It seems that these are (unsound) type hints , years before TypeScript made them cool: > "If your program tries to put one type of value in a variable which was designed to hold another type of value, Pike may detect this" [emphasis mine] https://pike.lysat…

Not sure what they are referring to, but it may be that you can declare things as having one of several types (e.g. int|string|void) or even that something can be any type at all (i.e. turn off static type-checking for that thing)? I do not think the type-checker will ever randomly decide to just not check a type given that you have provided types for it to check, but it was a long time ago since I had to read or wri…

Looks like there’s a `mixed` type, variables of which can hold values of any type. But at least that’s something you can `grep` for.

A more subtle issue with type hints (as in TypeScript/Python, not sure if this applies to Pike) is that there are ways to work around the type system. You can get, for example, a variable of type `int` that actually holds a `list`:

https://news.ycombinator.com/item?id=43508152

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

#47

the question i always ask: WHY anther language.

.

You realize that you're on a site that is mainly for programmers, right? Programmers are often interested in languages, for the same reason that woodworkers are often interested in wood - even a kind of wood that they may never use.

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

#48

what does pike look like https://pike.lysator.liu.se/docs/tut/introduction/first_glan... (saving you some clicks...)

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.

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

#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. https://en.wikipedia.org/wiki/Lua

3. https://en.wikipedia.org/wiki/Roxen_(web_server)

Post reply on HN