« first day (1504 days earlier)      last day (33 days later) » 

1:05 AM
@ngn what commands are available with \? how do I see what symbols are defined? Workspaces, namespaces etc?
 
1:16 AM
@Adám Email is better.
 
 
1 hour later…
2:24 AM
@ngn what does this error mean when calling this function ?
primes:{f:{$[(y<z)&p[x;y];f[x,y;y+2;z];(y<z);f[x;y+2;z];x]}; f[2 3;5;x]}
'val
{$[(y<z)&p[x;y];f[x,y;y+2;z];(y<z);f[x;y+2;z];x]}
^
can I not define a function within a new block?
also what is this error?
'stk
{$[(y<z)&p[x;y];primes[x,y;y+2;z];(y<z);primes[x;y+2;z];x]}
^
 
value error
 
about NGN's?
 
I think there's a way to declare a variable, which might make recursion work
 
@nathanrogers yes
 
 
1 hour later…
3:39 AM
github.com/abrudz/Kbd @Adám link to MSKLC is broken
 
4:09 AM
yeah got it
Idk where the layout is supposed to show up
aaa why isn't it showing
yess it worked after a restart
 
4:30 AM
nice
 
∇∆∇∆∇∆∇∆∇∆∇
 
its good right?
 
5:19 AM
@nathanrogers @Razetime Fixed. Thanks.
 
5:58 AM
@nathanrogers yes
 
6:29 AM
@Razetime Any response for me regarding where to discuss offer?
 
@Razetime I'm sorry. Somehow I completely missed that.
 
should I send a message to abrudz@dyalog?
 
@Razetime To adam@ yes.
 
will do
 
6:31 AM
Thanks.
 
 
2 hours later…
8:56 AM
github.com/mlochbaum/BQN/tree/master/editors @Marshall Mind if I pull request to add a vscode plugin?
 
@Marshall Might be a better symbol than in being more distinct, have better support, and be less likely to be super wide?
 
9:17 AM
Morning.
 
@xpqz Many places, yes.
 
The sun never sets on the APL empire.
 
it's about afternoon here.
 
@xpqz True:
CMC: Given a UTC offset in hours, return 'Good morning'/'Good afternoon'/'Good evening'/'Good night' depending on the time at that offset; 6am–noon,noon–6pm,6pm–midnight,midnight–6am. All intervals are [a,b)
 
10:28 AM
Is there a way to get httpcommand to separate between parameters to be encoded on the URL and in the body of the request?
(for a POST, say)
GetJSON 'GET' insists on json-encoding my parameters and passing in the body, which barfs the remote API.
I can ?key=value myself on the URL, and then it works.
 
@xpqz So why not do that?
@xpqz How are you supplying your parameters?
 
Sure. But httpcommand knows already how to do the right thing.
So this works just fine:
hc←⎕SE.SALT.Load'HttpCommand'
url←'https://skruger.cloudant.com/airaccidents/_all_docs?include_docs=true&limit=3'
(hc.GetJSON 'GET' url).Data.rows
Try it (the database is open for reads)
However, this will crash your interpreter/fill your WS:
(params←⎕NS'').(include_docs limit)←'true' 3
(hc.GetJSON 'GET' url params '').Data.rows
 
Maybe use the normal 'GET' and do the JSONification yourself?
Instead of supplying params as a ns, use a single urlencoded string.
You can use hc.UrlEncode with a namespace or name-value pairs to create the params.
 
I understand what it does -- but perhaps as a feature request, it would be nice to do what say Python's requests library does -- allowing you to pass the parameters and request body separately.
 
@Brian ^
(Brian is on the American east coast, so it may take a few hours for him to respond.)
 
10:42 AM
No rush :) -- I know he's working on the next version anyway.
 
This was fun:
0
A: Roman Numeral-like Code Generator

AdámAPL (Dyalog Unicode), 26 24 bytes Full program. Prompts for number from stdin, and prints program to stdout. '{⍺←+/⊢ׯ1*2</,∘0⋄⍺,⍵}'⍞ Try it online! (slightly modified version for ease of use) The generating program simply prepends a special string to the left of the input number (or numbers, a...

@Bubbler Thanks for fixing the problem spec.
 
11:32 AM
Nice answer!
 
11:48 AM
Thanks. Golfs appreciated.
 
12:13 PM
@Razetime Please do.
@Adám I don't particularly like the way it looks, but I also think it's too late now to do a major change to a character that's used constantly.
 
The curse of a user base.
 
I also think is a bit weird for a reshape builtin fwiw
 
it's also just a smear at small sizes
 
And I don't think it looks futuristic enough to put on a flying saucer. Ruins of Atlantis, maybe.
 
12:58 PM
make a spinoff of BQN named 'Zeus' containing only this symbol as a change
 
Don't even both to change the arguments back to Greek letters.
 
@EinRock Hi there. Interested in APL?
 
I would guess he's one of RGS's friends
 
That was going to be my next question.
 
1:29 PM
@Marshall nope not at all
none of that stuff
just the lightning
 
@xpqz Good morning! I'll take a look at the Python requests library. At present, if you want parameters in both the body and query string, you'll need to supply the params parameter (for the body) and build the query string yourself.
For now, you'd do something like
(hc.GetJSON 'post' (url,'?',hc.UrlEncode queryParams) bodyParams).Data.rows

I can envision extending the URL parameter to be more than a simple character vector and having HttpCommand build the URI with the query string, something like:
hc.GetJSON 'post' (url queryParams) bodyParams

You mentioned that the query fills your workspace. I've got an option in the forthcoming version of HttpCommand to direct the body of the response to a file. That might help in this case as well.
 
1:45 PM
@Brian yep, that's where I got to, too.
In requests you'd do something like requests.post(url, params=par, json=body) allowing you to make the separation between arguments and 'payload'.
Or if the payload isn't json:
requests.post(url, params=par, data=body)
Can also add a headers=.. named parameter
 
@xpqz You'd have to assign content-type in that case, right?
What do you think of my proposed syntax?
 
@xpqz Once we get array notation, we can write APL like HttpCommand.Post(url:url ⋄ params:par ⋄ data:body) ― It'll be awesome.
 
@Brian I really like your proposal hc.GetJSON 'post' (url queryParams) bodyParams as it almost reads like a description in English: get the json via post to url with query parameters, and a body of...
 
When I wrote HttpCommand, the intent was to make it easier for people who didn't understand the nuances of HTTP to construct requests, but without losing the ability for people who are more knowledgeable to build more complex requests
 
@Brian another approach would be to add another field, or letting the user set the Data field on a request separately.
 
1:56 PM
@xpqz I think I like it as well (coffee has kicked in :))... it'll be in the next major version release (later this month)
hmm, need to think about that one... maybe a Query field that, if set, would construct or add to the query string. Not sure what to do in the case where:
cmd←⎕NEW HttpCommand 'get' 'somewhere.com?foo=goo'
cmd.Query←'moo' 'boo'

I guess it could just append '&moo=boo' to the end...
I suppose there's no reason to not have both the shorthand version (url queruParams) and a Query field and let the user decide which to use based on their application
 
I was thinking that the body/payload would be separate, not the params:
(params←⎕NS'').(include_docs limit)←'true' 3
cmd←⎕NEW HttpCommand 'post' 'somewhere.com' params
cmd.Body←1⎕JSON myarray
cmd.Run
or something
You have .Data on the response.
Maybe a .Data on the request, too?
 
@xpqz You can already do that by setting your content-type header and params to be the body content.
 
As we're on wish lists... another thing that would be appreciated certainly by me is some canned auth options. It quickly gets a bit long in the tooth rolling your own cookie auth or token exchange...
 
If you set the content-type and params is a simple character vector, we don't do any further processing on the payload
 
2:11 PM
@Brian Sure -- I figured it out. It just took me a while to get that params can be either the body or the query params, but to have both you need to do your own parameter encoding on the URL.
 
@xpqz We already support HTTP Basic authentication but if you have suggestions in addition, I'm interested to hear
 
@Brian I could for the life of me not find how to do basic with less than rolling my own headers...
 
it's in the URL documentation
⍝ URL - the URL to direct the command at
⍝ format is: [HTTP[S]://][user:pass@]url[:port][/page[?query_string]]
 
Ah, ok -- that's a bit too open for me (creds will show in logs).
hd←1 2⍴'Authorization' (⊃,/'Basic '(hc.Base64Encode creds.cloudant.dou_user,':',creds.cloudant.dou_password))
 
@xpqz we build the headers for you if you supply creds in the URI
 
2:16 PM
And you'll strip it from the URL before firing the request?
 
of course :)
 
Nice.
That wasn't obvious to me from reading the docs, but I may have missed it.
 
@xpqz won't this log creds too?
 
http access logs don't log auth headers normally
 
ahh cool
 
2:19 PM
@xpqz yeah, at present the documentation is contained within the HttpCommand class (we're changing that as well). And I've tried to to the line between giving enough information for people to use it and a complete HTTP tutorial (there are much better ones out there than I could ever write)
 
They could, of course.
@Brian It's nice that the source is available -- I can step through a request and see a bit what's going on.
 
@xpqz Also, if you're curious about what HttpCommand will actually send, you can use a left argument of 1 to any of the command issuing functions and it will return the request that would have been sent
 
Wow, that would have saved me some time
 
1 HttpCommand.Get 'https://brian:secret@dyalog.com'
GET / HTTP/1.1

Host: dyalog.com

User-Agent: Dyalog/Conga

Accept: */*

Accept-Encoding: gzip, deflate

Authorization: Basic YnJpYW46c2VjcmV0
We'll be moving HttpCommand to its own repository and providing more comprehensive documentation online
 
3:03 PM
re "I heard IBM just sold APL2 off" and "I heard that APL+ is basically orphan now after STSC went bankrupt" and @adam's "Way more money is made using non-Dyalog APLs than Dyalog APL": this is pretty loose talk!

You need to remember that when IBM entered the APL game, their primary motivation was to provide tools that would make people spend millions of dollars to buy mainframe computers, the software was given away more or less for free back then. I believe this remained IBM's primary motivation all along: even today, they make far more money off the hardware that APL runs on than the APL
 
 
1 hour later…
4:17 PM
@xpqz I believe the requests library translates the json body into a query string
 
4:35 PM
@nathanrogers The issue is if it's transmitted as part of the URL, or as part of the body. Requests absolutely passes it as the body of the request (as does HttpRequest). Requests gives you control over what is encoded on the url and what gets sent in the body.
(the issue for me, anyway)
 
 
1 hour later…
5:42 PM
@Adám I have a question for you
I don't understand this error message
FILE ERROR 2 No such file or directory: Shared library could not be loaded ("The specified module could not be found.")
build[30] 'P' ''{⍵ ⎕NA∊'I c:/d/gpl/glad|'⍵' '⍺}¨'gladLoadGLLoader' 'gladLoadGL'
that file is certainly in c:\d\gpl, and in ⎕NA docs it demonstrates you don't need the .dll extension, no matter, adding the .dll extension in the ⎕NA expression doesn't work
FILE ERROR 2 No such file or directory: Shared library could not be loaded ("The specified module could not be found.")
build[30] 'P' ''{⍵ ⎕NA∊'I c:/d/gpl/glad.dll|'⍵' '⍺}¨'gladLoadGLLoader' 'gladLoadGL'
                   ∧
also note I've mucked with the /\ to no effect
'I c:\d\gpl\glad.dll|gladLoadGLLoader P'
This is what is returned from ⎕SE.Dyalog.Utils.repObj
which looks right
 
@nathanrogers Hi Nathan! Two things to check (I use ⎕NA so rarely, I always have to reread the help): 1) are there any dependencies that haven't been loaded, and 2) is it a 32 or 64 bit dll
 
@Brian thanks, I just installed 32 bit because its been a while since I ran this program and needed 32 bit for opengl
so I'm using 32 bit, as was necessary when I wrote this program initially
All of my dependencies I moved into the folder before archiving it
 
@nathanrogers just to clarify - you just installed 32 bit Dyalog?
 
yes
computer restarted after a fresh install, and I'm running this now for the first time in a while and don't recognize the error
@Brian this is the first real line of work in the program, all of the lines preceeding this one are variable and DFN definitions
the glad.dll is absolutely in the specified directory
 
5:59 PM
@nathanrogers I'm afraid I'm not going to be much help here... my ⎕NA use is sporadic at best. I'm sure you've read the help files for it - apparently the operating system doesn't return a meaningful error code and the best we can do is return a File Error 2
what dependencies does glad.dll have?
have you loaded those first?
 
I want to say this line is specified this way because GLAD is the entry point and must be loaded before GLEW
glfw rather
 
Have you tried breaking out into 2 separate statements? are you sure the function name is spelled correctly? sorry, I'm grasping at straws here
 
I will try that. I just loaded the dll in the dll export viewer
so its a valid file at least
Same effect when typing it directly
 
@nathanrogers random thoughts: try with a relative path (relative to ]cd); keep using backslashes; try without a left arg; copy the file to the path of ]cd so you can refer to it without a path
 
@dzaima ]cd is c:\windows\system32
 
6:13 PM
@nathanrogers oh
well, you can ]cd somewhere better probably?
also, maybe glad.dll names are c++-mangled? don't know how Dyalog handles that
 
no I'm looking at the dll viewer
this worked before
I wonder if I had something set up in my environment that before and now its lost
 
6:28 PM
@dzaima I did ]cd to the directory in question and tried to load any name directly
same error
tried a few different names from the dll viewer
 
Check it with 1 ⎕NPARTS ''
 
the right arg to ⎕NA?
 
no, just in the session, that returns the current directory
 
      ]cd
c:\d\gpl
1 ⎕NPARTS 'c:\d\gpl'
 c:/d/  gpl
If that helps
 
no, 1 ⎕NPARTS ''
that returns the actual current directory that APL sees
 
6:33 PM
      1⎕NPARTS''
┌─────────┬┬┐
│c:/d/gpl/│││
└─────────┴┴┘
 
okay, just checking...
 
6:49 PM
I've gone through and tried my older versions of dyalog to no avail. I'm definitely able to load the dll in a dll viewer, the names are there, for at least these 2 examples I've verified the ⎕NA datatypes are accurate (according to another library that already figured out the mapping between GL types and ⎕NA types)
 
7:05 PM
I'll try recompiling the glad dll when I get a chance. I've tried a few other tricks to try to load in the dll, and none seem to work for glad.dll
      ⎕NA 'P kernel32|LoadLibrary* <0T'
      ⎕NA 'P kernel32|GetProcAddress P <0T'
      dll←LoadLibrary ⊂'c:/d/gpl/glad.dll'
      dll
0
      dll←LoadLibrary ⊂'c:/d/gpl/glfw.dll'
      dll
2067464192
loading glad returns 0, but loading glfw seems fine
I skipped the glad loading, and GLFW loads just fine as expected, so probably an issue with the DLL itself
 
 
1 hour later…
8:26 PM
@nathanrogers The load errors are often a bit misleading, it may be a dependency that cannot be loaded, rather than the DLL named in the ⎕NA statement. The ability of the OS to locate dependencies may depend on environment settings that define the library path.
 
Fair enough. I probably had an additional path set in the configuration that I've long since forgotten
I thought I had everything zipped up to resume at another time, but I neglected something
 
9:01 PM
@dzaima dzaima/APL has nothing like dfns.traj right?
 
@rak1507 no, and i don't think there's a simple impl of it either
 
ok
going to have to try something slightly bigger brain
 
 
2 hours later…
10:51 PM
@rak1507 how big of a brain did you get?
 
small, ended up going with dfns.traj
 

« first day (1504 days earlier)      last day (33 days later) »