Hacker News new | past | comments | ask | show | jobs | submit | huxingyi's comments login

This framework has the potential to become another Qt if UI is been added. The coding style and document[0] are solid and similar with Qt[1]. Giving the Qt is heading in an unpopular way[2], I am looking forward to this framework.

[0] https://plywood.arc80.com/docs/modules/runtime/api/string/St... [1] https://doc.qt.io/qt-5/qstring.html [2] https://www.qt.io/blog/qt-offering-changes-2020


Neat! I checked the async.h, looks like it doesn't support nested calls? I did a similar toy many years ago, which could be used with other async libraries such as libuv: https://github.com/huxingyi/c-block


Nested async calls are supported, there's an example at the end of the article. Ordinary calls simply have to return before the next await statement, and obviously you don't want to make blocking calls.

Async/await semantically doesn't support resumption from deep in the stack, so it's a good choice for this sort of trick.


Thanks, that's good!


Thanks, to conclude from your detailed answer: I can still license the code other than CGAL to MIT, but license the whole project to GPL, and in the future if I removed CGAL, I can license the whole project back to MIT. And the plugin API is not related with CGAL at all, so I can let the user choose whatever the license.


Thanks, I checked that link. The "CGAL/Polygon Mesh Processing" package is licensed on GPL: https://doc.cgal.org/latest/Manual/packages.html

And the mentioned other libraries doesn't have the features I want.


Thanks, I mainly use the CGAL/Polygon_mesh_processing to do mesh boolean. I saw some thread say CGAL commercial license cost $12K, it's not affordable for a side project yet.


Thanks, > 1. MIT can easily be re-licensed as GPL. You can keep a branch of it right before the introduction of CGAL, so if someone really wanted to, they could replace it with something else themselves.

It's too late, I introduced CGAL very early.

> 2. This is where it gets tricky. Yes, though you'll need the permission of all your contributors to the GPL version of your project, and replace all the GPL code ith similar functioning code. You should avoid just line-by-line rewriting of the GPL code though, you'll need to have a unique implementation.

So, I guess it's a Yes. If I removed CGAL in the future.

> 3. Again, tricky, but MIT would probably be OK, because MIT is compatible with GPL, if it's within the GPL'd project.

Basically, if I have to license my project on GPL because of CGAL, I would like the scripts wrote by user could license on whatever user like. But I am not sure if is possible.


> Basically, if I have to license my project on GPL because of CGAL, I would like the scripts wrote by user could license on whatever user like. But I am not sure if is possible.

It'd have to be a "compatible" license to be allowed. Here are the compatible licenses: https://www.gnu.org/licenses/license-list.en.html#GPLCompati...


Thanks, so that means the user have to open source their script also.


Kinda. If it's strictly for personal use and not shared, there's no obligation. If the user is distributing the script in any way, they would be obligated to "share" the changes to the world by having it be free software as well, yes.


The actual effort of writing one line of code in the specific language doesn’t mention in the article. Write one line of rust is extremely difficult than one line of Python, or even C++.


Looks like a really good start. One suggestion: add mesh boolean algorithm, currently, only CGAL do this well, if your library could supports this on the MIT license, I would definitely try it. Currently, I am using libigl to do parameterization and CGAL to do mesh boolean in my 3D modeling software[1]

[1] https://github.com/huxingyi/dust3d


Thanks for the suggestion, definitely something to think about. However, this is also non-trivial to implement in a robust and efficient manner, so not sure we'll look at this soon.


Inspired by Protothreads, I implemented a similar framework 5 years ago, well, not exactly a framework, just several lines of macros, which could be used in general purpose not just embedded system (I am not sure if Protothreads can be used in general purpose). I used it in product environment with libuv, here is the github link: https://github.com/huxingyi/c-block


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: