Using RIDE, what's the proper way to make a namespace that I can enter code into? Currently I'm going )ed ∘#.foo and then changing interface to namespace. What's the correct way?
Don't forget to join our live webinar - Acquiring online data using HttpCommand, ⎕JSON and ⎕XML - on Thursday 21 June at 15:00 UTC with Morten Kromberg
https://dyalog.tv/Webinar
@Adám it's not as low as ÷3, maybe ÷2 ... ÷2.5, but still unexpected
@Adám I'm pretty sure Dyalog's impl of ⍳ already has the hell optimised out of it. But from my point of view your memory manager sucks as it was designed for a different age - before virtual memory, caches, and prefetching existed.
@Zacharý right, 0≤i<n, just like the result of % (modulo)
@Zacharý division and mod are terribly slow compared to addition and multiplication - that may be a bit surprising to you and me, but it's probably just obvious to those who spend their lifetimes squeezing performance out of cpus...
Dyalog are visiting Japan in July where, amongst other events, Morten is presenting at Chuo University in Tokyo https://twitter.com/Chuo_PR/status/1008589161429946368
another surprising fact: I thought I might be able to speed up some primitives, like the k equivalents of transpose and iota, by batch-allocating N lists (i.e. a k matrix) before filling them up
it turns out that's slower because when allocating I have to initialise the headers, and I end up touching memory in a bad interleaved jumpy pattern - first the headers, then the data
if the order is header0, data0, header1, data1, etc, prefetching takes effect and it's faster
@dzaima clang -03 definitely doesn't - in one case it generates instructions like cqo and idiv, in the other - a very tight loop with only inc, add, and mov
@Zacharý well, at least in my example, i stays in-bounds always and that optimization would be perfectly valid. I'd expect compilers to work very hard to get division/modulo out of the code
@Adám I didn't get around to trying using emacs for )ed until now. RIDE_EDITOR needs to be set as an environment variable in the shell (at first I thought it went along with the things like MAXWS until I realised it'd make little sense for it to be there). The temporary file it opens gets given a .dyalog extension which makes it trivial to autoload my input mode. For an undocumented feature it works really well