Tacit programming: Difference between revisions

Jump to navigation Jump to search
97 bytes added ,  09:33, 15 May 2020
(4 intermediate revisions by 2 users not shown)
Line 53: Line 53:
|}
|}


Only [[dzaima/APL]] allows <source lang=apl inline>(A h)</source>, which it treats as <source lang=apl inline>A∘h</source>.<ref>dzaima/APL: [https://github.com/dzaima/APL/blob/ceea05e25687988ed0980a4abf4b9249b736543f/docs/differences.txt#L19 Differences from Dyalog APL]. Retrieved 09 Jan 2020.</ref>
Only [[dzaima/APL]] allows <source lang=apl inline>(A h)</source>, which it treats as <source lang=apl inline>A∘h</source>.<ref>dzaima/APL: [https://github.com/dzaima/APL/blob/ceea05e25687988ed0980a4abf4b9249b736543f/docs/differences.txt#L19 Differences from Dyalog APL]. Retrieved 09 Jan 2020.</ref> See [[Bind]].


== Examples ==
== Examples ==
Line 75: Line 75:


=== Fractions ===
=== Fractions ===
We can convert decimal numbers to fractions. For example, we can convert <math>2.625</math> to the improper fraction <math>21\over 8</math> with
We can convert decimal numbers to fractions. For example, we can convert <math>2.625</math> to the improper fraction <math>\tfrac{21}{8}</math> with
<source lang=apl>
<source lang=apl>
       (1∧⊢,÷)2.625
       (1∧⊢,÷)2.625
21 8
21 8
</source>
</source>
Alternatively, we can convert it to the mixed fraction <math>2{5\over 8}</math> with
Alternatively, we can convert it to the mixed fraction <math>2\tfrac{5}{8}</math> with a mixed fraction:
A mixed fraction:
<source lang=apl>
<source lang=apl>
       (1∧0 1∘⊤,÷)2.625
       (1∧0 1∘⊤,÷)2.625
Line 121: Line 120:


===The Number of the Beast===
===The Number of the Beast===
The following expression for computing the [[wikipedia:666 (number)|Number of the Beast]] nicely illustrates how to read a train.
The following expression for computing the [[wikipedia:666 (number)|number of the Beast]] (and of [[I.P. Sharp]]'s APL-based email system, [[666 BOX]]) nicely illustrates how to read a train.
<source lang=apl>
<source lang=apl>
       ((+.×⍨⊢~∘.×⍨)1↓⍳)17 ⍝ Accursed train
       ((+.×⍨⊢~∘.×⍨)1↓⍳)17 ⍝ Accursed train
Line 153: Line 152:


== External links ==
== External links ==
== Tutorials ==
=== Tutorials ===
* Dyalog: [http://help.dyalog.com/16.0/Content/RelNotes14.0/Function%20Trains.htm version 14.0 release notes]
* Dyalog: [http://help.dyalog.com/16.0/Content/RelNotes14.0/Function%20Trains.htm version 14.0 release notes]
* [[APL Cultivation]]: [https://chat.stackexchange.com/rooms/52405/conversation/lesson-23-transcribing-to-and-reading-trains Transcribing to and reading trains]
* [[APL Cultivation]]: [https://chat.stackexchange.com/rooms/52405/conversation/lesson-23-transcribing-to-and-reading-trains Transcribing to and reading trains]
* APLtrainer: [https://www.youtube.com/watch?v=kt4lMZbn-so How to read trains in Dyalog APL code] (video)
* [[APLtrainer]]: [https://www.youtube.com/watch?v=kt4lMZbn-so How to read trains in Dyalog APL code] (video)
* APLtrainer: [https://www.youtube.com/watch?v=A2LqqBosvY0 Function trains in APL] (video)
* [[APLtrainer]]: [https://www.youtube.com/watch?v=A2LqqBosvY0 Function trains in APL] (video)
* [[Dyalog webinar]]: [https://www.youtube.com/watch?v=Enlh5qwwDuY?t=440 Train Spotting in Dyalog APL] (video)
* [[Dyalog webinar]]: [https://www.youtube.com/watch?v=Enlh5qwwDuY?t=440 Train Spotting in Dyalog APL] (video)
* [[Dyalog '13]]: [https://www.youtube.com/watch?v=7-93GzDqC08 Train Spotting in Version 14.0] (video)
* [[Dyalog '13]]: [https://www.youtube.com/watch?v=7-93GzDqC08 Train Spotting in Version 14.0] (video)


== Documentation ==
=== Documentation ===
* [http://help.dyalog.com/16.0/Content/RelNotes14.0/Function%20Trains.htm Announcement]
* [http://help.dyalog.com/16.0/Content/RelNotes14.0/Function%20Trains.htm Announcement]
* [http://help.dyalog.com/latest/Content/Language/Introduction/Trains.htm Dyalog]
* [http://help.dyalog.com/latest/Content/Language/Introduction/Trains.htm Dyalog]


==References==
== References ==
<references/>
<references/>
{{APL syntax}}[[Category:Tacit programming| ]]
{{APL syntax}}[[Category:Tacit programming| ]]

Navigation menu