|
Project Information
Featured
Downloads
Links
|
Slag Name Change, New RepositorySlag has been renamed due to the negative connotations the word has in the United Kingdom. The Slag language is now the Bard language. The Bard code repository can be found here: https://github.com/plasmaworks/bard Final Version: v3.5.0June 18, 2011 - Mercurial Changeset 133Getting StartedMercurialHg clone this repository and then type "gogo" (Windows) or "make" (Mac, Linux) to compile the Slag tools. Add them to your system path as directed. Note that each release is tagged ("hg tags") if you wish to use an exact version. After subsequent "hg pull" updates, type "gogo rebuild" to rebuild the executables. Pre-compiled Windows BinariesDownload slag-...-windows-bin.zip and unzip it to e.g. "C:\slag". Add "C:\slag\bin" to your system PATH. Pre-compiled Mac BinariesDownload slag-...-mac-bin.zip and unzip it to e.g. "/Applications". Add the following line to your ~/.profile: PATH="/Applications/slag/bin:$PATH" Hello WorldUse a text editor to create the following file "hello.slag": class Hello
METHODS
method init
println( "Hello World!" )
endClassIn a terminal/command prompt, type slagc test to compile and slag test to run! Read more about Slag here: http://plasmaworks.com/wiki/index.php/Plasmacore OverviewSlag is an elegant, powerful, and efficient statically-typed, object-oriented language designed to be the high-level language of choice for game engines and frameworks. Light and portable, its virtual machine can be easily integrated with any C++ program. Slag's semantics (nature and purpose of operations) are similar to those of Java and C# while its clear and concise syntax resembles a blend of Java and BASIC. Many languages have attempted to improve programmer efficiency by using minimalistic names, cryptic symbols, and implicit operations while leaving a fundamental problem untouched: that of legacy organizational patterns requiring tedious, repetitive coding. Slag's approach is one of ergonomic simplicity, where simple, explicit commands are paired with the removal of repetitive and redundant operations. Slag offers the following benefits: Ergonomic programmingSimilar to how a garbage-collected language abstracts memory management and allows the programmer to operate at a higher level, Slag abstracts away tedious operations and enables even more sophisticated programming - all the while remaining an efficient, statically-typed language underneath. Why type ArrayList<String> names = new ArrayList<String>(4); when you can type local String[] names(4)? Even with its verbose keywords ("forEach ... endForEach") and Java-style semantics, a typical Slag program is 30% to 60% smaller than its Java equivalent in both lines of code and number of characters typed. A wish list of featuresSlag is a total replacement for C++ and Java within its domain, and as such it was designed with all of the conveniences you'd expect - and more! The language includes: full inheritance support, inline class definitions, aspect-oriented programming, transparent access methods, standardized Reader/Writer I/O architecture, integrated collections, a slew of both new and familiar control structures, true templated types (including lists of primitives), exception handling, easy string formatting, default parameters, and much more. Small, self-contained, and portableFor development: Slag tools have a small footprint are embedded in each project's development directory, meaning that if you download an existing Slag-based project on a new computer, everything you need to compile and run can be already included. For distribution: any standard library calls used in a Slag program are compiled into the output bytecode. Anyone can run a compiled Slag program without having any sort of "Slag language platform" installed. Compiled Slag programs may be run on any platform by porting the C++ virtual machine or by cross-compiling the Slag program to C++ (or potentially any language). Open SourceThe Slag compiler, virtual machine, and standard library as well as the Plasmacore 2D game programming library are freely available in both source and executable form. Slag may be used commercially or non-commercially, either in the creation of standalone programs or as part of other projects. It is available under the terms of the permissive Apache License 2.0, which essentially means use it as you like! |