« first day (1361 days earlier)      last day (1277 days later) » 

6:56 AM
Does anyone know where I can get all the unicode name (latex name) in Dyalog APL symbol?
 
7:08 AM
@elliptic00 what exactly does that mean
you mean the names that come up when you hover over them?
or ∇ → 'nabla' and so on?
 
 
4 hours later…
RGS
10:52 AM
@elliptic00 You want to type APL glyphs in a LaTeX document?
I can help you with that, I had that struggle recently and now know how to deal with it.
 
 
3 hours later…
1:49 PM
sup guys
been a while
 
2:11 PM
@Adám I have a question about contributing to aplcart just let me know when you're online
 
 
2 hours later…
3:44 PM
hello
 
<phantomics> Morning
 
3:59 PM
good morning
and night here
 
4:28 PM
hi
 
4:41 PM
<phantomics> I have a question about the [↑ take] function... in most APLs, when you overtake a mixed array with characters and numbers, the type of the fill element is determined by the first row-major element of the array
<phantomics> For example:
<phantomics> ⋄ ↑ 'a',1 2 3
a 1 2 3
<phantomics> Oops, I meant
<phantomics> ⋄ 8↑ 'a',1 2 3
a 1 2 3
<phantomics> ⋄ 8↑1 2,b',3 4
(no output)
<phantomics> ⋄ 8↑1 2,'b',3 4
1 2 b 3 4 0 0 0
<phantomics> There we go
 
@DyalogAPL so this one has spaces?
 
<phantomics> Anyway, what is the rationale for using the first character? My approach has been to use spaces as the fill element only for character arrays, and zeroes as the fill for any other type of array
<phantomics> Razetime: the first one pads with spaces because a letter is the first element, the second one pads with zeroes because a number is the first element
 
i'd guess that's just it choosing some item, which one doesn't really matter
also APLX chooses the fill element of each row separately: aplwiki.com/wiki/Take#APLX_fills
 
<phantomics> My thinking has been that since number arrays are the more common, mixed number and character arrays should be padded with zeroes and only pure character arrays should be padded with spaces
 
well in this case its not about the most correct answer, more about just choosing something
 
4:46 PM
phantomics: That makes sense to me. I also don't know of any principled reason to use the first element.
 
<phantomics> Thanks for the wiki link, this page aplwiki.com/wiki/Prototype details a bit more about the thinking
<phantomics> Marshall: Still, it would probably be best for April to not throw curveballs to those experienced with other APLs
<phantomics> A contributor to April made this comment: i know the zero one infinity rule isn't intended to apply here but in a way it kind of does. "The only reasonable numbers are zero, one and infinity."
<phantomics> since we must pad with something, selecting zero items to decide what to pad with won't work.
<phantomics> selecting all of the items to decide what to pad with leads to many more questions.
<phantomics> so selecting one, the first, is the only option. :)
 
personally i don't like the concept of "default" fill elements at all, but the little prototype logic that dzaima/APL is "probabilistic" checks for numbers/chars, and throwing an error otherwise
(dzaima/APL doesn't allow overtaking at all, so the exposure of the prototypes is very limited in practice)
 
phantomics: Speaking of APLWiki, I added April (aplwiki.com/wiki/April) a little while ago. Point out problems or add information as you see fit.
 
<phantomics> Thank you, I can help fill out the article. Probably April's most unique feature among APLs is the ease of extending it with new symbols.
<phantomics> Also, I don't have any restrictions on the index origin so you can technically set it to any integer
 
5:02 PM
Changed the IO. I saw that it wasn't limited to 0 or 1 but didn't know for sure the domain was integers as opposed to something larger.
Also, I vaguely remember you saying something about operators just being Lisp macros which I would expect comes with some restrictions on use relative to Dyalog, like not being able to assign them (or am I underestimating Lisp's flexibility?). Is that the case? Even if not, it would be interesting information to have in an "implementation" section on the page.
 
<phantomics> Marshall: the operators are a bit complicated... they're functions that run at April's compile time to transform the code fed to them. They are not exactly macros in the Lisp sense because they run at April's compile time, not the compile time of the underlying Lisp instance, but they work the same way that macros do
<phantomics> I have not yet implemented operator creation with ⍺⍺ and ⍵⍵ but nothing makes it impossible in April. You can also use the language's extension feature to add new lexical operators assigned to any unicode character
 
5:21 PM
But you couldn't ever do something like o←⍤ ⋄ {o←⍥⋄1}⍣var⊢0 ⋄ 1 +o- 2, right?
 
<phantomics> I don't think that's implemented now but it should be possible
<phantomics> Assignment is a special form implemented by clauses in the language grammar, for instance here's the clause implementing function assignment: github.com/phantomics/april/blob/master/grammar.lisp#L294
<phantomics> If the thing being assigned is an operator, it could be entered into the workspace as an operator category and then treated accordingly by the compiler
<phantomics> I'll have to try writing that later to see
 
Wait, I forgot that o←⍥ in a dfn just shadows it. Maybe there's not actually any way to conditionally modify an operator in the dfn-based subset of Dyalog?
 
<phantomics> If that were working in April it would globally modify the o value
 
Oh, does April have different scoping semantics?
 
<phantomics> Yes, for now all variables in a workspace are dynamic
<phantomics> Lexical variables are planned but not in yet
 
5:33 PM
Fair enough.
 
<phantomics> Thinking at more length, it shouldn't be possible for conditional operator assignment to work, if the assignment can be evaluated at compile time, it would work, but not after
 
That would be my expectation. I'd describe it by saying operators aren't first class because they work at compile time and not runtime. Of course, Dyalog operators are only slightly more first class. I guess you can pass them around in namespaces if you really want to act on them.
(I think that's a perfectly fine design. BQN makes functions and operators completely first class but that means there are three different kinds of application you can use at any time, which is a mess.)
 
is that not a chat bot?
 
<phantomics> Although it could work if you compiled the line with the conditional assignment and the next line separately. It would probably be possible to implement an interpreter mode for April where that kind of thing can be done
 
It's such a remarkably clever chat bot though!
(It's a bridge from IRC.)
 
5:44 PM
that's what I thought lol I was gonna say
very advanced
 
<phantomics> Yeah, I'm tying this into #apl
<phantomics> *typing
<phantomics> My programmer added the typo algorithm last week, he says it makes me seem more authentic
 
6:03 PM
Is there a straightforward way of stripping leading 0s from an array?
~0 doesn't work as the array could be something like 0 0 1 2 3 0 4
 
@rak1507 i don't think there's anything much better than replicating by ∧\0=
 
ngn
maybe ⍎¨⍕⍎∊⍕¨⎕ if they are digits
 
I'll use the replicating solution
 
@dzaima {⍵⌿⍨∨\0≠⍵} is one shorter (as that also required a ~)
 
I ended up using (⊢⊢⍤/⍨(∨\0≠⊢))
 
6:16 PM
@rak1507 you can get rid of that
 
true
not code golfing so it doesn't particularly matter
 
@rak1507 guess i assumed you were from the otherwise rather ugly ⊢⍤/
 
ngn
you could also do (⊢↓⍨0=⊃)⍣≡
 
@dzaima (i wrote it as a dfn)
 
I just like doing trains
They're fun
 
ngn
6:17 PM
always golf :)
 
@ngn not shorter than a dfn at the cost of worse performance
 
quick survey what country is everyone here from
don't gotta answer if you don't wanna just curious
 
latvia
 
very interesting
 
ngn
jamaica :)
 
6:35 PM
scotland
 
7:03 PM
@dzaima pushed
 
@RGS Maybe you can add a LaTeX section here?
@rak1507 The left argument to its left operand tells you what of the right argument is padding, so you can make appropriate substitutions.
@NoahCristino Feel free to write to me at any time, and I'll get back to you when I can. Nominally, I'm here during UK office hours, but you'll often find me here at other times too.
 
7:30 PM
@dzaima Cool, that gets rid of most •paths. Still need to add it to the filename in order to load with dzref, but that should be expected.
 
@Marshall had to make it not error on •Import used in ed code for absolute path arguments to make dzref work too
(internally, •Import (and also •EX & •LNS) is a 1-modifier that's compiled to be immediately derived by •path)
 
@dzaima dzref should be modifying •Import etc. to convert the right argument to an absolute path though. It already replaces •path.
 
@Marshall yeah, but as it kind-of still does "evaluate" •path regardless it still errored
 
@dzaima What's the effective •path in ed code then?
 
7:52 PM
@Marshall · but it's not visible from the outside
also this and no •path∾ in dzrefed files works
 
@dzaima Try $ test/dz_wasm.js.
 
@Marshall does pass
 
"Expected code outside files to only use relative paths": should be "absolute"?
 
@Marshall yep, wrong error message
 
@dzaima Oh, I missed the addition on the last line.
 
8:51 PM
right, this reminds me that i wanted to add -headers. Should get to that, it's a pretty cool thing
 
9:28 PM
@dzaima Huh, hadn't even thought of that. That's a big advantage of the declaration-mirrors-use header style.
Wonder how far you could go with it. 𝕨F⌾𝕊𝕩 probably makes sense. What about 𝕨F⌾(l⊸𝕊)𝕩?
But those are both kind of unusual in that you have to call your function 𝕊.
 
@Marshall i thought i had mentioned the idea before but can't find evidence. would be weird, but it does still make sense
@Marshall i mean, you still could name it, it's just that to do direct recursion you'd need to use name⁼
@Marshall 𝕨F⌾(l⊸𝕊)𝕩, if extended for other things than just , would mean arbitrary function pattern matching for every step of every under evaluation (what if there's a conflict between defining the under and its right operand defining a pattern-matching version?)
 
9:48 PM
@dzaima I mean that otherwise you can't actually figure out which function in the header is the current block: is it F or G in 𝕨F⌾G𝕩?
 
@Marshall i guess 𝕨𝕊⌾G𝕩: kind of makes sense, as opposed to, say, 𝕨 - 𝕤: :D
@dzaima (but i think restricting 𝕨F⌾G𝕩 to always mean that G is 𝕊 is good)
 
@dzaima I think it would, so 𝕨F⌾(l⊸𝕊)𝕩 would probably have to be a special form. After some more thought I don't think that form is worth allowing, because it's generally useful for selective assignment, which should usually work automatically.
𝕊⟜r⁼𝕩 is more useful.
 
@Marshall that's 𝕩𝕊˜⁼˜r, and what i call an "⍺-inverse" (as opposed to regular dyadic ⍣¯1 in APL (aka ) being an "⍵-inverse")
 
@dzaima That form's better because it works if r is a function too.
I probably wouldn't allow the second ˜ though.
 
@dzaima (i had forgotten about the need for it though; the "⍵-inversed-ness" of bothers me)
 
 
1 hour later…
RGS
11:08 PM
@Adám sounds appropriate. For now, here's a GH gist
 
@Marshall question re: https://github.com/mlochbaum/BQN/blob/f74d9223ef880f2914030c2375f680dcc7e8c92b/bqn.js#L12

if id.sh is falsy, why do [a,i]=id; a[i]=v; if only v is going to be returned the next line?

makin' some progress. prolly relax for rest of evening no hurry ty
 

« first day (1361 days earlier)      last day (1277 days later) »