« first day (1394 days earlier)      last day (1253 days later) » 

4:02 AM
is it a good idea to have an account on the dyalog forums
 
 
3 hours later…
6:57 AM
@Marshall is the rest of this talk youtube.com/watch?v=WlUHw4hC4OY available anywhere?
 
 
3 hours later…
9:52 AM
Is ⊃∘⍒ optimised to be O(n)?
 
@rak1507 No, but ⊃⍤⍒ is.
 
@dzaima I did and I thought it was strange, so I wanted to check as I thought I remembered it being mentioned
@Adám thanks
 
(⊃⍒) is too, btw, but only as a train, not as a phrase.
 
Ahh makes sense
How do programming languages implement these special cases? Are there checks before the code is run for certain phrases or what?
 
10:06 AM
Dyalog "idioms" are phases recognised by the tokeniser. Things like this atop are checked for at run time.
 
Does that add much time to the overall speed? If it has to check for several different idioms
 
I think it is a very small check. Basically just "is LeftOperand=SomeValue". @Marshall can give more details.
 
@Adám it's a small check, but potentially executed many times. Still, modern cpus should be able to execute it in parallel to what's afterwards, and the branch should be very predictable
 
 
2 hours later…
12:19 PM
I want to replace each character in '×÷-+' with each of 'xdmp'
how do I do that?
 
@Razetime 1) there's no in tradfns, 2) you're not giving an argument to @
 
yeah the thing is incomplete
> I want to replace each character in '×÷-+' with each of 'xdmp'
mainly need to find out how to do this
and one more thing
is there a way to include operators in variable names
 
@Razetime i've got a long {('×÷-+'⍳⍵)⊃¨'xdmp'∘,¨⍵}
@Razetime as in assign an operator to a variable?
 
no use an operator as within a variable/function declaration name
like x÷←{⍵}
should define as a constant function
 
@Razetime nope
 
12:25 PM
figured as much
 
in Extended you can get away with reassigning functions in dfns, but that's the most you can do
 
that's funny, I'll remember that
 
@dzaima (note: only for builtins that have covers, so not e.g. +)
 
so stuff which is in the github readme spec
 
1:01 PM
@rak1507 The rest of the talk wasn't given, but slides, scripts and some commentary are linked here.
 
Great thanks
'We didn't reach this section in the talk. Consequently, no thinking occurred.' lol
 
1:32 PM
@Razetime ⎕*3 Studios
@user8773069 Hi John Doe. If you want to participate here, email me: adam@ with the same domain as www.dyalog.com
 
2:01 PM
@Adám I made that name in 5th grade
still pretty proud of it
 
 
2 hours later…
3:35 PM
not sure if this was posted, but Gilad Bracha did a webinar talking about a recent upcoming array language (video in link)
https://news.ycombinator.com/item?id=25146654
i skimmed thru it, it seems to use a K-like syntax (?) including apl type research by Justin Slepak (didnt link to a specific paper), and something he calls "stream polymorphism".
https://www.researchgate.net/scientific-contributions/Justin-Slepak-2048362989
it also does "scalars are tensors of rank 0" which (i think) makes it a floating array model ?
also, got some time last cpl nights to work on bqn -> erlang port. I got most of the stdlib implemented a few weeks ago.
I started using the process dictionary which has made dealing w/ mutability significantly easier (acts as a c-like escape hatch).
rn it returns a function, that when called gets the next opcode and leb128 arg.
lot of putting similar logging in js version and erlang version and walk thru whats happening.
using the process dictionary has been biggest help. its very discouraged but it makes sense to use for this purpose -> each process will have its own vm
 
3:56 PM
@cannadayr this looks cool
 
@Razetime it seems like its going to be open-sourced and supported by the company he works at "shape security".
 
yup watching the video
 
their use case is probably streaming analytics
 
why exactly that?
 
guessing based on their acquisition press release
https://www.f5.com/products/security/shape-security
 
4:00 PM
not bad
 
Announcement: BAA open session now.
 
that was unexpected
ima join
@Adám I love language based passcodes
 
4:29 PM
If I want a vector of (say) 25 scalars, which of 25/4 or 25⍴4 is preferrable, or more idiomatic?
 
5:10 PM
@xpqz I think they run the same code under the covers, and both are fine APL. I think I'd use if I conceptually reshape, but / if I conceptually repeat stuff. I also have a bit of a preference for because it doesn't want to be an operator…
      ⎕SE.Dyalog.Utils.repObj 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
25⍴4
 
I'd use / cause it simply means "create a list with ⍵ repeated ⍺ times" rather than reshape
@Adám this was nice!
 
Hi, I'm new to APL and I was wondering how one defines variables in dfns in Dyalog APL. I tried using jot in f←{g←0∘g+⍵}, but that gave me an error saying g was undefined. Is there any way to define variables inside dfns without newlines?
 
statement separator ⋄
I dont have a lot of dyalog experience but i think jot is the compose operator (when not used as an outer product)
 
Thanks! I guess I was getting confused because they look similar.
 
@user (diamond). The language bar shortcut is typing backtick twice
 
5:17 PM
@Razetime ``
 
it's also used to call the apl bot lol
 
Oh
 
@user Welcome to the APL Orchard, then!
 
@Adám Thanks! APL seems like a cool language, although I've yet to get the hang of it.
 
I suppose we can use the new TryAPL to post Dyalog 18 answers now
right?
 
5:21 PM
Ah, yes, of course!
 
cool
'night
bit late here
 
5:34 PM
 
@Adám Cool, thanks again
 
5:49 PM
Oops, I missed the BAA session
 
6:01 PM
@rak1507 Will be published ― eventually.
 
What was the subject?
 
6:13 PM
@rak1507 It was an open session, but most of the time was consumed by me showing off the new TryAPL 3.0.
 
Cool
 
6:48 PM
Have you thought about moving the buttons at the top to the right hand side only? I sent a link to a discord group I'm in and someone suggested that, it might look better, idk
 
7:10 PM
@rak1507 Which buttons? The language bar?
 
Yeah
 
We are primarily targeting desktop users, and they usually have plenty of horizontal space, but are vertically constrained. By spreading the language bar over the entire width, it can use as few lines as possible. Most of the time, it's bottom edge wouldn't be flush with the tabs' bottom edge anyway.
Of course, it could be made into a side pane, but that tends to look odd:
@NicholasG04 Hi. Interested in APL?
 
Another thing is in my opinion this paragraph 'TryAPL runs on Dyalog, which you can download for free, or try it now by entering an expression (use the language bar above to type the special APL symbols), or clicking one of these expressions, followed by Enter, to see it in action:' should definitely mention using ` to type characters
 
 
1 hour later…
8:33 PM
⋄ f←{⍵<2:{⍺+⍵}⋄{⍺×⍵}}
 
@user ``
 
⋄ f 1
 
@user VALUE ERROR
 
⋄ f←{⍵<2:{⍺+⍵}⋄{⍺×⍵}} ⋄ f 1
 
@user SYNTAX ERROR
 
8:34 PM
@user The bot doesn't remember from command to command.
 
Yep, I just realized that
 
{} is an actual function, not a code block. So the ⍺+⍵ and ⍺×⍵ don't need braces.
 
Actually, I wanted to return a different from within the function depending on the first argument
 
You will, however need to supply a left argument if you have in the code.
@user Sure and {⍵<2:⍺+⍵ ⋄ ⍺×⍵} will do that.
 
Oh, I see.
 
8:37 PM
⋄ f←{⍵<2:⍺+⍵ ⋄ ⍺×⍵} ⋄ 3 f 1 ⋄ 3 f 2
 
@Adám
4
6
 
@Adám What about if I want to give it three arguments (something like a (f n) b)?
 
Ah, like to have n choose between addition and multiplication?
You can use a (n f) b as follows: ⋄ f←{⍺⍺<2:⍺+⍵ ⋄ ⍺×⍵} ⋄ 10(1 f)20 ⋄ 10(2 f)20
 
@Adám
30
200
 
Do you know about operators?
 
8:50 PM
I know of them, but haven't really used them. Does the double alpha allow you use it with postfix syntax?
⋄ f ← {⍺⍺ + 1} ⋄ 4 f
 
@user Illegal code
 
The entire parentheses (n f) defines a new derived function.
Operators are higher-order functions that take one or two operands (not arguments) and derive one out of a family of related functions.
 
Oh, I think I see
 
So e.g. +/ and ×/ are instances of the reduction family of functions. / is the Reduce operator.
 
Okay, and f is now another operator?
 
8:53 PM
Yes, this f is an operator, because it's source contains ⍺⍺ which means "left operand".
As you can see, an operand can be either a function or an array.
 
This actually makes what I want to do even easier, with a separate symbol for ⍺⍺. Thanks for helping me!
 
No problem. Btw, I'd be interested in what you are trying to do, as there may be a neat mathematical way to do it.
 
9:07 PM
@Adám I'm trying to answer this question by porting another answer of mine to APL (Dyalog). I've got f←{⍺⍺<2:⍵+⍺⋄((⍺⍺-1)f)/(×⍺⍺-2),⍺⍴⍵} right now, and it looks like it's working correctly.
 
@user That's very nice. One trick: You can make the operator anonymous by using ∇∇ to have it refer to itself.
 
Cool, thanks.
 
Did you check the test cases?
 
Yeah, unfortunately, it's not passing the 2 4 4 case :(
 
9:48 PM
a b c←⎕⋄⍎⍕(a,{'(',⍵,'/⍴⍨)'}⍣(c-1)⊢'+'),b this is horrible (but it works)
 
@rak1507 Thanks! I actually got it to work with f←{⍺⍺<2:⍵+⍺⋄((⍺⍺-1)∇∇)/(⍵⍴⍺),×⍺⍺-2}
 
?
ah nice
 
Sorry, I hit the enter key by accident
 
I was thinking of doing something like that but you were already doing it, so I went with the string route
 
How does yours work? It looks really interesting.
 
9:54 PM
It makes a string and then evals it, something like 2 (((+/⍴⍨)/⍴⍨)/⍴⍨) 4
 
Oh, cool
 
@user You don't need parens around (⍺⍺-1)∇∇
@rak1507 No need for parens: ⋄ 2 +/⍤⍴⍨/⍤⍴⍨/⍤⍴⍨ 4
 
@Adám 65536
 
@Adám Nice, it's down to 31 bytes now
 
@Adám Ah yeah, that's nicer
 
10:09 PM
@rak1507 I was wondering i something like ⋄ ×/2/⍣(4-1)⊢4 ⋄ ×/3/⍣(4-1)⊢3 could work.
 
@Adám
65536
7.625597485E12
 
That's really clever, looks like it does!
 
Doesn't quite degrade to n=1 but I'm sure you can work something out.
 
10:25 PM
@user Congrats on your first APL answer. May there be many more. One thing: You should avoid using Dyalog Classic, and instead use Dyalog Unicode (you can still count characters instead of bytes by referring to SBCS).
 
@Adám Does Dyalog Classic take up more bytes?
 
No, but it is deprecated, is missing features, including some glyphs, and doesn't really support scripting like what TIO uses. That's why it echoes everything to stdout.
 
I see. I'm changing to Unicode right now. Thank you for all your help!
 
That's what I'm here for.
 

« first day (1394 days earlier)      last day (1253 days later) »