My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
Introduction  
Home page for Kitsch project. Lists links and contains a ChangeLog
Updated Feb 19, 2009 by apangb...@gmail.com

Kitsch

Kitsch is a programming language developed by Zach Busser and Andrew Pangborn. This wiki contains documentation for users of the language, as well as some insight into the thought processes behind developing it.

Contents

Change Log

Version 0.6

  • Added arrays to the language.
  • Added corresponding int, string, bool types
  • Added builtin functions that get compiled into all Kitsch programs. These live in src\builtins\memory.k, and include functions such as malloc, copyIntArray, printIntArray. The only built-in meant to be called by user-code is the len() function for determining an array's length. The print functions get invoked automatically whenever you do print myArrayVar, similarly the copy functions get invoked automatically whenever the array has to moved due to being expanded in size.
  • Arrays are dynamically allocated on the heap (which lives at the top of the program address space). At this point there is no form of garbage collection. Any memory allocated is wasted for the life-time of the program. Smarter memory management is planned in a future release.
  • Fixed an EOL bug with function return statements that occured on Windows platforms

Version 0.5

  • MANY large changes to the language and syntax were made in this release. Please read carefully and consult the Syntax page. Code certainly will not be backward compatible, but then again we're not at 1.0 yet!
  • Statements no longer require a semi-colon, they can be terminated by a newline. This is in line with our attempt to mimic some of Python's syntax
  • Variables are no longer declared, types are inferred
  • Type casting was added to support conversion between types (VM support for this was available in 0.4)
  • Functions were added. Functions can be recursive, however functions can only be declared at the global scope; a function cannot be declared in another function. Unfortunately functions are not first-order values, but this is planned for the language in the future - this was part of the reason for removing variable declarations, we did not want to have to declare a 'function' type.
  • if/while blocks no longer create their own scope. There is a global scope, and then functions have an individual scope with each call.
  • Added LOADSP and STORESP instructions to the virtual machine language.
  • LOAD and STORE instructions are now relative to the VMs stack pointer (set with STORESP).

Version 0.4

  • Added 'string' and 'bool' types to the language. Please refer to the Sytax and Language Rules page for more details.
  • Added a type checker
  • Implemented additional machine language instructions for reading, string operations, and type conversion
    • SUBSTR
    • STRADD
    • READINT
    • READBOOL
    • READSTR
    • TOINT
    • TOSTR
    • TOBOOL
  • Removed the READ instruction in favor of the type-specific ones. Old Kitsch programs using READ will have to be re-compiled to be compatible with the new virtual machine
  • Modified the grammar: conditionals can now use any expression that evaluates to a boolean (A boolean variable, a comparison, or a logical combination thereof with 'and'/'or'/'not')
  • Strings support concatenation with other strings, multiplication with integers, and slicing/substringing
  • Fixed a bug where the scope of a while loop was not getting reset after each iteration (this effectively meant you could not declare any variables inside a loop because it would claim it was being redeclared)

Version 0.3

  • Implemented a language compiler. Compiles to a custom machine language.
  • Implemented a machine language interpreter / virtual machine for code generated by the compiler
  • Please see Compiler and Machine Language and Virtual Machine for more details.

Version 0.2

  • Added 'print' and 'read' to the language
  • Implemented a language interpreter
  • Adding a regression testing system. The script and tests can be found here

Version 0.1

  • Supports only integers
  • Declare local or global variables
  • if/elif/else/fi conditional control
  • while/elihw looping
  • operator preference
Powered by Google Project Hosting