« first day (1696 days earlier)      last day (1173 days later) » 

00:07
trying it now
now that I've had time to think about it, the content of the file would like like something like this

∊'main←{' <content> '}'
because that's how it looks in my of the files for the other languages
so the body would be anything that would fit into the body of a dfn, returning the final expression
but I'm trying what you sent now
@nathanrogers In that case, you want ⍎⎕FX 1⌽'}arg' 'main←{',⊃⎕NGET'filename'1
I gues...
ok so say the user type 1+⍳10
Yes?
what I do is write that to a file 'main←{\n' + content + '\n}'
so the content is
main←{
content
}
so then the ⎕LX expression, would be something like ⎕LX←'readin in main from file ⋄ main 0'
but because I don't understand ⎕FX, its treating each character as a line?
00:23
@nathanrogers ⎕LX←'(⍎⊃2⎕FIX'file://filename')0 should work.
what is file:// relative to?
Current directory.
how can I pass an absolute path?
it says "file expected"
⎕FIX'file://path/to/filename'
but path isn't relative to where its being run
the path is some fixed point in the filesystem
00:24
E.g. on Windows, you could do file://C:\mypath\myfile.aplf
On Linux, you could do file:///mypath/myfile.aplf
how do I get environment variables?
@nathanrogers Did you check APLcart?
If you want a function, and are on 18.0, there's also ⎕SE.Dyalog.Utils.Config
none of them are what I'm looking for
i'm looking for my system variables
00:34
@nathanrogers What is the name of the variable you want the value of?
one that I have defined
Yeah, what's its name?
in my .bashrc there are names and I want to know what they are
Wait, you want the list of all envvars?
yes
environment variables
00:36
@nathanrogers Does ⎕SE.Dyalog.Utils.Config⍬ give the result you want?
⊃↓⍉ ⎕SE.Dyalog.Utils.Config⍬
APPDATA AUTO_PW DYALOG DYALOG_CONFIGDIR DYALOG_SERIAL DYALOG_SHORTVERSION HOME H
OSTTYPE LANG LC_CTYPE LD_LIBRARY_PATH LESSCLOSE LESSOPEN LOGNAME LOG_FILE
LS_COLORS NAME OLDPWD PATH PWD SALTSETTINGSFILE SESSION_FILE SHELL SHLVL
TERM TMUX TMUX_PANE TRACE_ON_ERROR USER USERCONFIGFILE WSL_DISTRO_NAME WSPA
TH XDG_DATA_DIRS _
no, I don't see my names here
the main one I'm looking for is a variable called "server"
it tells me if I'm in the server environment or local to know which directory to find things
and "server" is not in this list
Which OS is this? Linux?
its wsl
so yes
ooboonut
@nathanrogers Does ⎕SH'set' contain the variable?
ok no, this appears to be returning windows stuff
PATH contains the PATH contents of my windows PATH variable
00:42
Well, if your environment variable isn't visible to the APL process, then there's not much I can do.
but ⎕SH 'printenv' gives me what I want
OK.
Maybe ⎕SE.Dyalog.Utils.Config should use printenv instead of env
for linux sure
00:48
Funny, on my WSL their outputs are identical. I'd appreciate a short description of when they differ.
97
Q: What is the difference between 'env' and 'printenv'?

WiSaGaNWhat is the difference between the two commands env and printenv? They both show the environment variables, and the output is exactly the same aside from _. Are there any historical reasons for there being two commands instead of one?

@Bubbler I just read through all of the answers there, and I still don't see how they would give significantly different results.
Also found this (no answers, but comments seem to explain the phenomenon)
@Bubbler That seems to be due to Eclipse being a child of a different process than the shell. However, here, we're talking env and printenv giving different results from identical shells that are both children of the same process.
@Adám how to print newline?
⎕←'aaaaaaaaa\n'
00:58
@nathanrogers Did you forget to add backticks around your code (`⎕←code`)? You can edit your message and I will edit my reply.
⎕UCS 13 or something?
@nathanrogers Yes. Depending on which newline character you are looking for (there are quite a few in Unicode).
i want \n specifically
That's ⎕UCS 10
This one is fun.
OH NO
dyalog's output is going to stderr......
01:05
@nathanrogers Is your server=whatever preceded by export or not?
no
but I found it in printenv
oh this is not good at all
why is the output going to stderr
Are you using to print something?
no
this is the giant header that dyalog prints out on startup
it gets dumped to stderr
so I'm trying to catch stderr and handle it, and this breaks my whole program. I can add a special exception for dyalog, but that's just silly
I could also just dump stderr for this command
but still annoying
oh nice
can i do -sb or -s -b
01:17
I'd guess you should -s -b because +s is also a thing
01:31
:O
in case anyone hasn't seen or heard of april, or who wants to watch a talk on APL stuff
02:15
april was quite a hot topic earlier
i think wezl posted this video earlier
when earlier?
we got an april bot in the discord to test out april stuff
oh but you're in the discord...
I get confused with the name :/
 
5 hours later…
07:24
Google search is so annoying
when i ask for .NET dyalog it gives me a pdf from 14.0
@rak1507 Oh right. Grrrr. Well, at least we have a plan for fixing that.
ah that's good, I've basically stopped using google for APL stuff, ]help is generally more useful it seems (for getting the current version)
Yup, that's what I use too (and why I made it).
08:14
@Adám thanks this is much better
08:49
0
Q: How can I mask the scan operator in APL?

Adam NathanAssuming I have an array N ← 0 0 0 1 1 1 0 0 1, how can I apply the scan \ to achieve the array 0 0 0 1 2 3 0 0 1? +\N gives me 0 0 0 1 2 3 3 3 4 which is not what I want. +\¨⊆⍨N gives me | 1 2 3 | 1 | which is closer, but then I lose the positions. Is there a way to carry the original values in ...

 
4 hours later…
13:16
Session file C:\Users\raghu\Documents\Dyalog APL-64 18.0 Unicode Files\def_us.dse saved Fri Sep 17 18:46:20 2021
Can't save - file could not be created.
why am i getting this on the windows ide?
@Razetime What is your current directory? ]cd
C:\Windows\system32
You need to run in admin mode to write there, but you probably don't want to write there.
ah i see
where do i set start directory
do I just ]cd to there and save on exit
13:36
@Razetime You can change the properties of your Dyalog shortcut. Set "Start in".
@Razetime Yes, or Session>Save As… and choose location.
13:50
CMegaC: golf 30×(¯6+(2*1∘+)×3-+⍨-×⍨)÷(⊢×1∘+×(1++⍨)ׯ1+3∘×+3××⍨) for positive integers >= 1
What the actual... is that?
@xpqz I'm currently bored in class
What's the class?
stats
I'm currently bored in a meeting.
13:56
from my limited meeting experience, it's hard not to be bored
@rak1507 time to boot up my train simplifier
if it can simplify that to the 9 character thing I started with, I will be really impressed
that is some obfuscation you've done there
14:50
@rak1507 (60×3-2∘*×3+×⍨-+⍨)÷(⊢+×⍨)(×-3×⊣××)1++⍨ - just some basic algebraic manipulation
(¯6+(3+×⍨-+⍨)×2*1+⊢)÷1⊥4*⍨⍳
(1⊥(2*⍳)×2*⍨⍳)÷1⊥4*⍨⍳
((1⊥×⍨×2*⊣)÷1⊥4*⍨⊢)⍳
×⍨∘⍳(×÷⍥(+/)×⍨⍤⊣)2*⍳ - equivalent length mess
15:17
@xpqz I'm currently bored in neither class nor a meeting
does that count?
:D
 
1 hour later…
16:37
@dzaima nice, can you get that down to 9?

« first day (1696 days earlier)      last day (1173 days later) »