Hi, Recently I have been working on making the Fl...
# two-minute-week
m
Hi, Recently I have been working on making the Flowrunner-canvas editor available as a React component (currently just for my own usage, it’s far from stable), and not only that, but I want to be able to provide custom ways of running a flow. What I’ve shown so far is that flows are run by the editor itself with the node-types provided by the editor environment. I’ve already been experimenting with backend flows, where you can design a flow which has http endpoints and communicate with a the database. What I’ve been doing today is compile a visual flow to webassembly, live in the browser 🙂 . I already wrote a litte webassembly compiler which runs in the browser, so all I had to do was parse a flow and generate the code that this compiler understands. It’s offcourse still very early stage, and I hope to show some more soon (currently this flow-type only supports variables and expressions, but the compiler has already support for functions, while loops and very basic memory manipulation). One of the things that I already noticed , is that I need is to be able to have vertical flows instead of just horizontal in the editor 😊. An image of the above can be seen in the attached thread I’ll be back with a video soon! Have a good sunday! Maikel
❤️ 2
k
Is it deliberate that the image is tiny? I can't read any text in the canvas.
m
Yeah its too tiny, I'll post a new screenshot later today
👍 1
There's a bug in my scroll wheel implementation in this scenario🙈
message has been deleted
It's a very simple example where two variables are created and some simple calculations are performed. These are parsed to an AST and webassembly is generated from there (and executed).
👍 2
c
neat. I’ve also been writing a wasm compiler, it’s been fun for the most part. took a bit to make the tooling I needed, as almost every wasm resource seems to assume you’re using emscripten to compile…
❤️ 2
m
Thanks and yes, it took quite some googling and reaearch to get all the info. Last friday the book that I could have used some months ago arrived : "the art of webassembly"
👍 1
c
ahhh, yeah, from the table of contents this book would have been perfect for me as well if I’d had it at the start of the summer; thanks for the pointer! Would you still recommend the book to someone who has figured a lot of this out? I think I’d be most interested in the optimization chapter but am guessing there might be other tips and tricks I could learn by reading it…
m
It depends I suppose. For me personally I like to have a book which I can grab and read back into, sometimes just to remind myself of certain details. I've just read chapters 1 and 2, basic stuff but still some details that were helpful. So, from my standpoint, I would recommend the book.
👍 1