🧿 Pipefish
Welcome to Pipefish!
Pipefish is a delightful general-purpose language particularly suitable for rapid development of CRUD apps, middleware, distributed servivces, and DSLs to wrap them in. With the semantics of a functional language, with syntax borrowed from mainstream productivity languages (specifically Python and Go), and with inspiration mainly from SQL and Excel — Pipefish is not quite like anything you've ever seen. But it is also a very practical language that exists to solve some very ordinary "white-collar" problems.
The core language is 97% feature-complete; it currently has 39 standard libraries; there is tooling; there is a wiki; there are plenty of features including some you've never heard or thought of.
It benchmarks very competitively on independent benchmarks, despite having little in the way of optimization (scheduled for the next and final phase of the project).
It still requires work on optimzation, tooling, concurrency, and security before it should be used in production for its main purpose, but it can be used for personal projects. You can download it here.
It is intended that Pipefish itself will one day be used in productionI, or alternatively that this project will get enough attention that my ideas will be copied by people with more money and personnel and expertise, and that, if not Pipefish, then some Pipefish-style language will one day make people's lives easier. To this end, please add a star to the repo! Thank you!
Instructions for installing Pipefish can be found here, as part of a general manual/tutorial wiki that tells you everything you need to know to code in Pipefish. There are lots of other supporting documents.
A little Pipefish
Here is some sample code: you should find it readable.
Distinguishing features
Here are some of Pipefish's more distinctive features:
- Pipefish services have a functional core, imperative shell architecture, in which a thin layer of IO sits on top of pure functional business logic.
- All values are immutable; all comparison is by value.
- Functions are pure and referentially transparent.
- Local variables of functions are defined in a block at the end of the function and evaluated only if/when required. (You don't know how nice this is until you've tried it.)
- Free order of intitialization also helps you to write your scripts top-down.
- Abstraction is achieved by overloading and duck-typing. There is multiple dispatch.
- Field names of structs are first-class objects. Indexing structs and maps overloads the same operator.
- While Pipefish is very dynamic (as illustrated in the previous two points) it is also very strongly typed, much more so than any mainstream dynamic language, and is largely compile-time checkable. A rich, expressive type system offers you parameterized types, interfaces, clone types, and more.
- Pipefish is REPL-oriented, with livecoding to make it easy to code and test incrementally.
- The REPL is also a development environment and framework. It lets you test your code, write permanent tests, ask for help, interact with error messages, configure your services, deploy them to the web and manage access to them.
- It is intended that often a Pipefish service will act as its own front end (like e.g. a SQL database does) with the end-user talking to it via the Pipefish REPL. For this reason Pipefish has an unusually flexible syntax for creating DSLs.
- Pipefish comes with Go and SQL interop for all your backend needs.
- (Also the system for embedding other languages is extensible if this does not in fact meet all your needs.)
- Pipefish allows you to deploy your libraries as microservices, or, alternatively to turn your microservices back into libraries.
- Pipefish’s syntax is based on mainstream productivity languages, principally Python and Go. It has a shallow or indeed invisible learning curve: you can learn the simple parts of the language without knowing that the other parts exist.
- Pipefish's roadmap includes a point where we freeze the core language around a small set of sufficiently powerful features and try to remain permanently in version 1.x.
Documents
Our adorable mascot
According to Rob Pike, every language needs an adorable mascot. This is our adorable mascot, René the pipefish.
Pipefish may also be symbolized by the nazar emoji: 🧿
Licensing
🧿 Pipefish is distributed under the MIT license. Please steal my code and ideas.