background preloader

ClojureDocs - Community-Powered Clojure Documentation and Examples

ClojureDocs - Community-Powered Clojure Documentation and Examples
Related:  Programming, Coding & Scripting

Clojure Series: Table of Contents Writing/Coding Writing and Coding, Literature and Computers Tuesday, June 17, 2008 Clojure Series: Table of Contents Here are the postings I have published so far for this series. Posted by Eric Rochester at 5:52 PM Labels: clojure, clojure-series 9 comments: geekiac said... Thank you for writing on Clojure. June 25, 2008 at 5:32 AM Eric Rochester said... @geekiacI'm glad you're liking it. June 25, 2008 at 8:38 AM Paul Drummond said... Nice articles, looking forward to reading more! June 26, 2008 at 7:18 AM Great! June 26, 2008 at 8:57 AM Everything is very clear so far - it's a nice gentle introduction and I already know most of what has been covered so far. June 26, 2008 at 9:21 AM Everything being immutable is a different way of doing things, and sometimes it can be hard to get your head around.Have you seen the Rich's screencast about data types? June 26, 2008 at 5:14 PM June 27, 2008 at 3:49 AM Fogus said... Great job so far! September 18, 2008 at 11:48 AM Bryan Kyle said... August 19, 2010 at 1:50 PM

cgrand's enlive at master - GitHub An invitation to FP for Clojure noobs I’ve heard newcomers to Clojure ask how to get started with functional programming. I believe that learning to program in the functional style is mostly a matter of practice. The newcomer needs to become familiar with a handful of higher order functions, and how they are used in common idioms. This can be done by practice with simple, well defined problems. Here is what I propose. I have packaged the problems as a Leiningen project. What I recommend is deceptively simple. Here’s the important point: once you understand the solution, delete it and then reconstruct it. Here are a few things to avoid. Do not attempt to learn Clojure and new tooling, say Emacs+slime, at the same time. Don’t worry about parts of Clojure not immediately related to functional programming. The Project Euler problems do require a bit of math. Don’t worry about lambda calculus, type theory, category theory, monads, morphisms, or any such abstract concerns. The project repository is is available here.

Learn Clojure Fatvat: Data Persistence in GAE with Clojure If you want to persist stuff in Java, you've got a bewildering amount of choiceThere's even an entire book about making the right decision! (Persistence in the Enterprise) Google App Engine has gone with JDO using the Data Nucleus platform. In GAE this is split again into two APIs, the high-level one for persisting objects, and a lower-level one which allows you to persist raw data. When using Clojure it makes more sense to go with the lower-level api. So how do we store data in GAE? (ns news.savestory (:use (news appengine)) (:gen-class :extends javax.servlet.http.HttpServlet) (:import (com.google.appengine.api.datastore DatastoreServiceFactory Entity Key Query))) (defn store [data type] (let [entity (Entity. (.toString type))] (doseq [[k v] data] (.setProperty entity (.toString k) v)) (.put (DatastoreServiceFactory/getDatastoreService) entity) (.getKey entity))) store takes a map and a type and persists it in the database and returns the key associated with this entity.

Clojure quick reference Clojure relates to these primary data types: Simple values: Booleans Numbers Symbols and keywords Strings and characters Regular expressions Collections: Vector List Set Map Struct Sequence Functions See clojure.org data structures General These operations apply to all values. Operations for simple native data types like boolean and string. Boolean The values nil and false are treated as false in logical tests, any other value is considered true. Number Clojure uses four numeric types: integer Arbitrary precision integer. Clojure uses boxed values (i.e. Literals Arithmetic Comparisons Bit operations Bit operations work with integers (byte short int long BigInteger) only. Casts Tests Symbol and keyword Keywords start with a colon. Symbols start with a single quote ' and can be associated with a value. Create Use String and character Strings are Java String, characters are Java Character. Casts and tests Regular expressions Test (defn regex? In addition to the primary types there are some special cases:

Clojure Scripting - ImageJ Check out clojure web site and particularly the chapter on Java interoperability. Clojure is not a scripting language: Clojure compiles directly to JVM bytecode, and thus runs at native speed. Thus one must think of Clojure as a true alternative to Java the language, but much more expressive, flexible and powerful. See also: Clojure Cookbook. Using Clojure inside Fiji Go to "Plugins - Scripting - Clojure Interpreter". See Scripting Help for details on keybindings and how to use the interpreter. ^ Ctrl+) will add all necessary ending parenthesis. A minimal, complete clojure example: To create scripts, just save them as .clj text files (with an underscore in the name) in any folder or subfolder of Fiji's plugins folder, and run "Plugins - Scripting - Refresh Clojure Scripts" to update the menus (it's done automatically at start up as well). To edit a script, just edit and save it with your favorite text editor. To execute a script, do any of: Select it from the plugins menus. The simplest is: 1.

Improving Clojure’s docs You are here: Home / Clojure / Improving Clojure’s docs There was an interesting conversation today on #clojure about various aspects of Clojure documentation. This is not a new topic I thought I’d goose it a little more publicly. There are docs in several places (this is incomplete, but most easily found): clojure.org – “official”, first-stop, very small editor set dev.clojure Confluence – wiki, editable by many but less formal. Clojure Docs – a place to stash per-function examples in core and libraries Learn-Clojure – a gathering of “learning” resources At last year’s conj, I was inspired to improve and talked Stu into letting me make some changes <evil-laugh/>. Eventually, my free time ran out and I declared doc change bankruptcy and just put my todo list on the dev site . If you come out of the conj inspired to do some doc work to improve your world, here are some suggestions: Pick up one of the items on the .org TODO list (or add your own pointy edge).

Clojure Programming - Wikibooks, collection of open-content textbooks Clojure is a dynamic programming language for the JVM. Introduction[edit] People come to Clojure from a variety of backgrounds. Feel free to post your own code, written in the Clojure language, here. Implementations[edit] There are a number of different implementations of the Clojure language: Clojure (the original Java-based implementation)ClojureScript (compiles to JavaScript)ClojureCLR (for Microsoft's .NET framework)clojure-py (Python-based)clojure-scheme (compiles to Scheme)ClojureC (compiles to C) See also Clojure-metal (thoughts/plans for Clojure on LLVM). FAQ[edit] Some answers to Frequently Asked Questions. Getting started[edit] The Getting started section covers obtaining and installing Clojure as well as basic setup of editors such as Emacs or Vim. Other "Getting Started" guides and documentation: Concepts[edit] The Concepts section covers Clojure language basics, such as supported datatypes, "mutability" or state in Clojure, functional programming and the concurrency features.

core API reference (clojure-contrib) by Laurent Petit (and others) Usage: (ns your-namespace (:require clojure.contrib.core)) Overview Functions/macros variants of the ones that can be found in clojure.core (note to other contrib members: feel free to add to this lib) Public Variables and Functions macro Usage: (-? Same as clojure.core/-> but returns nil as soon as the threaded value is nil itself (thus short-circuiting any pending computation). Source Usage: (-? Same as clojure.core/->> but returns nil as soon as the threaded value is nil itself (thus short-circuiting any pending computation). Source Usage: (.?. Same as clojure.core/.. but returns nil as soon as the threaded value is nil itself (thus short-circuiting any pending computation). Source dissoc-in function Usage: (dissoc-in m [k & ks :as keys]) Dissociates an entry from a nested associative structure returning a new nested structure. keys is a sequence of keys. Source new-by-name Usage: (new-by-name class-name & args) Source seqable? Usage: (seqable? Source

relevance/labrepl Mark Volkmann's Clojure Page Mark Volkmann's Page This page contains resources related to the Clojure programming language. Article Change History Sounds Even Jennifer Aniston has quit using other programming languages and now prefers Clojure. Sound Clip #1 Sound Clip #2 home

functional-koans/clojure-koans

Related: