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

12:07 AM
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?
12:23 AM
@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
12:24 AM
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
12:34 AM
@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
12:36 AM
@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
12:42 AM
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
12:48 AM
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'
12:58 AM
@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......
1:05 AM
@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
1:17 AM
I'd guess you should -s -b because +s is also a thing
1:31 AM
:O
in case anyone hasn't seen or heard of april, or who wants to watch a talk on APL stuff
2:15 AM
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…
7:24 AM
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).
8:14 AM
@Adám thanks this is much better
8:49 AM
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…
1:16 PM
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
1:36 PM
@Razetime You can change the properties of your Dyalog shortcut. Set "Start in".
@Razetime Yes, or Session>Save As… and choose location.
1:50 PM
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.
1:56 PM
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
2:50 PM
@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
3:17 PM
@xpqz I'm currently bored in neither class nor a meeting
does that count?
:D
 
1 hour later…
4:37 PM
@dzaima nice, can you get that down to 9?

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