Monkey for creating a C++ DLL?

Monkey Forums/Monkey Beginners/Monkey for creating a C++ DLL?

amando(Posted 2015) [#1]
I think it's the first Monkey forum post I've opened!

By the way, my English is really really limited. Sorry about the quality of my messages. I learnt English by myself mostly. Sometimes I write well, sometimes I don't.

Well, I am using a RAD languages that it's much more slower than code C++ monkeys generates. It's called Xojo and I have been using it for years. I'm really confortable using it. Anyhow I would like to use Monkey to create improve some code speed and

Since Monkey it's a cross compiler, it's OOP, it's Basic alike, I would like to use more Monkey code than can be used by Xojo compile in C++.

I kindly appreciate your answers. I would like to use monkey for creating a wrapper library that can be called by it and other compilers.

Thanks!

Amando


amando(Posted 2015) [#2]
There is no edit message option? :- Let me know if you don't understand me, please. Thx


skid(Posted 2015) [#3]
The reason monkey is fast is because of mojo and mojo2.

I don't think Monkey can help you write fast programs in Xojo as I don't think the language is the problem. The problem is likely the Xojo graphics engine.

I think you should either abandon Xojo if it is not fast enough or learn how to use it with more skill.


amando(Posted 2015) [#4]
Thanks for your answer. I did not expressed as I wished. My intention is to use Monkey as a language, not as a game engine or game.

Target would be cpp or console Apps and use Monkey to create C++ wrappers. Nothing related to MOJO or games, just as a trans-compiler.

Thx
Amando


ImmutableOctet(SKNG)(Posted 2015) [#5]
This topic's been talked about a few times on the forums. The big issues are ABI related. Not only is the garbage collector single-threaded/limited, but you'd have to deal with object life times between multiple GCs. An easy way would be a copy, or to handle things as raw data only. But then you're getting a very limited version of Monkey.

Because of a lot of these issues, Mark's working on Monkey 2, which shouldn't be too hard to get working for this kind of thing. Unfortunately, the current version of Monkey doesn't allow this. The big thing with Monkey 2 is going to be C++ generation, though. So, depending on your use case, it'll be easier to use, but harder to port.


amando(Posted 2015) [#6]
Thanks for your answers. I will wait then until Monkey 2 is released.