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

#7526 2013-03-22 04:23:55

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

Hardmath123 wrote:

To test it on an iPad, dump this file into a the snap source, add changes.js to the HTML file, and then run this server:

Code:

#!/usr/bin/python

from twisted.web.server import Site
from twisted.web.static import File
from twisted.web.resource import Resource
from twisted.internet import reactor

import socket
IP = socket.gethostbyname(socket.gethostname())

root = Resource()

mstatic = File(raw_input("Input the directory where Snap! is located:\n>>> "))
root.putChild("snap",mstatic)

factory = Site(root)
reactor.listenTCP(8000, factory, interface=IP)
print "Connection successful. Open Safari on an iPad and go to:"
print IP+":8000/snap/snap.html"
reactor.run()

Is that just a static webserver to serve up a directory?

Yeah—a nice convenient way to test stuff on an iPad.


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

Offline

 

#7527 2013-03-22 08:43:16

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

nXIII wrote:

Well, Opera mini doesn't.  tongue

Apparently Opera mobile does. 0_0

Offline

 

#7528 2013-03-22 18:00:57

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

Re: BYOB 3 - Discussion Thread

I was ill today, so I wrote a little JS tool to generate scratchblocks code straight from 2.0 projects. @Hardmath Thanks for mentioning corsproxy!

The 2.0 format is much cleaner. @n Have you written that JSON format for Snap! yet?  tongue

If I still feel ill tomorrow, I'll get started on that Snap! web browser...  wink

EDIT: eh heh heh.  tongue
http://i.imgur.com/of5ElSU.png

Last edited by blob8108 (2013-03-22 18:14:44)


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

Offline

 

#7529 2013-03-22 19:49:59

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

Re: BYOB 3 - Discussion Thread

Purple?  They made DEFINE purple?  I was happier with brown.


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

Offline

 

#7530 2013-03-22 21:05:48

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

Re: BYOB 3 - Discussion Thread

So was the rest of the community…


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

Offline

 

#7531 2013-03-22 21:08:49

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

So was the rest of the community…

Ah, you're online.  I replied to your comment.


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

Offline

 

#7532 2013-03-23 07:45:13

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

technoboy10 wrote:

Snapduino pre-pre-alpha is out now (you can turn on and off a digital pin  tongue )! http://www.github.com/technoboy10/snapduino

You're awesome.  Let us know when it's ready to put on the Snap! page.

Thanks! It'll probably be ready in a week or so. (I still don't know to handle multiple Arduinos, though).

Last edited by technoboy10 (2013-03-23 07:46:54)


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

Offline

 

#7533 2013-03-23 09:43:10

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

So was the rest of the community…

Ah, you're online.  I replied to your comment.

Yeah, I wrote back—check your messages. Thanks a lot, Brian.


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

Offline

 

#7534 2013-03-24 10:34:50

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

Re: BYOB 3 - Discussion Thread

This might be an interesting project to watch:
https://github.com/TsvetanUsunov/SNAP-OLinuXino

It's a Snap! extension for an embedded Linux board.


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

Offline

 

#7535 2013-03-24 11:45:03

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

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

a Snap! extension for an embedded Linux board.

Looks like so far the project is just a readme... Maybe you should collaborate with the guy?  Or just point him at your code for one of the other devices?

(Or should I do that, since we don't know him and I'm an adult?)


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

Offline

 

#7536 2013-03-24 11:58:35

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

technoboy10 wrote:

a Snap! extension for an embedded Linux board.

Looks like so far the project is just a readme... Maybe you should collaborate with the guy?  Or just point him at your code for one of the other devices?

(Or should I do that, since we don't know him and I'm an adult?)

Actually, it's going to be based on my code.  big_smile  I just need to put up some documentation on how to make an extension.

Last edited by technoboy10 (2013-03-24 11:59:32)


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

Offline

 

#7537 2013-03-24 12:47:12

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

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

big_smile

big_smile !

Hey, can you program a robot to dig through the huge pile of paper on my desk and find all the income-tax-related ones?   tongue


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

Offline

 

#7538 2013-03-24 14:05:04

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

technoboy10 wrote:

big_smile

big_smile !

Hey, can you program a robot to dig through the huge pile of paper on my desk and find all the income-tax-related ones?   tongue

If they're all labeled with QR codes, why not?  tongue


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

Offline

 

#7539 2013-03-24 14:12:49

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I'll give you the gdocs zip link…

EDIT: Here's the closed-source mac-only version: https://docs.google.com/file/d/0B1UC0dD … sp=sharing. I'll make a new ZIP with annotated source and instructions later today, but for now this should suffice.  smile

What I'd like is a single URL to which we can send people of all operating systems where they can download the right thing for their platform.  Tnx.


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

Offline

 

#7540 2013-03-25 05:38:26

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

Re: BYOB 3 - Discussion Thread

If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up. Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?


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

Offline

 

#7541 2013-03-25 10:37:23

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up. Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?

On the Mac we can wrap a shell script in a Platypus app.

Won't sourceforge or github work as a repository?  If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.


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

Offline

 

#7542 2013-03-25 10:49:08

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Won't sourceforge or github work as a repository?  If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.

I'd be happy to put snapin8r on GitHub for you (since I'm going to be adding it to Kurt at some point anyway...  wink  )

Hardmath123 wrote:

If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up.

You can use Github Pages for hosting, too. That's how I hosted the scratchblocks2 test page; it's essentially just a separate branch on GitHub.

Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?

Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...

Last edited by blob8108 (2013-03-25 10:57:13)


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

Offline

 

#7543 2013-03-25 11:35:41

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...

Umm, we want people who aren't software developers to be able to use it!


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

Offline

 

#7544 2013-03-25 12:32:53

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

blob8108 wrote:

Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...

Umm, we want people who aren't software developers to be able to use it!

Oh, absolutely! But Python sources is much better than compiled pyc files...  tongue


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

Offline

 

#7545 2013-03-25 15:36:56

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Won't sourceforge or github work as a repository?  If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.

Yeah, GitHub is really nice for this kind of thing.


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

Offline

 

#7546 2013-03-25 18:01:36

shadow_7283
Scratcher
Registered: 2007-11-07
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Darn, I was going to reverse engineer the source with Uncompyle but you used Python 3, didn't you?

Offline

 

#7547 2013-03-25 19:28:17

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

Darn, I was going to reverse engineer the source with Uncompyle but you used Python 3, didn't you?

If you mean Snapin8r — it's definitely not Python 3.  tongue  </impersonate=Hardmath>

Last edited by blob8108 (2013-03-25 19:28:38)


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

Offline

 

#7548 2013-03-25 23:59:23

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

bharvey wrote:

Won't sourceforge or github work as a repository?  If you don't want to make an account there, perhaps you could send files to tb10, who's done this before for his projects.

I'd be happy to put snapin8r on GitHub for you (since I'm going to be adding it to Kurt at some point anyway...  wink  )

Hardmath123 wrote:

If anyone's willing to host a makeshift HTML on their dropbox, I can whip something up.

You can use Github Pages for hosting, too. That's how I hosted the scratchblocks2 test page; it's essentially just a separate branch on GitHub.

Ok, great!

Do you care about the source? Also, would you like me to try and compile everything with the SLeopard Python compiler (that was removed in Lion/ML for reasons unknown to mortals…), or are you ok with telling people to execute shell scripts/batch scripts?

Just distribute the source Python files (like the ones you sent me), and then it should work across platforms...

Alright. I'll also add an optional shell script for Unix and see if I can write a simple Batch script for Windows.

Should I use tkinter for a GUI, or are people ok with typing on a command-line? I really don't want tkinter, because it's iffy on Windows and I always found it rather glitchy on Mac (excessive flickering with askstring…).


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

Offline

 

#7549 2013-03-26 00:52:18

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

Alright. I'll also add an optional shell script for Unix and see if I can write a simple Batch script for Windows.

I vote for slick spiffy installers (just an app will do on the Mac, but probably an Inno Setup installer for Windows) for the normal-people OSes.  It can be as ugly as you like for Linux.  smile


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

Offline

 

#7550 2013-03-26 03:19:01

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

Re: BYOB 3 - Discussion Thread

Can someone test this neat trick I found for Windows? Add this to the top of a Python file:

Code:

@setlocal enabledelayedexpansion && python -x "%~f0" %* & exit /b !ERRORLEVEL!

and it should be double-clickable…

http://halotis.com/2009/08/21/running-p … z2OczZyBfy


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

Offline

 

Board footer