@coltim Finally found my writeup on how to do just that. I was going to use it as an example of how often you can do pretty well without needing vector instructions. I think that technique is faster than Cordes' AVX2+BMI2.
@Marshall I'll have to look into it! The fastest I've seen was from the Polychroniou code; loading from a lookup table of 256 uint64_t's, building the permutevar8x32 shuffle control by converting from i8s to i32s
@coltim That sounds pretty similar to what I did in Dyalog, although I only ever did it with the SSSE3 shuffle (that method was better for 1- and 2-byte data). I think I used the index buffer for 4- and 8-byte data; permutevar8x32 could be faster for 4-byte.
Lemire also has some work on set bit decoding (Where in Dyalog), but his methods use a huge table. That isn't good for an interpreter because you might have relatively small calls to Where or Replicate mixed in with other computation.
The Matchbox Educable Noughts and Crosses Engine (sometimes called the Machine Educable Noughts and Crosses Engine) or MENACE was an analogue computer made from 304 matchboxes designed and built by Donald Michie in 1961. It was designed to play human opponents in games of noughts and crosses by returning a move for any given state of play and to refine its strategy through reinforcement learning.
Michie did not have a computer readily available, so he worked around this restriction by building it out of matchboxes. The matchboxes used by Michie each represented a single possible layout of a Noughts...
I don't know much linalg but I wonder if there's a way of representing translations and rotations as matrices and doing a cumulative matrix product like my part 1
Yeah, and I don't think there is a way of representing translations as multiplication by a complex number right? At least, not one that you can work out without knowing the result already
@rak1507 i'm collecting the best solutions from each day. today i'll throw away mine in favour of something based on yours, it's shorter and more arrayful.
@rak1507 most of the code is trivial transformations of yours. the last line is emulating the forward scan ⊥\ through the good old pattern 1↓⊃{⍵, ... ⊃⌽⍵}/(⌽vector),⊂initial
N (the number of all cells) is used to indicate missing neighbours and there's a fake cell at index N which has no neighbours and always remains unoccupied.
@rak1507 for those i used the grouping method i mentioned yesterday - i group the cells by their x, y, x+y, and x-y, then sort the groups, then for each group i connect the consecutive positions
@brgal We're not entirely sure yet. Probably just a website banner. I've drafted a code golf competition, but it is close to existing ones, so has the risk of being closed as duplicate. Roger Hui is going to be part of some "panel discussion" I think.
@code_report Yes, it is the <IL> (Insert Line) command, but you have to set a key stroke for it in the settings.
@RomillyCocking Looking very good already. I notice you begin with "It’s not an APL tutorial." but nevertheless, you introduce primitives and terminologies as they come up. Sounds like a tutorial to me…