Currently Carp is in early public releases, it may not be the most stable language for large projects, please report any issues through the GitHub issues page.
What's new in version 1.0.6? ...
This version was based on making the language more debuggable and fixing some small issues.
- Fixed issue with the
*=
compound operator not being recognized in some circumstances by the parser - Added stacktraces to errors, making it easier to debug, it now shows the line number, line content, source (e.g interpreter or file name) for each level of the stack to the error:
UnusedBranch: Unused expression branch, side-effects are not allowed on PropertyExpressionContext ---> path-to-thing\thing.carp 5 | x.do ---> path-to-thing\thing.carp 8 | fail(1)
- Math package no longer rounds power and square root functions to full integers
- Deleted more todo items from the codebase
- Stacktrace now shows an out of bounds message if the current stackframe is not able to be found
- Partially fixed func casting
- Added
marshal.id
method that provides a unique identifier for a given object
- Implicit, but not stupid type coercion
- Open source (obviously)
- Import directly from GitHub
- Lots of short-hands
- Large collection of built-in types
- Statically typed and structured errors
- Can be written as scripts, projects, packages or real-time with the REPL
-
Ensure dotnet is installed
-
Run the following to install it from NuGet
$ dotnet tool install --global Carp
-
Check carp is installed
$ carp --version
-
It is recommended to use Visual Studio Code with the Carp Language extension to aide with development
Create a new file, give it the .carp extension, and write the following code:
import std.io
IO.println('Hello, world!')
Now run the file with the Carp interpreter:
$ carp hello.carp
You should see the output Hello, world!
printed to the console.
Alternatively you can go file-less and use the REPL:
carp
: import std.io
:
: IO.println('Hello, world!')
For more documentation refer to Docs
As the language is still very early, contributions would be very much appricated. Some ideas include; more standard libraries, bugfixes or new features.