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

#7476 2013-03-18 18:07:12

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

...because then the language wouldn't be cool enough for the name?  tongue

No, more specific than that.  You can't name your language after the language of a planet of anarchists if the language is full of unnecessary restrictions.

(It's from The Dispossessed by Ursula LeGuin, the greatest SF book ever.)


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

Offline

 

#7477 2013-03-19 00:06:31

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

The first time was for an extended argument about politics with Shadow.

I'd forgotten about that... it was one of the factors in my decision not to associate myself with GOP, instead referring to myself as conservative.

@Blob: more than a single high-quality screen, I'd recommend a dual or triple monitor setup if you don't already have one. In fact, I'm on 1600x900 displays and they work well for me. I feel pretty uncomfortable without them now: one half a screen for Notepad++, another for the Chrome inspector, one for the website I'm developing, and another for other resources. Can't live without it.

Offline

 

#7478 2013-03-19 01:07:41

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

my decision not to associate myself with GOP

And since then it's only gotten... no, let's see if I can stay out of trouble this week.  smile


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

Offline

 

#7479 2013-03-19 04:19:47

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

Re: BYOB 3 - Discussion Thread

shadow_7283 wrote:

@Blob: more than a single high-quality screen, I'd recommend a dual or triple monitor setup if you don't already have one. In fact, I'm on 1600x900 displays and they work well for me. I feel pretty uncomfortable without them now: one half a screen for Notepad++, another for the Chrome inspector, one for the website I'm developing, and another for other resources. Can't live without it.

Yeah, I've been borrowing dad's 1920x1200 and it's so easy to get used to!

Two big monitors would be lovely, but sadly I'm on a Macbook  tongue  (I suppose I could always try one of these, but by then it's all getting a little expensive.) I'll use the Macbook as a second monitor, though, so it's not so bad. I think I'm convinced it's worth getting, thanks  smile


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

Offline

 

#7480 2013-03-19 08:07:06

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

Re: BYOB 3 - Discussion Thread

Once in a while, when I'm doing something big (PowerPoint stuff, short movies), I mirror to the Apple TV.  tongue

Really, though, I desperately need a name. You can't imagine what all is already taken… Even Babel (as in the fish, not the tower, though they both derive from the same thing) is a charset encoder in Scheme.

I want the name to have all Latin characters, not a name of anything else already, and preferably shouldn't be something hard to Google (googling something about a language called 'the' will be painful).

Last edited by Hardmath123 (2013-03-19 08:09:33)


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

Offline

 

#7481 2013-03-19 08:20:33

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

shouldn't be something hard to Google

Indeed. You should try googling "kurt"... It's amazing how many Pythonistas there are called Kurt Something. -_-

If my Barcelona talk were to have one point to take away, it would be this: don't name your project after a common first name.  tongue


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

Offline

 

#7482 2013-03-19 08:36:37

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

Re: BYOB 3 - Discussion Thread

Hehe, don't name your language "Snap!" for that matter, it's way too common and too generic  smile


Jens Mönig

Offline

 

#7483 2013-03-19 08:39:30

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

Re: BYOB 3 - Discussion Thread

Well, I found this, it's really professional looking.  smile  Did you integrate snapin8r's 2.0 functionality yet? Then we can just add all of snapin8r into a part of Kurt and just have one script to do:
BYOB => Snap!
Scratch 1.4 => Snap!
Scratch 2.0 => Snap!


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

Offline

 

#7484 2013-03-19 13:56:07

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I want the name to have all Latin characters, not a name of anything else already, and preferably shouldn't be something hard to Google (googling something about a language called 'the' will be painful).

Anything computer-related, or anything at all? The latter will be tough.


nXIII

Offline

 

#7485 2013-03-19 14:00:04

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

Re: BYOB 3 - Discussion Thread

Snap! extension update
I've added a new block module to the WiiSnap repo on GitHub. It allows cross-computer access to the hardware server! I'll update Snap-NXT a bit later.  smile


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

Offline

 

#7486 2013-03-19 14:48:43

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I found this, it's really professional looking.  smile

Thanks! Bryce Boe contributed the setup.py code a while back and put it on PyPI.  smile

Did you integrate snapin8r's 2.0 functionality yet? Then we can just add all of snapin8r into a part of Kurt

Not yet, but that's the plan! (I missed my self-imposed SIGCSE deadline, which was very sad — but it was a very ambitious one...  tongue ) I have been playing with the Scratch 1.4/2.0 blockspecs, trying to figure out a decent way to do script conversion.

My plan for kurt 2 is to provide a single API for getting data out of Scratch and its mods. Each supported file format will be a kurt "plugin" and will be responsible for converting from JSON/XML/object table/whatever to kurt's internal representation (and back again).

http://i.imgur.com/6GHI054.jpg

Plugins should be able to inherit stuff from other plugins, and just redefine the blocks and classes that the format needs. So BYOB 3 would inherit the object table stuff from Scratch 1.4.

Scripts are slightly more complicated. Each plugin can define the blocks it uses, giving the equivalent blocks from another format, and kurt will use that to build a global block database that it can use to convert them. (So kurt will be responsible for converting scripts, whereas each plugin will be responsible for converting everything else. The theory's a work-in-progress...)

I'm hoping that:
* converting from any format to any other via the single internal representation should be easy
* analysis tools like Hairball can support Scratch mods with zero extra effort
* supporting new file formats (Enchanting, say) should be as easy as writing a plugin that inherits the BYOB3 one and adds a few new blocks.

Your note about showmycode.com was insanely useful — I'm parsing the 2.0 blockspecs straight out of the decompiled ActionScript, which is awesome. And I'm going to reuse your downloader code for the Scratch 2.0 plugin.

I was going to use your Scratch-to-Snap! dictionary for the Snap! plugin, too — I'm hoping that once I've finalised the API, you'll be up for rewriting snapin8r as a kurt plugin! You'll need to support reading the XML into kurt as well as writing, of course  wink

The only sad thing about my plan is that the cleanest way appears to be to write kurt 2 as a layer on top of the existing kurt. This does, however, have the tremendous advantage that I can avoid breaking the existing API.  tongue

I've been reading some stuff on API design, and watching How To Design A Good API, to try and make sure I get it right this time...! I'll post a more detailed spec soon  smile

Apologies for long post — I'd love comments, or requests for clarification!


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

Offline

 

#7487 2013-03-19 14:51:09

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I mirror to the Apple TV.  tongue

You can do that? O_o


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

Offline

 

#7488 2013-03-19 19:02:28

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I want the name to have all Latin characters, not a name of anything else already, and preferably shouldn't be something hard to Google

That's easy:

xazzl
trezzax
pooqua
lakko
morryal

etc.

@blob, tb10: I'm in a hurry right now but will read your interesting-looking messages this evening!


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

Offline

 

#7489 2013-03-19 21:11:01

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

Hardmath123 wrote:

I mirror to the Apple TV.  tongue

You can do that? O_o

Yeah. If you've got OSX ML and an Apple TV.  smile  We use it to stream Amazon Movies, it works great.

(I'm thrilled you added Enchanting as a mod—that is really encouraging.  tongue )

I used ShowMyCode to make the dictionary that's in the snapin8r project—it converts Scratch blockspec to Snap! blockspec.

How will you handle conversions between totally messed-up file types, like Enchanting to Scratch? (Enchanting is built on top of BYOB ( big_smile ), so you have both lambda/first-class data and NXT connection scripts. Ew.)

Also, I'm fine with Snapin8ing a plugin on top of Kurt, but I think you should to this like Jens handles changesets. Anyone interested just contributes a Python script to convert and deconvert from their mod to some common spec you define.

@nXIII: Name of anything comp-related. I think I'll go with Bubble, though that could have potential Googleability issues with Bubble Sorts. Oh, well.

Last edited by Hardmath123 (2013-03-19 21:22:25)


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

Offline

 

#7490 2013-03-19 22:14:22

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

I think I'll go with Bubble, though that could have potential Googleability issues with Bubble Sorts. Oh, well.

JFCL


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

Offline

 

#7491 2013-03-20 00:25:51

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

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

It allows cross-computer access to the hardware server!

Is this a security issue?  Serving just localhost works behind a firewall and doesn't open any doors to people looking for ways to use the server to attack the computer.


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

Offline

 

#7492 2013-03-20 00:46:58

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

Re: BYOB 3 - Discussion Thread

blob8108 wrote:

I'm hoping that:
* converting from any format to any other via the single internal representation should be easy

How hard are you going to try to downconvert advanced features?  In principle you could simulate BYOB in Scratch 1.4 by using lists with gensyms to simulate pointers, one for the dynamic stack and others for lexical environment frames, but it's probably not a good use of your time.  OTOH I bet you could simulate nesting sprites, by using
scripts like FOREVER [GO TO (SPRITE3)] only a little more complicated.

* analysis tools like Hairball can support Scratch mods with zero extra effort

Hairball?

I've been reading some stuff on API design

Just make sure Snap! can call it.  smile


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

Offline

 

#7493 2013-03-20 01:36:31

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

Hardmath123 wrote:

I think I'll go with Bubble, though that could have potential Googleability issues with Bubble Sorts. Oh, well.

JFCL

I really don't get it, but I have a feeling it's not positive…  tongue

How about Skew? It has no computer-relation (verified with a quick google of Skew Programming Language), and it sounds nice.

EDIT: Here's a radical suggestion: "_" should be an infix operator, which is a wrapper for the special form "GET property of object". something.b should be a shorthand for something_"b".

Also, I can use the dot syntax for list querying too, right? Why is mylist.5 a bad idea? Which looks nicer:

Code:

print colors.(indices.5)
print colors[indices[5]]

Last edited by Hardmath123 (2013-03-20 02:22:51)


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

Offline

 

#7494 2013-03-20 02:25:09

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

* analysis tools like Hairball can support Scratch mods with zero extra effort

Hairball?

Yes, Hairball.


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

Offline

 

#7495 2013-03-20 04:41:55

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

blob8108 wrote:

I'm hoping that:
* converting from any format to any other via the single internal representation should be easy

How hard are you going to try to downconvert advanced features?

Eurgh, I haven't considered hacks like that yet. Does Snap! have all the features of Scratch 2.0 yet?

I think I'll be going for translating the sense of the blocks -- if there's a trivial hack like the one for the "when" hat, I'll use it, but anything more complicated is a no. I'd like to both warn the user, and preserve the information in the file -- a log message when converting, and leave a comment in the file where the non-existent block was used.

I guess my goal really is to have universal conversion for a subset of features: for example, currently there's no way to convert 2.0 projects back to 1.4 ones, even if you haven't used any new blocks. That's what I'm going for.

So no, I'm not going to simulate any flavour of BYOB in 1.4.  tongue

Hairball?

As Hardmath pointed out, it's a static analysis tool for Scratch projects. It can check for things like reachable scripts and proper initialisation. It was presented at SIGCSE, which I believe you attended...  wink

I've been reading some stuff on API design

Just make sure Snap! can call it.  smile

Ah, I have the same problem as Hardmath's snapin8r. Anyone offering free Python hosting...?  tongue


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

Offline

 

#7496 2013-03-20 04:44:56

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

Re: BYOB 3 - Discussion Thread

Hardmath123 wrote:

blob8108 wrote:

Hardmath123 wrote:

I mirror to the Apple TV.  tongue

You can do that? O_o

Yeah.

Nice!

(I'm thrilled you added Enchanting as a mod—that is really encouraging.  tongue )

I'm not considering official support, you realise. It's just my example of a "something that should be easy for someone to write a plugin for".  tongue

I used ShowMyCode to make the dictionary

Yeah, I saw your comment in the source -- that's where I got the idea from, thanks  smile

How will you handle conversions between totally messed-up file types, like Enchanting to Scratch?)

Not sure. As I was saying to Brian, I'm going for a subset of blocks, I think.

The main idea is that each block concept has a single, unique representation that analysis tools can use. Conversion is more of a grey area.  smile

Anyone interested just contributes a Python script to convert and deconvert from their mod to some common spec you define.

Yup, that's the idea of kurt plugins precisely.  smile


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

Offline

 

#7497 2013-03-20 05:27:59

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

Re: BYOB 3 - Discussion Thread

Obsolete blocks?  hmm

Also, what about vector graphics? Will you rasterize them with Cairo, or do you have a neater trick? I really would prefer a pure-Python Kurt with no strings attached (I never liked installing modules).

How about (take a deep breath) writing Kurt 2.0 in JavaScript? That solves most of your problems—Snap! can use it, and you can rasterize all pictures into PNG (there's a nice little library called SVG-Canvas). You would ideally define an object called Kurt, and interface would be something like this:

Code:

var a_project = Kurt.read("http://…", a ZIP file, a YPR file, an XML file, or an SB file);
a_project.convert(Kurt.Snap OR Kurt.Scratch2 OR Kurt.Scratch14 OR Kurt.BYOB);

Of course, it would be a lot of work. But since you will need to redo a few parts of Kurt, rewriting in JS may not be as tough. And JS has all the tools you need, except reading contents of URLs (which we can beg the ST to allow, or cheat with this (is that legal, BTW?)*).

I'd be delighted help you out if you decided to do that after all.  smile

*Trust a coder to nest parenthesized statements… I did that on an English test once.

EDIT: ZIP file I/O.

Last edited by Hardmath123 (2013-03-20 05:32:13)


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

Offline

 

#7498 2013-03-20 06:55:37

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

Re: BYOB 3 - Discussion Thread

@bharvey: CS question again. Have you seen the "official" JSON spec? ([urlhttp://www.json.org/[/url])

I found the diagrams they had very visually pleasing and easy to understand. So I figured there had to be an easy way to represent them—but I couldn't think of one. You could theoretically write a large regex to match them (in fact, it resembles those diagrams in a book by you about finite state machines and regexes that I once chanced upon; yet these seem fundamentally different, for some reason), but I was hoping for something that very directly translated into one of those webs.

http://i46.tinypic.com/t6w9ko.gif

It would be ideal for the parser for Skew, because then all I need to do is define what a "word" is, what a "phrase" is, and what "sentence" is, and let it rip.

If there isn't any format like that, I might make that a mini-project: to create a tool to graphically generate a "web" and output some JSON file containing its data, which can then be input into a downloadable parser.

EDIT: XML?

http://i48.tinypic.com/2d0kz2p.png

(Excuse my handwriting, Penultimate's lefty mode isn't too great. And there should be arrows, but it's hard with my worn-out iPad pen.)

Last edited by Hardmath123 (2013-03-20 08:21:41)


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

Offline

 

#7499 2013-03-20 08:46:21

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

Re: BYOB 3 - Discussion Thread

bharvey wrote:

technoboy10 wrote:

It allows cross-computer access to the hardware server!

Is this a security issue?  Serving just localhost works behind a firewall and doesn't open any doors to people looking for ways to use the server to attack the computer.

Unless you port-forward or use the extensions on a public network, there shouldn't be. Also, there's actually no way to get access to a file on your computer through the server unless you specifically allow access to it.

The good thing about cross-computer access is that you can now program hardware using an iPad or other tablet, and you can still use hardware extensions that require a different OS. (WiiSnap, by the way, is Linux only.  sad  )

Also, I have no idea how to restrict access to localhost.  tongue

EDIT: If it helps, I can make it so that you can only use the networked block module with a hardware server on network mode.

Last edited by technoboy10 (2013-03-20 08:59:23)


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

Offline

 

#7500 2013-03-20 08:55:44

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

Re: BYOB 3 - Discussion Thread

technoboy10 wrote:

Also, I have no idea how to restrict access to localhost.  tongue

Bind your server to 'localhost'?  tongue


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

Offline

 

Board footer