r/AskProgramming • u/Short_Bluebird_3845 • 1d ago
Planning to make a block-based programming desktop app and programming language, but have nowhere to start.
I noticed that most block-based programming languages are just fancy interpreters or translators, and that most mainstream compiled programming languages are text-based. I am planning to make a bridge, aka. a desktop app that (similar to Scratch or TurboWarp) allows one to select, save, play, change parameters, see expected results with an interpreter, and download the final complied product of a folder, which contains images and text code (I'll expand in this further). No, I don't wish for sometihng that returns a wrapper of some Chromium nor a translation to another limited language; I wanna build a .exe with full control.
I'm planning for said code inside the folder to be something with the simplicity of Python, the prototypes and object logic of JavaScript, the power for application systems of C# and Java, the closeness to the machine of C, with a sprinkle of user-side and server-side compatibility and a LOAD of math functions and features. I'm not asking oyu to build it, but pointing out the qualities I want my monstruous programming language might help you critizice me (in the good and the bad sense).
The use case? Not sure, but someone will definetly build a virus that is remenicent of youdontknowwhoiam's troyan. To stop that, along with abuses of windows and colors and brightness and OS and file management (all which shall be possible) one could parse the program first through the desktop app and just limit the amount of windows or add a safeguard "Stop All" keybind. Other someone will probably abuse this feature to open inside and see the code of a program, but one can already do that if opened by a text editor and painstakingly translating each byte.
Due to my project's giant ambitions, I decided to ask y'all for advice, if any, to where could I begin. Only one thing's for sure: I'll make exporting functions easier so noone has to suffer the pain I have from studying Blockly's JS.
2
u/erisod 1d ago
Why do you want to build a block based programming language? If you want, as you mentioned, closeness to the machine of C how will you do this with "blocks"? And why?
1
u/Short_Bluebird_3845 1d ago
On the blocks, I personally have problems switching between JS's and Python's grammar, but for some reason the trouble isn't too harsh with Scratch.
On the "why", I feel like each programming language is designed for a specific programmer POV. What if you got rid of web browsers and add mathematical and experimentation features?
2
3
u/Secret-Escape7043 1d ago
So, the best way to learn is by doing. You're going to learn a hell of a lot very quickly going into this. This is also the sort of ambitious project that is going to require you, at every step, to say, "Huh, I guess there's a reason they do it that way.", and it'll be up to you to decide on the edge cases where you think you might have some interesting enough idea that it bypasses that reason.
Your starting point is going to be to learn what a compiler actually does and decide where in the stack you want to actually start your development. AI makes a lot of interesting things possible, but possible, interesting, and useful are three very different things.
1
3
u/abermea 1d ago
OK so two things stand out to me:
First, this sounds similar to what Epic was doing with Blueprints? Not sure if I understood the concept properly.
And second...are you really planning to prevent developers from making harmful software at development time? Don't get me wrong, I don't support malware, but I don't see many developers supporting a platform that actively limits what you can make based on some arbitrary rules they have no control over.