background preloader

Object Computing, Inc. - Java News Brief - March 2009

Object Computing, Inc. - Java News Brief - March 2009
by R. Mark Volkmann, Partner Object Computing, Inc. (OCI) last updated on 6/2/13 Contents Introduction The goal of this article is to provide a fairly comprehensive introduction to the Clojure programming language. Please send feedback on errors and ways to improve explanations to mark@ociweb.com, or fork the repository and send a pull-request. You said X, but the correct thing to say is Y. Updates to this article that indicate the "last updated" date and provide a dated list of changes will be provided at Also see my article on software transactional memory and the Clojure implementation of it at Code examples in this article often show the return value of a function call or its output in a line comment (begins with a semicolon) followed by "->" and the result. (+ 1 2) ; showing return value -> 3 (println "Hello") ; return value is nil, showing output -> Hello Functional Programming Functional programming is a style of programming that emphasizes "first-class" functions that are "pure".

http://java.ociweb.com/mark/clojure/article.html

Online Learning in Clojure ← Structure & Process Online Learning is a relatively old branch of machine learning that has recently regained favour for two reasons. Firstly, online learning algorithms such as Stochastic Gradient Descent work extremely well on very large data sets which have become increasingly prevalent (and increasingly large!). Secondly, there has been a lot of important theoretical steps made recently in understand the convergence behaviour of these algorithms and their relationship to traditional Empirical Risk Minimisation (ERM) algorithms such as Support Vector Machines (SVMs). In order to understand these algorithms better, I implemented a recent one (Pegasos, described below) in Clojure. This had the added advantage of seeing how well Clojure’s performance held up when doing some serious number-crunching.

A monad tutorial for Clojure programmers (part 1) « On Clojure Monads in functional programming are most often associated with the Haskell language, where they play a central role in I/O and have found numerous other uses. Most introductions to monads are currently written for Haskell programmers. However, monads can be used with any functional language, even languages quite different from Haskell. Here I want to explain monads in the context of Clojure, a modern Lisp dialect with strong support for functional programming.

cray cray is a ray tracer written in Clojure as a learning exercise. Download and run cray.clj with one of the included demo scenes, and after a few seconds or minutes (depending on your machine) an image like one of those shown below should appear. Change the settings in the settings files to enable soft shadows, depth of field, change resolution, camera position, etc.

Read Our Magazines Each month, PragPub editor Michael Swaine brings you a magazine packed full of interesting articles, features, and departments. Free copies of the first 49 issues are available here; you can download in PDF, mobi (good for the Kindle), and epub (great for most other readers and better looking, too). Subscriptions and current issues are available at Clojure Tutorial For the Non-Lisp Programmer I intend to keep this tutorial as accurate and up-to-date as possible. If you have any suggestions for changes, please leave a comment at the bottom of this page. Clojure is a functional lisp dialect that uses the Java Virtual Runtime as its platform. The language home page is at

brool » Tokyo Cabinet API for Clojure I’ve been playing with Tokyo Cabinet and Clojure for a bit, and while I will go on about both of them in another blog post (or not), I have to mention that Clojure is such a well designed language that it’s a pleasure to play with. It has much of the same intrinsic power as Haskell, but in a fashion that might be more approachable for people coming from Python or Ruby. At any rate, I made a small, thin layer around the Tokyo Cabinet API, and put it on Github. Another thin wrapper can be found at this blog. Copy of the README is below (the ultimate in lazy!).

clojure maps It's great to see all of the Clojure libraries springing up as people pull Clojure towards their application domains, and shape it for the styles of programming they prefer. In looking at some of the libraries, I am a bit concerned that maps are not being used when the logical entity is in fact a map. If you like Clojure, I would hope one of the things you like about it is that 'everything works with everything' to as great an extent as possible. Clojure Entity Component System Overview This link gives a great introduction to an entity component system.My system just evolved out of need and contains only features that I needed in my game. The System An entity consists of multiple components and nothing else. A component is just a map which also holds the :entity-id and its :type. Creating an Entity

Statistical Learning in Clojure Part 1: LDA & QDA Classifier This will hopefully be the first of a series of posts based on a book that has substantially influenced me over the last several years, The Elements of Statistical Learning (EoSL) by Hastie, Tibshirani, and Friedman (I went and got a degree in statistics essentially for the purposes of better understanding this book). Best of all, the pdf version of EoSL is now available free of charge at the book’s website, along with data, code, errata, and more. This post will demonstrate the use of Linear Discriminant Analysis and Quadratric Discriminant Analysis for classification, as described in chapter 4, “Linear Methods for Classification”, of EoSL. I will implement the classifiers in Clojure and Incanter, and use the same data set as EoSL to train and test them. The data has 11 different classes, each representing a vowel sound, and 10 predictors, each representing processed audio information captured from eight male and seven female speakers. Details of the data are available here.

clojure intro by R. Mark Volkmann, Partner Object Computing, Inc. (OCI) last updated on 9/29/12 Contents Introduction XNA RPG - Learning XNA while building a RPG, a 26 part tutorial series E3 2011 is a little more than a month away, the expo where nearly all the cool gaming news comes out. There's rumors that there's news coming about development "stuff" for the XBox 360 and E3 seems like the logical time for that news to be released. To give you a leg up and help you catch that wave, today's post is curtsey of Jamie McMahon and his very cool XNA Game Programming Adventures, XNA 4.0 RPG Tutorials series. The series takes you from install to a playable 2D RPG with each in the series building on the last. The tutorial includes not only building the game but a game/level editor too. Part 1 - Getting StatedThis first tutorial is about getting started with the role playing game, Eyes of the Dragon.

Datatypes and Protocols - early experience program - Clojure > I'm still trying to get my head around the new features. Seeing more > code examples will definitely help. In the meantime, here is some > stream-of-consciousness thoughts and questions. > > Datatypes: > > I'm a little worried about the strong overlap between reify/proxy, > deftype/defstruct, and defclass/gen-class.

Protocols Clojure issue tracking now lives at and the wiki is at These Assembla pages are kept online for historical interest only. Protocols This page is a design scratchpad. Please see:

Related:  Clojure