This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#7401 2013-03-14 08:30:28

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

@technoboy10: Got your proposal for the Barcelona Scratch conference, Yay!!

big_smile
More to come today.

EDIT1: Cool, 7400th reply.  smile

Last edited by technoboy10 (2013-03-14 08:39:32)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7402 2013-03-14 09:01:11

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

Wait, I thought the query took less than a msec? What's taking so long, getting the xhr's responseText?

I don't know, it's just that the time between queries (internal thread gunk?) is pretty huge.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7403 2013-03-14 09:36:23

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

@Hardmath: show code!  smile


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7404 2013-03-14 09:55:31

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

you use the iPad as a remote control for Snap! on the computer.

Why?  Why not just run Snap! on the iPad?


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7405 2013-03-14 10:08:24

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Well, you can, but that needs modifying the source directly.

@Jens in case you didn't really get it, here's what the graph looks like:

Code:

Time -->
--                 ----               --               ---                ---

Where each dash represents the duration of a request (the longer they are, the longer it took to load). They are much more sparse on the real graph, but this gives a good idea.

Last edited by Hardmath123 (2013-03-14 10:10:19)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7406 2013-03-14 10:12:36

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

@Hardmath: show code!  smile

Yeah, I need to upload it to gdocs. I want to get the speed issue resolved first, though.

Also, it should also work with Android, so someone can someone test it? The only thing that won't work is the compass sensor, but that should theoretically not matter (it'll just return 0 in Snap!).

The Snap! "API" basically provides a set of 5 or 6 blocks, each of which is a different sensor (accelerometer, compass, etc.). Each one returns a list of values for each axis (like a 3D vector). I'm using SENTENCE->LIST for decrypting what comes from the server, but for some reason that block doesn't work unless all the tools are loaded.  hmm

Last edited by Hardmath123 (2013-03-14 10:13:21)


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7407 2013-03-14 10:30:23

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

don't use the official tools, they're slow. write your own parser and WARP it, that'll make things a lot faster!


Jens Mönig

Offline

 

#7408 2013-03-14 10:33:07

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

The only thing that won't work is the compass sensor, but that should theoretically not matter (it'll just return 0 in Snap!).

Why not?  It does have a compass...

I'm using SENTENCE->LIST for decrypting what comes from the server, but for some reason that block doesn't work unless all the tools are loaded.  hmm

I didn't pay him to say that, Jens.  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7409 2013-03-14 10:39:39

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

The only thing that won't work is the compass sensor, but that should theoretically not matter (it'll just return 0 in Snap!).

Why not?  It does have a compass...

Well, actually, Chrome will work, too, now that I think about it. I'll have to try it on my dad's phone.


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7410 2013-03-14 10:46:19

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

don't use the official tools, they're slow. write your own parser and WARP it, that'll make things a lot faster!

Okay, fine, I put WARPs in the tools (except for FOR and FOR EACH -- for that, I really want an UNWARP block to put around the RUN of the user's code, right?)

... except that WARP should keep count of the number of nested WARPs, and UNWARP should decrease the count and not really unwarp unless the count goes down to zero, kind of like a semaphore.

Last edited by bharvey (2013-03-14 10:55:20)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7411 2013-03-14 10:57:49

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

write your own parser

If you can write a SENTENCE->LIST that's faster than the one in tools.xml, do it!  I'm not jealous about the code; I just want those blocks in there.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7412 2013-03-14 11:12:45

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I think it's fast if you WARP it. Thing is, if you're doing hardware interfaces, especially if you're constantly polling the same data, you might be even faster by just directly accessing the information in the answer. For example, if you know that the number you're looking for is always at the sixtenth position of the response string, I'd go for looking that up directly instead of parsing everything first.


Jens Mönig

Offline

 

#7413 2013-03-14 12:06:03

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

blob8108 wrote:

@Hardmath: show code!  smile

Yeah, I need to upload it to gdocs. I want to get the speed issue resolved first, though.

Upload it now and I'll have a look  smile

it should also work with Android

I could test — I think Chrome for Android supports.


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7414 2013-03-14 17:56:06

xly
Scratcher
Registered: 2010-04-17
Posts: 100+

Re: BYOB 3 - Discussion Thread

Jens wrote:

I think it's fast if you WARP it. Thing is, if you're doing hardware interfaces, especially if you're constantly polling the same data, you might be even faster by just directly accessing the information in the answer. For example, if you know that the number you're looking for is always at the sixtenth position of the response string, I'd go for looking that up directly instead of parsing everything first.

This necessary leads to define a set of prefomatted Ascii messages. I have used a system like that when I was working for Qualcomm "in the good old days".

Offline

 

#7415 2013-03-14 21:11:12

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Jens wrote:

I think it's fast if you WARP it. Thing is, if you're doing hardware interfaces, especially if you're constantly polling the same data, you might be even faster by just directly accessing the information in the answer. For example, if you know that the number you're looking for is always at the sixteenth position of the response string, I'd go for looking that up directly instead of parsing everything first.

I have arbitrarily long integers being tossed around, separated by spaces. I think I'll write a custom parser.

Another problem I have is that you need to input your IP in three different places: server, iPad, and Snap!. It doesn't sound too elegant to actually modify the files with the IP from the Python script. What should I do there?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7416 2013-03-15 12:37:31

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

Jens wrote:

@technoboy10: Got your proposal for the Barcelona Scratch conference, Yay!!

More to come today.

You're submitting multiple proposals?  tongue


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7417 2013-03-15 12:51:09

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

You're submitting multiple proposals?  tongue

It's a common practice, actually, especially among people (1) whose tenure depends on publication, or (2) whose travel funding depends on making a presentation.  smile

EDIT: ... but in this case my guess is that they'll be combined into one session.

Last edited by bharvey (2013-03-15 12:54:01)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7418 2013-03-15 13:59:25

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

bharvey wrote:

EDIT: ... but in this case my guess is that they'll be combined into one session.

Actually, I am submitting multiple proposals.  smile


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7419 2013-03-15 14:05:45

blob8108
Scratcher
Registered: 2007-06-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

I'd submit another one based on the new block plugin I wrote; but I still haven't persuaded anyone to implement it on the wiki/2.0 forums, and I'm not sure what I'd say about it that would be interesting, other than its design  tongue  (which is rather lovely, if I do say so myself!  wink )

Last edited by blob8108 (2013-03-15 14:07:41)


Things I've made: kurt | scratchblocks2 | this cake

Offline

 

#7420 2013-03-15 14:58:39

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: BYOB 3 - Discussion Thread

#Barcelona All of my proposals have been submitted! ( tonguebig_smile

Last edited by technoboy10 (2013-03-15 18:13:26)


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#7421 2013-03-15 18:56:29

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

#Barcelona All of my proposals have been submitted! ( tonguebig_smile

Me too!

EDIT:  Just so there'll be a little actual information in this post:  I updated the BYOB page on the Scratch wiki to reflect the fact that 4.0 is in beta.  smile

Last edited by bharvey (2013-03-15 20:09:32)


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7422 2013-03-15 20:44:22

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I think I'll write a custom parser.

Try sentence->list again; I put in a warp block.


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7423 2013-03-16 02:16:27

Hardmath123
Scratcher
Registered: 2010-02-19
Posts: 1000+

Re: BYOB 3 - Discussion Thread

It's still kind of slow. I tried putting the URL block in a loop without parsing just to see how fast that would be, and it is still kind of slow. I figured it was server problem and wrote a pure JS client to listen to the iPad. But it is lightning-fast (I managed to make a 3D fly-your-plane-through-the-hoops game with three.js which uses the iPad as the controller). So I really have no idea why it's slow when run via Snap!.  hmm

Something interesting happened in my life again…  tongue  Due to a series of inexplicable events, my mom wants me to teach an "intro to game-making" class to the kids in our building. She said I'll probably get around 5 hours. So, bharvey, you're a teacher  smile  : what should I do? I'm thinking about Pong, because I was able to make a pong game in less than 3 hours using a completely alien language (which was also really ugly) for a competition last year, so I know it's easy to make. But I'm going to be with complete and utter newbies (as in, 5th graders). Also, should I use Scratch (familiar, established, simple to use, but needs downloading/installing), or Snap! (new, radical, awesome, runs-without-downloading-anything, but glitchy, much harder and without a paint editor)?


Hardmaths-MacBook-Pro:~ Hardmath$ sudo make $(whoami) a sandwich

Offline

 

#7424 2013-03-16 03:36:31

bharvey
Scratcher
Registered: 2008-08-10
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

my mom wants me to teach an "intro to game-making" class to the kids in our building.

Ah, so you don't live in a mud hut in a rainforest somewhere.  smile

Yeah, Pong is what I generally pick as a first game project, too.  And you want to use Scratch, not for reasons of difficulty one way or the other, but because the kids will want to share their work with the Scratch audience of a quarter-million (estimated active accounts) other kids.

A good idea if you can swing it is to invite the kids' parents to come work with their kid.  We do that in the elementary school strand of our K12 outreach organization.  It has two big advantages.  (1) After your five hours are up, there's a better chance that the kids will keep going with Scratch if their parents continue to encourage and support them; (2) the kids will be on their best behavior and each parent can be in charge of keeping that kid focused and of answering the easiest of kid questions.

Plan on losing one of the five hours to creating a Scratch account and getting the hang of clicking blocks together.

Actually, you know, there's another choice, namely Scratch 2.0, which avoids the download and, because of cloning, puts Breakout within the bounds of possibility.

And finally, if this is pre-Barcelona, send Jens another talk proposal!  smile


http://cs.berkeley.edu/~bh/sig5.png

Offline

 

#7425 2013-03-16 04:17:19

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Snap! (Build Your Own Blocks) is now on Github
https://github.com/jmoenig/Snap--Build-Your-Own-Blocks

Last edited by Jens (2013-03-16 04:22:00)


Jens Mönig

Offline

 

Board footer