Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.
jvanderberg Newbie Joined: 06/05/2026 Location: United StatesPosts: 12
Posted: 11:15pm 15 May 2026
Copy link to clipboard
Print this post
Even with Claude and Codex it's been a good amount of work. I do a good amount of planning, and then sometimes find that the LLM hasn't done what I asked. They are almost uniquely suited to just moving code around and splitting up files, but their own native ideas of the 'right' way to do it isn't always the best, and sometimes they get lazy and don't what was planned.
So it's taken about two months to get here. Likely would have taken a year or more on my own. I will also say that using an LLM encourages you to do things that you probably should not do, and to move too fast. In a complex interrelated code base like this, not a good idea.
I will take a look at MMB4L repo and see how you've approached things.
As v6 of mmbasic is already amazingly competent, I think even if I mostly stopped taking new features this fork would still be incredibly useful. But I do want to track any big new features as they come along.
jvanderberg Newbie Joined: 06/05/2026 Location: United StatesPosts: 12
Posted: 12:16am 16 May 2026
Copy link to clipboard
Print this post
It works for me in Chrome and Firefox on MacOS, I can't really try native firefox on windows 11 - I might have to borrow one of my kid's laptop.
'NEW' is now fixed, there was a bug in how the WASM build emulates flash.
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 614
Posted: 02:54am 16 May 2026
Copy link to clipboard
Print this post
Still on chemo but i like the idea and concept so i chime in here . A bytecodecompiler is a great idea. Like and cant wait !Plasma
Plasmamac Guru Joined: 31/01/2019 Location: GermanyPosts: 614
Posted: 02:54am 16 May 2026
Copy link to clipboard
Print this post
Works on safari with iphone 16e Edited 2026-05-16 12:59 by PlasmamacPlasma
jvanderberg Newbie Joined: 06/05/2026 Location: United StatesPosts: 12
Posted: 04:12am 16 May 2026
Copy link to clipboard
Print this post
The bytecode compiler is in the WASM demo, just use 'FRUN' instead of RUN. Try it with 'mand.bas'. With a slowdown (click the gear) of about 10us, it should approximate device speeds. FRUN will be 10x faster than RUN.
It really only works for math heavy loops, for most other things mmbasic has a native C implementation of the slow stuff. Heck, it even recently got a mandelbrot function (not used in this demo).
And then there's the issue that creating bytecode native VM syscalls for every single basic statement just was not a realistic target, it would have meant basically re-implementing the entire mmbasic function surface area. So the bytecode compiler 'thunks' down to the interpreter for most functions, which means it has to dummy up the interpreter globals and any other variables in scope, and cart around tokenized versions of the code, call the interpreter function, and then re-sync the results with the vm. So that slows things down a bit and tends to cancel out any speedup.
But where it can really shine is in tight math loops. It will try to auto optimize and run them in a special zero dispatch kernel with a slimmed down instruction set focused on math. And in fact the compiler allows you to hand write such loops with the same slimmed down instruction set in 'assembly'. See 'mand_asm.bas' in the demo, though that version has some issues that make it not as fast as the auto optimized mand.bas.
jvanderberg Newbie Joined: 06/05/2026 Location: United StatesPosts: 12
Posted: 04:19am 16 May 2026
Copy link to clipboard
Print this post
So it does, that's surprising. How do you type? I think I need to provide some sort of keyboard mechanism for mobile.