« first day (1664 days earlier)      last day (1287 days later) » 

00:38
I'm getting syntax error with multi-line dfns... Do I need to enable them somehow
in the REPL?
no just in a script
in a :namespace, a -function, or another dfn?
where multiline dfns are allowed is just weird
I just put f←{␤⍵␤} in a file and tried running with dyalog -script and it gives syntax error
ah yep multiline dfns just aren't suported in 18.0s -script
00:51
ok, thanks
DYALOG_LINEEDITOR_MODE=1 dyalog -script works apparently
01:33
@dzaima Confirmed working, thanks
 
12 hours later…
13:42
how do i run .dyalog files?
@PyGamer0 Depends on what the file contains.
If it is a function: ⍎⊃⎕FIX'file://path/to/file.dyalog'
You can even give it arguments with (⍎⊃⎕FIX'file://path/to/file.dyalog')arg and x(⍎⊃⎕FIX'file://path/to/file.dyalog')y
@Adám 2015 P9 also gives Internal error – No result was provided when the context expected one for every input.
Hm, I'll have to take a look. Didn't have a chance on the other one until now either.
14:03
So, I know that Dyalog uses ∇ to allow a function to call itself.
@EliasMårtenson Right…?
Now, in KAP I cannot do that, since ∇ is a special character (syntactic, rather than a symbol) so I needed another one. I picked ⍓, because it kinda looks like an arrow pointing back up to the definition of the function.
@user16610064 Hi Garklein. Welcome to the Orchard!
That symbol is in the APL block of Unicode, but my question is, is this colliding with anything used by Dyalog or other implementations?
@EliasMårtenson Doesn't clash with any implementation still in use.
14:06
@Adám So it has been used in the past?
I did consider using ∇, but that would have required some ugly hacks in the parser to make the behaviou rof that symbol context-sensitive, which I don't want. The parser is complicated enough as it is.
@EliasMårtenson Burroughs/700 used and and to hold, free, and release a file. I wouldn't worry about it.
@Adám Interesting. Hold as in open a file?
@EliasMårtenson How about using (Quad-Del) for familiarity?
@EliasMårtenson Open while blocking other from it, I presume.
@Adám Yeah. I actually thought of that one.
Literally the only reason I didn't choose it was because it rendered ugly in the font I was using to read the code block :-)
I also thought of ⍢, but that one is used, right?
yeah that is used as under.
in extended and dzaima's impl
14:15
And planned for Dyalog.
I know it's irrational, but that glyph is disturbingly ugly to me.
Similarly for which is already used in mainstream non-Dyalog implementations.
@xpqz ?
Yeah
it's del with two hairs sticking out of its head
Looks like the joker.
14:17
@xpqz Imo, it should have been @
@Adám Thanks!
@user16610064 Your displayed name will fix itself after you chat for a bit.
I figured out how ⍎⌽⍕⌈*○≡⍬ works. Made me chuckle.
i find the boxed glyphs more offputting
14:21
@Razetime Every "quaded" primitive has issues ¯\_(⍨)_/¯
yeah they look so weird from a typography standpoint
Well, I meant the functionality/definition.
well they do have issues from both ends yes
@EliasMårtenson delta underbar might be good: ⍙
@Razetime Yes. That one is also not bad.
@EliasMårtenson Or simply ?
@EliasMårtenson You use to define functions, right?
14:49
@Adám Yes. But with slightly different syntax compared to APL: ∇ a foo b { a+b }
That's equivalent to ∇ R←a foo b \n R←a+b \n ∇
Now, in this case, I can of course recurse with foo. The ⍓ is only used when recursing inside lambda functions.
@EliasMårtenson Maybe change that symbol instead. IIRC, VisualAPL used a similar syntax with the symbol ƒ
Oooh.
Clever.
@Adám a full program
@PyGamer0 So yes, what I wrote above applies.
15:05
visualAPL looks like.. Java?
C#, I believe.
oh wait if the name suggests anything it's probably close to Visual C++
I think the idea was that you'd be able to freely mix C# and VisualAPL in VisualStudio.
i see
Ah apl#
APL# was Dyalog's parallel to VisualAPL.
15:12
@Adám So could you actually write APL in visual apl?
@EliasMårtenson You could write "APL", but would you call it actual APL…?
Was it ever successful?
@Adám Yeah, I mean if you could write the actual APL syntax. Not something that looks almost as horrible as the KAP internal Kotlin syntax.
No, both VisualAPL and APL# fizzled out when it became clear that the future wasn't all Microsoft/.NET/Silverlight/etc.
@Adám Yeah, there was a time where there was a lot of apparent momentum behind MS technologies. I hated it, and I guess I was lucky it didn't happen. :-)
15:16
@EliasMårtenson The docs are there. You can look around. But yes, it would seem that it'd be basically C# extended with APL's functions and operators.
@Adám Where can I find the docs?
I'm reading the docs for APL/700 by the way. Interesting thing.
@EliasMårtenson Linked from APL Wiki.
And it was released in 2009. By then it was pretty clear that the momentum was behind Linux, no?
The APL world has a tendency to lag behind technology developments.
15:32
@Adám OK, I started reading the tutorial. I have to say that I can see why they did this. It's actually kinda cool. I think it was a mistake basing it on top of C# of course, but the general idea isn't terrible.
@EliasMårtenson Agreed. I'd love to have APL be the "core" language of JavaScript, i.e. replacing all of JS's operators and function syntax etc.
Another thing that likely doomed it was that it was a commercial product. Building momentum behind a new language is not really possible unless the product is at least freely available.
With all due respect to Dyalog, but I was curious about APL for years, but it wasn't until I could get a freely available version that I actually bothered learning about it. First using GNU APL, and then realising that Dyalog started making their product freely available, I started playing around with it too.
I don't know if anyone from Dyalog want to (or can) confirm, but I have a guess that GNU APL being the first truly free APL helped trigger Dyalog making free downloads of their tool?
I don't think it had any influence at all. Rather, it was people inside Dyalog that pushed for it because they realised that it was the right way forward.
@Adám It would appear that APL people and Lisp people both have a common opinion: That most lamguages tend to pile on useless syntax instead of making the core language flexible enough to handle (almost?) everything.
The ultimate would then be to merge APL and Lisp, i.e. (?) K.
15:39
@Adám I guess April is kinda visual apl, but for Lisp :-)
@Adám Unfortunately I don't know K, so I will take your word for it. It does sound intriguing though. Is aplcast going to have an episode about it?
@EliasMårtenson The next episode has a KDB+ dev as guest.
Oh, I will listen.
RGS
RGS
15:55
@dzaima Thanks dzaima; now that solution has the same feeling as Bubbler's, except it's much longer 😅
@RGS You can improve on Bubbler's solution by replacing the dfn in his with the fork in mine (might have to switch args or something).
@Bubbler woah actually using O(n^2) scan
(also ⌽(⊢+≤)⍀⍤⌽(⊢+≤)⍀⍢⌽ with Under)
16:12
@dzaima what does ⍢ do
@Garklein execute (⍵⍵⍣¯1) ⍺⍺ ⍵⍵ ⍵
@dzaima what do the double alphas and omegas mean?
@Garklein ⍵⍵ is the right operand, ⍺⍺ is the left operand. Just like is the right argument and is the left argument
@Garklein "under" as in "surgery under anaesthesia". I.e. do a preparatory action, then perform the main work, then undo the preparatory work to finish up.
16:34
@Garklein You can find some examples here
@MasterQuiz That's power , not under
17:19
@Adám oh cool, who is it?
@Bubbler yeah that's a great solution (took me way longer than it should have to understand lol)
17:45
@rak1507 Atilla Vrabecz.
cool
17:58
@xpqz There's this function in Examples: dual←{⍵⍵⍣¯1 ⍺⍺ ⍵⍵ ⍵} ⍝ dual operator.
 
2 hours later…
19:41
under doesn't sound too useful since ⍣¯1 isn't very useful nor doesn't work in many cases (from my experience) in general
19:55
@KamilaSzewczyk it's indeed not that useful for general ⍵⍵s, but there's a decent set of ⍵⍵s for which it's useful
and Under also has an alternate structural definition, with which f⍢⊃ would be "apply g to the first element", f⍢(1 0 1∘/) or f⍢(1 3∘⊇) for "apply to 1st and 3rd element" etc
(fwiw Under is my favorite thing about APL)

« first day (1664 days earlier)      last day (1287 days later) »