Welcome to the Pluk language compiler wiki!
Go ahead and edit it.
Learn more about Pluk
What is pluk
Pluk is a programming language and the compiler.
- looks and feels alot like c# and java.
- compiles the source directly to binary.
- works (for me) on x86 Windows and x86/x86_64 Linux, let me know if you want to try another platform.
- interfaces with c, clumsily
- uses type inference to shorten code
- checks Nullness constraints
- uses something called WideReferences to remove the need for boxing ints
- Garbage collection Garbage collection makes memory management easier. You do not need to make sure memory you use is freed when no longer used. The garbage collector takes care of that.
- High abstraction It is easy to create a high level of abstraction through the use of interfaces and subclasses. For example, you can expect a List<T> in a method and let the user decide whether they want to give you an ArrayList or a LinkedList.
- Type-safety Pluk is type-safe, which means it can catch many aliasing errors at compile-time.
- Null-safety In Pluk variables will not contain a null value unless you mark the type with a '?'.
- Modulair No need for header files.
Adn not the weaksauce stuff java has either.
new T()works for example. Templates use the syntax of the parser so no unreadable error messages like c++. Duck typing on generic typed fields can be used to support a wider range of possabilies then are possible in java and C#.
- Operator overloading
- Multiple inheritence Unlike c++ pluk does not contain multiple instances of a basetype if it is inherited through multiple other basetypes. When ambiguity of inherited implementation occurs it is required to override that part and make it explicit.
- Wide references This is a bit of lowlevel magic, but the power it gives allows for ints to be proper objects, but not use dynamic allocation.
- Why not ?
With thanks to Pippijn van Steenhoven
Pluk is buildable on both Windows and Linux.
To build plukc you need:
- gnu make
- mono (c
#2.0) (and assorted libraries)
It is possile to make a usershell only install:
> mkdir -p ~/local > mkdir -p ~/hg > cd ~/hg > hg clone http://bitbucket.org/bartwe/plukc > cd plukc > ./configure --prefix=~/local --local # follow the export instructions by adding those lines to .bashrc or .bash_profile if you like. > make > make install > make test
After restarting the shell you should now have the
plukc tool and can compile plug programs and run them.
To build plukc you need:
- Visual Studio Express 2008 (2005 might also still work)
The other pluk language(s)
There is atleast one other language and compiler with this name: pluk.sf.net It is a precursor of this incarnation of pluk.
Pluk can be profiled using valgrind (callgrind) and KCachegrind.
This wiki uses the Creole syntax, and is fully compatible with the 1.0 specification.
The wiki itself is actually a hg repository, which means you can clone it, edit it locally/offline, add images or any other file type, and push it back to us. It will be live immediately.
Go ahead and try:
$ hg clone http://bitbucket.org/bartwe/plukc/wiki/
Wiki pages are normal files, with the .wiki extension. You can edit them locally, as well as creating new ones.
You can also highlight snippets of text, we use the excellent Pygments library.