Efficient Ways to Get Data and Code into Workspace

Slide Note
Embed
Share

Explore various tools and experimental methods for importing, processing, and analyzing data and code into your workspace efficiently. Discover a one-stop utility for quick resource retrieval, syntax guidelines, and plain name heuristics. Enhance your workflow and get started on bringing in resources seamlessly.


Uploaded on Sep 11, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Getting Data and Code into the Workspace feat. ]Get Rich Park

  2. Overview ]OUTPUT.View ]TOOLS.APLCart ]WS.Names ]OUTPUT.Repr ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 1

  3. Overview ]OUTPUT.View ]TOOLS.APLCart ]WS.Names ]OUTPUT.Repr ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 2

  4. Overview NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 3

  5. ]EXPERIMENTAL.Get get pretty much anything from pretty much anywhere TOOLS.APLCart Getting Data and Code into the Workspace feat. ]Get 4

  6. ]EXPERIMENTAL.Get get pretty much anything from pretty much anywhere One-stop utility for quickly getting bringing resources in. Getting Data and Code into the Workspace feat. ]Get 5

  7. ]EXPERIMENTAL.Get get pretty much anything from pretty much anywhere One-stop utility for quickly getting bringing resources in. Do not use at run time, as exact results may vary. Getting Data and Code into the Workspace feat. ]Get 6

  8. ]EXPERIMENTAL.Get Syntax ]get something Getting Data and Code into the Workspace feat. ]Get 7

  9. ]EXPERIMENTAL.Get Syntax ]get something #.something Getting Data and Code into the Workspace feat. ]Get 8

  10. ]EXPERIMENTAL.Get Plain name heuristics ]get dfns #.dfns ]get HttpCommand #.HttpCommand ]get tools #.tools workspace from WS path source file from SALT path directory relative to current Getting Data and Code into the Workspace feat. ]Get 9

  11. ]EXPERIMENTAL.Get File extension detection ]get MyFn.aplf #.MyFn ]get myVar.apla #.myVar ]get text.charmat #.text Link-type source files APL Array Notation files Acre-type source files Getting Data and Code into the Workspace feat. ]Get 10

  12. ]EXPERIMENTAL.Get Data format conversion ]get obj.json #.obj ]get table.csv #.table ]get data.xml #.data JS, JSON, JSON5, config files Comma Separated Values eXtensible Markup Language Getting Data and Code into the Workspace feat. ]Get 11

  13. ]EXPERIMENTAL.Get Retrieval ]get https://example.com/index.html #.index ]get https://github.com/abrudz/Kbd #.Kbd Getting Data and Code into the Workspace feat. ]Get 12

  14. ]EXPERIMENTAL.Get Protocols ]get https://github.com/abrudz/Kbd #.Kbd ]get ftp://ftp.software.ibm.com/software #.foo ]get github.com/abrudz/Kbd #.Kbd Getting Data and Code into the Workspace feat. ]Get 13

  15. ]EXPERIMENTAL.Get Examples: unpacking ]get main.zip #.main ]get github.com/user/repo/tree/main/sub #.sub Getting Data and Code into the Workspace feat. ]Get 14

  16. ]EXPERIMENTAL.Get Examples: unpacking ]get dfns -only=dxb,dab #.dfns ]map # dfns dab dxb Getting Data and Code into the Workspace feat. ]Get 15

  17. ]EXPERIMENTAL.Get Examples: unpacking )clear clear ws ]get dfns -only=dxb,dab -unpack #.dxb #.dab ]map # dab dxb Getting Data and Code into the Workspace feat. ]Get 16

  18. ]EXPERIMENTAL.Get Examples: options ]get obj.json:txt #.obj 10 obj {"myKey":1 ]get thing target= SE.there #.SE.there.thing Getting Data and Code into the Workspace feat. ]Get 17

  19. ]EXPERIMENTAL.Get Examples: options ]get /tmp/repo sync #.repo ]link.status Namespace Directory Files #.repo c:/tmp/repo 14 Getting Data and Code into the Workspace feat. ]Get 18

  20. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 19

  21. NGET Vector of characters: Vector of character vectors: NGET filename 1 . . . Hello, World! . . . NGET filename . . Hello, . World! . . . EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 20

  22. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 21

  23. HttpCommand Fetch HttpCommand: SE.SALT.Load'HttpCommand' Vector of characters: resp HttpCommand.Get url resp.HttpStatus 200 resp.Data EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 22

  24. HttpCommand Object oriented usage: hc SE.SALT.New'HttpCommand' One-off usage: (( SE.SALT.New'HttpCommand').Do 'GET' url).Data EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 23

  25. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 24

  26. SH 'curl ' Fetch raw vector of character vectors (bytes): raw SH 'curl -L ',url unicode 'UTF-8' UCS UCS raw Fetch raw file: SH 'curl -L o ',outfile,' ',url NDELETE outfile EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 25

  27. SH 'curl ' Fetch zip file: SH 'curl -L o ',outfile,' ',url NDELETE outfile EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 26

  28. SH 'curl ' Fetch zip file: SH 'curl -L o ',outfile,' ',url MKDIR dir :If 'Windows' # WG 'APLVersion' SH 'tar -xf ',outfile,' -C ',dir :Else SH 'unzip ',outfile,' -d ',dir :EndIf NDELETE outfile EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 27

  29. SH 'curl ' tmp 739 0 Fetch zip file: SH 'curl -L o ',outfile,' ',url MKDIR tmp,'/',dir :If 'Windows' # WG 'APLVersion' SH 'tar -xf ',outfile,' -C ',dir :Else SH 'unzip ',outfile,' -d ',dir :EndIf NDELETE outfile EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 28

  30. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 29

  31. Link.Import SE.Link.Import '#.repo' '/tmp/repo' Imported: #.repo c:\tmp\repo EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 30

  32. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 31

  33. FIX From array: From file: 2 FIX 'foo' 'bar' . . . foo . . . 2 FIX 'file://foo.aplf' . . . foo . . . EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 32

  34. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 33

  35. CSV From array: From file: CSV ('1,2,3' '4,5,6') 4 . 1 2 3 . 4 5 6 . ~ . CSV 'foo.csv' 4 . . 1 2 3 . 4 5 6 . ~ . is.gd/dyalog_csv EXPERIMENTAL.Get For more techniques: Getting Data and Code into the Workspace feat. ]Get 34

  36. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 35

  37. XML XML '<root><sub>cont</sub>outer</root>' 0 root 7 1 sub cont 5 1 outer 4 EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 36

  38. NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 37

  39. JSON r JSON '{"Abe":31,"Bob":27}' ]names r r.Abe r.Bob r.Abe 31 EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 38

  40. JSON JSON 'M' '{"Abe":31,"Bob":27}' 0 0 1 ~ 1 Abe 31 3 1 Bob 27 3 EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 39

  41. JSON r JSON '{"Abe":31,"Bob":27}' EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 40

  42. JSON r JSON '{Abe:31,/*Bob:27*/}' DOMAIN ERROR: JSON import: invalid name at offset 1 r JSON'{Abe:31,/*Bob:27*/}' EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 41

  43. JSON r JSON '{Abe:31,/*Bob:27*/}' EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 42

  44. JSON r JSON 'Dialect' 'JSON5' '{Abe:31,/*Bob:27 DOMAIN ERROR: JSON import: invalid name at offset 1 r JSON'{Abe:31,/*Bob:27*/}' EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 43

  45. Overview NGET HttpCommand IMPORT SH 'curl ' Link.Import ]OUTPUT.View ]TOOLS.APLCart FIX CSV ]WS.Names PROCESS ]OUTPUT.Repr XML JSON ]EXPERIMENTAL.Get Getting Data and Code into the Workspace feat. ]Get 44

  46. Next Webinar June 9: TBA TOOLS.APLCart Remember: BAA webinars every other week britishaplassociation.org/webinar-schedule-2022 May 19th; June 2nd, 16th, 30th; etc. More at: apl.wiki/activities Getting Data and Code into the Workspace feat. ]Get 45

Related


More Related Content