Congrats! Hope to have a look soon.
Potential replacement of FOCS with Python
Moderator: Committer
Re: Potential replacement of FOCS with Python
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Potential replacement of FOCS with Python
It left to convert less then twenty techs so I think its time to choose what convert next.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
Techs are finished. Now it's remaining to clean up unused macros files and old tokens from parser.
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
Congrats again. Great milestone!
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Potential replacement of FOCS with Python
We have token Species which depending of context produce Condition::Species or species declaration. Maybe rename condition to IsSpecies to remove ambiguous token? Not for old FOCS parser but at least for Python FOCS?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
Same with Focus as condition and declaration. Should be declaration use FocusType same as C++ class name or rename condition to HasFocus?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
Found EmpireStockpile used as condition and value. Maybe rename condition to HasEmpireStockpile or value to GetEmpireStockpile?
Also Building used as declaration and condition. I suppose condition should be renamed to IsBuilding as it matches building itself?
Also Building used as declaration and condition. I suppose condition should be renamed to IsBuilding as it matches building itself?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
one question: how does one debug errors in the focs.py files? i get black screens when starting a game and no error messages.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Potential replacement of FOCS with Python
Log should contains errors. Maybe rethrow exception if parsing failed?
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
i get things like:
Code: Select all
16:47:36.799612 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : Traceback (most recent call last):
16:47:36.799670 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : File "<string>", line 63, in <module>
16:47:36.799680 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : TypeError: unsupported operand type(s) for +: 'float' and 'ValueRefInt'
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Potential replacement of FOCS with Python
Yes, some operators not fully implemented for any combinations of arguments. I'll make PR to add it.Ophiuchus wrote: ↑Wed Oct 12, 2022 2:52 pm i get things like:Code: Select all
16:47:36.799612 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : Traceback (most recent call last): 16:47:36.799670 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : File "<string>", line 63, in <module> 16:47:36.799680 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : TypeError: unsupported operand type(s) for +: 'float' and 'ValueRefInt'
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Re: Potential replacement of FOCS with Python
isnt this one the right one?o01eg wrote: ↑Wed Oct 12, 2022 2:59 pmYes, some operators not fully implemented for any combinations of arguments. I'll make PR to add it.Ophiuchus wrote: ↑Wed Oct 12, 2022 2:52 pm i get things like:Code: Select all
16:47:36.799612 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : Traceback (most recent call last): 16:47:36.799670 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : File "<string>", line 63, in <module> 16:47:36.799680 {0x00007fc1b3568780} [error] server : PythonCommon.cpp:101 : TypeError: unsupported operand type(s) for +: 'float' and 'ValueRefInt'
Code: Select all
value_ref_wrapper<double> operator*(double lhs, const value_ref_wrapper<int>& rhs) {
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Look, ma... four combat bouts!
Look, ma... four combat bouts!
Re: Potential replacement of FOCS with Python
No, it's a times operation not plus.Ophiuchus wrote: ↑Wed Oct 12, 2022 3:09 pm isnt this one the right one?actually i am looking for a cast from int valueref to double valuerefCode: Select all
value_ref_wrapper<double> operator*(double lhs, const value_ref_wrapper<int>& rhs) {
Gentoo Linux x64, gcc-11.2, boost-1.78.0
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm
Ubuntu Server 22.04 x64, gcc-12, boost-1.74.0
Welcome to the slow multiplayer game at freeorion-lt.dedyn.io.Version 2024-04-14.ad50e93.
Donations're welcome:BTC:bc1q007qldm6eppqcukewtfkfcj0naut9njj7audnm