I'm very impressed! Congratulations!
Taifun
Impressive!
I'm experimenting with a new transformer written in Golang, that compiles to WebAssembly to run directly on the client side. This helps to reduce overhead.
It has a better live coding support with ability to mark empty sockets.
What is the motivation to use golang versus using a framework like treesitter?
Hi Evan, the project originally consists of two main parts
- Blockly Transformer and Mist Code Generator - written in Kotlin for technical flexibility
- Mist Syntax Parser, and Runtime - written in Pure Java 7 for portability
The motivation to write the Syntax Parser and the Runtime in Java 7 was to keep it as lightweight as possible without any dependency. This allows it to run anywhere - Desktop, Android and even on Web.
We use TeaVM to compile Java Bytecode to JS. For this, we need to keep the project as simple/lightweight as possible (avoid new Java/Kotlin features, or libs that may complicate the process).
Additionally, I've been writing my own Parsers for quite a few years now. So I'm pretty comfortable setting things up quickly in a matter of two or three days.
The problem with having the Blockly Transformer and Code Generator written in Kotlin is that we need to host it on a Server. The technical nature of it makes it complected to run 'em on the client's side.
I was looking to rewrite them in a language that can compile to WebAssembly, that also has a good XML Parsing support. I discovered Go. It has a robust in-built XML Parser (You define data structs to parse XML). So in a matter of two days, I got the Blockly Transformer and Code Generator completed and written in Golang.
Demonstration of the Falcon transformer.
A simple fib function, followed by two examples of complex list manipulation and logical expressions, taken from an official App Inventor tutorial.
Falcon — a syntax-to-block transformation engine. Soon it'll be the very core of the syntax-block bi-directional transformer.
Currently, it has a full 1:1 syntax support for all the in-built blocks.
I've designed a new version 2 Mist syntax, that further adapts to App Inventor's unique nature and requirements. The design — influenced by many good elements of various languages ( Simplicity of Python, Transformers from Kotlin, with style of Golang)
But we've got a long way to go — I'm designing the syntax in a way i.e. easier for humans and feasible for LLMs to consume ( without reinventing a lot of stuff ).
This requires us to build a smart chain of architecture that'd involve complex parsing and mapping techniques (type resolution, flow predictions) — and we are just starting.
I'll be sharing a live version of the implementation as adequate resources (e.g. documentation) and other technical requirements are satisfied.
Thank you
Kumaraswamy B G
Workspace
The Falcon workspace integrates App Inventor Blockly and one way syntax transformation. (With some AI editing abilities, if you got the key)
kot.ekita.me:8080 (allow http)
Personally, the best way to try it out (by quality & without using API keys)
- Give ChatGPT the whole Falcon language specification.
- Give it instructions, broken down into very smaller parts.
- Paste the generated code in the Falcon workspace.
- Magic!
During the process, you may encounter temporary pop-up errors in the workspace. You can ignore them (simply close them).
Updates
- (May 24, 3:14 PM, IST): Fixes function, or body empty error, while slow typing
Astounding!!
This is an awesome project!
I want to try it out, but unfortunately, the link you provided in the first post is not working. I would like to watch it and interact with it
But based on the amount of progress that's already achieved, I think it will be quite useful, and I also hope it's integrated into AI2 someday.
This is so cool.
Fixed it! mist.ekita.me
Do note that this version uses the first version of the transformer (written in Kotlin), and we've already come a long way (a few things were drastically changed)
Hi friends, sorry I'm not been able to give time to this project, I'm just stuck between too many things (School, SAT prep, other works) and some downs in my life. Wish to get back to this project asap.
𝗙𝗔𝗟𝗖𝗢𝗡 𝗧𝗥𝗔𝗡𝗦𝗙𝗢𝗥𝗠𝗘𝗥
ᴀᴜɢᴜꜱᴛ ᴜᴘᴅᴀᴛᴇ
Taifun's Bluetooth Chat app example with Falcon Transformer
We have achieved complete 100% directional Syntax ⟷ Block transformation support for all kinds of App Inventor blocks, with a wide range of advancements.
𝗛𝗜𝗚𝗛𝗟𝗜𝗚𝗛𝗧𝗦
-
Complete bidirectional Syntax—Blockly transformation achieved. Includes added support for generic blocks, events, and helper blocks.
Documentation.
When you edit the blocks, the changes are reflected in the Mist panel, and vice versa; if you edit the code, the blocks are updated accordingly.
-
Support for handling empty sockets.
-
Replaced old math converter syntax with math functions.
-
A new
compute
block. -
Differential merger mechanism, merges two instances of slightly different codes, one written by a human and the other by a machine, into a single output, which preserves the original human formatting.
The top left card displays the code written by a human in a specific format, and the top right card displays the code generated by a machine. The only changes between those two cards are the check n ? text
and n ? number
.
Those two blocks of code are then merged, preserving the human formatting over the machine's.
It's still in the experimental and testing phase; I've only rolled out the modest implementation.
𝗧𝗥𝗬 𝗜𝗧
mist.ekita.me
(sometimes try with hard reload Ctrl+Shift+R)
There could be bugs that I'm unaware of, most of which I've already fixed.
Please reload the page when:
- The mist panel stops updating codes
- When jumping or changing to a new project
The mist panel may not update the code for bad syntax. Please check the console otherwise.
𝗦𝗨𝗠𝗠𝗔𝗥𝗬
We are progressing rapidly, with more than 2700+ lines of code tested and written in a week.
Our next roadmap is to create an independent project analysis tool, something similar to unchive.kodular.io, but with syntax editability powered by the Falcon transformer core.
With the power of syntax editability, it's much easier for one (e.g. power users) to analyse or debug a project posted on the community.
I also strongly believe this is a stepping stone before we implement robust debugging capabilities and a powerful AI integration for App Inventor. (also see AI in Action)
Thank you
Kumaraswamy B G
I try this with your given link, when i open 1st time, its ask for login, i go to with 2nd option and where test@example.com
already present, then i click login after its redirect this project (below image is show), and i notice on right side it write # Start Coding!
. i go to block section, i notice blocks are present but code not generate, i try clrt + f5
for hard reload, but noting happen (website is too slow to loading), again same things write in right side of mist section.
when i click on mist section and type a key, then all blocks disappear. i try to reload again again but it not come. and also some problem, when i drag any block and put any block, it does not generate code. may be i'm wrong to do, i don't know right way.
Hi, please use a different test mail Id (not the default one), and could you please share a simple screen recording demonstrating the problem?
with another dummy mail
it clear complete blocks when we enter some things or do backspace on mist. i dont know i use it right way or not.
what an awsome
Could you please check the browser console for any errors or information? Just make sure the console is active before the page loads.
one thing i notice, when i open console then it work, one also some problem see u in video.
It dosen't show anything in the console because you have filters on, could you please disable it, and try again so that the logs appears in the console?