Jump to content

[WIN][Linux] Kode, The IDE for kOS. [Version 0.5.0 08/04/16]


Recommended Posts

Kode: The IDE for kOS  

Current version: 0.4.0

 

 

I have made a simple IDE for use with the kOS autopilot. At the moment it is not much more than a notepad clone with syntax highlighting, but everything has to start somewhere right? :)
One neat feature it currently has is the ability to export your script straight into your kOS scripts folder(Once you visit "Settings" and tell it where KSP is installed). It also has some basic code completion.

Eventually I plan to add quite a few useful features such as intellisense, Error detection(Such as forgetting your '.' end of line), Compiling and debugging, Tabs and a tree file viewer(Such as in Visual Studio) to allow for easier development of multi file programs. I will also be adding the ability to import your libraries with one click, Telnet control(For multi monitor users, Have Kode open in one screen and KSP in another. Code and run at the same time!) and the ability to create a script by clicking and dragging blocks together(Think Lego Mindstorms) which would be useful for a user who wants to use kOS but doesn't want to learn how to code it for whatever reason, This won't happen for a while though. I am planning for a Linux and Mac build in the very near future.

Why Kode? It's a portmanteau of kOS and IDE, But it is also Code with the compulsory Kerbal 'K'. I thought it was pretty nifty.  

Kode is released under the GPL v3 licence.

Note about the Linux version: Due to complications porting a dependency over to Mono Kode depends on Wine and this should be installed before Kode.

With version 0.4 Kode has the features to hopefully rival whatever program you currently use and as such I am changing focus from smaller updates more often to bigger updates less often with a focus on stability.

Download

You can download Kode here: https://github.com/TN-1/Kode/releases
Extract the zip making sure all files are in the same folder and double click to run.
You can view the source over at Github: https://github.com/TN-1/Kode

Changelog

18/1/2016: 0.1.0 - Initial release

24/1/2016: 0.2.0
Steam install auto-detection
Open and Save As dialogs default to KSP/Ships/Scripts(Per the steam install detection)
Dark mode
Upgrade detection(Tools>Upgrade)

10/2/2016: 0.3.0
Tabs!
Linux version!
Fixed issue #1 through use of try-catch.
Changed undo/redo behaviour: Buffer now 10char long with (hopefully) unlimited actions
Added report bug and kOS docu to help menu
Added graphical toolbar
Export code in markup
General code cleanup

20/02/2016: 0.4.0
Reworked steam install detection
Reworked session restore when settings changed(Issue #4)
Redesigned the settings menu(It finally looks good!)
Added support for multiple installs(Steam or not)(When you add the install, Make sure it is too your root KSP directory)
Added support for lowercase syntax highlighting(Issue #5)
Added the code minimiser at long last, It will strip comments, empty lines and double spaces.
Tweaked save all and save as behaviour.

08/04/2016: 0.5.0
Project mode added
Support for libraries
Upgraded Linux Installer
Windows Installer
Add support for opening files via explorer
Added auto indenting
Added tab space setting for auto indenting
Added keyboard shortcuts
Added a code minimiser
Added column count
Removed now defunct "Export to KSP" button
Kode now checks for unsaved changes on exit
Kode now supports launching by double clicking files in explorer(See known issues below)
Fixes bug where Kode crashes when you open with no tabs
Fixes bug where Kode crashes if you don't select a folder on first start
Fixes bug where Kode will treat recovered tabs as new ones on setting change restart
Fixes beta bug where Export to KSP crashes when not in project mode
Worked around a bug where Kode auto restart doesn't change UI correctly. Manual restart is required after changing editor/project modes.
All changes to file will now trigger an *, not just additions
Tab close X behaviour tweaked
Syntax highlighting and autocomplete now support UPPER, lower and Mixed Case without changing settings
Update auto-detect(Added in 0.4 but this is the first release to use it)

Current known issues
File associations as set by the installer doesn't work correctly. You need to manually set Kode as the program to open .ks and .ksproj through the Right Click>Open with menu, Select Kode and Always Open with.
Autocomplete for mixed case is bugged, after typing an uppercase first letter and then a lower case second letter the A/C box disappears. Syntax highlighting is unaffected.

Edited by randomstonerfromaus
0.5.0
Link to comment
Share on other sites

This looks pretty slick. 

One thing we've been toying with back and forth is some means for kOS mod to publish some kind of file with each release that defines the things the pure syntax does not - things like names of built-in identifiers, names of suffixes, and function prototypes of them, and so on.  The idea would be that this file would be in some kind of machine-readable format: json, xml, csv, etc: that people like you making editor syntax markups could automate the reading of and turn into whatever the definitions are that are used by your editors.

The two sticking points in all of this are:

1 - The built-in functions take parameters in an ad-hoc basis (i.e. the first lines of code in something like V(a,b,c) are c = popstack(); b = popstack(); a = popstack(), rather than having a defined prototype), and thus first they'd need to be changed into a formalized system first.

2 - Even though suffix methods like list:add(a,b) already have such a prototype definition in our code, it doesn't get created until you 'new up' an instance of the thing and it builds them on the fly.  Thererfore it's hard to export a config file about them from the build process - there has to be one of each type instantiated at runtime before the information is accessible.

But it's not impossible - just ... hard.  let us know if you'd actually use such a feature if it existed (would you be willing to write a thing on your end that would read this file and change the highlight and/or autocomplete rules based on it?).  The more people who find it useful, the more drive there is to bother doing the hard work to implement it.

 

Link to comment
Share on other sites

On 1/19/2016 at 1:33 PM, Gaiiden said:

nice! I've tried going with Atom or Notepad++ but I've gotten so used to the dedicated kOS IDE Saturn that I just couldn't make the switch. I'll give this a shot since Saturn no longer is supported by its author

I just went and had a look at Saturn, There are a few features on there I might borrow, Namely different build profiles and HTML/BB code exporting.

1 hour ago, Steven Mading said:

This looks pretty slick. 

One thing we've been toying with back and forth is some means for kOS mod to publish some kind of file with each release that defines the things the pure syntax does not - things like names of built-in identifiers, names of suffixes, and function prototypes of them, and so on.  The idea would be that this file would be in some kind of machine-readable format: json, xml, csv, etc: that people like you making editor syntax markups could automate the reading of and turn into whatever the definitions are that are used by your editors.

The two sticking points in all of this are:

1 - The built-in functions take parameters in an ad-hoc basis (i.e. the first lines of code in something like V(a,b,c) are c = popstack(); b = popstack(); a = popstack(), rather than having a defined prototype), and thus first they'd need to be changed into a formalized system first.

2 - Even though suffix methods like list:add(a,b) already have such a prototype definition in our code, it doesn't get created until you 'new up' an instance of the thing and it builds them on the fly.  Thererfore it's hard to export a config file about them from the build process - there has to be one of each type instantiated at runtime before the information is accessible.

But it's not impossible - just ... hard.  let us know if you'd actually use such a feature if it existed (would you be willing to write a thing on your end that would read this file and change the highlight and/or autocomplete rules based on it?).  The more people who find it useful, the more drive there is to bother doing the hard work to implement it.

Thanks :) Wait until it gets a little more feature complete, It will be awesome hopefully.

I would definitely use that if you implemented it, and I would be willing to lend a hand putting it together. I am planning an intellisense feature(box that pops up after you type in the function that has a little description and the variables it takes), If that was part of said file it would make my life alot easier.  

For the work on my end, It wouldnt take much. I would just need to parse the file(Which would be a doddle if it was laid out in an intelligent way), Put each category of functions and methods into a string and then pass that string into my syntax highlighter. 

Link to comment
Share on other sites

I realize there are features you are still working on but, if I could suggest a watch window with stepping for debugging, without having to launch a rocket or KSP for that matter. I have no idea how complex that would be but it would be awesome. Something with sliders or input fields to test returns at certain conditions such as mid launch, in orbit, or thrust/fuel percentages. Real time or static updates, I realize as I'm typing this could get incredibly complex based on the robustness of the system. Anyway, Thank you for your consideration.

Link to comment
Share on other sites

  • 2 weeks later...
On 1/27/2016 at 4:29 AM, Dtgnoome said:

I realize there are features you are still working on but, if I could suggest a watch window with stepping for debugging, without having to launch a rocket or KSP for that matter. I have no idea how complex that would be but it would be awesome. Something with sliders or input fields to test returns at certain conditions such as mid launch, in orbit, or thrust/fuel percentages. Real time or static updates, I realize as I'm typing this could get incredibly complex based on the robustness of the system. Anyway, Thank you for your consideration.

That is defintely something that is on my wish list of features but it would be very difficult to say the least. I hope it will happen but I cant make any promises as for it.

Link to comment
Share on other sites

  • 3 weeks later...

I'm prefacing this post my stating that I'm a total linux newb, so please keep that in mind. But I went to install this (Linux Mint) and found it seems to require Wine, yet you don't mention this in your OP (nor is it mentioned anywhere in this thread) or the fact that the installation script will install it. I've never used Wine, so I try not to have any opinions about its merits, but the few times I've tried to install it, it's tried to uninstall my graphics drivers. Obviously, that's an issue beyond the scope of this thread, but it raises the point: maybe consider including Wine as a dependency in the OP for the Linux version? Unless, I'm completely misreading the below from "install.sh".

Anyway, your app looks awesome; kind of bummed now I won't be able to try it out. Again, not trying to accuse you of anything, please don't take it that way; KSP definitely needs more Linux app developers!

Cheers.

 

if [ -f /usr/bin/wine ]
	then
		echo "##Wine is installed. Continuing"
	else
		echo "##Installing Wine"
		sudo apt-get install wine
		echo "##Wine is installed. Continuing"

 

Link to comment
Share on other sites

3 hours ago, Deimos Rast said:

I'm prefacing this post my stating that I'm a total linux newb, so please keep that in mind. But I went to install this (Linux Mint) and found it seems to require Wine, yet you don't mention this in your OP (nor is it mentioned anywhere in this thread) or the fact that the installation script will install it. I've never used Wine, so I try not to have any opinions about its merits, but the few times I've tried to install it, it's tried to uninstall my graphics drivers. Obviously, that's an issue beyond the scope of this thread, but it raises the point: maybe consider including Wine as a dependency in the OP for the Linux version? Unless, I'm completely misreading the below from "install.sh".

Anyway, your app looks awesome; kind of bummed now I won't be able to try it out. Again, not trying to accuse you of anything, please don't take it that way; KSP definitely needs more Linux app developers!

Cheers.

 


if [ -f /usr/bin/wine ]
	then
		echo "##Wine is installed. Continuing"
	else
		echo "##Installing Wine"
		sudo apt-get install wine
		echo "##Wine is installed. Continuing"

 

Fair point, I have talked about it quite a bit over on the Reddit threads and I did forget to add it in over here. Thanks for pointing that out.

Do you use nvidia graphics? If so if you are still interested in using Kode you can try this. http://askubuntu.com/questions/449507/nvidia-libopencl1-331-has-to-be-removed-before-installing-wine

Thanks! :)

Link to comment
Share on other sites

Yeah I do use nVidia, thanks for the link, I'll check it out.

And thanks for not taking my suggestion the wrong way, some people get kind of cranky about such things, but rumor has it some linux users have strong opinions about Wine:P... but seeing as we're all playing with Mono, meh (not that I actually know what either of them do, from a technical perspective, but to my untrained eye they both seemed designed to run windows "stuff" but that's another topic).

Anyway, thanks again.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
3 hours ago, ILikeIke said:

@randomstonerfromaus this looks really cool! I'm confused by the first post though- is this only for Linux, or will it work on OS X as well?

Theoretically it will work on mac, But I have no access to one so official support wont be happening for the foreseeable future.

You'd need to install Wine, Install .Net40 and then Kode. It may or may not work, And results may vary.

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...

Good god, just how on earth is it possible for anyone to code more than 2 lines using a non-monospace font without suffering severe nausea? I'm trying not to come across as too much of a jerk, but

On Montag, 18. Januar 2016 at 10:11 AM, randomstonerfromaus said:

hopefully rival whatever program you currently use

is not going to happen until you make the font monospace. Also, the ability to customize fonts, colors, etc. should be high on your to-do list if you really wish to rival general-purpose text editors. Personally, I'd like a bit more contrast in the dark theme in particular.

Don't get me wrong, I'm really excited to use this as soon as that rather important quirk is corrected. But seeing how long it's been since the last update, this project is basically dead?

Link to comment
Share on other sites

On 10/7/2016 at 5:50 PM, MaxRebo said:

Good god, just how on earth is it possible for anyone to code more than 2 lines using a non-monospace font without suffering severe nausea? I'm trying not to come across as too much of a jerk, but

is not going to happen until you make the font monospace. Also, the ability to customize fonts, colors, etc. should be high on your to-do list if you really wish to rival general-purpose text editors. Personally, I'd like a bit more contrast in the dark theme in particular.

Don't get me wrong, I'm really excited to use this as soon as that rather important quirk is corrected. But seeing how long it's been since the last update, this project is basically dead?

Speaking personally, I'd like to see a kOS Notepad++ plugin.

Link to comment
Share on other sites

18 hours ago, JAFO said:

Speaking personally, I'd like to see a kOS Notepad++ plugin.

If by plugin you mean up-to-date (i.e. kOS 1.0.0) syntax highlighting via custom language definitions - EditorTools already has two. In fact it's what I use currently. The only downside is that Notepad++ doesn't seem to allow for switching color schemes (light, dark, blackboard etc.) based on file type / language, and since the definitions are meant for dark themes you'll have to get used to editing everything else - even normal text files - as white-on-black too, or else .ks files will look really awkward.

Since Kode really does seem to be dead, I'm considering getting Atom to use it exclusively for kOS.

Link to comment
Share on other sites

Hi all, 

Kode isn't dead by any means. I do intend to continue development, it just seems whenever I am about to start working on it again, life throws a massive curveball.  

As it stands, 0.6 will likely be a maintenance release at this point. There are a ton of minor issues that have been discovered which will be patched, update to kOS 1.0 spec  and I will be making enhancements based on all the feedback I am getting, including tweaks to the UX(MaxRebo hit the nail on the head, so eloquently), my plan with the appearance options was to have a full configuration panel so that you could define your own fonts, colours, etc and then export it to share. If 0.6 receives any new features, that will likely be it. 

In fact, you guys raising the point that Kode seems dead might be the kick in the pants I need. Things seem to be settling(taps wood) 

Cheers

Edited by randomstonerfromaus
Link to comment
Share on other sites

8 hours ago, randomstonerfromaus said:

Hi all, 

Kode isn't dead by any means

Whoa, talk about a pleasant surprise! If you do have the time, then the fixes and tweaks you listed for 0.6 will be much appreciated. Who knew that being declared dead can result in such a motivational boost... (OK I fess up, I was hoping it would have this effect... :P)

That goes without saying, but if there's work/family/life issues then of course that always comes first. I hope things work out for you OK.

Link to comment
Share on other sites

  • 2 months later...

just want to let you know that when running on MacOS through Mono I get 

Unhandled Exception:
System.DllNotFoundException: user32.dll
  at (wrapper managed-to-native) Dotnetrix.NativeMethods:SystemParametersInfo (int,int,int&,int)
  at Dotnetrix.Controls.TabControlEX.AcceleratorVisible () [0x00002] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at Dotnetrix.Controls.TabControlEX..ctor () [0x00011] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at (wrapper remoting-invoke-with-check) Dotnetrix.Controls.TabControlEX:.ctor ()
  at koside.Form1.InitializeComponent () [0x001c8] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at koside.Form1..ctor (System.String file) [0x0003d] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at (wrapper remoting-invoke-with-check) koside.Form1:.ctor (string)
  at koside.Program.Main (System.String[] args) [0x00083] in <98d15c5df0d54387ac4de89e5d3593da>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: user32.dll
  at (wrapper managed-to-native) Dotnetrix.NativeMethods:SystemParametersInfo (int,int,int&,int)
  at Dotnetrix.Controls.TabControlEX.AcceleratorVisible () [0x00002] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at Dotnetrix.Controls.TabControlEX..ctor () [0x00011] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at (wrapper remoting-invoke-with-check) Dotnetrix.Controls.TabControlEX:.ctor ()
  at koside.Form1.InitializeComponent () [0x001c8] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at koside.Form1..ctor (System.String file) [0x0003d] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at (wrapper remoting-invoke-with-check) koside.Form1:.ctor (string)
  at koside.Program.Main (System.String[] args) [0x00083] in <98d15c5df0d54387ac4de89e5d3593da>:0 

every time I try to run. No worries if you can't fix, just wanted to let you know.

Link to comment
Share on other sites

On 12/21/2016 at 3:58 PM, TheRagingIrishman said:

just want to let you know that when running on MacOS through Mono I get 


Unhandled Exception:
System.DllNotFoundException: user32.dll
  at (wrapper managed-to-native) Dotnetrix.NativeMethods:SystemParametersInfo (int,int,int&,int)
  at Dotnetrix.Controls.TabControlEX.AcceleratorVisible () [0x00002] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at Dotnetrix.Controls.TabControlEX..ctor () [0x00011] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at (wrapper remoting-invoke-with-check) Dotnetrix.Controls.TabControlEX:.ctor ()
  at koside.Form1.InitializeComponent () [0x001c8] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at koside.Form1..ctor (System.String file) [0x0003d] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at (wrapper remoting-invoke-with-check) koside.Form1:.ctor (string)
  at koside.Program.Main (System.String[] args) [0x00083] in <98d15c5df0d54387ac4de89e5d3593da>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: user32.dll
  at (wrapper managed-to-native) Dotnetrix.NativeMethods:SystemParametersInfo (int,int,int&,int)
  at Dotnetrix.Controls.TabControlEX.AcceleratorVisible () [0x00002] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at Dotnetrix.Controls.TabControlEX..ctor () [0x00011] in <a3fbddf4d9df478392c4f62a08b82654>:0 
  at (wrapper remoting-invoke-with-check) Dotnetrix.Controls.TabControlEX:.ctor ()
  at koside.Form1.InitializeComponent () [0x001c8] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at koside.Form1..ctor (System.String file) [0x0003d] in <98d15c5df0d54387ac4de89e5d3593da>:0 
  at (wrapper remoting-invoke-with-check) koside.Form1:.ctor (string)
  at koside.Program.Main (System.String[] args) [0x00083] in <98d15c5df0d54387ac4de89e5d3593da>:0 

every time I try to run. No worries if you can't fix, just wanted to let you know.

Do you use Wine for anything else? Or is this the first time you have used it?

 

In other news, I will be resuming development in February :) 

Edited by randomstonerfromaus
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...