<!-- <html>
<head>
<meta http-equiv="refresh" content="0;url=https://itunes.apple.com/us/app/fotoda/id1291121692?mt=8" />
<title>FotoDa Is Awesome</title>
</head>
<body>
actionsnippet will be down for a bit checkout FotoDa in the meantime
</body>
</html> -->
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>ActionSnippet</title>
	<atom:link href="http://actionsnippet.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>https://actionsnippet.com</link>
	<description>paste it</description>
	<pubDate>Thu, 20 Feb 2025 20:24:01 +0000</pubDate>
	
	<language>en</language>
			<item>
		<title>Blobby WebGL</title>
		<link>https://actionsnippet.com/?p=3359</link>
		<comments>https://actionsnippet.com/?p=3359#comments</comments>
		<pubDate>Mon, 11 Nov 2024 08:33:44 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[3D]]></category>

		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[Math]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[graphics algorithms]]></category>

		<category><![CDATA[html5]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[matrix]]></category>

		<category><![CDATA[misc]]></category>

		<category><![CDATA[motion]]></category>

		<category><![CDATA[webgl]]></category>

		<guid isPermaLink="false">https://actionsnippet.com/?p=3359</guid>
		<description><![CDATA[Still speed-coding shorts for youtube these last few months&#8230; - move your mouse over the codepen below - click and hold to zoom out  
https://www.youtube.com/@zevanrosser/shorts

  See the Pen 
  VLIBlob by Zevan Rosser (@ZevanRosser)
  on CodePen.

]]></description>
			<content:encoded><![CDATA[<p>Still speed-coding shorts for youtube these last few months&#8230; - move your mouse over the codepen below - click and hold to zoom out <img src='https://actionsnippet.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="https://www.youtube.com/@zevanrosser/shorts">https://www.youtube.com/@zevanrosser/shorts</a></p>
<p><iframe height="583.8203125" style="width: 100%;" scrolling="no" title="VLIBlob" src="https://codepen.io/ZevanRosser/embed/vYqozGy?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"><br />
  See the Pen <a href="https://codepen.io/ZevanRosser/pen/vYqozGy"><br />
  VLIBlob</a> by Zevan Rosser (<a href="https://codepen.io/ZevanRosser">@ZevanRosser</a>)<br />
  on <a href="https://codepen.io">CodePen</a>.<br />
</iframe></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3359</wfw:commentRss>
		</item>
		<item>
		<title>Recent Shorts</title>
		<link>https://actionsnippet.com/?p=3356</link>
		<comments>https://actionsnippet.com/?p=3356#comments</comments>
		<pubDate>Sat, 27 Jul 2024 14:40:05 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[Math]]></category>

		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[graphics algorithms]]></category>

		<category><![CDATA[html5]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[misc]]></category>

		<category><![CDATA[motion]]></category>

		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">https://actionsnippet.com/?p=3356</guid>
		<description><![CDATA[Been speed coding some new stuff and showcasing some old stuff as shorts on youtube - here is a recent one:

  See the Pen 
  Untitled by Zevan Rosser (@ZevanRosser)
  on CodePen.

Check out the rest here: https://www.youtube.com/@shapevent/shorts
]]></description>
			<content:encoded><![CDATA[<p>Been speed coding some new stuff and showcasing some old stuff as shorts on youtube - here is a recent one:</p>
<p><iframe height="568.6484375" style="width: 100%;" scrolling="no" title="Untitled" src="https://codepen.io/ZevanRosser/embed/PorbNEJ?default-tab=js%2Cresult" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"><br />
  See the Pen <a href="https://codepen.io/ZevanRosser/pen/PorbNEJ"><br />
  Untitled</a> by Zevan Rosser (<a href="https://codepen.io/ZevanRosser">@ZevanRosser</a>)<br />
  on <a href="https://codepen.io">CodePen</a>.<br />
</iframe></p>
<p>Check out the rest here: <a href="https://www.youtube.com/@shapevent/shorts" target="_blank">https://www.youtube.com/@shapevent/shorts</a></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3356</wfw:commentRss>
		</item>
		<item>
		<title>Updates Shorts and Rbn&#8230; snippet.zone zapp.codes etc&#8230;</title>
		<link>https://actionsnippet.com/?p=3354</link>
		<comments>https://actionsnippet.com/?p=3354#comments</comments>
		<pubDate>Thu, 27 Jun 2024 12:27:19 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[color]]></category>

		<category><![CDATA[es6]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[graphics algorithms]]></category>

		<category><![CDATA[html5]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">https://actionsnippet.com/?p=3354</guid>
		<description><![CDATA[I started making youtube shorts using a monaco-powered micro-editor I created called https://zapp.codes. Check them out here: https://www.youtube.com/@shapevent/shorts
I don&#8217;t think I ever mentioned https://snippet.zone here. It&#8217;s just another actionsnippet-like site I created a few years ago&#8230; I don&#8217;t update it all that frequently but it has many snippets mostly written in js.
recent fork of a [...]]]></description>
			<content:encoded><![CDATA[<p>I started making youtube shorts using a <a href="https://microsoft.github.io/monaco-editor/" target="blank">monaco</a>-powered micro-editor I created called <a href="https://zapp.codes">https://zapp.codes</a>. Check them out here: <a href="http://">https://www.youtube.com/@shapevent/shorts</a></p>
<p>I don&#8217;t think I ever mentioned <a href="https://snippet.zone" target="blank">https://snippet.zone</a> here. It&#8217;s just another actionsnippet-like site I created a few years ago&#8230; I don&#8217;t update it all that frequently but it has many snippets mostly written in js.</p>
<p><em>recent fork of a snippet.zone that I used in a short&#8230;</em></p>
<p><iframe height="300" style="width: 100%;" scrolling="no" title="squigs" src="https://codepen.io/ZevanRosser/embed/pomBpaY?default-tab=result" frameborder="no" loading="lazy" allowtransparency="true" allowfullscreen="true"><br />
  See the Pen <a href="https://codepen.io/ZevanRosser/pen/pomBpaY"><br />
  squigs</a> by Zevan Rosser (<a href="https://codepen.io/ZevanRosser">@ZevanRosser</a>)<br />
  on <a href="https://codepen.io">CodePen</a>.<br />
</iframe></p>
<p>Here&#8217;s a short showing something I did for genuary 2022&#8230;</p>
<p><iframe width="100%" height="518" src="https://www.youtube.com/embed/OrAhczKN0Js" title="iso #javascript #coding #canvas #creativecoding" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3354</wfw:commentRss>
		</item>
		<item>
		<title>Pathtracer Research</title>
		<link>https://actionsnippet.com/?p=3341</link>
		<comments>https://actionsnippet.com/?p=3341#comments</comments>
		<pubDate>Sat, 01 Dec 2018 17:59:36 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[3D]]></category>

		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[glsl]]></category>

		<category><![CDATA[graphics algorithms]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3341</guid>
		<description><![CDATA[I spent awhile a few months ago learning about Pathtracers&#8230; After I good deal of research I ended up forking Evan Wallace&#8217;s Path Tracer and added a few new features and shapes - some of which I learned from Erich Loftis&#8217;s Three.js PathTracing Renderer. 
view demo 1

view demo 2

Been wanting to get back to this [...]]]></description>
			<content:encoded><![CDATA[<p>I spent awhile a few months ago learning about Pathtracers&#8230; After I good deal of research I ended up forking <a href="http://madebyevan.com/webgl-path-tracing/" target="blank">Evan Wallace&#8217;s Path Tracer </a>and added a few new features and shapes - some of which I learned from <a href="https://github.com/erichlof/THREE.js-PathTracing-Renderer" target="blank">Erich Loftis&#8217;s Three.js PathTracing Renderer</a>. </p>
<p><a href="http://mtcanvas.com/hack/pathtracer/demo-1-512/index.html">view demo 1</a></p>
<p><img src="http://actionsnippet.com/imgs/shotz.jpg" /></p>
<p><a href="http://mtcanvas.com/hack/pathtracer/demo-3-512/index.html">view demo 2</a></p>
<p><img src="http://actionsnippet.com/imgs/shotz2.jpg" /></p>
<p>Been wanting to get back to this and do optimizations and boolean shapes - but so far I haven&#8217;t gotten around to it.</p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3341</wfw:commentRss>
		</item>
		<item>
		<title>Proxy - (object always defined)</title>
		<link>https://actionsnippet.com/?p=3333</link>
		<comments>https://actionsnippet.com/?p=3333#comments</comments>
		<pubDate>Sun, 28 Oct 2018 18:40:04 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Object]]></category>

		<category><![CDATA[dynamic]]></category>

		<category><![CDATA[es6]]></category>

		<category><![CDATA[functions]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3333</guid>
		<description><![CDATA[This uses a proxy to make sure all keys/props of an object are always defined.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
let spec = &#123;
  get: &#40;o, key&#41; =&#62; &#123;
    return o&#91;key&#93; != null ? o&#91;key&#93; : o&#91;key&#93; = O&#40;&#41;;
  &#125;,
  set: &#40;o, key, v&#41; =&#62; &#123;
    o&#91;key&#93; = v;
  &#125;
&#125;;
&#160;
let O [...]]]></description>
			<content:encoded><![CDATA[<p>This uses a proxy to make sure all keys/props of an object are always defined.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">let spec <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  get<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>o<span style="color: #339933;">,</span> key<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066; font-weight: bold;">return</span> o<span style="color: #009900;">&#91;</span>key<span style="color: #009900;">&#93;</span> <span style="color: #339933;">!=</span> <span style="color: #003366; font-weight: bold;">null</span> <span style="color: #339933;">?</span> o<span style="color: #009900;">&#91;</span>key<span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> o<span style="color: #009900;">&#91;</span>key<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> O<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
  set<span style="color: #339933;">:</span> <span style="color: #009900;">&#40;</span>o<span style="color: #339933;">,</span> key<span style="color: #339933;">,</span> v<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span>
    o<span style="color: #009900;">&#91;</span>key<span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> v<span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
let O <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> Proxy<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> spec<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>  
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
let dynamic <span style="color: #339933;">=</span> O<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
dynamic.<span style="color: #660066;">prop</span>.<span style="color: #660066;">creation</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'is interesting'</span><span style="color: #339933;">;</span>
dynamic.<span style="color: #660066;">prop</span>.<span style="color: #660066;">stuff</span>.<span style="color: #660066;">not</span>.<span style="color: #660066;">clear</span>.<span style="color: #660066;">what</span>.<span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">could</span>.<span style="color: #660066;">be</span>.<span style="color: #660066;">used</span>.<span style="color: #000066; font-weight: bold;">for</span> <span style="color: #339933;">=</span> <span style="color: #CC0000;">123</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// log out full structure</span>
let f <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span>let i <span style="color: #000066; font-weight: bold;">in</span> o<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> o<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">===</span> <span style="color: #3366CC;">'object'</span><span style="color: #009900;">&#41;</span> f<span style="color: #009900;">&#40;</span>o<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
f<span style="color: #009900;">&#40;</span>dynamic<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>Outputs: </p>
<pre>
Proxy {creation: "is interesting", stuff: Proxy}
is interesting
Proxy {not: Proxy}
Proxy {clear: Proxy}
Proxy {what: Proxy}
Proxy {this: Proxy}
Proxy {could: Proxy}
Proxy {be: Proxy}
Proxy {used: Proxy}
Proxy {for: 123}
123
</pre>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3333</wfw:commentRss>
		</item>
		<item>
		<title>es6 concat trick</title>
		<link>https://actionsnippet.com/?p=3328</link>
		<comments>https://actionsnippet.com/?p=3328#comments</comments>
		<pubDate>Sat, 27 Oct 2018 21:15:58 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[arrays]]></category>

		<category><![CDATA[es6]]></category>

		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3328</guid>
		<description><![CDATA[let a = &#91;1&#93;, b = &#91;2&#93;, c = &#91;3&#93;,
    d = &#91;...a, ...b, ...c&#93;;
console.log&#40;d&#41;;
// outputs: [1, 2, 3]

]]></description>
			<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">let a <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> b <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span> c <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #CC0000;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span>
    d <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span>...<span style="color: #660066;">a</span><span style="color: #339933;">,</span> ...<span style="color: #660066;">b</span><span style="color: #339933;">,</span> ...<span style="color: #660066;">c</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>d<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// outputs: [1, 2, 3]</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3328</wfw:commentRss>
		</item>
		<item>
		<title>Zeta Pictograms</title>
		<link>https://actionsnippet.com/?p=3313</link>
		<comments>https://actionsnippet.com/?p=3313#comments</comments>
		<pubDate>Tue, 28 Aug 2018 12:47:15 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Graphics]]></category>

		<category><![CDATA[graphics algorithms]]></category>

		<category><![CDATA[html5]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[misc]]></category>

		<category><![CDATA[zeta]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3313</guid>
		<description><![CDATA[I have a set of ~100 pictograms that I use for personal notation. When I was actively working on Zeta. I created a few of these with equations:
See the Pen Zeta Pictograms by Zevan Rosser (@ZevanRosser) on CodePen.

You can read more about Zeta in this post. 
I spam my facebook with images from my sketchbooks [...]]]></description>
			<content:encoded><![CDATA[<p>I have a set of ~100 pictograms that I use for personal notation. When I was actively working on <a href="http://actionsnippet.com/?p=3076" target="blank">Zeta</a>. I created a few of these with equations:</p>
<p><iframe height='693' scrolling='no' title='Zeta Pictograms' src='//codepen.io/ZevanRosser/embed/PdzRGy/?height=693&#038;theme-id=5318&#038;default-tab=result&#038;embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/ZevanRosser/pen/PdzRGy/'>Zeta Pictograms</a> by Zevan Rosser (<a href='https://codepen.io/ZevanRosser'>@ZevanRosser</a>) on <a href='https://codepen.io'>CodePen</a>.<br />
</iframe></p>
<p>You can read more about Zeta <a href="http://actionsnippet.com/?p=3076" target="blank">in this post</a>. </p>
<p>I spam <a href="https://www.facebook.com/zevan.rosser" target="blank">my facebook</a> with images from my sketchbooks if you&#8217;re at all interested in seeing more pictograms:</p>
<p><img src="http://actionsnippet.com/imgs/spam.jpg" width="100%"/></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3313</wfw:commentRss>
		</item>
		<item>
		<title>Dictionary with ES6 Symbol</title>
		<link>https://actionsnippet.com/?p=3307</link>
		<comments>https://actionsnippet.com/?p=3307#comments</comments>
		<pubDate>Sun, 26 Aug 2018 15:22:42 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Dictionary]]></category>

		<category><![CDATA[arrays]]></category>

		<category><![CDATA[associative arrays]]></category>

		<category><![CDATA[es6]]></category>

		<category><![CDATA[html5]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[symbols]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3307</guid>
		<description><![CDATA[Creating a dictionary type object with ES6 Symbols is easy. Yes we have Maps and WeakMaps but this is still interesting for a variety of reasons&#8230; Being able to use objects as keys in another object (dictionary) has many great uses&#8230;. So how do you use Symbols like this?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
let a = &#123; id: Symbol&#40;'key'&#41; &#125;,
 [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a dictionary type object with ES6 Symbols is easy. Yes we have Maps and WeakMaps but this is still interesting for a variety of reasons&#8230; Being able to use objects as keys in another object (dictionary) has many great uses&#8230;. So how do you use Symbols like this?</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">let a <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> id<span style="color: #339933;">:</span> Symbol<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'key'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
    b <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> id<span style="color: #339933;">:</span> Symbol<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'key'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
let dictionary <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009900;">&#91;</span>a.<span style="color: #660066;">id</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'value by obj a'</span><span style="color: #339933;">,</span>
  <span style="color: #009900;">&#91;</span>b.<span style="color: #660066;">id</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">'value by obj b'</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>dictionary<span style="color: #009900;">&#91;</span>a.<span style="color: #660066;">id</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>dictionary<span style="color: #009900;">&#91;</span>b.<span style="color: #660066;">id</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">// outputs:</span>
<span style="color: #006600; font-style: italic;">// 'value by obj a'</span>
<span style="color: #006600; font-style: italic;">// 'value by obj b'</span></pre></td></tr></table></div>

<p>By using either object a or object b&#8217;s `id` symbol, our dictionary points to another value. This old AS3 snippet is similar:</p>
<p><a href="http://actionsnippet.com/?p=426" target="blank">http://actionsnippet.com/?p=426</a></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3307</wfw:commentRss>
		</item>
		<item>
		<title>Easy i-ching Symbols</title>
		<link>https://actionsnippet.com/?p=3290</link>
		<comments>https://actionsnippet.com/?p=3290#comments</comments>
		<pubDate>Tue, 21 Aug 2018 13:13:47 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[javascript]]></category>

		<category><![CDATA[misc]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3290</guid>
		<description><![CDATA[I have so many little snippets like this laying around, at first I didn&#8217;t remember writing this when I found it the other day&#8230; then it slowly came back to me.

Looks like this is another one from the jQuery days:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
&#60;!DOCTYPE html&#62;
&#60;html lang=&#34;en&#34;&#62;
  &#60;head&#62;
    &#60;meta charset=&#34;utf-8&#34; /&#62;
    &#60;title&#62;&#60;/title&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p>I have so many little snippets like this laying around, at first I didn&#8217;t remember writing this when I found it the other day&#8230; then it slowly came back to me.</p>
<p><iframe src="http://mtcanvas.com/z/iching.html" border="0" width="100%" height="400"></iframe></p>
<p>Looks like this is another one from the jQuery days:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;!</span>DOCTYPE html<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>html lang<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;en&quot;</span><span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>head<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>meta charset<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;utf-8&quot;</span> <span style="color: #339933;">/&gt;</span>
    <span style="color: #339933;">&lt;</span>title<span style="color: #339933;">&gt;&lt;/</span>title<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>script src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://code.jquery.com/jquery-latest.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span>
      $<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
&nbsp;
        <span style="color: #006600; font-style: italic;">// meaning: http://www.ichingfortune.com/hexagrams.php</span>
        <span style="color: #006600; font-style: italic;">// starting hex: &amp;#x4DC0;</span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> flash <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.flash'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            syms <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.syms'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            num <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'.num'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
            start <span style="color: #339933;">=</span> 0x4DC0<span style="color: #339933;">,</span>
            total <span style="color: #339933;">=</span> <span style="color: #CC0000;">64</span><span style="color: #339933;">,</span>
            tick <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #000066; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> total<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'&lt;div&gt;'</span><span style="color: #339933;">,</span> <span style="color: #009900;">&#123;</span>
            html<span style="color: #339933;">:</span> <span style="color: #3366CC;">'&amp;#x'</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>start <span style="color: #339933;">+</span> i<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">toString</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">16</span><span style="color: #009900;">&#41;</span>
          <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendTo</span><span style="color: #009900;">&#40;</span>syms<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
&nbsp;
        flash.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span>syms.<span style="color: #660066;">html</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        flash.<span style="color: #660066;">find</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'div'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">first</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        setInterval<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
          <span style="color: #003366; font-weight: bold;">var</span> index <span style="color: #339933;">=</span> tick <span style="color: #339933;">%</span> total<span style="color: #339933;">,</span>
              curr <span style="color: #339933;">=</span> flash.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span>
              .<span style="color: #660066;">show</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
              .<span style="color: #660066;">siblings</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hide</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
          curr <span style="color: #339933;">=</span> syms.<span style="color: #660066;">children</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">eq</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span>
            .<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'red'</span><span style="color: #009900;">&#41;</span>
            .<span style="color: #660066;">siblings</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'color'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'black'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
          num.<span style="color: #660066;">text</span><span style="color: #009900;">&#40;</span>index <span style="color: #339933;">+</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
          tick<span style="color: #339933;">++;</span>
        <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">600</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
      <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>style<span style="color: #339933;">&gt;</span>
      <span style="color: #339933;">*</span> <span style="color: #009900;">&#123;</span>
        font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;Helvetica Neue&quot;</span><span style="color: #339933;">,</span> Helvetica<span style="color: #339933;">,</span> sans<span style="color: #339933;">-</span>serif<span style="color: #339933;">;</span>  
      <span style="color: #009900;">&#125;</span>
&nbsp;
      .<span style="color: #660066;">syms</span> div <span style="color: #009900;">&#123;</span>
        position<span style="color: #339933;">:</span> relative<span style="color: #339933;">;</span>
        float<span style="color: #339933;">:</span> left<span style="color: #339933;">;</span>  
        font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 3em<span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>webkit<span style="color: #339933;">-</span>transition<span style="color: #339933;">:</span> color 300ms ease<span style="color: #339933;">-</span>out<span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>ms<span style="color: #339933;">-</span>transition<span style="color: #339933;">:</span> color 300ms ease<span style="color: #339933;">-</span>out<span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>o<span style="color: #339933;">-</span>transition<span style="color: #339933;">:</span> color 300ms ease<span style="color: #339933;">-</span>out<span style="color: #339933;">;</span>
        transition<span style="color: #339933;">:</span> color 300ms ease<span style="color: #339933;">-</span>out<span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
&nbsp;
      .<span style="color: #660066;">flash</span> <span style="color: #009900;">&#123;</span>
        position<span style="color: #339933;">:</span> relative<span style="color: #339933;">;</span>
        height<span style="color: #339933;">:</span> 6em<span style="color: #339933;">;</span>  
      <span style="color: #009900;">&#125;</span>
&nbsp;
      .<span style="color: #660066;">flash</span> div <span style="color: #009900;">&#123;</span>
        position<span style="color: #339933;">:</span> absolute<span style="color: #339933;">;</span>
        left<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span> top<span style="color: #339933;">:</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
        font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 6em<span style="color: #339933;">;</span>
        color<span style="color: #339933;">:</span> red<span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>webkit<span style="color: #339933;">-</span>transform<span style="color: #339933;">:</span> rotate<span style="color: #009900;">&#40;</span>90deg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>ms<span style="color: #339933;">-</span>transform<span style="color: #339933;">:</span> rotate<span style="color: #009900;">&#40;</span>90deg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #339933;">-</span>o<span style="color: #339933;">-</span>transform<span style="color: #339933;">:</span> rotate<span style="color: #009900;">&#40;</span>90deg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        transform<span style="color: #339933;">:</span> rotate<span style="color: #009900;">&#40;</span>90deg<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #009900;">&#125;</span>
    <span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>head<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;</span>body<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>h2<span style="color: #339933;">&gt;</span>i ching <span style="color: #339933;">:</span> <span style="color: #339933;">&lt;</span>span <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;num&quot;</span><span style="color: #339933;">&gt;</span><span style="color: #CC0000;">1</span><span style="color: #339933;">&lt;/</span>span<span style="color: #339933;">&gt;&lt;/</span>h2<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;flash&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
    <span style="color: #339933;">&lt;</span>div <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;syms&quot;</span><span style="color: #339933;">&gt;&lt;/</span>div<span style="color: #339933;">&gt;</span>
  <span style="color: #339933;">&lt;/</span>body<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;/</span>html<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>The i-ching is a Chinese  divinatory system - the &#8220;hexagrams&#8221; just look very cool, when I noticed they were available starting at `0&#215;4DC0` I made this snippet&#8230;  think ancient magic 8 ball.</p>
<p>wikipedia article:<br />
<a href="https://en.wikipedia.org/wiki/I_Ching" target="blank">https://en.wikipedia.org/wiki/I_Ching</a></p>
<p>It&#8217;s pretty fun to play with this online version:<br />
<a href="https://www.eclecticenergies.com/iching/virtualcoins" target="blank">https://www.eclecticenergies.com/iching/virtualcoins</a></p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3290</wfw:commentRss>
		</item>
		<item>
		<title>OVM Pseudo-Algebra and Surreal Numbers</title>
		<link>https://actionsnippet.com/?p=3274</link>
		<comments>https://actionsnippet.com/?p=3274#comments</comments>
		<pubDate>Sun, 19 Aug 2018 16:29:26 +0000</pubDate>
		<dc:creator>Zevan</dc:creator>
		
		<category><![CDATA[Math]]></category>

		<category><![CDATA[misc]]></category>

		<category><![CDATA[algebra]]></category>

		<category><![CDATA[numbers]]></category>

		<guid isPermaLink="false">http://actionsnippet.com/?p=3274</guid>
		<description><![CDATA[Was just watching this funny video on Numberphile:

Here is the Surreal Numbers book on archive.org:
https://archive.org/stream/SurrealNumbers/Knuth-SurrealNumbers#page/n7
Got a kick out of the story around this stuff&#8230; When Knuth shows the notation for surreal numbers I suddenly remembered a weird program I&#8217;d written awhile back.
OVM
I had been out drawing in my sketchbook one sunday (almost 2 years ago) [...]]]></description>
			<content:encoded><![CDATA[<p>Was just watching this funny video on Numberphile:</p>
<p><iframe width="100%" height="315" src="https://www.youtube.com/embed/mPn2AdMH7UQ" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe></p>
<p>Here is the Surreal Numbers book on archive.org:</p>
<p><a href="https://archive.org/stream/SurrealNumbers/Knuth-SurrealNumbers#page/n7" target="blank">https://archive.org/stream/SurrealNumbers/Knuth-SurrealNumbers#page/n7</a></p>
<p>Got a kick out of the story around this stuff&#8230; When Knuth shows the notation for surreal numbers I suddenly remembered a weird program I&#8217;d written awhile back.</p>
<h2>OVM</h2>
<p>I had been out drawing in my sketchbook one sunday (almost 2 years ago) and found myself creating a tiny little system of symbols:</p>
<p><img src="http://actionsnippet.com/imgs/ovm.jpg" /></p>
<p>A few days later I speed coded a version of the system. Apparently I had posted a screenshot on FB while I was working on it:</p>
<p><img src="http://actionsnippet.com/imgs/ovm-day.jpg" /></p>
<p>See if you can figure out how it works. I&#8217;m sure the code could be cleaned up a bit&#8230;</p>
<p><iframe height='691' scrolling='no' title='O.V.M' src='//codepen.io/ZevanRosser/embed/WgedWx/?height=691&#038;theme-id=5318&#038;default-tab=js,result&#038;embed-version=2' frameborder='no' allowtransparency='true' allowfullscreen='true' style='width: 100%;'>See the Pen <a href='https://codepen.io/ZevanRosser/pen/WgedWx/'>O.V.M</a> by Zevan Rosser (<a href='https://codepen.io/ZevanRosser'>@ZevanRosser</a>) on <a href='https://codepen.io'>CodePen</a>.<br />
</iframe></p>
<p>While OVM has little/nothing to do with Surreal Numbers - I&#8217;m glad the video reminded me it&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>https://actionsnippet.com/?feed=rss2&amp;p=3274</wfw:commentRss>
		</item>
	</channel>
</rss>
