Appearance
Frequently Asked Questions
Q: What platforms are supported by Dorpn?
A: Dorpn compiler binaries are available natively for Windows. Mobile editing is supported via a separate custom Android code editor app available in its dedicated repository.
Q: Why is the Dorpn compiler source code closed?
A: The compiler source code remains closed-source until version 1.0 or until the language becomes self-hosted to ensure stability and unified documentation during early development.
Q: How do I update my Dorpn installation on Windows?
A: Download the newest installer from the official GitHub Releases page and run it. It replaces your existing installation. Dorpn does not have a built-in --upgrade command.
Q: What toolchain dependencies are needed before compiling?
A: Depending on your targeted compilation backend, your system must have:
- C Backend: A C compiler installed and added to your system
PATH(clang,gccorcc; auto-detected in that order, or set theDORPN_CCenvironment variable to choose one). - JavaScript Backend: Node.js and npm installed to execute transpiled scripts.
bash
# Verify C compiler installation
gcc --version
# Verify JavaScript runtime installation
node -vQ: How do I compile and run a Dorpn program?
A: Pass your .dpn file to the executable. Use --run to compile and execute immediately.
bash
# Compile and run
dorpn hello.dpn --runQ: What happens to intermediate C and JS files generated during build?
A: Intermediate C files are automatically deleted after compilation unless you pass the --keep-c flag. Intermediate JS files are always retained and must be manually removed.
bash
# Preserve intermediate generated C code
dorpn program.dpn --keep-cQ: What are the differences between tag, imm, and Const?
A: tag declares mutable variables, imm creates runtime-initialized immutable variables, and Const defines strict compile-time constants.
dpn
tag counter = 0
counter = counter + 1
imm username = ask("Enter name: ")
# username = "New_Name" --> Compile-time error!
Const MAX_LIMIT = 100For complete scoping details, see Variables.
Q: How do I handle program termination and runtime errors?
A: Use panic("message") to abort with an error, finish() to exit successfully with code 0, or error_out(code) to exit with a non-zero code.
dpn
if age < 0:
panic("Age cannot be negative")
if completed:
finish()Q: How do I convert data between different types?
A: Dorpn does not support implicit type coercion. Use explicit conversion methods like .asInt(), .asFloat(), .asString(), .asInt32(), or .asFloat32().
dpn
tag input = "100"
tag count = input.asInt()
tag f_val = count.asFloat()For details, see Types and Built-in Methods.
Q: What causes a C compiler error or "node: command not found"?
A: This means the C backend compiler or the Node.js runtime required for your targeted backend is not installed or not added to your system PATH. The C compiler is auto-detected (clang first, then gcc, then cc), or you can choose one with the DORPN_CC environment variable. Installing the missing dependency resolves the issue.
- If you encounter any issues, bugs, or questions that aren't covered in this FAQ, feel free to join our official Discord server.You can share your queries, get help from our growing community, and stay updated on the latest development progress directly.