Jens wrote:
@technoboy10: Got your proposal for the Barcelona Scratch conference, Yay!!
More to come today.
EDIT1: Cool, 7400th reply.
Last edited by technoboy10 (2013-03-14 08:39:32)
Offline
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.
Offline
@Hardmath: show code!
Offline
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:
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)
Offline
blob8108 wrote:
@Hardmath: show code!
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.
Last edited by Hardmath123 (2013-03-14 10:13:21)
Offline
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.
I didn't pay him to say that, Jens.
Offline
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.
Offline
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)
Offline
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.
Offline
Hardmath123 wrote:
blob8108 wrote:
@Hardmath: show code!
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
it should also work with Android
I could test — I think Chrome for Android supports.
Offline
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
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?
Offline
technoboy10 wrote:
Jens wrote:
@technoboy10: Got your proposal for the Barcelona Scratch conference, Yay!!
More to come today.
You're submitting multiple proposals?
Offline
blob8108 wrote:
You're submitting multiple proposals?
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.
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)
Offline
bharvey wrote:
EDIT: ... but in this case my guess is that they'll be combined into one session.
Actually, I am submitting multiple proposals.
Offline
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 (which is rather lovely, if I do say so myself! )
Last edited by blob8108 (2013-03-15 14:07:41)
Offline
#Barcelona All of my proposals have been submitted! ( )
Last edited by technoboy10 (2013-03-15 18:13:26)
Offline
technoboy10 wrote:
#Barcelona All of my proposals have been submitted! ( )
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.
Last edited by bharvey (2013-03-15 20:09:32)
Offline
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!.
Something interesting happened in my life again… 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 : 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)?
Offline
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.
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!
Offline
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)
Offline