Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Help Build an IDE for Corona
Started by J. A. Whye Mar 15 2018 09:55 PM

12 replies to this topic
ide
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

Seven years ago I built Corona Project Manager which then turned into the Outlaw IDE for Corona. I stopped working on that a couple years ago due to time constraints.

 

However, when I left it I was working on a successor called Desperado. What made Desperado unique is the way it treats source code (it's not completely original, but *very* few tools work this way) -- here's a short video to give you an idea:

 

https://www.youtube.com/watch?v=MQYHT8MzRQU&t=3s

 

Outlaw and Desperado were written in Xojo, which I love, but I'd like to restart with Desperado as a prototype and create an open source IDE for Corona using Electron. (Using that framework would allow people to more easily contribute than sticking with something like Xojo.)

 

So I'm putting out "feelers" to see if I can find some folks who are interested in helping work on such a thing. I have a few hours a week I'm going to start throwing at it and finding a few more like-minded folks would make for a more fun project.

 

Questions? Comments? Fire away!

 

 Jay

 



[TOPIC: post.html]
#2

nick_sherman

[GLOBAL: userInfoPane.html]
nick_sherman
  • Corona Geek

  • 1,975 posts
  • Corona SDK

That looks really cool, just showing code for the function selected and splitting out composer events instantly gives a cleaner, manageable feel to the project. I'd prefer to have that list on the right side, is that customisable?

 

Maybe you could further enhance that to read comments like '-- region createPlayer -- end region' to further group functions.

 

If you could add a few features that I use regularly on monoDevelop, such as rename variable, goto declaration and find references, all available when you right click on a variable or function, it would be the perfect environment.



[TOPIC: post.html]
#3

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi,

 

Very nice. I love working with Electron, not sure what I could add but I would certainly keep an eye out for things I could help with.

 

Are you planning on starting from scratch? Or have you considered extending Atom, which is an Electron app as well.

 

-dev



[TOPIC: post.html]
#4

cyberparkstudios

[GLOBAL: userInfoPane.html]
cyberparkstudios
  • Contributor

  • 588 posts
  • Corona SDK

Jay,

 

It looks great. I agree with Nick, the outline table showing all the functions and particularly the composer functions is really nice.  The search/find is critical of course, but are you considering(or already have) 'find-replace' as part of the search function?

 

In any case, it looks really good, and look forward to using Desperado.  I have toyed for along time on changing from TextWrangler to something else, and Desperado is looking like it could be a great choice.

 

Bob



[TOPIC: post.html]
#5

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

Are you planning on starting from scratch? Or have you considered extending Atom, which is an Electron app as well.

 

I was planning on starting from scratch, but after poking at Atom a little bit today (including the IDE add-on) I think it might make more sense to use Atom as a base.

 

To be honest, I've never built on top of an existing thing like this -- I'm more comfortable in the 'start from scratch" role. However, there's a lot of depth to Outlaw/Desperado and I haven't rewritten it before now because it seemed like such a huge endeavor. But starting with a solid code editor and building on that? I'm kind of liking the idea.

 

I think I'll fork Atom and see if I can get to the point of doing a successful build. :)

 

 Jay

 

PS - Yes, I imagine the different panes could be moved to the right, left, or wherever. That makes sense.



[TOPIC: post.html]
#6

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi,

 

@Jay I am usually a 'start from scratch' kind of person as well so I know the code base, but maybe I'm getting old (or lazy) because I have been spending more time extending some of the great projects the open source community has been putting out.

 

So far I feel the extra time spent figuring out the framework ends up paying off better than the 'start from scratch' method.

 

Good luck, and again, once you get rolling I'll be happy to help where it makes sense if needed.

 

-dev



[TOPIC: post.html]
#7

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

So far I feel the extra time spent figuring out the framework ends up paying off better than the 'start from scratch' method.

Thanks for that encouragement, which I needed, because I spent a couple hours last night just trying to do a build of Atom and it's going nowhere. That's been my experience in the past when trying to do a build of code from Github. Apparently there's something I don't grok or some part of my system that's not up-to-snuff.

 

I'll keep banging on it because I think you're right - the extra time up front will pay off big time later.

 

 Jay



[TOPIC: post.html]
#8

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi,

 

Another option if you don't want to deal with all of the extra overhead of Atom, is to use the Ace editor in Electron.

 

I use Ace for my web admins and it's really full featured, and also supports Lua. I've never tried putting it in an Electron app, but it can be done. The Ace api is pretty straight forward.

 

https://ace.c9.io/

https://ace.c9.io/#nav=api

https://ace.c9.io/build/kitchen-sink.html

 

Electron example

 

https://github.com/mjaniszew/electron-editor-example/tree/master/src

 

Not sure if you're wanting to go straight JS or use something like React if you go Electron, but there is a react-ace component as well.

 

Just another option, and then you can be closer to the code, as opposed to dealing with Atom.

 

On a side note, a recent Ace release introduced an issue where the Lua 'end' keyword isn't closing properly, but I've filed a bug report and I'm sure it will be fixed. Works fine in the release a couple versions back.

 

-dev



[TOPIC: post.html]
#9

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,473 posts
  • Corona SDK

Hi,

 

I should have added this link as well, the packaged JS builds https://github.com/ajaxorg/ace-builds/

 

-dev



[TOPIC: post.html]
#10

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

I will be going against the comments above... IMHO, if you have time to contribute to improve the Corona environment I think there are more useful tools that could be built instead of another IDE.

 

Right now, we have at least 4 IDEs that can be used for Corona development (Sublime, Atom, ZeroBrane, LuaGlider (not sure if this one is still active).  All of them have some negative sides, so why not use improve them?

 

For example, on Sublime (Corona Editor) the goto function shortcut is broken since one of the last updates, the color formatting does not work well,....

 

But my point is that the community could benefit much more from other tools than another IDE.

 

Some example of tools that would be nice to have:

Simple stuff:  more plugins (AWS SDK, Google Maps SDK,....),  more Corona widgets,....

More complex stuff:  a framework to decouple the visual/layout part from the code side, allowing us to have an easy way to develop custom layout for different device sizes (specially phones x tables)

 

And you could make those stuff available for free or even charge for it (I would easily pay a $100+ for such layout framework)

 

Of course, your time is yours and you should use it on whatever you want. I am just sharing my perspective as a long member of the community.



[TOPIC: post.html]
#11

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

Every one of those IDEs you mentioned work the same way the code editors in the 80s worked -- a big long scrolling field of code. It's a sub-standard way to work, and every mainstream code editor follows the path of the one before instead of trying to break new ground.

 

(A person could say that if everybody does it that way, it must be what everybody wants.

I think a person saying that would be wrong.)

 

I know from personal experience I'm more productive when code is chunked down to the function level, and I don't think I'm so special that it's just me that is (would be) more productive. I use Desperado when I'm writing Corona stuff but it's rough enough around the edges that I don't want to make it available publicly.

 

Plus, I write Javascript with Visual Studio every day at work and have to deal with the same substandard type of editor -- if I wouldn't have hard-coded Lua stuff into Desperado I could use that for Javascript as well. With a new base to build on I can do Desperado right and end up with something *better* for Lua, Javascript, C#, etc. 

 

So while I agree with you that the community could use things other than another IDE, I also have to disagree because those existing IDEs are basically all the same. Plus, I see a new Desperado as a base that things like a layout framework could be built upon.

 

 Jay

 

PS - While I'm disagreeing with you, I appreciate your feedback. You didn't change my mind (this time), but you did get me to pull out some of my older notes for "Corona enhancements" that I always wanted to make. Some of those were for Desperado's successor, but could also be done as stand-alones.



[TOPIC: post.html]
#12

RedBeach

[GLOBAL: userInfoPane.html]
RedBeach
  • Corona Geek

  • 1,132 posts
  • Corona SDK

Sure. The same here: far from me to criticize your choice and willing to do another IDE. I just wanted to share my point of view of what I would think would benefit most of the community.

 

I saw your video but I decided to not mention that feature of having "views" for each functions instead of seeing the whole file because I wanted to focus on the broader idea of collaboration instead of specific points that I like/dislike on your IDE.

 

But since you mention it, I would say that I don't think that feature (separate function view) is something that would attract me to use your IDE and I explain you why:

 

1) Having long files is far from my top issues of an IDE simply because I can simply jump to the function that I want usually if 1-3 clicks. (Android Studio, Xcode, VS all have functions list windows/dropdown that you can see all functions and double click to jump to it;  Sublime has the GoTo Definitions that I can just press CMD+R and I see all definitions and even type with autocomplete - Although that is not working with Corona Editor as I mentioned on my previous post).

 

2) Due to Lua style (and JS would be the same), you can have variables that are being used by a function that were defined outside of that function, so you would not see that variables definitions in your one-function view). Yes, you can go to see the whole file or even search, but then you kind of lost the benefit of having one-function view since you now have to access 2 windows.

 

3) One of the nice things of Sublime and Atom is that it is very minimalist, allowing you have as space as possible to what matters: code area. Your IDE follows the same layout of LuaGlider and ZeroBraine with a lot of menus, buttons,... I think almost 30% of your IDE screen is lost with non-code area.

 

 

As a developer, my main concern is always to improve my coding efficiency, which translates to more bug-free good-quality code in less time as possible.  For me, having that one-function view does not contribute significantly to that.  What I believe would be a good area of IDE improvement would be to add resources to allow me to identify issues/bug, specially on a dynamic language like Lua.  ZeroBrane tried to do that by adding luacheck and I installed on my Sublime a SublimeLinter-luacheck plugin as well.

 

That are my points. Again, not writing to criticize or discourage you. I just want to share my thoughts on it. Being a long-time member of the community I have seen several people that spend significant amount of time to develop tools that in the end less than 10 people are actually using it. 



[TOPIC: post.html]
#13

J. A. Whye

[GLOBAL: userInfoPane.html]
J. A. Whye
  • Corona Geek

  • 1,689 posts
  • Corona SDK

Thanks, @RedBeach -- I take your criticism as positive. Please take my "rebuttals" in the same vein. ;)

 

1. Long Files - I see breaking the code into chunks as an intermediate step toward getting rid of more code in the future. I've been writing code since the mid-80s and it ticks me off that I have to keep writing the same things over and over. I'm not necessarily wanting a fill in the blanks environment, but I think there's a middle ground between "writing every stinking line" and "drag-and-drop" that hasn't been adequately explored, yet.

 

If I can figure out how to put a picture in here I'll show you one option I've been playing with. If you drop an image in the Outlaw/Desperado editor it pops up a window with a bunch of defaults you can change and then it inserts the generated code where you dropped the image. Right now it's a one-way trip, but I want to be able to either A) select the chunk of code and parse it back into the dialog, or B) turn it into a "component" that can be referenced in the code, but doesn't actually exist in the code. (Think along the lines of a prefab in Unity.)

DespDropImage.png

 

While the details of that may not be your cup of tea, I hope I got the concept across -- less code to type that has nothing to do with the program/game itself -- let something else keep track of the minutiae so developers can focus on the creative parts of programming.

 

2. Variables Away from Code -- True, but only the global vars are out of sight; all the local variables would be right there in the function view. And in the current version there's a specific "place" for global vars, so viewing them is as easy as viewing any function. Also, I don't know anyone who defines global variables in amongst their functions, so their global vars will be out of sight in any case.

 

3. Screen Space Used -- While I tend to leave the function list open, everything else can be shown/hidden with a single click which gives you most of the screen for code. Yes, there's room for improvement with the current UI, no doubt. I should have put keystrokes on the show/hide pane options, for example.

 

As a developer, my main concern is always to improve my coding efficiency, which translates to more bug-free good-quality code in less time as possible.

 

I hear you. Which is why I want to write less code and have the IDE write it when it makes sense. Desperado allows you to write shorthand and then it expands those when you run the project. 

 

Thanks for the conversation -- pounding on ideas is the best way to see which ones crumble.

 

 Jay




[topic_controls]
[/topic_controls]