@Adám as far as i understand, without making the entire Dyalog interpreter thread-safe, that'd require something like copying the entire workspace to each thread though
@Adám they're not happening at the same time, which is extremely important (i.e. you don't have to worry about cache, refcount changes on an object at the same time from multiple threads, etc)
this is writing "random" data inside immutable arrays. That absolutely doesn't work if another thread could, at the same time, be reading that.
@Adám (and with & → ∥ there, the result could technically be any number from 1 to 1000, assuming a+←1 is equivalent enough to a←a+1)
On 3682 x 4172 items: serial 12s, chunked serial 12s, parallel errors out (all processes in use), chunked parallel 18s. So the threshold is apparently somewhere higher. Will try 47622 x 8739 items now (that took around 20min serial last time I checked). Don't have anything in between :)
Serial: 4m 40s, must have remembered wrong. Chunked parallel still running (started it a minute ago), but in htop I only see one core pinned to 100%, which is suspicious
Ah, two cores now. Weird
Three cores and then "Interpreter exited with code 137" or something like that :D
I'll try NGET instead of MAP, but other than that I dunno. If going down the chunking rabbit hole, I might as well read multiple lines instead of just one ... move more and more stuff from the "inner" process fn to the process_chunk one...
data is a 47622 x 3 matrix of integers (line length, line start offset, line padding to 8byte boundary)
leftargs: string, 8379 (the other dimension) strings, string, string
I've tried MAXWS=14G and now it's kinda hovering around 3-4 cores and eats all of that memory. Didn't crash so far.
Makes me wonder whether Dyalog APL somehow reacts to malloc errors and goes to do some memory-reducing CPU work for a while instead of whatever just failed, or what :)
@MartinJaniczek Dyalog does have garbage collection, but unless you're using namespaces, it should never really do anything. More likely would be unmapping mapped parts of the file or something
yes, although I'm not old enough to know what ' According to the old Datasette manual the casette stores a sequence of 1000, 2000 and 3000Hz audio samples to encode the digits 0, 1 and 2 respectively. ' means
The Commodore 1530 (C2N) Datasette, later also Datassette (a portmanteau of data and cassette), is Commodore's dedicated magnetic tape data storage device. Using compact cassettes as the storage medium, it provides inexpensive storage to Commodore's 8-bit home/personal computers, notably the PET, VIC-20, and C64. A physically similar model, Commodore 1531, was made for the Commodore 16 and Plus/4 series computers.
== Features ==
Typical compact cassette interfaces of the late 1970s use a small controller in the computer to convert digital data to and from analog tones. The interface is t...