Discuss Scratch

birdoftheday
Scratcher
500+ posts

Snap! user discussion

some_iterator.map(do_something).filter(|x| is_something(x) && !is_something_else(x)).take(an_amount)
beautiful all ways but syntactically

わたくしは強靭な男でございます!!!!!!!!!!!
BookOwl
Scratcher
1000+ posts

Snap! user discussion

@xly
I'm sorry if I come off as arrogant or anything like that, that wasn't my intent at all. Certainly if anybody can make a good version of OOP for Snap! Brian (and Jens of course) can. I was just saying that from my experience I think that OOP has been overhyped and that a good functional (not necessarily pure) language that has support for things like algabraic data types and pattern matching can be much more pleasant to use.

(Of course, my experience writing large, business grade programs is basically nil, so take what I say with a large heaping of salt)

who needs signatures
djdolphin
Scratcher
1000+ posts

Snap! user discussion

birdoftheday wrote:

Yeah, nobody cares about functional programming anymore. It's not 2012 and my name isn't Charles Babbage. As a code artisan I have better ways to spend my time and money, like this newest full stack framework everyone's using. It's called bilge.js, and it's not bloated–the minified version is only 2GB, you know.
Woah, woah, woah, get with the program. JavaScript is out, and CoffeeScript is in again for some reason, this time with type annotations, inlined HTML, and goto statements, just for the heck of it. You simply transpile it to ES5, then run it on ayo.js running on Ubuntu running on an x86 emulator running on WebAssembly. It's only 17GB gzipped, so it's very lightweight.
BookOwl
Scratcher
1000+ posts

Snap! user discussion

birdoftheday wrote:

some_iterator.map(do_something).filter(|x| is_something(x) && !is_something_else(x)).take(an_amount)
beautiful all ways but syntactically
What's bad about it? The lambdas? The C style operators? The method chaining?

birdoftheday wrote:

If you're still unsure about how stupid OOP can get, try to figure out what an AbstractSingletonProxyFactoryBean is.

Or a InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
That's… I can't even…

How do Java developers stay sane!?!

Edit: Or maybe they all lost it and became Javascript devs.

Last edited by BookOwl (Sept. 8, 2017 01:25:15)


who needs signatures
bharvey
Scratcher
1000+ posts

Snap! user discussion

Dale_Mahalko wrote:

What I am trying to do is to move all scripting into a single main script, rather than spreading out code fragments across many sprites. This has long been a limitation in Scratch that you can't have a single central script in the stage and command sprites to do stuff from that central script.
Sure, no problem.
TELL [Sprite 1]
blah
blah
blah
TELL [Sprite 2]
foo
baz
garply
etc.
Use “Import tools” to get the TELL block.

I don't know if I'm trying to push this limited language to try to act too much like a normal language,
Hey! Scratch is a deliberately limited language to appeal to 8-year-olds. We could discuss some of their design choices, but it's hard to argue with their success. But Snap! is a complete implementation of Scheme, the world's most versatile programming language, even including Scheme's first class continuations. You don't have to like Snap!, but don't call it names if you don't know what you're talking about.

As for “normal,” what's not normal about object-oriented widget management? That's what sprites are.

which may not have a concept of sprites but just stamps out bitmaps onto the background with every frame update, only checks for overlapping rectangles in code, and has no concept of “touching”.
Sorry, but all I'm hearing is “I learned one way to do this, and any other way is therefore wrong.” Nevertheless, you can do it your way if you want, because you're wrong about this:
Just doing this is a problem because AFAIK there is only the one background, and I can't create a floating drawing area over the background that can then be drawn on, and discarded when I am done with it.
Sure you can. The drawing you do happens on the “pen trails” layer, which is above the background but below the sprites. To clear the pen trails, use the CLEAR block, the first thing in the Pen category. And the STAMP block will stamp the sprite's costume onto the pen trails layer. If you want to be able to save and restore drawings, import the pen trails library.

The Say chat bubble for player interaction is very limiting. I've been contemplating trying to write some sort of GUI framework that uses tens to hundreds of tiny tiled sprites in a cluster to create clickable auto-resizable buttons with sprite-generated text labels inside them, and I'm trying to figure out a “proper” way to do it.
Yes, SAY is limited, I agree. As soon as 4.1 is done, I'm going to get to work on a programmable-and-editable text box as a special case sprite costume. As for buttons, if you import the pen trails library into Snap!, it includes a BUTTON block that does just what you want.

Last edited by bharvey (Sept. 8, 2017 05:04:36)


cycomachead
Scratcher
85 posts

Snap! user discussion

Did someone use the word transpile? What's wrong with compile? /rant-omitted-too-tired.
djdolphin
Scratcher
1000+ posts

Snap! user discussion

cycomachead wrote:

Did someone use the word transpile? What's wrong with compile? /rant-omitted-too-tired.
Nothing's wrong with compile. What's wrong with transpile?
frodewin
Scratcher
500+ posts

Snap! user discussion

Since Snap has a Javascript block, are there any precautions taken in limiting the effects of it?

Was there ever a discussionif a project should come with a warning when it is using this block? If no, why not?

Why don't you try out some of my projects. I love to get feedback!
Click on the images to try them out.


You can find my best projects here or drop by my profile and say hi there!
_nix
Scratcher
500+ posts

Snap! user discussion

frodewin wrote:

Since Snap has a Javascript block, are there any precautions taken in limiting the effects of it?

Was there ever a discussionif a project should come with a warning when it is using this block? If no, why not?
Yes, there's been a fair bit of discussion on the topic here. I'm not certain if any actual code or plan changes have come out of it yet (correct me if I'm wrong?).

blog (it has art, code, and stuff)

If you post bring up my post on a topic you don't own, are you claiming that it's yours?
SimpleScratch
Scratcher
100+ posts

Snap! user discussion

This has long been a limitation in Scratch that you can't have a single central script in the stage and command sprites to do stuff from that central script.

The broadcast mechanism allows you to send commands to sprites from a central script so that's not a limitation in Scratch

It might not do what you want but it does do that bit
_nix
Scratcher
500+ posts

Snap! user discussion

What a silly project of mine. They don't usually get this silly.

blog (it has art, code, and stuff)

If you post bring up my post on a topic you don't own, are you claiming that it's yours?
bharvey
Scratcher
1000+ posts

Snap! user discussion

_nix wrote:

They don't usually get this silly.
I liked the part about using a Snap! script as the callback to a JS function. But I got tired before figuring out why you need two sprites. Sorry… It's very cool, though, that you can animate an external web window from Snap!.

_nix
Scratcher
500+ posts

Snap! user discussion

bharvey wrote:

_nix wrote:

They don't usually get this silly.
I liked the part about using a Snap! script as the callback to a JS function. But I got tired before figuring out why you need two sprites. Sorry… It's very cool, though, that you can animate an external web window from Snap!.
It actually doesn't need two sprites; the unnamed one was just an old test script. (Note that its script isn't attached to a “when green flag clicked”.)

blog (it has art, code, and stuff)

If you post bring up my post on a topic you don't own, are you claiming that it's yours?
cycomachead
Scratcher
85 posts

Snap! user discussion

djdolphin wrote:

cycomachead wrote:

Did someone use the word transpile? What's wrong with compile? /rant-omitted-too-tired.
Nothing's wrong with compile. What's wrong with transpile?

Mostly I think it's unnecessary. There's some small argument of whether compiling has to mean going to a lower level of abstraction, but when used in the case of modern JS code, you're removing abstractions.

As to the concerns around JS functions - we've not written any code. The primary mitigating factor (as to why this isn't urgent), is that there's no public directory of Snap! projects, so far most projects are only shared in small / relatively controlled settings.

However, very recently (as in the last 24 hours) I've also realized there exists a way in Snap! to automatically execute a JS (or any other) function when opening a project. So, it's probably becoming more important to do something about this.
dev_in_spain
New to Scratch
4 posts

Snap! user discussion

Hi,
I was wondering if anyone can guide me to the method or parameter to change the blocks view (where the code is) to be read only. i.e. To stop the ability from someone changing the code they see for a sprite or stage, I would call X in a script?

Thanks in Advance
Dale_Mahalko
New to Scratch
50 posts

Snap! user discussion

Is there going to be a community website / forum / project sharing platform launched for Snap! yet this year, or has that been pushed off until next year?

I started using Snap! in an introductory programming class which started last week, with the expectation that a community website, where students could share their projects and collaborate like with Scratch, would be arriving any day now.

Probably will have students share and collaborate and learn from each other on Scratch for a while, until that gets done.
bharvey
Scratcher
1000+ posts

Snap! user discussion

dev_in_spain wrote:

I was wondering if anyone can guide me to the method or parameter to change the blocks view (where the code is) to be read only. i.e. To stop the ability from someone changing the code they see for a sprite or stage, I would call X in a script?
Short answer: No, we don't have a way to make scripts visible but not writeable.

We do have a way to make scripts invisible: append “&hideControls” to the URL of the shared project. But this isn't super-high-security; kids will discover it by the end of the first class. So they have to buy into the game for this to work as a teaching technique.

bharvey
Scratcher
1000+ posts

Snap! user discussion

Dale_Mahalko wrote:

Is there going to be a community website / forum / project sharing platform launched for Snap! yet this year, or has that been pushed off until next year?
I too am frustrated by the delays. We're a little scared of introducing a big back-end change with classes running, so our current target is xmas vacation.

Dale_Mahalko
New to Scratch
50 posts

Snap! user discussion

bharvey wrote:

I too am frustrated by the delays. We're a little scared of introducing a big back-end change with classes running, so our current target is xmas vacation.

If there is a need for a beta period to make sure it is all working, it should be possible to launch it right now without disturbing what exists already.

Leave the current cloud storage alone and fork an entirely separate version of Snap! that is integrated into the new portal/community/cloud.

If people want to move from the “old cloud” to the new beta community cloud, they can migrate their projects manually via export/import.
BookOwl
Scratcher
1000+ posts

Snap! user discussion

Is it possible to write a block that create a new block and adds it to the pallet? Also, is it possible to write a block the creates a new category in the pallet?

who needs signatures

Powered by DjangoBB

Standard | Mobile