1. What's the relationship between OE and Phix and what impact on Exercism?
- Posted by axtens_bruce Jan 27, 2023
- 1136 views
Maybe I should have asked this weeks ago, but what is the relationship between OE and Phix? Does it have any impact on the Exercism track? Should the maker of Phix be starting a track for Phix on Exercism or are the languages not sufficiently differentiated as yet?
Bruce
2. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by petelomax Jan 27, 2023
- 1126 views
Hmm, possibly: std/unittest.e is [as detailed below] almost but not quite compatible with Phix, which has builtins/unit_test.e instead.
No previous version of Phix has to date shipped with any std/unittest.e, so a quick "get it from" note and/or a `--/**/requires("1.0.2")` would be warranted.
I quickly "fixed" a few issues with clashing TEST_QUIET/SHOW_ALL, removed a few incompatible namespaces, and included builtins\pretty.e instead of std/pretty.e,
(let me know if/when you actually/really need that to be uploaded) however std/unittest.e also defines an incompatible assert() routine which:
a) disagrees with Phix's assert(bool condition, string msg="", object args={}, integer nFrames=1)
b) disagrees with it's own documentation in a way that I just simply cannot understand [ticket merited].
I have got the raindrops test working here, but should future exercises start using assert() that'd kill it.
A final decision as to whether Phix can share with Euphoria is probably left until it is (nearly) complete.
I suppose it would also depend on how easy or difficult it is to fork things and suck any updates over.
I just tried to create a ticket and it failed. I had penned the following:
Parameter name is defined as "a string, the name of the test", but the actual implementation has an else(not sequence name) which...
While you're here, that routine clashes with Phix's assert(bool condition, string msg="", object args={}, integer nFrames=1)
whereby msg=sprintf(msg,args) occurs if needed and nFrames allows errors to be reported in user source code rather than
less helpful builtins/ innards, and assert(true) is silent whereas assert(false) crashes.
To my mind it would be better if test_true() had an optional crash argument, and std/unittest.e users had to call that directly instead.
3. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by axtens_bruce Jan 27, 2023
- 1086 views
I have no intention of using assert(). There's actually an assert in 8th I could have used for that track, but opted to have something that, as best as possible, emulated the xUnit approach. The tests for each exercise are described in a JSON file on Exercism's server. Translating them to eutest format is easier than to asserts.
Somewhere prominent in the documentation I think I will have to make it known that Phix is mostly-compatible variation and leave it for students to pick up Phix skills in their own time after having learned OE.
Bruce
4. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by axtens_bruce Jan 28, 2023
- 951 views
But going back to the relationship between Phix and OE. Is Phix essentially OpenEuphoria 5.0 or is the divergence total and permanent?
Bruce
5. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by jimcbrown (admin) Jan 28, 2023
- 881 views
But going back to the relationship between Phix and OE. Is Phix essentially OpenEuphoria 5.0
That's basically my view.
or is the divergence total and permanent?
Bruce
Because the implementations are so different, there might be some unbridgable divergences (e.g. direct ASM in Phix)
However, expect that when the OE team is able to implement something from Phix, that we'll try to follow Phix's API as much as possible.
(Case in point - my experimental threading branches are modeled on and attempt to reimplement the API that petelomax came up with for threading in Phix.)
I can't speak for petelomax and Phix but generally it seems that Phix tries to keep compatibility with OE when it's possible.
6. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by ghaberek (admin) Jan 30, 2023
- 667 views
Maybe I should have asked this weeks ago, but what is the relationship between OE and Phix?
Euphoria is a programming language like Python or Ruby. And much like those languages there are a variety of implementations and derivatives of Euphoria.
OpenEuphoria is the reference implementation of Euphoria, like CPython or Ruby MRI. It is developed by the OpenEuphoria Group (this website and its members) and is based on the original code released by Rob Craig in 2006.
Phix is a dialect of Euphoria, like PyPy or JRuby. It is developed by Pete Lomax and is entirely its own code base at this point.
Does it have any impact on the Exercism track? Should the maker of Phix be starting a track for Phix on Exercism or are the languages not sufficiently differentiated as yet?
Given my response above, I'd say if you are building this track for "Euphoria" in general then no, you'll only need to maintain one track.
But if you're focusing on the implementation of "OpenEuphoria" specifically then yes, someone would need to maintain a separate "Phix" track in parallel.
How do the other programming languages I mentioned (Python or Ruby) handle their separate dialects on Exercism?
-Greg
7. Re: What's the relationship between OE and Phix and what impact on Exercism?
- Posted by petelomax Feb 01, 2023
- 599 views
I can't speak for petelomax and Phix but generally it seems that Phix tries to keep compatibility with OE when it's possible.
That's right, I'd say: don't break it if you don't have to, and bend over backwards to produce a clear human readable error or warning message when you can.
For example (and this is a real copy/paste of the actual output from running the Phix compiler just now):
s += {4,5,6} ^Warning: sq_add() assumed
The one thing that is unacceptable is quietly going wrong with no clues whatsoever, which is of course also true of code that has never been anywhere near Euphoria.
Obviously the reverse is absolutely not true, I'll happily add features to Phix that won't (ever) work in Euphoria!
On the other matter, it probably would be better for Phix to have a separate track, but a shared track (with a few niggles) would be better than none.