IDE Scripting

BlitzMax Forums/BlitzMax Programming/IDE Scripting

Blueapples(Posted 2008) [#1]
Anyone know of a Blitz specific IDE for windows and mac os that has scripting?


I'd like to write some scripts to generate code, do automatic commenting, etc...

I'd actually just like to have this capability in the default IDE. Might end up putting it in there if I can't stand it anymore.


plash(Posted 2008) [#2]
I don't know any IDE's that are made for mac other then the standard one, and the closest your going to get with scripting is using BLIde (zippy made a module to do low level interaction with BLIde, I haven't checked it out recently so it might do more.)


Mark Tiffany(Posted 2008) [#3]
I'd actually just like to have this capability in the default IDE. Might end up putting it in there if I can't stand it anymore.

If you want to roll your own, feel free to get in touch to talk about adding it in to the community edition of the IDE (links below).


Retimer(Posted 2008) [#4]
(links below)




forget to add links? =P
I would be interested in this for certain precompiler functions.

Edit: Never mind: http://blitzmax-ide.sourceforge.net/


Mark Tiffany(Posted 2008) [#5]
They're in my sig - i guess if you turned signatures off you won't see them?


Retimer(Posted 2008) [#6]
My aopology, I thought that option was for my signature.


Ratchet(Posted 2008) [#7]
My editor CodeMAX is fully customizable. You can write plugins using the script language Lua.
I started a BlitzMAX plugin to compile and debug BlitzMAX source but it is not finished and a have no time to work on it.
Have a look at the CodeMAX website (link is in my signature). The BlitzMAX plugin is not included in the download currently. So if you want it send me an short mail please.

PS: It's for Windows only. The screenshots have MacOS style, but this is just a skin; I have to update the screenshots but the time...


plash(Posted 2008) [#8]
I think we should change the community version to use BriskVM2 scripts, simple to do and it would be verry useful.


Mark Tiffany(Posted 2008) [#9]
But BriskVM requires a license, so not feasible.


plash(Posted 2008) [#10]
Not to make scripts, the only problem would be the only person that could compile it for release would have to own a license.


Mark Tiffany(Posted 2008) [#11]
the only problem would be the only person that could compile it for release would have to own a license.

Which goes against the whole point of a community edition : anyone is supposed to be able to contribute to it, or extend it to their own desires.


Dreamora(Posted 2008) [#12]
brisk is 15 bucks ... so quite little problem. and most definitely do not modify or contribute anything. the scripting would allow a far more open contribution if you could write simple little addons like "autoformater" "generate doc from code" etc


Koriolis(Posted 2008) [#13]
It would be nice indeed (but obviously, I am biased :) )
That said I can definitely understand the need to let anyone contribute and recompile the IDE, even if one don't have a BriskVM license.
However, the BriskVM module links lazily with the BriskVM dynamic library, so if the DLL (or .so or .dylib) is not there, the application still runs (but an exception is raised when trying to call a BriskVM function).
So basically, you can check when starting if BriskVM is there, and if not you don't use it and everything else is fine. If it's there, you can use it.
I use this scheme myself in my Script Editor, with the following function to test if BriskVM is available:
Function TestBriskVMPresence()
	Try
		BVM_GetVersion()
	Catch error:Object
		Notify error.ToString()
	End Try
End Function
And for a version that just returns True or False depending on the presence of BriskVM:
Function TestBriskVMPresence()
	Try
		BVM_GetVersion()
	Catch error:Object
		Return False
	End Try
	Return True
End Function


So, this means that not only anyone can recompile the editor even without a BriskVM license (only the devloper integrating BriskVM would need one), but the editor can be made to also run without the DLL (associated functions can be disabled).
So people not interested in using scripts need not be concerned about it.
Technically, in commercial projects I might (not even sure about that) question if it's fair to have someone (the BriskVM licensee) generate an invoker (the little code snippet that glues BriskVM with the host, and is automatically generated) and other *totally unrelated* people compile that (here, other IDE users that recompile it), but I'll certainly not say anything against that concerning a community, open source project.

My 0.02$.

EDIT: the other issue right now is that my license say that you can't redistribute the BriskVM module, but that's actually stupid. I'll remove that restriction (altough if I do a static version of the library in the future, the corresponding "static" module will obviously not be redistributable)


Mark Tiffany(Posted 2008) [#14]
Now I'm interested. I'm tying up some nasty memory leaks at the moment (actually, I just checked in a version of maxide2 with icons everywhere to spruce things up), but this does sound interesting if we can avoid the need to have it installed & licensed in order to compile.

Anyone with a BVM2 license fancy adding this to the IDE?


plash(Posted 2008) [#15]
I would if I wasn't so busy, this really is something that should be implemented.


Brucey(Posted 2008) [#16]
Isn't Lua an option then?

It would be nice to have built-in scripting that you didn't have to pay for...


plash(Posted 2008) [#17]
The reason Brisk is so appealing is because it basically is blitzmax, so there is no learning of other languages/standards. I don't see a problem with having someone modifying the community IDE and releasing binaries that include brisk support (someone could just follow along with the community version and add in briskvm support whenever there is an update).


Mark Tiffany(Posted 2008) [#18]
Isn't Lua an option then?

It would be nice to have built-in scripting that you didn't have to pay for..

I wondered about that too, and it probably would be preferable to BVM *purely* from the point of view of being completely free, and low-hassle for someone to compile / install a fully working IDE.

But I know nothing about either, so not really in a position to comment on the merits of either / how easy or hard each might be to implement / use, how powerful each one is, or even what's really needed. The requests in the first post in this thread sound more like "template" functionality to me, which is a completely different proposition...


Mark Tiffany(Posted 2008) [#19]
And to be honest, I'm lacking motivation with the CE IDE at the moment. I'm not really sure how many people use it, and whether it's worth me investing much more time in it...


degac(Posted 2008) [#20]

I'm lacking motivation with the CE IDE at the moment


Well, I like it, I'm using it, I'm changing it for my purposes.
It's a good project, a good base to understand how Bmax (and general programmin) works.

And to be honest the standard IDE 'sucks' compared with MAXIDE-CE.
And what about Mark and his IDE? Is it still a wip? Is it abanodned? THIS is lack of motivation/not having a final goal.

Byez!


plash(Posted 2008) [#21]
I use it in linux (because its the only good one for linux, that I know of), don't have a mac and probably never will.


Mark Tiffany(Posted 2008) [#22]
I guess if I knew how many active users of CE IDE there were that would benefit (and/or how many people switch if it only did XXXX), that'd help...


Brucey(Posted 2008) [#23]
I would help out were it not for the fact it uses MaxGUI...

I currently use a modified version of the standard IDE on Mac (to allow building with a different appstub).

Some kind of scriptable functionality might be a cool addition to any of the IDEs... especially if it were flexible enough so that you weren't confined to only using it to do one specific kind of thing.


Mark Tiffany(Posted 2008) [#24]
I would help out were it not for the fact it uses MaxGUI...

Apart from the obvious fact that you're (understandably) wanting to focus on wxWidgets - why?

to allow building with a different appstub

Yes, I was looking at what it might take to add that the other day...


Brucey(Posted 2008) [#25]
why?

hmmm... proper project management, integrated searchable help (something that is actually useable), other language syntax highlighting (since I spend at least half my time in c/c++/obj-c), an integrated debugger that doesn't crash the IDE (although this is more likely down to the debug code itself I would guess?)...
... to start with :-p


Mark Tiffany(Posted 2008) [#26]
hmmm... proper project management, integrated searchable help (something that is actually useable), other language syntax highlighting (since I spend at least half my time in c/c++/obj-c), an integrated debugger that doesn't crash the IDE (although this is more likely down to the debug code itself I would guess?)...
... to start with :-p

All valid reasons for you not to use the official or CE IDE as they stand right now.

But none are valid reasons to your objection to the use of Maxgui - that's what I was asking: justify why you won't help because of maxgui?

I would help out were it not for the fact it uses MaxGUI...


To be clear: I am asking that question in a non-accusatory way. I can understand if you want to focus on wxWidgets, but a "refusal" simply because it's maxgui strikes me as odd, and I am sure you have valid reasons that I'd like to understand...

(feel free to continue this by email, as it's not really on topic, or necessarily of interest to all!)


plash(Posted 2008) [#27]
I think what brucey means is, he doesn't want to work with maxgui because that would mean he wouldn't be able to add in what he mentions above.


Brucey(Posted 2008) [#28]
oh... I thought you were asking, why would I want to help? :-)

...anyways...


Mark Tiffany(Posted 2008) [#29]
I thought you were asking, why would I want to help? :-)

lol. yeah, all you do-gooders that might want to help out can just take a long walk off a short pier. ;-)

EDIT ^^^ That is SARCASM.


SebHoll(Posted 2008) [#30]
lol. yeah, all you do-gooders that might want to help out can just take a long walk off a short pier. ;-)

Mark: I just jumped to the bottom of this thread, and saw your comment, and my jaw dropped to the floor...

Then I realised you were being sarcastic (I think :-P)...


Mark Tiffany(Posted 2008) [#31]
lol. again. without sarcasm this time.


Blueapples(Posted 2008) [#32]
Okay but scripting, seriously, that would be awesome. Is Brisk really $15? I seem to remember it being a lot more than that...


plash(Posted 2008) [#33]
No, its $25 (15 euros) for an indie license (the lowest priced one).


Blueapples(Posted 2008) [#34]

However, the BriskVM module links lazily with the BriskVM dynamic library, so if the DLL (or .so or .dylib) is not there, the application still runs (but an exception is raised when trying to call a BriskVM function).
So basically, you can check when starting if BriskVM is there, and if not you don't use it and everything else is fine. If it's there, you can use it.



Do we really need to do this though? I would imagine that the license for BriskVM allows the DLL to be provided with the application that uses it. I assume there's some way to prevent the DLL from being used by some other application, otherwise there isn't much of a license really. Anyone who got a game or program that used Brisk could just use the full-version DLL in their own programs (not that I would condone that at all, as it's very reasonably priced and worth every penny).

If I/someone adds this to the community IDE, is there any issue with providing the DLL along with the CE IDE download and letting people who do not have BVM licenses to write scripts for the CE IDE?

I'm very interested in making this happen. I hope I have time, although I have said I would work on things in the past and been unable to do it because of time constraints. I think the IDE really needs this though.


Koriolis(Posted 2008) [#35]
Concerning the license, two things:
- I have faith in most developers, hoping they realize that a lot of work wwas put into BriskVM, and that the price is *very* reasonable
- to integrate BriskVM with a customized command set, one needs to generate an "invoker". This functionality is in the "bvmtools" dynamic library, which is NOT redistributable.

Distributing the DLL is thus not a problem at all, naturally. Distributing the bvmtools library and/or working on BriskVM integration without a license is another story.


Blueapples(Posted 2008) [#36]
I went in and did some poking around... it's actually quite an ingenious system you've got here. No need to embed license keys because the DLL is useless without the glue files which are specific to each application, really it's very good stuff. I'm going to try to integrate this into the CE IDE... but we'll see what happens.


Mark Tiffany(Posted 2008) [#37]
Blueapples, can I suggest that you try building it as a compeltely indepent bit of the IDE (e.g. a whole new test window), rather than going straight into the IDE code? While hunting memory leaks I'm re-writing some areas so it might be safet to prove it in a nice self-contained sandbox for now...


plash(Posted 2008) [#38]
Blueapples, if you need any command sets for brl modules let me know, I converted alot of them to command sets a while back.


Blueapples(Posted 2008) [#39]
Mark,

Yes, I will try to keep it as separate as possible. Since most of what I think it needs to do is manipulate a text box, expose library modules, and create GUI elements like menus and popup windows, it should be pretty easy to create it almost totally separate from the IDE itself.

I'd like to have it be able to automatically fire scripts on stuff like save, etc. that will do additional work. That should be as easy as adding a function call to those event handlers, which we can do after you're done with your current work.

Not sure how long this will take. I'll try to get a design going and probably even a bit of code tonight. I'm moving next week though so that's taking a lot of my time. I figure it's time for me to give something back to the community however, so I really want to make this happen.


Blueapples(Posted 2008) [#40]
Plash,

I'll send you an email in a minute. If you want to put the BCS files in the code archives or your work log that would be cool, if not though whatever we pull together for this should at least be available under the same license as the CE IDE.


Mark Tiffany(Posted 2008) [#41]
Not sure how long this will take. I'll try to get a design going and probably even a bit of code tonight. I'm moving next week though so that's taking a lot of my time. I figure it's time for me to give something back to the community however, so I really want to make this happen.

No problem, I'm away for a few days myself now, and the CE IDE is hardly the fastest moving beast as it is!


plash(Posted 2008) [#42]
Check your email, I can also provide an example using libxml.


plash(Posted 2008) [#43]
For anyone else that needs it: http://www.blitzbasic.com/logs/userlog.php?user=9358&log=1589


Scaremonger(Posted 2008) [#44]
I'm very happy using the CE. It's got limitations, sure; but having scripting support in there would enhance it significantly. My personal preference would be LUA scripting.