Author Topic: Bytecode Interpreter concept  (Read 29562 times)

0 Members and 2 Guests are viewing this topic.

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #45 on: May 25, 2014, 02:47:06 PM »
Quote
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.

thanks Mike
Yes you have right ,it looks to me when i first time try to convert toy interpreter that something
is wrong with this UDT array but maybe can be solved in a different way...
ok it is always best to wait for Charles what he can tell about that possible problem.

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #46 on: May 25, 2014, 02:49:35 PM »
Quote
Please try the attached Eclecta executable on your PC - it has "open" added instead of NULL.

Ok i will,but i already do that myself ...you just post faster than me ... :-\

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #47 on: May 25, 2014, 02:54:07 PM »
All right Aurel,

I'm glad it finally worked for you either way, yours or mine. :)

I'd rather still not hardcode "fbsl.exe" into this function. You will have a choice through the Options dialog to specify either Fbsl.exe or Fbsl_Tiny.exe to run your scripts. That way you can be perfectly sure your creations will work equally well with the both implementations of FBSL - an executable and a DLL.

Kuron

  • Guest
Re: Bytecode Interpreter concept
« Reply #48 on: May 25, 2014, 02:57:45 PM »
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. :)

I am behind on stuff, too.  Between my fiancee battling breast cancer, our daughter having a brain tumor pressing on her pituitary gland, I took a nasty fall on some icy steps on Valentine's Day and ended up with a nasty concussion and also managed to injure my left hand.  The left hand being messed up made it really hard to get some contract work done.  Of course, I got another injury to the left hand two weeks ago which made it even worse.  It has been a hellish couple of months.

Anyway, my reason for asking is I wanted to set up a summer coding class for kids in my area.  Due to health issues, I have missed the deadline for that.  Now, I am aiming for an after school program when school starts back up in the fall.  Anytime I run this class, I try and use a different programming language.  It needs to be something free, and have an unrestricted license.  Unfortunately, 3.5 won't quite be out in time, so I think I will use MiniBasic as then I can cover 2D and 3D.  The last time I taught the class, I used QB64, but it had gotten a bit weird the last time I looked at it.

Anyway, I will definitely check out 3.5 for my own use when it is released. :c)  Good luck on your move.

 

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #49 on: May 25, 2014, 02:59:18 PM »
Yes i understand your point and i agree with you
BUT then you must chek again all this function and fix this somehow..
« Last Edit: May 25, 2014, 03:17:52 PM by Aurel »

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #50 on: May 25, 2014, 03:13:41 PM »
Yes Aurel,

Thanks for co-operation. I will add it to the next release of Eclecta and I will especially acknowledge you in the History section of Eclecta's help file. What name will you prefer to go under: Aurel, AurelB, ruben, zlatkoAB or any else? :)

JRS

  • Guest
Re: Bytecode Interpreter concept
« Reply #51 on: May 25, 2014, 03:15:12 PM »
Quote
It has been a hellish couple of months.

Stay strong and remember you don't have to be a hero. Be honest with yourself and your current limitations and ask others to step up and do their part. I'm still on a 5 year run turning my nightmare with my daughter's H1N1 battle and recovery around.




Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #52 on: May 25, 2014, 03:21:36 PM »
Quote
Yes Aurel,

Thanks for co-operation. I will add it to the next release of Eclecta and I will especially acknowledge you in the History section of Eclecta's help file. What name will you prefer to go under: Aurel, AurelB, ruben, zlatkoAB or any else? :)

No problem Mike  ;)
This part of win programming is somehow my Area  and when i drop on
something ..this must work on one way or another...
of course some experience always help ..
Aurel is ok  :)

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #53 on: May 25, 2014, 03:23:42 PM »
Brice,

You could have used FBSL v3.X XXX yesterday, a year, or a decade ago without any special permission. I said it was specifically meant for education, self-education, and fun from its very beginning. Go ahead with FBSL any time you feel like it. There is no need to contact anybody for any permission or license whatsoever and there never was. :)

Why didn't you start with that message in the first place? :)

P.S. What specific assistance do you need from me in your project? Don't hesitate to ask in case you need any.

Charles Pegge

  • Guest
Re: Bytecode Interpreter concept
« Reply #54 on: May 25, 2014, 03:42:20 PM »

Mike, I have fixed a problem with string members of  local UDT variables. This only occurred when no other string variable were present in the function. Also fixed another issue with returned bstrings.

http://www.oxygenbasic.org/o2zips/Oxygen.zip


We are all glad that you were able to return from the Congo with your own head securely attached to the rest of your person. :)

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #55 on: May 25, 2014, 03:53:00 PM »
Thanks Charles,

I'll try out the new zip tomorrow as it's quite late here already for any serious work, OK?

I was on the Ugandan side of the border actually. Those were the places that were depicted in your recent gorilla video on the thinBasic site. :) And why are you so sure my somewhat shrunken head isn't simply sewn back to my remaining poor self? :D Or, is this exactly what "securely attached" actually means? ;D


P.S. No Charles, this Oxygen.dll crashes for me exactly like the old one with that script I published on the Bugs board... :( See here, please.
« Last Edit: May 25, 2014, 04:38:50 PM by Mike Lobanovsky »

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #56 on: May 26, 2014, 05:08:46 AM »
Ok back to topic....

I am looking into FBSL and FB version and found variable
command or command$
and oxygen say that is not defined and is true ..
so what a heck is this command   ???

FB version :
Code: [Select]
sub main()
    dim filename as string

    filename = command$
    if filename = "" then
        input "enter filename: ", filename
    end if
    if filename = "" then
        system
    end if

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #57 on: May 26, 2014, 05:17:08 AM »
Another change:
Code: [Select]
sub init_lex(filename as string)
    src = GetFile(filename)      'open filename for input as #1
    cur_line_num = 0
is this correct ?
I use something like that in ASciEdit    .hmmm

then what about eof ?
I think that oxygen don't need eof..right?

Aurel

  • Guest
Re: Bytecode Interpreter concept
« Reply #58 on: May 26, 2014, 05:26:56 AM »
then oxygen says:

Too many right brackets...  ???
in this subroutine:

Code: [Select]
sub get_string()
    dim start_line as integer
    sym = sym_string_const
    token = ""
    start_line = error_line
    next_char
    while cur_ch <> chr(34)
        if cur_ch = "" then
            sym = sym_eoi
            error_msg("eof found in string")
            exit while
        end if
        if error_line > start_line then
            error_msg("string must be on one line")
            exit while
        end if
        token = token + cur_ch
        next_char
    wend
    if cur_ch = chr(34) then
        next_char
    end if
end sub

so far in attachment :


.

Mike Lobanovsky

  • Guest
Re: Bytecode Interpreter concept
« Reply #59 on: May 26, 2014, 05:45:23 AM »
Hehe Aurel,

You're very far behind my own headaches with the Oxygen port of Toy interpreter. You're in fact only at the very beginning of the long and winding road. :)

Let's do it this way - I'll finish it when time and Charles permit, publish it, and then we can discuss everything in detail.

FB's Command$ and FBSL's Command(X) are means to obtain the application command-line parameters. The command-line parameter to toy.exe is the name of test file (primes.toy) which it must load. If it wasn't specified explicitly, then you're given a chance to type it in manually. Dragging-and-dropping primes.toy on toy.exe also makes use of this parameter implicitly BTW.