« first day (2618 days earlier)      last day (31 days later) » 

8:41 AM
i think i'm going to add the {(⍵ ⍵⍵ ⍺)⍺⍺(⍺ ⍵⍵ ⍵)} operator to tinyapl. glyph ideas? preferrably something with over-dots, of course (:
(that's not how you spell the operator in tinyapl, of course, but i think it's easier to understand like this)
 
@RubenVerg (Which leads to the question "if that's the easiest way to understand it, why isn't that how you spell it?")
 
because it makes parsing hard
 
Implementation difficuly shouldn't degrade design :-)
 
I don't think _{(⍵ ⍹⍹ ⍺) ⍶⍶ (⍺ ⍹⍹ ⍵)}_ isn't particularly hard to understand either
 
@RubenVerg How do you decide which side should be which?
 
8:46 AM
it's just that the other representation is more clear to the generic APL developer
@Adám to a certain extent, yes, but remember it's a tiny apl!
@Adám i think we already had this discussion and you agreed that it makes more sense for the right argument to be the straight one
Feb 2 at 13:15, by Adám
I think I lean towards {(⍵⍹⍺)⍶(⍺⍹⍵)}
 
@RubenVerg When we designed proto-BQN, I argued for ◞{}◟ which allows adjacency and imho is easier on the eye, as the arcs kind of extend the braces.
 
it would be useful to have a list of all unicode symbol with dots so that when some apler comes up with an operator they can give it a good symbol (:
 
@RubenVerg ¨ ⸚ ⸪ ⸬ ⁙ ⁜ ⍢ ⍣ ⍤ ⍥ ⛣ ⍨ ⍡ ⍩ᐵ ᑈ ˙ ⁚ ⁝⋮ ⁞⸽ ⸫ ⁖ ⁘⁛ ⸭ ∻ ⸈ ⸁ ≐≑ ⩧ ∔ ∸ ⋵ ⩑ ⩒ ⸖ ⧊ ⩪⸞ ⩭ ⫃ ⫄ ⨰ ⪁ ⪂
 
@Adám ah, that's beautiful! I use _ just because it's the same as the one for the naming requirements
@Adám ah, of course you already made that. are there so few?
 
@RubenVerg The names could use that too. Fn1◞monop◞dyop◟Fn2 arr
@RubenVerg I know of no good way to find them, as Unicode is not consistent in naming, but these are on my list. There are of course plenty of letters with diacritic dots above.
 
8:52 AM
@Adám ahh, so much better! if you'd told me sooner i'd've definitely switched. now i'll have to think about it, it's a very breaking change (even though i have no users, of course)
@Adám yeah, i don't think ä is a good operator symbol :)
i guess works.
 
@RubenVerg — but it would make more sense to use and let be commute.
 
hmm, that somehow feels like a change that's good for a bqn-like, which is a new language, but not an apl dialect. but on the other hand i already made the very breaking change with reduce and scan, so maybe that works too?
i think i kinda like anyways
 
@RubenVerg True, but Ü and Ÿ and ӭ and ӫ and ϊ could be.
 
that's actually a good point... i don't know if i want to reserve alphabetical characters for primitives, though
you didn't like it when i suggested doing it with π, and i don't think i like it either with Ü
 
@RubenVerg I told you about my design proposal contrasting BQN's circles and superscripts, right?
 
8:59 AM
i think so, but i don't remember much
 
Two dots above for dyadic ops, one dot above for monadic ops.
 
ah right, i remember that your suggestions looked very nice
nicer than the ones that bqn does, iirc
here's some from the same family as /: , , , , , , ,
ᐇ is particularly nice, but i don't know if it fits the aforementioned operator
@Adám do you have a list?
 
@RubenVerg You obviously want ≃̈ :-)
@RubenVerg From my old notes:
 
oh, that one for Under looks interesting for the operator i want to add! it looks like a version of Over, which is similar in concept
hmm, i guess the operator also needs a name, not only a glyph. ideas?
 
Maybe Mirror? The idea is that you see the original and its mirror image.
Btw, defaults to , right?
 
9:13 AM
hmm, haven't thought about the monadic case, actually
you suggest {⍶⍨⍹⍨⍵}?
can't see why it would be useful but i guess there's not much else it can do
except for a standard composition, of course, but that's boring and there's already operators that do that
@Adám might also steal for valences, I like it more than
also leaves room for eventually adding Variant, which I don't think I will, but might
 
I found this a very nice challenge
{1+⌈/⍸∨/¨{∧/{2≥(≢⍵)}⌸⍵}¨¨1↓(⍳≢⍵)∘.(,/)⊂⍵}
Not satisfied yet with my solution however.
Will give it another try later
 
@RubenVerg What bothers me about it is its symmetry. In f⸪g which of f and g is the monadic one, and which is the dyadic?
 
i mean, the same applies to
 
Yes, but there, the operands are so different, and usually "parameter" operands go on the right.
@Richard {∧/{2≥(≢⍵)}⌸⍵} is (2∧.≥≢⍤⊢⌸)
 
9:29 AM
@Adám i meant as a glyph for valences, not for variant
maybe a glyph with a dot on the left (representing monadic use) and two dots on the right (reperesenting dyadic use)?
something like ·:
apparently exists in unicode
is it a better glyph for valences?
 
Yes. (As long as one doesn't abide strictly by my suggested scheme.)
 
great, i'm satisfied with this choice. i'll add it to planning
 
@Richard ⊂⍵ is a scalar, so ∘.(,/) is just ,/¨ and you can write that whole part as ,/∘⍵¨⍳≢⍵
 
i should keep a count of how many new glyphs i use
 
@Adám oh... yes. Sorry. Should have known that. And makes it much more readable
 
9:37 AM
, , , , , , , , , ϼ, , , , , , , , , , , , , , «, », i think.
25 apparently
creating jobs for apl font designers (:
ooh, could a fractional part primitive be interesting? would give it the glyph { (by comparison with and ), but sadly that's taken
?
 
Didn't you add for rounding? for the fractional part then.
 
@Adám no, rounding is
i think it fits more for round than from fractional part
 
Oh.
 
round is in the middle between floor and ceil
 
No, rounding is a combo of and so it should be [ hence
 
9:47 AM
oh, i just realized ⌈-⌊ works for "is not integer"!
@Adám i suppose both make sense, to me rounding feels like "either floor or ceil" so "in the middle" of them, because it can pick either
i like round on , don't think i'll change that
for the same reason it's (planned to be) average, that's in the middle between min and max
 
Not sure why you need fractional part, though, as it is simply 1|
 
ah, i missed from the list too. 26 then
@Adám of course, didn't think of that. no need then!
 
You know the 0 1⊤ trick?
 
no, what's that?
 
Split into integer and fractional parts
 
9:51 AM
tbh i keep thinking of new math primitives just because they're easy to add... don't really want to deal with all the complicated primitives yet
but eventually i'll have to tackle, like, inner product and stuff like that
@Adám cool! how does it work?
 
It represents with a 2-digit mixed-radix. The right digit is in unary, swallowing the fractional part but never reaching 1. The left digit is in base-infinity, thus containing the remainder:
      0 1⊤12.3
12 0.3
      0 1⊤12.3 4.56
12   4
 0.3 0.56
 
some of the complicated primitives i don't even know how to approach
like the aforementioned inner product or transpose/reorder axes
maybe it would be helpful to have pure APL models of them
also an explanation of alternant, for which there's apl code available but i don't really understand it
i actually don't even know what alternant does, i just know it's generalized determinant/permanent but don't know how it actually computes those
(we decided that alternant and inner product get the reduction factored out to deal with ltr/rtl versions, right? it makes sense to me to do that, at least)
 
@RubenVerg Inner product is on APL Wiki. Transpose is trivial, I think.
 
i don't really fully understand what transpose (monad and dyad) do
maybe i should look through the planning and make a list of the things i don't understand
...or maybe not. it's a bunch of things and if i focus on my lack of knowledge too much i'll lose motivation
 
 
1 hour later…
11:21 AM
@RubenVerg transpose models aplenty (monadic is simply {⍵⍉⍨⌽⍳≢⍴⍵})
 
 
1 hour later…
12:41 PM
@Adám thanks. based on this article i wrote {⍵⊇⍨⍺⊇ᑈ⍳(⍺⍋⍺)(⌊⤈⍤⊢)⌸⍺⍋⍴⍵}, which seems to work just like Transpose
only problem is that it uses Key, which is another primitive i think is gonna take a while to add
(and i'm also missing for sort by, but that's easy enough to add)
 
No Key in the 2016 models.
 
@Adám it seems to work only in ⎕io←0
 
so?
 
i don't understand what it does so i can't port it to io 1
 
Can't you just localise ⎕IO←0?
 
12:45 PM
well, io is fixed to 1
 
Oh. This one? {(,⍵)⌷⍨⊂(↑,¨⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=⍳0⌈1+⌈/⍺}
 
      ⎕io←1
      3 1 2{(,⍵)⌷⍨⊂(↑,¨⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=⍳0⌈1+⌈/⍺}a
INDEX ERROR
      3 1 2{(,⍵)⌷⍨⊂(↑,¨⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=⍳0⌈1+⌈/⍺}a
       ∧
      ⎕io←0
      2 0 1{(,⍵)⌷⍨⊂(↑,¨⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=⍳0⌈1+⌈/⍺}a
 1 13
 2 14
 3 15
 4 16

 5 17
 6 18
 7 19
 8 20

 9 21
10 22
11 23
12 24
@Adám yeah
 
{(,⍵)⌷⍨1+⊂(↑,¨⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=¯1+⍳0⌈1+⌈/⍺}
 
no, still index error
 
Oh, I missed one: {(,⍵)⌷⍨1+⊂(↑,¨¯1+⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=¯1+⍳0⌈1+⌈/⍺}
 
12:50 PM
it gives a weird result, it introduces an extra axis with repeated elements
but i don't think Key in the other one is that big of a deal anyways, i don't think it will be too too hard to implement, just a bit hard (:
 
1:16 PM
@RubenVerg Oh, ofc the left arg is expected to be in ⎕IO←0 too: {(,⍵)⌷⍨1+⊂(↑,¨¯1+⍳(⍴⍵)⌊.+(⌈/⍴⍵)×~b)+.×(⍴⍵)⊥b←⍺∘.=⍳0⌈⌈/⍺} (this time I actually tested it.)
 
1:37 PM
Reminder: APL Seeds '24 begins in just under an hour.
 
@Adám i don't know if this is much better, it has inner product and base, both complex (:
yeah i think i'm going to pick an adaptation of the Key one (modified to work inside Haskell, of course)
 
Base is just a weighted inner product, and I believe these inner products are simple, as they all use at least one vectors argument, but you do you. (Don't you need to implement base and inner anyway?)
 
yeah I've been dreading encode and decode but maybe they aren't so bad
 
 
1 hour later…
3:10 PM
@Adám thank you! I studied the internals of PDF after asking my question and now I see why it is extremely hard to implement Unicode in PDF/PS.
 
 
1 hour later…
4:37 PM
@IvanSukin We use PrinceXML to create PDFs from HTML with full support of Unicode. PrinceXML implements the entire (or almost) CSS print media spec, which no browser does...
it's not free, but if for commercial purposes its totally worth the money.
 
5:02 PM
another choice for CSS paged media is vivliostyle which has decent Japanese vertical writing support (which prince cannot do) in addition to unicode. It runs on browser or as node.js
And it is free open source
 

« first day (2618 days earlier)      last day (31 days later) »