Google Blockly - a visual programming language
11–20 of 129 posts
Re: Google Blockly - a visual programming language
#12Definitely worth watching.
Re: Google Blockly - a visual programming language
#13Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
An "else" would help; you can add one by hitting the + symbol on the if. With the else, you can get the shortest program that'll solve the maze (transcribing using approximate notation in lieu of a screenshot): while True: if wall(AHEAD): turn(LEFT) else: move(FORWARD) turn(RIGHT) However, the addition of one more if makes the solution much faster and look more sensible, by not turning to the right and immediately ba…
Re: Google Blockly - a visual programming language
#14Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
Re: Google Blockly - a visual programming language
#15Re: Google Blockly - a visual programming language
#16The UI for this reminds me a lot of Scratch from MIT.
Indeed. I wrote a similar framework in Actionscript / Flex a few years ago, actually with a lot of input from the Scratch team. I've been thinking about porting it to JS recently. Glad to see someone beat me to it :) Edit: Here's my old Actionscript library in case anyone is interested. https://github.com/trun/flashblocks
It was presented at JSConf last year: http://blip.tv/jsconf/jsconf2011-dethe-elza-5942746
Re: Google Blockly - a visual programming language
#17Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
Edit: I didn't know that an else was possible, so I had to do it this way.
Re: Google Blockly - a visual programming language
#18Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
while !wall(AHEAD):
move forward
turn left
while wall(AHEAD):
turn rightRe: Google Blockly - a visual programming language
#19Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
Re: Google Blockly - a visual programming language
#20Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
Weird, that looks like you're manipulating blocks of text with the mouse. How is that a "visual programming language"? It just seems to be a fancy text editor.