"I don't want to die in a language I can't understand."
- Jorge Luis Borges
Latest version: 1.0.5
Release date: 1st June 2024
Price: Free. No nags and No expiry date.
Source code: Incuded.
Self Hosted: No other tools required to modify/rebuild Phix.
Phix is Pete’s Self Hosted Hybrid Interpreter/Compiler pshhic was not the best of acronyms, plus phiX is the name of the first ever manmade lifeform artifically created from scratch in a laboratory, which seems rather appropriate for a self-hosted compiler
Aims:
- Create an easy to use programming language which is also easy to modify and maintain.
- Reject the premise that things must be tortuously complicated and difficult and confusing to make them flexible and powerful.
- Bug location must be made as easy as possible.
If as some studies suggest up to 90% of effort is actually spent fixing bugs, it follows that the
toolchain should be strongly focused on the expediency with which bugs can be located and fixed
- at least those in otherwise well written code; obviously anything difficult to understand in
the first place will more than likely prove at least as tricky the second time round, should
it go wrong.
In Phix, all errors, both compile-time and run-time, are human-readable and indicate the precise file and line where they happened, and Edita jumps right there. - Allow the programmer to focus on solving the problem, rather than solving the solution.
- Terse may at first seem nice, but properly readable and easy to understand code is better.
Why Phix?
There are hundreds of programming languages, by which I probably mean tens of thousands...
- Single installation with zero dependencies, at least on Windows, though on Linux you’ll probably want IUP1
- Same code runs on Windows, Linux, and in a browser (done before, I know, just not imnsho anywhere near this well).
- Knowing that you (probably) could (quickly) modify the compiler(/interpreter/transpiler) should you need to2.
- Hundreds of examples, thousands of contributions, and 100% completion on rosettacode.
- Quality documentation (though I guess you should judge that one for yourself).
- Human readable error messages instead of cryptic nonsense, at least in 99.5% or more of cases.
- You wouldn’t mind a decent tool that at least appears to try to make your life a bit easier.
- And finally.. because giving it a decent spin should (bar IUP on Linux) be perfectly feasible in under 5 minutes.
(if you cannot get five examples to run in that time, I would genuninely like to hear why not)
whereas in contrast I am perfectly happy to ship all the needed Windows 32/64 bit dlls in the standard distribution package.
Work has in fact also started on [yet another] cross platform GUI, just don’t hold your breath.
2 Phix was born out of frustration at waiting 18 months for a new release, only to find the problem was still there.
Why not?
If any of the following (meant to be mildly humorous) apply, then (sadly) Phix is probably not for you:
- Saving a few seconds when typing is far more important than saving several minutes when later reading it.
- Giving something a clear, meaningful, and intuitive name is somehow and for some reason exceptionally difficult.
- You pride yourself or otherwise rely on being the only person that can possibly maintain what you wrote.
- You firmly believe every line of code you write is utterly perfect and will never need modifying or debugging.
- If you have to struggle with 0-based indexes when programming in X, everyone else should have to, too.
- Using a particular design pattern or language feature is far more important than actually solving some problem.
- You simply cannot live without lambda expressions, closures, currying, monads, generators, iterators, etc.
- You strongly disagree that 'this' in JavaScript is nothing short of an unmitigated disaster, and refuse to let it go.
- You have no interest in making anything, ever, be it any tool or any of the processes involved, any easier.
- Being told the file name and line number on which an error occurred is only for amateurs and pathetic wimps.
- Down time while waiting for recompilation to finish is regarded as an important perk of the job.
- A one-liner is in your opinion always and without exception much better than an easier to read five-liner.
- Your preferred programmer’s editor does not support proper syntax colouring of Phix source code.
- Over-reliance on auto-completion, though I’ll grant you it is a nice feature to have.
- Actually understanding how a program works is a very strange and frankly rather weird concept.
- These days computers are so fast no-one cares if a program takes an extra twenty seconds to load. (You may wanna read that one again.)
Some Quotes I identify with:
“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.”
- Antoine de Saint-Exupéry
“Simplicity is the ultimate sophistication.”
- Leonardo da Vinci
(as commonly attributed, eg ,
but see )
“A language that doesn’t have everything is actually easier to program in than some that do.”
- Dennis M. Ritchie
“Are you quite sure that all those bells and whistles, all those wonderful facilities of your so called
powerful programming languages, belong to the solution set rather than the problem set?”
- Edsger W. Dijkstra
“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible,
you are, by definition, not smart enough to debug it.”
- Brian W. Kernighan
“The readability of programs is immeasurably more important than their writeability.”
- C. A. R. Hoare
“Any intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction.”
- E. F. Schumacher
“If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.”
- Alfonso the Wise, 13th Century King of Castile
“Person who say it cannot be done should not interrupt person doing it.”
- Chinese Proverb