xpqz / cultivations Goto Github PK
View Code? Open in Web Editor NEWAPL Orchard Cultivations: https://xpqz.github.io/cultivations/
License: Other
APL Orchard Cultivations: https://xpqz.github.io/cultivations/
License: Other
It'd also be nice to show the "head and tail" trick:
1 1⊂'Hello'
┌→───────────┐
│ ┌→┐ ┌→───┐ │
│ │H│ │ello│ │
│ └─┘ └────┘ │
└∊───────────┘
You need to read the first three lines and the last three lines separately.
Instead, split into two code blocks.
Now you can see
that the first a is labeled
"a" should be "`a`
" (code).
?S
Needs a space
Maybe a note about ability to see this as a video at https://dyalog.tv/Webinar/?v=6SAsgEvUmkU
So if you have a vector like 1 2 3 and want to "fill" a simple scalar with that data, you can do (0⍴0)⍴1 2 3
And yes, ⍬ is a shortcut for 0⍴0.
So ⍬⍴1 2 3
Gives 1 of course.
Is worth including in the first lesson, I think
a .NET collection example for monadic ⌷
:
⎕USING←'System.Collections'
ba←⎕NEW BitArray(⊂1 0 1 1 0)
ba
System.Collections.BitArray
⌷ba
1 0 1 1 0
Note: doesn't seem to work on MacOS.
This example does not look correct. The second result should be 1 2 3 4
. The reason is that the assignment of ⎕IO should precede ⍳4
.
⍳4
⎕IO←0
⍳4
⎕IO←1
0 1 2 3
0 1 2 3
@abrudz says:
I think the flow will be easier to understand if the "We can model ⊥ as:" has reversed left arguments and does ⌽×\⌽
Maybe even revise everything from the beginning to do ⌽×\⌽ throughout, i.e. ⌽×\⌽(2⍴10),1 etc.
And again, ×\⌽1 1 1 is wrong. It should be ⌽×\⌽1 1 1
And harmonise ⌽×\1,⌽1↓0 0 0 to ⌽×\⌽1↓0 0 0,1
MathJax mess-up after "Compare this to making cash change: there’s nothing larger than a"
Hm, now I look at ⊤ maybe the formulation ⌽×\⌽1,⍨1↓ is best, as it puts all transformation on the left, keeping the base on the right?
@abrudz says:
¯1⎕C⎕A
can be just ⎕C⎕A
.f1 → <kbd>F1</kbd>
⍕
returns a vector for single line arguments, and a matrix otherwise." isn't actually true. ⍕
keeps the rank of its argument (except for numeric scalars becoming character vectors).⎕JSON
could mention the option to use ⎕NULL
@abrudz says
"Since APL does not enforce a naming scheme" … (but I highly recommend adopting a naming scheme)
"of dfns' operators" → "the dfns workspace's operators"
"[workspace available]" broken link
I'd remove mention of ⎕Á as it makes little sense, and it isn't even true that it is the list of non-ASCII identifier letters.
"⎕S can also take a scalar integer as right operand." → "⎕S can also take an integer scalar or vector as right operand."
⍠ missing backticks.
For counting uppercase letters, you could add ≢'\p{Lu}' ⎕S 0 ⊢ 'Programming Puzzles and Code Golf' ⍝ Unicode uppercase letter property
Created a PDF of the entire book for download if people need it.
@abrudz says:
1=1+1e¯20
should be 1e¯15
⎕PP
you should set it back to 10.⎕RL
treatment needs a bit of changing as the default is ⍬1
(I was speaking about the then-bot).⎕TS
should at least mention ⎕DT
.
]?
The modern (more consistent) syntax is ] -?
]CD is also able to change current directory — cross platform.
]DInput is kind of obsolete in light of the experimental multi-line input mode.
that allow
eds you
I would move the "The command processor" section up to the intro.
]ADoc
Here’s some example code for that.
Also see the cultivation on plotting.
]FnsLike ]ObsLike
These are obsolete to ]names
usually add
smore
There should be a non-Boolean ⍺ example.
This needs mention of the (new) fact that the left argument to ⊂ can be abbreviated, with missing elements presumed 0, and maybe an example of converting begin-points to mask:
⍸⍣¯1⊢1 5 10
1 0 0 0 1 0 0 0 0 1
(⍸⍣¯1⊢1 5 10)⊂⎕A
┌→───────────────────────────────────┐
│ ┌→───┐ ┌→────┐ ┌→────────────────┐ │
│ │ABCD│ │EFGHI│ │JKLMNOPQRSTUVWXYZ│ │
│ └────┘ └─────┘ └─────────────────┘ │
└∊───────────────────────────────────┘
https://xpqz.github.io/cultivations/PDI.html:
will be paired up
thewith the label
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.