Anyone know how to get the
symbols into a custom reporter?
Anyone know how to get the
symbols into a custom reporter?
Those are just unicode characters. On a Mac you can use the "Edit => Emoji & Symbols" to find them, or you can simple copy & paste the characters from where you find them, e.g. here: ≤ and ≥
(nice reporter, btw, looking vaguely familiar, haha!)
Ta
I've given you full credit
Blocks only
<blocks app="Snap! 6, https://snap.berkeley.edu" version="1"><block-definition s="%'low' < %'value' < %'high'" type="reporter" category="operators"><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportLessThan"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportDifference"><block var="value"/><block var="low"/></block><block s="reportDifference"><block var="high"/><block var="value"/></block></block></block><block s="reportDifference"><block var="high"/><block var="low"/></block></block></block></script></block-definition><block-definition s="%'low' ≤ %'value' ≤ %'high'" type="reporter" category="operators"><comment w="90" collapsed="false">Reports true if value >= low AND <= high</comment><header></header><code></code><translations></translations><inputs><input type="%s"></input><input type="%s"></input><input type="%s"></input></inputs><script><block s="doReport"><block s="reportLessThanOrEquals"><block s="reportMonadic"><l><option>abs</option></l><block s="reportDifference"><block s="reportDifference"><block var="value"/><block var="low"/></block><block s="reportDifference"><block var="high"/><block var="value"/></block></block></block><block s="reportDifference"><block var="high"/><block var="low"/></block></block></block></script></block-definition></blocks>
Nice! You know, I have to admit that the night before my "No Code" talk I was up awake at 3 AM fiddling with this Perlin noise project changing it from HOFs to hyperblocks and this one block took me over 2 hours to figure out. I'm so not a mathematics person, and I guess it wasn't my time of day either
But why not
this is what I started out with, but it's not "hyperizable", because or
and and
are short-circuited. So I needed something that would work as hyperblock.
I am curious how did you make it hyperizable anyway.
well, we're currently resisting hyperizing special forms such as reporter-if/else, or, and etc, because these will evaluate one or more inputs repeatedly or after they've been called instead of before. Therefore we cannot guarantee that they will, in fact, ever terminate, and so we have to be careful to execute them in a controlled, safe way that lets the user stop them without crashing Snap. This safe, controlled way prevents us from making them ultra-fast as we're doing with hyperblocks. So I wanted to get rid of the and
reporter by using arithmetic, and it so happens I suck at math
if you're on windows, you can press win + "." (period) or win + ";" (semicolon) to open the emoji keyboard? idk what it's called. Then you click on the Symbols tab (Ω) then click on the math tab at the bottom (∞) then scroll down until you find the ≤ and ≥, then click on the symbol you want to type it.
If you want blocks for a value being in a range, you really need two more blocks for the semi-open cases. A very common example is 0 ≤ x < 1. (I mean, if you want them as general tools. I don't know the application you guys are discussing.)
My awesome Jens Mönig, just press "option" ("alt") with the "," or "." and take "≤" "≥" in the
ABC Keyboard (don't use the "shift" to make this) there are easy
Your example are awesome, Brian Harvey.
A number is 0 ≤ x < 1 is the 0 self, or 0.5 . Too easy
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.