💾 Archived View for dioskouroi.xyz › thread › 24995935 captured on 2020-11-07 at 00:50:06. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
________________________________________________________________________________
SpiderBasic is a compiler which generates optimized JavaScript, which needs a modern browser to run
What's old is new again. Earlier versions of Internet Explorer worked with Visual Basic Script. You enclosed Visual Basic within a script tag and a language attribute of "VBScript". It did not transpile to Javascript, however.
https://en.wikipedia.org/wiki/VBScript
As I recall, you could debug VBScript by attaching a running IE process to VisualStudio. Breakpoints, instruction stepping, etc.
That was light years ahead of Javascript debugging. Of course, later FireBug and DevTools changed that.
But the original intent of the script tag was to be language agnostic.
My favorite thing about VBScript is how long it stayed around in IE. If it was IE6, ok, you could forgive it. But in a limited form it was there until IE10. IE8 and IE9 would try and be "smart" and would figure out text was VBScript and execute it, even without a "lang" attribute. In fact, I used VBScript in some XSS attacks because it often evaded security filters due to how different the syntax was from JavaScript. It was also case insensitive, which helped it survive mutations on the input.
VBScript and other proprietary web nonsense the browser makers put into HTML/JS/CSS during the browser wars (looking at you HTML+TIME) created a ton of remotely accessible and poorly implemented surface to attack.
Do you mean the TIME tag/element in html? What are the vulnerabilities with it? Asking out of genuine curiosity...
Website is the same structure as
. Code samples also use the PureBasic option references like #PB_Sort_Ascending. Looks like an off-shoot project or a rebranding?
Edit: Yep, seeing they are both by Fantaisie Software, so maybe this is a new flavour as it seems to support a wider array of platforms.
Third paragraph on their site directly answers your question:
> SpiderBasic is based on the PureBasic syntax, and is compatible to some degree with it. If you are already familiar with PureBasic, using SpiderBasic should be an easy task. It's even possible to create a program which runs on the web, mobile and desktop using the same source code.
The model of limited versions seem to be common
to other tools like this.
There is the Liberty Basic($)/Justbasic(Free) duo
www.justbasic.com
They are Windows only although once upon a time there was a Linux compiler (
http://lbpp.sourceforge.net/about.html
).
There are many Basic interpreters and compilers around
some current and some moribund.
Some are multiplatform. (
http://www.bbcbasic.co.uk/bbcsdl/
)
Here is one list (
https://www.ossblog.org/roundup-best-free-open-source-basic-...
)
If only the TRS-80 had "CreateRegularExpression" back in the day ...
I just broke out my CoCo the other day. I wish you could define a function or even set a variable and GOTO that.
REGEX = 1000 GOTO REGEX
Computed GOTO was supported by some dialects of BASIC, just not the most common Microsoft flavours. The Atari 400/800 could do it IIRC.
Charging for it might hurt adoption a bit
They’ve already built a successful business around Pure Basic for over 20 years, so I’m sure they know what they’re doing.
The license only gives you one years worth of updates though, it’s cheaper than Purebasic but with that you get lifetime support and updates. For me the one year thing would be very troubling, but I’m not really in their market.
I don't understand why programming language websites don't include code examples on a prominent place. :-/
Lots here:
https://www.spiderbasic.com/showcase/onlineviewer/
Has anyone used this or PureBasic?
I taught computer programming in a high school for a year. We used pure basic in the class, mainly for it's great support for making games easy. This was all on desktop PCs and pure basic "just worked". I never had a compiler or other technical problem. The kids loved making sprite based 2d games with it. The debugging utilities were more than sufficient. Thanks to the pure basic team for the couple dozen students they helped to educate!
I don't know much about the company - I've never come across either PureBasic or SpiderBasic before - but they remind me very much of tools like Blitz BASIC and AMOS on the Amiga, or STOS on the Atari ST back in the early 90s. All of these are dialects of BASIC very much geared towards games and multimedia.
Don't think any of the same people are involved but the similarities are striking, and I'm somewhat heartened to see there's still a market for these kinds of programming environments. They're certainly great for teaching and getting kids interested in computing because of the almost instant results you can achieve.
I'm talking without any knowledge here, pedagogical or otherwise, but how difficult would it be to teach kids to make simple sprite based 2D games using a set of free, open source tools? For example, say Python and some wrapper over SDL? (Or something like Squeak smalltalk; I'm not hung up on Python, just on free & open source).
I've played around in Pharo which should be similar to Squeak and would not recommend for kids. Scratch or Python should work. Smalltalk's complete focus on objects will likely confuse kids. I find the object inspector and the class browser and the whole class heirarchy thing is only useful after you know all the basics.
I'm also a big fan of open source, but it sounds like the license cost here was negligible and the important part is that the kids learn the concepts. They can always take that knowledge home and program in whatever tools they want.
Note that Squeak was created specifically to implement Etoys which is what is meant for children. It was the inspiration for Scratch (which was initially implemented in Squeak) but they have different goals.
A Python wrapper over SDL such as Pygame Zero[0]? I have used it to teach kids[1].
[0]
https://pygame-zero.readthedocs.io/en/stable/
[1]
https://github.com/electronstudio/pygame-zero-book
The short answer is _way_ more difficult than environments like PureBasic, SpiderBasic, or similar earlier options (think Blitz BASIC, AMOS, STOS).
The point with these is that everything you need is in the box: no complex toolchain to set up, no fussing with libraries, no fighting to get different bits of technology to work together. Just type in your code, hit run and (assuming you haven't made any errors) it simply works.
Yes, these tools might not be the most robust ever, or suitable for all problems, but they do allow you to get up and running _very_ quickly, with the minimum of boilerplate and ceremony. If what you mainly want to do is get people into computers by making objects fly around the screen and blow up, they're absolutely perfect.
> The point with these is that everything you need is in the box: no complex toolchain to set up, no fussing with libraries, no fighting to get different bits of technology to work together.
You should still be able to do this via a modern 2D engine like Godot. It comes with its built-in scripting solution that's rather Python like, but you don't have to use that; native bindings are available, and easily accessed from, e.g. C++ or Rust.
I don't think kids and C++/Rust should be mentioned in the same sentence :).
I know some kids could maybe make it work, but those are tough languages with a lot of complications and no garbage collector to help out. Manual memory management would just be yet another roadblock.
Again, I think the complex industry solutions are more harmful here. These kids don't need to make Call of Duty 3. They are more at the Pong skill level. A tool that is far simpler and far less featureful is superior here.
When they get older and need to use Unity or Unreal or whatever, they can switch without having lost much.
Long time ago, I used PureBasic. It was easy to write simple GUI-applications with a bit of network stuff. But some day I had an issue and had to look at the assembly-output (it uses flat assembler as the backend) and saw something like `push eax` immediately `pop eax` and somehow I started to write stuff in fasm before I finally settled with rust. Yet I miss the simplicity of writing GUI-applications with pb in Rust.
I've owned PureBasic for many years and sometimes use it for personal tools. Lack of object-oriented features make it a bit old-fashioned and not a good replacement for Realbasic (which I really found useful when it was still affordable).
However, the biggest drawback that holds this Basic dialect consistently back is that the cross-platform functionality is always only 85% there. It's cross platform, just not _enough_ cross-platform. There are hacks to get functionality on Windows that won't work on Mac and Linux, and vice versa, and some essential functionality has never been implemented. Most importantly, a working cross-platform rich text editor widget with image support is missing. Other smaller things are also missing or not fully featured enough. All of the missing cross-platform functionality could have been implemented years ago, but the very nice main developer seems to have other priorities. There are just too many hacks and tricks that only work on Windows.
It's fine for small tools and quick hacks, though, and has a lot of supporting libraries. Among the existing cross-platform Basic dialects, it's probably the most complete.
How is it so fast and with tiny executables. My assumption is that even though this is BASIC, there is no REPL/SHELL like you would get with BASIC on a C64 right?
Sorry, late reply - I'm only in this account once a day.
Purebasic compiles to assembly code in flat assembler format using yasm.[1] Some of its support libraries were even directly written in assembler. That accounts for speed and compact executables. Unfortunately, it also prevents retargeting and sophisticated compiler optimizations.
[1]