<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8756168285763583941</id><updated>2012-02-16T13:48:24.242-08:00</updated><title type='text'>Crack Language News</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>13</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-6649968920720268077</id><published>2012-01-13T10:09:00.000-08:00</published><updated>2012-01-13T10:09:12.250-08:00</updated><title type='text'>Crack 0.6.1 released</title><content type='html'>I'm happy to announce the release of Crack 0.6.1. &amp;nbsp;The primary feature of this release is that we've ported the system to LLVM 3.0. &amp;nbsp;There were also a few bug fixes. &amp;nbsp;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-6649968920720268077?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/6649968920720268077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2012/01/crack-061-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6649968920720268077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6649968920720268077'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2012/01/crack-061-released.html' title='Crack 0.6.1 released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-2442202392827697136</id><published>2011-12-01T13:07:00.000-08:00</published><updated>2011-12-01T13:07:46.876-08:00</updated><title type='text'>Crack 0.6 released</title><content type='html'>I'm pleased to announce the release of Crack version 0.6. &amp;nbsp;This will almost certainly be the last major release prior to 1.0 (we will release a 0.6.1 version shortly that builds against LLVM 3.0 and may contain bug fixes)&lt;br /&gt;&lt;br /&gt;From the release notes:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Implemented const folding for integer and float operations.&lt;/li&gt;&lt;li&gt;Added support for injecting crack function body code from an extension.&lt;/li&gt;&lt;li&gt;Added the foundations of support for module caching.&lt;/li&gt;&lt;li&gt;Added functors.&lt;/li&gt;&lt;li&gt;Added an 'ascii' module supporting functionality specific to ASCII&amp;nbsp;data.&lt;/li&gt;&lt;li&gt;Added a module for dealing with numeric arrays.&lt;/li&gt;&lt;li&gt;Migrated modules out of crack.exp, removed obsolete modules.&lt;/li&gt;&lt;li&gt;Implemented "const" variables.&lt;/li&gt;&lt;li&gt;Implemented access protection.&lt;/li&gt;&lt;li&gt;&amp;nbsp;Implemented abstract methods.&lt;/li&gt;&lt;li&gt;Converted all unit tests to "screen"&lt;/li&gt;&lt;li&gt;Lots of bug fixes and small enhancements.&lt;/li&gt;&lt;/ul&gt;So download, compile and enjoy!&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-2442202392827697136?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/2442202392827697136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/12/crack-06-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2442202392827697136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2442202392827697136'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/12/crack-06-released.html' title='Crack 0.6 released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-6684624272172771509</id><published>2011-08-24T11:07:00.000-07:00</published><updated>2011-08-24T11:07:58.699-07:00</updated><title type='text'>screen: a new test suite for crack</title><content type='html'>In the current trunk, and due for inclusion in the next release, is our new test suite "screen".&lt;br /&gt;&lt;br /&gt;It replaces the original system built on a simple bash script. The new test suite offers several advantages:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;It is template based, and individual tests all have their own templates&lt;/li&gt;&lt;li&gt;It can skip tests based on functionality available on the host system (e.g. skip SDL tests if you don't have that extension)&lt;/li&gt;&lt;li&gt;It runs multiple tests concurrently (see the -j option). The default concurrency is 4.&lt;/li&gt;&lt;li&gt;It can test one or more builders. Currently this means it can run the tests through JIT, Native AOT, or both.&lt;/li&gt;&lt;li&gt;It can compare expected results literally or to a regex&lt;/li&gt;&lt;li&gt;It can test for explicit stderr output (e.g. parse errors)&lt;/li&gt;&lt;li&gt;It can stop on test failure, and show expected vs actual results&lt;/li&gt;&lt;li&gt;It can run a single test template, or recursively import a directory of them&lt;/li&gt;&lt;li&gt;It's written in crack :)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;The main test suite is run via "make check", as usual. You can find the source to screen, as well as the test templates themselves, in the screen/ directory. For more advanced testing (including running individual tests), run crack screen.crk --help&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-6684624272172771509?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/6684624272172771509/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/08/screen-new-test-suite-for-crack.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6684624272172771509'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6684624272172771509'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/08/screen-new-test-suite-for-crack.html' title='screen: a new test suite for crack'/><author><name>Shannon Weyrick</name><uri>http://www.blogger.com/profile/10122571202251047919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://2.bp.blogspot.com/_Pa4ZpkLYRjg/S00af7Lvb0I/AAAAAAAAAA8/C9Mw2_lFuUM/S220/me-2010.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-1461191843781864499</id><published>2011-07-18T09:50:00.001-07:00</published><updated>2011-07-18T09:50:56.926-07:00</updated><title type='text'>Crack 0.5 Released</title><content type='html'>We're pleased to announce the release of Crack 0.5.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The  main new feature of 0.5 is Generics.&amp;nbsp; Generics in Crack are somewhere  between Java generics and C++ templates.&amp;nbsp; Like C++ templates, they are  essentially generated by re-compiling the original code with parameter  substitution.&amp;nbsp; Unlike C++ templates, parameters are limited to types.&amp;nbsp;  Also, only generic classes are supported at this time.&lt;br /&gt;&lt;br /&gt;Other notable changes in 0.5:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Support for first class functions and basic functors.&amp;nbsp; Functions  now have types, and user defined classed may now implement an "oper  call" method in order to make instances of the class callable using  function-call syntax.&lt;/li&gt;&lt;li&gt;Implemented Platform Dependent Numeric Types (see &lt;a href="http://code.google.com/p/crack-language/wiki/PlatformDependentNumericTypes"&gt;http://code.google.com/p/crack-language/wiki/PlatformDependentNumericTypes&lt;/a&gt;) and reworked the numeric type system to conform to the specification.&lt;/li&gt;&lt;li&gt;Added a command line parsing module.&lt;/li&gt;&lt;li&gt;Converted all of the containers to generics, and added a HashMap generic.&lt;/li&gt;&lt;li&gt;Added some date manipulation code.&lt;/li&gt;&lt;li&gt;Refactored the cmake build.&lt;/li&gt;&lt;li&gt;Added the "typeof()" operator.&lt;/li&gt;&lt;li&gt;Added full support for "oper to" conversions.&lt;/li&gt;&lt;li&gt;Enhancements to extension generation for class methods, constructors,&amp;nbsp; and C function name specification.&lt;/li&gt;&lt;/ul&gt;This might be the last release before 1.0.&amp;nbsp; If you're interested in the  language, we encourage you to download it, try it out and give us  feedback.&amp;nbsp; Once 1.0 is out, all changes will have to be backwards  compatible until 2.0.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-1461191843781864499?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/1461191843781864499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/07/crack-05-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/1461191843781864499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/1461191843781864499'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/07/crack-05-released.html' title='Crack 0.5 Released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-2659458865834428412</id><published>2011-05-03T16:05:00.000-07:00</published><updated>2011-05-03T16:05:11.570-07:00</updated><title type='text'>Crack 0.4 Released</title><content type='html'>We are pleased to announce the release of Crack 0.4.&amp;nbsp; The two major changes for this version are Exceptions (ala C++, Java and Python) and Ahead-of-time compiling (so you can now run "crackc" on your script and produce a nice, ready to run executable in addition to the traditional scripty mode).&lt;br /&gt;&lt;br /&gt;There are also a few new smaller features:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Sequence initializers ("array[int] a = [1, 2, 3]" or "array[int]![1, 2, 3]")&lt;/li&gt;&lt;li&gt;Improved string interpolation (added calls to enter() and leave() methods at the beginning and ending of each expression, allowing us to do things like "String s = FStr() `this is $var`;")&lt;/li&gt;&lt;li&gt;Byte and integer string constants ("b'A' == 65", "i'\001\0' == 256")&lt;/li&gt;&lt;li&gt;A no-op @encoding annotation allowing scripts to identify their encoding for other tools.&lt;/li&gt;&lt;/ul&gt;This release has been a long time coming, we hope you like it.&amp;nbsp;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-2659458865834428412?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/2659458865834428412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/05/crack-04-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2659458865834428412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2659458865834428412'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/05/crack-04-released.html' title='Crack 0.4 Released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-2423404001087818963</id><published>2011-04-01T05:43:00.000-07:00</published><updated>2011-04-01T05:43:05.353-07:00</updated><title type='text'>Exciting New Changes</title><content type='html'>During the time that we have been developing Crack, we have gotten a lot of &lt;br /&gt;really good constructive criticism on the language.&amp;nbsp; This criticism has not &lt;br /&gt;fallen upon deaf ears, and I am happy to announce some exciting changes coming &lt;br /&gt;to the next version of Crack.&lt;br /&gt;&lt;br /&gt;For one thing, it has been pointed out that naming the language after an &lt;br /&gt;illicit drug that ruins people's lives may not have been the best decision.&amp;nbsp; &lt;br /&gt;It's also hard to find information on the language by doing a search for &lt;br /&gt;"crack" and the name is already overloaded in software technology to refer to &lt;br /&gt;password cracking tools.&lt;br /&gt;&lt;br /&gt;In response, we are changing the name of the language to "&lt;b&gt;MINARA`&lt;/b&gt;"&amp;nbsp; This is an &lt;br /&gt;enormously clever abbreviation of "Minara Is Not A Recursive Acronym`"&amp;nbsp; &lt;br /&gt;Unfortunately, this name is already in use by an open-source vector drawing &lt;br /&gt;tool (see &lt;a href="http://minara.sourceforge.net/"&gt;http://minara.sourceforge.net/&lt;/a&gt;) so we have added the back-tick &lt;br /&gt;character to the end of our name for purposes of disambiguation.&lt;br /&gt;&lt;br /&gt;Another long-standing criticism of Crack (excuse me, &lt;b&gt;MINARA`&lt;/b&gt;) has been that &lt;br /&gt;there are already an abundance of C-like languages.&amp;nbsp; We acknowledge this, and &lt;br /&gt;as such we are changing the entire syntax of the language.&amp;nbsp; As of the next &lt;br /&gt;release, the language will instead adopt a Lisp-like syntax.&lt;br /&gt;&lt;br /&gt;Unfortunately, Lisp is impossible for humans to read and is also more targeted &lt;br /&gt;towards interpretation than compilation.&amp;nbsp; So &lt;b&gt;MINARA`&lt;/b&gt; will adopt the following &lt;br /&gt;syntactic and semantic conventions:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The basic lisp form of a function followed by its arguments will be preserved.&amp;nbsp; A &lt;b&gt;MINARA`&lt;/b&gt; script will be a a list of such functional forms.&lt;/li&gt;&lt;li&gt;The resulting data structure is a nested list that can be thought of as the Abstract Syntax Tree for a &lt;b&gt;MINARA`&lt;/b&gt; module.&lt;/li&gt;&lt;li&gt;Similar to Lisp, there are macros that are forms executed at compile time.&amp;nbsp; These are free to interpret any of the special types of lists any way they want, but they are applied after the processing of the comma and semicolon syntactic sugar defined below.&amp;nbsp; All of the basic statements (if/else, while, for, class...) are implemented as macros.&lt;/li&gt;&lt;li&gt;The following special syntactic conventions apply:&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Unlike Lisp, which has a single parenthesized list type, &lt;b&gt;MINARA`&lt;/b&gt; has four types of lists: a-lists, b-lists, c-lists and p-lists.&lt;/li&gt;&lt;li&gt;p-lists are the normal parenthesized Lisp function calls&lt;/li&gt;&lt;li&gt;A list enclosed in curly braces is like a quoted list in Lisp: it is not evaluated, it is a value.&amp;nbsp; Example: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(print {1 2 3})&lt;/span&gt;. A macro may choose to compile the contents of a c-list, which makes them very suitable for statement blocks.&amp;nbsp; This is a c-list (a curly bracketed list).&lt;/li&gt;&lt;li&gt;The semicolon is syntactic sugar that is equivalent to enclosing all elements to the last semicolon or the beginning of the enclosing list in parenthesis.&amp;nbsp; For example, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{print "hello"; print "world";}&lt;/span&gt;&amp;nbsp; is equivalent to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;{(print "hello") (print "world")}&lt;/span&gt;&amp;nbsp; The terminating semicolon is optional: if at least one semicolon is in the enclosing list, the entire enclosing list is split up into p-lists.&lt;/li&gt;&lt;li&gt;The square brackets are equivalent to a call of the "expr" function in the current context.&amp;nbsp; "expr" defaults to a macro that converts its arguments from a more traditional, infix style to the canonical, prefix list style.&amp;nbsp; Example: &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;[a = b * 2 + 3]&lt;/span&gt; is equivalent to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(expr b * 2 + 3) &lt;/span&gt;which would normally be transformed at compile time to&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; (= a ((* b 2) 3))&lt;/span&gt;&amp;nbsp; This is a b-list (a "bracketed list")&lt;/li&gt;&lt;li&gt;The comma is similar to the semicolon.&amp;nbsp; The comma aggregates all elements up to the previous comma with the exception of the first element in the enclosing list into a b-list.&amp;nbsp; For example, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(print 'value is', 1 + 2) &lt;/span&gt;is equivalant to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(print ['value is'] [1 + 2])&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(print (expr 'value is') (expr 1 + 2))&lt;/span&gt; or &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(print 'value is' (+ 1 2))&lt;/span&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;an element followed by a period and an identifier is equivalent to a call of the "attrex" function with the items before and after the period passed as arguments (like "expr", "attrex" is normally implemented as a macro which expands to various kinds of low-level attribute and member function access).&amp;nbsp; So &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;(foo.setBar 'test')&lt;/span&gt; would be equivalent to &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;((attrex foo setBar) 'test')&lt;/span&gt;.&amp;nbsp; This is an a-list ("attribute list")&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;br /&gt;All of syntactic constructs in &lt;b&gt;MINARA`&lt;/b&gt; will be implemented as macros.&amp;nbsp; Here's an example of a class definition with some instance variables and methods:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Defined using a "class" macro, note that the base classes&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; # (Object and &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Named) must be specified in a list&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class Person : (Object Named) {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # instance variable definitions.&amp;nbsp; Since we have to start&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # these with the &lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;name "var" we adopt pascal style &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var name : String, favorite_color : Color = Color.red;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # the "duh" keyword in oper init indicates that arguments&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # map&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt; trivially to their corresponding attributes.&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oper init(name; favorite_flavor) duh;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # a couple of explicit implementation of abstract&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # functions from Named&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implement setName(name: String) { name = newName; };&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; implement getName() returns String { return name; };&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def isCompatibleWith(other: Person) returns bool {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if [other.favorite_color == favorite_color] {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; def clone() returns Person {&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (Person.new name favorite_color); &lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;" /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We think that everyone will appreciate these new changes to the language, and &lt;br /&gt;apologize for our earlier mistakes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-2423404001087818963?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/2423404001087818963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/04/exciting-new-changes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2423404001087818963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2423404001087818963'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/04/exciting-new-changes.html' title='Exciting New Changes'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-6427486127759023867</id><published>2011-03-13T11:45:00.000-07:00</published><updated>2011-03-13T11:45:03.941-07:00</updated><title type='text'>Platform Dependent Versus Universal Numeric Types</title><content type='html'>Implementing numeric types in a programming language is surprisingly difficult. &amp;nbsp;At this time, Crack supports Universal Numeric Types (UNTs - for example int32, uint64, byte) and Platform Dependant Numeric Types (PDNTs - int, uint, float). &amp;nbsp;The PDNT names are just aliases for the corresponding UNTs in the target compiler - so for example, if the C++ compiler you use to build crack has a 32 bit int, Crack's "int" will be an alias for "int32". &amp;nbsp;Additionally, the philosophy behind implicit type conversions is to allow them only if they do not result in loss of precision.&lt;br /&gt;&lt;br /&gt;This overall approach is not without its problems:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;It makes Crack code platform-dependent because there are expressions that will work on one platform but will result in a compile-time error on another platform. &amp;nbsp;For example, "int32 i = int(v);" works on platforms with 32 bit integers, but breaks on platforms with 64 bit integers.&lt;/li&gt;&lt;li&gt;You end up writing a lot of explicit type conversions in places where you really don't care that much (like when using a signed integer value for a function argument of type "uint"). &amp;nbsp;For a scripting language valuing terse syntax, this is kind of lame.&lt;/li&gt;&lt;/ul&gt;So after some discussion on IRC, we've decided to change our approach a little bit. &amp;nbsp;The general philosophy now is that you should use a PDNT in situations where you care about performance or interoperability with C/C++ code and you should use a UNT in situations where you care about precision. &amp;nbsp;The manifestations of this decision are:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;PDNTs will be promiscuous: any numeric type will implicitly convert to any PDNT type. &amp;nbsp;So "int i = float64(v);" will be perfectly legal on any platform.&lt;/li&gt;&lt;li&gt;There will be max-size, min-size assumptions about PDNTs. &amp;nbsp;In particular, they will all be at least 32 bits but no more than 64 bits in size. &amp;nbsp;Like everything else in the language, these assumptions are subject to change across major versions of the language.&lt;/li&gt;&lt;li&gt;UNTs will continue to apply the strict conversion rules. &amp;nbsp;However, because of the min-size/max-size assumptions, certain conversions from PDNTs will always be legal. &amp;nbsp;An example of this is "int64 i = int(v)".&lt;/li&gt;&lt;/ul&gt;There's still a platform dependency problem here because expressions like "int i = int64(v);" will vary in behavior at runtime depending on the size of an integer on the platform. &amp;nbsp;So we've essentially converted a compile-time portability issue to a runtime portability issue :-/.&lt;br /&gt;&lt;br /&gt;To mitigate this effect, there will be a warning flag that allows you to identify the places where you could potentially lose precision with something like this. &amp;nbsp;We are also considering allowing the generation of a runtime check that would throw an exception if specific values will be truncated.&lt;br /&gt;&lt;br /&gt;This change will probably go into the language in Crack 0.5. &amp;nbsp;For anyone interested, the formal proposal is at&amp;nbsp;&lt;a href="http://code.google.com/p/crack-language/wiki/PlatformDependentNumericTypes"&gt;http://code.google.com/p/crack-language/wiki/PlatformDependentNumericTypes&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-6427486127759023867?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/6427486127759023867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/03/platform-dependent-versus-universal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6427486127759023867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/6427486127759023867'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/03/platform-dependent-versus-universal.html' title='Platform Dependent Versus Universal Numeric Types'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-3233508166247022883</id><published>2011-03-08T17:32:00.000-08:00</published><updated>2011-03-08T17:32:31.728-08:00</updated><title type='text'>AOT for Crack 0.4</title><content type='html'>One of the trademarks of a scripting language is of course:&amp;nbsp;&lt;i&gt;instant results&lt;/i&gt;. You edit your script and execute it immediately, skipping the traditional compile step with its associated build files, etc.&lt;br /&gt;&lt;br /&gt;True to scripting language ideals, Crack executes scripts immediately using&amp;nbsp;LLVM's excellent Just In Time (JIT) compiler to handle the heavywork of converting the compiled crack code to native instructions so that it can run both immediately and as fast as possible.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;weyrick@mozek:~/crack$ cat hello.crk&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;import crack.io cout;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;cout `hello JIT\n`;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;weyrick@mozek:~/crack$ crack hello.crk&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;hello JIT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;But what if you find yourself wishing for a native binary, just this once? You know, something like this instead:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;weyrick@mozek:~/crack$ crackc hello.crk&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;weyrick@mozek:~/crack$ ./hello&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;hello JIT&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;What's a scripter to do? Well with Crack at least, you'll be in luck. Crack 0.4 will include an Ahead Of Time (AOT) mode which will create native binaries just like the example above. All imported crack modules will be included in the binary (something like a static link of the crack modules, although the binary itself is not statically linked).&amp;nbsp;The annotation system (and macros) work for AOT binaries.&amp;nbsp;We also have plans for full DWARF debugging information, which will allow source level debugging with tools like gdb.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Crack 0.4 is tentatively scheduled for release about the same time as LLVM 2.9 (beginning of April).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-3233508166247022883?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/3233508166247022883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/03/aot-for-crack-04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/3233508166247022883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/3233508166247022883'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/03/aot-for-crack-04.html' title='AOT for Crack 0.4'/><author><name>Shannon Weyrick</name><uri>http://www.blogger.com/profile/10122571202251047919</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='30' height='32' src='http://2.bp.blogspot.com/_Pa4ZpkLYRjg/S00af7Lvb0I/AAAAAAAAAA8/C9Mw2_lFuUM/S220/me-2010.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-5504194923593198871</id><published>2011-01-14T14:59:00.000-08:00</published><updated>2011-01-14T14:59:42.602-08:00</updated><title type='text'>Crack 0.3 released</title><content type='html'>We are pleased to announce the release of crack 0.3. &amp;nbsp;The new version features the following enhancements:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Added support for extensions&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Added a module to that can generate bindings for many C APIs&lt;/li&gt;&lt;li&gt;converted the runtime, GTK and PCRE modules to use the extension API&lt;/li&gt;&lt;li&gt;added (undocumented) support for SDL and OpenGL&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Added the annotations subsystem&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Used annotations to implement macros&lt;/li&gt;&lt;li&gt;Added the @static, @final, @FILE and @LINE built-in annotations&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Added the math module&lt;/li&gt;&lt;li&gt;Added macro based generic containers.&lt;/li&gt;&lt;li&gt;Added the "for" statement (both C and iterator styles, so "for (x :in collection)" now works)&lt;/li&gt;&lt;li&gt;Aggregate type variables now default to null if no initializer is given.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;That last item means that if you actually have written some crack code, we've probably broken it. &amp;nbsp;See the appendix of the manual for info on how to deal :-)&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Dig in and send us feedback!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-5504194923593198871?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/5504194923593198871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2011/01/crack-03-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/5504194923593198871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/5504194923593198871'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2011/01/crack-03-released.html' title='Crack 0.3 released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-8034806648556030949</id><published>2010-12-12T08:11:00.000-08:00</published><updated>2010-12-12T09:41:27.463-08:00</updated><title type='text'>Annotations</title><content type='html'>An exciting new feature for 0.3 (currently working in the latest repository code) is "annotations." &amp;nbsp;Annotations allow you to extend the compiler with the language. &amp;nbsp;For example if I have module A:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;import crack.compiler CrackContext;&lt;br /&gt;&lt;br /&gt;void myann(CrackContext ctx) {&lt;br /&gt;    ctx.inject('import crack.io cout; cout `hello world`;'.buffer);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;And module B:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;@import A myann;&lt;br /&gt;@myann&lt;br /&gt;&lt;/pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;The code injected from &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;myann()&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;would be injected into the token stream of module B.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;There are a number of things that you can do from an annotation, you can read tokens, put them back, set parser callbacks, and create other annotations. &amp;nbsp;You can't yet do introspection (examine classes or functions or other compile-time objects) but that feature will be coming.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;We currently use annotations to implement compiler-level macros:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre&gt;import crack.exp.ann define;&lt;br /&gt;&lt;br /&gt;@define attr(type, name) {&lt;br /&gt;    type name;&lt;br /&gt;    type get_$$name() { return name; }&lt;br /&gt;    void set_$$name(type newVal) { name = newVal; }&lt;br /&gt;} &lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;class Foo {&lt;/pre&gt;&lt;pre&gt;@attr(String, bar)&lt;/pre&gt;&lt;pre&gt;}&lt;/pre&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;To use a macro like this from another module, you need to export it:&lt;br /&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;import crack.exp.ann define, export, exporter;&lt;br /&gt;@exporter  # import all of the stuff we need to define exporter functions&lt;br /&gt;&lt;br /&gt;@define attr(type, name) {&lt;br /&gt;    type name;&lt;br /&gt;    type get_$$name() { return name; }&lt;br /&gt;    void set_$$name(type newVal) { name = newVal; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@export attr&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;From another module we can import the macro as an annotation:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;@import attrmod attr;&lt;br /&gt;&lt;br /&gt;class Foo {&lt;br /&gt;    @attr(String, bar);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-8034806648556030949?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/8034806648556030949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2010/12/annotations.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/8034806648556030949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/8034806648556030949'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2010/12/annotations.html' title='Annotations'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-2690359866058953510</id><published>2010-11-16T08:42:00.000-08:00</published><updated>2010-11-16T08:42:56.649-08:00</updated><title type='text'>Extension API</title><content type='html'>Crack currently has a bona-fide extension API in the trunk. &amp;nbsp;See&amp;nbsp;&lt;a href="http://code.google.com/p/crack-language/wiki/ModuleExtensionAPI"&gt;http://code.google.com/p/crack-language/wiki/ModuleExtensionAPI&lt;/a&gt;&amp;nbsp;for details.&lt;br /&gt;&lt;br /&gt;The short story is: you can now define functions, types and methods from a shared library, and then import that library as if it were a normal Crack module.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-2690359866058953510?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/2690359866058953510/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2010/11/extension-api.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2690359866058953510'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2690359866058953510'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2010/11/extension-api.html' title='Extension API'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-2704110194871420929</id><published>2010-10-06T15:34:00.000-07:00</published><updated>2010-10-06T15:34:54.010-07:00</updated><title type='text'>Crack 0.2.1 Released</title><content type='html'>In the spirit of "release early, release often," We've just released crack 0.2.1.&amp;nbsp; This release is mostly 0.2 with the changes necessary for LLVM 2.8.&amp;nbsp; We also fixed the library distribution rule and made a few minor fixes to the documentation.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-2704110194871420929?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/2704110194871420929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2010/10/crack-021-released.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2704110194871420929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/2704110194871420929'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2010/10/crack-021-released.html' title='Crack 0.2.1 Released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8756168285763583941.post-8739678931700101028</id><published>2010-10-03T08:42:00.002-07:00</published><updated>2010-10-03T08:42:36.121-07:00</updated><title type='text'>Crack 0.2 Released</title><content type='html'>We're happy to announce the release of Crack 0.2. &amp;nbsp;The main change in this release was under the covers: we refactored some significant portions of the code in the interest of streamlining future development. &amp;nbsp;However, we also fixed a lot of bugs and added a lot of basic enhancements that go a long way towards making Crack a usable language.&lt;br /&gt;&lt;br /&gt;With 0.2, Crack now provides the complete set of C operators. &amp;nbsp;We also added our first map implementation (red-black trees), File IO libraries, and libraries for socket programming.&lt;br /&gt;&lt;br /&gt;So please dig in and let us know what you think!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8756168285763583941-8739678931700101028?l=crack-lang.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crack-lang.blogspot.com/feeds/8739678931700101028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://crack-lang.blogspot.com/2010/10/crack-02-released_03.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/8739678931700101028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8756168285763583941/posts/default/8739678931700101028'/><link rel='alternate' type='text/html' href='http://crack-lang.blogspot.com/2010/10/crack-02-released_03.html' title='Crack 0.2 Released'/><author><name>Michael Muller</name><uri>http://www.blogger.com/profile/07042202216138895039</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
