exercism/gnu-apl

Name: gnu-apl

Owner: exercism

Description: Exercism exercises in GNU APL.

Created: 2017-08-10 09:47:14.0

Updated: 2017-11-02 21:42:52.0

Pushed: 2018-02-04 21:16:45.0

Homepage: http://exercism.io/languages/gnu-apl

Size: 72

Language: APL

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Exercism GNU APL Track

build status

Exercism exercises in GNU APL.

Setup
Installing GNU APL

On MacOS, GNU APL is available as a Homebrew formula; just type brew install gnu-apl to install it.

On other operating systems, the simplest way to install GNU APL is probably to follow the instructions on the GNU APL website. Version 1.6 works, but version 1.7 has some bugs involving the )COPY system command that prevent it from working for Exercism. If you want 1.7 features for Exercism, then build it from source at SVN commit 945 (when the bug was fixed) or later.

Installing a keyboard layout

APL uses many symbols that don't appear on most keyboard layouts, so you'll probably want to install an APL keyboard layout. The keyboard layouts from Dyalog seem to work well, and are available for free download for all modern operating systems. The same page also has links to fonts optimized for APL code (and even ordering information for physical keyboards with APL symbols on them).

Contributing

Thank you so much for contributing! :tada:

Please read about how to get involved in a track. Be sure to read the Exercism Code of Conduct.

We welcome pull requests of all kinds. No contribution is too small.

We encourage contributions that provide fixes and improvements to existing exercises. Please note that this track's exercises must conform to the Exercism-wide standards described in the documentation. If you're unsure about how to make a change, then go ahead and open a GitHub issue, and we'll discuss it.

Exercise Tests

At the most basic level, Exercism is all about the tests. You can read more about how we think about test suites in the Exercism documentation.

We are currently using GNU APL's testing framework, with some extra tooling found in the test.apl file at the root of the track. So test files should be called <exercise-name>.tc, and should be in the following format. (? indicates comments that should be in the actual test file; # are explanatory comments for the purposes of this README.)

'./<exercise-name>.tc.log'
COPY ',(?FIO 30),'/../../test.apl'

?copy_relative '<exercise-name>.apl'
?clear_log log

e preceding lines are boilerplate, and must be in every test file (sorry about that!).  The actual test code follows.

reet # Name of function being tested; not mandatory, but nice.

 returns a greeting to the supplied name # description of test case
CR greet 'Chris' # APL code to execute; 1?CR quotes strings and does other nice things
lo, Chris!' # exact expected output

en left argument is supplied, uses it instead of 'Hello' # another test case
CR 'Good morning' greet 'Sandy'
d morning, Sandy!'

?show_log log # this must be at the end of the file so that the test results get displayed to STDERR

When in doubt, copy the format of the existing test files, or otherwise do what seems sensible.

Opening an Issue

If you plan to make significant or breaking changes, please open an issue so we can discuss it first. If this is a discussion that is relevant to more than just the GNU APL track, please open an issue in exercism/discussions.

Submitting a Pull Request

Pull requests should be focused on a single exercise, issue, or conceptually cohesive change. Please refer to Exercism's pull request guidelines.

Verifying Your Change

Before submitting your pull request, you'll want to verify the changes in two ways:

All the tests for GNU APL exercises can be run from the top level of the repo with

run-all-tests

For the Exercism-specific linting, please see the documentation.

Contributing a New Exercise

Please see the documentation about adding new exercises.

Useful notes:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.