roijac wrote:
http://nullpointer.ph/questions/3021/in-oop-what-is-so-important-about-information-hiding
^^![]()
>>sourceforge forums![]()
I can't access the forums for some reason. Can we just keep the discussion in here?
Offline
roijac wrote:
weird, can you still not access it?
and what command do i need to update the repo?![]()
edit: nevermind, i got it![]()
Hmm, now I can. Over time, I'll end up forgetting about those forums. Scratch is the only site I've stayed on permanently. So if we just keep the discussion here, I'm less likely to abandon the project.
We'll go with importing. So how should we set up the program?
Offline
Haha. Yeah, if we don't plan, it'll never even get done.
I'm thinking of having the same syntax as the Scratch Forum Blocks. What are your thoughts?
Offline
Yeah, we can change the ([<>]) to something else that's more reasonable.
Offline
roijac wrote:
but it's still unreadable, especially with nested blocks :S
maybe we should make it more like python functions...
I write my Scratch Blocks like this:
when gf clicked set [var v] to (1234567890) forever if <touching [sprite v]?> say [How are you?] for (3) secs end
When ever I try to simplify it though, it gets confusing how [text] and (numbers) will end up working. So I think how it is right now is pretty good.
Offline
roijac wrote:
ok, i'm good with it
![]()
maybe hat blocks should be like this?:Code:
greenflag: some code end script clicked: some code end scriptshould i write a parser?
![]()
Maybe ":end" should be used for the end of a script instead of "end script". And yes, a parser would be nice.
Offline
roijac wrote:
okay, i'll try to finish it till next week
![]()
you're going to work on UI?
Not sure. I have no idea how to use wx or tkinter.
If you get a base up with a couple basic blocks, then I might be able to code everything else. If you have anything specific that isn't related to the GUI, I can probably work on it.
Offline
Hmm, okay. I'll do DTD first.
<!DOCTYPE meow_project [ <!ELEMENT meow_project (meow_settings, project_settings, project_sprites)> <!ELEMENT meow_settings (version)> <!ELEMENT version (#PCDATA)> <!ELEMENT project_settings (author, name)> <!ELEMENT author (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT project_sprites (#PCDATA)> <!ELEMENT sprite (name, costumes, sounds, scripts)> <!ELEMENT name (#PCDATA)> <!ELEMENT costumes (costume)> <!ATTLIST costume id CDATA #REQUIRED> <!ELEMENT sounds (sound)> <!ATTLIST sound id CDATA #REQUIRED> <!ELEMENT scripts (script)> <!ATTLIST script id CDATA #REQUIRED> ]>
What do you think?
Offline
Hi guys!
Great work so far, sorry for not being around.
I'm not exactly a coding master, but I know a few things. I'd love to help out with syntax ideas, art for the GUI, and website management.
Sorry for not getting the site up, I've been really busy lately and I keep on meaning to but life gets in the way.
I can't check out the sourceforge site because it's blocked on my school laptop (Which I'm on right now ). I'll see it when I get home.
So what have we decided on the site, sharing files, and other things?
Offline
<!DOCTYPE meow_project [ <!ELEMENT meow_project (meow_settings, project_settings, project_sprites)> <!ELEMENT meow_settings (version)> <!ELEMENT version (#PCDATA)> <!ELEMENT project_settings (author, name)> <!ELEMENT author (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT notes (#PCDATA)> <!ELEMENT project_sprites (#PCDATA)> <!ELEMENT sprite (name, costumes, sounds, scripts)> <!ELEMENT name (#PCDATA)> <!ELEMENT costumes (costume)> <!ATTLIST costume id CDATA #REQUIRED> <!ATTLIST costume name CDATA #REQUIRED> <!ELEMENT sounds (sound)> <!ATTLIST sound id CDATA #REQUIRED> <!ATTLIST sound name CDATA #REQUIRED> <!ELEMENT scripts (script)> <!ATTLIST script id CDATA #REQUIRED> ]>
I'm still trying to figure out how we should implement images and sounds all into a single file.
Offline
parser development is active
#Only proof of concept import re class ParseError(Exception): def __init__(self, message): self.message = message def __str__(self): return repr(self.message) specs = [ r'move %n steps', r'turn %n degrees', r'point in direction %n', r'go to %n:%n', r'set x to %n', r'set y to %n', r'change y by %n', r'change x by %n', r'stop script'] for i in range(len(specs)): specs[i] = specs[i].replace('%n', r'([0-9.]*)') #Another symbols come here :) def getinputs(block): for spec in specs: if re.match(spec, block): print 'Found block spec!\n' + block + ' is ' + spec print 'Inputs are ' + str(re.match(spec, block).groups()) break else: raise ParseError('Block not recognised!') if __name__ == '__main__': block = 'turn 12.43 degrees' getinputs(block)
Offline