Live data from Hacker News

Google Blockly - a visual programming language

code.google.com

11–20 of 129 posts

Re: Google Blockly - a visual programming language

#13
post #4

Can 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…

You can add an 'else' clause to the 'if' block by clicking the '+' which launches a sub-editor.

Re: Google Blockly - a visual programming language

#16
post #7

The 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

Yep, actually someone else (Dethe Elza) already beat you to a JS version: http://waterbearlang.com/garden.html?plugin=canvas

It was presented at JSConf last year: http://blip.tv/jsconf/jsconf2011-dethe-elza-5942746

Re: Google Blockly - a visual programming language

#19
post #4

Can 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.

Re: Google Blockly - a visual programming language

#20
post #4

Can 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.

It visually represents the grammar of the language with the jigsaw patterns of the keywords, and prohibits connecting bad sequences, etc.
Post reply on HN