TODO
brombres / rogue Goto Github PK
View Code? Open in Web Editor NEWRogue programming language. Ergonomic, object-oriented, high-level, multi-platform, compiles to C.
License: MIT License
Rogue programming language. Ergonomic, object-oriented, high-level, multi-platform, compiles to C.
License: MIT License
https://github.com/AbePralle/Rogue/blob/develop/Source/Libraries/CPP/STLPriorityQueue.rogue#L23
Should be on_cleanup now, yes?
If you compile with pthreads enabled and then use the generated header in another file (e.g., to interface with some hand-written C++), you get a link error because of multiple definitions of create_thread(), which comes from Thread.rogue:
https://github.com/AbePralle/Rogue/blob/develop/Source/Libraries/Standard/Thread.rogue#L192
The problem is that Thread.rogue puts its create_thread() helper function into the header via a nativeHeader block.
Two possible fixes:
Whichever road we go, I think there may be another function or two that it should also be applied to.
A long while ago, I think I either suggested or changed the code for routines so that they're methods on Global. A downside here is that from a C perspective, they take a reference to the Global singleton, which makes them harder to call from C/C++.
Probably lots of ways to fix which don't really cost anything.
Try compiling some Rogue code into a directory for which you don't have permissions. It says, e.g., that it wrote the .cpp, but there's no .cpp. I'd guess the same thing happens if you just open a file and try writing into it. Not sure what the exact best behavior here is. Probably just an exception when attempting to open the file. But almost surely it's not just silent failure.
I can take a look at this in a week or two if I'm not beaten to it.
There's an issue with the boehm-typed GC mode.
Abe pointed out that CPPWriter writes what should be the gc_alloc_type field, but that NativeCPP.cpp never reads it.
This looks like I just forgot to commit the relevant line.
As far as boehm-typed goes, I think things should still "work"... it just always falls back to gc_alloc_type 0, which should generally/always be okay. So you don't get any typing, and it ends up basically like the normal boehm mode.
But it seems like this will throw off where the introspection data is, and NativeCPP will get it wrong which could lead to very bad things when trying to use introspection on code built for boehm-typed.
The fix should be as simple as reading into gc_alloc_type in NativeCPP.cpp at the proper place #if ROGUE_GC_MODE_BOEHM_TYPED.
If a compound XYZ
has this property definition:
PROPERTIES
z = 1 : Int32
Then z
will be initialized to 1 in these lines:
PROPERTIES
point = XYZ()
...
local point = XYZ()
but not in these lines:
PROPERTIES
point : XYZ
...
local point : XYZ
Consider initializing compounds as default locals, properties, and global properties. There are two different mechanisms that would need to be changed.
Adding the initializations to the default constructor of the C++ struct should take care of local and global property declarations.
Because objects start out as a zeroed chunk of memory that is cast to a C++ struct on property access, here we need to modify each class's init_object() method to explicitly set each property compound to a new default struct.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.