dyalog / practiceproblems Goto Github PK
View Code? Open in Web Editor NEWAutomatic Validation of APL Practice Problems
Home Page: https://apl.quest/
License: MIT License
Automatic Validation of APL Practice Problems
Home Page: https://apl.quest/
License: MIT License
Describe the bug
2015:9 gives "Internal error – No result was provided when the context expected one "
To Reproduce
Steps to reproduce the behavior:
debug=true
¯315 Internal error – No result was provided when the context expected one
Describe the bug
Task states:
Write a function that takes a numeric vector as its right argument and returns the median of the array.
but the last example is:
your_function 7
7
Expected behavior
Either change the task description to include ...or numeric scalar
, or change the last example so that the right argument is a vector:
your_function ,7
7
Describe the solution you'd like
Ctrl+Enter
should have the same effect as clicking the run button in a question.
A feature that is common on many runner websites and is purely for convenience.
Describe the bug
One of the tests results in the following:
Result should have been (1) with ('T') as right argument
which is clearly at odds with the example text for
your_function 'G'
0 0 1 0
To Reproduce
Steps to reproduce the behavior:
Try {+/(,⍵)=⍤1 0⊢'ACGT'}
Expected behavior
The correct result is 0 0 0 1
for a right argument of T
.
Desktop (please complete the following information):
There is an unclosed span tag in the description for problem 2021/10:
returns a right-aligned character array R«/span> of shape
Put ⎕OFF
in the input field and run it.
Inconsistent odd errors
To Reproduce
Steps to reproduce the behavior:
{⎕←'ok'}¨
We should probably suppress ⎕ and ⍞ output if possible, but it's low priority (anyone who knows what ⎕ and ⍞ do should be able to figure out what's going on)
Can't use all the primitives 😢
Enter {∧/(0∘≤∧2∘>)+\-⌿'<>'∘.=⍵}
into https://problems.tryapl.org/psets/2018.html?goto=P6_Whats_Your_Angle
Opening the website on mobile devices we see the problem descriptions get squashed horizontally, making them take too much vertical space.
To Reproduce
Open problems.tryapl.org on a mobile device.
Smartphone
Describe the bug
2020 p10:
{⍉¯1↓1↓⍉⍕⍪⍕¨⍵}
passes with flying colours, but does not give the expected result for the last example:
{⍉¯1↓1↓⍉⍕⍪⍕¨⍵},'A'
┌⊖┐
↓ │
└─┘
Expected behavior
Either the solution is incorrect, or the example text is wrong, or a test case is missing.
Desktop (please complete the following information):
For P1 from 2018, "Oh Say Can You See", the output is defined as
[...] an integer representing the number of skyscrapers that can be seen.
However, the test cases expect a 1-item vector.
I would like to know if the output should have been specified as a 1-item vector, or if the validator should be lenient (and how lenient) before committing a fix in a PR.
Describe the bug
test button for problem solution is unresponsive, for most problems
Desktop (please complete the following information):
Otherwise, thanks for the cool website. It is helping me to learn APL
Describe the bug
Message:
Result should have been (1 9 2⍴2 1 3 2 4 3 5 4 6 5 7 4 8 3 9 2 10 1) with (2⍴5) as right argument
is the wrong shape, given instruction returns a 2 column matrix
. Shape should be 9 2.
To Reproduce
Steps to reproduce the behavior -- I tried {{⍺,≢⍵}⌸∊⊃∘.+/⍳¨,⍵}
Expected behavior
The dfn {{⍺,≢⍵}⌸∊⊃∘.+/⍳¨,⍵}
produces the correct result shape for a right arg of 5 5:
{{⍺,≢⍵}⌸∊⊃∘.+/⍳¨,⍵} 5 5
┌→───┐
↓ 2 1│
│ 3 2│
│ 4 3│
│ 5 4│
│ 6 5│
│ 7 4│
│ 8 3│
│ 9 2│
│10 1│
└~───┘
Missing ⍥
and ⍤
is Rank only.
Describe the bug
Second example claims that:
'Dyalog' your_function 'APL'
DAaPlLog
This is incorrect (it can be seen that the result lacks the y
in Dyalog
). It should be DAyPaLlog
Should be "ravel"
The main web page has a clickable legend at the top of the page so that APL characters can easily be entered
-but- that legend is too far from the location where the characters are pasted in...
I'd suggest repeating that legend just above the area at the bottom of the page where user's can test their solution.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
In the examples it is claimed that:
your_function 5 3⍴⍳15 ⍝ and average the rows of a matrix
7 8 9
A 5×3 matrix has 5 rows. The comment should say
⍝ and averages the cols of a matrix
Describe the bug
The reference solution to 2018/3 fails with the following error:
Internal error – reference solution caused DOMAIN ERROR with (⍬) as right argument
(for any input).
The reference solution appears to be:
{{⍺('*'⍴⍨≢⍵)}⌸⊃(,∘.+)/⍳¨⍵}
which indeed fails for ⍬
:
{{⍺('*'⍴⍨≢⍵)}⌸⊃(,∘.+)/⍳¨⍵} ⍬
DOMAIN ERROR
{{⍺('*'⍴⍨≢⍵)}⌸⊃(,∘.+)/⍳¨⍵}⍬
I'd propose an alternative solution:
{{⍺('*'/⍨≢⍵)}⌸+/¨,⍳⍵}⍬
0 *
Describe the bug
A vector with only spaces should not return an empty numeric vector, but an empty char vector
To Reproduce
Steps to reproduce the behavior:
E.g. APL Cart's ' '∘(1↓,(/⍨)1(⊢∨⌽)0,≠)
results in:
Passed all basic tests – for extra points, consider cases like ('') as right argument which should give (⍬)
Expected behavior
For the empty cases, '' and ' ' , the expected result should be 0⍴''
, not 0⍴0
.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.