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

#226 2012-10-01 18:34:04

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

Not entirely. If we eventually get around to implementing a project editor, it would save to itchy format, and when it comes around to publishing time, it would export to 1.x/ 2.0


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#227 2012-10-01 19:49:03

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

Re: Itchy++ - a Scratch C++ Port

bobbybee wrote:

Not entirely. If we eventually get around to implementing a project editor, it would save to itchy format, and when it comes around to publishing time, it would export to 1.x/ 2.0

I would not recommend that. What I thought (and what is probably best if you want to have a custom format at all) is that you would load Scratch 1.x/2.0 files and convert them into objects in memory. When running a project, you would compile it to bytecode (you can hotswap in changes if the blocks are changed while it is running). When saving, you would serialize the objects in memory as Scratch 1.x/2.0 files.

Last edited by nXIII (2012-10-01 19:49:25)


nXIII

Offline

 

#228 2012-10-01 20:01:25

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

@nXIII - Exactly.  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#229 2012-10-01 20:10:38

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Itchy++ - a Scratch C++ Port

Bytecode = Good.

Perhaps, when you want to play a project, it "compiles" to bytecode (in the same way that C# applications do), saves the bytecode in memory (not in a file), and then a C++ procedure takes care of the execution.  There's no real reason to write all that data to the disk -- you just have to retrieve it again.

As for in-execution editing: I honestly think it'll make our lives simpler just to ignore that feature, and allow the user to either edit scripts or play the project, but not both at once.  Besides, all the stuff for dealing with the Itchy++ UI will interfere with the performance of the project.  That's what happens with Scratch (at least, I assume that's why Scratch projects work so much better in presentation mode). 

So, JIT compilation for the win.

Last edited by amcerbu (2012-10-01 21:21:48)

Offline

 

#230 2012-10-01 20:16:56

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

amcerbu wrote:

Bytecode = Good.

True.

Perhpas, when you want to play a project, it "compiles" to bytecode (in the same way that C# applications do), saves the bytecode in memory (not in a file), and then a C++ procedure takes care of the execution.  There's no real reason to write all that data to the disk -- you just have to retrieve it again.

True.

As for in-execution editing: I honestly think it'll make our lives simpler just to ignore that feature, and allow the user to either edit scripts or play the project, but not both at once.  Besides, all the stuff for dealing with the Itchy++ UI will interfere with the performance of the project.  That's what happens with Scratch (at least, I assume that's why Scratch projects work so much better in presentation mode).

False.
Scratch was slowed down when in editor mode intentionally (still not a good idea.) As long a the editor is not redrawing every frame, there should not be a problem at all.

So, JIT compilation for the win.

Figure out how to do it and I will give you a cookie.  wink

Last edited by MathWizz (2012-10-01 20:17:34)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#231 2012-10-01 20:18:58

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

...why is there a testers group? Any user is a tester. There shouldn't be a list of testers. xD


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#232 2012-10-01 20:47:19

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: Itchy++ - a Scratch C++ Port

Anyone know where to the the cairomm libraries for Windows?

I think I fixed the endian.h for Windows, but can't test cause I'm missing that.

Last edited by pwiter (2012-10-01 20:51:10)


http://i.imgur.com/YBeXc.png

Offline

 

#233 2012-10-01 21:01:19

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

Re: Itchy++ - a Scratch C++ Port

amcerbu wrote:

Perhpas, when you want to play a project, it "compiles" to bytecode (in the same way that C# applications do), saves the bytecode in memory (not in a file), and then a C++ procedure takes care of the execution.

Yes, that's what I meant.

So, JIT compilation for the win.

Do you mean bytecode -> machine code or on-the-fly script -> bytecode?

Now that I think about it, incremental compiling would also be cool.

Last edited by nXIII (2012-10-01 21:01:30)


nXIII

Offline

 

#234 2012-10-01 21:29:23

amcerbu
Scratcher
Registered: 2009-07-21
Posts: 500+

Re: Itchy++ - a Scratch C++ Port

I just caught that embarrassing typo ("Perhpas")... whoops.

Anyway, I don't know that we have the capability to do the whole bytecode to machine code thing.  I was just drawing a parallel.  Rather than parsing directly from the .sb file,  the part of Itchy++ in charge of running the program would simply scan through the so-called bytecode, which would be generated from the scripts.  We might be able to do it with an array of function pointers, each member representing one block (just putting out an idea -- I don't like the idea of a huge switch statement).  I was thinking that each bytecode value could represent an index in that array of function pointers, and we could call the appropriate function by feeding it the current byte value.

Last edited by amcerbu (2012-10-01 21:30:12)

Offline

 

#235 2012-10-02 01:40:45

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

nXIII wrote:

bobbybee wrote:

Not entirely. If we eventually get around to implementing a project editor, it would save to itchy format, and when it comes around to publishing time, it would export to 1.x/ 2.0

I would not recommend that. What I thought (and what is probably best if you want to have a custom format at all) is that you would load Scratch 1.x/2.0 files and convert them into objects in memory. When running a project, you would compile it to bytecode (you can hotswap in changes if the blocks are changed while it is running). When saving, you would serialize the objects in memory as Scratch 1.x/2.0 files.

Exactly what I was thinking because this is meant to be a C++ PORT so it will use the 2.0 format for saving.


http://i.imgur.com/1QqnHxQ.png

Offline

 

#236 2012-10-02 03:47:40

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

Re: Itchy++ - a Scratch C++ Port

Aren't you trying to make an editor as well? In which case you need to write .sb/sb2 files as well, so you'll need to convert back from your "itchy" format as well. Isn't that just complicating things unnecessarily?


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

Offline

 

#237 2012-10-02 07:28:58

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

Re: Itchy++ - a Scratch C++ Port

blob8108 wrote:

Aren't you trying to make an editor as well? In which case you need to write .sb/sb2 files as well, so you'll need to convert back from your "itchy" format as well. Isn't that just complicating things unnecessarily?

There is no itchy format except the objects in memory.


nXIII

Offline

 

#238 2012-10-02 10:56:54

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

Re: Itchy++ - a Scratch C++ Port

nXIII wrote:

blob8108 wrote:

Aren't you trying to make an editor as well? In which case you need to write .sb/sb2 files as well, so you'll need to convert back from your "itchy" format as well. Isn't that just complicating things unnecessarily?

There is no itchy format except the objects in memory.

Whoops, missed a page  tongue  Sorry, ignore me.


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

Offline

 

#239 2012-10-02 11:48:34

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

blob8108 wrote:

Aren't you trying to make an editor as well? In which case you need to write .sb/sb2 files as well, so you'll need to convert back from your "itchy" format as well. Isn't that just complicating things unnecessarily?

That's what I've been saying about this the whole time. At least someone understands why I dislike creating another format.  tongue

We've also come to an agreement, there will be no Itchy file format, just an internal memory structure.


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#240 2012-10-02 11:51:25

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

Re: Itchy++ - a Scratch C++ Port

MathWizz wrote:

blob8108 wrote:

Aren't you trying to make an editor as well? In which case you need to write .sb/sb2 files as well, so you'll need to convert back from your "itchy" format as well. Isn't that just complicating things unnecessarily?

That's what I've been saying about this the whole time. At least someone understands why I dislike creating another format.  tongue

Heh, yeah  tongue

We've also come to an agreement, there will be no Itchy file format, just an internal memory structure.

Sounds good  smile


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

Offline

 

#241 2012-10-02 12:53:17

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

MathWizz wrote:

[...]
We've also come to an agreement, there will be no Itchy file format, just an internal memory structure.

yep. Maybe we could serialize it to a file to turn a project into a .exe, but for now no format...


http://i.imgur.com/1QqnHxQ.png

Offline

 

#242 2012-10-02 17:14:47

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: Itchy++ - a Scratch C++ Port

Working on a wiki page for Itchy.

Not done yet, but it's located here: http://wiki.scratch.mit.edu/wiki/Itchy%2B%2B.

Last edited by pwiter (2012-10-02 17:18:24)


http://i.imgur.com/YBeXc.png

Offline

 

#243 2012-10-03 15:18:55

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

hmm, for me it doesn't seem to render the sprites at all?


http://i.imgur.com/1QqnHxQ.png

Offline

 

#244 2012-10-05 08:08:27

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: Itchy++ - a Scratch C++ Port

TRocket wrote:

hmm, for me it doesn't seem to render the sprites at all?

You need a project with more than 1 sprite, it prints all but one.


http://i.imgur.com/YBeXc.png

Offline

 

#245 2012-10-05 09:35:03

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

pwiter wrote:

TRocket wrote:

hmm, for me it doesn't seem to render the sprites at all?

You need a project with more than 1 sprite, it prints all but one.

I'd like to see this actually happen...


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#246 2012-10-05 10:48:34

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

nice progress guys!
i get sometimes seg faults, but most projects are working  smile
keep going!

if this helps, here is an error message i get on some files:

Code:

itchy: /build/buildd/cairo-1.12.2/src/cairo-pattern.c:187: _cairo_pattern_set_error: Assertion `status < CAIRO_STATUS_LAST_STATUS' failed.
Aborted (core dumped)

Offline

 

#247 2012-10-05 11:47:13

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

roijac wrote:

nice progress guys!
i get sometimes seg faults, but most projects are working  smile
keep going!

if this helps, here is an error message i get on some files:

Code:

itchy: /build/buildd/cairo-1.12.2/src/cairo-pattern.c:187: _cairo_pattern_set_error: Assertion `status < CAIRO_STATUS_LAST_STATUS' failed.
Aborted (core dumped)

What os are you using?


http://i.imgur.com/1QqnHxQ.png

Offline

 

#248 2012-10-05 14:33:57

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

I've just moved lots of stuff around; same functionality as before, but it now prints "Itchy++ v0.0(dev)" when it starts...


http://i.imgur.com/1QqnHxQ.png

Offline

 

#249 2012-10-06 14:06:24

pwiter
Scratcher
Registered: 2010-06-02
Posts: 100+

Re: Itchy++ - a Scratch C++ Port

Just commited my fix for endian.h on Windows. Haven't tested it because I don't have Cairomm for Windows. It should work.


http://i.imgur.com/YBeXc.png

Offline

 

#250 2012-10-06 15:55:55

roijac
Scratcher
Registered: 2010-01-19
Posts: 1000+

Re: Itchy++ - a Scratch C++ Port

TRocket wrote:

roijac wrote:

nice progress guys!
i get sometimes seg faults, but most projects are working  smile
keep going!

if this helps, here is an error message i get on some files:

Code:

itchy: /build/buildd/cairo-1.12.2/src/cairo-pattern.c:187: _cairo_pattern_set_error: Assertion `status < CAIRO_STATUS_LAST_STATUS' failed.
Aborted (core dumped)

What os are you using?

i'm using windows with slashes  tongue



jk, linux

Offline

 

Board footer