<tabemann>
I just wrote a test which runs life without displaying anything other than a cycle count
<tabemann>
and it's still slowish
<tabemann>
this is with a 160x160 world
<tabemann>
it runs much faster with a 80x80 world
<KipIngram>
Does it redraw the whole world each frame?
<tabemann>
when it's running in display mode, yes
<KipIngram>
So even when you display just the cycle count, you're still computing the new worlds? Just not sending them to the display?
<KipIngram>
What are your turn on/turn off rules?
<KipIngram>
Do diagonal neighbors count, or just rectangular ones?
<KipIngram>
I'm just wondering if there might be a way to do the bitmap update using byte-size calculations, maybe with some tables.
<dave0>
tabemann: if you really wanted to be perverse, you could use SIMD :-)
<dave0>
count the number of neighbors in parallel
<dave0>
:-)
<KipIngram>
It just feels like a "ripe problem" for some parallel exploits.
<KipIngram>
If you got 160 bytes per row, then above and below neighbors are always exactly 20 bytes away, in the same bit location.
<KipIngram>
The left and right neighbor calculations could likely be rolled into a 256-byte table.
<KipIngram>
It would be the LSB and the MSB bits that would be the most noxious - you'd actually have to look at those neighbors, and would only get one bit's worth of information from each look.
<KipIngram>
And I guess there would be 3200 of those.
<dave0>
oh oh you're representing the grid as an array of bits?
<KipIngram>
I don't know - I'm presuming.
<KipIngram>
He hasn't told us.
<dave0>
ah okay
<dave0>
using bits would definately keep things small.. you could have massive boards
<KipIngram>
Well, he said earlier each cell was a pixel, and that he was considering going to 2 pixels by 2 pixels to make them bigger.
<KipIngram>
So I assume right now it's a bit-built thing.
<KipIngram>
But you could get the horizontal update for all six internal bits of a byte from a table lookup. And then another table lookup could get the above contribution, and another the below contribution.
<KipIngram>
So that would just leave the LSB and MSB of every byte, the left and right contributions.
<Zarutian_HTC>
to improve locality one could use a hilbert curve layout of the board in memory
<Zarutian_HTC>
but that aint as easy to calculate locations relative to
<Zarutian_HTC>
as say the usual stride method of progressive 'scanline' layout usually used
mark4 has quit [Quit: Leaving]
mark4 has joined #forth
dave0 has quit [Quit: dave's not here]
<KipIngram>
I'd have to look that up. I vaguely knnow what Hilber curves are, but certainly don't have them readily at mind.
<KipIngram>
Hilbert
<KipIngram>
Space filling, right?
<KipIngram>
What's the exact rule?
<KipIngram>
Is it an even/odd thing? A majority? Feels like even/odd would work better.
<KipIngram>
Ah, Wikipedia says all eight neighbors count. That's much more involved, I think.
<KipIngram>
At least that F7 DISCO board supports some non-windows toolchains. It really steams me up when people put out cool little products but only offer Windows support.
<KipIngram>
It's like... OSist.
<KipIngram>
I hate seeing Microsoft being given further advntages.
boru` has joined #forth
boru has quit [Disconnected by services]
boru` is now known as boru
<KipIngram>
There is some interesting information here:
<KipIngram>
Hey, sometime a year ago or so someone here had a "rotating PAD" implementation.
<KipIngram>
PAD moved around a circular buffer, so you didn't just immediately overwrite its previous content.
<KipIngram>
It would only get overwritten when you used it enough to wrap bye buffer around.
<KipIngram>
Sound familiar to anyone?
<KipIngram>
I'm thinking of doing something similar to provide a reasonably clean way to work with strings.
<KipIngram>
I'd have pointers into the circular buffer and manipulate them on the stack.
<tabemann>
back
<KipIngram>
Ah, we've been talking behind your back - you may find a scrollback interesting if you've got it.
<tabemann>
oh, and when I'm just displaying the cycle count, I am computing new worlds
<KipIngram>
I figured you probably were.
<KipIngram>
Do you wrap your edges to one another?
<tabemann>
yes
<tabemann>
and yes, I'm treating the grid as an array of bits
<KipIngram>
Ok, so you're basically simulating a donut. Torroidl geometry.
<KipIngram>
Toroidal
<tabemann>
it would be faster if I treated it as a grid of bytes
<tabemann>
but then it would use eight times as much memory
<KipIngram>
Right. I posted a link to a discussion that had some other places to look for fast ways to do it.
<tabemann>
the fast way to implement it is hashlife
<KipIngram>
Oh... hashlife looks interesting.
<KipIngram>
Are you going to try to use a Life board to do any computing?
<KipIngram>
I saw a game of life once running a game of life.
<tabemann>
interesting
<tabemann>
nah, I can't really use life on here to do anything really interesting, as even though it's an F7 it's still too limited by speed and memory
<KipIngram>
Well, it's purely an academic thing to do anyway.
<KipIngram>
It's not the way anyone would ever do anything, but it's... "cute."
Keshl has quit [Read error: Connection reset by peer]
Zarutian_HTC has quit [Read error: Connection reset by peer]
Zarutian_HTC has joined #forth
Keshl has joined #forth
sts-q has quit [Ping timeout: 268 seconds]
sts-q has joined #forth
dave0 has joined #forth
<dave0>
maw
<KipIngram>
Hi dave0.
gravicappa has joined #forth
<dave0>
maw KipIngram !
spoofer has quit [Remote host closed the connection]
spoofer has joined #forth
<siraben>
remexre: it was clear I would need something more nuanced than final states for Forth program equivalence
<siraben>
so I should look into bisimulation
<remexre>
huh, where'd you get stuck?
<siraben>
I wasn't even able to show `p skip` is equivalent to `p`
<remexre>
`p skip q` should always be equivalent to `p q` though, right?
<remexre>
like that one ought to be "showable"
<remexre>
easily provable*
<siraben>
actually I was able to show `Theorem simulates_skip2 : forall p, simulates <{ skip p }> p.` and `Theorem simulates_skip : forall p, simulates p <{ skip p }>.`
<siraben>
`Definition simulates (p q : com) := ∀ (st st' : stack) (p' : com), p / st --> p' / st' -> ∃ q', q / st -->* q' / st'.`
<siraben>
(ok this is technically wrong because the use of star suggests q could take zero steps and you have an infinite stuttering problem)
<siraben>
but that's the idea, "if p can take a step then q can take zero or more steps to end up in the same state as p"
<siraben>
yeah I'd probably have to read CPDT to know more about coinduction heh
<siraben>
Let me try inhabiting that
<siraben>
remexre: oh crap, you are right
<siraben>
`intros p st st' p' H. inversion H; subst. eexists; auto. inversion H1.` proves it
<siraben>
uh oh
<remexre>
I think you might want a length-indexed version of -->*
<siraben>
yeah, slide 66 of the xavierleroy presentation "Find a measureM(s) :natover source terms that decreases strictly whena stuttering step is taken. Then show:"
<siraben>
bah, then something I should do only after finals
<siraben>
is that what you meant by length indexed?
<remexre>
and say something like, forall n, exists m, (p / st -->*# p / st') n -> (q / st -->*# q / st') m
<remexre>
where (a -->*# b) n = "exactly n steps of (a --> b)"
<siraben>
also exists q?
<siraben>
I mean q'
<remexre>
er yeah, I accidentally dropped the ' on p' and q'
<remexre>
really you just need, forall n, (p / st -->*# p' / st') -> exists q', (q / st -->* q' / st')
<remexre>
but if you're making -->*# you could just define (a -->* b) := (exists n, (a -->*# b) n)
<siraben>
Right.
<remexre>
oh, this is slide 30 of ~djg's presentation, I think
<remexre>
at least, I think that's what the mu is?
<remexre>
wait, no
<remexre>
shouldn't need be the same number of steps on each side
<remexre>
oh, mu is a trace, I think
<siraben>
remexre: mu is a label of a transition system
<remexre>
ah
proteus-guy has quit [Ping timeout: 268 seconds]
proteus-guy has joined #forth
andrei-n has joined #forth
tech_exorcist has joined #forth
cheater2 has quit [Ping timeout: 240 seconds]
cheater2 has joined #forth
Zarutian_HTC has quit [Remote host closed the connection]
<KipIngram>
I find this to be a very interesting article:
<KipIngram>
I read that years ago, and dug it out this morning because my memory banks told me it was in the same neighborhood with this numeric formatting / byte code processing. Not a precise match, but some of the same ideas.
<KipIngram>
Anyway, I just feel pretty strongly that there's something to be gained by having a solid, tight implementation of regex methods in the system. Not sure exactly how it fits yet.
dave0 has quit [Quit: dave's not here]
tech_exorcist has quit [Remote host closed the connection]
tech_exorcist has joined #forth
tech_exorcist has quit [Remote host closed the connection]
tech_exorcist has joined #forth
<KipIngram>
Very interesting stuff in that article on "multi-threaded VMs."
<KipIngram>
It discusses implementing regex handlers as non-determinate and determinate finite automata, and it seems very likely to me that a setup for converting a regex directly into a Forth NFA or DFA could be worked up.
<KipIngram>
Regex in, definition out. Start it up and give it an array for storing thread states and let it rip.
<KipIngram>
I think what you do is basically launch a thread in the start stte for each character, then all those threads operate in lockstep as the new characters come in.
<KipIngram>
One will succeed in reaching the match state or not.
<KipIngram>
Along the way you can store in the state what substring of the text matches each parenthesized expression in the regex.
tech_exorcist has quit [Ping timeout: 268 seconds]
Vedran has quit [Read error: Connection reset by peer]
Vedran has joined #forth
LispSporks has joined #forth
spoofer has quit [Ping timeout: 240 seconds]
LispSporks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gravicappa has quit [Ping timeout: 240 seconds]
tech_exorcist has joined #forth
kiedtl has left #forth ["// unreachable code"]
neuro_sys has joined #forth
spoofer has joined #forth
zolk3ri has joined #forth
andrei-n has quit [Quit: Leaving]
neuro_sys has quit [Remote host closed the connection]
tech_exorcist has quit [Ping timeout: 268 seconds]
LispSporks has joined #forth
LispSporks has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]