Create new track for Phix

What programming language should we add? Phix

What is the official website for the language? http://phix.x10.mx

Is this a language that comes in many variants? If so, which variant should we support? No, just 1.0.5 or later.

Does the language have an official logo? If so

  • please include a link to an example svg or png or png
  • please list the attribution rights of that logo
    Created from scratch by mine own fair hands. Erm, Academic Free License version 3.0 would match similar bits of Phix.
    Let me know if you think it needs improving or struggle with it in any way (not that Iā€™m a graphics expert, nor am I expecting much, but will accept advice, plus anything that might make exercism look better would not do me any harm). There is also a meaningless green tick knocking around in several places that deserves replacing with that as well (by me), which I mention because the origin/attribution rights of that are long lost.

Is there a testing framework available for the language? Yes, described at unit_test which creates consistent output the testrunner (already done) can parse.

Is this language listed as ā€˜supportedā€™ by Highlightjs? Yes, but only fairly recently. My cm5 attempt can be found as phix.js in the root of the repository linked below, and a demo of it at Syntax Highlighting With CodeMirror 5 - alas cm6 proved itself way beyond my skill set.

Who will be leading the effort to launch the track? Pete Lomax @petelomax (language author)

Iā€™ve created a temporary draft repository: GitHub - petelomax/exercism-phix: Exercism exercises in Phix. - I fully expect that will end up getting deleted and am not even slightly fazed by the thought of transfering all files out of it manually.
In fact and tbh, Iā€™m experiencing a few silly ā€œclone/forkā€ issues that make a ā€œgithub-cleanā€ repository sound sensible.
Iā€™d also be fine with starting small and/or applying a sensible rate-limit to avoid overloading anyone or anything.
Iā€™ve done quite a few, mainly because I realised early on it would need 1.0.5 and figured Iā€™d better finish fiddling with and ship that first.

Also, GitHub - rzuckerm/phix-docker-images: Docker images for Phix programming language is a 1.0.5 docker file that should hopefully be useful. I doubt gcc will be of any use.

3 Likes

The repo and team have been created: https://github.com/exercism/phix/settings
Thanks for working on it!

3 Likes

I think itā€™s pretty much ready for launch now.

2 Likes

@petelomax did you get some maintainers to test the track?

I only asked yesterday, @axtens has offered to lurk/mentor. The broken test runner may be putting people off. I also added a bit of humour, see if that gets any better responses.

1 Like

The track looks like itā€™s still missing a logo. Has one been requested in the exercism/website-icons repo?


On https://exercism.org/docs/tracks/phix/installation, the docs are a little hard to read and mainly focus on Windows. Perhaps provide examples of the commands discussed to make Phix work.


https://exercism.org/docs/tracks/phix/learning repeats the learning materials for Euphoria. Perhaps we can just link to the learning page for Euphoria instead of duplicating and having to sync content.

RosettaCode is sometimes cased as rosettacode.


https://exercism.org/docs/tracks/phix/tests#h-editing-the-test-exw-file-s indicates tests arenā€™t skipped by default and the user has to manually skip a test. I feel like the tests should be skipped by default and then the user intervenes to run a test. The online test runner would unskip and run all tests. Thatā€™s how the Pyret track works and likely others as well.


Finally, the about section for https://exercism.org/tracks/phix/about is a bit long for my taste and replicates content from the key features section. This is the first thing students will encounter on the track so I see it as like an elevator pitch for the track.


Finally, itā€™s not necessary, but itā€™s nice if the exercises are sorted by easy/medium/hard and then exercise name. Thatā€™ll let a student easily find exercises by difficulty which in my experience is more useful. Sorting by name alone is adequate, but say Iā€™m looking for a certain exercise. Iā€™m more likely to do a search at the top for Zebra rather than scroll to the bottom of the list. I canā€™t do a search for all easy exercises so thatā€™s why I prefer to sort by difficulty first.

1 Like

Iā€™ve raised an issue for a Phix track logo.

Iā€™ve cleaned up install - quite right that info belongs on my download page, not on Exercism.

Iā€™ve changed learning to link to Euphoria, and re-cased RosettaCode.

Not sure about skipping tests by default. I could get behind quit on first failure. Why would CLI want to differ from online? Wouldnā€™t that lead to some students thinking theyā€™ve finished, only to submit and find it does not work?

Iā€™ll agree about is too long, not sure what to do about that and suspect Iā€™m not the best person to fix it.

Iā€™ve re-sorted the exercises by difficulty. Maybe Atbash Cipher ā€¦ Word Count should be re-assigned medium levels.

PS many thanks

This is how (almost) every track on Exercism works. The first test is unskipped and the rest are skipped. The online editor mimics the same behaviour (and the test runner needs to unskip all tests)

Ugh. I can only see that as just being deliberately annoying.

While the majority might, the following dozen donā€™t seem to: go, euphoria, vimscript, prolog, nim, julia, cobol, gleam, python, racket, lua, and zig. (I could be quite wrong)

Vimscript uses the Vader testing framework, which at the moment doesnā€™t support skipping Execute blocks (see Implement SkipIf command to skip tests if a condition is met by MisanthropicBit Ā· Pull Request #201 Ā· junegunn/vader.vim Ā· GitHub).

Racketā€™s RackUnit framework doesnā€™t provide a built-in way for skipping test cases inside a test suite. It hasnā€™t been a priority for me, but I suppose I could adapt the Pyret approach and use helper functions to create test cases that take a Boolean for skipping / not skipping its execution. The disadvantage there is that a skipped test isnā€™t reported at all.

Exercism is focussed around TDD. Having tens or hundreds of tests failing when you first run your code is overwhelming, so we let people solve things one step at a time.

1 Like

Itā€™s deliberate. You may find it annoying. Iā€™m pretty sure iHiD didnā€™t build something with the goal of making it annoying.

2 Likes

As I said, I can get behind quit on first failure, so the student only ever sees one/the first error, but as for being forced to change 30+ false to true or delete/comment 30+ ā€œskip linesā€, weā€™ll agree to disagree.

I wouldnā€™t go so far as to stop someone else making such a change, but not planning to put in any effort along those lines myself.

I can get behind quit on first failure,

Happy for you to do this instead :slight_smile:

As long as only one test fails on the first run, Iā€™m agnostic to the method of making that happen.

8th, tcl, bash, jq, awk all support setting an environment variable to bypass the skips.

2 Likes

D as well. In d/exercises/practice/leap/source/leap.d at 1b8a8db4eac443a4cd74799220647208f3fc69d9 Ā· exercism/d Ā· GitHub, the student just changes the value for allTestsEnabled.