It is currently Tue Sep 29, 2020 6:20 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 136 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next
Author Message
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sat Jan 06, 2018 3:24 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
New test version added (ver. 1.0.3)

Atop of a bunch of bug fixes I have added bitwise operators (~, &, |, !, << and >>), user-defined 'pseudo' keywords, a couple of additional functions to the standard run-time (HEX() and FINDSTRING()) and support for hexadecimal numbers (must prefix a hex number with '0x').

I do not intend adding new features before the first proper release (ver 1.0) so it is just bug fixes until then. :)

DOWNLOAD minScript

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sat Jan 06, 2018 10:20 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
There seems to be something wrong, I get a compilation (syntax-) error here?!
Code:
dim con_state as integer

function init()
  con_state = 0
endfunction

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sun Jan 07, 2018 12:02 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
Whoa, that's a bad one! :) Bit of a show stopper that one.

Fixed.

Please download again.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Tue Jan 09, 2018 11:14 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
Next syntax error:
Code:
function test()
  Dim regs as string
 
  regs = "test" + "-"

endfunction

(Same if I would use "+")

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Tue Jan 09, 2018 7:09 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
:) Another good one.

Actually, that shone some light on a much larger bug! Doh. You can put keywords in quotes and the darn script still compiles and runs!

Honestly, I give jibbering idiots a bad name sometimes!

All fixed.

I will upload a version with the fixes (1.0.4) when I can.

Thanks.

_________________
I may look like a mule, but I'm not a complete ass.


Last edited by srod on Wed Jan 10, 2018 12:21 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Tue Jan 09, 2018 7:59 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
Is it by design or a lack of feature that, toreal () doesn't work with scientific notations like "1.123E-02"?

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Tue Jan 09, 2018 10:00 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
Both.

minScript doesn't support scientific notation at this moment.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sun Jan 14, 2018 11:51 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
Version 1.0.4 uploaded (bug fix version).

DOWNLOAD minScript

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Thu Jan 18, 2018 9:26 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
Can't find any more bugs.
Only bad side was, that it took me quite some time to finde the source of those annoying thousands of debug lines appearing when loading a module.

My host app is running fine, seems a little slower then LUA, I didn't took a deeper look, but I knew, that I was quite impressed about the string concatenation speed of LUA.
Unfortunately my app has to add strings quite heavily.
But this is something special anyway, I will add a runtime function maybe to see if speed gets improved.

I think the only thing now missing is the documentation.

btw.:
Where exactly can we benefit from poKeywords over runtime functions?

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Fri Jan 19, 2018 9:44 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
Whoops - forgot about those debugs! Those particular ones (in the compiler class source) give me a huge head start when tracking down a bug. Doh!

Make sure you disable the debugger when testing out the speed of minScript, but, yes, perhaps I should add a 'string builder' user-defined type. I will look into it. Then again, minScript doesn't use any PB strings when concatenating strings; it uses direct memory copy's combined with pre-stored byte lengths (as with BSTRs) so it won't be as slow as using PB strings.

A string builder class with suitable buffers would probably help though. What are we talking about in terms of the string sizes you are working with? (I shall set up initial string builder buffers accordingly).

I have started the docs. I am about 4 pages in; only about another 100 to go! :)

poKeywords were added for my own benefit really. They are similar to a user-defined function, but with a simpler prototype and can be used in script without enclosing any (optional) parameter in brackets. I couldn't allow this for a run-time function because of the various short-cut statements that minScript allows (e.g. x + 1 as a shortcut to x = x + 1 etc.) which would upset the parser.

So, for example, if you have a poKeyword 'PRINT' then the following is valid :
Code:
PRINT x+1

whereas if PRINTN is a run-time function, the following is NOT valid (you must enclose the parameter in brackets) :
Code:
PRINTN x+1

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sat Jan 20, 2018 4:30 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
I need to create vector paths from points I get.
Those are 1024 points, which means the string will be around 15000 characters in the end.

A string builder class would be great, but seriously, at the time being this is just a feeling, I didn't investigate deeper into the time consumption, the slow-down could also be somewhere else (in my own code e.g.).
I had to change quite huge parts in my code to switch from LUA to minScript, there are possibilities enough that the root cause is somewhere else.

Regarding poKeywords:
O.k., for now I will ignore them, I see no reason to use them (but take it in mind :))

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Sat Jan 20, 2018 4:39 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
I've sped up the basic string concatenation and am now thinking about a string builder type class and the fastest way of offering up appending strings and the like which supports native minScript strings, literal strings and arbitrary string buffers etc. A little trickier than I thought it would be. :)

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Mon Jan 29, 2018 11:53 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Mon Sep 20, 2004 7:12 am
Posts: 596
Location: Hell
Any news?
I'm really interested in checking the performance of your string builder.

If it is still ongoing, I would also be happy if I could test your latest version with the improved string concatenation.

_________________
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Tue Jan 30, 2018 12:13 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 10589
Location: Beyond the pale...
Hi,

yea sorry for the slow progress; very busy at the moment.

I have just uploaded V1.0.5. This contains the beginnings of a string builder type. It is not complete, but it allows you to append strings and to serialise the object to a string variable when ready. Enough perhaps for you to try it. The two string builder demos which you can run with qdMin will show you what is what. The 2 demos are identical except for the fact that the second demo shows how to get the best performance from the string builder type.

It will be the weekend before I can continue work on the string builder type.

_________________
I may look like a mule, but I'm not a complete ass.


Top
 Profile  
Reply with quote  
 Post subject: Re: New scripting engine - testers wanted!
PostPosted: Thu Feb 01, 2018 1:09 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Sep 18, 2013 11:54 am
Posts: 403
Location: France
Really interesting, I've always wanted a scripting engine for PB. Good luck with the doc :)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 136 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 8 ... 10  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye