Discuss Scratch

bharvey
Scratcher
1000+ posts

Snap! user discussion

Hardmath123 wrote:

It would be really cool if there was a Snap! library that provided all the motion blocks, but I could right-click script and say “export to gcode…”
Codification won't work? (I don't know anything about gcode.)

Hardmath123
Scratcher
1000+ posts

Snap! user discussion

Afaik gcode doesn't have loops or anything — really I was just hoping for a Snap! library that lets me execute the motion blocks two ways, (1) as commands for the turtle on screen, (2) to generate a big string that I can download and send to a CNC. For (2) each time I run, say, “move (10) steps” it would append to the Big String.

EDIT: You didn't say anything about the shape! I thought you would like it.

Last edited by Hardmath123 (June 25, 2018 20:40:05)

s_federici
Scratcher
500+ posts

Snap! user discussion

Hardmath123 wrote:

really I was just hoping for a Snap! library that lets me generate a big string that I can download and send to a CNC

I think Snap's codification (briefly descrived at page 87 of the Snap manual and in the Codification project that you can find in the Examples project list) could be an optimal solution.

Maybe (if you know the internals of Snap) you could also adapt Bernat Romagosa's Beetleblocks mod. You can download the source code at the bottom of the Beetleblock's page.


oldsmalltalker
New to Scratch
4 posts

Snap! user discussion

I wonder if anyone has given serious thought to or done any work towards making snap work with linked data? For those unfamiliar with linked data, its data thats connected with links and created with one or more vocabularies or ontologies. The linking makes it very flexible and the vocabularies make reasoning with it possible. See https://en.wikipedia.org/wiki/Linked_data .
bharvey
Scratcher
1000+ posts

Snap! user discussion

Hardmath123 wrote:

You didn't say anything about the shape! I thought you would like it.
Yes, it's very cute. I was considering a snide comment that instead of laser printing it, you could just make a cookie cutter and stamp repeatedly in a triangular lump of cookie dough. But I refrained until you brought it up again.

bharvey
Scratcher
1000+ posts

Snap! user discussion

oldsmalltalker wrote:

I wonder if anyone has given serious thought to or done any work towards making snap work with linked data?
We have the basic capability with the URL block, which reports whatever the server sends in response to the given URL. Parsing the data is just string processing, which users can write themselves.

The only problem is that the server has to be CORS-friendly.

Hardmath123
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Hardmath123 wrote:

You didn't say anything about the shape! I thought you would like it.
Yes, it's very cute. I was considering a snide comment that instead of laser printing it, you could just make a cookie cutter and stamp repeatedly in a triangular lump of cookie dough. But I refrained until you brought it up again.

Not quite. I'm trying to make a jigsaw puzzle, so eventually each line segment will actually be a tiny arc that's randomly either concave or convex, so that only the intended pieces fit together.

Last edited by Hardmath123 (June 26, 2018 02:20:30)

bharvey
Scratcher
1000+ posts

Snap! user discussion

Hardmath123 wrote:

I'm trying to make a jigsaw puzzle, so eventually each line segment will actually be a tiny arc that's randomly either concave or convex, so that only the intended pieces fit together.
Ah. A maze of twisty little passages, all different.

Hardmath123
Scratcher
1000+ posts

Snap! user discussion

bharvey wrote:

Hardmath123 wrote:

I'm trying to make a jigsaw puzzle, so eventually each line segment will actually be a tiny arc that's randomly either concave or convex, so that only the intended pieces fit together.
Ah. A maze of twisty little passages, all different.
> north

Drawing the big triangle as a single path is actually a fun algorithmic challenge. Also, you might notice that some of the edges are wrong — I haven't quite worked out the right pattern for the tessellation… tomorrow night I guess, since today got accidentally spent reading about wallpaper symmetry groups. :-)
SimpleScratch
Scratcher
500+ posts

Snap! user discussion

“When I am stopped” event option, runs one atomic frame before terminating, use-case: stop robots when a user hits the stop button

Worth the price of admission alone! :-)

Great new concept for block programming - just need to bend John Maloney's ear to get it into GP

Simon
xly
Scratcher
100+ posts

Snap! user discussion

Jens wrote:

Thanks, Xavier! Of course, right after the release I discovered a bug in my JIT compiler, but all in all I'm already really pleased with it. Hey, I'm really curious about your deep-learning project! I don't know anything about neural networks and can't wait to learn all about them.

Jens, as promised :

https://snap.berkeley.edu/snapsource/snap.html#present:Username=xleroy&ProjectName=01-deepdemo

This project is not a click-on-green-flag-to-start.It needs some digging.
At this stage it shows that Snap! offers many interesting features to modelize the principles&techniques of Deep-learning Convolutional Neural Network
(see documentation inside pseudo-block starting with a letter)).
See my other projects dealing with Neural Network .
Same prefix + 00-csv 00-deepv3 00-digit 01-cocol 01-nmnist

Last edited by xly (June 27, 2018 07:01:28)

nostickykeys
Scratcher
25 posts

Snap! user discussion

can you get JSON from url?


Say hello to Tera!
bharvey
Scratcher
1000+ posts

Snap! user discussion

nostickykeys wrote:

can you get JSON from url?
Sure, you can get whatever the URL sends back. If you mean, do we turn it into a structured tree for you, then no, although I think there are libraries that do.

_nix
Scratcher
1000+ posts

Snap! user discussion

I made a block which makes sprites show up with jagged, sharp edges when you use the “set size” block. It's handy for games that use a lot of pixel art. Here's a couple screenshots:




Gnu image stolen from here. Here's the library XML to use in your own project.

Last edited by _nix (July 16, 2018 20:32:38)


══ trans autistic lesbian enbydoggirls // 16 17 18 19 20, she/they
sparrows one word to the paragraph // <3 // ~(quasar) nebula
bharvey
Scratcher
1000+ posts

Snap! user discussion

_nix wrote:

I made a block which makes sprites show up with jagged, sharp edges when you use the “set size” block.
Cool! Too bad it doesn't survive save/load, but I get that you can't do that by just adding a block.

It probably belongs in the pixel library, but that's Jens's baby so I'll have to ask him…

nostickykeys
Scratcher
25 posts

Snap! user discussion

i can't get
parseInt();
to work…

it just reports 11101, am i doing something wrong?


Say hello to Tera!
djdolphin
Scratcher
1000+ posts

Snap! user discussion

nostickykeys wrote:

it just reports 11101, am i doing something wrong?
Change the second argument from 10 to 2. You're telling it to parse “11101” as a base 10 integer, which of course is just 11101.

!
nostickykeys
Scratcher
25 posts

Snap! user discussion

djdolphin wrote:

Change the second argument from 10 to 2.
i didn't noticed. thank you!


Say hello to Tera!
simple_schoolteacher
New to Scratch
11 posts

Snap! user discussion

Please help to understand how it works, hide, show. After touching, it continues to work and work, unlike the option with touching the sprite with an empty suit.
And the difference in response time is not clear. More precisely quantities. How to ensure that any computer triggered a known number of times?
https://1drv.ms/u/s!ApTTDYaGJ03Qhk2vgoAJA1wJo2Pl
bharvey
Scratcher
1000+ posts

Snap! user discussion

simple_schoolteacher wrote:

Please help to understand how it works, hide, show…
I wouldn't use WHEN <TOUCHING…> in both directions. Instead, do this in s1:

and this in s2 and s3:

(You need the IF because the WHEN I RECEIVE will fire in both s2 and s3.)

Powered by DjangoBB