Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    The first look of the interpretor

    Work In Progress
    9
    79
    15480
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      petermeisenstein F @Dave last edited by

      @Dave Who is the guy who always checks my code or is this done by an algorithm

      1 Reply Last reply Reply Quote 0
      • Martin
        Martin Fuze Team last edited by

        If you mean when you submit it, then all of us. There is no AI involved (although my family swear I'm a computer!) But we're not checking that it is correct, or works, or any of those things, that's not the point of the approval process. The point is to do our best to ensure that there is no malicious code, innapropriate code, etc. But I've already explained that to you in another thread.

        P 1 Reply Last reply Reply Quote 0
        • P
          petermeisenstein F @Martin last edited by

          @Martin Thanks martin.I will never will hide bad stuff in my code

          1 Reply Last reply Reply Quote 0
          • P
            petermeisenstein F last edited by petermeisenstein

            So hi guys quick update.My plan today was to give you the possibility to use a very easy variable unfortunately this wasnt implemented so i implemented some exceptionsEQbwPeBUYBUfSlU.jpg

            Its on pendin Now

            1 Reply Last reply Reply Quote 0
            • P
              petermeisenstein F last edited by petermeisenstein

              Maybe tomorrow you will get the oportunity to use a simple variable what is "a" and to give it a value between 0 and 9 and you will be able to print it out.Thats definitly a feature what will come soon.Quick Update on if statements.Maybe You ask yourself when they will added.They will defnitly added but i think not so soon.But I am developing with highspeed to give you guys every day some new features.Hope you enjoy David.So the name of the variable will be a

              1 Reply Last reply Reply Quote 0
              • P
                petermeisenstein F last edited by

                New version is live.But i will make a new today

                1 Reply Last reply Reply Quote 0
                • P
                  petermeisenstein F last edited by petermeisenstein

                  New Big Feature added: as I mentioned some times i will add a simple variable this was made this evening.You can use a=1 for example and then you can do print(a)
                  I know this is very simple but its a beginning.At next you will get the possibility for print.So maybe i cant promise anything. Here is the actual code.EQhIubjU8AEYtAC.jpg

                  EQhJ0gfUYAEISds (1).jpg

                  Programm is on pending now

                  1 Reply Last reply Reply Quote 1
                  • P
                    petermeisenstein F last edited by petermeisenstein

                    Tell me how you think about

                    This will used as a changelog:

                    dates will be in german format

                    12.02.2020 update from yesterday is now live.
                    12.02.2020
                    -Started with the implementation of a raise statement.
                    -Added some new excaptions.

                    Programm is now on pending.
                    Programm is now live

                    27.04.2020
                    Added pow() function
                    you can do pow(2,2)
                    programm is on pending now
                    2.5.2020
                    Programm should be live now.

                    What I am currently working on: 2.5.2020

                    Statements
                    I added If and a simple for loop
                    I added also while true
                    Made a good print function also

                    Programm is currently not shared

                    3.5.2020
                    I am thinking about adding variables

                    4.5.2020

                    I found a way to implemt variables its oke for the moment but not for ever

                    9.5.2020 new version is live now
                    Post to the new update will probably come next month

                    1 Reply Last reply Reply Quote 0
                    • P
                      petermeisenstein F last edited by petermeisenstein

                      To all who supported this project i want to say thank you. I will keep doing this but not like at the last time. I wont repost thousand of times to my own posts.
                      Who of you guys is very interested in this can find here a changelog. Maybe I will post one time per month something you. Bot i dont want to bother the entire community with this. You can also send me a msg if you have anything to say . Then something about updates. At the moment i am trying to implement some statements. Updates will come but not as fast as in the last time. I want to say thanks to everyone who is supporting this project. In the mean time you can enjoy the other fantastic projects here in the community. I will also post sometimes some stuff on twitter.

                      1 Reply Last reply Reply Quote 3
                      • P
                        petermeisenstein F last edited by

                        So A month is over In may i tried to finish the veriables.

                        What we have now:

                        Now we have some simple if statements
                        A simple for loop
                        While True
                        And a hopefully working print function

                        Some stuff works some stuff is a bit buggy. I also stoped developing on my interpretor. I think i will teach me How to build a good tokenizer. Also I see a big problem that we dont have functions like
                        list() I think I have to write for almost everything a workaround. But I am looking forward to future updates of fuze which hopefully will take some work. So you can download the latest "stable version" with my sharecode. You can find it on this page or on the great list of game codes. I want to really do this project. I say thanks to the people who helped me with this. I am also thinking about building an own programming language in fuze cause then i wouldnt had to keep close to the python syntaxt. Next Post will come next month between the next post enjoy the projects here see you

                        David

                        1 Reply Last reply Reply Quote 4
                        • P
                          petermeisenstein F last edited by

                          Hello Guys you may remember I was the guy who thought he could write an interpretor for python in fuze. I dont posted something since a loooooooong time you may ask yourself why. So my interests changed I didnt code much in fuze. I coded much in Python. Whats the problem with this project ? First my main problem is the lexical analyziz how do the interpretor now when a variable will be declared ? Where do i store the variable and the name of the variable. I have a new Idea a programminglanguage that will be written in python first the syntax is like this

                          declare
                          a

                          23444

                          So the positive point would be that i dont have to do lexical analyzez like this

                          print(1+3)

                          In token

                          FUNC_PRINT , TOK_1 ,OPERATOR_PLUS ,TOK_3

                          with the stuff in online you can see you have to go trough the entire string. But if you split everything in multiple lines you dont have to do this. Sure everything must be in an correct order.
                          Lets take for example fuze how would some easy fuze code broken up in to tokens ?

                          A = 1
                          VAR_NAME= A ; VAR_VALUE=1

                          lets do a bit more

                          if A==1 then
                          print ("hello world")
                          Endif

                          Now i will explain why fuze uses ENDIF and THEN so if is a statement with THEN you say what will the programm do now the interpretor knows which is the part who will be executed in case of a succesfull if statement the END is for showing the compiler where the if condition ends some programming languages use iditations for this like python but many use {} those brackets.

                          So what I want to show you with this is what acctually happens when code gets executed and yes for example C++ has to be compiled to binary code. What makes C++ so fast is the fact that you can really get in touch with the hardware. You can say where your stuff is saved in the RAM. Fuze for example is interpreted. The Fuzeinterpretor it self is probably written in C++ because otherwise Fuze wouldnt be so incredible fast. The Fuze interpretor is written in C++ probably and then compiled to ARM Machinecode. So what is about languages like Java where everyone says java can run everywhere? On the one Hand this is great because developers dont have to deal with specifying everything for other hardware. But Java is pushed trough an VM The JVM Java Virtual Machine. And this takes then runtime or speed because its not directly executed in machine code. With every Abstraction layer you build your programm gets slower. So this was a quick excurse in my world lets go again back to my python interpretor. Will I give up ? Maybe for the moment I wish fuze would get some more interesting features for me. And sure fuze is not the right tool to write a programminglanguage. Sorry in the moment its not the right tool but the team of fuze is putting lots of work in there language. And yes there are some points what i disslike about fuze. But on other points I really see how good this language is. In 5 years fuze defnitly will be a total different software. The language will have so much new features especially for you game coder people. So lets see where the way will bring me. Something what I also want to mention. In this times of covid 19 everything is a bit different I hope you all are doing well. And your family to. I saw many of you making incredible projects very cool games. Keep doing this. And what I want to say to the team Thank you. You very very patiente with me. Sometimes i was disturbing yeah i know. But we all make mistakes or how programmers would say we all are making errors 😁 So if i will bring out a new fupy version you will know it when observing this thread. Hope you have a great evening david

                          1 Reply Last reply Reply Quote 3
                          • PickleCatStars
                            PickleCatStars F last edited by

                            It’s interesting when people use tools in unusual ways, even if I don’t understand the how or why. I hope you are well too :)

                            P 1 Reply Last reply Reply Quote 3
                            • P
                              petermeisenstein F @PickleCatStars last edited by

                              @toxibunny thanks for the kind words if you want to have a deeper understanding feel free to contact me

                              1 Reply Last reply Reply Quote 1
                              • L
                                LucasJG25 last edited by

                                This is a very interesting project you have here. I too am working on a similar project. May I ask your method of approach? Are you translating your code to the FUZE4 language? Or are you building a Virtual Machine that will run your code?

                                P 1 Reply Last reply Reply Quote 0
                                • P
                                  petermeisenstein F @LucasJG25 last edited by

                                  @LucasJG25 so you go trough the entire code and then you can call fuze code. I mean i didnt finished it quite well

                                  1 Reply Last reply Reply Quote 0
                                  • L
                                    LucasJG25 last edited by

                                    So then you are interpreting to fuze code. I see, i chose to compile mine to bytecode. Which is then run on the vm.

                                    P 2 Replies Last reply Reply Quote 3
                                    • P
                                      petermeisenstein F @LucasJG25 last edited by

                                      @LucasJG25 I mean you can go trough the code and then decide what to do without building an vm over it. Because a vm takes runtime. As i said with every abstraction layer you take away runtime

                                      1 Reply Last reply Reply Quote 0
                                      • P
                                        petermeisenstein F @LucasJG25 last edited by

                                        @LucasJG25 how do you built the lexer ?

                                        1 Reply Last reply Reply Quote 0
                                        • L
                                          LucasJG25 last edited by

                                          The lexer only has a couple of functions. Scan the source code, check each character char by char, combine characters to form keywords that it recognizes and if it encounters a character it does not recognize throw an error, the lexer also needs to look ahead without consuming the character or moving the scanner. Then spit out tokens which can be keywords or terminals (single characters).

                                          I have a small Recursive Descent Parser that I recently made in FUZE4 where I used a lexer to scan a string containing math expressions such as "4+5-2+5"
                                          Here's the program: NXVWBDND9K

                                          Hopefully this helps. And if you want more info. I'd suggest looking up BNF (Backus Naur Form), I use this for parsing and creating a Recursive Descent Parser, also check out crafting interpreters which can be found on google.

                                          P 2 Replies Last reply Reply Quote 2
                                          • P
                                            petermeisenstein F @LucasJG25 last edited by

                                            @LucasJG25 how do you deal with saving variables do you make them in 2 arrays
                                            One is name
                                            And one is value

                                            And the postion is equal

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post