« first day (1826 days earlier)      last day (829 days later) » 

9:34 AM
hey guys quick question, is there something equivalent to J's amend (}) in APL?
i.e. a non-destructive update
 
@ElectricCoffee Yeah, check out @
E.g. ⋄ 'X'@3⊢'Hello'
 
@Adám HeXlo
 
And ⋄ -@(3<⊢)3 1 4 1 5
 
@Adám 3 1 ¯4 1 ¯5
 
negate anything bigger than 3?
 
9:37 AM
Yes.
You can mix-and-match either giving values as operand, or a monadic function, or give a left argument and a dyadic left operand.
The right operand is either an array of (leading) indices, or a function which is applied to the right argument, and returns a full mask.
 
interesting, can } do that too? Use functions and bit masks like that I mean
 
J isn't my strong side. I think you can do something with gerunds.
There's an obsolete form of } which uses a verb operand, but since } is an adverb, not a conjunction, it is of course more limited.
 
I see
thanks, a bunch! I gotta run
 
Take care!
 
10:21 AM
Hi, @Adám. I am just curious. What is your favorite APL dialect? Dyalog
 
Depends on what is included in "dialect", but full disclosure: I work for Dyalog.
I like the core language syntax (and some glyph choices) of BQN more.
APL+ also has various features that I miss at Dyalog.
Especially when it comes to keywords/control structures, and the tracer.
I'd like to look more into the left-to-right APL derivatives.
 
10:50 AM
Thanks. I am new to APL and find Dyalog hard to type. I am currently using K & J for hobbyist work. (I find the ascii notation easier to type).

Been hearing good things about BQN. thanks for recommending
Anything a k/J user might be missing out on?
 
Other than the beautiful glyphs? ;-)
Btw, what technology are you using for typing APL?
K has a very different array model. J less so.
 
@Adám which glyph choices?
@Adám array model?
so each array languages have different array models?
 
Yes, Dyalog APL, BQN, and J each have a unique array model.
Nested, Based, Flat: See apl.wiki/Array_model
And K's "not really an array model, just lists" is described there too.
@PyGamer0 ⥊∾≍⋈⊏⊑⊐⊒⍷⊔ and I find the 1-modifiers fiddly; need large font size to read. Not sure I quite like the 2-modifier scheme either. I had an alternative proposal where glyphs had 1 dot if they were 1-modifiers (e.g. ∔≐⩪) and 2 dots if they were 2-modifiers (e.g. ⍥⨬⸚).
 
11:08 AM
@Adám I use J on a Macbook Air.
@Adám maybe different features? I assume the syntax is very similar.
 
@M4X_ So you have RIDE start when you want to use APL. Entry of APL glyphs should be fairly easy, assuming you have a backtick key, but you can choose another key as prefix key.
@M4X_ The J and APL syntaxes are very similar indeed. J has some more powerful features when it comes to function application. Dyalog has nicer built-in utils for "business use" like XML, JSON, CSV, CEF, PCRE, etc.
 
@Adám I didn't even know the difference between these. Thank you so much @Adám
"Array models"
 
11:28 AM
Does J have dicts?
 
No. And its namespaces ("locales") can only really be used to store code, not as name-value pair collections.
@user17925981 Hej Brian BED. If you want to participate here, please email access@apl.chat
 
 
1 hour later…
12:57 PM
@Adám FWIW, I like Dyalog APL’s glyphs. Haven’t used J, but I read some of R. Hui and K. Iverson’s papers about J, and I find it difficult to associate in my mind functions to pairs of ASCII chars. OTH, I perceive APL’s unique glyphs as strongly associated with their respective functions.
 
Agreed.
 
Are there any advantages J has over APL?
 
ASCII-only, scriptable today, cross-platform native GUI, less syntactic anomalies.
 
1:36 PM
also many more features useful for maths and stuff like the hypergeometric function
 
Ah, yes, forgot about that.
 
I'd consider open source a plus too
 
Another plus is not being splintered into many implementations like APL and K are. There's basically only one J.
 
Practical question. How can I make some kind of bookmark of some the comments, so I can find them back more easy?
 
@Richard Hover over the left side of a message, then click the downwards triangle, click permalink, bookmark that.
 
1:48 PM
👍
 
2:39 PM
Say I have a rank 3 numeric array. Each major cell is square. I'd like to set the main diagonal of each major cell to 0. Assigning through a rank 2 dyadic transpose doesn't seem to work:
      0 0⍉⍤2⊢d
┌→──────────┐
↓¯4 ¯4 ¯4 ¯4│
│¯1 ¯1 ¯1 ¯1│
│ 1  1  1  1│
│ 2  2  2  2│
└~──────────┘
      (0 0⍉⍤2⊢d)←0
Syntax error.
 
@xpqz Yeah isn't allowed in selective assignment (not sure why, other than not having gotten around to implement it) but (0 1 1⍉d)←0
 
Didn't know selective assignment existed :o
 
Gotta know your dyadic transposes, my friend!
 
((0 0∘⍉⍤2)d)←0 gives a length error
 
@Razetime Is your d rank 3?
 
2:44 PM
      d←3 3 3⍴3
      ((0 0∘⍉⍤2)d)←0
LENGTH ERROR
      ((0 0∘⍉⍤2)d)←0
       ∧
 
@Adám oh man, why didn't I think of (0 1 1⍉d)←0...
 
oh, just wrong ⎕IO
 
Wait, no, I don't think so.
 
@Adám That's actually quite a neat demo.
 
The syntax checker gets fooled if you parenthesise the selection function (this is how I implement my structural under model) but that probably means errors become odd.
 
2:48 PM
i see.
 
 
2 hours later…
4:37 PM
Is there somewhere I can read about what functions dyalog can figure out the inverse of, and what the inverse is? So in J, i can always do u b. _1 where u is a verb, and it will show me the inverse (or the obverse if defined manually)
 
@pmikkelsen No, and the inverse doesn't always have an APL equivalent.
 
Oh yeah of course. But okay, it would just have been nice to see a table of some sort for the primitives and their inverse
 
In general, if there's a reasonable to compute inverse, it'll work. Although sometimes it doesn't. Moving some things around can make it work.
 
Okay thank you
 
Disappointingly, we don't find the inverse of ∘.f⍨ even though it is simply (‽) the function f⍨⍣¯1⊢⍉⍨⍴∘⍴⍴∘⍳2÷⍨⍴∘⍴
 
4:44 PM
Simply :D
 
I should add that to APLcart…
 
One thing I always find amusing in J is to look at the inverse of 10&#. which i use often to decode a number into i'ts base 10 digits. The inverse is: ($&10@>:@(10&(<.@^.))@(1&>.)@(>./)@:|@, #: ]) which I can't even begin to understand
 
Ah yes, that's quite complicated. You need the logarithm, but negative numbers throw a spanner.
@user1136288 Hi taronish. If you want to participate here, please email access@apl.chat
 
 
3 hours later…
8:15 PM
@xpqz @xpqz The only way I've found to save as source files for git is:
@xpqz The only way that I've found to save as source files for git is:
⎕SRC, then ⎕NPUT to save to local file. I haven't been able to get ]LINK to work.
I think I saw a post on getting LINK to work with MacOS, but is it reasonable to just use
⎕SRC, ⎕NPUT, ]import, or is there a better way?
 
@bwanab Does ]import work?
 
8:44 PM
@Adám Yes, ]import works fine.
 
How about ]export?
 
9:04 PM
@Adám I haven't tried ]export. I couldn't get it to work, but maybe I'm doing it wrong. Here's what I tried: ]LINK.Export #.wordle '/Users/<username>/src/test_export/' using my username. I get Command Execution Failed: VALUE ERROR
 
I've seen that reported before. New Link 3.0 doesn't have that issue, but as you know, upgrading on macOS is less than elegant.
 
@Adám I'm fine using the current scheme I've got since it works. I'll wait for good times to roll when they're ready.
 
9:53 PM
@Adám working on it again... but too complicated for me. I understand the base 5 encoding but looking up what ⍠ does and ⎕NS doesn't make sense to me. 1200⌶ is for formatting date/time I figured out but 1200⌶⌶?
 
@Richard is kind of a hack. It takes a function as left operand and a one or more name-value pairs as right operand, where the name-value pairs set options for the function. So this is providing the datetime formatter with a dictionary to replace the built-in English weekday names.
⎕NS creates NameSpaces (objects); I use it to build the dictionary.
 

« first day (1826 days earlier)      last day (829 days later) »