blockly-samples icon indicating copy to clipboard operation
blockly-samples copied to clipboard

Go Generator

Open Chillance opened this issue 6 years ago • 6 comments

Hi,

This project is quite the hidden little gem.

I was looking around, but I couldn't see anything about generating Go (golang) code. You have for Dart, Javascript, PHP and Python, but I think it would be pretty cool to also add Go support.

I'm sure the Go community would love that.

Any plans to add this support?

Thanks!

Chillance avatar Mar 27 '19 01:03 Chillance

Blockly assumptions and primitives are optimized for untyped/dynamically typed languages, at the moment, though we have made some progress on this last. That isn't to say it isn't currently possible. We have seen external developers make generators for C and Java.

https://github.com/google/blockly/issues/1494 is a significant blocking issue for broader support.

AnmAtAnm avatar Mar 27 '19 03:03 AnmAtAnm

It is also worth noting we haven't added a supported language in over three years. The team prefers to see external developers write new generators, we are happy to support and help address concerns raised by them in their efforts.

AnmAtAnm avatar Mar 27 '19 03:03 AnmAtAnm

Hello, this is a bit old issue, but I started working on a Go generator here : https://github.com/conejoninja/blockly/tree/go

I have a very specific use case in mind: TinyGo + robotics + education. It's strongly biased and with limited language support.

conejoninja avatar Apr 26 '20 12:04 conejoninja

I'm transferring this issue to blockly-samples, where we would be interested in seeing a go generator as a plugin (either first-party or third-party). @conejoninja are you still developing your tinygo generator?

rachel-fenichel avatar Sep 21 '20 20:09 rachel-fenichel

Very excited to find the work by @conejoninja here! I had previously stumbled upon a 2016 effort to write a blockly interpreter fixermark/goblockly and a gopherjs wrapper for Blockly ionous/gblocks.

StevenACoffman avatar Jan 13 '21 15:01 StevenACoffman

@rachel-fenichel I've just seen your comment. I'm still developing it, I was recently a father and development has slowed but I plan to work on it again. The tinygo generator outputs regular go, only most of the blocks are focused on robotics (tinygo drivers) . I would gladly use and contribute to any other go generator available, so I could focus on custom blocks and learning materials.

conejoninja avatar Jan 13 '21 16:01 conejoninja