-
Notifications
You must be signed in to change notification settings - Fork 7
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
Build on Mac #27
Comments
I think i figured it out:
|
Ignoring the PR right now, can you tell me how important having the plugin written in Go is for you? Ie. are you more interested in doing Go-pluing stuff or in having an ATR for X-Plane? I am asking because I was searching for contributors on the org-forums and it seemed like people were a bit thrown off by not using Lua. So I thought maybe just doing the code in Lua (until we run into performance issues) from https://github.com/X-Plane/XLua Having actual contributors is more important to me than technicalities so I value your opinion. Doing such a huge project alone is a bit much for me so I am really happy for everyone who wants to help. |
Thanks for getting back to me.
It is getting into those stupid holy war territory. But here are my two cents From my own experience, hiring people especially new grads in this industry, no kids want to do c/c++ or even java! Everyone likes Python/nodejs/Ruby on rails/go/rust. What does that mean for sim? A) of course c/c++ is faster (since lua is essentially c when it runs/compiled) but I'd argue assembly is a lot more faster. Why you use c? Because it is easier. Same goes to golang. Let's say c/c++ is 20 times faster than go, but who really cares 1ms vs 20ms when your hardware is so much better. B) what is going to happen with next generation developers? Unfortunately, I am seeing a lot less C/C++ developers these days. And I think having go is going to open doors to more people (I forked/modified that goplane project in my xairline org lol) C) using STKP/volanta as examples, why we didn't have these tools before? These are examples how web technologies are bringing more developers to the sim world. I built xairline ui in 2 days. There is no way I can do that in c/c++ in 2 month……
|
As for the PR: No worries, every incremental improvement is fine. It will never be perfecly complete anyways ;-) WRT Lua maybe you misunderstood me: I am pretty sure using XLua is worse performance-wise as it does not support doing plugin work on a different thread, effectively blocking the simulators main thread. That is why I initially started with Go. On the org-forum there is a guy who has already done a lot of work for an ATR custom engine and he would be willing to share/incorporate the code into this project, but it is all in Lua. |
oh, i know what you mean. And my other reason for using something like go is because go routine :) we are totally on the same page. Lua would work, if one understands how to program it async or using event loop so non critical compute is not blocking the main thread .... my comment was mainly to share my take on using modern programming language/framework :) |
@maxhille you mentioned that there is some limitation on cgo which causes xplane to crash sometimes when recompilie go plugin. can you share more information on that? I'd really want to look into that and hopefully find some solutions around it |
IIRC it went down to this issue: golang/go#11100 |
Hmm, if that's the problem then I am a bit worried to use go for "global" plugin. When you switch planes, it gets reloaded (?) Which will crash xplane potentially…for a plane plugin, it might be OK unless you change plane back and forth? |
Maybe try it out yourself. I think this problem only applies while doing dev work. Reloading an unchanged shared library is not a problem IIRC. I can take a look at this in February as I will have time to work on this this. But in general you see that using Go for X-Plane plugins is a subject for itself. That is why I would propose using XLua for now to get the Plane itself forward. In general Go indeed is viable for this. I and some other people successfully used https://git.sr.ht/~mh/xp2ts (also by me) back when we still needed that as a workaround and there were no troubles. It is a session plugin. |
Thanks! I will give it a try. I have been looking in your repo for reference :) |
so i tried with a global plugin, when you switch planes, it won't reload so it is not a problem :) |
I plan to work a bit on the plane this month. I wonder whether you are also interesting in improving it. In case |
i am super busy for the next 3 weeks because of a major release at work :( and we all know that 3 weeks might actually mean 3months..... But i'd keep an eye on this project in case there is any low hanging fruit i can pick |
I changed the plugin architecture to use XLua for now. I think you can close the PR. Maybe we will get back to using go in the future. |
Hi there,
How can i build this on mac? i tried to play with the makefile but i am getting some errors.
The text was updated successfully, but these errors were encountered: