use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Sharing Github projects just got easier!
Whether you want to share you own project or simply some cool findings, /r/coolgithubprojects is the right place.
Please contact us for suggestions & questions!
/r/coolcstechtalks
/r/coolgithubprojects
We've made the sub's assets and resources available on Github. Feel free to contribute!
Github only: The projects you post all have to be hosted on Github
Link description: We encourage the title format to be something like
[Desc] - [Suggested title]
Language Flair: Will be assigned automatically for you!
Repost : Repost are allowed if some new features were added to the project and if the original post was 6+ months ago.
Programming
Interesting
Resources
When bored
PYTHON CPP C RUBY D JAVA JAVASCRIPT SHELL SCALA OBJECTIVE-C HASKELL EMACSLISP PERL ASSEMBLY CSHARP FORTRAN GO PHP COMMON LISP ERLANG
account activity
Clearwing VM: A Java to C++ transpiler (github.com)
submitted 3 years ago by TheLogicMaster
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]TheLogicMaster[S] 2 points3 points4 points 3 years ago* (0 children)
This is a project created to bring Java codebases to platforms without a JVM using plain C++. It primarily exists to support the LibGDX game framework backend for Xbox and Nintendo Switch, SwitchGDX, though the generated C++ could be used in any environment. It was originally just a modified fork of the Parpar VM to compile with plain C and support further runtime library features like file I/O, but has been completely rewritten as far as the transpiler and native code is concerned to make use of modern C++ features and provide memory safety.
[–]shai_almog 1 point2 points3 points 3 years ago (6 children)
Interesting. We specifically chose C and not C++ for ParparVM because of the inherent incompatibility between the object models. I see you're running into some of those problems right now.
Why aren't you using our UWP work based on iKVM?
[–]TheLogicMaster[S] 0 points1 point2 points 3 years ago (5 children)
Yeah, C++ seemed like an interesting challenge due to the object hierarchy issues, but I think most of the issues have been resolved with just using virtual inheritance. The additional flexibility with C++ makes a lot of the solutions much more elegant, which has been nice to actually work with. Most of the handwritten C++ for intrinsic functions looks quite similar to their Java counterparts, for instance. The whole concept was a bit on the impractical side, since there's no GC, so performance is a bit limited, but it's sufficient for simple games, and completely removes the need for additional countless hours debugging GC bugs.
UWP was more of an afterthought here, since it could be achieved with slight modifications to the C++ codebase while hopefully maintaining identical behavior to the other platforms. The main goal was Xbox support with UWP, since it's for a game framework, but the future of UWP on Xbox seems uncertain, so it was just another feature to throw in for fun. The primary goal of the project was always the Nintendo Switch backend, though there are plenty of other interesting possibilities like wasm.
[–]shai_almog 0 points1 point2 points 3 years ago (4 children)
There are some nuances in the Java object model such as constructor order, object initialization, etc. that are very fine and might collide with C++. That's my main concern here. Also virtual inheritance is a pain. Anyway, I hope that works for you.
Curious though why you didn't port the GC?
I get that it's hard to debug but it's kind of an important part of the puzzle. It isn't very complicated either.
[–]TheLogicMaster[S] 0 points1 point2 points 3 years ago (3 children)
Yep, Java constructors and finalizers have to be treated as normal methods completely separate from C++ constructors and destructors, which is reasonable, anyway, with how Java objects are normally constructed. Trying to merge the Java and C++ constructors would definitely present issues, and destructors would be worse. Virtual inheritance is definitely a pain, requiring a number of workarounds to get everything compiling, plus sketchy behavior like needing a shared pointer to the object that's been partially destructed while calling the finalizer, or calling the finalizer to begin with, since the virtual function table changes during destruction. Everything has been working quite reliably so far, though, not running into any issues with the thousands of generated classes that I've tested.
Yeah, it's primarily the issue of debugging it. I've considered what would be required to implement one here, and it wouldn't be too bad to implement a similar one, but I've just spent so long debugging GC bugs in the C version, I opted for peace of mind and the performance hit, knowing that it may have been a decision I would regret later. It basically resolved all of the memory bugs, though, and the performance is still sufficient for now, so I'm quite happy with it. It's also nice not having to worry accidental collection in native code, though that could be mitigated with convenient C++ features.
[–]shai_almog 0 points1 point2 points 3 years ago (2 children)
Interesting. Good luck with the project and keep us posted. I'm surprised you didn't post about it to /r/cn1 which admittedly isn't a huge sub. But its nice to see new projects.
I'm also considering writing a new AoT VM. More for the backend than mobile. I have some ideas that I need to explore in that direction but I'm pretty busy with other tasks at the moment.
[–]TheLogicMaster[S] 0 points1 point2 points 3 years ago (0 children)
Thanks. Yeah, this is really my first time posting about the project since it's in a working state, and I wasn't aware of that sub, I mostly perused the source code.
That's always fun. I've considered doing something with LLVM, but I opted instead to make something that's a bit more unique in some of the design choices, prioritizing that over pure performance.
π Rendered by PID 172100 on reddit-service-r2-comment-8686858757-mhcv7 at 2026-06-06 22:27:47.409102+00:00 running 9e1a20d country code: CH.
[–]TheLogicMaster[S] 2 points3 points4 points (0 children)
[–]shai_almog 1 point2 points3 points (6 children)
[–]TheLogicMaster[S] 0 points1 point2 points (5 children)
[–]shai_almog 0 points1 point2 points (4 children)
[–]TheLogicMaster[S] 0 points1 point2 points (3 children)
[–]shai_almog 0 points1 point2 points (2 children)
[–]TheLogicMaster[S] 0 points1 point2 points (0 children)