5 ms·
Aplette: a minimalist APL oriented toward scripting within a UNIX environment
- Bootvis 7y agoDoes anyone have examples of use to share?
- imglorp 7y agoThe .inp files in the qa directory seem to be the only samples. The user guide looks mostly reference. Note to anyone posting a new language experiment: samples are critical! https://github.com/gregfjohnson/aplette/blob/master/qa/printing.inp https://github.com/gregfjohnson/aplette/blob/master/qa/print...
- jetti 7y agoI would like to add that keeping samples up to date is important too. In the early days there may be breaking changes, I should always be able to run the samples with the latest version of the language and not get any errors or end up with unexpected behavior.
- gregfjohnson 7y agoOver the weekend I was trying to figure out the perspective transformation in a 3D graphics package (THREE.js). 3D graphics involves a lot of matrix algebra, and so is ideal for APL. Here is an aplette function for creating a perspective matrix: G m { gfx parms; left; right; bottom; top; near; far left { parms[1] right { parms[2] bottom { parms[3] top { parms[4] near { parms[5] far { parms[6] m { 4 4R0 m[1;1] { 2 X near % (right-left) m[1;3] { (right + left) % (right - left) m[2;2] { 2 X near % (top-bottom) m[2;3] { (top + bottom) % (top - bottom) m[3;3] { -(far + near) % (far - near) m[3;4] { -2 X far X near % (far - near) m[4;3] { `1 )read gfx m { gfx `10 10 `10 10 2 1000 8 4 J@N m 0.2000 0.0000 0.0000 0.0000 0.0000 0.2000 0.0000 0.0000 0.0000 0.0000 `1.0040 `4.0080 0.0000 0.0000 `1.0000 0.0000 8 4 J@N %@L m 5.0000 0.0000 0.0000 0.0000 0.0000 5.0000 0.0000 0.0000 0.0000 0.0000 0.0000 `1.0000 0.0000 0.0000 `0.2495 0.2505
- gregfjohnson 7y agoThanks for the feedback! I appreciate it. I will revisit the qa directory, and also add a samples directory. I added an APL command that you may enjoy, related to the issue of examples. ")font" will print a nicely formatted two-column summary of all APL commands, together with the "APL touchtype font" versions of those commands.
- kick 7y agoGlad to see you're still around! Do you post your code anywhere these days?
- gregfjohnson 7y agoI use github to post code, and also as a convenient way to copy work in progress from machine to machine. I just updated https://github.com/gregfjohnson/rubik https://github.com/gregfjohnson/rubik, a fun javascript hack that supports interactive simulation and solving of 3x3 Rubik's cubes. (deployed at http://gregfjohnson.com/rubik http://gregfjohnson.com/rubik)