« first day (1406 days earlier)      last day (53 days later) » 

2:39 AM
@Bubbler hmm indian name
never heard of it
 
@Razetime It's Arthur Whitney's new company. Website here, which has changed a lot since I last saw it.
 
 
1 hour later…
4:10 AM
@RikedyP I am using Chrome. And I just checked and it still doesn't work
Also, "Ctrl + Shift + Backspace" also removes the expected indentation
I know you can just edit the line above, but most command line REPLs (Python, Haskell, etc) have a command to get the previous line (usually just up arrow) and then you can edit it
So I typically do the same thin in APL (aka use Ctrl + Shift + Backspace)
Note on the old tryapl.org, up arrow worked - and my recommendation is to just leave it that way
No beginner is going to know the Ctrl + Shift + Backspace is what you need to type to get the prev line
 
 
4 hours later…
8:34 AM
Maybe we should have two modes (even in the full interpreter)?
 
@code_report Very fair point - that is a shame - just carried away cos we're so used to it / the text editor / xiki shell thing is cool in my opinion - do you think we can get away with just saying telling people how it works on the intro tab? Also by this point, you don't just use the actual interpreter? The goal of TryAPL for us is to get people to an interpreter
@Adám Well I'd like to know what @brgal's experience with his recent workshop was
 
@RikedyP maybe have (ctrl or alt)+up/down for moving in history? Worse than just up/down, but much better (of course with a note somewhere)
 
@Adám But yeah I guess that wouldn't hurt - it's just pretty lame in my opinion, but I'm definitely biased :P
@dzaima Yeah I'll add that (both why not)
@code_report Can you try a )clear for me - I'm using Chrome and it works for me - or if not try clearing cookies and also localStorage.clear() just for good measure
@code_report although AFAIK we don't currently save your input history to localStorage (Adam said we should and maybe we will soon)
 
@RikedyP try 2+2<enter><ctrl+shift+backspace><enter><ctrl+shift+backspace><enter>
 
@dzaima yep, unfortunately it's "working on my machine"
 
8:41 AM
@RikedyP huh.
 
@dzaima Is there an update I'm missing?
 
@RikedyP i'm on chromium 87.0.4280.66
 
@dzaima Much appreciated
@dzaima What did you think of it - are you too used to the way the interpreter works as well?
@dzaima OK I'm gonna try update
 
@RikedyP you should probably add an event.preventDefault() to the ctrl+shift+backspace case
 
@dzaima that sounds like something I forgot to do
@dzaima TY
@dzaima Adam and I use the same keyboard layout too so I gues that doesn't h elp
 
8:46 AM
@dzaima i've bound ctrl+d to RIDEs going backwards in history, but turns out ctrl+up works just fine :|
 
@dzaima not by default I don't think? well not on mine anyways... defo something to bring up though
 
@RikedyP I'm used to RIDEs behavior for up/down, but the ctrl+shift+backspace is still imo way too complicated for something that's used maybe 0.7x as often as enter
 
@dzaima Well I'm changing tryapl to ctrl+up/down (as well as shift +bckspace) right now
 
@RikedyP yeah, not by default, but I didn't even think about binding it. (though i guess ctrl+d is typeable with one hand whereas ctrl+up/down takes 2 (there is right ctrl, but i never use it))
 
@dzaima Also shift+up/down cos Y not
 
8:51 AM
@RikedyP shift+up/down are useful for selecting the output for copy-pasting though
 
@dzaima no nor me - my APL key is AltGr with CAPS bound to AltGr and I rarely find myself reaching for actualt AltGr
@dzaima Oops good point well made - here's me getting carried away again
 
9:15 AM
@dzaima Someone mentioning Linux would have helped as well
 
9:42 AM
@dzaima It's gonna be Alt+Up/Down since Ctrl+up is localise variable in tradfns
 
9:53 AM
@dzaima @code_report Okay fixed now + you can use alt+up/down for recall - we are considering having a one-line input/ separate output mode like before but that won't happen soon cos busy. Thank you so much for your feedback invaluable as always
 
@RikedyP yep works
 
 
1 hour later…
11:25 AM
should probably add a language selection menu thing to paste
 
I was being dumb, I found it
 
@rak1507 what did you find? there's nothing written about anything except in the source
 
I just had to click view
 
ah
still should add a language selection menu to it
 
Yeah maybe, it's nice having something that does APL syntax highlighting, most other things I've seen for sharing code don't support APL :(
 
12:19 PM
pushed language selector
 
 
1 hour later…
1:48 PM
shakti.sh/about?eula=shakti.com/license I love how minimalist this is
 
 
1 hour later…
3:07 PM
Could you offer several examples that showcase ⎕ (Quad) ? I'm struggling to see how it can be applied in routine programming tasks.
 
@wgajate which usage of ?
 
3:20 PM
afaik, quad acts as a stdlib escape hatch.
for example
      4 ⎕CR 1 2 3
┏→━━━━┓
┃1 2 3┃
┗━━━━━┛
in gnu apl, the ⎕CR (or "character representation") will format the right hand argument according to the left hand argument integer
^ yep, i didn't immediately think of a cross-apl function
altho, I guess ⎕ by itself acts as a way to print to stdout
gnu apl specific
 
⎕IO would be one. (GNU APL doesn't have ⎕A/⎕D‽)
 
      {⎕←⍵}¨⍳3
1
2
3
1 2 3
@dzaima correct it does not\
i wish i had more time to program :[ did some bqn last night for first time in weeks
 
is 1) take input from user; 2) output to stdout; 3) anything that doesn't deserve a single-character builtin but is still useful enough to be in the language
 
@wgajate APL Wiki's article may interest you.
 
@dzaima, @Adám, @cannadayr thanks for offering further context and examples. Much appreciated.
 
3:35 PM
@dzaima Heh, even something that does deserve a single-character built-in: APL*PLUS/II had ⎕MIX and ⎕FIRST, iirc.
Morten has been contemplating adding and for those…
 
oh no sane indexing character
 
Yeah, I don't think it is worth it either. The idea was that ⎕ML≥2 people could replace all their s with s and all their s with s and then set ⎕ML←1.
 
4:27 PM
What would those characters do?
 
Same as their undecorated equivalents do in ⎕ML←3
 
I'm not seeing the point of adding new symbols for features that already exist
 
It would be to ease transition from ⎕ML∊2 3 to ⎕ML←1
 
Ah
 
CMC: Given an IEEE double as a hex value, convert it to the actual number. E.g:
      Decode '0x3ff10d2e190c9594'
1.0657177904589377
 
4:33 PM
dfns.hexf 2↓⊢
probably cheating
 
:-D Nice.
 
APLcart is just too good ;)
 
5:00 PM
@Adám dzaima/APL, 21
sad that this doesn't work, probably because no ¯0 :/
https://tio.run/##rVXLctMwFN37K7IrjJGtpyXxAZ1hxTfYlpw4ceJMndLpMOwYZoCGYcNkxZI1Cx47NuRP/CPlSpZLKZShpdno6L7OuZZ0k68bZE7zpp2e92/ePXrcv3iLo377fjLbbNbdwzQ17fE0b5p5ctIemfWR7bqkbJcpxRSnWKQEp0W9Oak7i8p29cQedXW7Qm2FIK9obIeOu3o1Re2qOUVV0@Ybt1u39WqDlsfNpl43dQlGyMlXBuXG1G6Tnh@CkKf5pICFZP2rD/3Zt3778h5oNA8U0f3ZV4D5/X77iU5Uv/3cb79ELlgngmWSM5JxnFFhv3/Ecr8r@tfPK/AinHAdfkoxobgETwmeKnYxU0BcYCa0zqhkEnMtExxCpnEJyLoy18bYuIwMrAUqgwUnGGOuFFWEiv3OmQvPN6KpZ174ZIcaQCVaAJoDogmlAkumhIKFYsKhJYZVqD6PG4cQQAdqpx9a5JRRxSQRQmrLsPSfph7YXRrxggvP5DjzwIQ5z6AfYGSEARHJ9rsc/LPh2
 
5:21 PM
@rak1507 Hm, now I want an integrated APLcart feature in the IDE: Hit a keyboard combo, get pop-up, type query, select result, result is pasted at cursor position.
 
That sounds amazing
 
5:46 PM
@dzaima I've been looking at destructuring compound functions in BQN, which is needed for nice function formatting and useful for the tacit function expander I mentioned. It turns out I can tag compound functions in the Javascript VM with only about 5% overhead, so it's not a technical problem. But I wanted to decide on a format that we might use for a system function. Here's my current model:
not compound ¯1,x
2-train       0,  g,h
3-train       1,f,g,h
1-mod         2,𝕗,𝕣
2-mod         3,𝕗,𝕣,𝕘
left partial  4,𝕗,𝕣
right partial 5,  𝕣,𝕘
So the result is a list between 2 and 4 items long, with a "type" and then elements. It only expands one level at a time.
With this model, a 3-train with · on the left would have to be represented as a 2-train, but maybe we'd like to add extra information to distinguish them.
 
In ×/ ⌷∘data¨ ⍸data∊⍨2020 - data is data hashed or something so ∊⍨ is constant time? Or is this O(n^2) still
 
@rak1507 If the data is integers between 0 and 2020, it will use a lookup table, which is O(n).
 
The whole solution is O(n) or that part is so the whole solution is O(n^2)?
 
@rak1507 Every part is O(n) (well, ⌷∘data is O(1) if you're going to break that down), so they add up to O(n).
 
Oh great
                      (ms)
 CPU (avg):  0.04621465774
 Elapsed:    0.04653087798
just double checking, this is 46 us?
 
5:59 PM
@Marshall is that the language-facing format, or some internal thing? (fwiw i had a concept branch adding •M for something like ToE/metadot for that)
 
@dzaima Language-facing.
@Marshall I think with that function there are four "reflection"-ish queries you might want to do: get type; convert primitive to character; destruture compound function; and get source code (location?) for blocks. Somewhere in there there needs to be a way to tell a primitive apart from a block, though.
And the programmer might want to inspect values in the scope, but they're not allowed to.
@rak1507 That's what it says, but I don't know the reporting tool. How big is data?
 
@dzaima another "fwiw" - i have •TY (and lower down •DR) that might also store some info, but i would personally prefer metadot
 
@rak1507 Also, isn't this the same as ×/ data /⍥,⍨ data∊⍨2020 - data? With no need for the ⍥, bit if data has rank 1.
 
6:19 PM
@Marshall My compiler doesn't distinguish between (·F G) and (F G) in object code output. We probably shouldn't require implementations to keep track of the difference.
 
@Marshall and dzaima/BQN just implements (·F G) as (F G)
@Marshall (it's a good model for a single function giving the info, but i think it might be worth it to get a more general form of querying arbitrary data)
 
@dzaima I'm fairly sure I prefer using functions for all these queries. The reason for the ToE bullet in Dyalog would be that there are values that aren't first class.
For blocks in particular it might be reasonable to have a function that returns a metadata namespace.
 
@RikedyP Alt + up / down works :) thanks for adding that. I have Dyalog 17 on 18 on my Windows laptop, but when I tried downloading Dyalog for linux my keyboard setting broke for half a day so I uninstalled it. I personally think Dyalog should be heavily investing in tryapl.org. In C++ land, godbolt.org has become the primary place I write C++ code examples and prototype. Software development (and everything) is headed to the browser/cloud, not to desktops.
 
@rak1507 Yes.
@Marshall That sounds right.
 
@code_report linux dyalog breaking the keyboard layout is an expected problem. My solution is still to just clear /opt/mdyalog/18.0/64/unicode/aplkeys.sh
 
6:28 PM
@dzaima

> linux dyalog breaking the keyboard layout is an expected problem.

that is very sad. users shouldn't have to have work around solutions for software that is "out of the box broken" basically.
 
@code_report i've ranted about it many times here. It is indeed sad.
 
APL already has a huge "barrier to entry"
arguably, C++ did too for many decades (getting a C++ compiler up and running on your workstation was no small feat). With godbolt.org, the "time to first line" is the time it takes to type the URL in. TryAPL.org can serve the same purpose.
 
@dzaima For the compound function expander, the things I'm still wondering about are whether it should rearrange arguments in some way to make them more regular (pad missing left inputs, or put the "main" function/modifier first), and whether it should indicate data/primitive/block instead of lumping them all together as ¯1.
 
@code_report Yeah, one thing we will be looking into is creating a lightweight but secure container to run APL in. We could spin up a few to have them ready at a moments notice, and then as they get corrupted or busy, we spin up new ones.
 
oh, only 7 instances (this is the 8th yay):
https://chat.stackexchange.com/transcript/52405?m=54357049#54357049
https://chat.stackexchange.com/transcript/52405?m=54301101#54301101
https://chat.stackexchange.com/transcript/52405?m=53116045#53116045
https://chat.stackexchange.com/transcript/52405?m=56057733#56057733
https://chat.stackexchange.com/transcript/52405?m=56023398#56023398
https://chat.stackexchange.com/transcript/52405?m=55548453#55548453
https://chat.stackexchange.com/transcript/52405?m=54614541#54614541
 
6:35 PM
@code_report We have a serious problem in our duality of trying to remain constant for our existing customers (the ones paying all of our salaries) and making the product attractive to the modern audience.
 
@Marshall I'd guess there's no good solution to the ordering issue. I'd have another 2 types for primitive and block, and only non-function/non-modifier for ¯1 (erroring on non-fn/mod is probably not worth it)
 
@dzaima I guess they should be 0 (primitive) and 1 (block), and shift everything else up? That makes 2- and 3-train numbers work nicely, by complete coincidence.
 
@Marshall seems nice :D
 
@Adám I can appreciate that. That being said, I think growth of APL and discovery of new customers and a growing community all starts with low barrier to entry, and TryAPL.org provides that. My love for APL started on TryAPL.org after I googled the language having listened to a couple episode on APL on the FunctionalGeekery podcast. If it weren't for TryAPL.org, I am not sure how far I would have gotten.
 
Does anyone know the commands to compare the computation time of two APL expressions in session? Been googling with little success
 
6:44 PM
@Jonners ]runtime -c expr1 expr2 or (optionally 1) cmpx'expr1' 'expr2' with dfns
 
ah of course, runtime! Thank you, I was looking down the wrong rabbit hole in ⎕PROFILE
 
also APLcart is a good place for searching APLy things
 
@Marshall yeah true idk why I didn't use /
 
6:59 PM
Just came up with a nicer solution, ×/⊢∩2020-⊢
 
7:16 PM
@rak1507 Emphasising / (or really ) over + /[]/ is something we need to work on.
 
Yeah, although the revelation that I'm basically filtering items in ⍵ meant that I realised ∩ would work there anyway
 
Right.
 
From ×/ ⌷∘data¨ ⍸data∊⍨2020 - data to (×/⊢∩2020-⊢) data
I just hope I can have these realisations during the problem solving competition, when I won't be able to get ideas from here...
 
7:33 PM
I only went with ×/ n[ ⊃⍸ 2020= ∘.+⍨ n] and added ⍣2 for the second part
 
right fair enough
 
that is clever, and probably faster
does it extend to part 2 and find triples?
 
@dzaima Put up a draft with some proposed system functions in the spec.
 
part 2 (×/⊢∩⍥,2020-∘.+⍨) @TessellatingHeckler
 
For terminal I/O, J allows numeric codes in file functions to indicate stdin/stdout/stderr. That might be a good approach to take (although for stdin we'd need a way to handle streams).
 
7:49 PM
@rak1507 milliseconds for mine, tens of microseconds for yours.; neat
 
Thanks
 
@Marshall will get to implementing. Having 3 separate file functions for different types makes a lot of sense (as opposed to an argument of the type, or not having any options other than lines..)
 
@dzaima Putting the BQN-side type in an argument would be good except there's no argument to put it in. And eventually we probably want to allow the file argument to say what encoding the file has, but it's pretty unlikely anyone will want anything but UTF-8 for a long time.
 
8:07 PM
@Marshall short read thru, and my first thoughts would be that it might be helpful to wrap open(2) and write(2) as close as possible
you could still use convenient wrapper functions for everyday usage, but there are times you want to write to a file descriptor not a path, as well as write byte slices (not a whole file)
 
@cannadayr By "as close as possible", you mean close to the C versions?
 
@Marshall yes
im not sure specifics of emulating the syscall in a self hosted language, id be interested in your thoughts
 
@cannadayr I've been assuming whatever Dyalog's portable file functions do is reasonable. I haven't thought much about anything that holds files open as I almost always just read or write the entire file (I knew BQN would need them eventually though).
 
i would guess (having 0 idea) that dyalog has arch specific ifdefs during compilation?
 
@Marshall annoying question - how are trailing newlines handled for •FLines?
 
8:15 PM
For example ⎕NTIE would be •FOpen.
@dzaima Always added when writing, and removed when reading, I'd say.
@cannadayr It's full of architecture-specific ifdefs.
 
yea, the easiest way to run syscalls is to already be in C
 
I read about magic functions the other day, and was wondering, is there some core subset of APL that is all in C and a lot of the rest is done in APL? It seemed like magic functions might only be used for special cases though
 
@dzaima I guess which line ending to use should be considered part of the file format? I don't know what •LNS is doing currently.
 
@rak1507 Right, almost everything is in C, and magic functions are for a select few primitives. We're getting rid of magic operators, as they cause problems.
 
@Marshall •LNS is just lazily splitting on "\n"s
 
8:21 PM
@Adám Oh interesting, they seemed like a really cool idea to me, it's a shame they cause problems. What sort of problems do they cause?
 
@rak1507 There's no clean separation. There are some places where magic functions can't be used, but otherwise they can just be put anywhere, usually to handle a particular case.
 
writing to a socket is (in some ways) a superset of writing to a file descriptor
 
@Marshall Maybe look at what Shakti does (under I/O)?
 
@Adám Well that didn't take long.
 
@rak1507 It seems hard to "hide" the innards of a magic operator from its operand.
 
8:23 PM
Oh yeah is that what causes a bunch of APL to spew out when you error in specific cases?
 
@Marshall Details.
@rak1507 Exactly.
 
So is dyalog going to transition to using more C in future?
 
@rak1507 Magic functions were never really about reducing the amount of C used, rather writing algorithms that would take too long to do in C.
 
Take too long as in be too complex?
 
Also, there are a few ways to call APL primitives without using magic functions; the difference is just that they have C syntax instead of APL syntax.
 
8:28 PM
Right yeah I was wondering, idk how anything works but if there's some sort of function that does the stuff, if you can call that in C rather than in APL
 
@rak1507 Not be worth the developer effort, basically.
 
@Marshall so matches java's Files.readAllLines exactly :D
 
@rak1507 There's only a negligible amount of APL code in the interpreter…
 
@Adám That is, if you're counting lines of code, not if you intend to run the thing.
 
First time using link, sorry if this is a silly question. Does it not support something like foo←2∘{⍺×⍵} ? It returns DOMAIN ERROR: Invalid text array *** Fix: Unable to write "foo" to file.
 
8:31 PM
@dzaima So, a vote of confidence from James Gosling. I'll take it.
 
@Adám Should have spotted that earlier. Thanks!
 
@JamesHeslip btw, the issue is that there's no obvious way to represent derived functions. (Well, for many, there is, but for some, there isn't.)
@JamesHeslip Work-around:
∇ foo←foo
  foo←2∘{⍺×⍵}
∇
 
@Adám I thought you were going to propose foo←{2×⍵} :)
 
That wouldn't be a general purpose workaround.
I've created a simple ucmd interface for using this work-around.
 
8:37 PM
@Adám Very true. Perhaps I will use Link for this project after all.
 
@Adám Hm, it falsely claims to support lazy operators.
 
@Marshall what do the file writing functions return?
(only just noticed that •FBytes actually returns a character array, not a number array of 0-255. I'd imagine anything dealing with bytes wouldn't want to touch characters)
 
@dzaima I guess the filename? You wouldn't want it to spit all the data into a REPL.
@dzaima The issue with numbers is that it's not obvious whether to start at 0 or -128. Characters obviously start at @.
 
@Marshall obviously start at 0. signed bytes are stupid
 
@dzaima But also more likely to be optimized.
 
8:52 PM
@Marshall well, that depends on who's implementing the optimizations. Signed bytes are definitely more annoying to use, and the only case when I'd expect a character •FBytes to not be immediately followed by @-˜ is when abusing it for faster loading of ASCII files
 
@dzaima If you're handling a binary format that someone else designed, I think it's reasonably likely for it to use some signed bytes, or a mix of signed and unsigned. It's weird to say it like this but to me characters feel less like the data is already interpreted and more like you can make your own choice.
Although converting from usigned int to signed int is still easier than character to signed int.
 
@Marshall to me it feels the exact opposite. non-printable characters are mostly literally useless without converting to numbers at some point
 
9:07 PM
@dzaima I guess that's why. They reflect that the bytes in a file are useless and don't mean anything until you do a conversion—and you might choose to convert in various ways.
 
@Marshall are there any actual usages of signed bytes in any file format? Bytes being given as signed doesn't help at all afaict in parsing 2- or 4-byte signed ints
 
@dzaima You want the highest-order byte to be signed and the rest to be unsigned in that case.
 
@Marshall so unsigning separate bytes vs adding a sign in post-processing
@Marshall the only "conversion" you can do is subtract @+something, and that "something" is zero for unsigned conversion, and zero for the best signed conversion i've found. (not that this refutes your point, but it's still intentional boilerplate to usage)
 
9:22 PM
@dzaima Well, (¯128×0⊸≤)⊸(+-¯128-⊣) converts between offset unsigned bytes and signed bytes without going out of signed byte range (example), but it's not exactly pleasant.
 
@Marshall any way of getting the source of a -function?
 
@dzaima You mean the file where it's written?
 
@Marshall no, getting "•comp" from an argument of ⊑⟨•Comp⟩
 
@dzaima Oh, I hadn't thought of that. There's nothing in that draft.
 
making •Glyph return a string and reusing it makes sense to me (-functions are really just multichar primitives)
 
9:33 PM
But also, •Import, etc. should be tagged with the path, and it's not obvious how to go about that.
Can't think of anything better than using •Glyph right now.
 
@Marshall oh right. The user doesn't have access to anything representing a non-relative •Import. I guess it could be another •Decompose case, giving the path and string version of the function
 
@dzaima But it's pretty tricky to re-compose them. It doesn't really seem to fit in.
 
@dzaima (though it would be fun for it to be some strange & unknown derived 1-modifier)
 
@dzaima •__Import_deriver_factory_thing__hidden__do_not_use obviously
 
@Marshall what rules for underscores in names did BQN end up with? :D
 
9:46 PM
@dzaima They're ignored, except the first and last. But if you write the import deriver thing without the double underscores then you're really in deep trouble.
 
(while implementing char-based FBytes, ran into the problem of negative bytes being converted to chars with unicode codepoint≥65407 ಠ_ಠ)
 
10:04 PM
@Marshall "left partial"?
 
10:17 PM
@dzaima Yes, that's allowed. I've been meaning to ask how the bytecode handles it—I guess it doesn't?
 
@Marshall so like -(÷∘) for ÷∘-?
 
@dzaima Yes.
 
yeah, that has no support in dzaima/BQN
 
10:47 PM
pushed impls
 
11:03 PM
@dzaima Removed all my •LNS's!
 

« first day (1406 days earlier)      last day (53 days later) »