Pencil Code with Blockly

214 views
Skip to first unread message

Owen Densmore

unread,
Dec 23, 2013, 1:37:42 PM12/23/13
to blo...@googlegroups.com
A really delightful version of Logo has been written in CoffeeScript: http://pencilcode.net/

I'm teaching my grandkids how to program with the "hour of code".  Blocks vs text makes sense for the youngest, so I'd like to figure out how to "blockify" Pencil Code.

How would I go about doing this?

   -- Owen

Owen Densmore

unread,
Dec 23, 2013, 2:30:35 PM12/23/13
to blo...@googlegroups.com
Oh, and I'd like the script that is revealed to be the Logo/CoffeeScript syntax.

Thanks!


--
You received this message because you are subscribed to a topic in the Google Groups "Blockly" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/blockly/LKa3lZu87mM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to blockly+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Ellen Spertus

unread,
Dec 23, 2013, 3:03:22 PM12/23/13
to blo...@googlegroups.com
On Mon, Dec 23, 2013 at 10:37 AM, Owen Densmore <ow...@backspaces.net> wrote:
I'm teaching my grandkids how to program with the "hour of code".  

Have you looked at all of the one-hour tutorials?  There are a number of very good ones.
 
Blocks vs text makes sense for the youngest, so I'd like to figure out how to "blockify" Pencil Code.

How would I go about doing this?

You can display images on blocks, instead of (or in addition to) words.  This is done for quotation marks on the text block [https://code.google.com/p/blockly/source/browse/trunk/blocks/text.js#31].

Writing a code generator isn't hard.  I did that in a few days for Blockly Lua

Ellen

Owen Densmore

unread,
Dec 23, 2013, 3:37:30 PM12/23/13
to blo...@googlegroups.com
Very nice, thanks!  Good to see how approachable Blockly is.

I did look at a lot of the hour of code, but just a few with Blockly.  Mainly to see how the web pages worked, and how to show the kids the text behind the blocks.

They really loved the angry birds and zombies in the first set of demos.

One question: do people have difficulty transitioning from block style to script style?

   -- Owen


--

Neil Fraser

unread,
Dec 23, 2013, 6:54:29 PM12/23/13
to blo...@googlegroups.com
The creator of Pencil Code is already considering Blockly integration.  David, I've BCCed you, feel free to jump in on this thread.


--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Ellen Spertus

unread,
Dec 23, 2013, 11:58:05 PM12/23/13
to blo...@googlegroups.com
On Mon, Dec 23, 2013 at 12:37 PM, Owen Densmore <ow...@backspaces.net> wrote:
Very nice, thanks!  Good to see how approachable Blockly is.

I did look at a lot of the hour of code, but just a few with Blockly.  Mainly to see how the web pages worked, and how to show the kids the text behind the blocks.

I'd encourage you to check out more of them.  Some are aimed at younger children than Blockly is.
 
One question: do people have difficulty transitioning from block style to script style?

I don't know.

Ellen 

David Bau

unread,
Dec 26, 2013, 5:17:17 AM12/26/13
to blo...@googlegroups.com, pencilcode-development
Hi Owen,

Are you taking a crack at looking at blockly for pencilcode?  I haven't started looking at blockly yet, but if you are, I'd like to help you out (esp on the pencilcode side).  Over the holidays I'm trying to get pencilcode set up so that we can it's easier for contributors to contribute.

I think it would be ideal to try to get something working where user.pencilcode.net/blockly/projectname lets kids see a blockly-based editor for their pencil code projects (at least for their programs that are simple enough to be expressed in blockly).  I figure that the four things to do are...

(1) Actually set up pencilcode so that more than one person can develop and test it (that's what I'm looking at right now - I've not looked at anything below this line yet).
(2) Build a set of blockly blocks appropriate to pencilcode.
(3) Build cs->blockly->cs conversion that we're happy with, to allow kids to load and save projects
(4) Stitch in the blockly editor into the pencilcode ui, probably at /blockly/ instead of /edit/

David

Owen Densmore

unread,
Dec 26, 2013, 12:20:13 PM12/26/13
to blo...@googlegroups.com, pencilcode-development
On Thu, Dec 26, 2013 at 3:17 AM, David Bau <davi...@gmail.com> wrote:
Hi Owen,

Are you taking a crack at looking at blockly for pencilcode?  I haven't started looking at blockly yet, but if you are, I'd like to help you out (esp on the pencilcode side).  Over the holidays I'm trying to get pencilcode set up so that we can it's easier for contributors to contribute.

No, I'm in the midst of a fairly intense effort over at agentscript.org.  But I did give your books to my 2 grandkids, explaining that its part of the journey.  One of them finished the "hour of code" intro that uses blockly, or at least a block oriented front-end to javascript.

I have to admit to being fascinated with the teaching of computing.  I've been told by several very respectable academics that its rare that undergraduates can program.  I guess being around computers long enough that all you *could* do with them is program them has sorta warped my thinking!

I think it would be ideal to try to get something working where user.pencilcode.net/blockly/projectname lets kids see a blockly-based editor for their pencil code projects (at least for their programs that are simple enough to be expressed in blockly).  I figure that the four things to do are...

(1) Actually set up pencilcode so that more than one person can develop and test it (that's what I'm looking at right now - I've not looked at anything below this line yet).
(2) Build a set of blockly blocks appropriate to pencilcode.
(3) Build cs->blockly->cs conversion that we're happy with, to allow kids to load and save projects
(4) Stitch in the blockly editor into the pencilcode ui, probably at /blockly/ instead of /edit/

Boy, its interesting just how important getting the work flow "right" so that others can fork/pull.  I'm just getting agentscript to where it can be handled by others.  It has a gh-pages branch which can really make things complex.  So I'm writing a README.md section that explains what needs to be done to make a pull request work.

Thanks for your wonderful project, and have a happy New Year!

   -- Owen
Reply all
Reply to author
Forward
0 new messages