Extended Small Basic Library (ESL) Extension - 0.4.2a - ESLFile Patches
-
Saturday, January 26, 2013 1:30 AM
Extended Small Basic Library, or ESL, is a small but powerful extension for Microsoft Small Basic. Although it didn't get off to a great start, and I was unable to work on it after the initial release on the 6th of October 2012, it is back, and with a new thread.
ESL is comprised of 12 classes, each of which either expand and improve on the Small Basic standard library, or bring new features of their own into the mix. These include advanced features such as cryptography, tetration, and include useful features such as being able to use C# arrays as storage, which are significantly faster than Small Basic arrays.
ESL is an open source project, and a link to the source code will be at the end of this post. ESL is currently in an "Alpha" state of development, and may be buggy. All bug reports are welcome, but please try not to continuously report the same bug.

ESL on GitHub: https://github.com/McSherry/ESL
ESL Download: https://munycdn.com/a/McSherry/ESL_0.4.2a.zip
ESL on Ohloh: https://www.ohloh.net/p/ESL
HTML ReadMe: http://mcsherry.github.com/ESL/
Getting Started: https://munycdn.https://munycdn.com/a/McSherry/Getting Started with ESL.pdf.pdfPlease feel free to provide suggestions and criticism, although please try to ensure criticism is both constructive and structured. Thanks for your time, and I hope this extension is useful for you.
If you'd like to contribute to ESL, please fork the GitHub repository, and then file a merge request with your changes. It would also be helpful if you used the Issue Tracker provided by GitHub.
Licencing and legal information is available in the README, as well as a list of credits for various components that make up parts of ESL.
- Edited by Liam McSherry Tuesday, March 05, 2013 6:20 PM
All Replies
-
Saturday, January 26, 2013 5:37 AMAnswerer
Nice extension! I will play with it when I have some free time.
I am also really happy to see it is open source.
Please mark any answers and "vote as helpful" any posts that help you!
-
Sunday, January 27, 2013 9:33 AM
Development source code will be made available if anyone wants to download and compile it. However, you'll need to switch to the "nightly" branch on GitHub, as the "master" branch will only be updated with the code in the currently released version of ESL. To switch to the "nightly" branch, see below:

The source code on this branch isn't guaranteed to be stable, but is likely to contain more features than the "master" branch prior to the release of a new version.
-
Friday, February 01, 2013 6:10 PM
If anyone wants to know what will be coming in the next version, you may want to check the commit logs for the "nightly" branch, as these provide a summary of each addition to that branch.
Available here: https://github.com/McSherry/ESL/commits/nightly
Here is an example from yesterday, the 31st of January:

-
Saturday, February 02, 2013 4:17 PM
I'm happy to be able to release the 0.3.0a update. This update includes quite a few new features. Here is the full list:
- GZip Compression (untested)
- RC2 Encryption
- DES Encryption
- AES Encryption
- Fibonacci Number Generation (up to n=138)
- The mathematical constant e
- The mathematical constant Phi (a.k.a. the Golden Ratio)
- Number concatenation (32-bit and 64-bit)
- HMAC (Hash-based Message Authentication Code) variants of SHA hashes
- CRC-32 (ANSI X3.66) and CRC-64 (ECMA-182) checksum generation
- Hyperexponentation (tetration)
- Further text manipulation (ToUpper, ToLower, Reverse, etc)
- RIPEMD160 Hash function
- More file-format definitions
- Primality checking (whether a number is prime)
- A new HTML Read-Me
If you have any suggestions for features, feel free to suggest them. Please also feel free to fork the GitHub repository, change/update the code, and file a merge request.
This update is available to download from https://munycdn.com/a/McSherry/ESL_0.3.0a.zip
- Edited by Liam McSherry Saturday, February 02, 2013 4:18 PM
-
Monday, February 04, 2013 2:19 AMAnswerer
Nice extension! There are many very useful methods. I think it is a great addition to the growing SB extensions community.
I have one suggestion: you may want to rename ESLMaths.XOR to ESLMaths.BitwiseXOR so it is in the same location in the IntelliSense wheel with all the other methods.
Please mark any answers and "vote as helpful" any posts that help you!
-
Tuesday, February 05, 2013 7:55 AM
It has now been renamed within the development source code. When this code will be merged into the release source code, I can't say. Although, prior to a source code merge is the best time to voice any suggestions, if anyone has any.Nice extension! There are many very useful methods. I think it is a great addition to the growing SB extensions community.
I have one suggestion: you may want to rename ESLMaths.XOR to ESLMaths.BitwiseXOR so it is in the same location in the IntelliSense wheel with all the other methods.
Please mark any answers and "vote as helpful" any posts that help you!
-
Friday, February 08, 2013 3:50 PM
One improvement coming in 0.4.0a is the removal of hard-coded file type definitions from ESL. These definitions are now stored in a separate XML file, which may be optionally included. If it is included, the ESLFile.Identify() method will function. If it isn't, it won't. Now is a great time to begin suggesting file types to be added.
Here is the XML file, showing all file types presently defined in ESL:
https://github.com/McSherry/ESL/blob/nightly/src/xml/ESLFormats.xml
-
Monday, February 11, 2013 12:12 AM
Another update to ESL has been released, and now we are on 0.4.0a. Here's what's new:
- Encryption methods have been patched to fix "Bad Data." exceptions; output from encryption is Base64-only now.
- ESLWeb has been renamed to ESLNetworking.
- Added an internal IP Address check to ESLNetworking.
- Added an external IP Address check to ESLNetworking, as well as a check for an Internet connection.
- OctalFromInteger and OctalToInteger added to ESLMaths
- ExtractRange and Remove added to ESLText
- ESLCrypto renamed to ESLSecurity
- Added a password crack-time estimator to ESLSecurity (crashes incurred from large crack times)
- ESLStorage now allows for 64 arrays rather than 16.
- File definitions for ESLFile.Identify() now use the external file ESLFormats.xml.
- ESLCompute class added
- ThreadedCall() method added to ESLCompute to allow multithreaded Small Basic programs.
- The time of compilation has been added to the ESL class.
- Support for XTEA encryption via an XTEA engine.
This update is available from here: https://munycdn.com/a/McSherry/ESL_0.4.0a.zip
-
Thursday, February 14, 2013 5:22 PM
A basic "Getting Started" document for ESL is now available. It describes the classes within ESL, as well as providing a few code examples, and any relevant legal information.
It's available here: https://munycdn.com/a/McSherry/Getting Started with ESL.pdf
-
Friday, February 15, 2013 1:57 AMAnswererVery nice additions in the new version and great document! The PDF is concise, formatted well and well-written: nice work!
Please mark any answers and "vote as helpful" any posts that help you!
-
Friday, February 15, 2013 7:43 AMOwner
This is pretty cool. I plan to blog about this tomorrow.
Let's make this sticky for a week or so.
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it!- Edited by Ed Price - MSFTMicrosoft Employee, Owner Friday, February 15, 2013 7:43 AM
-
Sunday, February 17, 2013 1:41 AMOwner
Okay, I featured the extension in this blog post:
Please review it and let me know if any change requests.
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it! -
Sunday, February 17, 2013 2:13 PM
I've just released the ESL 0.4.1a patch, which patches a bug reported by martmen related to the ESLSystem class. As well as fixing this bug, I also added the method ESLNetworking.Ping(), which allows developers to measure the amount of time it takes to get a response from a server, in milliseconds.
This patch also includes:
- Conversion to and from Ternary
- Methods for mathematics using various radices (e.g. HexMultiply(), OctalDivide()).
- Generating up to 64-character encryption keys from a password using PBKDF2.
This patch is available from https://munycdn.com/a/McSherry/ESL_0.4.1a.zip
If you find any more bugs, please don't hesitate to report them! Thanks :)
- Edited by Liam McSherry Sunday, February 17, 2013 2:20 PM
-
Monday, February 18, 2013 3:47 AMOwner
I updated the blog post with the 0.41a patch link and info: http://blogs.msdn.com/b/smallbasic/archive/2013/02/16/small-basic-extension-extended-small-basic-library-esl-0-4-0a.aspx
Thanks!
Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)
Answer an interesting question? Create a wiki article about it! -
Monday, February 18, 2013 4:44 PMSomething I would like to see in the ESLMaths class would be imaginary exponents using Euler's formula, and the idea that i squared is -1. It would help for what I'm working on, at least. What I was thinking of doing with that would be making a multibrot with a complex (or at least imaginary) exponent, if that's possible.
I am an 11 year old that knows Small Basic and is learning Java and C. 'Binary is as easy as 1, 10, 11.'
- Edited by Math Man Monday, February 18, 2013 4:45 PM
-
Monday, February 18, 2013 5:33 PM
Something I would like to see in the ESLMaths class would be imaginary exponents using Euler's formula, and the idea that i squared is -1. It would help for what I'm working on, at least. What I was thinking of doing with that would be making a multibrot with a complex (or at least imaginary) exponent, if that's possible.
I'll see what I can do, but I make no guarantees. At the moment, exponentiation is handled simply by turning the input to the function into an integer type. Imaginary exponents would require quite different logic, if I am not mistaken.
I am an 11 year old that knows Small Basic and is learning Java and C. 'Binary is as easy as 1, 10, 11.'
-
Monday, February 18, 2013 10:38 PMModerator
@Math Man
Complex numbers were introduced for .Net 4 (SB uses .Net 3.5). I suggest also having a go in C# or VB using these. Drawing a complex plane convergence plot like multibrot will also be much faster than in SB.
Also, here is an old (but slow to run) complex plane convergence plot.
GraphicsWindow.Width = 640 GraphicsWindow.Height = 400 GraphicsWindow.Show() For y = 1 To 399 b = (y * -.000007) +.1014 For x = 1 To 639 a = (x * .0000062) - .75 v = 0 w = 0 i = 0 While (w > -2 And w < 2 And v > -2 And v < 2 And i < 256) c = (v * v) - (w * w) + a d = (2 * w * v) + b v = c w = d i = i + 1 EndWhile GraphicsWindow.SetPixel(x,y,GraphicsWindow.GetColorFromRGB(i,2*i,3*i)) EndFor EndFor -
Tuesday, March 05, 2013 6:19 PM
The ESL 0.4.2a patch is now available!
This patch fixes an error with ESLFile, which was reported by a user via email, and includes some small functionality updates to ESL. These are:
- ResolveIP added to ESLNetworking. This function transforms an IP address (e.g. 127.0.0.1) into a machine name.
- ResolveHost added to ESLNetworking. This function transforms a URI (e.g. www.example.com) into an IP address.
The Getting Started with ESL guide has also been updated to include an example usage of these functions.
You can download the update here: https://munycdn.com/a/McSherry/ESL_0.4.2a.zip
You can view the Getting Started guide here: https://munycdn.com/a/McSherry/Getting Started with ESL.pdf- Edited by Liam McSherry Tuesday, March 05, 2013 6:20 PM

