Giter Site home page Giter Site logo

blitz-research / monkey Goto Github PK

View Code? Open in Web Editor NEW
223.0 223.0 58.0 24.59 MB

Blitz Research Monkey Source

Monkey 13.60% BlitzBasic 0.01% BlitzMax 0.19% PHP 0.03% Java 1.91% C++ 12.54% ActionScript 0.42% C# 1.06% JavaScript 0.76% C 65.92% Shell 0.02% QMake 0.01% Makefile 0.30% HTML 0.05% Objective-C 2.84% Objective-C++ 0.01% M 0.20% Batchfile 0.03% CMake 0.10% HLSL 0.03%

monkey's People

Contributors

0xc1c4da avatar adamredwoods avatar blitz-research avatar devolonter avatar nobuyukinyuu avatar ootsby avatar si-design avatar ziggybcn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monkey's Issues

'-Sign in android-title leads to warning in GLFW-target

#ANDROID_APP_LABEL="Ape's Banana Conquest"

leads to the following lines when compiling for GLFW:

TRANS monkey compiler V1.80
Parsing...
Semanting...
Translating...
Building...
g++  -O3 -DNDEBUG -Wno-deprecated-declarations -Wno-free-nonheap-object -Wno-unused-result -I../glfw/include -I../glfw/lib -I../glfw/lib/x11 -I../openal/include -I../stb -D_GLFW_HAS_GLXGETPROCADDRESS -D_GLFW_USE_LINUX_JOYSTICKS -pthread  -c -o ../main.o ../main.cpp
../main.cpp:5:34: warning: missing terminating ' character [enabled by default]
 #define CFG_ANDROID_APP_LABEL Ape's Banana Conquest
                                  ^

Seems it does not get encoded correctly.

Small sugestions regarding modman

It's a a great idea to have this modman tool Really useful but I would like to suggest two small additions/changes:
1.- Make the repositories list a remote file, so the modman can also show new modules. Having this hardcoded is a bit rare. It can be just the same txt file placed anywhere at monkeycoder.co.nz or something... ?
2.- It would be nice if the modman notifies on missing version control systems. That is, it seems to just not show git or hg modules if command line tools are not present. Some additional information such as: You need Mercurial to install this module, with the appropriate link somehow would be much better.

those are just a couple of small ideas. No sure if they make sense. Also, not sure if they're also on any todo list or something

Also, the Module_ext used to install them... Is there any way to customize this so them gets installed whenever you want?

Hope this is seens as a constructive post. Also, if there's not dev time to make this, but they're reasonable additions, I may have some time next week, so I could try to get something done in this area.

stdcpp: add LIBS config var

Can add this just for the stdcpp builder? It'd help a lot for DLLs.

add this to " src / transcc / builders / stdcpp.monkey" after line 53

LIBS+=GetConfigVar( "LIBS" ).Replace( ";"," " )

Typecasting in a while loop (Java, CSharp)

Example:

Interface TestForCast
End Interface

Class SampleApp Extends App
    Field test1:Object[] = New Object[100]
    Field test2:Object

    Method OnRender:Int()
        Cls(200, 200, 200)

        Local i:Int = 0
        While TestForCast(test1[i]) <> Null And i < test1.Length
            i += 1  
        End While

        If TouchHit(0) Error("")

        Return 0
    End Method
End Class

Android target generates the following code:

class c_SampleApp extends c_App{
    public c_SampleApp m_new(){
        super.m_new();
        return this;
    }
    Object[] m_test1=new Object[100];
    public int p_OnRender(){
        bb_graphics.g_Cls(200.0f,200.0f,200.0f);
        int t_i=0;
        Object t_=m_test1[t_i]; // ???
        while((t_ instanceof c_TestForCast ? (c_TestForCast)t_ : null)!=null && t_i<bb_std_lang.arrayLength(m_test1)){
            t_i+=1;
        }
        if((bb_input.g_TouchHit(0))!=0){
            bb_std_lang.error("");
        }
        return 0;
    }
}

XNA target:

class c_SampleApp : c_App{
    public c_SampleApp m_SampleApp_new(){
        base.m_App_new();
        return this;
    }
    public Object[] m_test1=new Object[100];
    public override sealed int p_OnRender(){
        bb_graphics.g_Cls(200.0f,200.0f,200.0f);
        int t_i=0;
        Object t_=m_test1[t_i]; // ???
        while((t_ is c_TestForCast ? (c_TestForCast)t_ : null)!=null && t_i<bb_std_lang.length(m_test1)){
            t_i+=1;
        }
        if((bb_input.g_TouchHit(0))!=0){
            bb_std_lang.Error("");
        }
        return 0;
    }
}

Obviously while loop doesn't work as it is supposed to.

png 4-bit with picopng

Hi,

not sure if you are interested in GLFW targets getting png 4-bit (i am!), but with picopng it can be done easily. picopng is a zlib license, so i feel this can work, but you will have to ok it. let me know if you need my code, i can create a pull req.

the problem may be with the VS project which needs the picopng.o file added in. not sure if i can pull req that,

//AdamRedwoods

Wrong Keys (GLFW3)

I get the wrong keys when using KeyHit() and KeyDown() only on GLFW3. (html5 is okay)
I am running macOS 10.11, have a german keyboard layout but use english system language. When using the code below the output is the reverse of what I expect.

If KeyHit(KEY_Z)
	Print "key z" 'prints y
Elseif KeyHit(KEY_Y)
	Print "key y" 'prints z
End

I found this github Issue and a workaround seems to be to use glfwGetKeyText() to get a string representation.

Binary translator files

What do you think about adding links to binary translator files or add information about how to build Monkey translator? At the moment, there are some issues with understanding how to build Monkey translator without a translator.

MonkeyX Fails to compile if the file name contains spaces

Hi all,

I'm an IT Technician at a school/academy and I have been assisting our computer science teachers with an issue they have been having with their MonkeyX programs today.

We are using:


About Ted


Ted V1.25 (Monkey V84f; Trans V1.85; QT_VERSION 0x040804)

Copyright Blitz Research Ltd.

A simple editor/IDE for the Monkey programming language.

Please visit www.monkeycoder.co.nz for more information on Monkey.


OK


It appears, from looking into the issues that our computer science faculty have been having today that if there are spaces in the file name of the *.monkey file, then when this gets translated into C++ for compilation the spaces get inserted at various code points. This then makes an invalid C++ file which fails to compile.

I'm afraid that although I did have an example cpp file that demonstrated the issue I deleted it while resolving the issue. Hopefully as the issue is easily reproduced that won't be a problem.

Many thanks for your time

Peter

another brl.json bug

Too lazy to make a pull request, sooooo...... brl/json.monkey, line 89:

    Method GetBool:Int(key:String, defval:Bool = False)

The return value should be Bool, obviously 👯

mojo still missing

Thanks for making Monkey open source, the mojo native files are still missing?

native resize for DataBuffer

The native implementation of the DataBuffer currently offers no way to resize the DataBuffer.
Since the _length and the _data fields are private (C++) there is currently no way to interface with C++ code which needs to resize the Buffer. It is also no option to create a new BBDataBuffer because it cannot be passed back to Monkey X without problems. It would be nice if you could implement a native resize method for the DataBuffer.

Unsorted imports

Transcc currently supports no way to order Imported files.This causes a lot of trouble when interfacing with C and C++ Project which rely on a specific order of imports (and are not Monkey optimised like MySql). It would be nice if there was a possibility to import files in a more ordered way.
https://github.com/blitz-research/monkey/blob/develop/src/transcc/builder.monkey#L71
e.g. possibility to import headers first and files that use these headers last (or just later)
(even a simple ImportFirst / ImportLast would probably do?)

AdMob Smart Banners.

The following code will allow us to use AdMob's smart banners.

        switch( _adStyle ){
            case 1:_adView=new AdView( activity,AdSize.BANNER,MonkeyConfig.ADMOB_PUBLISHER_ID );break;
            case 2:_adView=new AdView( activity,AdSize.SMART_BANNER,MonkeyConfig.ADMOB_PUBLISHER_ID );break;
        }

Modman and git submodules

Yesterday I tested new module manager. It seems, everything works perfectly with all modules and repositories. But I’ve noticed that manager runs git clone without --recursive option. So, if module uses git submodules, directory with submodule will be empty after installing.

I’ve tried to just add the --recursive option, but it didn’t work. The installation was not completed, and I had to kill the git process manually... Although it works fine if I run the same command directly from the command line

I would like to know if there any chance that the git submodules will be also supported. Or I should refuse from having them in my repositories?

Thanks!

Add keys like MODULENAME_IMPLEMENTED=False into all the remaining modules

Please add keys like MODULENAME_IMPLEMENTED=False into all the remaining Monkey modules:

  • brl/httprequest.monkey
  • brl/filesystem.monkey
  • brl/process.monkey
  • brl/monkeystore.monkey (prints "Invalid target" on any target <> ios/android)
  • os/os.monkey

This shall allow to create new targets without having to change the Monkey source code.

I'm currently working on the Java_Tool target and users will not be able to install it without modifying by hand some of previously listed Monkey modules.

Mojo natives for desktop not yet in develop branch

This one's probably an easy fix. The free version of Monkey now includes desktop targets, but the develop branch hasn't yet reflected this by including native mojo files for those targets.

(Perhaps they're still covered by the original copyright license?)

app.monkey

Small error with SaveState.

The code in question.

Function SaveState:Void( state:String )
Return _game.SaveState( state )
End

linux + minib3d

linux needs

define GL_GLEXT_PROTOTYPES

in the main.h target for glfw, or minib3d won't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.