background preloader

4clojure – Welcome!

4clojure – Welcome!

Programming, Software, and Technical Interview Questions - XOR Swap Light Table by Chris Granger Here's a much higher quality video: Despite the dramatic shift toward simplification in software interfaces, the world of development tools continues to shrink our workspace with feature after feature in every release. Even with all of these things at our disposal, we're stuck in a world of files and forced organization - why are we still looking all over the place for the things we need when we're coding? Why is everything just static text? Bret Victor hinted at the idea that we can do much better than we are now - we can provide instant feedback, we can show you how your changes affect a system. We can do better, and to that end, light table is the redefinition of how we develop. Light Table is based on a very simple idea: we need a real work surface to code on, not just an editor and a project explorer. Light table is based on a few guiding principles: Let's take a look at how these things manifest themselves in Light Table. Docs everywhere Instant feedback Yes.

Learn Clojure in 15 minutes, perhaps Moving on from pointless flamebait rants, here's something a bit more constructive. Inspired by Tyler Neylon's excellent Learn Lua in 15 minutes, I humbly present my original effort at an equivalent for Clojure (also available as a gist). Further Reading This is far from exhaustive, but hopefully it's enought o get you on your feet. Clojure.org has lots of articles: Clojuredocs.org has documentation with examples for most core functions: 4Clojure is a great way to build your clojure/FP skills: Clojure-doc.org (yeah, really) has a number of getting started articles:

Welcome Warning: LiteratePrograms is currently undergoing a license migration to Creative Commons CC0 1.0. All content will be erased unless its authors agree to release it under CC0. If you wish for your contributed content to be retained, please add a statement to your user page that you release all your contributions under CC0 1.0, and inform me via Special:Emailuser/Dcoetzee. Based on Donald Knuth's concept of literate programming, LiteratePrograms is a collection of code samples displayed in an easy-to-read way, collaboratively edited and debugged, and all released into the public domain under the Creative Commons CC0 1.0 waiver (see Copyrights) so that anyone can use our code and text for any purpose without restriction. Code on LiteratePrograms is organized in a variety of ways using categories: by subject area, by language, by environment, and so on. If you're interested in contributing your own programs, you can read about how to write an article. List of all articles hijackerhijacker

Programming Hadoop with Clojure This article is a short introduction into programming Hadoop using Clojure language. Introduction The Hadoop is free implementation of infrastructure for scalable, distributed computing. It was started as implementation of ideas of MapReduce and GFS, that was introduced by Google, but later, many different projects were included into it. Hadoop is written in Java, and this allows to easily use it from Clojure. Installation and configuration Process of minimal Hadoop installation is pretty simple and described in documentation. I want to mention, that the Cloudera company provides ready-to-work packages for different Linux distributions, so you can setup Hadoop and other packages using your favorite package manager. The source code of clojure-hadoop is available from github — this version works with Hadoop version 0.19 and Clojure 1.1.0. Parts of clojure-hadoop clojure-hadoop has several levels of abstraction. clojure-hadoop.gen clojure-hadoop.wrap clojure-hadoop.job clojure-hadoop.defjob -map

Clojure Atlas – An experimental visualization of the Clojure language and its standard library Learn jQuery in 30 Days Reactive programming is a way of coding with asynchronous data streams that makes a lot of problems easier to solve. RxJS is a popular library for reactive...Once in a while, it's important for us as developers to go back to what made us excited about computers in the first place. For Derek Jensen, that is gaming....React is a flexible framework that makes it easy to build single-page web applications. One of its tools is a set of lifecycle methods which you can add to...The PixelSquid plugin for Photoshop is an exciting new technology that provides the benefits of 3D elements without having to understand a 3D program or the...How your app looks is as important as how it works, and animation is an important part of modern user interfaces. Whether by changing the color of an element...jQuery UI is an extension of jQuery that makes it easy to create clean user interface elements for your websites.

Clojure - home Clojure - Functional Programming for the JVM 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 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". In practice, applications need to have some side effects.

Sphere Online Judge (SPOJ) Running contests Past contests So far we have hosted 3282 contests (2224 completed, 1051 currently running, 7 scheduled), of which 20 were official and 2732 were open to all participants. If you are interested in receiving contest hosting privileges for your SPOJ account, please drop us a line. brool » Blog Archive » Pattern Matching In Clojure Updated: Note that this is available as a clojars module. Clojure code density seems to be pretty good. There are a fair number of convenient shortforms in the language; for example, associative datatypes all act as a function — so given a hash map you can reference it with (my-hashmap :key). The base language itself is probably about as expressive as Python (or a bit better), but you have the added advantage of being able to use macros as needed to really get the code density up. Nonetheless, I really wanted something like Ocaml’s / Haskell’s pattern matching; it makes some code wonderfully concise. Accordingly, I hacked something up, based on Clojure’s built-in destructuring. Literal values match against the same value, while _ matches against any non-nil value (and nil matches against any nil one). ; simple recursive evaluator(defn arithmetic [lst] (match lst v :when (number? Both collections and single values can be used: Defining (defnp signum 0 0 n :when (< n 0) -1 _ 1) Gotchas Source

Practice and Learn - Google Code Jam On this page you can see results and code from past rounds of Google Code Jam, and you can try the problems for yourself. If you're new to Code Jam, try following the Quick-Start Guide. Where should I start? If you're new to programming contests, we highly recommend starting with the least difficult problems and moving up from there as you get more confident. Here are some choice problems for new competitors: Africa 2010, Qualification Round: Store Credit, Reverse Words. Remember, if you get stuck you can look at someone else's solution (click a "solutions" link below) or join our mailing list and ask for help. Finding Solutions You can click a "solutions" link below, but those aren't really indexed in a helpful way. Google of Greater China Test for New Grads of 2014 Code Jam for Veterans 2013 Google Code Jam Korea 2012 Google Code Jam Japan 2011 Code Jam Africa and Arabia 2011 Google Code Jam Africa 2010 TopCoder The Sphere Online Judge also hosts a lot of problems.

Keyword Arguments in Clojure, the Right Way Update Feb. 10, 2010: I was wrong. Recent discussions indicate that placing optional arguments in-line, as in my first example, is preferred. In the future, Clojure may have destructuring support for this style. For now, this post remains a useful guide to map destructuring. Many languages, such as Python and Ruby, allow functions arguments to be passed as name-value pairs. People often ask for the same thing in Clojure, and they end up writing something like this: (defn foo [a b & options] (let [opts (apply hash-map options)] ...)) That works, but it’s not very efficient. A better way is to use Clojure’s map binding forms. Let’s look at the general syntax of Clojure’s local binding form, let: (let [bindings...] expressions...) The bindings are pairs consisting of a binding form and an initialization expression. (let [a 1, b 2] (list a b)) ;;=> (1 2) So far, so good. (let [[a b c] "foo"] (list a b c)) ;;=> (\f \o \o) Moving on: A map binding uses a map as the binding form.

Related: