7 ms·
The Pike Programming Language
- haolez 7y agoI don’t know if this would be useful to my projects, but the documentation is impressive. Well done!
- deleted 7y ago[deleted]
- jhbadger 7y agoI remember learning about Pike nearly twenty years ago. It made some decisions that seemed odd then but which seem rather modern in retrospect. First of all, it was a scripting language that had typed arguments. And second of all it allowed multiple types as arguments and returns -- for example you could define a function int|float sq(int|float x) {return x*x;} that would do the right thing for ints and floats but still error out on strings.
- em-bee 7y agocoming from C pike felt rather natural, and i felt pike was ahead of its time when people elsewhere argued about typing and python, ruby and javascript (typescript) started adding optional types. pike had them all along. pike attracted me because it was the first language i came across that allowed me to recompile classes at runtime. i also love its deceptively simple class model. each file of code IS a class. there is no need to declare the class inside (as java has you do), but you open the file and put functions inside. done. elsewhere you inherit the class by referring to the filename: "inherit foo.pike". pike was the start of my career as a software developer and i am still using pike for all my websites to this day. the difference now is that i write the frontend in javascript and the backend is a BAAS platform with a REST API in pike.
- hermitdev 7y agoStopped reading after reading main() returning doesn't end the (interactive) program and you have to manually hookup a signal, otherwise the program will continue running indefinitely. Seems error prone and very counterintuitive to me.
- coldtea 7y agoI've stopped reading the above comment after "Stopped reading after". I've never read anything insightful and not knee-jerky coming after those words...
- HocusLocus 7y agoI've stopped reading altogether. Is there a Youtube tutorial?
- mruts 7y agoI've stopped reading after "I've stopped reading the above"..
- nudq 7y agoDo you read your own comments? (Asking for a logician friend...)
- coldtea 7y agoYes, as a meta-comment they belong to a different class (see Russel and co).
- systems 7y agowhere did you read that
- hermitdev 7y agoTowards the end of [0] which was linked from "I want my greeting in a window from [1]. The link has since been stricken out from when I looked at it several hours ago, so maybe its outdated? I don't know... I've only done GUI work on Windows, but I've never had to register a signal handler to get my app to exit. Yeah, you might register handlers for events to control how the app shuts down (e.g. to save unsaved docs), but mandatory? I've not seen that before. [0] https://pike.lysator.liu.se/docs/tut/hello/window.md https://pike.lysator.liu.se/docs/tut/hello/window.md [1] https://pike.lysator.liu.se/docs/tut/ https://pike.lysator.liu.se/docs/tut/
- ofrzeta 7y agoI remember using the Roxen webserver somewhere in the 90s when we had a workmate who was very fond of it. Roxen is probably the single reason for the existence of Pike – or the other way round.
- pram 7y agoVery interesting. I had no idea Roxen was even a thing. Never heard it mentioned once in the past 20 years of being a linux janitor! Kinda like AOLServer/Navi levels of obscurity.
- randallsquared 7y agoHeh. My first production app was built in Roxen RXML, with a little Pike here and there where RXML’s sluggishness couldn’t be tolerated. By the third version, it was almost entirely Pike.
- em-bee 7y agoyou wouldn't believe what people were capable of writing with RXML. i worked with one company where they wrote a whole ERP system almost all in RXML. it was amazing.
- em-bee 7y agohaving heard of AOLServer, i'd say, that's about right. i discovered it in 1994 when i decided that the ncsa/cern servers were to simplistic. apache wasn't a thing yet. and the first alternative i found was a server written in common lisp. i was put off by the fact that i had to write lisp code to just serve static html files, so i kept searching, and found spinner (the predecessor for roxen) next. it came with an extensive webinterface for server administration and was just a blast to work with.
- vinkelhake 7y agoNow that's a name i haven't heard in a long time. Pike too for that matter. Quite interesting to see that Pike still an active project.
- todd3834 7y agoI thought this had something to do with Rob Pike. Like maybe he was forking Go or had a new idea for a language.
- jedisct1 7y agoI used it with Roxen (later Caudium) to build a remote file manager, and it was really nice. Unfortunately, it was also quite slow.
- ozzmotik 7y agooh it's neat to see this, as I recall i first discovered pike way back as a teenager via DreamSNES, an snes emulator that you can burn to a cd with roms and play on a dreamcast, for lack of a better description. anyway, the wizard for getting it set up, including doing all the writing to the cd, was written in pike if memory serves correctly.
- em-bee 7y agoquite likely. a bunch of the core pike developers had been working on SNES stuff. i didn't have a dreamcast so i didn't pay more attention to that.
- jeffrallen 7y agoI thought Go was at least 1/3 Pike.
- zerr 7y agoOpera used (still uses?) this as well for back-end stuff.
- em-bee 7y agothe opera mini servers and their browser development tool chain was all written in pike.
- rags2riches 7y agoI never used Pike, but some of my earliest programming was done in LPC, the MUD programming language that is the origin of Pike. I knew basically nothing about anything then but was still able to do some fun things.
- em-bee 7y agoLPMUDs were my first introduction too. when i discovered the webserver (spinner as it was called then) and saw the code i was like: "hey i know this language!". felt at home instantly.
- brynjolf 7y agoPike was a horrible programming language driven by nepotism