FHannes Posted July 13, 2011 Share Posted July 13, 2011 (edited) SCAR's development contains 3 branches, the stable branch which is the current release which gets updates to fix bugs and such. Then there's the development branch which adds new features and functions to the current stable version. Finally there's the next gen branch which is basically the development of the next generation SCAR application. The current versions in all of those branches are 3.25.08, 3.26.00 and 4.00.00 As all other pre-releases for years, I will be releasing copies of it to the public for SCAR Titan 4.00, which will be about a 50% rewrite from SCAR Divi. SCAR 4 is being written from scratch, but parts are being merged into it from SCAR Divi and SCAR Luna as the development progresses. This first pre-release version is the pre-alpha. This is a highly experimental release and might not always be stable and is also constantly changing. However, even though it currently doesn't have many features or functions, it's already quite functional. What has changed? SCAR 4 removes the usage of include files, these are replaced by units (namespaces). For example, to include a file "Includes\MyFile.scar", you write: uses MyFile; begin end. This file will be structured like this: [scar]unit MyFile; interface implementation end.[/scar] If you want to include files from subfolders, for example "Includes\Folder\MyFile.scar", you need to add "Folder.MyFile" to uses and the unit header has to start with "unit Folder.MyFile". Aside from the above, most (not all) internal functions are divided up into namespaces as well. For example, to use Rnd (Random) which is part of the namespace Math, you have 2 options: [scar]uses Math; begin Print(Rnd(5)); end.[/scar] [scar]begin Print(Math.Rnd(5)); end.[/scar] Any changes besides this are mostly additions and to the core library which is being completely renewed. Most language features available before are still available now. What's new? The number of new features that are already in SCAR 4 and coming in the future is incredibly big, but I'll try to list as many as possible. Variable Initialization You can now initialize variables: [scar]var i: Integer = 5; begin Print(i); end.[/scar] Classes You can now define classes: [scar]type TMyClass = class private FInt: Integer; public constructor Create; property Int: Integer read FInt; end; constructor TMyClass.Create; begin inherited Create; FInt := 5; end; var c: TMyClass; begin c := TMyClass.Create; try Print(c.Int); finally c.Free; end; end.[/scar] Interfaces You can now use interfaces: [scar]type IMyClass = interface function GetInt: Integer; end; TMyClass = class(TInterfacedObject, IMyClass) private FInt: Integer; public constructor Create; function GetInt: Integer; end; constructor TMyClass.Create; begin inherited Create; FInt := 5; end; function TMyClass.GetInt: Integer; begin Result := 5; end; var c: TMyClass; begin c := TMyClass.Create; try Print(c.GetInt); finally c.Free; end; end.[/scar] Parameter initialization (optional parameters) You can now give parameters default values: [scar]function MyFunc(const i: Integer = 5): Integer; begin Result := i; end; begin Print(MyFunc); Print(MyFunc(6)); end.[/scar] Overloading Functions can now be overloaded in a script by using the overloaded keyword. Many functions in the core are also overloaded to provide a very flexible API. [scar]function MyFunc(const i: Integer): Integer; overload; begin Result := i; end; function MyFunc(const e: Extended): Extended; overload; begin Result := e + 5; end; begin Print(MyFunc(5)); Print(MyFunc(5.0)); end.[/scar] Extended record members Records can now have a lot more members, like a class without "instantiation": [scar]type TType = record public i: Integer; procedure SetI(const ii: Integer); end; procedure TType.SetI(const ii: Integer); begin i := ii; end; var t: TType; begin t.SetI(5); Print(t.i); end.[/scar] Operator overloading You can now use operator overloading to assign operations to the operators of your structured types. A lot of types that will be in the core will also have overloaded operators. [scar]type TType = record public i: Integer; class operator Add(const t1, t2: TType): TType; end; class operator TType.Add(const t1, t2: TType): TType; begin Result.i := t1.i + t2.i; end; var t1, t2: TType; begin t1.i := 3; t2.i := 7; Print((t1 + t2).i); end.[/scar] Pointers You can use pointers now! [scar]type IntPointer = ^Integer; var i: Integer = 0; pi: IntPointer; begin pi := @i; pi^ := 5; Print(i); end.[/scar] C++ Operators A bit odd in a pascal based language, they're so awesome: [scar]var i: Integer = 0; begin i += 2; Print(i++); Print(++i); end.[/scar] Unicode support You can now use unicode characters in SCAR: [scar]begin Print('???????????'); end.[/scar] Ranges SCAR Titan supports defining ranges: [scar]type TMyRange = 0..9; var r: TMyRange; begin r := 5; PrintLn®; end.[/scar] Sealed classes You can now use sealed (final) classes: [scar]type TMyClass = class sealed end; TMyClassEx = class(TMyClass) end; begin end.[/scar] Final methods Final methods are available now: [scar]type TMyClass = class public procedure Tmp; virtual; final; end; TMyClassEx = class(TMyClass) public procedure Tmp; override; end; procedure TMyClass.Tmp; begin // ... end; procedure TMyClassEx.Tmp; begin inherited; // ... end; begin end.[/scar] Abstract classes You can create abstract classes: [scar]type TMyClass = class abstract public procedure Tmp; virtual; abstract; end; TMyClassEx = class(TMyClass) public procedure Tmp; override; end; procedure TMyClassEx.Tmp; begin inherited; // ... end; begin end.[/scar] Absolute keyword You can now use the absolute keyword: [scar]type TMyClass = class public function Get: string; end; TMyClass2 = class public function GetStr: string; end; function TMyClass.Get: string; begin Result := 'TMyClass'; end; function TMyClass2.GetStr: string; begin Result := 'TMyClass2'; end; var o: TObject; c: TMyClass absolute o; c2: TMyClass2 absolute o; begin o := TMyClass2.Create; if o is TMyClass then PrintLn(c.Get) else PrintLn(c2.GetStr); end.[/scar] And there's surely much more I'm forgetting... SCAR 4 also includes a new IDE, but that's still in the making... Features will include code folding, IDE plugins, advanced debugging features as found in SCAR Divi, ... A new plugin system will also be created, currently however the Legacy.TLegacyPlugin class can be used to import old plugins. The scripts themselves execute averagely 100 times faster than scripts in SCAR Divi because SCAR Divi used an interpreter to run scripts, SCAR Titan compiles them to native machine code and executes it. Documentation can be found here: http://wiki.scar-divi.com/titan/index.php?title=Category:API Finally, the program itself can be found it's it's subversion repository here: http://svn.scar-divi.com/titan/ Development is progressing fairly quickly, so you'll see many more functions and other stuff appearing in the application soon. Enjoy! ~Freddy Edited October 28, 2011 by Freddy Quote Link to comment Share on other sites More sharing options...
Timer Posted July 13, 2011 Share Posted July 13, 2011 <3.... Quote Link to comment Share on other sites More sharing options...
Zyt3x Posted July 14, 2011 Share Posted July 14, 2011 This is great Quote Link to comment Share on other sites More sharing options...
NCDS Posted July 14, 2011 Share Posted July 14, 2011 Great job with this freddy. Quote Link to comment Share on other sites More sharing options...
mormonman Posted July 16, 2011 Share Posted July 16, 2011 Love this. Edit: One thing I noticed is that it shuts down smart as soon as the script is over. Fixes? Quote Link to comment Share on other sites More sharing options...
FHannes Posted July 16, 2011 Author Share Posted July 16, 2011 Love this. Edit: One thing I noticed is that it shuts down smart as soon as the script is over. Fixes? Can't be fixed, you can remove the FPlugin.Free in the SMART.scar's finalization section, that will keep the plugin from being freed from the memory, however, it will cause a memory leak. Quote Link to comment Share on other sites More sharing options...
Drags111 Posted August 7, 2011 Share Posted August 7, 2011 Love this. Edit: One thing I noticed is that it shuts down smart as soon as the script is over. Fixes? Can't be fixed, you can remove the FPlugin.Free in the SMART.scar's finalization section, that will keep the plugin from being freed from the memory, however, it will cause a memory leak. Just want to inform yall that the problem has been fixed since Freddy rewrote the smart plugin with his new plugin system! Quote Link to comment Share on other sites More sharing options...
Echo_ Posted August 7, 2011 Share Posted August 7, 2011 I love all these new features, it finally feels more like programming than scripting. Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted August 15, 2011 Share Posted August 15, 2011 Anyone have a complete list of the built in namespaces? Trying to figure what routines have relocated to where. Edit: Managed to find a link to the Titan documentation Freddy posted on the SRL forums: http://wiki.scar-divi.com/titan/index.php It appears ClearDebug isn't built-in anymore? Or just not listed in the documentation? Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 16, 2011 Author Share Posted August 16, 2011 ClearDebug or a similar function currently isn't available (yet) Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted August 16, 2011 Share Posted August 16, 2011 ClearDebug or a similar function currently isn't available (yet) No worries. I realize it is a very early release. Cannot wait until this gets going. Quote Link to comment Share on other sites More sharing options...
mormonman Posted August 27, 2011 Share Posted August 27, 2011 Any new development? Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 27, 2011 Author Share Posted August 27, 2011 I'm currently taking exams, so I can't develop, however, I'm taking the weekend of from studying, I'm hoping to add multithreading support this weekend. Quote Link to comment Share on other sites More sharing options...
mormonman Posted August 28, 2011 Share Posted August 28, 2011 Ok, I submitted a bug report on mantis. What is the irc info? I couldn't find it. Or any other way to contact you? Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 28, 2011 Author Share Posted August 28, 2011 Ok, I submitted a bug report on mantis. What is the irc info? I couldn't find it. Or any other way to contact you? There's a big IRC Chat button in the General section =P Quote Link to comment Share on other sites More sharing options...
mormonman Posted August 28, 2011 Share Posted August 28, 2011 There's a big IRC Chat button in the General section =P It doesn't load anything for me... Quote Link to comment Share on other sites More sharing options...
KingKong Posted August 29, 2011 Share Posted August 29, 2011 Is there any planned release date for scar titan, if not, how long is it expected for this to be stable enough to be released? Quote Link to comment Share on other sites More sharing options...
FHannes Posted August 29, 2011 Author Share Posted August 29, 2011 Though I also need to invest time in developing SCAR Divi, I hope to get an Alpha build out within 3 months. The original plan was to have that done now, but due to rl circumstances I haven't had sufficient development time to make that happen. Quote Link to comment Share on other sites More sharing options...
Main Posted August 29, 2011 Share Posted August 29, 2011 Take your time, we can still play around with 3.26:P Quote Link to comment Share on other sites More sharing options...
damagex Posted September 7, 2011 Share Posted September 7, 2011 Does this support a silentmouse function? Quote Link to comment Share on other sites More sharing options...
FHannes Posted September 7, 2011 Author Share Posted September 7, 2011 Does this support a silentmouse function? Not yet, but it will. Quote Link to comment Share on other sites More sharing options...
zippoxer Posted October 19, 2011 Share Posted October 19, 2011 Wow. I always waited for SCAR to understand Python, but this language looks acceptable too. Quote Link to comment Share on other sites More sharing options...
FHannes Posted October 19, 2011 Author Share Posted October 19, 2011 The next revision of Titan will also feature generics. Quote Link to comment Share on other sites More sharing options...
zippoxer Posted October 21, 2011 Share Posted October 21, 2011 (edited) We can do this in SCAR Titan!! Edited October 30, 2011 by zippoxer Quote Link to comment Share on other sites More sharing options...