Recent Posts

Pages: [1] 2 3 ... 10
1
Offtopic / Re: JavaScript standalone interpreters
« Last post by Aurel on Today at 21:36:03 »
Hmm this have nothing with WinApi stuff
and i really don't understand what kind of problem you have with winApi  :o
and there is no problem with this at all.
2
 Windows defender is well known as a piece of crap
similar things detect Avira based antivirus-engines which detect
everytime something in Oxygen Basic  >:(
3
just tried to install on Windows 10 but Windows defender flag it as malware :(

It shouldn't. Are you sure it is the Defender (anti-malware net firewall) and not the DEP (data execution prevention) service? Matter is, v3.4.10 used to load the scripts and the machine code precompiled by the Asm jitter into the data, not executable code, memory which is what many simpler virus writing strategies would do. The restrictive DEP service that's initially switched on in clean MS Windows installations would avoid code execution in such memory areas and flag the respective executables as potentially dangerous, which FBSL of course isn't. FBSL v3.5 works differently and avoids that restriction.

I'd suggest switching off the DEP service when working with FBSL v3.4.10 on the latest MS Windows platforms. I think my complete personal authenticity as a member of this forum is a solid guarantee that noone here means harm to your computer, at least as far as FBSL is concerned. :)
4
Offtopic / Re: JavaScript standalone interpreters
« Last post by Tomaaz on Today at 16:41:24 »
Quote
Aurel, it basically takes your HTML/CSS/JavaScript code and run it in a standalone window
Yes i see ...nothing new or better

Well, it can call Node.js modules from DOM, so it is something new. And better... Better than what? If you are planning to start this "WinAPI stuff" again, I'm not gonna continue this conversation. ;)
5
General questions and discussions / Re: What BASIC do you mainly use?
« Last post by jbk on Today at 16:19:41 »
just tried to install on Windows 10 but Windows defender flag it as malware :(
6
Offtopic / Re: JavaScript standalone interpreters
« Last post by Aurel on Today at 16:14:19 »
Quote
Aurel, it basically takes your HTML/CSS/JavaScript code and run it in a standalone window
Yes i see ...nothing new or better
7
How does FBSL's ability to use different languages within the same program differ from ScriptBasic's extension module's or libraries in other BASICs?

The ScriptBASIC extension modules describe an interface that must be included in your source script to be able to call a specific precompiled 3rd party dynamicaly linked library (a .DLL in the MS Windows environment, or an .SO "shared object" under Linux).

FBSL doesn't need any special interface to call the functions in any 3rd party DLL. The universal call engine is prebuilt in it and you don't even have to bother if that DLL uses an STDCALL or CDECL calling convention. The calls are coded as if the DLL functions were part of FBSL's own vocabulary. The functions of Kernel32.dll, User32.dll, and Gdi32.dll (plus Msvcrt.dll in the DynC jitter) are preloaded at app launch time, so you don't even need to mention those DLLs in your code at all. But why not if the Fbsl.exe binary is initially linked to them at compile time, in the first place? :)

What you often call a "library" in the other BASIC dialects would effectively be an include file with a set of reusable procedures written in those dialects. Of course both ScriptBASIC and FBSL can use those too, with FBSL being able to have those procedures written not only in BASIC but also directly in C and/or assembly syntaxes thus being on a par, speed-wise, with the 3rd party DLLs originally built in the environments of respective static compilers like VC, or GCC, or MASM32, or GAS, whatever. :)
8
Offtopic / Re: JavaScript standalone interpreters
« Last post by Tomaaz on Today at 15:55:06 »
I used Node-Webkit (now known as NW.js) to build desktop applications.
Look here: http://nwjs.io/

OK. I've tried it. It's very slow on Linux. Takes ages to run simple "Hello World" example.

It seems to be a bit faster on my Win 10 machine. Yes, it takes several seconds to start, but apart from that it seems to be something I was looking for. Thanx a lot, Cybermonkey! :)

...and do you can show us your example Cyb?.

Aurel, it basically takes your HTML/CSS/JavaScript code and run it in a standalone window. Plus you get functions that can interact with your operating system. This example simply draws Mandelbrot Set in a standalone window, but it places the window in a specific position, set its width and height and checks if the directory named "mandelbrot" exists (if not, it is created):

Code: [Select]
<!DOCTYPE html>
<html>
<head>
<title>Mandelbrot</title>
<script>
var win = nw.Window.get();
win.x = 100;
win.y = 20;
win.width = 920;
win.height = 620;
fs = require('fs');
if (!(fs.existsSync('mandelbrot'))) {
var kat = fs.mkdirSync('mandelbrot');
}
var x = 0;
function aktywuj() {
plotno = document.getElementById("rysunek");
zawartosc = plotno.getContext("2d");
zawartosc.fillStyle = "#000000";
zawartosc.fillRect(0,0,900,600);
t = setTimeout("rysuj()", 1);
}
function rysuj() {
plotno = document.getElementById("rysunek");
zawartosc = plotno.getContext("2d");
przelx = 3 / 900;
przely = 2 / 600;
for (y = 0; y < 600; y++) {
c = 0;
a = 0;
b = 0;
z = 0;
x2 = (x - 450) / 150;
y2 = (y - 300) / 150;
while (c < 128 && z < 4) {
a2 = a * a - b * b;
b2 = 2 * a * b;
a = a2 + x2;
b = b2 + y2;
z = a * a + b * b;
c = c + 1;
}
p = c * 12;
if (p > 255) {
p = 0;
}
k = c * 8;
if (k > 255) {
k = 0;
}
l = c * 4;
if (l > 255) {
l = 0;
}
m = l.toString();
n = k.toString();
o = p.toString();
kol = "rgb(" + m + "," + n + "," + o + ")";
zawartosc.fillStyle=kol;
zawartosc.fillRect(x, y, 1, 1);
}
if (x < 900) {
x++;
t = setTimeout("rysuj()", 1);
}
}
</script>
</head>
<body onload = "aktywuj()">
<div>
<canvas id="rysunek" width="900" height="600"></canvas>
</div>
</body>
</html>
9
Thanks for the welcome, Richey,

No apologies needed (though of course appreciated and accepted :)). And yes, your vision of FBSL is now correct. Quite a few modern BASIC dialects (not only BB4W but also PowerBASIC or OxygenBasic and some others) offer some degree of "inline assembly" to optimize their time critical routines for speed, just like VC or GCC compilers do. FBSL extends this feature even further giving you the ability to also use raw ANSI C code for the same purpose just in case you find assembly a little difficult to master. Or you can even write your applications entirely in assembly or C (the respective code blocks can contain an unlimited number of own procedures written in the respective language and can independently call external libraries too), where the only BASIC wrapper would be a call to the main DynAsm or DynC block to mark the program entry point.

Unlike FreeBASIC, or BCX, or UBX, or MasmBasic and some others that are essentially BASIC-to-C or BASIC-to-Asm translators, FBSL is completely standalone/independent/self-sufficient and doesn't depend on third-party static compilers to generate executable code. All C and assembly blocks are dynamically compiled to machine code directly in memory at application launch time. JIT compilation occurs so fast that you can enjoy your interaction with your C and assembly sources in real time just as much as you would while working with BASIC alone.

Typically, FBSL's C and assembly code would execute 100+ times faster than true interpretative BASIC that's also pretty fast these days.

Hi Mike
I installed FBSL some time ago but could never get it to work, eventually I removed it when cleaning my HD
is there a latest distribution that I could try?
Yes, I had trouble in the past locating a viable download.

For those of you who aren't yet familiar with FBSL, I'd recommend starting with an earlier version 3.4.10 that has a complete installer downloadable from Gerome GUILLEMIN's signature throughout the FBSL forum. It's a little outdated but still fully functional and sufficiently documented. It also has the Beginner's Guides written in English and French. Note that v3.4.10 didn't support the ANSI C jitter yet.

The most up-to-date FBSL v3.5 RC2 doesn't have an own full installer and its files must be overwritten on top of the existing v3.4.10 installation. Version 3.5 includes the ANSI C jitter and comes with full new documentation except for the main FBSL help file (it however contains a PDF with the description of new features and alterations to the BASIC v3.5 syntax). Version 3.5 introduces slight differences to FBSL BASIC and your existing FBSL samples won't work in it any more but the PDF describes how the older v3.4.10 can be converted to valid v3.5 code -- the changes aren't too laborious, after all. Version 3.5 is much more robust and versatile than any previous version of FBSL.

You can download the FBSL v3.5 RC2 archive from the attachments to this topic on the FBSL forum and install it on top of v3.4.10 as described therein.

FBSL v3.5 is currently still a WIP because I'm developing it at my leasure time only due to the dramatic decline of general interest in BASIC as a programming language. I do have an RC3 though, which can be obtained on special request by those who are interested. It fixes some bugs in the previous publicly available RC2 version. :)
10
Look richey
i think that you have wrong approach to learn programming
you simetimes lern C sometimes etc..etc
man use first one thing and learn it thenyou will be on horse

Yeah, you could be right...I have flitted around a bit but I'm trying to stick to just C at the moment...
Pages: [1] 2 3 ... 10