[ZeroBrane Studio] Re: couple of questions

  • From: Geoff smith <luadataviz@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Fri, 8 Nov 2013 00:49:37 +0000

Hello Paul
 
Yes removing Lua 5.1 was a big problem for us, so much so that I stopped using 
ZBS and switched to a different IDE.
 
We are using it to write scripts for a embedded system that is 5.1 and unlikely 
to change to 5.2 and will never be Lua Jit.
 
The first script I loaded into V0.39 that was fine in earlier versions produced 
an error for me. I cant recall what it was now as I did this a few weeks back, 
but it was due to some small but significant incompatibility between versions
 
It would be great to have it back in as a future option please ?  Thanks for 
the note on how to put it back, I will try that tomorrow.
 
My other question missed a detail I should have mentioned. The other language 
for syntax colouring was an oddball language that wouldn't be in Scintilla as 
an existing lexer. so I guess to implement that I would have to implement it 
first in Scintilla then build that as a custom object and then hook it up to 
ZBS.
 
That sounds pretty tough to figure out and get working.
 
Regards Geoff
 
 
 
> Date: Tue, 5 Nov 2013 17:07:42 -0800
> Subject: [ZeroBrane Studio] Re: couple of questions
> From: paul@xxxxxxxxxxxxx
> To: zerobrane@xxxxxxxxxxxxx
> 
> Hi Geoff,
> 
> > I was a bit shocked to discover you had removed the standard Lua 5.1 
> > Interpreter :(
> 
> It has been replaced by LuaJIT, which is fully ABI compatible with Lua
> 5.1 while also providing some level of language compatibility with Lua
> 5.2. May I ask what you are missing in the current setup?
> 
> > Could you point me at some instructions as to how I add that back in please 
> > ?
> 
> You have several options. One would be to get the old
> library/executable and use it instead of the current one. You can get
> all the binaries from one of the older versions of ZBS
> (https://github.com/pkulchenko/ZeroBraneStudio/tree/115924d56797f9d1f3a43df453a1cef8e9a1a581/bin).
> You can also install Lua interpreter to some other folder and
> configure ZBS to use it with path.lua setting
> (http://studio.zerobrane.com/doc-general-preferences.html#interpreter_path)
> 
> My assumption was that users are not losing anything with this switch,
> but maybe I missed something.
> 
> > A second more wacky question for you. How easy or difficult would it be to 
> > modify ZBS so that its syntax colour highlighting was for a different 
> > language other than Lua ? I am guessing this might be hidden away inside 
> > the Scintilla edit component you are using, so therefore would be very 
> > awkward to change ?
> 
> Yes, it should be possible to get access to other lexers inside
> Scintilla. It should be a matter of connecting spec identifiers that
> ZBS recognizes with those defined in Scintilla lexers. I recently did
> something similar for c/cpp that you may use as a starting point
> (spec/cpp.lua).
> 
> If you open .cpp file you should see that highlighting if you enable
> loading of spec files by adding this to the config file:
> load.specs(function(file) return file:find('spec[/\\]cpp%.lua$') end).
> I should probably change this to allow new specs to be loaded by
> default.
> 
> You should still be able to use all the color themes and everything
> else color related.
> 
> If you want to distribute this, you can wrap this into a plugin that
> uses ide:AddSpec and ide:RemoveSpec calls. This may be easier option
> as it eliminates the need to modify the config file and to provide
> multiple files. Let me know if you need an example on how this can be
> done.
> 
> Paul.
> 
                                          

Other related posts: