An experimental drag and drop programming environment intended to be used in teaching children to program. The challange was to create a platform which was enticing to use, powerful and educationally relevant while remaining entirely web based. The language itself is actually a dialect of lisp but that is "by the way" until the student reaches the stage where they are directly working with the source in conjunction with the drag and drop interface.
I was very much influenced by the Scratch project (which is built on top of squeak and thus smalltalk) but wanted to provide an even more generic and yet powerful environment for the user to experiment with. Thus the dialect of lisp which I have created has a lot in common both with the functional paradigm as well as the object oriented and message passing paradigms. On a syntactical level the language looks like s-expressions with keyword parameters ala smalltalk methods. The project is in a beta state currently but further development is underway with the goal being to have it integrated into a school curriculum on a pilot basis within two years.
The motiviation behind lisphp was actually reading the Structure and Interperation of Computer Programming (SICP MIT Press) and finding it difficult to work with the mit scheme REPL. The goal was to implement a scheme which ran ontop of php which met the R5RS specificiation.
The other goal is to provide a usable lisp which gets interpreted into php and thus incurs no penalty in performance. In fact, in many cases the generated code will be faster than the standard php approach because of optimizations and "uglier", yet safe and elegant, code we can generate knowing humans will not have to read it.
;the following scheme will be translated into php
((if (> 6 10) + *) 20 30 40 50)
#php where s_sum and s_mul process n number of args
call_user_func_array(
(6 > 10) ? 's_sum' : 's_mul',
Array( 20, 30, 40, 50));
Provides code analysis and refactoring suggestions based on heuristic analysis of the generated normalized code base. This is very useful when working on large legacy systems which many times have either out of date or non-existant documentation. Sometimes a light in the dark is all a programmer needs. Rahula is the light.
Aside from the reverse-documenting Rahula also provides an object authoring interface which allows yoo to create your object through a GUI in a normalized form which you can then generate as flat files for production.
The goal of this project is to provide a web-based smalltalk esque browser/code-editor which rather than storing the meta-data in an image stores it in a database in normal form. This allows for greatly simplified version control and ACL of larger projects i.e. "who can modify what methods?". It also makes code completion in a dynamic language remarkably simple. Coming full circle to the code analysis side of the system rahula cam then make code refactoring suggestions by using SQL queries.
New and or experimental programming language which is a lisp that sits on php. Based on some of the experience I gleaned while implementing lisphp but with out trying to adhere to the R5 standard and actually introducing a lot of my own ideas as well as ones I have picked up from studying various other languages, old and new. From python I have taken list comprehensions from smalltalk blocks and keyword parameters from arc and clojure - a lot of cool naming conventions and helpful methods/constructs and of course from lisp in general: macro expansion.
(collect (each
set:$projects
as:x
do:(
(block class:title with:(x name))
(block class:date with:(x date))
(block class:desc with:(x desc))
(if (x example)
(block class:example with:(join
(strong with:example)
(pre with:(x example)))))
(block class:technology with:(x tech))
(block class:links with:(x links)))))
A fluent interface to the myriad of powerful, yet often over-looked, php array manipulation methods. Once you can chain together so many powerful constructs you can create solutions to problems which you would have previously reached for a loop or several unique statements and intermediate variables.
#here is a function which returns a fibonacci number
function fib($n) {
return xH(0, 1)->expand('$x + $y', $n);
}
#here is an implementation of factorial
function fact($n) {
return xR(1, $n)->reduce('$x * $y');
}
#generate filtered set from range 0 - 100
#where product of square is greater than 3
#then multiply each remaining by 2
$C = xR(100)->if('($x * $x) > 3')->each('2 * $x');
Rendering platform/technology agnostic layout format which enables a developer to focus on the "what" of the layout instead of the "how". This means being able to create one layout which can be rendered as xhtml/css, tables (nice for debugging), svg, canvas, ext-js, jquery-ui, cappuccino, flash/flex etc.
The format is s-expression derived with the added notion of keyword parameters as well as commas being optional (they are treated as whitespace). Strings do not need to be quoted unless they have spaces in them. PHP variables can be used.
(layout-border
north: $header_logo
center: $main_content
west: $sidebar
east:
(form action: "/register"
(input label: "First Name" name: first_name)
(input label: Email name: email)
(submit value: Register))
south: $copyright)
Portfolio website for graphic designer/artist, Ed Mckirdey, who needed to show case his work. The design work was provided as pdfs and I implemented a pure xhml/css website which has to match the original design down to the pixel in all browsers.
Because of the nature of his work being constantly changing we decided to implement a straight forward yet robust cms. Ext-js was used for the back end interface because of it's robust ui elements and ease of implementation.
One of the major challenges in developing the site was gettning the loading speeds down while dealing with a high quantity of large images. In the end this was accomplished by passing back a JSON result indicating which images need to be loaded before they are eve needed.