C++ 3rd party lib support?

Community Forums/Monkey2 Talk/C++ 3rd party lib support?

Skn3(Posted 2015) [#1]
Hey Mark,

Direct question to you. Do you have a good plan of how module developers will integrate 3rd party libs?

For example lets say I want to wrap the google v8 javascript engine. How would I go about doing this in MX2? Any pseudo examples would be cool to see!

How would I distribute this module so that others can also use it? Would I have to make them use custom targets or will MX2 provide a cleaner approach than this?

How would I deal with what ever resources/files the V8 lib might need to import?

Are there limitations of what can be externed and then used within MX2 code?

Will support for these features be early or later on ?

This has been discussed in parts throughout this forum, but its been a while and it would be cool to know if you have made any plans for this?


EdzUp(Posted 2015) [#2]
It's a good question what with all the C++ modules out there which could fill gaps and make mx2 fly


Skn3(Posted 2015) [#3]
Yeah deffo would make MX2 soar! The amount of times I feel the urge to start a module wrap in monkey but then side-step as its just not fun supporting a custom target for each wrapped module.


amando(Posted 2015) [#4]
I too have asked myself this before. Thanks Skn3 for posting it so detailed!


rebelas(Posted 2015) [#5]
IMO,

BlitzBasic, BlitzMax and MX are beautiful languages because they give you C like feeling. C is what we all have learned computer science with. Python syntax deviates from what people learn in the beginning of their computer education. If it becomes a good language, MX2 can compete with Python. For that, it needs good modules for scientific and business work. In entertainment, with a Blitz3D like commands, without shader complications, and with a good set of built-in shaders, it can penetrate universities and high schools of the world. Windows is still the best and the most common OS for serious work, MX2 should work with Windows first.


Samah(Posted 2015) [#6]
@rebelas: C is what we all have learned computer science with.

That's somewhat of a broad generalisation. I learned C in a TAFE course, not at university. When I studied computer science at uni we had one semester of C++ as an afterthought a few years in, but that's it.
For non-Aussies: TAFE (Technical And Further Education) is like a mini-university where you can register for individual subjects. It's usually cheaper and is often taken part time. In my case I took the course part time during high school.

@rebelas: Windows is still the best and the most common OS for serious work, MX2 should work with Windows first.

Depends on what you call "serious work", and what your target audience is. At my uni, a lot of our work was done on Unix terminals. Also there seems to be this idea that Macs are better for multimedia (to which I disagree).

To be fair, most of the time I spent in the Unix labs was taken up with Magic: The Gathering. <_<


therevills(Posted 2015) [#7]
I learned C in a TAFE course


Interesting... here are the languages I have learnt from education places (ie school, college, uni etc, not self-taught):
* BBC BASIC and LOGO (with Turtle) at secondary school
* (Turbo) Pascal at college
* VB, C, C++, Perl, JavaScript and Java at University


Samah(Posted 2015) [#8]
I started writing a list, then decided I cbf...
Suffice to say, the only programming they taught us at high school was Karel the Robot.
If you want some fun, play TIS-100.


rebelas(Posted 2015) [#9]
@Samah

Yes, you are correct, "... we all have learned computer science with" is not true and is generalization.

How about these two studies:

http://www.i-programmer.info/news/98-languages/8277-most-popular-computer-languages-2015.html

also:

http://www.businessinsider.com/github-most-popular-coding-languages-2015-8

On operating systems, this is helpful:
https://en.wikipedia.org/wiki/Usage_share_of_operating_systems

Look at market share of Windows for desktop, laptop and netbooks at the bottom of the page. Netbooks will most likely die, but laptops and desktops will stay for long time. Most of the professionals around me, family members, relatives, neighbors, co-workers and friends, do their jobs with PC/Windows (laptop or desktop). I tried OS X and Linux, I found Windows a lot more efficient for work.


PixelPaladin(Posted 2015) [#10]
Oh no, the language and os war has started without me.
Let's see – at school we learned Turbo Pascal and later at university Free Pascal, C, C++, some C#, Java (at least a little bit), Haskell, and python.
At school I didn't like pascal (it is not that bad, but I just didn't like it), but this was way better than these days. Today they torture tenth graders with scratch! There are exercises where they have an image of a cat and the cat must say »meow« – in 10'th class!

And for the os: I like linux the most. It also runs on most PCs at our university. It is true that it takes some time to get used to it if you come from a windows background, but after using it for a long while now I don't want to miss it.

@rebelas: Windows is still the best and the most common OS for serious work

not really.

In my opinion monkey should support all three desktop targets (linux, win and mac) to stay platform independent. Since Mark wants monkey2 to be a general purpose programming language this is important. Scientific applications often run on linux or unix systems while more and more games will be written for linux because SteamOS is based on it. So all three platforms are equally important – even if some of them run on more devices than others.


Samah(Posted 2015) [#11]
@PixelPaladin: ...some C#...

C# didn't even exist when I started uni... XD
Anyway this has derailed.

Skn3 I would hope that it's fairly easy to wrap libraries. To be honest it's not even that hard with Monkey-X, you just need to write a lot of boilerplate code.
There are cases where performance and memory management come into play, like having to wrap structs in objects and then manage them yourself. If MX2 syntax supports native structs, a lot of those problems go away.


rebelas(Posted 2015) [#12]
Stay within the context, guys! You are all right, otherwise.