Author Topic: Bytecode Interpreter concept  (Read 29574 times)

0 Members and 2 Guests are viewing this topic.

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #30 on: May 25, 2014, 09:39:03 AM »
Hi Kuron,

It had been scheduled for mid-April before I was laid up with flu and also before that bloody horror started in Ukraine. The both dramatic developments spoiled my productivity and ruined my plans seriously and now I'm still catching up very slowly with my schedule. I have yet a large piece of FBSL BASIC manual to write and about a hundred samples to update.

At any rate, now I'm planning to have it all ready for publication by the end of July at the most. This is when I'm supposed to change my current place of residence for the city of Minsk again; this is when I'll be completely off the air for about 10 days or so.

I'm going back to my last harbor, gentlemen. :)

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #31 on: May 25, 2014, 10:57:46 AM »
Hi Mike
After quick look in Eclecta source code i don't see how 'yellow button'
trigg compile script subroutine.
Do you can point me where to look?

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #32 on: May 25, 2014, 11:05:48 AM »
Just a moment Aurel,

I need some time to have a look.

And you'll have to wait a little more for an Oxygen version of Toy interpreter. Oxygen memory allocation is still too buggy for that.

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #33 on: May 25, 2014, 11:18:01 AM »
Hello Aurel,

Clicking the yellow button activates the event that is described in the file Events.inc, line 892, CASE IDM_RUNFILE.

Same old ShellExecute() that you're so fond of:

....................
ShellExecute(0, NULL, LEFT(exepath, STRLEN(exepath)), _
LEFT(FileName, STRLEN(FileName)), "", SW_SHOWNORMAL)
....................


Your FBSL executable must be called Fbsl.exe and your .FBS file extension must be associated with that executable. This is done by the installer when you install the old FBSL v3.4.10. If there's no such association or if you named the new Fbsl.exe RC2 to some other name, then of course ShellExecute() will not work.

:)

JRS

  • Guest
Re: Bytecode Interpreter concept
« Reply #34 on: May 25, 2014, 11:36:23 AM »
It's becoming painfully obvious that if you want to get people to try your software a flawless install is a prerequisite. (make a fool out of the user after they have the software installed.  ;D )

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #35 on: May 25, 2014, 11:54:02 AM »
John,

This is a beta release. If a newcomer wants to try out FBSL, they can and should start with the stable (well, not any more by RC2 standards, of course) release of v3.4.10. It has a full-fledged installer and it works out of the box and there is still a lot to FBSL that can be learned from it.

There are a few very able FBSL coders who have formed the real tester team for v3.5 from its very early Alpha, and this is who the current RC2 primarily targets.

As soon as Final is ready, it will have its own installer and v3.4.10 will become part of FBSL's long-time history.

Aurel could have been part of that team too had he not stopped learning FBSL and abandoned it in favor of trolling at alien sights about matters far beyond his comprehension. For which he was of course mercilessly banned from the FBSL forum.

JRS

  • Guest
Re: Bytecode Interpreter concept
« Reply #36 on: May 25, 2014, 01:14:36 PM »
Quote
For which he was of course mercilessly banned from the FBSL forum.

What does banned mean?  :P

Would you like to see my trophy room of shrunken skulls?

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #37 on: May 25, 2014, 01:47:30 PM »
OMG
For ultrasmart->mister John
RC2 version of FBSL is a portable version...soooo
there is no installer and that is not problem....


 

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #38 on: May 25, 2014, 01:59:44 PM »
What does banned mean?

Getting banned (to ban-banned-banned) means when someone with administrative rights baseball-bats your skull with all his might off the forum and follows it with his eyes until it gets shrunk (to shrink-shrank-shrunk) to nothingness beyond the horizon.

I'm also aware of such really difficult cases as child-children, ox-oxen, brother-brethren, sheep-sheep and a few others. :)

Are your shrunken skulls reusable? ;D

JRS

  • Guest
Re: Bytecode Interpreter concept
« Reply #39 on: May 25, 2014, 02:10:56 PM »
Touch screens sort of spoiled my plans of making mouses out of them.  :'(


Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #40 on: May 25, 2014, 02:14:24 PM »
Quote
And you'll have to wait a little more for an Oxygen version of Toy interpreter.
Oxygen memory allocation is still too buggy for that.

-oh this is not good news...even i think that i can force
Oxygen to do that...hey i even create toy interpreter with all
old bugs and work .

Mike i use in my editor this:

sRet = ShellExecute 0,"open","fbsl.exe",chr(34)+fName+chr(34),"",5

and as you can see ...it work like a charm

Mike you have in this include file (Events.inc)
3 CASE options..right?

1. ID_RUN - red button
which is suposed to run file and eventualy save before execution
using startup file...right?

2.IDM_RUNFILE - yellow button...who not respond?
which must run file
And in your version of ShellExecute you use NULL pointer instead of
proper command "open"...why you that i am not sure ?
Rest of function looks ok to me .

So i will modify this function and try to recompile...
i think that this NULL pointer is a main problem on my xpsp2.

Charles Pegge

  • Guest
Re: Bytecode Interpreter concept
« Reply #41 on: May 25, 2014, 02:19:36 PM »
I remember visiting the Pitt-River Museum, when I was at Oxford, and seeing their shrunken head exhibits in the flesh, so to speak. They were strangely both cute and macabre at the same time.


« Last Edit: May 25, 2014, 02:26:31 PM by Charles Pegge »

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #42 on: May 25, 2014, 02:39:32 PM »
Aurel,

Your interpreter uses simple data type arrays while the Toy interpreter uses arrays of user-defined types that are apparently causing some memory corruption in the current version of Oxygen. I have however filed a corresponding report on the Bugs and Feature Requests board so that Charles can look into the matter and possibly fix it soon.

As for NULL in ShellExecute(), it stands for the default action of Fbsl.exe on the files whose .FBS extension is associated with this executable. We can try and change Eclecta's function to "open" too and see what happens.

P.S. Please try the attached Eclecta executable on your PC - it has "open" added instead of NULL.

.

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #43 on: May 25, 2014, 02:43:08 PM »
Mike i get it finally and i t looks that i have a right .
I don't know how this work on someone else computer or OS version but on mine
this combination fly...

ok i do this:
Code: [Select]
CASE IDM_RUNFILE
IF FileOpened THEN
'==============================================
' Optionally save the script before execution
'==============================================
IF autosave THEN
IF SendMessage(hwndRichEdit, EM_GETMODIFY, 0, 0) THEN SaveFile()
END IF
SetCurrentDirectory(LEFT(FileName, INSTRREV(FileName, "\")))
ShellExecute(0,"open", "fbsl.exe",chr(34)& FileName & chr(34), "", SW_SHOWNORMAL)
ELSE
MSGBOX(ME, "No file to run!", "Execution Error", MB_OK BOR MB_ICONERROR)
SetFocus(hwndRichEdit)
END IF

So as you same way i do in my simple editor... :D
And work fine...
Of course i first copy all files from FULL_IDE folder to main FBSL folder then
from my editor run Eclecta from source...
open file toy.fbs
then click on 'yellow button' and voila finaly
interpreter is runing...  ;)

Well it is interesting ..i understand FBSL almost without learning or looking into help file.
Syntax is nice and clean and because i know very good part of win api functions
there is no problem for me to understand what is what.



.

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #44 on: May 25, 2014, 02:46:34 PM »
Charles,

I lived and worked at the Ugandan/Congolese border for nearly 2 years at the end of 70's. The local pygmies used to trade their stuff including shrunken heads for haircombs, pencils, and pocket mirrors. But I never accepted them because I knew I wouldn't be able to get them through the customs at the Soviet border in Sheremetyevo airport in Moscow.

I traded many tom-toms and small hunting bows with arrows but they took away the arrows at the customs anyway - they said they might be poisoned with curare. :)