Version History
From Sputnik Wiki
Sputnik 0.29 @ 25-06-2015 08:40 AM
- Improved the Preprocessor a bit
- Added #unpredef which can remove a #predef variable
- When you Include() or Require() a file its *location* is added the the Sputnik paths so any includes it includes (requires too) will be found in its folder and so on
- You can now use #include "filename.spk" to directly include a script in the current script (as if they were one) of course Sputnik keeps track of each include to make sure any errors you get include the correct line number and file name
- The #include "filename.spk" now also adds the path of the file to the Sputnik paths so any includes it includes can be found easily
- Included a Telnet style client/server in the Examples folder that supports infinite clients and is fairly complete and ready to use as a good example of how to use TCP sockets in Sputnik.
- CoreFunctionExists() added for easy checking if a core function exists
- CoreFunctionList() added for easy getting a list of all core functions
- UnsetClass/Function etc etc no longer throw an exception if its not found but still return false
- Fixed StrShuffle() it no longer crashes due to out of bounds nonsense
- ReadMem(), PTRRead(), PTRWrite(), DLLStructGetData(), DLLStructSetData() and all Sputniks marshal stuff now uses Un/PackSingle() instead of Un/Pack() and should gain a speed boost because of it
- Fixed a bug where if you "($i++) x 3;" on a line by itself (where $i started at 0) it would end up at 4 instead of 3 this also fixed a similar bug on operator "xx"
- ClassInfo() added it can provide a vast amount of *behind the scene* information on a class and its functions, properties and so on
- FunctionInfo() added it can provide a vast amount of *behind the scene* information on a function
- LineInfo() added it can provide vast amount of *behind the scene* information the current line of source code being executed
- Added IncompleteClass it will be used when something fails to make a class properly
- When a class is unserialized if the original class cant be located it will create an instance of IncompleteClass instead
- Added a flag to IsVarClass() so you can now do a strict compare when checking by name (strict will ignore inherit)
- A a few names are now impossible to be used as class names such as parent, core, self etc since they are used internally and it would get confused
- Fixed the #define when making function links it seems to have been broken since ARGS was changed on functions
- Added Preprocess() it can be used to process source code as a string and return what the preprocessor would normally return so stuff like comments will be removed and #if #elsif #endif will be resolved and only the correct match will be given
- VarList() added it can obtain information about all global/local etc variables such as their type, object type, depth in the stack, scope type and so on
- VarTypeToString() added it can convert a raw type of a variable (@typeString etc) into a string (text) for easier viewing
- VarTypeFromString() added it can convert a raw type (in string form) of a variable ("String" etc) into a raw type (number) again
- VarObjTypeToString() added it can convert a raw type of a variable object (@typeClass etc) into a string (text) for easier viewing
- VarObjTypeFromString() added it can convert a raw type (in string form) of a variable object ("Class" etc) into a raw type (number) again
- VarScopeToString() added same as above it will convert a raw type of a var scope into a string
- VarScopeFromString() same a sabove it will convert a string into a raw var scope
- ScopeToString() added same as above it will convert a raw type of a scope into a string
- ScopeFromString() same a sabove it will convert a string into a raw scope
- Improved the IDE compiler a bit to make use of the Preprocess() function so if you do stuff like #if etc it will remove the code that doesnt fit with the preprocessing from your compiled exe which is useful if you want to have debug code without having to comment ou all the debug code (dont expect it to work perfect if you #if out entire functions inside windows etc since it does not account for that but if you keep the #if etc inside the functions it should work fine)
- You can now do foreach($lines) and it will automatically add "as my $_" (without quotes) for you
- You can now regexp match like "m/^start/" (without quotes) and skip the "$a =~ " (without quotes) part and it will use $_ automatically
- You can now regexp replace like "s/^start/test/" (without quotes) and skip the "$a =~ " (without quotes) part and it will use $_ automatically
- Changed how && (AND) works instead of returning TRUE if both sides are TRUE and FALSE if both sides (any side) isnt TRUE it now works like this example: $this && $that -- is handed like: If $this is true, return $that, else return $this.
- Changed how || (OR) works instead of returning TRUE if either sides are TRUE and FALSE if either sides (any side) isnt TRUE it now works like this example: $this || $that -- is handed like: If $this is true, return $this, else return $that.
- Finished the Flip Flop operator it now works exactly the same as the one in Perl (which is an amazing operator btw) so now Sputnik can do the awesome flop flop operator
- Added ff operator it is bascially the same as the .. operator but it locks it in flip flop mode so there is no chance it can ever enter range mode
- You can now (once again) place raw words inside the [ ] within an index of a string for example say("value is $val[test]"); this will work just as good as if you type 'test' inside the [ ] brackets of course it is smart enough to check if you wanted to put $test inside it or numbers so the will only be added if the stuff inside the [ ] begins with an alphanumeric or _ char and is definately not numbers nor a variable its worth noting it adds ' ' for you so if you desperately want it to parse the information make sure to include "" yourself (escaped of course)
Sputnik 0.28 @ 19-06-2015 07:12 PM
- Sputniks linux and mac support has been removed (nobody was using it on them platforms anyway) and it is now back to Windows only (I will not waste my time making two/three of many functions if nobody is going to use it!!!) (anybody who wishes to cry about this may go insult T3Charmy for it is HIS fault I gave him everything he needed to produce the linux plugin for Sputnik I even made the first function to demonstrate yet he was too lazy or useless to bother adding ONE more function for such lack of caring why should I care? screw him)
- Fixed the [Args("true/false")] by default being set to FALSE (it was set to TRUE by default for some unknown reason)
- Fixed a bug where if you do "$b[$pos++] = $c;" it would cause the $pos to increase TWICE
- TB() added it will convert a string to number (network-order UInt32)
- BT() added it will convert a number (network-order UInt32) to string
- Removed <..> operator (since .. is the same thing)
- Added new flag to IsDeclared() so you can check max depth local scope
- SSRecv() no longer returns the IP (you must use SSClientIP() for that)
- Fixed a bug in CharPtr stuff that would cause StrNew('A', 5, true); to fail
- Fixed a glitch with << <<< >> >>> ** where it would use the type of the first variable even if the second variable was a bigger type so shift operations could end up returning a BYTE when it should logically be returning a number that can hold the data (sucha s Int32) so now it will always seek to return an Int64/UInt64 if both numbers are integers (of any size) it wil return a double if any of the two are a float/double and it will return a double if the second is a float/double (regardless of the first) and finally it will return a Int64 if it cant find a suitable type to return (in all integer cases it will return a UInt64 if the value of the first/second is higher than an Int64)
- EnumIsDefined() added it can check if an enum contains a value which is good for checking if a value you have is valid for the enum
- Fixed FileRead() it was reading each byte of the file as a char now it reads the chars properly
- If you try use the GET/SET of a property but the GET or SET does not exist it will no longer crash Sputnik but instead show an error message showing the line number of the fault
- FileOpenText() added it can be used to open a kind of file stream reader that lets you read a char/many chars/lines at a time it also works with FilePos() and FileSeek()
- FileReadText() added it is used with the return from FileOpenText() it has several formats you can read the text file in
- ByteBufferToBinary() added it can be used to convert any ByteBuffer into raw binary instead of needing to cast
- GetExtension() has been fixed so it will no longer cause a crash if it is impossible to find the extension
- FileSizeFormat() added it can be used to format a number into a file size string for example 10000 becomes 9.77 KB
- Added a new param to FileSize() where it can return a string like from FileSizeFormat() instead of the integer value
- FileWriteLines() added it can be used to write an ARRAY to file using each element as a line for the file you can also set the line breaks text
- FileAppendLines() added it can be used to write an ARRAY to the end of a file using each element as a line for the file you can also set the line breaks text
- Added "rw" flag to FileOpen (does same thing that an empty flag does but added this just for future compatibility)
- FileTemp() added it will create a uniquely named, zero-byte temporary file on disk and returns the full path of it
- GetRelativePath() added it tires to makes a path relative to another
- SocketReadChar() added it will read the next char it can find (and wait until it gets one)
- SocketReadLine() added it will read the next line it can find (and wait until it gets one)
- Improved internal disposing of sockets when unset() is called
- FileMove() added for obvious reasons
- ConsoleKeyAvailable() added it can be used to check if there is a key ready to be read from the console
- ConsoleCapsLock() added it can be used to check if caps lock is down on the console
- COnsoleSetCursor() added to make it so you can set the x+y in one function
- COnsoleSetBuffer() added to make it so you can set the width+height in one function
- COnsoleSetSize() added to make it so you can set the width+height in one function
- Added a special Console app manager to the lib folder (with an example of its use in the Examples folder) this script lets you easily handle console apps that will be printing to screen (server apps etc) and yet still allow the user to type stuff
- Added a Command System to the lib folder that makes it easy to create and use commands with its built in parser and what not (it is used by the Console app manager)
- Added ability to use a TRUE flag on InputC() to get more information about the key pressed
- Added all the @KeyConsole____ macros for checking console keys
- The first param of ClassList() may now be null to act as if you didnt enter a first param
- Added a new param to ClassList() where you can filter classes based on if they inherit from a specific class name
- Changed all the stragglers I could find that still returned 1 or 0 instead of True/False stuff like < and > operators etc and a bunch of opt/socket options etc so at this point there shouldnt really be anything much that returns 1 or 0 instead of true/false which is a not hugely important but I like it to be consistant (a long long time ago Sputnik didnt have a boolean so 1 and 0 were used instead)
- sbSetNewLine() added it will set what the text is used for the *newlines* of sbAppendLine() etc
- sbGetNewLine() added it will get what the text is used for the *newlines* of sbAppendLine() etc
- SumDouble() added for the LINQ
- SumInt() added for the LINQ
- SumUInt() added for the LINQ
- First() added for the LINQ
- FirstOrDefault() added for the LINQ
- Last() added for the LINQ
- LastOrDefault() added for the LINQ
- Obtain() added for the LINQ it is used like Select in c# to obtain all the *values* directly insead of doing any matching etc
Sputnik 0.27 @ 14-06-2015 01:15 PM
- Defaults work on all possible function param types now (instead of what they worked on before)
- You can now define a function called __Call inside a class and call it by using the class variable directly like $class(); of course params work like $class(10, 20);
- The Sputnik compiler (the thing that makes scripts into exes) has been improved internally (inside Sputnik itself) it now works better and is faster etc
- The preprocessor has been reworked and now supports #if #elsif #endif and you can execute the defines for the #if etc using #predef (since #define is already in use for something else entirely) also the preprocessor retains its local variables (set with #predef) throughout the entire program even during eval/include and other things (as a side note you can forcefully clear the #predef variables by doing #predefwipe
- Include() and Require() should now correct handle the #include-once and #require-once and behave properly
- BinHexEncode() added it can be used to encode data in BinHex 5.0 format which can be useful for creating files that will work on very old Macs
- BinHexDecode() added it can be used to decode data from BinHex 5.0 format which can be useful for handling files from very old Macs
- Fixed BinaryExpand() from returning binary on errors and will instead correctly return strings
- PackSingle() added it works similar to Pack() but only lets you specify a single thing to pack because it only does one thing at a time it is extremely fast (multiples of times faster than the normal pack()) since it doesnt need to process anything it just knows what to do instantly
- UnpackSingle() added it similar to PackSingle() it is a speeded up version of the Unpack() that is extremely fast when dealing with one thing to unpack you can also set a position to unpack from
- Added numerous checks to the NBT system to avoid any chances of exceptions or crashes
- Added magic number checks to the NBTCompound read/write/save/load etc etc so it will now make extra sure the data is valid before trying to process it
- Improved Sputniks internal reflection so @macros should no longer have a chance to fail to load
- IsVar() added it works the same as $var ~~ BlaBla and the same as $var Is BlaBla however you get to define what to check using a string
- Added a param to allow for compression on NBTCompundWriteFile() and NBTCompundReadFile() it is enabled by default
- All Stream___() function has been removed and will be replaced with something better soon
- Removed IsVarStream()
- Renamed SSSendBufferCreate() to SSBufferNew()
- Renamed SSSendBufferAppend() to SSBufferPut()
- Changed flag 'b' to 'B' on SSBufferPut() to read SByte (signed byte)
- Added new flag 'B' to SSBufferPut() to send Byte (unsigned byte)
- Added new flag 'V' to SSBufferPut() to put raw bytes (without a length count)
- Changed flag 'b' to 'B' on SSRead() to read SByte (signed byte)
- Added new flag 'B' to SSRead() to read Byte (unsigned byte)
- Added new flag 'V' to SSRead() to read all remaining bytes
- SSApprove() no longer needs the server param
- SSClientIP() no longer needs the server param
- SSClientStatus() no longer needs the server param
- SSDisapprove() no longer needs the server param
- SSDrop() no longer needs the server param
- Fixed a bug on SSSend() where if unset() was used too soon then no data would be sent
- ByteBufferNew() added it will create a new ByteBuffer which is the replacement for the old Stream functions it is more robust, has more features and is resistant to crashes/errors from bad information etc
- ByteBufferPut() added to put data into a ByteBuffer (adds to the end)
- ByteBufferGet() added to get data from a ByteBuffer (gets from current position)
- ByteBufferGetBinary() added to get all the binary data from a ByteBuffer (ignores the position) or get all bytes starting from offset to a given length (or all remaining bytes from that offset)
- ByteBufferPeek() added to peek at data from a ByteBuffer (same as get but without moving the position forward)
- ByteBufferCapacity) added get the current capacity of a ByteBuffer
- ByteBufferRewind() added to set the position of a ByteBuffer back to the start
- ByteBufferLimit() added to get the current capacity/length that can be written (based on its currently allocated size) of a ByteBuffer
- ByteBufferPosition() added to get and set the position of a ByteBuffer to any value
- ByteBufferRemaining() added to get how many bytes are possible to read from current position of a ByteBuffer
- ByteBufferHasRemaining() added to check if its possible to read at least one byte from the ByteBuffer
- ByteBufferClear() added to clear all data from a ByteBuffer (reset it back to new) also if the mark is defined then it is discarded
- ByteBufferFlip() added flip a ByteBuffer it flips this buffer then the limit is set to the current position and then the position is set to zero also if the mark is defined then it is discarded
- ByteBufferMark() added to mark the position in a ByteBuffer
- ByteBufferReset() added to reset the position to the previously marked position in a ByteBuffer
- ByteBufferCompare() added compare two ByteBuffers to see if they are equal
- ByteBufferClone() added clone a ByteBuffer
- Completed all the ByteBuffer functions thus the replacement for Stream___() is complete
- Updated the Sputnik Socket client/server examples for the changes to the Sputnik Socket functions
- Added ISputnikCloneable interface that allows defining what happens when Clone() function is used on the object
- Fixed a bug on the bit pack/unpack where types 'a' and 'Z' may not correctly get null padded
- Fixed $ptr[0]:f += 100; etc so it correctly makes sure it uses the type set in the :TYPE (it was often times using the += type instead of the :TYPE
- Removed all hardcoded .. stuff from Sputnik (all patterns gone etc)
- Removed the hardcoded 'to' (it was a word for ..)
- Added new operator .. which works the same way the old hardcoded .. did for patterns/splice etc but it has an additional feautre in that it can now flip flop a true/false statement for example m/cat/ .. m/dog/ will be false until it finds cat then it will become true from that point forward until it finds dog then it will flop back to being false again (make note that the start and end conditions are considered TRUE if they are matched)
- Fixed stuff that does like say("cat $i") foreach($a as my $i); and say("cat $i") for(0..10); etc etc basically stuff that did a function CALL followed by a LOOP statement (without a ; after the call) would be called once and in a very weird way the ( ) of the call was being instead of the IDENTIFER( ) so it was causing weird things to happen but now thats fixed
- Deleted the @@magic ifs (it served no real purpose beyond avoinding typing 4 chars?
Sputnik 0.26 @ 07-06-2015 10:08 AM
- Sputnik now comes with "XNA Pengo" a pretty complete Pengo game I made in Sputnik it features monsters, sounds, music two player support it is a big demonstration of how to make a game in Sputnik even tho it is outdated read its "Readme.txt" for more information
- Sputnik now comes with a a bit of information on embedding Sputnik in a C# application with its sample project see the "Embed Sputnik" folder the sample project is the SputnikXNA.dll source code (complete and up to date) this source code and buildable project will demonstrate how to create plugins for Sputnik that add new features and commands to Sputnik and also how to interface C# with Sputnik
- Sputnik now comes with "Compiler.exe" (console mode) and "CompilerW.exe" (win mode) programs that will compile a Sputnik script into a .exe however if it makes use of any dlls you should include them with it
- Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes
- Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes
- %DotNet->Calls() are now much faster as it caches all the methods
- Sputnik Socket SendBuffer is now wiped when unset() is used (freeing up its memory faster)
- SSSendBufferCreate can now be used with 0 params
- The 'is' and 'isnot' (~~ and !~ respectively) now check the .NET class name as well and it also checks all inherited types as well and as a bonus it also checks all interfaces (even inherited onces) unless of course you are using Strict then it will only check the immediate type + interfaces
- Function arguments that include an oject now name use the same checks as ~~ so if something works on one it works on both this will make it easier than having to maintain two sets of code that do the same thing
- List() arguments also benefit from the fuction argument improvement
- Fixed a bug on XNA lib for Update/Draw
- Fixed a bug on XNA lib where if a key has no *visible char* (like left arrow) it would cause all rest of the variables to mess up
- Remade how function/list/enum arguments work internally and it is now much better you can now use = to set a default on any param type you are no longer limited to only default "$var = 10" stuff but can now do stuff like "NBTTagCompound $var = newTag()" for a param
- SameValues() Check if all values within an array are the same value type such as all String and return the type or return error type
- DecPad() has been remade so it inserts all the 0s at the same cycle instead of one by one which will make it faster and more efficient
- Added many NBT functions that work similar to Minecrafts NBT system but designed specifically for Sputnik and supporting Sputniks data types below is the list of them:
- NBT() Convert a variable into an accurate NBT representation of it
- NBTNew() Create a new NBT of a given type and optionally give it a name and starting value
- IsVarNBT() Check if a variable is contains an NBT
- NBTCompare() Compare two NBT variables to see if they contain the same data
- NBTCopy() Make a clone of an NBT
- NBTGetId() Get the ID type of an NBT
- NBTGetName() Get the name (tag key) of an NBT
- NBTGetName() Set the name (tag key) of an NBT
- NBTHash() Compute the CRC32 hash of an NBT
- NBTToString() Return a string representation of an NBT
- NBTToVar() Return the Sputnik variable representation of an NBT
- NBTCompoundClear() Clear all tags
- NBTCompoundCount() Return the amount of tags
- NBTCompoundGet() Get a tag by name
- NBTCompoundSet() Set a tag by name
- NBTCompoundGetKeys() Get an array of all keys
- NBTCompoundGetTags() Get an array of all tags
- NBTCompoundGetMap() Get an associative array of all keys and tags
- NBTCompoundHasKey() Check if a given tag exists by name
- NBTCompoundIsEmpty() Check if there are no tags
- NBTCompoundRemove() Remove a specific tag by name
- NBTCompoundWrite() Write the NBTTagCompound to binary or a buffer
- NBTCompoundRead() Create a new NBTTagCompound from a binary array or a buffer
- NBTCompoundWriteFile() Write the NBTTagCompound to a file
- NBTCompoundReadFile() Create a new NBTTagCompound from reading a file
- NBTCompoundCompress() Compress the NBTTagCompound to binary
- NBTCompoundDecompress() Decompress a NBTTagCompound from binary
- NBTCompoundWriteCompressed() Compress the NBTTagCompound and write it to a buffer
- NBTCompoundReadCompressed() Decompress a NBTTagCompound from a buffer
- NBTListAppend() Add an NBT to the end of the list
- NBTListCount() Return how many tags exist in the list
- NBTListGet() Get a tag at the given index
- NBTListHasId() Check if an index is valid and contains a tag
- NBTListRemove() Remove the tag at the given index
Sputnik 0.25 @ 16-12-2014 08:06 AM
- There is now a Sputnik.dll included for use in your own .NET projects such as VB.NET and C# this DLL can used to embed Sputnik in your projects or simply to use Sputnik as a library for its many nice features you could even just use its array AV system if you wanted
- HTTPGetString improved
- If you enter 0.0.0.0 as the IP Address in SocketBind() it will allow any IP to work
- There was a bug where Objects could get *disposed* without unset() being called all once again only unset() using() and binarywipe() are capable of wiping an object nothng else can do it
- MySQLConnect() can now correctly use the port using :PORT without crashing
- If the internal data of an SV gets corrupted or nulled somehow Sputnik now detects this and will no longer crash
- Negating a null or disposed SV now sets its value to TRUE
- Fixed Stack.spk it fell victim to the "function name will use class function before core*
- RPNCalculator example now works again
- SocketReceive() given 2 new parameters the first lets if the socket should wait until it gets all the requested data size the second sets how long it should wait in seconds (failure of this wait will return -1 as the data size)
- Many improvements to the internal workings of the SV ($var)
- The Interactive Shell now shows correct version/website and stuff like "say", "print" etc no longer display a return value
- Added HTTPMakeQuery() it can used to quickly and easily convert a Sputnik array into a HTTP query string with proper escapes and everything
- Added HTTPParseQuery() it can parse an HTTP query string back into an array
- If you have a class function named like "push" and you wish to use the Sputnik core function "push" inside that function you can now do core::push() to execute the core (or even a user made function that is outside of the class) using the new core:: before the function name
- The StringBuilder class from lib folder has been remade for the new StringBuild series of functions added
- DotNet operations such $var->FunctionCall() has had their speed increased significantly since it now caches the last method and its required variables etc
- Unset() now kills an entire array structure disposing all elements in the array (even sub-sub elements)
- CharPtr (char*) can now serialize and unserialize however it will not become the original address instead it saves the string as it serializes (if you wish to retain the original address save it as an IntPtr instead)
- StrLen(), StrPos() now uses CharPtr (char*) if it is given one instead of converting it to a string first (this provides a speed up)
- Added SbNew() it can be used to create a new StringBuilder (although you can use %dotnet stuff this is a lot faster) for speedy string operations with concat (due to the speed booster to DotNet stuff the speed on this isn't much better than using the one above however this provides a series of functions that work as sputnik cores)
- The StringBuilders from SbNew() will correctly display on printr() and vardump() and you use (string) cast on them
- The StringBuilders from SbNew() work in Count() to get the length
- The StringBuilders from SbNew() can now use .= and ..= operators for easy concat
- Added SbAppend() to append text to a StringBuilder
- Added SbAppendLine() to append text to a StringBuilder then add a newline to the end of course the newline will respect the cgi rules and become
if necessary although it defaults at \n unless cgi is used - Added SbEnsureCapacity() it can ensure that the capacity of the StringBuilder is at least the specified value
- Added SbRemove() it can remove sections of the StringBuilder and returns how many chars it removed
- Added SbInsert() it can insert strings into the StringBuild at any position (The StringBuilder will be expanded to fit the new string at the position with spaces)
- Added sbReplace() it can replace found strings with new strings anywhere in the StringBuilder or from a start index to a given length
- Added sbReplaceAt() it can replace from a start index to a length with a given string
- Added SbGetIndex() it can insert get the char at a given index in the StringBuilder
- Added SbSetIndex() it can insert set a char at a given index in the StringBuilder
- Added SbGetCapacity() it can get the capacity of a StringBuilder
- Added SbSetCapacity() it can set the capacity of a StringBuilder
- Added SbGetMaxCapacity() it can get the max capacity of a StringBuilder
- Added HTMLAttributeEncode() It can minimally convert a string to an HTML-encoded string
- Added HTMLEncode() It can convert a string to an HTML-encoded string
- Added HTMLDecode() It can convert a string that has been HTML-encoded for HTTP transmission into a decoded string
- Added UrlEncode() It can encode a URL string
- Added UrlDecode() It can convert a string that has been encoded for transmission in a URL into a decoded string
- Added UrlEncodeUnicode() It can convert a string into a Unicode string in %UnicodeValue notation
- Added Encoding() It can create a string encoding type for use in certain functions such as UrlEncode()
- Added UrlEncodeBytes() It can onvert a binary variable into a URL-encoded string, starting at the specified position in the array and continuing for the specified number of bytes
- Added UrlDecodeBytes() It can onvert a URL-encoded binary variable into a decoded string using the specified encoding, starting at the specified position in the array, and continuing for the specified number of bytes
Sputnik 0.24 @ 29-11-2014 01:05 AM
Whats New
- The SputnikWindows.dll is now embedded inside Sputnik.exe and will be automatically enabled if it detects it is being run on windows this does not effect Mac/Linux compatibility one bit
- If you try call a core function by name inside a class where the class has a function with that name the class function will now be called instead (of course the $this->FuncName() was always calling the class function just like $cls->FuncName() so this just changes calls from inside the class)
- FileOpenDialog, FileSaveDialog and FolderSelectDialog now save and load the Current Directory to prevent weird situations where saving the file could change the currently directory causing problems
- Many changes to macros make sure to read Macro page on wiki
- Time() function deleted
- @Epoch macro added to take over from Time() since it does the exact same thing Time() did
- Added Time() again this time it is used to construct a time instance
- Added Date() this is used similar to strftime() in C to create a formatted time
- You can now use List ( @$KeyName ) = $arry; to extract values based on their KEY name instead of just based index like a normal List()
- You can now get class property values by just doing its name like say $prop; you no longer need to do say $this->$prop;
- Fixed a bug with loading/saving text where the encoding would mess up and produce incorrect letters/symbols
Known issues in current version:
- IDE compile without console is not currently working so don't use it
Sputnik 0.23b3 @ 14-08-2014 10:09 PM
Whats New
- A @Macro not existing no longer gives an error and instead just returns NULL so it is now safe to use @Macros even if the macro does not exist.
- Fixed a bug where DLLs would get in use and cause stuff to crash
Sputnik 0.23b2 @ 14-08-2014 02:18 PM
Whats New
- Properties can now use +=, *= etc etc and the other stuff
- $var[$index]:c ::C etc can now fully use all the +=, *= etc etc and all that
- Char* can now fully use all the +=, *= etc etc and all that
- $string[$index] can now fully use all the +=, *= etc etc and all that
- List () can now fully use all the +=, *= etc etc and all that
- %DotNet[index] arrays can now fully use all the +=, *= etc etc and all that
- Binary+CharPtr cast overload now works on classes
- Added ~~~ it works same as ~~ but with a strict compare so that inherited classes are not counted as being the same and it requires the same class type
- Added !~~ same as above but negative comparison
- @Args is not created by default now and instead must be enabled when you wish to use it by adding [Args("true")] before the function definition
Sputnik 0.23b1 @ 12-08-2014 02:23 AM
Whats New
- This is just a Hot fix release to address the IDE not working... Should work now...
Sputnik 0.23 @ 08-11-2014 05:54 AM
Whats New
- Added IsDivisible() to check if an expression is divisible by a given divisor optionally comparing as double/int64
- Ord renamed to OrdW (Converts a char to UNICODE code)
- Added Ord() handles converting a char to ASCII code
- New Binary variable system for all Binary____() functions the change does not break any older scripts but it does improve how binary data is handled in Sputnik quite a bit.
- Sputnik now uses a tweaked Mersenne Twister for random number generation
- Added BinaryRandom() so you can randomize a binary variable
- Added RandomVar() to generate random Int32, UInt32 etc etc and so on
- Added RandomSeed() to generate pretty good random seeds
- Say() and Println() can now be used with no params to insert a blank line into console
- Added BinaryExpand() it can expand the bytes of a binary variable into a string along with the text they match up to so you can convert binary into something human readable which is excellent when making a network client/server
- Added BinaryStartsWith()
- Added BinaryEndsWith()
- Added BinaryHash() to get a unique Hash of the bytes of a binary variable
- Added BinaryIndexOf() Find the first occurrence of the needle
- Added BinaryIndexOfAny() Find the first occurrence of any of the needles
- Added BinaryLastIndexOf() Find the last occurrence of the needle
- Added BinaryLastIndexOfAny() Find the last occurrence of any of the needles
- Added Byte() and SByte() not sure why they were not already added...
- Added BinaryJoin() to join together a ton of Binary variables in an extremely fast and efficient way
- Changed BinaryCompare() to now support offset of the needle and ability to ignore case (ASCII)
- Fixed (binary) cast it now works
- Binary variables now serialize and unserialize their internal variables (in addition to the binary array they already did) -- this will make anything serialized in byte form impossible to unserialize
- BinaryLen() can now be used to set a binary variables length (ontop of its usual get the length) you can also optionally set a fill with for the new bytes
- Vec() no longer uses strings but instead uses the same binary that all Binary___() functions use so now you can can use Binary and Vec interchangeably.
- Binary variables (including Vec now that its a binary variable) can now use all the operators that bit strings can use logical operators |, &, ^, and ~.
- SocketConnected() fixed
- Added JsonEncode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it
- Added JsonDecode() it works the same as PHP's and can produce the same output as the PHP version if you so wish it
- MySQL is now working again.
- Added NewClassFromArray() it can be used to spawn a new class and set its internal values to that of an array such as one returned from a JSON Decode.
- $this is now correctly set on Unserialize()
- Arrays can now be defined with [ ] example $a = ["One", "Two"]; as well as the usual array() function
- Casting a null as an array like (array)null or (array)$null will now return an empty array instead of an array with a single element (null)
- Added SocketIP() to get the local or remote IP of a socket
- Fixed a rare glitch that could deadlock threads
- Added a new param to Eval() that lets you decide to cause all print/say etc statements to print to the return value instead of the console
- Offset param added to SocketSend()
- Eval flag 4 now supports the clean up if specified
- Added EvalCreate() it lets you spawn an Eval object that you can execute code with similar to Eval flag 4 but it wont go away until you unset it
- Added EvalSet() it can be used to set variables inside an object made from EvalCreate()
- Added Bin() it works similar to Array() but it produces binary instead example my $A = bin(1, 2, 3, 4, 5, 6, 0xFF, 0x42);
- BinaryInsert() overwrite is now working properly
- BinaryGet() now returns NULL on failure so it is possible to know it failed
- Added CGIConsole() it changes the way Sputnik prints to console so it works better when used as CGI
- Added BinaryPadLeft() -- it can add padding or make sure the binary is a fixed size and pad it to make it so
- Added BinaryPadRight() -- it can add padding or make sure the binary is a fixed size and pad it to make it so
- Sputnik is now better at handling more instances of Sputnik running in its ram
- Added BinaryTrim() -- trims whitespace or you can provide it a byte array of stuff to trim
- Added BinaryTrimLeft() -- trims whitespace or you can provide it a byte array of stuff to trim
- Added BinaryTrimRight() -- trims whitespace or you can provide it a byte array of stuff to trim
- Added BinaryToLower() -- makes ASCII chars in the binary go lowercase
- Added BinaryToUpper() -- makes ASCII chars in the binary go uppercase
- Added BinaryRemove() -- similar to substr() but removes the section from the binary
- Added BinaryMidReplace() -- similar to BinaryRemove() but instantly inserts something into the replaced part
- Added BinaryContains() -- To check if a binary variable contains a given byte or contains another binary variable
- Added ConvertClass() -- It will create a new instance of a class by its name and copy the values from another class useful with JSON decode to convert StdClass back into something useful
- Binary is no longer an object but is instead a core datatype just like String and Int32 this means Binary benefits from all the core stuff like String does
- Added IsPrime() to check if a number is prime or not
- Fixed qq() and qqw() operators they was allowing a blank space to enter the array
- Added new flag 'S' to sprintf and printf it works similar to 's' (string) but it will force a string instead of printing each element (Which in case of 's' is disastrous for a binary trying to print as string)
- No longer need to make a key called "fmtSeparator" it is replaced with @Sep now (for sprintf/printf)
- No longer need to make a key called "fmtBegin" it is replaced with @Begin now (for sprintf/printf)
- No longer need to make a key called "fmtEnd" it is replaced with @End now (for sprintf/printf)
- Override rule on Functions will now delete an existing custom function by same name when adding the new one
- Override rule now works on Enums just like it does on Functions
- Added new rule AddOnce for Enums it will only allow the enum with that name to add once and ignore the rest however it wont error
- AddOnce rule now works on Functions like it does on Enums
- Added new macro @IsLittleEndian
- Added new macro @IsBigEndian
- Fixed a bug where Byte and SByte could become a short (2 bytes) before converting to Binary
- Improved Sputniks arrays a bit (internally) should be a tad bit faster
- Vec() operations like += |= etc are now significantly faster since it no longer rebuilds the string/binary each time an operation is done and will instead modify them in place (Unless of course the size of the other is larger than source then it has no choice but to recreate the source to fit) which makes it extremely fast
- Fixed a bug in Vec() that would make it fail to extract bytes properly when it received a binary variable with NOT normal size (1,2,4,8) instead of an integer such as vec($foo, 0, 64) = bin(10, 20, 30, 40, 2) it now correctly builds the integer result
- Improve Array compares like == etc
- Fixed Sort() and Walk() they were broken since the change to return values
- Added new Regex flag 'z' for Match it works the same as flag 'a' but this will return an array of the index and length of the whole match if it cant find any group matches
- Fixed bug in BinaryCompare() that would fail if the start offset was higher than needle length
- Made BinaryCompare() significantly better it now handles start/lengths in same way substr() does individually for both binary and needle
- Added usleep() it can sleep the script for a given number of microseconds
- Added Find() it is the same as the LUA String.Find() it can use a patterns to find stuff inside a string and return its position and even group capture
- Match() renamed to CSetMatch()
- MatchDel() renamed to CSetDel()
- Added GSub() it is the same as the LUA String.GSub() it returns a copy of the string in which all occurrences of the pattern have been replaced by a replacement string (Or fills an array/callback function).
- The -> can no longer be used to place a variable as the first argument in a function like "test"->Substr(1, 3) instead you must use ->> so "test"->>Substr(1, 3) is what you use now this change was done to make the classes/objects -> look entirely different from the force variable as first item in a function.
- Added new operator =>> it works similar to ->> but it will immediately place the return value into the variable so $a=>>substr(1); this will cause $a to become the result of the substr operation
- Fixed bitshift <<< and >>> they were converting values to an UInt32 which would destroy a lot of information now it correctly uses UInt64
- Operators + - / * % & | ^ << >> <<< >>> now do bit operations on strings and binary (of both params are string or binary not just one) just like += -= etc do this is a change from which which only does this when using += this means you be careful when doing these operators since if both variables are strings (yet contain numbers in text) they will be treated as bitstrings and the binary operations will take place on each individual char. To avoid this problem either make sure you are using integers/floating points or cast to be sure you only need one of them not to be a string
- Direct memory pointer read such as $PTR[12]:i can now use a direct offset instead of data type offset by doing :: instead : example $PTR[12]::i
- Embedded functions in variables etc when called now take place in local scope instead of their own so they get to use all local variables you have in the area
- List ( ) now sets all variables to null if it cant place stuff into them
- Added Sub() it works almost identical to SubStr() with only one change instead of taking the start position + length it takes a start position + end position this is useful for any functions that return start+end positions such as find() etc
- Changed ?? and !! to only check if the variable really is NULL instead of just *not true* so $a ?? "test" will use "test" if and only if $a really is NULL
- When checking if a string is TRUE Sputnik will now try convert to a double so that "0.1" etc will return true where as before it would have said false
- Removed the array pointer functions Each(), Reset(), Next(), Prev(), Cur() since they are pointless and served no good purpose
- Removal of array pointer (not to be confused with ref) will make unserialize unable to open a serialized array from an older sputnik version however to avoid such issues in future you could always use the json encode/decode (which never changes).
- LINQ functions deleted pending a full remake
- Add new FROM and TO for the foreach loop example foreach($a as $c from 1) starts looping from index 1 and foreach($a as $c from 1 to 3) starts from index 1 and ends at index 3
- Operator To example 10 to 20 has now been renamed to <-> so it is now 10 <..> 20
- All .NET array[] types are supported in Foreach now
- .NET array[] types can be refed in a foreach and have their value modified in real time
- Strings in a foreach can now be refed and have their chars modified in real time
- Foreach has been fixed so if you do a foreach with a ref "as" then do one without a ref below it using same variable name it no longer uses a ref when it shouldnt
- Foreach can now handle List<> on both regular objects and dotnetObj
- Foreach can now handle IEnumerable on both regular objects and dotnetObj
- Added Assert() function it takes one or two arguments the first is a value to check is true (if so returns it) if it is not true then an exception is thrown with a default or user provided (second argument) error message
- Added BitSwap() it can byte-swap little-endian <-> big-endian in any int/float etc variable
- Added U for unsigned to hex literals example: 0x325U
- Added U for unsigned to binary literals example: 0b10101010101U
- Added U for unsigned to octal literals example: 063634U
- Added IsList() to check if an array is a proper list
- Added @GUIDBin it generates the GUID same as @GUID but returns it a binary instead of string
- Added @GUIDZeroBin it generates the Zero GUID same as @GUIDZero but returns it a binary instead of string
- Removed macros @Error, @ErrorCode and @ErrorMsg it was pointless and only a few functions actually used it
- Fixed an issue where almost all static variable types such as 100 'Test' etc could get modified if they were passed as a ref
- Added ContainsAny() works like Contains() but accepts an array of needles
- When doing divide by NULL in Sputnik it now returns zero instead of the original value
- You can now do stuff like foreach(array("One", "Two", "Three", "Four") as list($k, $j)) to get a given number of elements from array and put them into variables at each iteration
- The operator => has been given higher precedent so when you do stuff like array("Cat" => $flag & 1); it no longer fails to work
- Added ldexp()
- Added frexp()
- Added @TwoPI
- Added @ZeroTolerance
- Added Clamp()
- Added Lerp()
- Added Mod2PI()
- Added Wrap()
- Added Gauss()
- Added Barycentric()
- Added CatmullRom()
- Added RandomSeedSet()
- Added Angle2D()
- Added Distance()
- Added Distance2D()
- Added Distance3D()
- Added Hermite()
- Added SmoothStep()
- Added DegreesToRadians()
- Added RadiansToDegrees()
- Added @CaseState the @CaseState stores whether the current case was a true/false when it was checked even if you used goto to get into the case (For use with Select statement).
- Added RevolutionsToDegrees()
- Added RevolutionsToRadians()
- Added RevolutionsToGradians()
- Added DegreesToRevolutions()
- Added RadiansToRevolutions()
- Added RadiansToGradians()
- Added GradiansToRevolutions()
- Added GradiansToDegrees()
- Added GradiansToRadians()
- Removed the -> from modifying strings in place since the new =>> handles modifying values now
- Added BinaryReplace() to search and replace the needle
- You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &=, |= etc etc when using a binary variable in array form like $data[3] += 3
- You can now use all the usual assignment operators such as +=, -=, *=, %=, ^=, &=, |= etc etc when using a CharPtr in array form like $charptr[3] += 3
- Vec was somehow missing /=
- Vec can now use ||=, &&=, **=
- Byte type was broken when trying to do & with it
- Foreach when used on a string now sets the "as" to a char instead of a string with one char in it
- $var[index] when used on CharPtr and String returns a char instead of string now
Sputnik 0.22 @ 03-21-2014 05:54 AM
Whats New
- Added BinaryUUEncode()
- Added BinaryUUDecode()
- Remade Vec() from scratch to work exactly same as Perls so you can even do stuff like vec($foo, 0, 8)++; and vec($foo, 0, 8) += 2; (any operator) and of course vec($foo, 0, 32) = 0x5065726C; the wiki has been updated to show the change
- Vec() can now handle up to 64 bits
- Vec() can now handle negative offsets and converts to them to be length of the vector - abs( offset )
- Fixed hilarious oversight that caused BinaryFromStr() to produce a string on "RAW" mode
- Added new operator ||= used like $a ||= 7; will change $a to 7 if $a is not true
- Added new operator &&= used like $a &&= 7; will change $a to 7 if $a is true
- Added Replacement parameter to SubStr() so you get the option of replacing the substring instead of returning it with the added bonus of modifying the original string in place
- print "$var\n" if($var); etc now works properly (foreach, while etc is also fixed)
- Operator ~ now works on strings like in Perl
- A "For" loops middle expression (comparison) can now accept multiple arguments separated by , which is basically same as doing && but without the need for braces ()
- Added Clear() function its bascially same as $array = array(); however it has more options like wipe/not wipe etc
- Clone() now accepts everything like strings etc however it can still only clone objects types of Class/Binary.
- The Default: in a Select/Switch can now go anywhere inside it and it will even fallthrough to next case
- WriteMem() now returns number of bytes written instead of true/false returns and it can now accept arrays as the argument
- PTRRead() and PTRWrite() can now accept to read/write bytes of a binary array etc
- You can now omit arguments from a For loop if the middle argument is removed it will be considered TRUE
- You can now omit arguments from While, Until (including Do While/Until) when no argument is used it will be considered a TRUE statement
- When adding an ID to a case you no longer do Case THEID: you must do CaseID THEID: this specifies its a case WITH an id and should avoid any parse errors
- Changed how functions and classes work internally (you wont see any difference at all) in the past all functions would take place on same STACK and all class functions would take place on the class STACK but now every function call (even ones inside classes) uses its own STACK this is a good thing for multi-threading and a good thing for keeping functions isolated. This does however break a few scripts that rely on LOCAL variables outside the function (which will no longer be accessible) this mostly only really effects GUI programs so I will add the few changes to wiki
- Fixed an error in Sprintf (and everything that uses it like Printf()) that was causing the flags a A to be printed as DOUBLE hex instead of FLOAT hex (double hex is only supposed to happen if you tell it to use long such as %la so this has been fixed)
- You can now add a FLAGS rule onto Enums to cause them to generate numbers that can used as flags using the bitwise operators.
- Enums can now combine flags properly like $Test = $England + $France
- You can now declare functions inside a class as private so they can only be called from within the class itself
- Added DllStructCreateUnion() same as DLLStructCreate but all the elements are aligned at offset 0 same as C union you can also explicitly create your own union by adding "union " in the DLLStruct definition example DllStructCreate("union int a;float b");
- When a DLLStruct is created all its allocated memory is now zeroed out automatically
- When you use char* and wchar* in DLLStructs it will free the previous one when it writes to the address again if you do not wish this freeing behaviour you must manually zero out the pointer by writing a null pointer to the address
- Added @LOG2E // Log(@E, 2) = 1.4426950408889634074
- Added @LOG10E // Log10(@E) = 0.43429448190325182765
- Added @LN2 // Log(2) = 0.69314718055994530942
- Added @LN10 // Log(10) = 2.30258509299404568402
- Added @PI_2 // @PI/2 = 1.57079632679489661923
- Added @PI_4 // @PI/4 = 0.78539816339744830962
- Added @1_PI // 1/@PI = 0.31830988618379067154
- Added @2_PI // 2/@PI = 0.63661977236758134308
- Added @SQRTPI // Sqrt(@PI) = 1.77245385090551602729
- Added @2_SQRTPI // 2/Sqrt(@PI) = 1.12837916709551257390
- Added @SQRT2 // Sqrt(2) = 1.4142135623731
- Added @SQRT3 // Sqrt(3) = 1.73205080756887729352
- Added @SQRT1_2 // 1/Sqrt(2) = 0.70710678118654752440
- Added @LNPI // Log(@PI) = 1.14472988584940017414
- Added @EULER // Euler constant = 0.57721566490153286061
- Added IsSet() it works the same as PHPs it will also call __IsSet() of a class when used on a variable containing a class
- Array indexes no longer get set when you aren't using = so just doing if($a['Test']) will no longer create the element 'Test' to do that you must use like $a['Test'] = "Hello" this is better since there is no chance of elements appearing magically with no idea where they came from
- Improved array internals a bit it will now take more care to remove unset stuff from the array at more events such as a foreach
- Added ability to use __Unset( $key ), __Get( $key ), __Set( $key, $value ) along with __IsSet( $key ) for use on classes so they can be treated somewhat like an array
- Fixed \L it was doing uppercase instead of lowercase
- [<>] can now be used to insert an arrays values directly into an array constructor like array( 1, $b[<>], 3, 4 ) if $b is an array with "dog", "cat" then the new array will be array( 1, "dog", "cat", 3, 4 )
- The regex replacement string in s/// is now parsed for all escapes and variables instead of just for variables so you can now do stuff like $s =~ s/(\w+)\W.*/\L$1/; to lowercase the return
- Grep() and GrepKeys() can now accept an array of regexp patterns to use instead of just using one
- Search() can now accept arrays for its value
- Fixed Clear()
- Added GUIRedraw()
- You can now create "ContextMenu" with GUICreate()
- Fixed all issues with the GUI Builder
- Updated the GUI Builder to 0.4 TabSheets are now fully supported by it and the pages can be added/removed at will it will also include it on generate source and save/load correctly
- Added a new type of brace the @( ) brace the way this brace works is it will execute every parameter inside it and return the last one as if the last element was the only element (yet the rest have had their usual operations done) this is useful in areas such as $value = $dog == 1 ? "yes" : @($cat++,"no"); notice how the $cat is increased and yet "no" is still returned
- InArray() can now accept an array as the needle
- Added IsOverloaded() to check of a given or array of given overloads exist within a class for use
- You can now place an array with [<>] attached to it to add its values directly to an array() constructor such as array("cat", $a[<>], "dog")
- You can now place an array with [<=>] attached to it to add its keys and values directly to an array() constructor such as array("cat", $a[<=>], "dog")
- Added IsEven()
- Added IsOdd()
- $ and @ no longer needs to be escaped when it is on its own in Regex anymore since Sputnik will try figure out if the $ or @ is used as a variable and if it is not it will place the $ or @ into the Regexp basically if $ or @ is followed by a number/letter or _ it is considered to be a variable otherwise it will just place it into the string
- Added ChoiceBox() which lets a user pick from an array of choices choosing a single or multiple
- IDE is now significantly more complete and features code competition, syntax highlighting and a proper code editor
- Added Abstract keyword for use on creating functions in a Class if a function is Abstract it works the same as normal function however if another class inherits it then it MUST define a function with the same name as the abstract function or else an exception will happen
- Added EvalSyntax()
- GUICodeCode and GUICreate "CodeBox" it is a text control that can support syntax , auto competition etc it is used by Sputnik IDE
- Added GUILinkValid()
- Added flag to Regex Match /v to match against array keys instead of values (it will only use string keys not numeric keys)
- Added flag to Regex Match /b require all elements in an array match instead of any
- Added flag to Regex Replace /v do replacement on array keys instead of values (it will only use string keys not numeric keys)
- Regex Match now supports Arrays in the While and Foreach loops
- Many new things added to GUIWindow()
- Eval() given a new flag so it can remove functions and classes that are spawned during the eval
- More options added to GUIPictureBox()
- Added GUIHotkeyBox() which allows users to enter a hotkey they want similar to a windows hotkey control
- Added GUIHotkey() to get/set stuff in a HotkeyBox
- RealGetKeyState() supports more options and ability to use GUIHotkeyBox
- More options added to GUIListBox()
- More options added to GUIComboBox()
- Made InputBox()/InputBoxEx()/FileOpenDialog()/FileSaveDialog() to now return NULL if the user cancels
- Fixed many examples
- Added constants for Console colours
- Added more options to GUIRichTextBox()
- FontDialog() returns null on cancel
- ColourDialog() returns null on cancel
- Added more options to GUITabsheet such as 'OrderTo' to change order of the tabs
- Added GUICreate "Font"
- Added TimerInit()
- Added TimerDiff()
- Added Properties with Get/Set works the same as C# for use in Classes
- Added WinMenuSelectItem()
- Improved KeyHook() to now properly display the unicode character that the user pressed rather than the ASCII VK_CODE so you should now see exactly what key was pressed in a readable way
- Fixed all Control__() commands they were failing to find using the advanced INSTANCE setting
- Fixed the TestOperator so when you do $a = -sqrt(4) it correctly handles it has a function and negates it
- Added EnumAdd() it can dynamically add new keys and values to an enum at runtime
- Added EnumDel() it can dynamically delete new keys and values from an enum at runtime
- Added a series of flags to Random() to allow for generation it Int64 size random numbers
- Added RemoveValue() to delete a specific value from inside an array such as a class or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)
- Added RemoveKey() to remove a specific key from an array not much different from unset($array[$key]) but added nevertheless (takes into account recursive etc)
- Added RemoveValues() to delete an array of values from inside an array such as a classes or something equally tricky to normally find and delete (takes into account pretty much everything from strict to recursive and of course handling deleting an array as the needle!)
- Added RemoveKeys() to remove an array of key from an array not much different from unset($array[$key]) in an array loop but added nevertheless (takes into account recursive etc)
- Flags (such as Args-false etc) can now be added to Operator and Cast overload functions
- Keys() and Values() now have a flag to support getting just from hash/array
- Added IsKeysSet() to check if all/any/none of the keys provided are found in an array
- Linq function speed improved a tiny bit and cleans up its variables after use in While etc
- Renamed the Linq function "Select" to "Ret" to satisfy the parser
- The GUI Builder is removed from Examples and now comes as IDE.exe and is very easy to use for making GUI programs similar to VisualBasic6
- WinRAR 5.0 or later is now required to unrar the Sputnik archive you download
Sputnik 0.21 @ 09-28-2013 05:26 PM
Whats New
- Added Metaphone()
- Added Soundex()
- Added Levenshtein()
- Altered the $a++; and ++$a; when used on a STRING to increment it like Perl for example, in Sputnik, PHP and Perl $a = 'Z'; $a++; turns $a into 'AA', and $a = 'Test1'; $a++; turns $a into 'Test2'
- Added Rot13()
- Added StrShuffle()
- Added StrTok()
- Added EscapeMeta() it works same as PHPs (QuoteMeta())
- Added EscapeShellArg()
- Added EscapeShellCmd()
- Added Exec() command to be a bit more friendly to PHP users (It does same thing as the Run() commands but works in a slightly different way)
- Added ExecShell() same as Exec() but just returns the string
- Added ExecSystem() same as PHPs System() (but not same as Sputniks System())
- Added Passthru() which is just allows binary output to console etc
- Added CountChars() works the same as PHPs CountChars with mode 1 since I feel that is the only mode that matters
- Added BinaryToStr it returns a new string containing the binary data as raw bytes (It allow use of all the string functions on raw binary data)
- Added BinaryFromStr it returns a new binary variable created from a strings raw bytes (It will allow ability to turn the string back to a binary variable)
- Added SubStrCmp()
- Added HTMLSpecialChars()
- Added HTMLSpecialCharsDecode()
- Added FmtNumber()
- Added PrintableEncode()
- Added PrintableDecode()
- Added StripTags() for stripping HTML tags from strings
- Added AddBR() for adding HTML breaks to strings at newlines
- Added Glob() has feature set same as PHP
- Added FileMatch() it's basically a wrapper for Glob to check against a string (filename) rather than finding stuff in a folder (Equal to PHP function FnMatch)
- Added Hebrev()
- Added Hebrevc()
- Added CountWords()
- Added HTMLEntities()
- Added HTMLEntityDecode()
- Added HTMLTranslationTable
- Binary variables created with Pack, BinaryCreate etc etc can now make use of !, !=, ==, <, >, <=, operators also when you try display in string context the binary will no longer just say {BINARY:30} it will print the string that the binary bytes would be if it was a string
- Added Crypt() works similar to Perls
- Added /r flag to the tr/// for non-destructive
- You can do now goto _case4; to jump to case ID 4 (the 5th case in the list of cases since 0 is also counted)
- You can do goto _caseTest; to jump to a case by its ID you can set an ID like by typing Case Test "Cat": this will create a Case "Cat": as normal but with the added ID thrown in there
- When you do return; it no longer returns the last variable assignment instead it returns NULL
- Break 3; (optional arguments) now work correctly when activated from inside a Switch/Select
- Added ability for Foreach to unpack nested arrays with List() statement
- Added Range() function for creation of arrays (works same as PHPs)
- Added Fill() works same as array_fill() in PHP
- Added IsArray() its the reverse of IsHash() so it will return true only if all the elements in the array are numeric keys
- Added FillKeys() works same as array_fill_keys() in PHP
- Added Pad() works same as array_pad() in PHP
- You can now cast objects as binary like printr (binary)"Hello world"; it will produce the binary bytes of the given variable so you will get correct bytes for an int, double, string etc (when used on a string this will be same byte size as the strings length it will ignore all extra unicode bytes it acts like the string is ASCII)
- Added Binary() function to cast an expression as binary like Binary("Hello World");
- Added Vec() function it is similar Perls Vec() function (It works the same way and produces same result but has an extra parameter see wiki for details)
- Added the ability to explicitly tell Sprintf() (and anything that uses it such as Printf()) which argument to use for example printf '%2^d %1^d', 12, 34; will print 32 12 since in the first format string we put 2^ telling it to use argument 2 (remember format itself is argument 0) this will prove most useful as it will allow the same parameter to be used multiple times (It uses ^ so that it does not get in the way if "" strings are used Perl does the same thing but using the $ operator so 2$ is same as Sputniks 2^)
- Changed how bitwise/arithmetic works on strings now works more like Perl in that it no longer limits to 8 bytes but will instead use every character in the string the (Bitwise String Operators now produce the same results as Perl)
- Changed the console so it will print NULL chars as spaces to avoid weird console trimming that makes no sense
- Sprintf() (and everything that uses it such as Printf()) has been made binary safe so it wont fail when it finds a null terminator in a string
- Fixed a crash on InStr() if 4 parameters are used
- !== now requires both items be the same Data type as well being different content (Before it would require them both to be different types which would cause issues if you did 0 !== null)
- Fixed every function that could potentitally end when finding a NULL byte in a string and made it continue to the full length of the string this is to fix any issues with using binary strings
- Completely remade the Pack() and Unpack() with a new one and added a lot of new types and lost nothing everything still works (This does not change how existing functions work so ReadMem() uses the new Unpack() however the return value remains unchanged) the only change to be take note of is L and l has been moved to Q and q respectively.
- Changed casting to char when used with strings so (char)"8364" no longer produces char 8 but '€' this is because it now sees strings that contain a numeric value as a possible Unicode character number
- Added Char() function for converting an expression to a character (uses unicode)
- Added Binary Literals you define them like 0b101 (will print 5)
- Added Oct() function works the same as the one in Perl
- If you have a string like "0x34" or "0b101" it will be converted to an integer properly instead of returning 0
- Added Ord() function it is an alias for AscW()
- Added Chop()
- Added Chomp()
- Changed BinaryCompare() to return < 0, > 0 and = 0 same as StrCmp()
- Added two extra parameters to BinaryCompare() for offset and length of the compare
- Added new cast (ASCII) and new function ASCII() which will convert the string it recieves and return an ASCII version of it (trimming out all unicode characters it does not even try cast the Unicode characters it just ignores them as if they don't exist this is equal to "RAW" in BinaryFromStr())
- BinaryMid() now accepts same start, length stuff that SubStr() does
- It is now possible to set binary variables by index [] with strings now (instead of just characters and numbers like before) $a[0] = 'T'; now works where as before you had to $a[0] = @'T';
- Added BinaryStripNull() to remove all null bytes from a binary variable
- Fixed FileReadBinary() and StreamToBinary()
- Added UUEncode()
- Added UUDecode()
- Added DecOct()
- Added CRC32() for use on Strings etc
- Added BinaryCRC32()
- Parsing now uses a stack to save lines and file names so it shouldnt lose track of errors anymore
- You can now do the =~ s/// Regexp replacement on arrays nothing will be returned unless you set /r non-destructive flag
- You can now do the =~ m/// Regexp match on arrays it will return the first match it finds
Sputnik 0.20 @ 09-19-2013 10:58 PM
Whats New
- Added FileRecycle() function to move files or folders to recycle bin
- Added FileRecycleEmpty() function to empty the recycle bin
- Changed all error/exception (but not warning) text to print to to STD_ERROR instead of STD_OUT console wise you can still see the errors the same as before but now it will be easier to sort through whats what if an IDE or something handles it
- Added PrintErr() function works exactly same as Print() but uses STD_ERROR instead
- Added PrintErrLn() function works exactly same as PrintLn() but uses STD_ERROR instead
- Fixed a strange bug that was causing some ^= operations to be seen as &=
- Made a start on giving Sputnik the ability to create and use .NET objects/classes etc including setting/getting their variables/properties and calling their methods and the ability to call static methods that involve no object creation (like Console.WriteLine())
- Fixed a bug in Sprintf() (and everything that inherits from it like Printf()) that causes objects to not get displayed UNLESS it is a binary array
- GUI Builder was failing to load the example projects (due to changes in how strings are parsed) this has been fixed with the correct escapes added to the save/load process (of course new projects would have worked just fine)
- Added Use() command it can be used to import .NET namespaces etc for creation of .NET objects
- "New" is no longer a statement but is now a normal function however it works exactly same as before and you should notice no changes (It still creates classes but now it has the added bonus of creating .NET objects too).
- Functions LoadAssembly(), UnloadAssembly(), GetMethod() and Invoke() removed as it is no longer needed (the newer .NET stuff allow a much better way of doing things) at least Invoke() is free again I'm sure I can find a use for it (Removed object type assembly, method for obvious reasons)
- You can now use ¬ with q qq qw qww qx qqx
- You can now use , in Select() and Switch() statements so instead of doing just case "Dog": you can do case "Dog", "Cat": and so on
- Added With() statement works similar to VB's With..EndWith so you can place a class into it and access the class directly without the need to use -> and enter classes name etc
- You can now place goto _default; inside a Case on a Switch/Select and it will instantly jump to the default: statement (This uses a hardcoded jump and does not rely on Sputniks goto at all so it should be be a lot faster)
- Added Clone() function for cloning of classes
- Added ability to use Redo; anywhere on a Try,Catch,Finally statements blocks that will instantly start over from the top and begin the try all over again
- Fixed a potential bug in Try,Catch,Finally that could in could the stack to not get popped after an exception
Sputnik 0.19 @ 09-16-2013 10:25 PM
Whats New
- LC(), Reverse() now use -> modify in place
- Added ShowLink link to functions so you optionally choose to store information about how the function has been called Test($a) or $a->Test() etc
- The repetition x and xx operators have been made to resolve the value each time making stuff like print("CAT\n") x 100; possible
- Added qww keyword it works similar to qw but instead of making an array it seeks to make a dictionary or keys/values
- Changed the - negative operator to switch from negative to positive rather than simply staying on negative
- Fixed chance of overflow exception on cast/negate of UIntPtr and IntPtr
- Added RegexMatch() function that is basically a wrapper for the =~ m// however it has some additional features
- Added RegexReplace() function that is basically a wrapper for the =~ s/// however it has some additional features
- =~ m// and RegexMatch() now return a bool true/false instead of integer 1/0 on matches (Sputnik didn't have a bool for a long time so not all functions return as a bool but 1 and 0 is treated as bools regardless this is just to make it better with === and !==)
- Added k flag to Regex matching this flag causes the group index 0 to not be returned in the matching array
- Made Foreach work with regex matches and added example to wiki
- Added /a flag to Regex matching this flag makes it so instead of returning the matched item as a string it will return an array containing the matched item, its index (where it was found) and its length (length of the match)
- Changed @Groups macro to use local scope rather than global so there is now thread safe
- Added RegexEscape() works similar to preg_quote() in PHP
- Added RegexUnescape()
- Added Escape() for general escaping or custom escaping
- Added UnEscape() for general unescaping or custom unescaping
- Added AddCSlashes() works same as PHP function by same name
- q, qq, qw, qww can now use ~ ! % : ^ ? as the start and end characters ontop of the existing ( { / this should be enough characters to ensure plenty of choice
- Added Read() command which can read a specified number of characters from the console and return the complete string useful when used alongside EnvGet('CONTENT_LENGTH') on CGI
- Improved the HTTP.spk to use Read() if GET is not the REQUEST_METHOD
- Added @N macro that acts like @NL (newline) in normal mode but if #cgi flag is given then it will return
instead useful if you want to have the same script work in console/webserver with no changes - Added \m escape to strings works similar to \n in that it will do a newline or
depending if the #cgi flag has been set - Added qx() operator works the same as Perls its just a shorthand version of RunWait() with return std out
- Added qqx() operator works same as qx() but will resolve \n and $vars etc etc like a normal double quoted string
- Added `` strings works same as qx() so `dir` will return the output from dir
- Added @`` works same as `` however it does not resolve \n and $vars etc
- You can now define a variable like ${Name} in strings (same as $Name) the benefits however are easier placement of variables next to normal words like "${Dog}Hello" and ability to use class stuff inside strings like "Price is ${var->$Price} and name is ${var->$Name} ok"
- Added \o escape of ASCII Octal notation example "\o101" prints A and "\o1012" prints A2 (ASCII octal uses 3 characters)
- Added \o{} escape works same as \o but allows full UNICODE range of characters in octal notation
- Can now define \x escape as \x{nnn} (any valid number of characters)
- Added \R escape which is basically same as @CRLF it prints the same as "\r\n"
- Added option for FileSave/FileWrite/FileAppend to save with ASCII encoding (if you happen to need that for some reason) there is no need to change any other file functions since they already handle ASCII/Unicode for example FileLoad, FileRead etc automatically handle the file encoding
- Added /r flag to =~ s/// (regex replace operator) this flag makes it so the original is unmodified yet the result is still returned
- Added tr// operator works same as Perls $cat =~ tr/a-z/A-Z/;
- Added y// operator works exactly same as tr// (Just to be more friendly to Perl users)
- Sputnik will now REMOVE variables from local/global stacks when you do an assignment = in the past Sputnik would grab the variable by that name and insert the new data into it which worked great for most part however with references in certain situations it would overwrite, So now it will always remove the old version from the variable table then insert the new one in its place (but only when the = operator etc is used remember that behind the scene many things use the = operator that you don't see so it benefits all them too basically anything that "sets" a variable).
- You can now use regex in a Switch() statement for example make a case like this case m/\w+/:
- You can now use number pattern in a Switch() statement for example make a case like this case 0..10:
- You can now use hex number pattern in a Switch() statement for example make a case like this case 0x100..0x200:
- You can now use alpha pattern in a Switch() statement for example make a case like this case 'A'..'Z':
- You can now use decimal alpha pattern in a Switch() statement for example make a case like this case c64..c99:
- You can now use arrays in a Switch() statement for example make a case like this case array("Test", "One", "Two", "Three"): or a variable containing an array such as case $myarray: it will scan each value of the array for a match
- Added new regex flag /t by default, the regular expression engine searches from left to right. You can reverse the search direction by using the /t flag.
- Added new regex /n flag it does not capture unnamed groups. The only valid captures are explicitly named or numbered groups of the form (?<name> subexpression)
- Added new regex /c flag causes it to ignore cultural differences in language.
- Added new regex /p flag it causes the pattern to not be parsed for variables etc (For regex match only)
- Added new regex /p flag it causes the SEARCH pattern to not be parsed for variables etc (For regex search/replace only)
- Added new regex /P flag it causes the REPLACE pattern to not be parsed for variables etc (For regex search/replace only)
- Added Warn() command to show a warning message with source file name and line number (same as in Perl)
- Added Time() function to return current Unix timestamp
- Added StripWS() a general purpose function to strip whitespace characters in a variety of ways or optionally you can supply it with a list of characters to strip instead of whitespace
- Each Eval() call and any other function that executes Sputnik code found in strings now displays information on where this code error took place rather than just stating the error happened
- StrTr now fully works with Unicode (Was a glitch that didn't before)
Sputnik 0.18 @ 09-12-2013 01:42 AM
Whats New
- Renamed Printf to PrintfC (it was giving some people issues since it was not the same as C/PHPs function)
- Renamed Sprintf to fmt (it was giving some people issues since it was not the same as C/PHPs function)
- Added Sprintf() function that works similar to the C function sprintf() however it even accepts arrays as the variables with ability to define unique separators for each one it can also accept dictionaries etc it works very similar to perl6's fmt() function it is pretty useful and far extends the abilities of a normal sprintf()
- Added Printf() function which is basically a wrapper for Sprintf() so it will print immediately to console instead of returning a string it works similar to C function printf()
- Added VPrintf() works same as Printf() but accepts arrays as the arguments instead of individual ones
- Added VSPrintf() works same as SPrintf() but accepts arrays as the arguments instead of individual ones
- Added JoinKV() works similar to Join() however it takes into account the KEYS and VALUES of the array rather than just the VALUES like Join()
- Fixed a crash glitch with number patterns (0..1000)
- Fixed a bug that could sometimes cause a DOUBLE variable to change to Integer when it should remain a DOUBLE
- Added modf() function
- Added IndexOfValue() function to search an array and return the index number/key where the value is located (supports regexp)
- Added IndexOfValueAny() function to search an array and return the index number/key where the value (from an array of values) is located
- Added IndexNotOfValue() same as IndexOfValue() but this time returns the first non-match
- Added IndexNotOfValueAny() same as above but this time returns the first non-match from an array of values to match
- Added LastIndexOfValue() same as IndexOfValue() but returns the last match instead of the first
- Added LastIndexOfValueAny() same as above but returns the last match (from an array of values) instead of the first
- Added LastIndexNotOfValue() same as above but this time returns the last non-match
- Added CountValues() works same as phps array_count_values()
- Fixed a glitch Regexp so using \$ will properly insert the $ in the Regex (same goes for @)
- The following obsolete functions have been deleted: Next, Prev, Cur, Clr, Reset these words are now available and may be used again in future
- Fixed Shift() to reorder the array same as Order()
- Added StrSpn() function
- Added StrCSPn(() function
- Added StrCmp() function
- Added StrNatCmp() function (natural comparison)
- Added Serialize() to create a string representation of a variable (including arrays/classes) to be saved to disk or transferred over network
- Added Unserialize() function to convert a string produced by Serialize() and convert it back into its variable/array/class etc
- Classes call new reserve function __wakeup() when you unserialize them
- Added Atof() (Convert string to Float) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned
- Added Atoi() (Convert string to Int32) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned
- Added Atol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned
- Added StrTol() (Convert string to Int64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)
- Added StrToul() (Convert string to UInt64) for extracting number from beginning of a string (even if the whole string isn't a number) optionally returns how many characters were returned (Can optionally handle any base up to 36)
- Fixed a bug where adding an array to itself would cause a crash instead of copying itself
$a = array(); $a[0] = "blah"; $a[1] = $a;
- Added CombinePath() function
- Added Fixed() statement that allows you to get the MEMORY ADDRESS of an variable/string so you can read/write to it in strange ways or pass it along to a DLL
- Fixed a bug in StrCompress()+StrUncompress() that would cause the string to be modified in some tiny almost insignificant way that would happen to just break Unserialize() etc.
- Added StrVersCmp() function
- Added Strpbrk() function
- Fixed HTTP lib
- Added StrChr() function
- Added StrrChr() function
- Fixed a bug when \\ escape occurred immediately before the ending " when the line continued with an additional space
println("C:\\"); // Where as this would fail <-- No longer fails
- Walk() now allows including the key with the value
- Printr() and VarDump() now print all the information about a class such as the content of its variables etc
- Added SumValues() works similar to phps array_sum()
- Added SumKeys()
- Added ability to put #require-once at the top of the script so this file only gets added (with Require()) ONCE for the whole duration the script runs
- Added ability to put #include-once at the top of the script so this file only gets added (with Include()) ONCE for the whole duration the script runs
- Added IsNan() Function
- Added IsInf() Function
- Added IsPosInf() Function
- Added IsNegInf() Function
- Added IsNormal() Function
- Added SignBit() Function
- Added @Epsilon, @EpsilonF, @EpsilonD macros
- Added LINQ (Integrated Language Query) functions to make sorting/iterating/organizing etc arrays and classes etc significantly easier below are a list of the new LINQ functions so far.
- Added new LINQ function From()
- Added new LINQ function AndFrom()
- Added new LINQ function NotFrom()
- Added new LINQ function Where()
- Added new LINQ function WhereNot()
- Added new LINQ function AndWhere()
- Added new LINQ function AndWhereNot()
- Added new LINQ function Size()
- Added new LINQ function OrderBy()
- Added new LINQ function OrderByDescending()
- Added new LINQ function OrderByAscending()
- Added new LINQ function First()
- Added new LINQ function FirstOrDefault()
- Added new LINQ function Last()
- Added new LINQ function LastOrDefault()
- Added new LINQ function Any()
- Added new LINQ function All()
- Added new LINQ function Invert()
- Added new LINQ function Select()
- (Note - The LINQ stuff is just a test and may or may not be removed later and/or moved to the Lib folder who knows)
- You can now do ++ as many times as you wish like $test++++++; and +++++++$test; the same goes for --
- Added Function IsHash() it basically returns true if all the keys in an array are strings and not numbers
- Added more functions to Pack and Unpack it can now convert to/from binary strings
- Printr() and VarDump() now display the contents of binary arrays in same way it shows contents of normal $arrays
- You can now easily set data to a binary array the same as a normal array using the [] index example: $bin[3] = 77; same goes for printing printr($bin[3]);
- Added IsVarFP() to check if a variable type is ONLY a float/double nothing else
- SubStr() count can now be negative then that many characters will be omitted from the end of the string
- Added @ string that is viewed as a Char so instead of doing (char)"\0" you can now do @'\0'
- Added the ability to use Char* Datatype directly very similar to C/C++ to make working with the core memory of strings significantly easier (Examples will be included in Lib folder and on Wiki)
- Fixed the bug with Alloc() second param that was failing to fill zero the memory or custom byte it
- It is now possible to put Int32, String etc etc in the params of a function instead of just objects like classes
- Changed how (casting) works for example $a = (int)$b; instead of returning a totally new variable (copy of the original) it will return the original if it is already that type so (int)$b will return $b if $b is an int of course the Int($b) remains copying the original regardless
- Added GetVarObjTypeName()
- Added Prev(), Next(), Clr(), Cur() since they are still useful under certain circumstances
- Documented ClassName() it wasn't on wiki for some reason
- Added ClassStack() it will return a reference to a classes internal variable stack
- Added newClass() function it can be used to spawn classes by using a string for the class name rater than doing new Testy() you can do newClass("Testy");
- Changed how && and || work for example if(1==2 && say("test")) in the past "test" would get printed since it would resolve both sides before proceeding but now ""test" will not be printed since if the first part fails to match the second is not resolved at all
- VarDump() and Printr() now display CharPtr information (its address and string content)
- Added ChunkSplit() works same as PHP version
- Added SubstrReplace() works similar to PHP version
- Added StrNew() to creation of new strings of a given size and pre defined char covering it (useful for the char* stuff since it not only creates the string it allocates the correct size for whatever Sputnik is using as the strings most likely UTF8)
- Added ability to make custom macros using #define similar to C it can handle variables of integer,float,string,bool and hex integer also the #define can define functions just like C does see the Macros page on wiki for examples of this
- Added IsPunctuation()
- Added IsBlank()
- Added IsSeparator()
- Added a load of functions to the Lib folder (That do the same thing as core functions) this will be good as examples to learn from eventually almost every core function will be available in the Lib folder as a great example of how to create code
Sputnik 0.17 @ 08-29-2013 05:49 PM
Whats New
- Remake on how binary variables work they work the same as before syntax and functional wise however unset() and binarywipe() will properly work etc
- Added new example: Perfect World Skill Editor
- Added new example: Raw Sockets
- Added new example: Sputnik Sockets
- Added new example: RPN Calculator
- Goto is now capable of finding the Label almost anywhere in the script
- Added GetDosPath()
- Fixed RegRead()
- Added RegWrite()
- Added RegDelete()
- Added RegKeyList()
- Added RegValueList()
- Added RegKeyExists()
- Added RegValueExists()
- Added InsertArray()
- Added VarToObj()
- Added ObjToVar()
- Added GUIGetPropList()
- It is now possible to cast as array using (array)
- Added new Rule system for functions read about it here >> Function Rules <<
- Added ability to call custom functions like $var(10, 20) instead of needing to use CallFunc($var, array(10, 20))
- Fixed all functions that returns HWND, Pids etc to now use IntPtr
- Fixed many functions to return null rather than 0/false on errors since null can be uniquely checked with ===
- Changed all the $a == $b stuff so it returns a BOOL instead of 1/0 integer
- Fixed a bug where ] would appear when "Test $var[3] etc" was used in a string the ] would fail to get taken out
- Fixed a crash when run on windows XP where the console API "GetCurrentConsoleFontEx" does not exist
- Fixed Printr() to display NULL, BOOL, INTPTR, UINTPTR properly
- It is now possible to have multiple CATCH statements also they can now use identifiers which link to class names so if a *testexception* is triggered the Catch (testexception $e) will get executed (if it exists) as usual a blank exception will match regardless
- Is IsNot ~~ !~ now correctly work with GUIObjects such as "$var1 ~~ Window" and "$var1 is Button"
- A bunch of other bug fixes
Sputnik 0.16 @ 08-25-2013 07:56 AM
Whats New
- Fixed a lot of bugs
- Added new data type IntPtr for the $variables
- Added new data type UIntPtr for the $variables
- Added/Completed IndexOf( )
- Added/Completed IndexOfAny( )
- Added/Completed IndexNotOf( )
- Added/Completed IndexNotOfAny( )
- Added/Completed LastIndexOf( )
- Added/Completed LastIndexOfAny( )
- Added/Completed LastIndexNotOf( )
- Added/Completed LastIndexNotOfAny( )
- Added RevHex()
- Changed how strings handle arithmetic see language reference with "Strings as Numbers"
- Changed Remove() to ALSO accept just the array + position to delete one element
- Changed Shift() and Pop() to return empty string instead of 0 on fail
- InStr() fixed and improved
- CSV() improved with more features
- CountFields() added
- NthField() added
- Realloc() added
- DLLStructCreate() return value can be used directly as a parameter now no longer need to call DLLStructGetPtr()
- StringBuilder.spk lib file has been improved a lot with new operator overloads etc
- Documentation for SendKeys() updated and made readable
- Made classes better and fixed a few potential issues and use slightly less ram
- Resolved a potential problem which caused strings to get refed instead of copied sometimes
- Added new example "GUIBuilder" this is an incomplete GUIBuilder/IDE made for Sputnik in Sputnik you can use to see how Classes and GUIs as well as using it to create basic GUIs and getting runnable code for them
- Added new example "BasicGUI" just a button a window to let people know GUIs are there go see wiki for more information on GUIs and how to build them with example code of that
- You can use $var->StrLen() etc instead of StrLen($var) this causes the $var to become the first param in the function for example FuncName($a, 10, 20) can now be written as $a->FuncName(10, 20)
- Some functions start to support the new $var->FuncName() to modify strings in strings in place so far UC can be used to uppercase a string in place (but this is all that does it for now)
- Many other things I forgot what
Sputnik 0.15 @ 08-25-2013 01:15 AM
Whats New
- Count() function added this ALWAYS returns how many elements are in an array or binary array etc (includes hash keys as well)
- UBound() has been modified to now return the index of the highest element in the array (instead of total count)
- LBound() added and returns the lowest index in the array (Since arrays in Sputnik are dynamic like PHP you could have a LBound at 6 and UBound at 200 however running Order() function will move the indexes to start from 0 alternatively Unshift() will also do that and of course Count() will return the total amount of elements)
- Improved speed of loops by up 2-3 fold (Which also improved speed of Math a bit)
- HTTPDownload() now accepts a new param that lets you define a variable to store and will be used as $param in the Progress() and Completed() events (Useful for storing the class $this).
- Fixed a major bug (introduced by accident) which caused a classes $this variable to become NULL when using unset($classvariable);
- FileDownload.spk is now in the Lib folder this class can be used to easily download files.
Lower than 0.15
No information available.