newLISP
Concurrency in newLISP
09/18/07 09:25 AM
Threaded applications are considered to be so difficult to implement properly that programmers are often encouraged to avoid them unless absolutely necessary. This is because of the difficulty in synchronizing data between threads. There are several techniques to accomplish this. Read More...
|
Faster string iteration using unpack
08/23/07 12:23 PM
In a previous entry, we used a simple C program and SWIG to extend Python. This was because iteration over Python's strings, being more complex constructs than C's character arrays, was not speedy enough for large strings. newLisp, being a high level, interpreted language like Python, also suffers from the same problem. However, newLisp's unpack function provides another option. Read More...
Updating the newLisp MySQL5 Module
08/01/07 03:55 PM
Due to how busy things have been, I've nixed the newLisp C tutorial for the time being, and instead, have done some work on the newLisp MySQL5 module to update pieces that are broken and extend it with some nice, albeit basic, features. Read More...
Using C Libraries in newLisp Part 1
07/14/07 10:43 AM
The past couple of articles have been tutorials on how to use CFFI to access functions from C libraries in Lisp. Out of completeness, I thought I'd write a short tutorial demonstrating how much easier it is to do the same thing in newLisp. As newLisp is an entirely interpreted language, this built in functionality allows very easy extension of the language using much more low level and efficient libraries. Read More...
Nested contexts in newLisp
06/21/07 04:37 PM
newLisp does not have nested contexts. This is because contexts are not OO-style objects, although they can be used to prototype other contexts. In fact, contexts are name spaces that can be manually created as needed. However, since they create efficient hashes that can be used for many of the same purposes as objects (such as data modeling), it would be handy if there were a way to create contexts inside of other contexts. Read More...
Validating parameter format
06/19/07 08:58 AM
newLisp is a loosely-typed language. However, if you are developing a library or module that other projects may mix into their own code, it is useful to give helpful errors when a function receives incorrect input. Especially if your documentation is lax (which we know it never is), throwing usable errors when a function is misused will make the lives of developers using your code that much easier. Read More...
Simple error handling in newLisp
06/12/07 07:51 PM
When I first began to program newLisp, I was concerned that it lacked the structured error handling syntax of the imperative languages I was used to. As my software begins to mature and I add more sophisticated error handling, I find that newLisp's simple functions result in cleaner, more expressive code. Read More...
Avoiding excess redundancy
06/08/07 08:11 AM
There is an interesting article at Irrational Exuberance about anti-objects and reflective design. The author states, "The first– and only– programming paradigm I was taught at college was OO." Another recent blog post by a college CS tutor laments that object oriented design is the first (and often, the only) abstraction method taught to students in computer science programs. Read More...
Evolving lisp
06/07/07 08:58 PM
Paul Graham notes that, "A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add to it, piecemeal, parts taken from the Lisp model, like runtime typing and garbage collection." This is what has made Python such a wonderful, elegant, and concise language. Why say with iteration what can be done in one easily readable line with a list comprehension? Read More...
Art is rough
06/01/07 04:57 PM
Why's Poignant Guide claims that after learning Ruby you will write code so elegant it will make you cry. Paul Graham was not so dramatic, but he was closer to the mark. Lisp teaches you the elegance and grace of recursive and applicative programming. This creates beautiful and concise code. Read More...
newLisp in context
05/25/07 07:52 PM
Have you ever had one of those moments where you suddenly just get it? It just happened to me with contexts in newLisp. Allow me to share my epiphany. Read More...
Macros
05/23/07 08:30 PM
A common point of confusion for lisp beginners is the macro. Few lispers can resist the opportunity to expound the beauty and elegance of the macro. However, as with many lisp concepts, most explanations are outside the range of the hobbyist's experience. Read More...
Contextual programming
05/15/07 04:25 PM
When working on a large project, it is usually advisable to break your code up into smaller portions. In many languages, these are called shared libraries: smaller chunks of code that can be reused as needed throughout this and other programs. Read More...
Lisp: where to start
05/13/07 01:06 PM
When I first set out to learn lisp, I was faced with an intimidating number of choices. Which implementation of lisp should I choose? Common lisp? Scheme? I went with common lisp. Which common lisp? SBCL? MCL? Gnu clisp? Yeesh. This is enough to scare most lisp rookies off. Here is some advice: start off with Gnu clisp. It's available for most architectures, it's free, it has decent documentation online, and it's easy to install. Read More...
