227 points · by davikr · 2y ago · 101 comments
https://github.com/tpecholt/imrad/blob/main/src/cpp_parser.h
Would appreciate if someone can explain, thanks!
It’s Pascal instead of BASIC, which may or may not be an improvement depending on your perspective.
The only thing that VB up to 6 had that you can't find in Lazarus (or Delphi for that matter) is being able to pause the program while it is running (or some error occurred), modify it and continue the execution without restarting it. But overall considering all the pros Lazarus has compared to VB6 i'd say it is much better than VB6 ever was.
Qt Designer exists, but PyQt/PySide licencing can cause headaches.
- had an interactive tool for laying out a GUI
- integrated that layout into the code in a meaningful fashion
- allowed distributing a project as a single file which could be easily run (say by downloading/installing a single run-time module)
The problem is, for each computer I use I need to keep track of which Python environment(s) have been installed where, (and uninstall them) or I end up with something like:
(well, at least something which won't allow me to get a new project installed).
For a large-scale real world project example consider that the NeXT version of Wordperfect was done is 6 weeks or so --- granted it started w/ a working Unix version, but it felt fully native and nicely polished (and was much better than the Windows version).
VB fails (or used to, haven't worked with it in a looong time) when you want to do custom controls and integrate them in the UI builder. With Delphi that used to be piss easy, you could even write designer-only methods that helped with custom configuring your controls, while with VB you had to do it in something else iirc. Too bad Embarcadero only wants to sell to enterprises that are stuck on legacy applications.
And what's with all the Pascal hate? Missing your <> and {}? Nothing wrong with begin and end.
What I wonder is: if the Rust crowd is hell bent on rewriting everything, why don't they clone the VCL and the GUI designer?
I'm trying to work on it with https://slint.rs Our VS code extension has a drag and drop GUI editor.
I have some good memories.
> 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?
> 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
I really wish we'd go back to having a lot more RAD tools.
Forgot how to install and run native applications? :)
"ImRAD runs on Windows, Linux and MacOS."
That would seem a little anathema to a imgui library aiming to be native on multiple platforms and to have minimum dependencies.
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...
Mind blowingly, webgl + Mac + integer textures still don't work afaik.
examples:
You also save time writing a ton of boilerplate.
> I renamed it to "dear imgui" (about 15 months later) because "imgui" has been hogging up the whole acronym. I am sorry for the confusion caused even today.
Applications typically need good text rendering and layout support (multiline, fonts, maybe RTL, etc.), which ImGUI lacks.
Now do the same for tailwind
once you got the hang of it you could really move quickly with desktop gui development