How API-stable is Monkey2

About Monkey 2 Forums Monkey 2 Development How API-stable is Monkey2

This topic contains 2 replies, has 2 voices, and was last updated by  theuserbl 1 week, 5 days ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15559

    theuserbl
    Participant

    How API-stable is Monkey2 for the future?

    What I mean is:
    At first exists BlitzBasic,BlitzPlus,Blitz3D.
    Then comes the platformindependent BlitzMax.
    Then comes Monkey, which supportes besides the native desktop platforms HTML5, Android, etc.
    And now we have Monkey2. Which have what advantages over the first Monkey?
    And for every new Programming language / dialect it have to be new written (or ported over ?) the libraries for GUI, 2D, 3D, etc.

    So, how API stable is Monkey2?
    Or will be soon created a Monkey3?

    At the moment Monkey2 looks a lot of different to the C-like languages and to VisualBasic.
    I know ANSI-C, Java, QBasic, VisualBasic and so on. And Monkey 2 looks a lot of different.

    What is needed for the IDE I have written in the Ted2Go Issue-section:
    https://github.com/engor/Ted2Go/issues/158
    https://github.com/engor/Ted2Go/issues/159

    At first I am looking, how a XML to Monkey-converter would be looking like.

    would be look like

    Interesting that there don’t exista a

    or

    but there exists a

    without effect.
    and what is the “this” (in Java) or “Me” (in VisualBasic) in Monkey 2 ?

    And how can I set the size of the window? And how can I make it resizable?

    Greetings
    theuserbl

    #15560

    abakobo
    Participant

    Or will be soon created a Monkey3?

    Mark Sibly (the creator) has stated that he will not create a Monkey3 and will stick with Monkey2.
    The biggest problem now is Apple deprecating OpenGL. But porting mojo to vulkan is on the todo list so there’s hope!

    Which have what advantages over the first Monkey?

    Mark has moved to monkey2 mainly to avoid the hassle of a multi language transcompiler (Monkey1 was transpiling to javascript,c++ & java). It meant a lot of work for each language change. Monkey2 is only transpiling to c++, using the JNI for Android and emscriptem for javascript. So changes are mostly made once for all.
    Monkey2 thus has more advanced programming features available such as firstclass functions, mutlithread, incremental garbage collector, class extensions, lambdas, etc..
    It is a bit stricter with types too, which helps seeking compilation errors.
    If you want fast html5 developpement you might prefer Monkey1 as it has a very fast javascript transcompiler and outputs very nice html5/javascript code.

    What is needed for the IDE I have written in the Ted2Go Issue-section:
    https://github.com/engor/Ted2Go/issues/158
    https://github.com/engor/Ted2Go/issues/159

    Monkey2 is clearly lacking of a good beginner tutorial. You can find a lot of simple examples on pakz’s examples pack but there is no real tutorial beginning from 0.

    A GUI editor would be awesome!

    and what is the “this” (in Java) or “Me” (in VisualBasic) in Monkey 2 ?

    Self

    You can call a field/method inside a class without Self if there is no ambiguity.

    And how can I set the size of the window? And how can I make it resizable?

    To make it resizable use the WindowFlags.Resizable when calling New. To set the initial size, do it via New too. (as shown in the example below)

    Here is a short example taken from modules/mojox/test folder. It’s the folder where you’ll find simple examples for mojox. Slightly modified to show window size when clicking. You might be confused by the Lambda, it’s just like a function, you could declare the action in a function or method.
    Note that mojox is not that easy to get compared to mojo. And if you plan to make a game it is not really advised to use mojox, you should prefer a custom GUI system like the one offered in pyro for example. mojox has been created to create Ted2 initially and only a few people really use mojox, to write their own editors.

    #15561

    theuserbl
    Participant

    Thanks for your help.

    I think Monkey2 is for beginners, so it needs an easy start for beginners.
    I have in the meantime looked at the calculator example, but your example is a lot easier.
    I have a little bit played with it.

    A xml description file could look like

    That could be used as intermediate langaue for an GUI-designer. Or as additional language like Microsoft doing it with XAML for its WindowsPresentationFoundation.

    This XML-code is only a how it could look like, but currently ignored the

    dockingView=New DockingView
    dockingView.AddView( label,”top” )
    dockingView.ContentView=button

     

    That xml-file should then generate automatically (or compiled to) the file ButtonDemo_ui.monkey2

    And the written code would then be in the file ButtonDemo.monkey2

    Greetings
    theuserbl

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.