Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STD: Recreate OS dependant handlers. #9

Open
TheNachoBIT opened this issue Dec 31, 2022 · 1 comment
Open

STD: Recreate OS dependant handlers. #9

TheNachoBIT opened this issue Dec 31, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@TheNachoBIT
Copy link
Contributor

TheNachoBIT commented Dec 31, 2022

Its mostly easy to implement, although it needs this enhancement first to make it possible: https://github.com/nucleus-lang/nucleus/issues/5

The idea is to have a global struct called STDHandler that can act as a platform-agnostic data handler.

In there you will be able to see all of the parameters you need for each OS that this programming language will support.

Although making it 100% independant from OS stuff is hard on Windows because all of the handlers are API-dependant instead of running through a file system like Linux does. So for Windows you gotta need a C++ include from Windows.h

But despite all of this, we can make it independant from C++'s STD and use whatever API the OS currently has.

struct STDHandler
{
    # Windows.
    var WindowsHND: int = -11;

    # Linux
    var LinuxHND: string = "path/to/stdout/file";
};
@TheNachoBIT TheNachoBIT self-assigned this Dec 31, 2022
@TheNachoBIT TheNachoBIT added the enhancement New feature or request label Dec 31, 2022
@TheNachoBIT
Copy link
Contributor Author

TheNachoBIT commented Jan 2, 2023

Issue https://github.com/nucleus-lang/nucleus/issues/5 and https://github.com/nucleus-lang/nucleus/issues/6 are now done!

Although one thing i forgot it needed is missing, and its the ability to include files from other programming languages inside Nucleus without the need of Clang externally or through a C++ file: https://github.com/nucleus-lang/nucleus/issues/12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant