Better Programming with Snap! 6.1

After today's first day of SnapCon 2020 I couldn't help myself to have a closer look at the map()-block and hyperblocks. You will find a description of the differences in a new blog post at http://gigers.com/blog/?p=375.
The blog post itself is written in German, but you can just enjoy the pictures.
As several attendees of the conference have already realised, will lead to adjustments in the curriculum. Basically they fulfill a prophesy Stanislaw Lem has made way back in his "Summa technologiae". Only when certain aspects of technology become simple to handle, will humans be able to understand more sophisticated concepts well. Hyperblocks definitely fall into that category.

HI, welcome to the forum!

The version with MAP can be made a little simpler even pre-hyperblocks:

Wow, that was super quick of you. Thank you for the nice, very well-written blog post!

Thanks a lot for letting me know about this version. It is much more elegant. I have included it into my blog post.

change script pic

I use this method to modify r in RGB. In teaching, it is found that after RGB is set to 0,0,0,0, similar matting effect can be achieved.
I'm now trying to use it in my 12-year-old (seventh grade) teaching and it's understandable to kids. Now I'm thinking about the distortion of sound, the filter of pictures.
(English is not good, from the translator, please forgive me.)

Maybe it is a good idea to hide some complexity:


And then do all the calculations for the individual pixels separately (just a very simple example which switches the RGB values around):

This would be a little less intimidating if you made it


but there's no need for rgba_local at all; just REPORT (LIST ...)

(You could get rid of the others, too, but I agree that there's an increase in self-documentingness with them.)

Thanks again. It says it right in the block.

So here is an example which actually does some calculations.

Could be fun to give students an original picture and an alternative version and let them try to replicate it by adjusting the pixelfilter function.

Now, is your version more or less readable than this one:


(I'm assuming that you didn't really mean for all of the ITEM blocks to have ITEM 1 OF, and that you want some blue value even if the given value is less than 50.)

My version has the computation of blue right in the LIST block. I'm not sure if that helps or hurts, compared to making a B variable.

Why would you report LIST?He didn't do something wrong.

(joke)

Would you rather have a number be in the report block? Perhaps some arbitrary big number, maybe 18001767679 or something like that.

You are correct on both accounts.
For students I will keep the RGB-channels separately, as I intend to use the block as a blueprint for other filter experiments.

Thanks again.

Or 1e+10000000000000000000

This version while slightly less flexible than the one above works with hyperblocks and should be therefore much faster.

I did some testing and on a fast computer, you can adjust the parameters with a slider nearly in realtime.

instead of doing untitled script pic - 2020-08-03T161332.371 it would be better if you use the if then else reporter instead untitled script pic - 2020-08-03T161432.095

:slight_smile:

There is always more to learn. With the reporter it looks much better.

it's what it was meant to do, report

i have google translate extenstion

yeah!