Open pfalcon opened 5 years ago
Currently I think the target audience should be somewhat embedded software engineers how are playing with python, and feel brave to try this stuff, or want to script / automate / parse some C code as part of their build process.
Another group might be compiler developers who would like to try out a new idea quickly.
In fact, I'm unsure who would really use this project for something serious, it's mostly out of curiosity of what can be done with python.
Any other thoughts on this?
Thanks for the reply here. IMHO, this is one of the most important questions right now, as it sets the further direction of the project, and would make it clear to potential contributors what would construe a useful contribution to the project and what would not.
Let me start with commenting to your replies.
Currently I think the target audience should be somewhat embedded software engineers
That's peculiarly formulated ;-). I guess the main word there is "somewhat embedded". Because one should picture a typical embedded software engineer (as in "engineer of software for deeply embedded systems, i.e. microcontrollers") as a guy sitting on Windows 7 (because Windows 10, Linux, Mac don't support drivers for his hardware probe), and holding his IAR C. In no way this guy will be interested in Python, PPCI, etc. Ok, maybe for "somewhat embedded engineers" it would be different, but there would be very few of such "somewhat embedded engineers", which makes almost zero target audience.
Another group might be compiler developers who would like to try out a new idea quickly.
Definitely +1, but these are largely served well by LLVM. So, would need to define which subgroup may still be interested in PPCI, and how to make it more interesting to larger number of these folks beyond that.
In fact, I'm unsure who would really use this project for something serious, it's mostly out of curiosity of what can be done with python.
I kinda suspected it might be like that, and thanks for spelling it out. And there're many projects like that, I dumped https://github.com/windelbouwman/ppci-mirror/issues/33 in preparation to this reply, and that lists only "hobby" compilers in Python, and for C. There're many more compilers in Python for other languages, and more compilers for something written in other languages.
But PPCI has got some "problem" - it has too wide scope - multiple source languages, multiple output (byte)codes, SSA, linker, build system, etc. - all packed together. But not only wide, it's also deep: while one needs to do some fiddling, one can see all those pieces actually work (not completely and not fully, but work). And the final "terrible news" is that all this work was done largely by one man - yourself @windelbouwman. Which is again shows the power Python brings to mere people. So, what we have is compiler infra on the brink of being useful, done by mostly one man. Just imagine where that can go if more people get involved, and how it can affect other people. Some people just can't sleep well thinking about all the potential, hence such tickets ;-).
In the next comment, let me elaborate a bit on that.
So, let's think of who can be target audience of open-source project. While discussing that, I will be giving valuations from the point of view of "community" and from a point of view of "overall progress". Obviously, I'm just a single person, and probably can't represent a "community" (which may not even exist, as in "nobody gives a damn about all this stuff"). A notion of "progress" isn't exactly objective either. With that disclaimer out, let me still try to define:
The mission statement: The state of the art in advanced compiler hacking is object-oriented API in C++ with LLVM, hopefully being able to structure that as a "plugin". That's noticeable improvement over previous situation of GCC with much less cleaner C API and explicit political prohibition of plugins. But current state of affairs is still represents "extraordinary effort" for many people who are interested in compiler hacking, but are short of time resources to learn LLVM and maintain C++ stuff. We'd like to improve that largely with compiler infrastructure implement in Python.
Ok, types of projects by intended target audience.
That's it. Don't get me wrong - there're no "bad" types of projects in that list, and no "best". For different projects, one or another model may be suitable, and that may change over time. A professional software developer definitely should try all of them. And again, p.4 is not the "toppest" one. https://github.com/pervognsen of Bitwise mentioned above is a good example, by his account, he had so much fun of corporate programming, that it took a leave on his own to recover a bit of his life and convey a message to community with project of type 2.
Anyway, back to PPCI. I would humbly suggest that for PPCI, project type 3 is the best. @windelbouwman, would you agree?
I think this project has moved in type 1 and type 2. At first, for me this was just a learning experience, and at some point I put some effort in cleaning the code and creating some documentation, since I realized it might become useful to other people. The way you outlined it, type 3 sounds reasonable, but I would like to keep the scope of the project wide. Not fix the whole world, but have a consistent library which can be used to deal with compilation related problems.
I fully understand that the project is wide, and not a classical unix tool ("do one thing, and do it well"). It want this to be a broad project, since them all parts can work nicely together. Off course, this might result in a big ball of mud in which there is a lot of stuff which all does almost work, but I'm willing to bet on this. I've seen too many projects split up into several repo's and subprojects and then configuration management takes over. I would like to think of this project in the lines of sox and netcat, tools which are a sort of swiss army knife for a specific topic.
Btw other target audience I thought of (to prevent the target audience from becoming equal to the empty set :)):
Btw, I'm glad this is not a type 4 project!
@windelbouwman, thanks for the reply!
The way you outlined it, type 3 sounds reasonable, but I would like to keep the scope of the project wide.
Thanks for acking that "type 3 project" sounds good, at least I finally explicated what's the reasoning for the changes I already proposed, and hope to propose even more. And it's absolutely fine for project to be wide - indeed, compilation itself is very wide subject, so a project dealing with it won't be exactly as simple as unix "cat". But already mentioned my concern in https://github.com/windelbouwman/ppci-mirror/issues/29 - you never do "something", you always do "something instead of something else". And that's exactly my idea - to call for down-prioritizing work in some areas and prioritizing work in other areas, often last-mile ones (where simple enough changes can lead to overall vast progress, at least re: community adoptability).
Not fix the whole world, but have a consistent library which can be used to deal with compilation related problems.
Again, good. But then it's a matter when to set fence posts. For example, for me, build system isn't really related to "compilation problems". It's completely different area of generic dependency tracking and task scheduling. And ppci-build is the part I'm most skeptical about (as in: I'm not interested in using it), and would like to propose to downplay it, and up-play PPCI use with other build systems. Anyway, that's just a specific example.
Btw other target audience Software archeoligists, As a bootstrapping tool for either a very old
That's still too niche, still not what I have in mind. Let me finally formulate my ideas in the next comment.
Ok, as we agreed that "type 3" project makes sense, the main matter is of course implications that has on project approach. Let me summarize what I have in mind:
I post this as a first issue to decide in regard to https://github.com/windelbouwman/ppci-mirror/issues/10 . What is an "improvement" (and what's not) depends largely on who's target audience.
For example, it's possible to decide that end users are the target audience. But then the README should not contain "frightening" stuff like:
And it stead should contain stuff along the lines of "Drop GCC, drop LLVM, start use PPCI now, we have cookies!"
Or it can be decided that WebAssembly can be a selling point piggybacking on which PPCI could launch into masses. And then README should provide instructions how to build some cute display hack and open it in a popular browser.
The examples can continue, let me come up with a specific proposal: target audience should be Python developers. "Developers" definitely, as README itself says that the project is in alpha stage. "Python", because I doubt that many non-Python developers would jump to see another compiler out there. The project should be of most interest to folks who know Python and curious what can be done using their favorite language.
However, any instruction in the README should also be friendly to folks who aren't (much) familiar with Python. This is not contradictory goal to the previous paragraph. For example, I'm good enough familiar with Python, but I still don't like to "install" something right away (indeed, that's not related to Python and applies to any software). Fortunately, it seems that PPCI is usable from just a git clone. But instruction should e.g. refer to
python3 -m ppci cc
instead ofppci-cc
, because the latter appears only after "installing" it.Criticism/other ideas are welcome. I anyway wanted to post this, to give a context to other sub-tickets I may post for https://github.com/windelbouwman/ppci-mirror/issues/10. (Again, based on own experience - I get various suggestions for improvements in my projects READMEs, and half of the time I wonder why they think it would be an improvement.)