Wishlist: array language like K

Big fan of exercism, and having a lot of fun in different tracks.
But on my wishlist I have an array language, such as ngn/k .
I think that could be a valuable addition as they are different from object-oriented and functional languages.

I would love to contribute, but it is on my wishlist because I don’t know much about it.

2 Likes

Hey. Glad you’re enjoying it!

Best way to learn a language is by coding in a language. If you can solve 10 exercises in the language, then you probably have enough skill to muddle your way through creating a track, and I’m sure lots of others would love to help :slight_smile:

Coincidentally, I searched for array language on Exercism’s GitHub today and found that repositories for J and BQN already exist.

I don’t have much experience with CI operations, so I don’t believe I could be a maintainer for the track. However, I could help in creating exercises and test for the J track starting in march.

I have a few questions:

  • There’s an archived test runner for J. Does this needs to be rewriten?
  • If so, I see that this test runner appears to use the general/unittest framework (the structure is very similar to the common test framework for mainstream languages), while the track’s test uses the strlib’s assert function (which returns a string if the assertion fails). Is there a preferred approach to make the test runner?
  • How should the track handle different versions of the language?
1 Like

Not really, just use whatever works basically. That said, there is a preferred approach for the track, which is to use whatever is idiomatic. So if you’re starting with J, what would most people use to test their software?

Possibly, no way of knowing beforehand. There is some existing code there, so it should hopefully not be too hard.

It depends on the track. Usually, tracks supports version X and higher, so you don’t have to be backwards compatible with old versions.

Sorry for the delay
The archived test runner appears to be functioning correctly, with the exception that it does not include the version in the results.json.

Passed tests

{
    "status":"pass",
    "tests": 
        [
            {
                "status":"pass",
                "name":"nuc_cnt1",
                "message":"OK"
            },
            {
                "status":"pass",
                "name":"nuc_cnt2",
                "message":"OK"
            },
            {
                "status":"pass",
                "name":"nuc_cnt3",
                "message":"OK"
            },
            {
                "status":"pass",
                "name":"nuc_cnt4",
                "message":"OK"
            }
        ]
}

Failed Tests

{
    "status":"fail",
    "tests":
        [
            {
                "status":"fail",
                "name":"nuc_cnt1",
                "message":"assert 0 0 0 0-:nuc_cnt''"
            },
            {
                "status":"fail",
                "name":"nuc_cnt2",
                "message":"assert 0 0 1 0-:nuc_cnt 1$'G'"
            },
            {
                "status":"fail",
                "name":"nuc_cnt3",
                "message":"assert 0 0 7 0-:nuc_cnt'GGGGGGG'"
            },
            {
                "status":"fail",
                "name":"nuc_cnt4",
                "message":"assert 20 12 17 21-:nuc_cnt'AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC'"
            }
        ]
}

Errored tests

{
    "status":"error",
    "message":"|open quote: script\n|[-1] E:\\OneDrive\\Documentos\\Cursos\\Programming\\J\\Exercism\\j-test-runner\\test\\nc-error\\nucleotide-count.ijs\n"
}

It appears that the community does not have a preferred method for unit testing. If there are more people interested in implementing this track, I would like to engage in a discussion before committing to one approach or another.

Since already existe a repo for the language io believe is not necessary tô crente a Topic to Bootstrap It as informed in the docs, am i right?

Correct. You could just start working with what is already there.

Thanks.
This weekend I plan to update the test runner to match the formats found in the generic test runner repository. Therefore, I kindly request you to unarchive it, if possible, so that I can submit the necessary PR.
If possible i would like to become a mantainer in the track to.

2 Likes

I can probably only do this next week at the earliest, but you can for now work on a fork.

@andradefr8 I’ve de-archived the test runner repo, made you a maintainer on the website and you have a request to join the J team on exercise (which makes you a maintainer on the J repos).

I could not make Alpine and J work together very smoothly, so I will use Debian like the previous test runner did.
First PR probrably this weekend.

@ErikSchierboom, @iHiD, @bjartelund do you mind if I use this thread to report this kind of minor events and occasionally seek opinions and ideas?

1 Like

Not at all.

I’ll probably unsubscribe as you don’t need me here - Erik has all the power + wisdom for this stuff! :slight_smile:

1 Like

I just received an answer on the J forum introducing me to the convert/pjson library.
This library would enable us to format the generated JSON directly in the .ijs file, thus eliminating the need for jq, coreutils, and moreutils.
This would also simplify the logic for partial success cases as i can use the information generated by unittest directly.
Therefore, I think it is better to close that PR and create a new one using it.

4 Likes

In this PR the test runner updated to version 3.

PS: I wanted to apologize for my absence over the past three weeks. We have been dealing with a dengue fever epidemic in brasil and i was very unfortunate to have fallen ill during this time

3 Likes

I hope you’re better now! :blue_heart: