-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Back-ported some PAWN 4 natives and features. #287
Conversation
Wasn't there a problem with the PAWN 4 License? Or did you reimplement the feature? |
I didn't actually check that, since I did assume they were the same license. However, I'll check the compatibility as they aren't the same. |
I like this, but i don't think zeex will merge |
@samphunter I don't think there's a problem. I just copied several files wholesale, and they can be used unmodified in other projects. This means that the VM will have different files with different licenses, but this is allowed and compatible. The only thing is I need to modify amx.h a little bit more, that was the only one where parts were combined so I need to just use a modified version of one or the other, not a hybrid. @Dayvison I think it would be nice to extend the scope, and don't see any harm in doing so, but that's not for me to decide. @Zeex @Southclaws @YashasSamaga @Daniel-Cortez ? |
@Y-Less there is already a repo that improves the runtime: https://github.com/Daniel-Cortez/pawn-3.2-plus EDIT:
In the Readme of the pawn-3.2-plus repo, it is stated that back-porting is not possible due to the license difference. I knew I read that somewhere. Otherwise, I would have also assumed it would use the same license. That being said, there are apparently already some features back-ported according to the what's new section. PS: PPS: I think we are actually violating the license already by not adding notice about the files being modified, which is required by point 2 in the license. |
That project makes some backwards-incompatible changes, and doesn't have all the natives that this PR does. I'd much rather keep these changes centralised if possible. And that statement from the 3.2 repo about licenses is just wrong, as long as the files aren't merged. |
Yes, I do believe so as well. I wrote so in the PS. Though it may be worth considering, whether the Compiler Team could contact CompuPhase about getting the 3.2 code under the Apache License. I don't think they would particularly mind and having a more standard License may be beneficial. |
I think it's only logical to extend the project scope to the runtime improvement too. I mean, the group is already called 'pawn-lang', which implies that its activity should be focused on all aspects of the Pawn language, not only the compiler part. Regarding this PR, the current license (zlib) is fairly permissive and simple, and I don't think mixing in new code under a much more complicated and restrictive license (which is Apache License 2.0) is a good idea - it would effectively put the whole repo under that new license (with some code still under the zlib license) since it's more restrictive than the current one and the end users would have to deal with its terms in the first place. Also, @Y-Less, why did you need to backport the
I probably misphrased it back when I was writing that readme (I'm not a native English speaker). Technically mixing in code under the Apache License 2.0 should be possible if it's in separate files (but IMHO it's still not a good thing to do though).
What changes do you mean exactly?
The only functions from 4.0 my fork is missing are |
|
Short answer, yes.
To answer you both at once, I included
Mostly the ones that restrict |
Well, as long as the compiler works on both versions of the abstract machine and the machine is backwards compatible, I guess there is no harm pulling the changes. So I would say yes to this PR. As for me personally, I was playing around with implementing the plus runtime for samp, as I think the plus version is a much better fit. I am not sure for what the LREF/SREF hacking is needed, but I think it would be better to sacrifice it in order to properly sandbox scripts. Most of the YSI functionality can be provided by the native code, and can be implemented better in something like C++. But there is no reason not to give people the option to chose. Having both (or all three with the original) versions available would be better. |
Technically you could implement the YSI features in the compiler. That is something I've thought about a few times, but just never got around to it. |
Which features do you think would be appropriate to implement into the compiler? I can only think of inlines and hooks. IMHO inlines are too big of a change to implement into this compiler, but hooks could be useful. |
inlines, hooks, and |
It would be a compiler fork though, or at least hidden behind a flag. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
What this PR does / why we need it:
Backport natives and features from PAWN 4.
Which issue(s) this PR fixes:
Fixes #
What kind of pull this is:
Additional Documentation:
This takes the default natives from PAWN 4 and puts them in PAWN 3.