Allison Parrish is a user on You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.
Allison Parrish @aparrish

results of asking my divination students to write a javascript/p5js function that generates random numbers (without using built-ins like random() or Math.random()) top one is Math.random() for reference. (a few students cheated and used the noise() function in p5js :smirk:)

· Web · 20 · 45

this exercise was followed by a discussion of random number generation techniques and how you can "shape" random numbers to produce experiences with different affordances and affects

<p><a href="">@<span>aparrish</span></a> that's so cool!</p>
<p><a href="">@<span>aparrish</span></a> that looks like a fun exercise :)</p>
<p><a href="">@<span>enkiv2</span></a> <a href="">@<span>aparrish</span></a> Now I'm fantasizing about a CS class titled "Divination".</p>
<p><a href="">@<span>aparrish</span></a> <a href="">@<span>enkiv2</span></a> Oh wow. Everything I might have hoped for. <a href=""><span class="invisible">http://</span><span class=""></span><span class="invisible"></span></a></p>

@FrameOfStack @aparrish
Are you familiar with the Illuminatus! trilogy? In that book, there is a computer that performs an i-ching reading, and then searches for recent news articles that correspond to it. That kind of arbitrary automated filtering is interesting & maybe useful.
(I mean, we do it ourselves, but automating it is interesting in other ways)

<p><span class="h-card"><a href="">@aparrish</a></span> <span class="h-card"><a href="">@enkiv2</a></span> I haven't read it, but "Focault's Pendulum" has a similar theme - a computer which generates arbitrary connections, but which they start listening to. They know it is random, but find it fun to look for connections; they start taking it seriously without exactly noticing that they have. Effectively, the humans do the filtering; no automatic search needed.</p>

@FrameOfStack @aparrish
Foucault's Pendulum is a book about apophenia, & so it actually goes further. One character blames illness on the computer's random number generator shuffling hebrew letters and thus fuzzing the universe.

<p><a href="">@<span>aparrish</span></a> can you share any of the implementations? I'm very curious how someone with a fresh mindset might approach the task.</p>
<p><a href="">@<span>aparrish</span></a> Love it!</p>
<p><a href="">@<span>aparrish</span></a> A few of those look like they used Randall Munroe's RNG algorithm. <a href=""><span class="invisible">https://</span><span class=""></span><span class="invisible"></span></a></p>

@aparrish wow, this is an awesome exercise. Must have been eye-opening for the students.
We need more whoa-inducing moments like this in introductory programming classes.

I'll remember this example, thank you.

<p><span class="h-card"><a href="">@aparrish</a></span> that's incredible. I'd love to see the implementations they tried</p>
<p><a href="">@<span>aparrish</span></a> This is so cool! Also, I'm so glad you're here, I am an avid fan of all the word2vec art/experiments you were posting on Twitter.</p>
<p><a href="">@<span>aparrish</span></a> No one used noise from the webcam ? :nerd:</p>

@charly I was hoping someone would make that connection! one student did eventually start using one source of entropy: the number of milliseconds since the program started running (millis() in p5js)

Cool! Some of those look waaay too linear. But even RNGs that some people consider decent (like Mersenne Twister) will be highly linear when looked at through higher dimensions
<p><span class="h-card"><a href="">@<span>aparrish</span></a></span> some of them seem to have a clearly repeating pattern</p>
<p><span class="h-card"><a href="">@<span>aparrish</span></a></span> Randomness is hard...</p>
<p><span class="h-card"><a href="">@<span>aparrish</span></a></span> these look slick af! Also, random numbers are hard LOL</p>