SRL Archive - Revisions / Releases

Simba 1.1b


Dgby714

2014-03-30 00:24:33

I need some people to test this. I've written up support for code-completion in Lape.

Also note if you run this I accidentally added a line in it that creates a text file called "test.log" in your Simba directory.
The file might interest some, it has all of Lape and Simba's exports.

You can find the downloads and buildbot builds at http://l0.lt/builders/codecompletion-test/



Ian

2014-03-30 01:41:58

I managed to freeze it by typing "TPointArray." It freezes right when I type the "." after TPointArray.

Note: It freezes after the "." regardless of what is immediately before the ".". Does not need to be TPointArray as long as there is something. "." without anything before it does not cause a freeze.

The freeze lasts for ~45s and when it ends an empty window appears along with the "."

during freeze
after freeze

I am using Simba.i386-win32.exe if that's helpful.

Dgby714

2014-03-30 02:56:34

From: BMWxi
I managed to freeze it by typing "TPointArray." It freezes right when I type the "." after TPointArray.

Note: It freezes after the "." regardless of what is immediately before the ".". Does not need to be TPointArray as long as there is something. "." without anything before it does not cause a freeze.

The freeze lasts for ~45s and when it ends an empty window appears along with the "."

during freeze
after freeze

I am using Simba.i386-win32.exe if that's helpful.


O_o, It's prob quite slow, maybe that is the freeze your experiencing, mine pops up instantly though I haven't tried it with SRL included yet.

Try some of Simba's internal methods and types without srl included.

Currently the methods are not attached at all to the types… I have to search thru all of the methods checking it's "classname" against the type you've typed (as well as all of it's parents)

I'm planning on modifying the parser to do this during the parse for code-insight should speed things up to how they are in a current Simba.

You should have a CC Error line in your console!

Ian

2014-03-30 11:59:27

From: Dgby714
O_o, It's prob quite slow, maybe that is the freeze your experiencing, mine pops up instantly though I haven't tried it with SRL included yet.

Try some of Simba's internal methods and types without srl included.

Currently the methods are not attached at all to the types… I have to search thru all of the methods checking it's "classname" against the type you've typed (as well as all of it's parents)

I'm planning on modifying the parser to do this during the parse for code-insight should speed things up to how they are in a current Simba.

You should have a CC Error line in your console!

It appears instantly without SRL included, yeah.

Here's what the console has in it after it's frozen then unfrozen, but everything in it was there before I made it freeze: http://i.imgur.com/VY023fR.png

slacky

2014-03-30 12:37:31

Dgby714, it seems as tho you have done a great job! It's running very smoothly for smaller includes! :)

Using it with SRL as mentioned will cause a horrible lag, tested by writing "TBox." .

Looking forward to a final release.


Edit: The old "crash Simba with code completion" is still there. But that might not have been in your focus at all.
[Spoiler=My steps]This can happen if you have a function like: SomeType.WhatEver, and you write MyVar.WhatEverASD, and then remove the remaining ASD. Tho, does for some reason not happen in all such cases.
My test went like:
{$I SimbaExt/SimbaExt.simba}
var Arr:T2DIntArray;
begin
Arr.FloodFillASD
{Now open code completion, and start pressing backspace/removing characters}
end.
However, if I simplified it to:

function Integer.Something(): Integer;
begin
Result := 1;
end;

var I: Integer;
begin
I.SomethingASD {open code completion + deleting chars now will NOT crash simba this time}
end.
[/Spoiler]

Clarity

2014-03-31 17:23:06

Great release, helpful for people like me who don't know every function/procedure/etc. inherent in Simba, and in the includes for that matter.
As said above, there's a lagtime for SRL but it still works. Awesome job, thank you! :D

masterBB

2014-04-03 04:31:54

This version, for some reason, doesn't run at work. Might be because of security, will look into it.

Brotein

2014-04-03 09:42:47

Cool can't wait to have this working for the SRL include. Been writing my code in Kate for the autocomplete since Simba lost this support with Lape.

Flight

2014-04-17 05:39:48

I thought I'd this this your way Dg:

Message: TAutoCompleteListBox Index 831 out of bounds 0 .. 0

If I'm not mistaken this happened when I was browsing the function box with, in this case "s", and backspaced which threw the exception and crashed Simba. If you'd like the full error report let me know.

Olly

2014-04-17 12:04:38

^ Happens in current Simba versions also.

Dgby714

2014-04-18 03:16:29

o god, I hope everyone knows there are new builds =P

Clarity

2014-04-18 04:30:34

Just tested out the latest one, working awesomely with the SRL include and my own private functions, could not be happier with how much easier you made it to script! :)

Flight

2014-05-02 07:40:12

I've been using the build from April 18th and it crashes often when typing "something.". TBox.X1, Coordinate.Y, perhaps it has to do with the little code hint that pops up when you use "."? Anyways I just downloaded the build from April 20th, I'll try that now.

Olly

2014-05-02 11:57:51

From: Flight
I've been using the build from April 18th and it crashes often when typing "something.". TBox.X1, Coordinate.Y, perhaps it has to do with the little code hint that pops up when you use "."? Anyways I just downloaded the build from April 20th, I'll try that now.


Nah, It's a known bug i've told dgby about it a million times… but it's finals for him so he cant do anything. :p

Brandon

2014-08-08 15:39:31


writeln('hello' + #0 + 'world');
writeln(Length('hello' + #0 + 'world')); //prints 11.

It prints 'hello'. Nothing more. And the second line prints the correct length of 11 characters. Writeln only sees 5.

This bug still exists ={





TLDR at the bottom..

Also, is there any chance of getting TRegExpr exported? Or at least a function that prints the "position" of the found strings/sub-matches/groups.


For example:


ExecRegExpr('(?i)(.(?!to))(?-i)', 'sentence to search', StrList); //(?i)(?-i) means ignore case..

Two things wrong here.. the '?!' negative look-ahead expression cannot be parsed because it isn't supported/recognised but forget about that. There is no way to get the position at which the result was found, OR even get the result itself..

In the following:


ExecRegExpr('(dog)', 'I don''t have a dog or a cat');

will return true because it finds 'dog'. But WHERE does it find dog?

Another:

ExecRegExpr('(.*?)dog or a (.*?)$', 'I don''t have a dog or a cat');

The above will find two things:

1. 'I don't have a'
2. 'cat'

But we can't get these matches. It would be insanely useful.

So any chance of exporting TRegExpr or at least a function for the position and/or sub-matches? Submatches would be preferred of course.


TLDR:
IF you cannot export it or don't want to, I'll make a regex plugin I guess..

Olly

2014-08-08 17:53:35

From: Brandon
…


var
Reg: TRegExpr;
i: Integer;
begin
Reg.Init();
Reg.setExpression('(.*?)dog or a (.*?)$');
Reg.Exec('I don''t have a dog or a cat');

for i := 1 to Reg.getSubExprMatchCount() do
begin
Writeln(Reg.getMatch(i));
Writeln(Reg.getMatchPos(i));
end;
end.

http://speedy.sh/mwWAn/Simba.exe

Brandon

2014-08-08 19:13:15

From: Olly
…



:D <3 That's perfect! It still can't do negative look-ahead but there's nothing you can do about that since it uses PCRE. I thought no one would do it so I made a plugin lol :l

Good enough though!

Dgby714

2014-08-10 01:16:07

From: Brandon

writeln('hello' + #0 + 'world');
writeln(Length('hello' + #0 + 'world')); //prints 11.

It prints 'hello'. Nothing more. And the second line prints the correct length of 11 characters. Writeln only sees 5.

This bug still exists ={





Not a bug, TMemo prob doesn't support #0 in the string…