sparkslabs / pyxie

Little Python to C++ compiler
Apache License 2.0
91 stars 23 forks source link

Integration into an IDE Environment #24

Closed sanyaade-embedded-systems closed 6 years ago

sanyaade-embedded-systems commented 7 years ago

Hi

Many thanks for pyxie. I am trying to use it inside a python IDE environment. Any tip on how to call pyxie from IDE on Windows 7? Many thanks!

God blesses!!!

Best regards, Sanyaade

sparkslabs commented 7 years ago

Pyxie currently assumes it is running on an Ubuntu Linux based machine. I don't use windows 7 so I can't do anything about this for you. I guess I could create a mode where Pyxie is designed to create something the arduino toolchain could compile, which might work for you.

Can you tell me more about your environment and why Windows 7 matters to you?

sanyaade-embedded-systems commented 7 years ago

I got it running on windows 7 (64bit). I think some environmental path are hard coded into Pyxie.

Why Windows 7? I work in a London College and Community Centre where I use Vex Robotics kits, MSP430, Tiva C, etc.... Most of the places where I work use Windows based platforms (most still use Windows 7) so I need a Windows port.

I am doing some reading and research on transpilers in Python since Python is main teaching language in UK. Like what you have said in your introduction, I also needed a Python to C or C++ translator.

I am also studying Processing (Python mode) to C++ and looking underneath the Arduino IDE, Energia and Wiring transpilers as at present.

I am still playing round your toolkit and other tools like Py2C, Mpy, EdPy, Py2C++ and others that I found on the Internet and Github to grasp how source (AST) to source (AST) work.

Pyxie with gcc-arm-embedded/arduino toolchain is very on the card. Pyxie has to be generic and cross-platform. Also I am looking at a self-contained portable IDE that students can run from a USB flash memory or unzip and run without installing anything

I have also play around PLY as I have always wanted to have a go on language design and implementation so this create a have a Go

Speak to you soon!

God blesses!!!

Best regards, Sanyaade

sparkslabs commented 6 years ago

"I got it running on windows 7 (64bit)."

The core code is fairly platform agnostic but I'd be curious as to what you'd changed. Depending on what it is, I'd be happy to merge changes.

"I think some environmental path are hard coded into Pyxie."

There's a lot of hard coded assumptions at the moment. But then it's still at a pre-alpha stage really, so that's OK (for me). I started a refactor a while back, but stalled due to lack of time. I'm hoping to un-stall soon.

sanyaade-embedded-systems commented 6 years ago

@sparkslabs

Just got back here after seeing the notification for your message. It has been a while. Yes you are right lots of the routines are hard-coded most especially paths. To make it portable you will need to refactor --> absolute paths to relative paths, put everything including all resources into one directory/folder.

I will upload my changes and ask for a pull. Need to get this done soon!

Do you have a plan on continue to develop further or you have lost appetite for it at the moment?

Here from you soon!

God blesses!!!

Best regards, Sanyaade

sparkslabs commented 6 years ago

Quick answer - I do have plans to continue on this further. I've been starved for time recently, but it is something I'll be continuing with.

I started a refactoring project a while back t create iiNodes to allow decoupling the front end from the back end cleanly, but ran out of (spare) time. Since then I've learnt of a concept that should enable me to make the iiNodes significantly more flexible, but with a simpler, less tightly coupled implementation.

My plan is to get back to this and start making those changes first.

The reason behind that at the end of the day is to start enabling type inference of blocks (eg functions), which is the next step at actually making this properly useful. This would additionally allow me to implement generators (since that would reuse the approach used by range(min,max) at the moment)

Beyond that the plan is to implement the core datatypes needed to enable representing JSON. (Since whether you love it or hate it, JSON is a useful serialisation format).

After that, the plan would be user classes.

So yeah, I have a roadmap, just been time starved recently, and also practicalities like failing laptop hardware haven't helped!

I'll watch out for your changes. If you have public repo already, if you start a branch which I can watch the development of, that would be useful since your intermediate commits will show me what you're thinking :-) (Assuming your commit comments focus on the why of the change, not on what was changed! :) )

Thanks for the update!

sparkslabs commented 6 years ago

No feedback. Closing issue.