Program that executes scripts

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
As a side project, to enhance my experience with cross-platform applications I've chosen to create a program in C::B (using wxWidgets) but I've hit a huge snag.

I simply don't know how to let the application compile and execute scripts without the use of an external executable.

I'm trying to create an IDE that allows you to create scripts inside of it providing pre-made functions that you are able to use as well to create functions of your own. When hitting start, the script should execute also providing a debug window, to let you find errors.

Now I simply want all of this in 1 executable, now for the language I have multiple things in mind. Where Python, LUA, Pascal (Delphi) or more languages are able to compile and executed or interpreted.

If you still don't know what I'm talking about, than you should take a look at Scar DIVI. It is a program that let's you macro though scripting using color finding and bitmap searching techniques. Now that program is pretty much only use-able for 1 thing and that's Runescape. Although it can be used for other simple things as well it isn't build for it. I'm trying to stay open minded and make it work for a whole lot more.

Does anyone with some experience in this subject help me further and set me on the correct path?
 

Xienoph

You can change this now in User CP.
Reaction score
43
Usually, you have the main executable that runs the IDE, and several executables that run the scripts in various programming languages. Why don't you want to use external executables? If any of the script interpreters (say the Python interpreter) is updated, you will need to recompile the entire executable. If they're separated, you just need to replace the Python interpreter with the updated one.

If you're doing multiple executables, I suggest that you look into "interprocess communication." I don't have a lot of experience in this, but communication between MATLAB and Java is a pain. I ended up using network sockets to communicate ^^.

What is C::B by the way?
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
Usually, you have the main executable that runs the IDE, and several executables that run the scripts in various programming languages. Why don't you want to use external executables? If any of the script interpreters (say the Python interpreter) is updated, you will need to recompile the entire executable. If they're separated, you just need to replace the Python interpreter with the updated one.

If you're doing multiple executables, I suggest that you look into "interprocess communication." I don't have a lot of experience in this, but communication between MATLAB and Java is a pain. I ended up using network sockets to communicate ^^.

What is C::B by the way?
C::B is an open source cross platform IDE, the full name would be Code::Blocks.

The reason I want it all in 1 executable is because I want it user friendly. I don't want loose executeables around which would only confuse the end-user.
Yes, it may be easier to just run a command line on an interpreter / compiler but that would only make it easier for me. I want to learn and using cheap techniques doesn't help me on that part of the programming.
At least this way, I have control over the versions of compilers people use because if they where loose executeables, they simply could update it and may bring up crashes in the IDE.
I have more reasons for this, but these are just the main two ones.

However, the IPC is good to know about. Thanks for that.
 

SerraAvenger

Cuz I can
Reaction score
234
How would you want to add plug-ins with a single executable?

I think what would be really great would be a simplistic plug-in manager.
 

Xienoph

You can change this now in User CP.
Reaction score
43
Ohhhh. Code::Blocks.

Well, you can ask the Python / Delphi / LUA developers for source code of their interpreter, and compile them together with the rest of the IDE's code. But they might be using different languages and ... it might get messy. Though I wonder if they have a precompiled version of their interpreters, such as .dlls and .libs. Then you can just import them to your IDE code.

If you want to write your own interpreter, that's hard to do well. First, you need to parse it, and there are several parser generators out there. The one I've heard is YACC, but apparently it's really hard to use. Once you get a parse tree, you just need to go through the tree and execute the tree. If you don't care about efficiency, that's it. You have nothing else to do. If you do ... it's really hard to do (in fact, I'm taking a class at optimizing compilers). I suggest just getting the existing source code. It takes a long time to write an efficient interpreter (see: JavaScript).

I don't think I understand what you want to do (I've read and reread and rereread your posts, but I'm still unsure what you want). But I hope those suggestions help you somehow.
 

Xorifelse

I'd love to elaborate about discussions...........
Reaction score
87
If you still don't know what I'm talking about, than you should take a look at Scar DIVI.
I want to create an application just like Scar, but more open minded. Scar allows you to create "programmed" macro's, using bitmap and color finding techniques to do exactly what you want.
Unlike those common programs that loop, or execute exactly what you recorded before this allows a more flexible way to macro at either flash games, Runescape or even Warcraft III.

To accomplish this, I need to have an environment to program your script in and an interpreter or compiler to build your code and execute it.

The reason I want to do this is because Scar has major flaws, the procedures, function names are all build for Runescape and the ability to program object orientated proves to be very difficult. I want to improve this in my own program which will be of course ( stated in the first post ) cross platform as well.

Hopefully I did a better job explaining what I wanted to do.

If you want to write your own interpreter
Ohh nohz, It's a small side project. Not gonna write an entire interpreter. It will be slower which will be a very bad thing because I need speed at the users script. I'm not that good in programming either :p

So I guess I'm stuck with open-source languages (if I want to do it my way), which is not a bad thing tho. It just limits my choice of languages severely.

I'll take a look around, test a few things because I'm still busy working on the IDE itself, syntax highlighting, etc, etc, etc. Though it's looking pretty good already, at least that's my opinion.
256xyzr.png


Thanks for the information, Though it wasn't what I asked it was still very informative.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top