Dfns workspace: Difference between revisions

From APL Wiki
Jump to navigation Jump to search
No edit summary
(+example usage)
Line 1: Line 1:
'''dfns.dws''' is a workspace which is supplied together with [[Dyalog APL]]. It's is a collection of examples of programming in [[dfn|direct functions]], which were written by multiple people since 1990s.
'''dfns.dws''' is a workspace which is supplied together with [[Dyalog APL]]. It's is a collection of examples of programming in [[dfn|direct functions]], which were written by multiple people since 1990s.


Late [[John Scholes]] was the editor of this workspace. He presented a talk about the contents of the workspace at [[Dyalog user meeting|Dyalog '09]].<ref>[[Dyalog user meeting|Dyalog '09]] C03: Introduction to D-Functions (dfns) ([https://dyalog.tv/Dyalog09/?v=OZARVrGQQho VIDEO 1 (124 mins)], [https://dyalog.tv/Dyalog09/?v=RQNSe9s_3eE VIDEO 2 (67 mins)])</ref>
Late [[John Scholes]] was the editor of this workspace. He presented a talk about the contents of the workspace at [[Dyalog user meeting|Dyalog '09]].<ref>[[Dyalog user meeting|Dyalog '09]] C03: Introduction to D-Functions (dfns) ([https://dyalog.tv/Dyalog09/?v=OZARVrGQQho Video 1 (124 mins)], [https://dyalog.tv/Dyalog09/?v=RQNSe9s_3eE Video 2 (67 mins)])</ref>
 
== Example usage ==
As with other workspaces, workspace <source lang=text inline>dfns</source> can be copied into the current workspace using [[system command]] <source lang=apl inline>)copy</source>:
<source lang=apl>
      )copy dfns
 
      ⍝ Example call: timing an expression using function `cmpx`
      1 cmpx '((1e6∘|2∘×)⍣871) 1'
0.0001302490234375
</source>
 
Alternatively, the workspace can be copied using [[Quad name|system function]] <source lang=apl inline>⎕CY</source> (copy workspace):
<source lang=apl>
      ⍝ Copy dfns workspace into a namespace called `dfns`
      {(⍎⍵⎕NS⍬).⎕CY ⍵}'dfns'
 
      ⍝ Example call: calendar function from the new namespace
      dfns.cal 2021 12
  December 2021   
Su Mo Tu We Th Fr Sa
          1  2  3  4
5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31 
</source>


== Referrences ==
== Referrences ==

Revision as of 16:03, 23 August 2020

dfns.dws is a workspace which is supplied together with Dyalog APL. It's is a collection of examples of programming in direct functions, which were written by multiple people since 1990s.

Late John Scholes was the editor of this workspace. He presented a talk about the contents of the workspace at Dyalog '09.[1]

Example usage

As with other workspaces, workspace dfns can be copied into the current workspace using system command )copy:

      )copy dfns

      ⍝ Example call: timing an expression using function `cmpx`
      1 cmpx '((1e6∘|2∘×)⍣871) 1'
0.0001302490234375

Alternatively, the workspace can be copied using system function ⎕CY (copy workspace):

      ⍝ Copy dfns workspace into a namespace called `dfns`
      {(⍎⍵⎕NS⍬).⎕CY ⍵}'dfns'

      ⍝ Example call: calendar function from the new namespace
      dfns.cal 2021 12
   December 2021    
Su Mo Tu We Th Fr Sa
          1  2  3  4
 5  6  7  8  9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Referrences

  1. Dyalog '09 C03: Introduction to D-Functions (dfns) (Video 1 (124 mins), Video 2 (67 mins))

External links

  • dfns.dyalog.com – website generated based on the contents of this workspace.
APL development [edit]
Interface SessionTyping glyphs (on Linux) ∙ FontsText editors
Publications IntroductionsLearning resourcesSimple examplesAdvanced examplesMnemonicsISO 8485:1989ISO/IEC 13751:2001A Dictionary of APLCase studiesDocumentation suitesBooksPapersVideosAPL Quote QuadVector journalTerminology (Chinese, German) ∙ Neural networksError trapping with Dyalog APL (in forms)
Sharing code Backwards compatibilityAPLcartAPLTreeAPL-CationDfns workspaceTatinCider
Implementation ResourcesOpen-sourceMagic functionPerformanceAPL hardware
Developers Timeline of corporationsAPL2000DyalogIBMIPSASTSC