View topic - Lua IDE



All times are UTC + 1 hour


Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Lua IDE
PostPosted: 09 Feb 2012, 18:08 
Moderator

Joined: 05 Aug 2009, 19:42
pfft, but can your komodo edit look this cool?
Image


Attachments:
2012-02-09-180430_1920x1080_scrot.jpg [537.56 KiB]
Downloaded 2 times
Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 10 Feb 2012, 05:41 
Zero-K Developer
User avatar

Joined: 10 Sep 2008, 02:11
Location: In search for TheTruth (TM)
Sure.
Image(image is a link)


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 10 Feb 2012, 10:35 
User avatar

Joined: 07 Feb 2005, 21:30
Location: Cheese factory
Ah that looks nice MidKnight. How long will it last without a license? Website doesn't say..


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 10 Feb 2012, 19:23 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
Forever!
http://www.sublimetext.com/download wrote:
There is no enforced time limit for the evaluation.


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 10 Feb 2012, 21:55 
User avatar

Joined: 07 Feb 2005, 21:30
Location: Cheese factory
Wow I must be getting old..


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 21 Mar 2012, 11:39 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Beherith wrote:
PicassoCT wrote:
Wasnt there this tool that autoreloads, parses errorlines in the autolog and jumps to that in notepad++? That with notepad always on top and spring windowed actually is the ide(al) dev enviroment.

WANT!



Have been testin this for the past week! Is sweet as honey for the workflow! Might see a Release this weekend.


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 11 Apr 2012, 18:25 
Moderator
User avatar

Joined: 19 Sep 2006, 21:48
PicassoCT wrote:
Wasnt there this tool that autoreloads, parses errorlines in the autolog and jumps to that in notepad++? That with notepad always on top and spring windowed actually is the ide(al) dev enviroment.

Just swayin..


You can use the NppExec plugin to parse errors from Spring or from "luac5.1 -p", the Lua compiler in syntax check mode. It can jump to errors lines too. You'll need to fiddle a bit with the options though.

luac5.1 can be found here.


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 21 Apr 2012, 05:50 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Or use this, to parse the infolog in notepad++

http://springfiles.com/spring/tools/satans-bugfixer


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 03 Jun 2012, 14:26 
Moderator

Joined: 05 Aug 2009, 19:42
A question to the more experienced devs - how do you refactor lua code?
At least how do you deal with basic things such as renaming functions/methods/fields that span multiple files?

It's probably no surprise, but when you start writing lua for spring, especially if you haven't written much lua in your life, there are many things that you will do wrong.

I have a couple of global utility functions, such as "GetIndex(array, value)", "GetValuesWithName(array, name)", and even stuff more specific to my project, such as "MakeVariablePanel(parent, varType)", and later I've discovered you can prefix function names so you don't pollute the global namespace, by creating stuff like "SCEN_EDIT.MakeVariablePanel(parent, varType)" and so I need to rename those occurrences in many files, which is a bit annoying to do.
Same thing applies to when I decided to move things into the global namespace with my "SCEN_EDIT." prefix instead of having it as a field in many objects.

Also how do you do the try/catch mechanics in lua? I've tried pcall but it seems weird, do you use that?


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 03 Jun 2012, 15:32 

Joined: 17 Sep 2008, 03:36
Location: your imagination
I find a nice way to replace certain text in lots of files to be a nice simple sed (stream editor unix utility) 1-liner.

Code:
sed -i 's/OldText/NewText/g' *.lua


'-i' means it will overwrite the old file (instead of making a new one)
's' means substitute
'OldText' is the text you will find to replace
'NewText' is the new text you replace it with
'g' means global, so it will swap the text for all occurances, not just the first

*.lua is the target (so any files with the lua extension in the current directory)

If you check the manual or google you can expand or change the functionality as needed, like to make it run recursively and such.


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 03 Jun 2012, 15:44 
Kernel Panic Co-Developer
User avatar

Joined: 16 Nov 2004, 13:08
In Notepad++ there is a search'n'place in files, either all opened files, or all files with given extension in a given folder and subfolders. It can also be set to accept some regex.

Yes, I use pcall to do try catch.


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 03 Jun 2012, 20:41 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
I just added Lua support to sublimelint for those of you using Sublime Text 2.

This means inline syntax highlighting, saving you a pesky Spring reload for syntax typos and such.

http://github.com/lunixbochs/sublimelint/

Image


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 03 Jun 2012, 21:09 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
Would it be possible to write ingame debugger?

I mean.. if you would echo out every value, every second line.. you could reconstruct the programs flow- and watch the values dance, and then ..


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 04 Jun 2012, 01:06 
Moderator

Joined: 05 Aug 2009, 19:42
aegis wrote:
This means inline syntax highlighting, saving you a pesky Spring reload for syntax typos and such.

Would it be possible to have some sort of semantic parsing as well? F.e writing "Sping.Echo" is not syntactically incorrect, that happens to be a bigger problem for me and is quite a nuisance.


PicassoCT wrote:
Would it be possible to write ingame debugger?

I mean.. if you would echo out every value, every second line.. you could reconstruct the programs flow- and watch the values dance, and then ..

Maybe there's a better way to do that?
http://stackoverflow.com/questions/7804 ... bedded-lua suggests you can use some sort of remote debugging of sorts,
http://www.keplerproject.org/remdebug/index.html seems to require a small set of tools already mostly existing in Spring?


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 04 Jun 2012, 05:49 
Moderator
User avatar

Joined: 22 Feb 2006, 01:02
Location: cheap kitchen
gajop wrote:
Would it be possible to have some sort of semantic parsing as well? F.e writing "Sping.Echo" is not syntactically incorrect, that happens to be a bigger problem for me and is quite a nuisance
with notepad++ you can edit the .xml files in plugins\APIs\ and make your own autocomplete lists...
In a similiar way it should be possible to define some new words that get highlighted?


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 04 Jun 2012, 20:56 
Journeywar Developer & Mapper
User avatar

Joined: 24 Jan 2006, 21:12
Location: There is no god - and reality is his prophetess
i can tell some funny stories about notepad++ suggesting typos that i made in coments..


Top
 Offline Profile  
 
 Post subject: Re: Lua IDE
PostPosted: 27 Jun 2012, 07:56 
User avatar

Joined: 24 Jun 2008, 06:21
notepad++ sure is popular, but it's only for windows :(


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 37 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.