5 ms·
This would be cool built in a wasm html5 app to whip up a gui in the browser and copy paste the result into your editor. > It generates and parses C++ code whi
by dsp_person 2y ago
This would be cool built in a wasm html5 app to whip up a gui in the browser and copy paste the result into your editor.
> It generates and parses C++ code which can be directly used in your application.
Is the parsing part just to read it's own code it generates?
- _aavaa_ 2y ago> wasm html5 app That would seem a little anathema to a imgui library aiming to be native on multiple platforms and to have minimum dependencies.
- dymk 2y agoA multi-platform, minimal dependency project such as this is a perfect fit for targeting wasm, which of course is "just" another platform (not sure what additional dependencies you think it would need?)
- joshcryer 2y agoImGUI generally runs on GLFW and there is even a port to html5: https://github.com/jnmaloney/WebGui https://github.com/jnmaloney/WebGui ImRAD appears to be based on GLFW as well so one would only have to follow a tutorial: https://uncovergame.com/2015/01/21/porting-a-complete-c-game-engine-to-html5-through-emscripten/ https://uncovergame.com/2015/01/21/porting-a-complete-c-game...
- jasonjmcghee 2y agoWebGL2 is a thing now so some of what that blog discusses isn't as bad anymore, in terms of shader support. Mind blowingly, webgl + Mac + integer textures still don't work afaik.
- dsp_person 2y agoit's easy nowadays to compile imgui apps to wasm/html5 examples: https://web.imhex.werwolv.net https://web.imhex.werwolv.net https://floooh.github.io/sokol-html5/imgui-sapp.html https://floooh.github.io/sokol-html5/imgui-sapp.html
- nottorp 2y ago> This would be cool built in a wasm html5 app to whip up a gui in the browser and copy paste the result into your editor. Forgot how to install and run native applications? :) "ImRAD runs on Windows, Linux and MacOS."
- dymk 2y agoOpening up a webpage is easier than cloning a repo, compiling, and running a binary
- tjoff 2y ago... if you only do it once.
- dymk 2y agoOkay, for the sake of the argument, let's assume at some point you amortize the fixed costs of native compilation down to zero. Tell me how running a native binary is inherently easier than opening a webpage?
- marcodiego 2y agoTo open a webpage you have first to run a native binary. So, running a native binary is necessarily easier than opening a webpage.
- dymk 2y agoYou are confusing "Number of steps" with "Easy". They're also the same number of steps. If I tell my OS to open an `html` file, it opens a browser window.
- marcodiego 2y agoIf doing task B requires doing task A first, then doing task A is necessarily easier than doing task B.
- dymk 2y agoThe parser: https://github.com/tpecholt/imrad/blob/main/src/cpp_parser.h https://github.com/tpecholt/imrad/blob/main/src/cpp_parser.h > Is the parsing part just to read it's own code it generates? It would seem so. Their hand-rolled parser handles only a subset of the language. E.g. it hard-codes recognition for stl containers, and presumably only the ones that it might emit in generated code. There's no AST built, at least not at this level. It tokenizes and lexes, and seems to leave it up to the caller to understand how to pump the parsing "state machine". AST building and codegen appears to be done in this >9000LOC file - https://github.com/tpecholt/imrad/blob/main/src/node.cpp https://github.com/tpecholt/imrad/blob/main/src/node.cpp
- giancarlostoro 2y agoI've thought about making a RAD IDE for another language, and I'm kind of stuck wondering on strategies for stuff like this, I'd much rather just store the GUI info in another format like XML and only parse source files for things like methods that shouldn't be overriden when someone moves something. I really wish we'd go back to having a lot more RAD tools.