« first day (555 days earlier)      last day (2099 days later) » 

1:18 PM
Calling all APL wizards: can I call an APL function (defined inside a workspace file) from within the command line?
 
ngn
@J.Sallé from bash / cmd.exe? there's a -script option that lets you pipe APL code into the dyalog process
 
TIOBot logged in!
 
ngn
$ echo '2 + 3 4' | dyalog -script
5 6
 
@ngn see, that's why you're the wizards here. Would that work for a tradfn defined inside a workspace? Like so: $ echo 'fnName <args>' | dyalog -script [ws name]
 
ngn
@J.Sallé you could )load the workspace and call the function like you normally would in a session: echo -e ')load ws\nfnName args' | dyalog -script
if it's in a namespace, you need ns.fnName arg
 
1:27 PM
@ngn Ah! That's exactly what I needed. Thanks a lot!
 
ngn
you're welcome :)
 
TIOBot logged in!
TIOBot logged in!
 
#tio view
 
No session found for @Adám
 
#tio alias view
 
1:39 PM
@Adám
Command Aliases:
⍞← -> #TIO do apl-dyalog ⎕←%args%
⎕← -> #TIO run apl-dyalog (⎕NS⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''box on -fns=on''⊣enableSALT'⋄⎕←%args%

Language Aliases:
apl-dyalog -> [apl]

Message Aliases:
 
@ngn it seems to be working but I don't see anything being returned (even when I do echo '1 2 + 3 4' | dyalog -script)
I mean, it doesn't error or anything prntscr.com/ke9yb7
Same result on powershell btw
 
ngn
@J.Sallé ah... windows
 
Yeah I imagine that's the problem
 
ngn
that would be a question for @Adám
 
Okay, I'll wait and see if he's got some idea how to work it out
 
ngn
1:49 PM
@J.Sallé I don't see -script mentioned among the cmd line options for windows, most likely it's not supported there.
 
2:01 PM
@ngn yeah but if that was the case wouldn't it throw an error or something? Or at least be mentioned like -s is?
 
ngn
@J.Sallé shrug. It should, but historically Windows culture has always been UI-centred, neglecting the shell. Powershell is relatively new and I guess there hasn't been much demand for Dyalog to behave nicely there.
 
Yeah, I understand
 
2:18 PM
@Adám does the bot always delete message aliases on restart?
 
@SocraticPhoenix I think so.
 
hmmmmmm
how do you restart it
@Adám
 
@SocraticPhoenix I think the docker container is killed and re-created.
 
so the program is just killed D:
 
@SocraticPhoenix Yeah, but is shouldn't matter. I'm not expecting anything to be saved. I just want what's in the docker container to be loaded.
 
2:23 PM
huh
but message aliases?
 
I think you can configure Docker to call all of the commands you need after starting the program
 
except there aren't command line commands for aliases because they're room specific
 
Not sure though, I know little about docker other than what I see some coworkers doing
Docker only calls command line commands?
 
@SocraticPhoenix @J.Sallé The new version responds with 03/08/2018 14:30:48'email' and/or 'password' fields are missing from the config.json
 
unless it can send a command here :/
does it
but i just tested it >.<
this is confusing
 
2:25 PM
Looks like it ignores rooms.json
email/password used to be in rooms.json not in config.json. What's the new format?
 
it... did?
 
No idea, the only thing I did was changing the gradle declaration and the class imports
 
i haven't touched this project in months and the test config i had has email/password in config ...
 
Didn't even see a json file, come to think of it
 
mmm the json shouldn't have changed at all
 
2:29 PM
I'm actually just quoting what our IT manager wrote me. I don't have direct access to the bot. Let me check again.
 
oh okay
 
@J.Sallé Does echo 2+2 | dyalog.exe > dyalog.out & type dyalog.out work for you?
 
this is the test config i've been using
for reference i guess :D
 
@SocraticPhoenix Yes, and I just checked the original files I sent to IT. You're right.
 
ok cool
 
2:32 PM
@Adám it does in cmd. PShell errors out on the &, but doing it in the CMD is good enough I think
 
i just don't understand why it would be only the message aliases
 
I have {"joins":{"STACK_EXCHANGE":[52405]},"password":"*****************","email":"*****@dyalog.com"}
 
do command aliases persist
 
@SocraticPhoenix Yes.
 
w e i r d
 
2:33 PM
@Adám actually I just noticed it returned 2 instead of 4
 
@J.Sallé Yeah, happens by me too, which is why I asked. For some really odd reason (doens't happen by my colleague who gave me the line) it ignores the first two characters, so just put in two more spaces after echo
 
how does docker work
 
@Adám ah, I see.
 
is docker recreating the entire environment from a template?
or does the config persist across restarts
i have no idea what docker does D:
*room data, not config
@Adám
 
@SocraticPhoenix I think it rebuilds everything, using a predefined rooms.json
 
2:39 PM
then the only thing i can think of is that that json doesn't have any message aliases in it?
if the file is replaced any you create won't be saved
 
TIOBot (0.0.6) logged in!
 
@DyalogAPL Whoo!
 
@Adám unfortunately I don't think my script will work out :(. echo )load "C:\Users\João Sallé\Desktop\stock_exchange.dws"\napl_stock_farmer 1 1 1 1 | dyalog.exe > dyalog.out & type dyalog.out doesn't work at all. Tried a bunch of variations of it too :/
 
Can't you just write echo \napl_stock_farmer 1 1 1 1 | dyalog.exe "C:\Users\João Sallé\Desktop\stock_exchange.dws" > dyalog.out & type dyalog.out?
#tio alias view
 
@Adám
Command Aliases:

Language Aliases:

Message Aliases:
 
2:44 PM
No idea, will try that
 
all the aliases went away?
 
@Adám same thing, no output and no errors
 
@SocraticPhoenix It seems to ignore rooms.json
#tio alias apl apl-dyalog
 
@Adám No alias type called "language"
 
#tio alias apl apl-dyalog
 
2:47 PM
@Adám expected more arguments...
 
wel that is strange
 
@SocraticPhoenix I don't remember the syntax
 
me neither :D
 
ngn
@DyalogAPL cheeky bot, he likes arguing :)
 
@SocraticPhoenix Do you remember in which directory rooms.json should be?
 
2:48 PM
#tio alias lang apl-dyalog apl
 
@SocraticPhoenix you do not have permission to edit settings for this room!
 
i think
 
@ngn You're its role model.
 
@Adám same as config
 
ngn
@Adám :D
 
2:49 PM
#tio alias lang apl-dyalog apl
 
@Adám Added alias for apl-dyalog
 
what does the room.json look like
 
{"52405":{"languages":{"apl-dyalog":["apl"]},"permitted":[],"messages":{")ref":"%handle% [Dyalog APL Reference Card](http://docs.dyalog.com/16.0/ReferenceCard.pdf)",")idioms":"%handle% [Dyalog APL Idiom List](http://miserver.dyalog.com/Examples/Applications/Idiom_Search.mipage?nowrapper=1)",")lb":"%handle% `← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬∆⍙`\u2003[Install\u2026](https://abrudz.github.io/lb/apl)",")about":"%handle% You can evaluate a single line of APL by typing it into chat prefixed by `⍞←`. Use `⎕←` instead for boxed display and
 
oooh
that's interesting
 
Seems to be ignoring the STACK_EXCHANGE part?
 
2:52 PM
something like that
 
#tio alias command ⎕← #TIO apl {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
 
@Adám Added alias for ⎕←
 
⎕←2+2
 
@Adám
4
 
I believe if you look at the rooms.json again it'll now have this alias under STACK_EXCHANGE
 
2:53 PM
#tio alias command ]help ]help %args% -url
 
@Adám Added alias for ]help
 
@J.Sallé it does
 
im guessing that an earlier version of the bot saved things differently
in fact i sort of remember changing it and saying something like "room data will break"
 
@SocraticPhoenix any moment…
 
TIOBot (0.0.6) logged in!
 
2:56 PM
@SocraticPhoenix aaaaah, it seems to be appending the STACK_EXCHANGE piece of the JSON to the original one without the STACK_EXCHANGE
 
yes
originally it just stored by room id
but there are three chat platforms that can have duplicate room ids
 
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #TIO apl {0::⎕←⊃⎕DM⋄%args%}(⎕NS⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''←box on -f=on -t=tree''⊣enableSALT⋄⍬'
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%}⍬
] -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'%args%'}(⎕NS⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''←box on -f=on -t=tree''⊣enableSALT⋄⍬'
⎕← -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''←box on -f=on -t=tree''⊣enableSALT⋄⍬'

Language Aliases:
apl-dyalog -> [apl]
 
Yeah it's probably a forgotten piece of code
 
2:57 PM
Perfect.
@SocraticPhoenix Thank you for your help (and for the bot in general)!
 
@J.Sallé basically the room.json @Adám had was saved by an older version of the bot that didn't separate rooms by chat platform (stack_exchange, stack_overflow, meta_stack_exchange). At some point I modified the system to save room data separate for each platform, so it was looking under STACK_EXCHANGE and not finding any data.
 
@J.Sallé Thank you for updating the login system.
 
probably my fault for not explaining properly
and @Adám you're welcome :D
 
@Adám you're very welcome :D
 
3:16 PM
i have to be honest i'm pretty hyped this thing is still being used... most of my projects are just dead XD
 
@SocraticPhoenix Oh, this bot has been a game changer. My APL lessons were so much better due to the ability of me and the attendees to execute APL right there inside the lesson. We are currently working on immortalising this feeling by transforming the lessons to Jupyter notebooks, so that one can still experiment with APL between lesson paragraphs.
 
i don't know what Jupyter is but i'm glad it's been helpful
 
@SocraticPhoenix Like this but the reader can modify and re-execute the APL code.
#tio alias command ⋄ #TIO apl {0::⎕←⊃⎕DM⋄%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
 
@Adám Added alias for ⋄
 
3:35 PM
#tio alias command ] #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'%args%'}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
 
@Adám Added alias for ]
 
#tio alias message )lb %handle% ← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬∆⍙ [Install…](abrudz.github.io/lb/apl)
 
@Adám Added alias for )lb
 
)lb
 
@Adám ← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬∆⍙ [Install…](abrudz.github.io/lb/apl)
 
3:42 PM
#tio alias message )lb %handle% ← +-×÷*⍟⌹○!? |⌈⌊⊥⊤⊣⊢ =≠≤<>≥≡≢ ∨∧⍲⍱ ↑↓⊂⊃⊆⌷⍋⍒ ⍳⍸∊⍷∪∩~ /\⌿⍀ ,⍪⍴⌽⊖⍉ ¨⍨⍣.∘⍤@ ⍞⎕⍠⌸⌺⌶⍎⍕ ⋄⍝→⍵⍺∇& ¯⍬∆⍙Install…
 
@Adám Added alias for )lb
 
#tio alias message )ref %handle% Dyalog APL Reference Card
 
@Adám Added alias for )ref
 
#tio alias message )idioms %handle% Dyalog APL Idiom List
 
@Adám Added alias for )idioms
 
3:44 PM
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #TIO apl {0::⎕←⊃⎕DM⋄%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%}⍬
] -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'%args%'}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
⎕← -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).⍎'⎕CY''salt''⋄⎕SE.UCMD''←box on -f=on -t=tree''⊣enableSALT⋄⍬'

Language Aliases:
apl-dyalog -> [apl]
 
]help ○
 
⋄ a←'APL' ⋄ a a
⍞←'hello world'
 
@Adám hello world
 
3:47 PM
⋄ a←'APL' ⋄ ⎕←a a
 
@Adám
┌───┬───┐
│APL│APL│
└───┴───┘
 
#tio alias command ⎕← {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
 
@Adám Added alias for ⎕←
 
⎕←2+2
⋄ ⎕←2+2
 
@Adám
4
 
3:48 PM
⎕←2+2
#tio alias view
 
@Adám
Command Aliases:
]help -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'help %args% -url'}(⎕NS⍬).(enableSALT⊣⎕CY'salt')
⋄ -> #TIO apl {0::⎕←⊃⎕DM⋄%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
⍞← -> #TIO do apl-dyalog {0::⎕←⊃⎕DM⋄⎕←%args%}⍬
] -> #TIO apl {0::⎕←⊃⎕DM⋄⎕←⎕SE.UCMD'%args%'}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
⎕← -> {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')

Language Aliases:
apl-dyalog -> [apl]

Message Aliases:
 
#tio alias command ⎕← #tio apl {0::⎕←⊃⎕DM⋄⎕←%args%}(⎕NS⍬).(⎕SE.UCMD'box on -f=on -t=tree'⊣enableSALT⊣⎕CY'salt')
 
@Adám Added alias for ⎕←
 
⎕←2+2
 
@Adám
4
 
 
1 hour later…
5:15 PM
@Adám I managed to make it work through Git Bash of all things.
$ echo apl_stock_farmer 1 2 3 1 | dyalog 'stock_exchange.dws' -script
.\stock_exchange.dws saved Fri Aug  3 10:11:55 2018
b10
 

« first day (555 days earlier)      last day (2099 days later) »