Google Summer of Code 2023 - Coding! Up to July 10th
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- kkremitzki
- Veteran
- Posts: 2515
- Joined: Thu Mar 03, 2016 9:52 pm
- Location: Illinois
Google Summer of Code 2023 - Coding! Up to July 10th
Hi all, it's a bit late but it looks like FreeCAD will be applying as its own organization to Google Summer of Code this year. I'm putting together the organization application now. Please share if you have an interesting project idea, if you're willing and able to mentor, or if you're an interested student.
https://summerofcode.withgoogle.com/how-it-works
https://summerofcode.withgoogle.com/how-it-works
Re: Google Summer of Code 2023 - Call for Ideas
A good unified measurement tool. A VERY good measurement tool.
Re: Google Summer of Code 2023 - Call for Ideas
This would be a good idea, but keep in mind it's a 12-22 week project. It's very much possible to make the tool in that time, but maintaining might not be that straightforward. Any mentor working on this project should probably have enough knowledge about the codebase that if the contributor doesn't continue beyond GSoC someone else should be able to take it up.
Of course this doesn't apply to just the measurement tool.
My latest (or last) project: B-spline Construction Project.
Re: Google Summer of Code 2023 - Call for Ideas
Idea: Using Nim as an extension to the existing C++ code.
These days everybody is talking about replacing C++ with Rust. To me that is silly because the existing C++ code is most of the times adequate and although Rust is quite good, to me it has the look and feel of C++ 2.0
Python is used as an extension to to the C++ code. Why? Because it's easier and faster to read and write than C++.
My idea is to use a second programming language as an extension to the C++ code: Nim. Why? Again, because it's easier and faster to read and write than C++, but there is one big difference between Nim and Python: Nim is roughly as fast as C++ !
Now people are gonna ask: WTF is Nim? Nim has the "look and feel" of Python but is a different language. Contrary to Python is Nim completely typed, has operator and procedure overloading, objects, macros, templates, generics, threading and is multi-platform. Mostly I think that Nim is C++ without it's quirks and you are gonna write a lot less code. Nim is "easy" but of course it is a mature professional programming language, so it also has it's quirks but compared with C++ it is a piece of cake. The compile speed of Nim is good and it compiles to C++. Nim is being used for exactly this purpose: To extend C++. It is used inside the Game industry, for embedded and also for Web design. You can find the Nim libraries at https://nimble.directory/
The downside of Nim is that the integrated Python prompt doesn't work and you need to write code with an editor. You can import your Python code with Nim.
What would be the goal? Implement Nim and also to implement the FreeCAD wrappers (incl. OCCT) so that people can use Nim in FreeCAD.
What are the chances of success? To be honest I think that the problems are gonna arise with the package management and the multi-platform aspects of FreeCAD but for the rest I think that the chances are pretty high. We are gonna need a new branch obviously.
I think that GSoC could be the perfect opportunity to introduce Nim to FreeCAD and once that people are start using Nim, that would be the success for me.
These days everybody is talking about replacing C++ with Rust. To me that is silly because the existing C++ code is most of the times adequate and although Rust is quite good, to me it has the look and feel of C++ 2.0
Python is used as an extension to to the C++ code. Why? Because it's easier and faster to read and write than C++.
My idea is to use a second programming language as an extension to the C++ code: Nim. Why? Again, because it's easier and faster to read and write than C++, but there is one big difference between Nim and Python: Nim is roughly as fast as C++ !
Now people are gonna ask: WTF is Nim? Nim has the "look and feel" of Python but is a different language. Contrary to Python is Nim completely typed, has operator and procedure overloading, objects, macros, templates, generics, threading and is multi-platform. Mostly I think that Nim is C++ without it's quirks and you are gonna write a lot less code. Nim is "easy" but of course it is a mature professional programming language, so it also has it's quirks but compared with C++ it is a piece of cake. The compile speed of Nim is good and it compiles to C++. Nim is being used for exactly this purpose: To extend C++. It is used inside the Game industry, for embedded and also for Web design. You can find the Nim libraries at https://nimble.directory/
The downside of Nim is that the integrated Python prompt doesn't work and you need to write code with an editor. You can import your Python code with Nim.
What would be the goal? Implement Nim and also to implement the FreeCAD wrappers (incl. OCCT) so that people can use Nim in FreeCAD.
What are the chances of success? To be honest I think that the problems are gonna arise with the package management and the multi-platform aspects of FreeCAD but for the rest I think that the chances are pretty high. We are gonna need a new branch obviously.
I think that GSoC could be the perfect opportunity to introduce Nim to FreeCAD and once that people are start using Nim, that would be the success for me.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Google Summer of Code 2023 - Call for Ideas
Unless you fully replace C++ adding another language sounds like just complicating things further... but I've never used nim so maybe it is so easy to use that it warrants the complexity of mixing 3 languages.
Re: Google Summer of Code 2023 - Call for Ideas
You can compare Nim a bit with Python, but stricter and in my opinion just as fun.adrianinsaval wrote: ↑Tue Feb 07, 2023 12:23 pm Unless you fully replace C++ adding another language sounds like just complicating things further... but I've never used nim so maybe it is so easy to use that it warrants the complexity of mixing 3 languages.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
Re: Google Summer of Code 2023 - Call for Ideas
Probably a waste if time seing that one of the goal for future Python version are mainly speed improvements.
I have no doubt that Nim is a good language, but trusting on Python improvement you have not to rewrite a big part of FreeCAD and almost every WB already coded.
EDIT: I was intrigued on what NIm is sadly it is a compiled language, so no luck, Python in interpreted language, you are comparing apples to aoranges.
Once written a Python script could run on every flavour of FreeCAD on every OS without a bit of recompiling, with Nim, you have to recompile the script each time you run it, at this point why not write a script in C++ directly?
END EDIT
Better to reduce complexity than augment it. Following the KISS principle, it is not a case if Python is used in many scientific projects.
Regards.
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Google Summer of Code 2023 - Call for Ideas
I already told you that Nim compiles to C++. When you look into the generated files you can see C++ files. I am sorry that you thought that Nim has an interpreter like Python. But I don't think that I have to tell you why I don't want to write C++, that is obvious and that is why I suggested this idea to start with.onekk wrote: ↑Tue Feb 07, 2023 2:16 pm I was intrigued on what NIm is sadly it is a compiled language, so no luck, Python in interpreted language, you are comparing apples to aoranges.
Once written a Python script could run on every flavour of FreeCAD on every OS without a bit of recompiling, with Nim, you have to recompile the script each time you run it, at this point why not write a script in C++ directly?
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.
- adrianinsaval
- Veteran
- Posts: 5551
- Joined: Thu Apr 05, 2018 5:15 pm
Re: Google Summer of Code 2023 - Call for Ideas
It sounds like nim can translate itself into C++, couldn't you then write in nim, translate to C++ and PR the generated C++ code? Is there a way of doing the opposite? Translating C++ into nim?grd wrote: ↑Tue Feb 07, 2023 3:29 pm I already told you that Nim compiles to C++. When you look into the generated files you can see C++ files. I am sorry that you thought that Nim has an interpreter like Python. But I don't think that I have to tell you why I don't want to write C++, that is obvious and that is why I suggested this idea to start with.
Re: Google Summer of Code 2023 - Call for Ideas
That would be very hard to do because C++ has so many features.adrianinsaval wrote: ↑Tue Feb 07, 2023 3:33 pmIt sounds like nim can translate itself into C++, couldn't you then write in nim, translate to C++ and PR the generated C++ code? Is there a way of doing the opposite? Translating C++ into nim?grd wrote: ↑Tue Feb 07, 2023 3:29 pm I already told you that Nim compiles to C++. When you look into the generated files you can see C++ files. I am sorry that you thought that Nim has an interpreter like Python. But I don't think that I have to tell you why I don't want to write C++, that is obvious and that is why I suggested this idea to start with.
About Nim. Latest Release 2.0.2. Here is Nim in 100 seconds and a Nim package. There are Qt and OCCT packages.