« first day (1797 days earlier)      last day (860 days later) » 

3:21 AM
Postfix is a "syntactic" model and stack-based is an "evaluation" or "semantic" model. The two are essentially equivalent (minus syntactic words found in practical stacklangs).
 
 
9 hours later…
12:38 PM
CMQ: I have to demo APL to a bunch of run-of-the-mill devs (think Python, PHP, Java, C,…), and they are probably especially interested in how they can use techniques learned from APL in their daily programming. Any recommendations or ideas?
 
12:56 PM
Hey Adam, i saw an old video of you presenting the APLcart.info, so i tried it and there seems to be no example of a post request using the HttpCommand library, is there any online examples?
 
Yes this is exactly the one i followed, i have no problem using the Get request but when i try a .Do 'post' i get all sorts of errors
 
Can you post (no pun intended) your code so we can have a look?
 
@Adám Okay so I have a url for a discord webhook and a body which is a message for a webhook , and after the body is created i try to send the post request like so; body ← '{"content": ' , kanye , ', "username": "Kanye West"}' ⋄ send ← hc.Do 'POST' url body
(Send is: [rc: ¯1 | msg: "Params is not a valid URLEncoded string"] after my attempt of postng)
 
What is the value of kanye?
 
1:05 PM
a string - "We have to evolve"
with " as part of the string
and the whole body is: {"content": "We have to evolve", "username": "Kanye West"}
 
Note that it is asking you to URLEndcode the params, so how about trying:
send←hc.Do'POST' 'example.org' (hc.UrlEncode body)
 
Ahh thanks, now i just get Bad Request, but might have messed up setting up the webhook
How would one find all functions of httpCommand? i found a pdf which i didnt find a lot of help
 
@Secret HttpCommand.⎕NL¯3
 
@Secret Usually it may be helpful ']map' command
 
That gives an overwhelming result with unimportant details.
@Secret Also, simply edit HttpCommands — it begins with a large comments section.
 
1:17 PM
I acutally found the github repo and saw it, but i guess i must have missed the function i needed, thanks
 
is the concept of rank in apl is similar to the concept to rank in linear algebra?
 
i assume the rank concept for J and Dyalog are the same, then a rank of a noun is the count of its axes. A scalar has rank 0, a list rank 1, a table has rank 2 and so on
 
@PyGamer0 No, APL uses the word "rank" for two things: the number of dimensions in an array, and the "scope" of a function or function application. LA uses the word for the maximal number of linearly independent columns of a matrix
(Oh, and of course Rank is an APL operator too.)
 
1:33 PM
what is the term for stuff like ⍴ ⌈ ∩ and so on? Verbs? or
 
APLers tend to call them functions or primitive functions.
 
2:27 PM
@Adám ok
so is the rank operator hard to understand?
 
Basic functionality is actually very simple, assuming you understand the array model. Fully taking advantage of it can take some practice.
 
 
1 hour later…
3:40 PM
@Adám I've added what I've understood on the API page
 
Great!
 
@MasterQuiz @Adám Can you help me with this?
 
@MasterQuiz TryAPL doesn't use ]box or ]rows
 
@Adám So I can't be able to have the entire result of, say, ⍳50 1?
 
No, not currently. It is intended as a way to try APL, not as a free number crunching service :-)
 
4:01 PM
So I have to do something like send a request to save a variable and change state, size and hash of the next requests?
Cause I need the ones in a picture like this https://tio.run/##SyzI0U2pTMzJT/9fkJms8KhtAhBPVFfAD9QV0FRoYapAU6KvEENAiT4Qx1CqRB9MxuBRYgOl7XAqsYGz7HAosYmPjwczgLQd@aYgiWM3BW4Pmk0kmoISGthMsXk0pQEDrUEiUZAdzkh@NKUJjAmkhUdTpoBNmoGu8P@jvqmgJGjzqLcBmMYedS4AJsr//wE, and wanted to let the user put an image to start the animation with
 
4:15 PM
@MasterQuiz Either that, or encode the result in a way that makes it take up less space.
I could maybe also add a functionality to override the chopped display.
 
 
5 hours later…
9:22 PM
Why this gives 'DOMAIN ERROR: Invalid input source'?
`⋄ '[*]'⎕R' '⊢ ↑'This is a' 'Matrix '`
 
@MasterQuiz Did you forget a closing backtick (`⋄code`)? You can edit your message and I will edit my reply.
 
@TryAPL I don't think I did
 
@MasterQuiz ⎕R can only work on scalars, vectors, and vectors of vectors.
@hyper-neutrino the bot reacts strangely on backticked code blocks. It should either ignore them or suggest removing the backticks:
`⎕←'test'`
 
@Adám Did you forget a closing backtick (`⎕←code`)? You can edit your message and I will edit my reply.
 
⋄2+2
 
9:29 PM
@MasterQuiz 4
 
⎕←4
 
@hyper-neutrino 4
 
⎕←4
⎕←5
 
@hyper-neutrino
4
5
 
`⎕←'test'`
@Adám done
 
9:30 PM
Great.
 
that was quicker than I anticipated it'd be :)
 
⎕←'what do you make of this?'
 
@Adám what do you make of this?
 
So also code that doesn't have quotes is executed without backticks?
 
@MasterQuiz I don't understand.
 
9:40 PM
@Adám The problem before was with the single quotes cause something like ⋄2+2 was executed correctly
 
@MasterQuiz 4
 
@MasterQuiz I don't think so. The only problem was that the bot reacted to code block lines beginning with `⎕← and `⋄ while not ignoring the `s.
 
@Adám Did you forget a closing backtick (`⎕←code`)? You can edit your message and I will edit my reply.
 
@hyper-neutrino ^ wat?
 
...?
wut
 
9:43 PM
Something like backtick diamond 2+2 backtick doesn't give error
 
@hyper-neutrino None of my inline code began with or ⎕← so what was the bot reacting to?
 
> if "`⎕&larr" in x["content"]:
 
@MasterQuiz Inline? That should work.
 
that's what it's detecting
i think I can just remove that check
the main issue is people forgetting to put any backticks at all, not forgetting to close them
 
Shouldn't it only look at the beginning of each inline code?
 
9:45 PM
@Adám Yes, it does. The error is thrown when someone writes backtick diamond 'Hi' backtick
 
⋄'hi' ← is backtick diamond 'Hi' backtick
 
no, if it detects and `⎕← it assumes you forgot to close it
 
@Adám hi
 
which I think isn't really all that useful so i've removed it
 
Checking that `⋄ (backtick backslash backtick diamond backtick) is ignored.
 
9:47 PM
@Adám I'm getting confused... Here it gave error
 
yeah, I fixed it, lol
 
@MasterQuiz That was a code block. They don't need backticks at all.
 

« first day (1797 days earlier)      last day (860 days later) »