Following the example on this post we’re gearing up for the pre-launch of the J language track, and I’m looking for volunteers to help evaluate its current state. I’m particularly interested on review about the exercises instructions for people with no expertise in Array programming languages.
Thank you all in advance
I’ll take a look in the next few days.
A sad state of affairs when someone uses me as an example of anything. I shall have a look too.
BTW, did you know that we recently added the Game of Life exercise to problem-specifications? Seems like that would be a fun one for people to try.
I’m trying to run hello-world
locally, and I’m getting:
erik@schierheim:~/solutions/j/hello-world$ jconsole
load 'hello-world.ijs'
not found: /opt/j/addons/general/unittest/unittest.ijs
|file name error in script, executing monad 0!:0
|nonexistent file or invalid filename
| 0!:0 y[4!:55<'y'
|[-1] /home/erik/solutions/j/hello-world/hello-world.ijs
I’ve followed the instructions at System/Installation/J9.5 - J Wiki. What am I missing?
Have you followed the steps in this section?
Finish Installation
Previous step created jconsole window - enter the following J sentences in that window to update base system, install all addons, install Jqt ide, create desktop launch icons, and upgrade JE.
load 'pacman'
'install' jpkg '*'
exit 0
Seems to me general/unittest
addon is not installed.
Oh, I think I misread the instructions then.
You can call it like this
jconsole -js "load 'hello-world.ijs'" "echo unittest 'test.ijs'" "exit ''"
or this:
jconsole -js "exit [ echo unittest 'test.ijs' [ load 'hello-world.ijs' "
Each Command line argument after the -js
flag is executed as a single expression
Nice! We want to add support to the Exercism CLI too. See test: update 8th and emacs-lisp test commands by glennj · Pull Request #1128 · exercism/cli · GitHub for an example PR.
One other question: assertions seem to be relatively unhelpful:
difference_of_squares_test_02 ........... Fail
|assertion failure: assert
| assert expected-:difference_of_squares number
I would have like to see the actual and the expected value printed. Is that possible?
It is. Work on this and the Cli at the weekend.
I’ve also submitted some PRs to further improve things a bit.
I tried the rna-transcription exercise with an imperative solution along the lines of the first addlists definition here: Adding lists. Tests for single character inputs failed because the output was a one element list. It took me a while to understand that single character lists and atoms can look the same but not be equal due to shape mismatch.
Would it be beneficial to test that more shapes of input matches output? Should comments like this go somewhere else?
This can be made by replacing -:
with =&,
in the tests cases. I have applied this method (with appropriate variations) to other exercises such as ‘Pascal’s Triangle’ and ‘Secret Handshake’.
Another option is to maintain the current format and include a note in ‘instruction.append.md’ about the expected output.
I am not sure what would be the best option
I will choose the -:&,
option for this case and, at a later moment, include a message in the analyser highlighting the issue with the shapes after the student creates the solution plus some hints If stuck.
Completed exercises on the J track are being counted on the 48in24 page for the purpose of earning badges. Is that a bug?
P.S. This also happens for other non-public tracks I’ve tried (Pony, Coq, and Idris).
I think it’s fine