« first day (1255 days earlier)      last day (1400 days later) » 

12:08 AM
@dzaima i guess the more important thing is that _amend is called 42381 times and takes a total of ~457ms. Way less than i thought though
 
@Adám Turns out the extension for Drop is much easier than Take:
 
@dzaima Well, with _each and _scan replaced (should I spell names of primitive ops this way?) it's not needed at all.
 
@Marshall oh, i still have _table
¯\_(ツ)_/¯
(though that was still before removing _scan, with only _table amend was used 18324 times/68ms)
pretty table of not much information (profiling the separate primitives might be harder due to strings not being replaced)
 
@dzaima dzaima/BQN is still missing the monadic form (should be like _each). I'd forgotten about that when I took it out, and didn't have a test for it. But of course I also don't need it.
Pushed my version of dzref.
 
12:50 AM
$ ./dt.js
All passed!
 
yay table of runtime of reference override time
https://dzaima.github.io/paste/#0zZfNihNBFIX3PkU/QXl/6tat@zhBxE1EcQYRVBARMZkJjpKACyUKI87ALAVd6Cx8lHoCH8HqVH6muxcmu2oCXVVU6K8Pt865neanaf7if7@rvRcP2nN2K81f3n3y8FFTrjy7MxqPj9rB8YPj0bi5f1SWR4/vbcf5Tx/3ePSvvRcP2nPeMqc335rtlecUmAnzoGlEnLIScDsDBwCEWAv1RYcazaNxoSYXiSnSjlqpEurZpEPd3tBWA2aHAUVjO0OnXtiHWrSeDqiDFGp1qNGjFK1F0VRq0fpkQE2@LRXvs9Zm4ttZAIfMjL4S6unbLjWZAbTHUgEcCaP4dV0bMFgd1Lf7Sqvoqo4hOiSBuHYQ9BSZK1F6eZGWl@nrFNL0Z74N6iTfs@KMRFsnscDV1MlZX3MkKJpLdpJIZIU6avBQi2u/ftelxiDU@gUCm9NIQXCtdSCjWqhn7wdO0vAa35Hn4tQ5LSEiYiX@B2nyOU2@3Ex2tGwa5QUoS4zIus1IsFrUns4H
 
Select shouldn't be too bad. Join isn't easy though.
 
1:23 AM
more: (includes recursive applications, it takes 3s total, but ¯\\_(ツ)_/¯)
https://dzaima.github.io/paste/#0zZjNahRBEMfveYp5grbrq7v6aUIQ8RJRTBBBBRHR7CarUTYYRFmFiAnkKOpBPXj1LeYJfARrpmc/Zvbg5tbDstPd9LK/Kf71r@qpp0f19PH/PpcbL15pz/FWPX1y4/6du1W@bHZ9Z3d3rxns397f2a1u7eXlnXs3F2P70bsN/vrHxotX2nPWMF/bhmrJbN9RYh5QcKwxYp5551mxDGZfjz7Uo48r3AjJJ9@SAjqloCTNzKjtEi2D@8Hf9ycXVX34tKpHZ/Consx@X7b0ooKU6b0DiEhhSU@pDPqHPaWQjyTQUAKoC6QsvGAmDWUw/zkdyBs4NDIBYu9YJKYcdu8SKBQi7/rZqz41BMFWzkGTCx5N6x21Z4hUCvXJtl@lVp@QOytxTJ5XRc1YDvXAADHJwvJUFXQpaw@FUB@Mh9RVkLn9cYopdtSQEGMohfpzjxoDEeTyAqaQBJaVK6YN5VDjINZVzj8Cxx4wtDN7Ak2Wm
 
1:33 AM
not including time taken by itself in an already timed state:
https://dzaima.github.io/paste/#0zZjfahNBFMbv@xT7BOOcPzNnztOUIuJNRbFFBBVERJO00SopFlGiULGFXop6oV5461vsE/gInt3ZJN3NhendhJDMDhvyy8c33zkn9eywnj3@3/Ni480r3XO0Vc@e3Lh/526VH3Z1fWd3d69Z7N/e39mtbu3l7Z17N5dr@9C7Db76x8abV7rntGG@tg3VitleJUi7YHZAPsbQXHnnQ0KNZTD7evyhHn@8xI2gXn3LDegIQDB13PYIhXA/@Pv@@LyqD55W9fgUHtXT@e@Llj6kgJTlr9RRCoAreiqE/mHPKeSFAjSUAMGBjworxUm4DOY/JwN7A3MjLZCqCxRUO3ur@BCwDOj62as@NcSALWcVvThgZeqkpigMpVAfb/vL1MkrcjY1uxQ4LbRuj6SWQz0IQMyclZECBograsZCbF2PJkPqKnM28Rc82mnM1KBIXIrWo889aoxEOegqINMXgS85pCRqHGhdabtAcQrCMbZXZCkIWoxDznpagx
right, operators include the time of the application of their operands, so it's kind of pointless..
 
1:57 AM
speed comparison for adding a quick-path to ∾ ("R" is the total runtime):
https://dzaima.github.io/paste#07ZZBa1NBEMfv@RR71Msys7O7s3vw4iEHj/UDSChRCtGKjSKUQhEJSVXoIcUelKpUbKDHIh5EIR9lP4EfwXlvm@Y9PBiChy34CLydZV/ym7z/zPzT9HWa7v/tc77y5hpnDjtp@qL//PETlS@JNnuDwU61GG4PewP1cCdv9549yOs6ksferfD131feXOPMacUOafIhTT6qJb/BCBFkoRSSNs4GxjpSCjTI5Uviv7O99WjJXt1sRYvojDbG@5DZTdAIBCGWxL6hlGqzq5o9uqhDJGbzR1QM@93@oL85vGI3MUKlGSTwOgZECjklkYwlRiyJfffX@6OZSq9eqjQ5xb305mR@XivfBWcocyNqDuSXWchlXUlZpNHRPWjqJ0A0NvNaTeQct@gdFUU//tGmN5Hc5X8vXYeCZWp2nbIUlE7O0sksfT6AdPBNbs0aXrwDwTbGsWtmEW3OYrrCD12svLnGmeNOp@qcaTTb7abRId6qxsD
error messages from 3 different languages in 1 (4 if you count wasm there):
https://dzaima.github.io/paste/#0jVJLbtswEN3rFLPoQkJTKnKUwhaaIInrhYHmU7RFdgkocWQz4EcgKdvKougF2hsEAbpKr9Gj@CSl5NpF2qAONxL45r15b4bslnJJj1j3eXcKn@MJd/HJ@7PYoXXwAkjMHLmxwVhWAiUqRx3XamSMNhnc0BklgqoJOTaGNmPFcHFeu/PyRNeK2dGiwKotz6CD4FUCunagS8i7Aii1AYFq4qaQBgDLr99@PsDoujK68D/LL98/fHw7PlvePyzvf3j0DkouEHBGRd358By4gu0nCOKplhivcj7KuMqXte0BdsDU6pJaeTA/OFQ4h0vMj61FmYuGjJV1VBUY/g2calYLDD9x5frdIEhptAznURQF8OxzFQRDLSsf8Pd0n2gR@VvvDhgWmnE1gZL6epYBLiosHDJIIW98rB0oUQg/6RJQMTh6uds5oW4dEMKtE8nSvWjNso75zRFbCe6IX4JDQyStCN2uk6RZL9kIrebjqRC@
 
 
4 hours later…
6:05 AM
@Bubbler Great. It was missing the handling of scalar , so I added that with the side effect of also adding the other proposed extension for take and drop; allowing to increase the rank of .
 
@Adám Oh. So many corner cases...
 
 
3 hours later…
9:36 AM
@Adám I think possibly the TIO link for X(f@g)Y is incorrect in APLCart - shows the same example as that given for X(f@N)Y
 
@xpqz Well spotted. Will fix.
 
How would I craft an (f@g) to achieve a transformation based on the values of the source?
Say I have a matrix where I want to transform 0 1 2 3 to '-abc' respectively:
⊢start←3 3⍴0 0 1 2 3 0 0 2 0
┌→────┐
↓0 0 1│
│2 3 0│
│0 2 0│
└~────┘
			⊢end←3 3⍴'--abc--b-'
┌→──┐
↓--a│
│bc-│
│-b-│
└───┘
I can't figure out what it should be:
 
That's just indexing, no?
 
'-abc'({start[⍵]⌷⍺}@ ??? ) start
 
      start←3 3⍴0 0 1 2 3 0 0 2 0
      '-abc'[start]
--a
bc-
-b-
 
9:40 AM
:/ of course
/me hangs head in shame
 
@xpqz {'-abc'[⍵]}@(1⍴⍨⍴)start if you want to torture yourself, the interpreter, and future readers of your code :-D
 
Well, it's helpful to improve my grasp on the dyadic-@ at least!
 
@xpqz Sure, but literally useless here, as it applies f on a subset of Y as indicated by g. However, since the subset in our case is the entire set, @ doesn't really do anything.
Hence 1⍴⍨⍴ to create an all-1 mask.
 
In general, the ⍵ in the left operand is the vector of row-cols where the right operand is 1?
 
10:00 AM
@xpqz row-cols? It is the vector of elements where there's a 1 from the right operand function.
For the @J case, the left operand gets the vector of elements given by the indices in J.
 
Ok - so let me see: (f@g) Y -- g Y picks some subset of the elements of Y, which are passed to f as ⍵, and what f returns is used as the new values?
 
Yes, if by "picks" you mean points at using a Boolean mask.
 
 
2 hours later…
12:03 PM
@Adám How does one use the access keys in APLcart?
None of the keys I can think of trigger it, eg. alt/esc
 
@AviF.S. Did you check the APLcart README?
 
@Adám Not just checked; I scoured it
@Adám It says what to combo the access key with
 
@AviF.S. Even the section about the interface? Did you search for the word "access"?
 
@Adám Yup! Precisely that part. And precisely that search
 
@AviF.S. And did you click the link "access-key"?
 
12:07 PM
@Adám It says things in parentheticals like "(access-key X — for expunge)"
Or "Hit here and start typing (access-key Q — for Query — to re-focus)'
But not what the access key is itself
@Adám Oh sheezus...
...
Didn't quite occur to me, and I guess I already forgot that you said that in the talk yesterday...
 
@AviF.S. Better now?
 
@Adám Thanks a mill!
Works beautifully! Like an absolute charm
Really impressed with how responsive the access keys are! Never seen them; it's super fast
 
Yeah, I prefer only using JS when absolutely necessary. Instead I go for HTML+CSS whenever possible. Much faster.
 
@Adám Well count me impressed!
Only suggestion left is to have an access key for the quiz, perhaps Z? If you approve the idea, I'll be happy to submit a pull. And also, perhaps to note the access keys that are accessible within the quiz
I'll leave that to you to figure out the aesthetics of how you'd like to, if at all, include it in the README
 
@AviF.S. q and z are taken.
 
12:14 PM
But given the questions you were getting during yesterday's Webinar, I don't think it safe to assume that people will notice, or even be able to see (given age), the underlines underneath the 4 letters in the Quiz page
 
@Adám if there was a way to add the precise access key keystroke to the popup, i'd gladly use them too for paste. Otherwise, i'd guess pretty much everyone would be confused by them
 
@dzaima WDYM?
@Adám Hmm... U?
 
@dzaima I could, but I'd have to include lots of ugly code to detect OS and browser.
 
@AviF.S. in paste if you hover over, say, the copy link button, it tells you "alt+s" (as i manually detect alt). without ^ that would be impossible with access keys
 
@dzaima I wish I understood...
@Adám Better idea! Why not make Hit the result list to enable movement keys for scrolling M for movement?
 
12:20 PM
@AviF.S. I underscore the access-key in the tooltip that shows upon hover. It'd be nice to show the exact keyboard keys you have to press (so you wouldn't have had to ask me or look in the docs). However, since it varies depending on OS and browser, the site has to detect those.
 
That clears up Z for quiz
@Adám Understood, thanks!
 
@AviF.S. main page
 
@Adám If that had been in the README, I'd have known :p
 
@AviF.S. Sorry. I added some stuff last minute, and forgot to update the readme.
 
@Adám The other idea would be to have Hit the result list to enable movement keys for scrolling be R for result list?
That is, if you don't like U for quiz
Which admittedly isn't perfect
 
12:25 PM
@AviF.S. I was just about to say. I like that. Can you PR the change and update to the README?
 
@Adám Haha, not at all. Thanks for making such a great product! Just teasing ;)
@Adám Sure thing! I was doing this to procrastinate; mind if I send a few emails first?
 
No rush on this at all. Can wait a week too.
 
Just to be clear: I'm doing Z→R for result list & Z for quiz. Then update README with all access keys like M for main and the ones within Quiz (c/t/p/f). Yes?
 
Maybe the quiz part needs its own readme or readme section.
 
@Adám Will it? Can't see that it would unless you're planning on extending
 
12:30 PM
Currently, there's no description at all on what it is about.
 
@Adám Subsection within access key section, sure! But can't imagine anything more than that for 4 measly shortcuts...
@Adám Ah... Well, then that's an idea! But re: shortcuts, seems wise to have all access keys in the same place
If you were to add way more, perhaps. But it doesn't seem worth sacrificing having the access key section self-contained for want of just 4 more
Yes?
 
True, but that section should have two sub-sections, saying that for the main page… and for the quiz page… linking to the section describing the quiz. Also, the (?) of the quiz page should link to that description, as it is currently a bit useless.
 
12:43 PM
@Adám Ah! Good idea on both fronts!!
^ Avi Github Search Optimize ← For if I can't find this later!
 
1:14 PM
Announcement: Only four weeks left of the APL Problem Solving Competition!
 
ugh, is annoying to implement. took me a while to just get the shape of the result correct!
@Adám (um, pinned?)
 
@dzaima Thanks. I forgot.
@user1431830 Welcome, Kai. If you start chatting here, you user name will fix itself shortly.
 
@Adám Been meaning to ask for a while: When Balance problem says "integers" does that include 0/negs?
There are none in the examples, so that doesn't help there
 
@AviF.S. It'd be advantageous for you to get used to providing more context when you initiate communications.
 
@Adám Uh oh...
@Adám It's Problem 8 - Titled Balance the Scales
Eg. f 1 2 3 4 → (1 4) (2 3)
 
1:27 PM
@AviF.S. Thanks.
 
@Adám Sure!
 
1:40 PM
@dzaima also besides •args it'd be nice to have the ability to (optionally) use paths relative to the file location not where the interpreter was called
 
@AviF.S. In fairness to all participants, I can't give you a more detailed response other than "the problem specification states 'integer vector' without further qualification". Thanks for participating in the competition and good luck!
 
@Brian :) 'Course! Was just hoping to clarify the domain. In CS, 'integers' is often used synonymously with natural numbers (though of course, even there different books will define N to include, or not include 0). Whereas in math 'integers' usu. means integers proper. Or maybe I'm getting the domains confused. Any, was just hoping to clarify whether it was the proper definition or a shorthand for positive integers/counting numbers/natural numbers. But I'll be happy to just assume the worst!
Ugh, I know I've seen 'integers' mixed up with N rather than Z quite frequently, I just can't put my finger on it...
 
@AviF.S. imo using "integers" synonymously to "natural numbers" is a big mistake in any field
 
RGS
@AviF.S. In maths, integers are integers, i.e. ..., -2, -1, 0, 1, 2, ... :)
 
1:55 PM
@dzaima Yeah, it should be...
 
still even in CS i think "integers" means signed by default
 
@RGS 'Course! Wasn't it in this very room, though? Could've sworn @Adám said in this room/in the context of APL, that we should interpret integers as N rather than Z, when someone asked for clarification
 
RGS
@AviF.S. no idea
 
Or maybe what he said was that we should interpret natural numbers as not including 0 when he says it...
Anyway, someone said something like that, and it has me confused since I can never remember which way around it was!
 
@AviF.S. I might have called "Integers" as a mnemonic, even though it only generates N.
 
1:57 PM
@RGS Oh bother!
@Adám There was something more explicit though...
About how to interpret naturals/integers as pos/with/without 0... I think...
Or maybe I'm crazy, I'm really trying here...
Well here's one place, but I don't think this was it:
@Adám "It is extremely common to need the natural numbers, i.e. the integers. For that, APL uses a monadic Greek iota (like letter I as in Integers) symbol ⍳:"
 
I appreciate the question. When I write the problem descriptions, I attempt (not always successfully) to explicitly specify any assumptions you should make about the data. In the absence of any such specification, you ought not to infer any. :)
 
@Brian Alright, sounds good! They are quite clear. Just figured I'd double check :)
 
@AviF.S. Cool! Again, thanks for your participation (and the question)!
 
@Brian Haha, 'course! Thanks for the quick response :)
 
4 mins ago, by Adám
@AviF.S. I might have called "Integers" as a mnemonic, even though it only generates N.
 
2:02 PM
@Adám Oh, that was supposed to be a mnemonic...
Out of context, this is pretty frightful though: "It is extremely common to need the natural numbers, i.e. the integers."
 
@AviF.S. "frightful" might be a bit strong.
 
@Adám Dangerous?
 
How is that dangerous?
 
@Adám being confused about whether integer implies natural numbers? :p
 
I guess I should begin saying "the indices".
@dzaima I guess, if people try to learn the terms from me, then yes, it can be misleading.
 
2:06 PM
(to note is that APL Wiki redirects "Integers" to )
 
@dzaima I often read as "integers until".
 
@dzaima That one might be a good idea though! I don't mean to be such a radical
 
@AviF.S. probably (i'm assuming some impl at some point called it "integers" or something)
 
For whatever reason, @Adám's "natural numbers, ie integers" just made an impression and stuck with me for some reason...
But all cleared up!
 
@dzaima APLcart.
 
2:08 PM
 
@Adám that's somewhat understandable - "first n/x integers" is unfortunately quite a common expression (APLCart doesn't respond to either)
(i'd probably search "first n/x naturals")
 
@Adám doesn't give is what i meant (and ¯1+⍳ is weird in ⎕IO←0)
 
APLcart is ⎕IO←1 throughout.
 
(still thinks would be extremely useful)
 
2:13 PM
NARS2000 kind of has it (but I hate ..)
 
@Adám why go with a digraph when there's a wonderful character available‽
(keyboard input i assume)
 
@dzaima And even more so, overloading the most overloaded character in APL.
 
@Adám ಠ_ಠ
 
@Brian Might also be helpful to have the examples draw from the entire domain in the future. The examples are all (non-zero) positive integers, and for an algorithm to take care of just those examples given is whole different story than to do all integers. Might confuse the skimmer, if they don't carefully read the description. Unless perhaps you purposefully omit some of the domain like is done in Part 1, to test if the writer thinks of the corner cases!
 
@AviF.S. writing correct code regardless of examples given is a reasonably good skill to test
 
2:17 PM
@dzaima Fixed.
 
(while i think using "integers" without any other specification is bad, i also understand others not thinking so)
 
@dzaima whole numbers?
 
@dzaima (2 years ago i might even have thought APLers are weird and decided to redefine "integers" to be just positive, but ¯\_(ツ)_/¯)
 
@dzaima True, true. But it's a different mindset to go into something expecting to very carefully read every word of the description. There are certainly many competitions that work that way, just don't know if this intended to style itself in the same way as well
@dzaima Haha, well APLers being weird goes without saying
 
@Adám i'd probably go with signed integers; it's unfortunate that "integers" alone can be very confusing
 
2:22 PM
@dzaima That's awfully technical. Only programmers use that term.
 
@Adám ℤ?
 
:-D We've had school children compete (and win prizes).
 
@dzaima (first n integers doesn't make any sense - the set isn't ordered, the expression doesn't specify what the first number is, and completely ignores the negative numbers)
@dzaima (whole numbers is definitely better than just "integers", but i'd still go with signed regardless)
 
@dzaima Good point. Fixing…
 
(in latvian there is no word for "integers", only the literal translation of "whole numbers" fwiw)
 
2:30 PM
Kind of the same in Danish, but it has compound words, so heltal means whole-numbers.
 
(and Swedish)
International bunch!
 
RGS
@dzaima the set is ordered, there just isn't a minimum nor a maximum
 
@RGS i thought mathematical sets were never ordered?
 
RGS
@dzaima what do you mean?
 
@RGS you said "the set is ordered", i say "sets are never ordered by definition"
 
2:36 PM
@dzaima J uses 3 :'(4!:3$0) {::~ 4!:4<''y'''0 to get the currently running filename. One of my favorite parts of the language and I think BQN should adopt it verbatim.
 
@dzaima ("the set" refers to the "integers" set)
 
RGS
@dzaima maybe our back-and-forth has to do with {2, 1, 4} and {1, 4, 2} being the same set? Is that related to your point?
 
@Marshall Another option is •here for the directory of the file containing that name (with the trailing slash, I think?), since that's the most commonly used part, and maybe •filename for the actual name with no path.
 
@RGS i mean, that is how sets work
@Marshall (can't read J)
 
RGS
@dzaima sure, but two sets being the same is independent of how you write them down, of course; it doesn't mean they can't be ordered or it doesn't mean they are ordered.
 
2:39 PM
@dzaima It's okay, Jers would have no idea what that line does either.
 
@RGS if you want an ordered set, 1) it can't be a set, 2) you must specify the ordering, and neither is fulfilled by "first n integers"
 
RGS
@dzaima did not understand your message but I do agree that it makes no sense to say "first n integers"; I was just saying it makes no sense, not because the integers aren't ordered, but because you can't start
because you can say things like "hey, loot at the integer 6. Now give me the next 3 integers"
 
@RGS "next" there implies a consecutive, ascending order, not "integers"
 
RGS
@dzaima wdym? are you saying that the sentence "the next 3 integers after the integer 6" is not an objective statement?
 
@RGS it is objective, not because "integers" is ordered, but because "next" and "after" imply the ordering of "ascending, consecutive"
 
2:43 PM
@dzaima "The integers" typically refers to the ordered ring, not just the set of numbers. So it's reasonable to say that they integers "are ordered".
 
(i guess you could also say that "first n" implies consecutive & ascending, but ¯\_(ツ)_/¯)
@Marshall also acceptable
@RGS maybe that's what you mean
 
@Marshall Why would you ever need the filename?
 
RGS
I thought the ordering of the integers is so common and so well-accepted that we weren't discussing the bag of numbers that Z is, stripping it of all its properties.
 
@Adám to give a pretty error message?
 
RGS
But we don't need the ring, you can take a set, give it an ordering, and say it is an ordered set. Z with its usual ordering is an ordered set.
 
2:47 PM
@RGS i specifically stated "mathematical set" originally
 
RGS
@dzaima I didn't take that to mean you were stripping Z of everything; sorry
 
(neither did i know there were proper "ordered sets" (just call them arrays dammit, mathematics))
 
RGS
@dzaima doesn't an array have to be finite? or at least countable? there are ordered sets that are uncountable :P
 
@dzaima No duplicates.
 
@Marshall right.
 
RGS
2:49 PM
But @dzaima we both agree that one can't say "first n integers" even if talking about Z as an ordered set
 
@Adám You could also have a system where a file with a particular name defines something related to that name, even if you move the file. It's not that useful, but it would be weird to have no way at all to find the running filename.
 
@Marshall what is the method of accessing information there though?
 
@Marshall Right, I was just thinking that you don't need a separate thing for the filename, as it could be part of the whole path or the command line args.
 
@dzaima I think 4!:3 gets the list of filenames which have been run (including those that haven't finished yet) and 4!:4, when passed a boxed array of variable names, gives the files in which they were defined as indices into that list. You can also take the last name in 4!:3, but this breaks as soon as you load any other scripts.
 
@Adám the path alone is extremely useful though (e.g. accessing extra data files). it'd be nice to not have the mostly pointless filename take up a spot of •args too
 
3:11 PM
@dzaima True. I like Marshall's proposal. Maybe not the name, but the split is good. Maybe •here and •me. That's more general, in case there's no filename.
 
@dzaima yay
 
3:34 PM
1.3s to 0.7s with that
10s for tests
(also the impl sucks but ¯\_(ツ)_/¯)
 
4:08 PM
made lame (aka add ) impls for ⍋⍒, compiling b←3⋄⊢d←(b×b)-4×2×1⋄((-b)+√d)÷2×2 now takes an average of 64ms. dt.js runs in 3s
status of reference overhead (timing 100 evaluations because now its.. fast):
https://dzaima.github.io/paste/#0zZe/jtQwEMZ7nsJP4Js/9jjTUlLeC6AVOk4rLXeIWxAFBaI4wepOupOCREGJBAUlEg3wMHkSZhPHq4SCbOcohW05yi@fvvnG6dqbrn37v/v7kevL99w96Np3Z6@fv3DDZbMnq83mqh9tL7erjXt2NayvXp2XsT31ecG7fx25vnzPlz33yWN0B27nYkoA/Uix8Zww8H4GHjAqSjXcjy7XFw9frjfb9UVP60gzt3PotaFGMzeANFwV9@nZ06K3czxwIybPxMo0cLMiJK2G@9S5iU9M5Z5bCMAbtIL2M9N7P6uG@83U35Io@5tUPUNA5uKTEEI13N31/awykWQgDxI8pKgSMzmbwbEi8o9zci61ST6xaINFc9R6MqV7v5uRu5jJlYKPiXgkxygJUkXkXyfkpBxkzPHoyT6DY9Ec@oyph5xmyXJIcvBJAhzc0oSmIvJvU7eEVDQX9sGcTXTwOXNV5FPNlTCTY/Qi0AzdM6
looks like is next on the list
 
 
1 hour later…
5:47 PM
@dzaima Small note on the ordering: / should come before , because that allows a _ur_ b to be changed back to a⌾(b⊸/), which gets rid of many uses of Group.
 
6:27 PM
@Marshall i see bqn has first-class functions, do you have a spec written for more information on that?
eg, can functions be array elements?
 
@user41805 think of functions as numbers - they're just another array leaf element, and you can do special stuff with them (which includes, but is not limited to, calling it)
(and whether a certain thing is interpreted as a value, a function, or operator, is completely syntactical, i.e. an AST can be made compile-time)
 
so can you treat numbers as functions by applying them to arguments?
like using each on such a mixed array with both functions and numbers inside
 
@user41805 you can interpret a number as a function (it returns itself), but it isn't as easy as just 3 argument
@user41805 right, 3¨1 2 would "call" 3 twice
the spelling of a variable name determines what it's interpreted as (case is ignored), lowercase is value, uppercase is function (prepended _ is monadic operator, prepended and appended _ is dyadic operator), so x←3 ⋄ X 5 is another way to "call" 3
similarly, you can do X←+ ⋄ -x to negate +, which rightfully errors
 
6:43 PM
@dzaima interesting take on case
 
@user41805 i'm not too happy about it, but there's not really any better option
 
i'm playing with it a bit now, i've got the array q←-‿+ and 0⊑q gives a function, how do i (concisely) call this function? simply (0⊑q)2 doesn't work
 
@user41805 (0⊑q){𝔽𝕩}2 (or just (0⊑q){𝔽}2)
 
i assume it errors because 0⊑q is treated as a value?
 
@user41805 yeah, exactly (all function results are values), it's no different from 1 2
 
6:47 PM
@dzaima hm, that's uglier than i expected
 
@user41805 unfortunately.
 
@dzaima first-class functions seem to be worth the sacrifice
 
@user41805 yeah
 
@dzaima but how does the latter example work? {𝔽} isn't dyadic? how would you make it dyadic and 'consume' the 2?
 
@user41805 actually, (0⊑q){𝕎𝕩}2 might have been clearer - 𝕨 is left argument, 𝕩 is right argument; 𝔽 is the left operand, and if an operator doesn't include 𝕨/𝕩, it's called immediately when an operand is given, and the result function is used as the thing to call
 
6:53 PM
aah i see, thanks
 
7:14 PM
is there a way to return a function, like {something}2 returning a function that adds 2 to the right argument?
 
@user41805 not really
 
i just found {{2+𝕩}} is a function returning a function, now to somehow make it take 2 as an argument
 
@user41805 {x←𝕩 ⋄ {x+𝕩}}2 does that, but it still returns a value representation of the function
(alternatively written as {𝕊x: {x+𝕩}} using headers)
 
@dzaima that's good enough thanks
 
@dzaima my impl even allows {x: {x+𝕩}} but i believe that's not following the spec, as i still don't have immediate functions (only operators)
 
7:34 PM
@dzaima actually y'know what i'll just make the ref use the current when possible and put off updating it..
 
 
3 hours later…
10:17 PM
@dzaima Yeah, that should be a labelled block, and give you an error regarding the x since you can't use a block's label as a value.
@user41805 If you haven't found context.md, that might be helpful, particularly the last section. I'm writing a doc about functional programming specifically now.
 
10:29 PM
@user41805 Other options are the tacit {𝕩⊸+} and operator-based {𝕩{𝔽+𝕩}}.
 

« first day (1255 days earlier)      last day (1400 days later) »