Slow Script Editor

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Slow Script Editor

Post by SparkOut » Mon Apr 11, 2022 7:36 am

VSCode is the best code editor by miles. Like stam, I too would love if it could be more integrated with the LiveCode IDE. With the FerrusLogic language plugins it is very good though.
I hope the predominance of Mac usage in the LC community doesn’t create any prejudice against it, based on the source.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Slow Script Editor

Post by richmond62 » Mon Apr 11, 2022 7:49 am

I hope the predominance of Mac usage in the LC community doesn’t create any prejudice against it, based on the source.
Whatever Mac nerds may tell you, MicroSoft and Apple have been cooperating with each other in one way or another for years, so being
anti-Microsoft is a bit silly.

I remember in 1993 using MicroSoft Office on MacOS 7.1 . . . .

Quicktime for Windows . . .

The only reason I am ever prejudiced against software is if it doesn't work.

SparkOut
Posts: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Slow Script Editor

Post by SparkOut » Mon Apr 11, 2022 9:09 am

Quite.
You still see the "ugh, Microsoft" stuff now and then though.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Slow Script Editor

Post by stam » Mon Apr 11, 2022 9:42 am

SparkOut wrote:
Mon Apr 11, 2022 9:09 am
Quite.
You still see the "ugh, Microsoft" stuff now and then though.
In fairness, most times that's justified ;)
It's a rare thing i'll enjoy software from MS; VSCode is an exception.

TheOtherBob
Posts: 17
Joined: Mon Mar 21, 2022 8:13 pm

Re: Slow Script Editor

Post by TheOtherBob » Mon Apr 11, 2022 11:16 am

In response to the Apple/Microsoft posts in this thread...

The moment I first used a Mac (2 months prior to its release in 1984) it became my obvious choice for my ‘personal’ computer. However, I’ve earned far more money as a programmer using Visual Studio on Windows machines.

Hopefully that will change as I begin working on mobile app development. But for the moment I’m still stuck with running LiveCode on a Windows machine, hence the reason I created this thread in the first place — the Mac version appears to be superior.
~Bob (one of the many)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Slow Script Editor

Post by richmond62 » Mon Apr 11, 2022 11:29 am

the Mac version appears to be superior
Indeed it does, and Windows users should feel sorry for Linux users of LC.

And, like it or not, as the vast majority of the world uses Windows LC central may have to 'refocus' their approach.

TheOtherBob
Posts: 17
Joined: Mon Mar 21, 2022 8:13 pm

Re: Slow Script Editor

Post by TheOtherBob » Sat Apr 30, 2022 12:04 pm

Greetings all,

I wanted to say 'Thank You' to everyone who contributed to this thread. I've been doing some research and would like to share my findings.

After becoming frustrated with the performance and behavior of the LiveCode editor on Windows 10, I sought to find an alternative to using LiveCode for developing mobile applications targeting both Android and iOS. I discovered Xamarin and decided to devote some time to learning about it. What I discovered resulted in my decision to switch from LiveCode to Xamarin.

After investing 81 hours studying LiveCode and 39 hours studying Xamarin, I found numerous compelling reasons to switch. The turning point in my mind actually occurred after only 20 hours studying Xamarin, but I didn't want to act prematurely and so gave it a bit more time before deciding.

The reason I decided to switch to Xamarin is that I find the Xamarin development ecosystem to be significantly more powerful. The editor is Visual Studio and the platform is .NET, both of which have been around for more than 20 years, and perhaps most importantly, both of which are now supported on MacOS. Using Visual Studio to edit code is a sublime experience. It provides numerous features that make coding easier and more productive; too many to list here and I don't want to turn this post into an evangelical rant. :oops:

I should note at this point that I have significant prior experience using both Visual Studio and .NET; I've been working with them on and off since ~2001, developing web apps with VB.NET and ASP.NET, and desktop apps with C#.NET. That experience greatly reduced the learning curve I had with Xamarin, since it's so tightly integrated with both visual Studio and .NET.

LiveCode is clearly a powerful development platform. It offers numerous features I have not found elsewhere. I found it relatively easy to learn and I think it's especially well-suited for individuals with no prior programming experience. Someone who is just beginning their pursuit of programming will likely find using LiveCode to be a more accessible and enjoyable experience, because Visual Studio and .NET present a larger learning curve for someone with no prior programming experience.

But for someone like myself, with significant experience using .NET, Xamarin turns out to be an ideal choice.

Of course, this is only my opinion. Each person's situation and needs are different, and in fairness, LiveCode deserves a look if you're considering exploring the field of programming, especially if you want to develop cross-platform apps, but for me the choice clearly is Xamarin.

Best to all of you!
~Bob (one of the many)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Slow Script Editor

Post by richmond62 » Sat Apr 30, 2022 12:37 pm

Back to the topic.

I have noticed that on MacOS 12.3 and betas following there is a quite marked visual
pause between hitting the paste keys and the thing being pasted actually appearing
where it is meant to be pasted.

However, as that pause was not present with MacOS 12.2 I would want to blame Apple rather than
LiveCode.

Oh, and there is no observable pause on Xubuntu 22.04.
Last edited by richmond62 on Sat Apr 30, 2022 12:49 pm, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Slow Script Editor

Post by richmond62 » Sat Apr 30, 2022 12:49 pm

switch from LiveCode to Xamarin
That depends on how 'embedded' in LiveCode your source code of any ongoing project is.

My Devawriter Pro, like it or not, after 12 years of ongoing (and quite a lot of 'off-going'
to be honest: back in the saddle after what is almost an 18 month hiatus - a few coughs
here and there) development in LiveCode is so LiveCode dependent I could not port it if
my life depended on it (which, luckily it does not).

So, while I appreciate that developers of lots of short-term projects might decamp from
LiveCode because of some feature they don't feel comfortable with, those of us who are
in for the long-haul, or one-trick ponies like myself, would probably rather stick with LiveCode
(and/or the upcoming OpenXTalk if it comes to fruition), and continue to engage with
LiveCode central and the semi-permanent user-base rather than decamp elsewhere,
where, you can be sure, there are other things to 'get bitchy' about.

No, LiveCode is not perfect, and in certain areas it is quite lumpy, but I for one would far
rather try and deal with them and agitate to get some of those lumps smoothed out than
move elsewhere (think, "do I get divorced, or do I work things out with my current partner?")
and end up with a different series of gripes.

And, re perfection, if anyone round these parts is so naive as to think that perfection exists
anywhere (except, possibly, in the mind of God), it might be time to give up computer
programming altogether and do something else such as growing potatoes.

mrcoollion
Posts: 720
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Slow Script Editor

Post by mrcoollion » Sat Apr 30, 2022 1:09 pm

stam wrote:
Sat Apr 09, 2022 3:01 pm
I'm on a mac too and haven't experienced severe lag when typing either - but i do find it a bit slow with larger scripts, in a way that 'proper' code editors just aren't... i wonder if the 'compiled' version of LC stacks which i read somewhere is a planned feature will improve that?
I am on Windows and with larger stacks 1000 lines or more it gets significantly slower, even with my new ridiculous fast laptop it is noticeable.
Also I do not use the msg box because after using it once the IDE is unworkable slow.
Does anybody use the Atom IDE with the LiveCode plugin. How does this work? Can i step through the code just like with the LC IDE?

Regards,

Paul
Last edited by mrcoollion on Sat Apr 30, 2022 2:12 pm, edited 1 time in total.

AndyP
Posts: 615
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Slow Script Editor

Post by AndyP » Sat Apr 30, 2022 2:07 pm

Have you tried v 9-6-7

This version spacifically fixes the slow down due to the message box. For me on win 10 it has solved a lot of the slow downs and stutters.

See the blog post below.

https://livecode.com/9-6-7-stable-maintenance-release/
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Slow Script Editor

Post by stam » Sat Apr 30, 2022 2:12 pm

mrcoollion wrote:
Sat Apr 30, 2022 1:09 pm
Does anybodu use the Atom IDE with the LiveCode plugin. How does this work? Can i step through the code just like with the LC IDE?

Regards,

Paul
Sadly no, you cannot debug your script in an external editor - I presume this is what you mean by wanting to step through your code. But then again I find the built in debugger quite sufficient.

The linters available for both Atom and VSCode (the latter is definitely my preference even on Mac) will however format your code, do syntax colouring (much better than the built in IDE), autocomplete and will highlight syntax errors as you type.

How you work with this is also different, as the IDE does not provide integration with 3rd party editors (in my mind they really should as these are the best tools for the job).

Your options are either to take the “low tech” approach and just copy/paste larger scripts back and forth from the editor to the IDE.

Or do what I’m now doing - abstracting code to script only stacks (SOS).
What I’ve done is separated SOS in to 3 groups:
- card behaviours which are assigned to each card at startup
- libraries which are loaded at start with “start using”
- backscripts Which are loaded at startup and which includes a stack with functions to return the location of SOS files depending on whether in IDE or standalone (obviously this loads first)

Unfortunately there is no automatic refresh of code when you edit externally (the above mentioned lack of integration :-/ ) and I therefore also have a handler that will close all SOS and remove them from memory and then just run the startup script to load them all up again.

Above and beyond the benefits of working with professional code editors the benefits of this approach include:
- excellent integration with Git or other version control
- I can group all SOS ina project folder so they’re all in one place in the code editor
- it’s much easier break up scripts into logical units. Being a bit old fashioned I like an MVC approach which is now more straightforward. For example if I have a card that deals with staff data stored in a database:
- model.staff.livecodescript loads as a library to manage db transactions
- view.staff.livecodescript is assigned as the card behaviour at start up
- controller.staff.livecodescript loads as a library to manage any logic required
And any utilities required by other libs are loaded into the backscripts.

This may seem complex but it is really quite fast and means I can break down massive scripts into more manageable chunks.

Of course you don’t really need SOS to do this - the card and stack scripts can be good places for these but I find very easily get too long to be practical.

That’s my approach anyway. Needs a bit of work to set up the load and reload handlers but the. Works very nicely indeed…

Having said that there is no way to fully avoid the IDE as you can’t debug in an external editor in LiveCode

Anyway, that’s just my (current) approach, and it’s only really something I would do for larger projects where scripts can be thousands of lines long. For smaller projects I’d just use the built in stuff tbh. Maybe it’s useful to you, maybe not…
Stam

AndyP
Posts: 615
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Slow Script Editor

Post by AndyP » Sat Apr 30, 2022 2:30 pm

Trevor Devore made a plugin for Sublime Text which works well.


https://github.com/trevordevore/livecode-sublimetext

and a linter which works in conjunction with the server edition of LC.

https://github.com/trevordevore/sublime ... vecodelint
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Slow Script Editor

Post by stam » Sat Apr 30, 2022 4:07 pm

I've tried that as well as TextMate (mac-only, paid software), Atom and VSCode. Disappointingly i've not really found an equivalent for BBEdit.

All work well, but for me VSCode comes out on top - it's an extremely well honed professional code editor made to work for any number of languages. FerrusLogic have very kindly provided a formatter/linter as a single add-on, based on LC server as well (you can just add this from within VSCode, no need to download separately). It has integrated support for git as well, so after installing on my work machine i can now work on both my personal and work laptops by just committing to git and downloading the new commits etc.

But which editor you use is almost secondary, as long as you like it. The key thing is to develop a functional system that works for you - whether that's a low-tech approach copy/pasting or converting everything as much as possible to SOS or some variant thereof depends on what suits you.

I suspect the new IDE being developed may change some or all of this, but for now i'm sticking with ScriptOnlyStacks and VSCode as that suits me best.
I quite like working with text files... Still a work in progress though ;)

S.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”