« first day (1099 days earlier)      last day (1556 days later) » 

10:00 AM
CMC : An expression yielding ⎕ML without using any quad names or execute etc Just use normal primitives and literal constants. Tips.
You can test your solution with (⊢≡{⎕ML←⍵ ⋄ your_expression_here}¨)0 1 2 3
 
@Adám ⎕ML←3 part looks pretty hard to minimize
 
@Bubbler Well, you have to find the minimal invocation of to detect a difference between and .
⋄ ⎕←1 0 1 0 0⊂'Hello'
⋄ ⎕←1 0 1 0 0⊆'Hello'
 
@Adám
┌──┬───┐
│He│llo│
└──┴───┘
┌─┬─┐
│H│l│
└─┴─┘
 
10:20 AM
⎕←(⊢≡{⎕ML←⍵ ⋄ (≢⍴∊1)+(≢↑⍬)+2-≢⊂⍨1 1}¨)0 1 2 3
 
@Bubbler
1
 
@Bubbler That's a nice starting point, but you can combine operations instead of computing each component separately. Marshall and I got down to 14.
 
 
4 hours later…
2:13 PM
@dyalog ⍳100
⎕←⍳10 ⍝ Sorry folks, doing a demo :)
 
@MortenKromberg Bot doesn't handle comments.
⎕←⍳10 ⊣ ''Sorry folks, doing a demo :)'
Or mismatched quotes :-(
⎕←⍳10 ⊣ 'Sorry folks, doing a demo :)'
 
@Adám
1 2 3 4 5 6 7 8 9 10
 
@Adám - Regarding the CMC - Not sure I can golf it, but I think the approach I'd take would be +/E1 E2, where E1 is a boolean expression that yields 0 for ⎕ML=0 only, and E2 is a boolean expression that yields 1 for ⎕ML=2 only.
 
@JeffZeitlin And how about ⎕ML←3?
 
@Adám Wups! Missed that 3 was a valid value for ⎕ML.
@Adám - Of course, being able to test for ⎕ML=3 more-or-less seems to require familiarity with APL2, since the help doesn't provide any examples.
 
2:26 PM
@JeffZeitlin Uh, I think it does:
]help ⊂
 
@Adám - Ummm... OK. I was looking at the Tips link you provided, and the corresponding page in the Help file on Windows - that just says "⊂ is like APL2, and so is ⎕TC"
 
 
2 hours later…
4:20 PM
@Adám - Concerning our brief discussion about cross-platform compiling... from reading the big pile of documentation, compiling APL results in 'bytecode'. If that bytecode is the same for any platform for a given version of Dyalog APL, then it becomes in theory close to trivial to allow/implement cross-platform builds:
@Adám - It used to be that a "bound" program would be encrypted or bytecoded source appended to a specially configured interpreter. That 'terp would read only from the appended cryptcode/bytecode, so you'd ship the combined 'terp-and-code as your "turnkey" solution. Cross-platform "binds" become essentially trivial, since the "binder" can, on a parameterized basis, select which of several 'terps to append the code to.
@Adám - So, if Dyalog APL were to take that route, I could buy a "Cross-platform Developer License", and it would include "Windows-preamble", "Linux-preamble", and "MacOS-preamble", and the command "APLBind -aplsource MyAPL.ws -platform Linux" would take MyAPL.ws, encrypt it, append it to a copy of Linux-Preamble, and output an executable called MyAPL (for Linux), even if I'm developing on Windows.
@Adám - The command "APLBind -aplsource MyAPL.ws -platform Windows" would do the same thing, but picking up Windows-preamble instead, and generating MyAPL.exe
 
@JeffZeitlin The is really valuable feedback. I'll make sure to forward it to the relevant people.
 
 
4 hours later…
8:12 PM
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄{0::⎕←⊃⎕DM⋄%args%⋄⍬⊤⍬}⎕SE.(⎕WS'Event'('SessionPrint' 'd')⊣⎕CY'dfns')
)tio -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+(⎕UCS'apl-dyalog'),t,('UTF-8'⎕UCS'%args%'),t←255 255⊣'base64'⎕CY'dfns'
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%⋄⍬⊤⍬}⍬
f← -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+∊{255,⍨'UTF-8'⎕UCS⍵}¨'apl-
 
8:23 PM
@Adám - For historical (hysterical?) interest, there's an browser-based IBM 5100 emulator - supporting both BASIC and APL - at members.aon.at/nkehrer/ibm_5110/emu5110.html
 
@JeffZeitlin Oh wow. Thank you so much!
 
 
1 hour later…
9:30 PM
#tio alias ⎕← #tial apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙' ':trap 0'(164↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝%args%
 
@Adám No alias type called "⎕←"
 
#tio alias command ⎕← #tial apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙' ':trap 0'(164↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ⎕←
 
⎕←⍳2 3
⎕← 3
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄{0::⎕←⊃⎕DM⋄%args%⋄⍬⊤⍬}⎕SE.(⎕WS'Event'('SessionPrint' 'd')⊣⎕CY'dfns')
)tio -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+(⎕UCS'apl-dyalog'),t,('UTF-8'⎕UCS'%args%'),t←255 255⊣'base64'⎕CY'dfns'
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%⋄⍬⊤⍬}⍬
f← -> #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+∊{255,⍨'UTF-8'⎕UCS⍵}¨'apl-
 
9:32 PM
#tio alias command ⎕← #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙' ':trap 0'(164↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ⎕←
 
⎕←⍳2 3
 
@Adám
┌───┬───┬───┐
│1 1│1 2│1 3│
├───┼───┼───┤
│2 1│2 2│2 3│
└───┴───┴───┘
 
⎕←+/÷1⌈≢
 
@Adám
  ┌─┼───┐
  / ÷ ┌─┼─┐
┌─┘   1 ⌈ ≢
+
 
9:34 PM
#tio alias command ⎕← #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙' ':trap 0'(164↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝⎕←%args%
 
@Adám Added alias for ⎕←
 
#tio alias command ⋄ #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙' ':trap 0'(164↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ⋄
 
⋄⍳2 2
 
@Adám
┌───┬───┐
│1 1│1 2│
├───┼───┤
│2 1│2 2│
└───┴───┘
 
9:36 PM
#tio alias command ⎕← #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'(165↓2⊃⎕SRC⎕THIS)':else⋄↑((6⍴0⍴⊢),5∘↓)¨@{0 1 0}⎕DM⋄:end'⍝⎕←%args%
 
@Adám Added alias for ⎕←
 
⎕←⍳3
 
@Adám
1 2 3
 
⎕←÷0
 
@Adám
DOMAIN ERROR
       ⎕←÷0
        ∧
 
9:39 PM
#tio alias command ⎕← #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'(162↓2⊃⎕SRC⎕THIS)':else⋄↑'' ''@(⍳6)¨@{0 1 0}⎕DM⋄:end'⍝⎕←%args%
 
@Adám Added alias for ⎕←
 
⎕←1
 
@Adám
1
 
⎕←÷0
 
@Adám
DOMAIN ERROR
      ⎕←÷0
        ∧
 
9:40 PM
#tio alias command ⋄ #tio apl ⎕SE.d←{(1=≡⍺)∧⍬≡⍴⍺:⎕←⍺dft 0⋄⎕←disp⍺}⋄⎕SE.(⎕WS'Event' 'SessionPrint' 'd'⊣⎕CY'dfns')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'(162↓2⊃⎕SRC⎕THIS)':else⋄↑'' ''@(⍳6)¨@{0 1 0}⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ⋄
 
⋄⍳2 3
 
@Adám
┌───┬───┬───┐
│1 1│1 2│1 3│
├───┼───┼───┤
│2 1│2 2│2 3│
└───┴───┴───┘
 
⋄÷0
 
@Adám
DOMAIN ERROR
      ÷0
      ∧
 
9:41 PM
⋄⍳3⋄÷0
 
@Adám
1 2 3
DOMAIN ERROR
      ⍳3 ⋄ ÷0
           ∧
 
⋄⍳4
⋄÷0
⋄⍳5
 
@Adám
1 2 3 4
DOMAIN ERROR
      ⍳4 ⋄ ÷0 ⋄ ⍳5
           ∧
 
#tio alias command ⍞← #tio do apl-dyalog ⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'(59↓2⊃⎕SRC⎕THIS)':else⋄⊃⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ⍞←
 
9:50 PM
⍞←⍳10
 
@Adám 1 2 3 4 5 6 7 8 9 10
 
⍞←÷0
 
@Adám DOMAIN ERROR
 
#tio alias command ] #tio apl (⎕NS⍬).(enableSALT⊣⎕CY'salt')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'('⎕SE.UCMD',''''{⍺,⍺,⍨⍵/⍨1+⍺=⍵}120↓2⊃⎕SRC⎕THIS)':else⋄⊃⎕DM⋄:end'⍝%args%
 
@Adám Added alias for ]
 
9:58 PM
]version
 
@Adám
 Dyalog  17.1.36845 64-bit Unicode, BuildID f856fe9c
 OS      Linux 5.2.11-100.fc29.x86_64 #1 SMP Thu Aug 29 12:52:22 UTC 2019 x86_64
 SALT    2.805
 UCMD    2.4
 .NET    (unavailable)
 WS      17.1
 
#tio alias command ]help #tio do apl-dyalog (⎕NS⍬).(enableSALT⊣⎕CY'salt')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'('⎕SE.UCMD',''''{⍺,⍺,⍨⍵/⍨1+⍺=⍵}120↓2⊃⎕SRC⎕THIS)':else⋄⊃⎕DM⋄:end'⍝help -url %args%
 
@Adám Added alias for ]help
 
]help -
 
10:00 PM
]help ⍝
 
#tio alias command ]help #tio do apl-dyalog (⎕NS⍬).(enableSALT⊣⎕CY'salt')⋄⍎'⋄⍬',⍨⎕FX↑'⍙⍙' ':trap 0'('⎕SE.UCMD',''''{⍺,⍺,⍨⍵/⍨1+⍺=⍵}120↓2⊃⎕SRC⎕THIS)':else⋄⊃⎕DM⋄:end'⍝help -url "%args%"
 
@Adám Added alias for ]help
 
]help ⍝
 
10:10 PM
#tio alias command )tio #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+(⎕UCS'apl-dyalog'),t,('UTF-8'⎕UCS 157↓2⊃⎕SRC⎕THIS),t←255 255⊣'base64'⎕CY'dfns'⍝%args%
 
@Adám Added alias for )tio
 
)tio ⎕←'hello world'
 
#tio alias command f← #tio do apl-dyalog ⎕←'https://tio.run/##','\+' '='⎕R'@' ''base64 10↓¯8↓256|⊃⌽3(219⌶)¯128+256|128+∊{255,⍨'UTF-8'⎕UCS⍵}¨'apl-dyalog' ''(171↓2⊃⎕SRC⎕THIS)'f←⍎⎕IO⊃¯3↑⎕SRC⎕THIS'⊣'base64'⎕CY'dfns'⍝%args%
 
@Adám Added alias for f←
 
10:16 PM
f←+⌿÷1⌈≢
 
)about -> %handle% Evaluate a single line of APL by prefixing it with . Use ⍞← instead for inline answers that fit on a line. Use ] to call user commands, including ]help ⍣ for help on a glyph etc. Do not use markdown, but fixed-width (4 initial spaces, Ctrl+K) is fine. Commands: )lb for language bar, )docs for full documentation, )ref for PDF reference card, )idioms for idiom list, )tio to create link or prefix code with f← for link to separated function assignment.
#tio alias message )about %handle% Evaluate one line of APL by prefixing it with . Use ⍞← instead for inline one-liner answers. Use ] to call user commands, including ]help ⍣ for help on a glyph etc. Do not use markdown, but fixed-width (4 initial spaces, Ctrl+K) is fine. Commands: )lb for language bar, )docs for full documentation, )ref for PDF reference card, )idioms for idiom list, )tio to create link or prefix code with f← for link to separated function assignment.
 
@Adám Added alias for )about
 
)about
 
@Adám Evaluate one line of APL by prefixing it with . Use ⍞← instead for inline one-liner answers. Use ] to call user commands, including ]help ⍣ for help on a glyph etc. Do not use markdown, but fixed-width (4 initial spaces, Ctrl+K) is fine. Commands: )lb for language bar, )docs for full documentation, )ref for PDF reference card, )idioms for idiom list, )tio to create link or prefix code with f← for link to separated function assignment.
 
10:23 PM
Announcement: The bot now tolerates comments, and outputs intermediary results without needing ⎕←.
2
⋄ 'first line' ⋄ 'second line' ⍝ see?
 
@Adám
first line
second line
 

« first day (1099 days earlier)      last day (1556 days later) »