Euphoria is a [[MIT License]] licensed [[Programming Languages|Programming Language]] which is self-hosted.
- [Website](https://openeuphoria.org/)
- [Source](https://github.com/OpenEuphoria/euphoria)
- [Documentation](https://openeuphoria.org/docs/)
> Euphoria is a powerful but easy-to-learn programming language. It has a simple syntax and structure with consistent rules, and is also easy to read.
# Notability
Is both an interpreter and [[Transpiler]] to [[C]]. The latter is presumably how it's self hosting.
Also it just seems like a nice language. I may pick it up to try to build something with it and see how it goes.
# Philosophy
1-indexing.
Prides itself on simplicity, but at least at first glance, it's not too simple to be useful.
It focuses on words over operators, and I do mean *words*. Most keywords are full, often quite long, words. This gives a definite density and broadness to code written in it.
## Speed
Also claims to be very fast for an interpreted language.
With some interesting benchmarks showing that it can best unoptimized [[C]] compilers.[^4]
The transpiled Euphoria code and subsequent compiled [[C]] saw increases of 2-4 times over the interpreted version, depending on the compiler settings. This put it in range of pre-compiled [[Java]]. Honestly, I'm more impressed at how fast [[Java]] was in that example.
## License
While it uses the text of the [[MIT License#No Attribution]], it also requests (but does not require) attribution.
# Related Languages
## Phix
Phix is a custom licensed programming language written in [[Euphoria (programming language)|Euphoria]].
- [Website](http://phix.x10.mx/)
- [Source](https://github.com/petelomax/Phix)
- [Documentation](http://phix.x10.mx/docs/html/phix.htm)
> Phix is a self-hosted hybrid interpreter/compiler, developed by Pete Lomax. It is very easy to use, and similar to Euphoria.
Says it includes an interpreter and full compiler.
When requested, the compiler will compile itself 4 times, using each subsequent compiler, to ensure that everything is working correctly. I think that's a really interesting approach.
Among the examples it says it includes a full programmers editor called `edita`.
Integrates [[GUI - IUP]] library for graphical application development.
### License
The licensing situation with Phix is really messy. It is among the worst I've ever seen. There are at least two completely different licenses said to govern the distribution of the compiler. All are strong [[Copyleft]] but contain completely different terms that directly conflict.
#### Repo License
The license[^3] is a terse [[Copyleft]] styled license which requires any changes to the source of the compiler to be included with distributed binaries.
The license text itself is taken from the [[MIT License#Attribution]] but instead of attribution it requires that source code be included with modified binaries.
It allows for closed source distribution after "registration" whatever that means.
Similar to ???, it also has a rider which requests (but does not require) attribution.
#### Open Source Licence v3
However, the website[^2] states that the license is the [[OSLv3]]. Which is a proper [[Open Source Initiative]]-approved[^1] [[Copyleft]] licence.
#### Website License
However, once again, the website itself lists its own set of terms separate from the stated license.
It is possible that it *was* intended to be a summary of the [[OSLv3]], except that the creator has very personal interpretation of that license that puts additional restrictions upon users beyond those covered in the [[Open Source Initiative]]-approved license itself.
# Platform Support
# Features
# Syntax
```euphoria
include std/io.e
procedure main()
sequence numbers = {1,2,3,4,5}
sequence timestwo = numbers * 2
sequence myname = "Fred"
print( STDOUT, numbers )
print( STDOUT, timestwo )
print( STDOUT, myname )
printf( STDOUT, "my name is %s\n", {myname} )
end procedure
main()
```
# Tips
# References
[^1]: https://opensource.org/license/osl-3-0-php
[^2]: http://phix.x10.mx/docs/html/licence.htm
[^3]: https://github.com/petelomax/Phix/blob/master/copyright.txt
[^4]: https://openeuphoria.org/forum/123421.wc