SRL Archive - Lape

Why Lape is wonderful..


Olly

2012-10-18 12:42:02

Just posting this here so people can understand what lape is all about speed wise if you haven't seen the thread.

http://villavu.com/forum/showthread.php?t=90383 - all credit to masterBB, give it a try yourself.

Lape: 936 ms
Pascalscript: 65723 ms

Lape: 671 ms
Pascalscript: 68173 ms

Lape: 874 ms
Pascalscript: 87626 ms

Slight difference I would say? :p

Dgby714

2012-10-18 12:48:07

Speed is not the only thing, we now have extended record, pointers, override and overload.

Olly

2012-10-18 12:50:19

From: Dgby714
Speed is not the only thing, we now have extended record, pointers, override and overload.


"what Lape is all about speed wise"
Sadly I know nothing about what you just said otherwise I would give a overview of what they do.

The Killer

2012-10-18 12:53:42

by extended record you mean like memory? :D

masterBB

2012-10-18 12:55:51

People credit me too much ^^.

When writing bots this difference will be much smaller. Most of the intensive functions like get color or any TPA sort function is done by simba itself. This will still take the sametime as with pascalscript. Therefore one could say that the big differences between lape and pascalscript will only be notable when the script calculates a lot itself. When you will use a regular mining bot, the object finding will be done with FindColorTol, the sorting of the points will be done with TPA functions, and the positioning will be done by SPS. This bot will roughly be as fast with lape as with pascalscript.

A bigger pro is in my opinion that it will bring us one step closer to platform independent simba. So you can run it on both linux, windows and mac.

masterBB

2012-10-18 13:00:20

From: Dgby714
Speed is not the only thing, we now have extended record, pointers, override and overload.


Pointers:
var
a: Integer;
b: ^Integer;
c: Integer;

begin
a:= 3;
b := @a;
c := b^;

b^ := b^ + 2;

writeln(a);
writeln(b); //the adress
writeln(b^); //back to a variable
writeln(c);
end.

I could write it out, but maybe Nielsie can give his much better thread he wrote and place it here.

e:
overriding is creating a new function with the same name and parameters as another. This will replace the other method.

overloading is creating a new method with the same name and different parameter as another. This will not replace the other method.

NCDS

2012-10-18 21:19:18

From: Dgby714
overload.


From: masterBB

overloading is creating a new method with the same name and different parameter as another. This will not replace the other method.


Since when does Lape support overloads?! That would make a world of difference in SRL6 development.

Hobbit

2012-10-18 21:21:44

From: NCDS
Since when does Lape support overloads?! That would make a world of difference in SRL6 development.


  • Internal and external (overloaded) functions (with support for default params)


From Nielsie's LAPE thread in members.

Dgby714

2012-10-18 23:34:07

From: NCDS
Since when does Lape support overloads?! That would make a world of difference in SRL6 development.


It has since I wrote the Lape integration into Simba…

procedure Hello();
begin
WriteLn('Hello!');
end;

procedure Hello(Name: string); overload;
begin
WriteLn('Hello, ', Name, '!');
end;

prcoedure Hello2(Name: string = '');
begin
if (Name = '') then
WriteLn('Hello!')
else
WriteLn('Hello, ', Name, '!');
end;

begin
Hello();
Hello('John');

Hello2();
Hello2('John');
end.

Gu3st...

2012-10-19 23:54:05

From: NCDS
Since when does Lape support overloads?! That would make a world of difference in SRL6 development.
I think I've posted about that several times.. :o

Enslaved

2012-10-28 12:16:53

Just wondering, is it me or does lape take longer to compile?

Just wondering why

Brandon

2012-10-28 12:19:55

From: Enslaved
Just wondering, is it me or does lape take longer to compile?

Just wondering why


Takes WAAAYYY Longer..

Enslaved

2012-10-28 12:28:21

From: Brandon
Takes WAAAYYY Longer..


But why?

Brandon

2012-10-28 12:43:47

From: Enslaved
But why?


LOL as if I know the answer to that :S

It's SRL. When I compile regular scripts that don't use SRL, it doesn't take long at all. Specifically when I compile OpenGL stuff (120 ms). As soon as I add {$I SRL/SRL.Simba}

I find that it takes up to 4-5 seconds to compile.

Enslaved

2012-10-28 12:45:37

could possibly just be the interpreter:

[OFFTOPIC]WOOO 300 Posts[/OFFTOPIC]

Daniel

2012-10-28 22:49:45

From: Enslaved
But why?


Most likely due to byte code optimisation (hence why it is faster while the script is running, but not compiling).