« first day (1435 days earlier)      last day (1235 days later) » 
00:00 - 12:0012:00 - 18:00

12:08 AM
@Adám Not really. I'm aware of that overflow possibility; perhaps I'll end up with -4 just to be sure. (10GB file processed sequentially takes 25min on my PC; I don't think there are many larger ones)
@MartinJaniczek Speaking of sequentially, I'm toying with the isolates.llEach. I need to give it all values explicitly, right? It has its own "scope"
 
@MartinJaniczek Correct, because each is its own APL interpreter.
@MartinJaniczek Ah, you're using this to time performance. I'm not sure if you have a particular reason you want the time as (mins,secs,ms). You probably don't even need that kind of resolution. Maybe keeping the start and end as UNIX time (20⎕DT'J') would be more suitable, then you don't need a conversion as they are already counts of seconds. You can then do 0 60⊤endt-startt to get the (mins,secs) as a result, even if the minutes exceed 60.
If you do need ms resolution, use 12 instead of 20 and use 0 60 1000⊤ to get (mins,secs,ms).
 
12:24 AM
@Adám Correct, I want to log elapsed time for a function. Thanks for the tips
No particular reason for the format, this was just the first working way I stumbled upon
 
Ah, so you're just using this for yourself, not as part of the actual code?
 
No, I wanted to keep it in the actual code
 
OK.
 
I'm aware of cmpx etc. but these didn't seem right for logging in a long-running task
 
No, you're absolutely right about that.
Also, how did you manage to pick up so much knowledge of both core APL and the utilities, in such a short time‽ I'm in awe.
 
12:30 AM
Thanks :) A few weeks worth of sank evenings and nights I guess. It's real fun so far!
> ISOLATE ERROR: All processes are in use
Ow.
I think I remember a pool of sorts being advertised in some doc, but can't recall it.
Any ideas? I guess my rightside argument to the llEach has overflown some threshold
(On ~400 items it was fine)
 
How many elements does the right argument have?
 
There's no need to start significantly more threads than you have processors.
 
I suppose 47 thousand is significantly more :)
 
Depends on your computer, of course ;-)
Each thread has an overhead, so you want to split your data into an appropriate number of chunks for the current machine. Maybe 1111⌶⍬ chunks is fitting.
 
12:38 AM
I wonder if the pool and "reuse threads" approach wouldn't be easier for me
 
Possibly. Then you need to use the "new isolate" function.
@MartinJaniczek But if Process¨data works (albeit in serial), then chunking your data and running ⊃,/Process¨IÏ chunkedData should work.
 
Hm, that isn't as complex as I imagined
 
And you know how to cut into N approximately equal sized chunks?
 
Sorry I had to go do something about my hypoglycemia. Hmm I think I saw something with the partition function but I don't recall the specifics.
if I have 98 items let's say, and i want to do 4 chunks, then ... ceil(98/4) = 25 as expected, and I need to get (1 ..0 repeated 24 times..)..repeated 4 times.., which I guess rho can help me with
Is that overcomplicated?
 
12:54 AM
No, exactly, you're on it.
@MartinJaniczek Instead of "repeated 4 times" you can just reshape to the argument length.
a⍴b↑1 is a fairly common pattern in APL.
 
yes that was in my head but I didn't write it that way. I wanted to get the first "copy" of 1,0,0,0... done and then rho it to the needed length.
alright I'm gonna try that in my workspace. Sounds like a plan :)
funny thing, just a thought. I was reading one of the lessons from this room last night, about the Stencil operator. You mentioned it can be used to get groups with a configurable step. So it maybe could also be used to split a vector into n chunks?
 
Yeah, it could, but it isn't designed for it, so it tries to centre the first group on the first element, padding with prototypical elements on the left. This takes some effort to work around.
 
Right.
(98⍴1,24⍴0)⊂⍳98 does the trick
 
Another approach is reshaping into a matrix with N rows, and then splitting that. But this has issues if the division isn't exact.
@MartinJaniczek Sure, although 1,24⍴0 can be written simpler: 25↑1
 
Man, the default behaviours of "edge cases" have really been thought through, haven't they. Like repeating the source data if reshaping "above" its length. Fits so nicely :)
Hm, 25↑1, so that uses the fact that ↑ fills "above length" with 0? Nice
 
1:03 AM
That's right. Note that 25↑'a' fills with spaces, and 25↑⊂4 2 fills with ⊂0 0s.
 
right, "default element", as it were?
 
@MartinJaniczek Prototype.
 
@Adám wat
 
@dzaima Update your interpreter.
 
ah k
 
1:11 AM
no, apl.
 
:D
 
;-)
 
What's happening there btw?
 
A bug.
18.0 had some pretty severe bugs when it was first released, and we had to eventually recommend not using it for production systems. We recently re-released it and removed that recommendation.
 
1:15 AM
I can't imagine how that code could break so badly
 
Is (leftargs∘Process)¨ equivalent to leftargs∘Process¨? My guess is no - each would bind earlier than jot?
 
@MartinJaniczek they are equivalent
 
@MartinJaniczek Yes, they are the same. All operators bind from the left (they have long left scope).
@MartinJaniczek Do you have ]boxing on?
 
@dzaima and now to redelete aplkeys.sh..
 
Actually, this should work with the bot: ⋄ ({a}∘{b})¨ ⋄ {a}∘{b}¨ ⋄ {a}∘({b}¨)
 
1:18 AM
@Adám I do but admittedly I didn't try to show how it parsed. Re above, looks like my head model of how operators parse still needs fixing :)
 
@Adám
    ¨
  ┌─┘
  ∘
┌─┴─┐
{a} {b}
    ¨
  ┌─┘
  ∘
┌─┴─┐
{a} {b}
  ∘
┌─┴─┐
{a} ¨
  ┌─┘
  {b}
 
@MartinJaniczek you just go left-to-right, and at every point you can bind anything, you do.
alternatively, to parse an operator expression, insert a closing parenthesis after every monadic operator and after every dyadicOperator arrayOrFunction, and prepend to the expression as many opening parentheses needed
 
@dzaima While technically correct, that method is error-prone because of intent bias: 1∘+⍣3 41∘+)⍣3)4((1∘+)⍣3)4
 
@Adám right, that's just a single step of a multi-step parsing process - 1) parenthesize strands; 2) separate out operator expressions; 3) parse operator expressions; 4) parse either as a train or regular expression
 
"regular expression" ⍨
 
1:26 AM
@Adám i did think about it, but didn't think it was worth editing
 
Took me an extra couple of seconds to understand.
Regular expressions don't even have an official or formal name in APL circles, though I call them "explicit".
 
I could say "function expression" or "array expression"
 
1:41 AM
That's nice too, and lends itself well to add "operator expression".
 
@dzaima Preliminary spec for identity values here. I decided to restrict it to right identities since I can't figure out how to justify left ones. That cuts out √|<≤, which seems to me to be a good thing. I also allow an identity that only works on the range of the function, which makes and = work. Largest invariant set (a subset of the range) might be more precise but I can't think of a situation where it would matter.
 
Any idea how I can debug this?
 
Also, {⍺+⍵} is a function expression, but it feels wrong to call it tacit.
 
weightings_and_answers←⊃,/leftargs∘get_weighting_and_answer¨ IÏ chunked_data
VALUE ERROR
(pointing at the get)
 
Ah, debugging multi-threaded code is not fun.
 
1:43 AM
Do you think it's an error inside the function?
 
It could be. Does it work with ¨ instead of ?
 
@Marshall I'd like ˝ to reflect the array's cell shape when the operand maps over array arguments (e.g. arithmetic or Each), except that that property isn't actually well defined. Might just hack it into the spec anyway.
 
Seems so (I have a ⎕←inside and it's happily printing)
 
@MartinJaniczek That would be problematic, as it'd try to print in a different interpreter.
 
I'll try to remove it then.
 
1:45 AM
But still, that shouldn't give a value error.
Is the function relying on a global?
 
I went over what globals it reads and gave them to it as left args. Maybe I missed some
 
@MartinJaniczek What kind of function is get_weighting_and_answer? Dfn, tradfn?
 
@Marshall it could be as "well defined" as empty reduction - just say that functions have a scalar-ness property, which ˝ can take advantage of
 
It's multi-line dfn
 
Maybe insert 0::⊂⎕DM or something at the top to get a Diagnostic Message into the result instead of erroring. Then you can have a look at that.
If you want to be really fancy, you could use ⊂⎕JSON⎕DMX to get more detail.
 
1:49 AM
@dzaima How does that work for something like -⌾⌽? I need a little more detail to understand what you mean.
 
@Adám For some reason that did nothing (when run with llEach). I still get that VALUE ERROR and nothing gets assigned.
I'm reading the doc for isolates, perhaps isolate.Config 'onerror' 'debug' etc. can help me
 
@Marshall either -⌾⌽ inherits the scalar-ness property of -, or it doesn't, it's your decision. (i'm not really saying anything novel, just mentioning a way for it to not be "not well defined")
 
@MartinJaniczek Aha, but I think that tells us that the error isn't happening inside the function. I'm suspecting that somehow fails to send its tacit operand along properly. Wild shot: Try (⊂⊂leftargs)get_weighting_and_answer¨IÏ
@MartinJaniczek You can definitely try it. If you get stuck, then I'll ask Morten (who is our isolate guy) to help you.
 
morning
 
@Razetime Unfortunately.
I've become a night owl ∘.○
 
1:57 AM
@Adám Didn't help. I'll actually cut my losses for today (it will be 3AM) and start with a fresh mind tomorrow. Bless Git for snapshotting working states :) Thanks for all the help Adam! And good night/morning/whatever everybody :)
 
@dzaima The identity element is defined entirely in terms of the input-output mapping while it sounds like scalar-ness would use the representation, so that would be worse. I could say that a function is each-y if it's identical to for some F, but the issue with that is that you might be able to find the identity of a function and not be able to use it for ˝ because you don't know whether the function is each-y or not.
 
@Adám oh nooo
 
But maybe that possibility doesn't actually come up?
 
@MartinJaniczek I'll ask Morten to contact you tomorrow. Any particular time is best?
 
@Adám I can come here 8 hours from now but I'll probably lurk here all day.
 
2:00 AM
@Marshall I guess I'm thinking in terms of dzaima/BQN, where identity is just another way to query a value (at one point I had to temporarily extend F⎊G to inherit the identity of F, and for that a simple mapping wouldn't do)
 
@MartinJaniczek I think it's most sensible for me to recheck whether it still works with the 400 elements and llEach before chunking (I suppose I messed something up), and then with 400 elements after chunking, and only then with the full data + chunking.
@MartinJaniczek Anyways, logging off.
 
○/
 
@dzaima (heh, {𝕊´⟨⟩: 0 ; 0+𝕩 ; 𝕨+𝕩})
 
2:28 AM
@Adám It looks like inlining ngn's code to run after the page loads did the trick: aplchat.js
 
!
 
2:44 AM
however, still need to find a way to make the latest version work.(somehow npm does it)
 
While a fun project, I'm still not exactly sure what the purpose is. Since others can't see the result, it doesn't really work for demonstration purposes.
 
yeah everyone needs to have it installed for it to be useful
was still fun trying to make it
 
Unless you make it put the result into the input field, and click "send"…
 
so, add evaluation to text field..
 
Actually, maybe most useful would be to allow input of APL in the text field, display an extra "eval" button next the the normal ones, which when pressed adds the result below the expression, ready for you to hit Enter if everything is as desired. If not, you can edit and hit eval again…
Hitting eval would also make sure there's 4+6 spaces to the left of the expression, and 4 spaces before each line of the result.
 
2:54 AM
that sounds very doable
 
@Adám I was thinking exactly this, to make it display like in the interpreter
 
Basically a mini-TryAPL.
In fact, it wouldn't even need to use ngn/apl. It could ship off the evaluation to TryAPL proper.
I would definitely use this for teaching purposes, to avoid making mistakes and have the bot respond to those.
 
@Adám tryapl has a js api?
 
Yes, now it does.
 
cool, where do I read up on that
 
3:00 AM
Hi, does anyone know if there is documentation for GNU APL's ∇-editor? It seems to support some commands but not all, as opposed to Dyalog. GNU APL's main docs gnu.org/software/apl/apl.html#Section-3_002e13 just state some vague things such as "...the ∇-editor commands for recalling function lines (and which are not fully supported in GNU APL)."
[See Dyalog docs help.dyalog.com/18.0/index.htm#Language/Defined Functions and Operators/TradFns/APL Line Editor.htm]
 
@Russtopia Not a whole lot of GNU APLers hang out here, though @EliasMårtenson might know. However, they do seem to monitor Stack Overflow, so you could ask there.
 
OK I wasn't sure if I should ask as a regular SO question or here. Thanks.
 
@Razetime It isn't publicly documented, but it is very simple: You submit ["",0,"","apl code"] and get back ["stuff",number,"stuff","result"]
@Razetime You should be able to glean it from tryapl.org/lib/tryapl.js beginning at line 281 or so (inside jarvisProcess). You can skip all the session manipulation. You just need to create the request.
It should probably strip away all but the first line of the text field before evaluating, as this would allow you to edit your code and re-evaluate, without having to remove the stale result.
 
3:24 AM
@Adám so, give an XMLHTTPRequest to tryapl.org with that array
 
Yeah, I think that'd work.
CMC: Given a tradfn nested representation (vector of character vectors), return the list of used (outside strings and comments) names (including system variables) that have not been localised by the header or locals lines.
E.g. given ' Foo;local;⎕ML' ' ⎕IO←0 ⋄ ⎕ML←1' ' local←↑⍳global' return '⎕IO' 'global'
 
3:53 AM
vars~locals, where vars gives all identifiers in the entire code and locals gives only the ones on the first line
 
@Bubbler lines, but sure.
 
An identifier would match... wait, does \w match Unicode letters?
 
Only if you ask it to.
Oh, you can take the name of an existing function instead, if that helps.
@Bubbler I don't think you need to specify that so carefully. You can get all used identifiers in an existing function with ⎕REFS. (If you have the code, you can always make it exist temporarily.)
 
That would be more convenient, as the regex would match control keywords too
 
0
Q: What are the supported editing commands for the GNU APL line editor (∇-editor)?

RusstopiaThe GNU APL documentation on the line editor seems to assume one already knows how to use it. I only see mention of what commands/syntax '... are not fully supported in GNU APL'. Compare with the documentation of Dyalog's APL ∇-editor, or MicroAPL. I'd be willing to prepare a patch to submit for ...

 
4:05 AM
@Adám I've tried this: jsfiddle.net/razetime/7h93kx4r/1
 
@Adám Then I think this works
(example from here)
 
@Bubbler Nice, but fails on this.
 
not getting a response yet
 
@Razetime Something doesn't match. You have open("GET", "https://tryapl.org", true) where TryAPL has open("POST", "Exec", true)
 
I'm not sure why it has "Exec" as the url
 
4:13 AM
I think ⎕R and ⎕S are missing on this page?
 
oh ok got it
 
@Razetime Because on the APL side it has to call the Exec function.
 
got it lol
 
@Bubbler Yeah, technically they are neither functions nor operators, and the last system operator isn't listed either. I suspect that page was/is auto-generated, and until recently when I complained about it, the interpreter didn't know how to self-report its system operators.
 
Apparently the regex matches ; IN and correctly gives IN but I'm not sure why
 
4:20 AM
@Bubbler Huh, it is missing a lot of names.
 
(and obviously it doesn't handle the case where ;name appears in a string)
 
@Bubbler Logged as issue 18743
 
@Bubbler You can fix that. And comments too. Also needs to handle ∆⍙ in names.
I've got a 65-byte solution with a completely different approach. (Doesn't use ⎕REFS.)
@Razetime So, did you get a proper response?
 
yes
 
4:30 AM
Cool. Looking forward.
 
I don't have time to golf it though
 
@Bubbler I think I spot multiple issues. My best so far with your approach is 84.
 
Then I give up
 
Don't sweat it. This is hard. My your-approach solution also fails on some cases.
If anyone else wants to break their teeth on this, here's a stress test:
 Foo;∆localÁ;⎕ML⍝;global
⍝;global
 ;⍙localB
 ';global'
NOTGLOBAL:global'notglobal' ⍝ notglobal
 ∆localÁ ⍙localB
 ⎕ML ⎕IO
Should return 'global' '⎕IO'
 
4:51 AM
Ok, time to test the userscript
⍳5
1 2 3 4 5
great
 
@Razetime Just missing insertion of 6 leading spaces before ⍳5
 
      3 3⍴⍳9
1 2 3
4 5 6
7 8 9
there
yup, works on chrome as well
 
Wow, that's not a lot of code.
 
yeah it's surprisingly short
it adds an ⍎ button to the side
 
(Still strange that tampermonkey doesn't detect the userscript)
 
4:59 AM
hmm I just tried it on tampermonkey
 
I you sure you don't need // @namespace http://tampermonkey.net/?
 
yeah you can remove that
 
I was just thinking that that might prompt TM to notice it.
 
I'm trying it right now and it seems to be working
 
@mwchase Hi there. Interested in APL?
 
5:02 AM
@Adám did you add it using Create new script..?
 
@Razetime I'm not saying it doesn't work, I'm saying that I distinctly remember TM noticing when I view the raw source of a US.
 
oh alright
 
Seems to be working. Amazing.
 
      kewl
VALUE ERROR: Undefined name: kewl
      kewl
      ∧
 
@Razetime Two feature requests: add accesskey="x" and focus on the input field after executing.
 
5:07 AM
ok
 
I just added field.focus(); at the very end after field.value = and that does the trick.
 
yeah that should work
 
Thought: Equip every multi-line input field on every page with a little in the top right corner… APL everywhere!
Actually, once I know how to use it and can use the accesskey, I don't need the button. And it'd anyway be hard to style so it doesn't clash with any CSS ever.
 
@Adám there's a way to position a button inside a textarea
 
But that's just a thought. For now: This is amazing, Razetime. I'm so going to use this. Once you publish it, we should mention it on the Wiki, both on the Orchards page, and under "Running APL".
 
5:12 AM
the funny thing is alt x here clashes with my keyboard layout so it outputs ⊃
 
@Razetime Wait, left Alt?
 
both alt keys
 
Huh, doesn't happen for me on Firefox.
 
the mac Alt/Option setup messes with some shortcuts
 
It should be Ctrl+Alt+x on Mac.
 
5:16 AM
ah yes
that works
@Adám publish meaning put it on greasyfork?
 
@Razetime Or just on GitHub.
 
it's on github, so I'll just publish to greasyfork for a single click install
 
Wait, there's something wrong with your script.
 
ok what's happening
 
TM detects them when one clicks Raw, even from Gists. But not yours.
 
5:22 AM
any console messages?
hmm I'll see
yeah that is strange
@Adám try it now
 
@Razetime Yes!
What did it?
 
needs a .user.js extension
 
      ]state
Operating system is Debian GNU/Linux 10 (buster)
APL interpreter is 64-bit Dyalog 18.0.38756.0 Unicode
Server is Jarvis 1.7.1
TryAPL version is 3
Expressions may run for up to 10 seconds
Workspace used: 2 / 512 kilobytes
This is so much fun.
 
I made a small adjustment
 
And I noticed a bug in TryAPL in the above.
 
5:37 AM
it disables the button till the request is recieved
so now it shouldn't be spammable
 
Good idea. We do the same on TryAPL.
Now, if the script lived in a GitHub repo (or on Greasyfork) it would auto-update…
 
cool
a github repo with a single file?
 
Sure, or a repo with all your userscripts.
 
(single-file repo is perfectly fine)
 
huh alright
 
5:43 AM
> Workspace used: 2 / 512 kilobytes
really?
 
Really that 2 kB are missing or that we give you 512 kB?
 
Both
 
      ns←⎕NS⍬
      ⎕SIZE'ns'
2032
 
though for the latter I probably shouldn't use TryAPL for larger data
 
So you think it is too little?
 
5:46 AM
Not much of a problem, just surprised at the number
Probably I'm too fed up with Gitpod giving me 12GB RAM for free
 
OK, but TryAPL isn't for any sort of serious work. If you're using multiple arrays with tens of thousands of complex numbers each, then you're probably ready to move to a full APL system.
 
Yeah, I guess so
 
Another reason to keep it low is that we don't keep your state on the server. Rather we send it back to the client between every statement you execute. So if your state is too large, you'll begin noticing a slowdown, and see heavy data usage.
 
      {⎕IO←0⋄⎕UCS(16⊥⊢)⌺(⍪2 2)⊢⍵⍳⍨⎕D,⎕C⎕A} '7468697320697320612068657820737472696e67'
this is a hex string
Ooh, perfect
 
5:58 AM
the good thing is that this doesn't interfere with the bot either
 
Yeah. But the best is the preview, imo.
 
      ⋄ +/ 1 2 3
6
 
      ⊂⊂⍬
┌──┐
│┌┐│
││││
│└┘│
└──┘
 
@Bubbler You don't need the diamond. Old habit?
 
QAing
 
6:01 AM
@Razetime Future idea: select expression (on any website) and press some key combo to copy APL result to clipboard.
This would help in composing emails in a web client (say Gmail) and allow you to use APL in spreadsheets like Google Docs…
 
that shouldn't be hard
 
APL Wiki could do with an "Enter APL expression here" input field…
 
cool, who maintains APL wiki?
 
@Adám There must be some indicator for "in progress" and "complete" for that
 
ok so context menu stuff is in a weird state on both chrome and ff
 
6:06 AM
@Razetime Mostly me, these days.
@Razetime Yeah, nobody seems to really care about that.
@Bubbler cursor:progress until done.
 
shouldn't be hard to add an execute box near the search bar
@Adám ok, so I'm thinking of a hidden button with the same Alt-X keybind
 
@Razetime Yeah. That's how I do various shortcuts on APLcart.
 
6:31 AM
@Razetime I'm not sure it needs to be on every page. The front page is probably enough.
 
cool
I'll ttyl
 
○/
 
 
2 hours later…
8:30 AM
@Adám I just discovered (slow creature that I am) that TryAPL now lets you run code from Jupyter Notebooks!
So, with minor tweaks, undoing my splits for multi-line dfns, and removing )save and )copy, I can run my MENACE code in TryAPL
 
@RomillyCocking Yes. There are still limitations in the support (well, there always will be), but our plan is to add more functionality over time. E.g. we'd like to be able to draw graphs and render HTML.
 
Amazing
 
@RomillyCocking TryAPL supports multi-line dfns.
In fact, it supports tradfns too now.
 
Really outstanding work. I have a flood of notebooks planned, some of which you might want to add to the site.
 
It just doesn't have an easy input method for them (yet, we do have that planned!) but when they are inside notebooks, it should just work.
 
8:34 AM
The online docs are ood:
Limitations
Function and Operator definitions must be single-line and either tacit or dfns.
 
Yeah, that's for sanity due to the lack of an input method. Try this!
The plan is that Alt+Enter will insert a line break and tab indent rather than immediately executing, and then when your "block" is ready, you press Enter to define the whole thing.
 
So the *only* things I need to fix in the MENACE notebooks are
removing )save and )load, and
finding some way to chain to the next notebook without losing session data.
*)copy, not )load
 
@RomillyCocking That shouldn't be a problem. Your notebook can link to https://tryapl.org/?notebook=url_of_next_in_series
 
Wow. I'm hoping to get chapter 8 finished tomorrow, at which point the series is complete.

I'll ping you here when it is. If you have time to take a look, I'd love feedback and your opinion as to whether it's worth doing a PR to add the notebooks to the site.
 
Well, we can't exactly accept PRs because it is a private repo, but feel free to email tryapl@dyalog.com with such suggestions.
Hm, now I think of it, notebooks should probably begin with a clean slate by default, and require ?clear=no to prevent that.
 
8:53 AM
I thought RP suggested PRs in one of the Dyalog videos. Sorry if I got the wrong end of the stick. I'll email when the notebooks are cooked :)
 
Ah, PRs against our Jupyter Notebook collection. However, these are not automatically shown on TryAPL.
MENACE sounds like it would fit into the "Further Explorations" category, though.
 
 
2 hours later…
10:35 AM
@Adám I've found something. When I )load isolate, stuff generally works. When I 'IÏ'⎕CY'isolate', it gives me the errors.
 
@MartinJaniczek Oh, of course. You should copy all of the workspace in with ⎕CY'isolate'
 
Yeah I was just battling with being unable to do )load in a tradfn, and ⎕LOAD doing weird things (stopping execution of the rest of fn?). WIll try ⎕CY'isolate'
Also, leftargs∘process IÏ data doesn't work and {leftargs process ⍵} IÏ data does
 
Right, I just realised the other day that it must be awfully confusing that "load" is a destructive action (it removes all your stuff and replaces it with something else).
 
@MartinJaniczek (⍎VALUE ERROR)
@Adám Oh yes. Somebody told me about ⎕CY after I complained about )load :D
But it's me being a CS person taking their assumptions to APL from other languages
module systems and whatnot
"oh this must be like import elsewhere". nope
 
It isn't APL terminology per se, but rather just ancient terminology. You load a cassette into a tape player, right?
And that "obviously" implies removing the existing tape.
 
10:42 AM
@MartinJaniczek OK 'works' was a strong word. I can get rho of the result but trying to print the result results in FUTURE ERROR: VALUE ERROR.
@Adám Makes sense when you put it that way!
 
(Yeah, and if you want something from that tape on this tape, then you've got to copy it.)
 
@MartinJaniczek (I've tried to go back to a working state, and go in steps: GoSerial, GoChunkedSerial, GoParallel, GoChunkedParallel. I'm in GoParallel right now.)
 
Similarly, APL uses "off" instead of "exit" because in the old days, there was no OS you'd quit to. Rather, you log off the mainframe, or maybe even turn it off altogether.
I'll ask Morten to come have a look when I see him online. It is his partner's birthday today, so we'll see when he appears…
 
@Adám No worries, no rush!
It's all just an optimization anyways. The program works, this is just an experiment in how easy it would be to parallelize.
 
@MartinJaniczek It should be very easy. We're probably missing something fundamental. Oh, btw, did you try to compute something trivial in parallel?
 
10:52 AM
@Adám The future error (when trying to print the result) happens even if the process function is {(≢⍺) (≢⍵)}
Oh but it's a different one: `FUTURE ERROR: 86: COMMUNICATIONS FAILURE 1119 ERR_CLOSED : Socket Closed while
receiving:`
I'll try restarting my RIDE.
 
It uses network communications. Did you give APL permission to use the local network?
 
I'm not sure how to do that. I don't have any "Little Snitch" or other firewalls that I'd know of (I'm on a Linux machine)
Stuff generally doesn't ask me for permissions like a Windows box would, and generally works
 
Hm, so programs can use the network by default?
 
Yes
After restarting RIDE and Dyalog process itself I'm back to
x
FUTURE ERROR: 6: VALUE ERROR: {leftargs process ⍵}: iEvaluate[13] (,⍕(⍕rc),': ',
(0⊃res),{(⍵∨.≠' ')/': ',⍵}1⊃res,'' '')iSpace.qsignal rc
      x
      ∧
I'm doing:
process←{(≢⍺) (≢⍵)}
⎕CY 'isolate'
data←↓(⍉↑lengths paddings readstarts)
leftargs←lines_file allfields wave namespace ⍝ needed for isolates: they don't share scope
x←{leftargs process ⍵} IÏ data
I'll try just copypasting some of the delay examples from the isolates doc PDF
 
@MartinJaniczek Btw, depending on the size of data, removing the parenthesis can give you a significant speed-up.
 
10:58 AM
@Adám I just noticed the parentheses when copypasting this here :D
Could be removed yeah...
But how does it speed up the program? Fusion of functions? idiom recognition by the interpreter?
 
Yes. ↓⍉↑ becomes a single token and doesn't actually do the three steps.
 
@Adám Lovely
      ⎕CY'isolate'
      ⎕DL IÏ 3 3 3 3
3.003719 3.003125 3.003297 3.00356
OK at least something works.
Is it possible that doing the ⎕CY'isolate' inside the tradfn each time I run it, might be the culprit?
(Spawning multiple servers and such)
 
The copying itself shouldn't matter.
As long as you're not doing that copy in a function that is in the middle of being parallel-processed.
 
No :) Not inside process.
Might file IO (⎕MAP) inside the parallelized fn be problematic?
Inside process I need to read a chunk of a file, ⎕JSON it and process that
 
@MartinJaniczek I don't know. I wouldn't think so.
@MartinJaniczek Don't get offended, but does process return a result? It is a tradfn, right?
 
11:07 AM
process is a multi-line dfn
well, right now it's {1} and it still doesn't work
 
:-(
 
I can't remember what exactly did I do last night that it worked on the small-sized argument :))
x←{leftargs process ⍵} IÏ data ⍝ FUTURE ERROR: 6: VALUE ERROR (when printing x)
x←{process ⍵} IÏ data ⍝ FUTURE ERROR: 6: VALUE ERROR (when printing x)
x←process IÏ data ⍝ 1 1 1 1 1 1 1 1 1 1 (when printing x)
Maybe dfns aren't allowed with isolates?
x←leftargs∘process IÏ data ⍝ ⍎VALUE ERROR (immediately)
x←(1∘process) IÏ data ⍝ 1 1 1 1 1 1 1 1 1 1 (when printing x)
lines_file←'just a string'
x←(lines_file∘process) IÏ data ⍝ ⍎VALUE ERROR (immediately)
x←('abc'∘process) IÏ data ⍝ ⍎VALUE ERROR (immediately)
...strings nor single characters are allowed, seems to me.
⍝ minimal example
⎕CY'isolate'
⎕←(42∘{1}) IÏ 1 2 3 4 5 ⍝ works
⎕←('a'∘{1}) IÏ 1 2 3 4 5 ⍝ doesn't
 
11:44 AM
@MartinJaniczek I would guess that's due to isolate not parsing derived operators and doing something like stringifying. e.g. with boxing off, entering both 4∘+ and '4'∘+ will print an equal representation (minus whitespace); also see that ('4'∘+) IÏ 1 2 works
(i.e. you definitely want the operand of to be a complete function, not some derivation, even if that means just wrapping it in {(…) ⍵})
 
@dzaima Hmm, yes that helps
{'a' {1} ⍵} IÏ 1 2 3 4 5
 
this makes Dyalog(s) use all the processor forever. ¯\_(ツ)_/¯
 
Hm, yeah. But then I have to make my multi-line dfn into a one-line dfn, so that I can inline it into the {...} IÏ 1 2 3 4 5`? Or maybe tradfn would work?
 
@dzaima ah, i assumed it'd make some effort to copy things over, but it does not. And f in isolates context happens to be the function itself, so it's just infinite recursion
 
00:00 - 12:0012:00 - 18:00

« first day (1435 days earlier)      last day (1235 days later) »