SRL Archive - Senior News and General

pyMML Progress


The Claw

2012-11-18 03:17:05

Hey guys,

Can anyone link me to pyMML? I can't seem to find anything about it.

Cheers

Daniel

2012-11-18 03:28:19

From: The Claw
I can't seem to find anything about it.


Obviously because nothing exists about it o_O Simba's staying Pascal.

There's some GitHub somewhere, along with SpyRL

The Claw

2012-11-18 05:34:48

Me and r0b0t1 have decided to have a crack at making this work. Anyone want to help? We are going to start in a week.

Wizzup?

2012-11-18 05:48:33

Cool! I can help in giving directions and maybe code bit of the more complicated parts as well.

To start off, you'll need to able to build libMML (not sure if it still compiles, I will check this soon); so you need Lazarus, 1.0+ should do I think; with FPC 2.6.0. (Maybe FPC 2.4.4; I need to check…)

Then when you can build the libmml; you can use Python to load it and use ctypes for all the interaction on it.

Main tasks are:

  • Export Pascal routines sanely in libMML with a C-type interface. (So no memory management getting in the way)
  • Write nice Python wrappers around the routines.
  • Draw a line somewhere: you do not want to export all functionality. (For example: It would be nice to be able to convert from a Mufasa bitmap to a PIL bitmap and the other way around, so all the actual bitmap things can be done in PIL). But you don't want to export stuff like PosterizeBitmap, I guess.

https://github.com/MerlijnWajer/Simba/tree/master/Projects/libmml/pymml/mml
https://github.com/MerlijnWajer/Simba/blob/master/Projects/libmml/input.pas ; https://github.com/MerlijnWajer/Simba/blob/master/Projects/libmml/colour.pas

You need:

  • Basic/advanced knowledge about how Pascal and C manage memory. (I can elaborate on this)
  • Be careful with how you allocate and free memory.

NCDS

2012-11-18 19:56:49

I was actually thinking about this just a week or so ago. I've only been really working with Python for 2 or 3 months now, but I'm comfortable with it, and more than willing to help out with this.