background preloader

The Clojure Toolbox

The Clojure Toolbox
Related:  Programming, Coding & Scripting

First hundred days of Clojure | byte bohemian In politics you have a one hundred days period of grace. In December I started to work with Clojure, so I guess it’s time to have a clojure look. In the last couple of years I encountered a couple of different languages. At scoyo it was ActionScript and Flex from Adobe. When we started to work on our new product I said to my boss and my colleagues: In Java I know how a state of the art application has to look like, but I have no clue how to build a Clojure application. Leiningen (aka lein) – The build and dependency managmement tool for Clojure.Noir – A nice library to build websites/-services in Clojure.CongoMongo and mongoDB – The database driver and the database we use. My first days with Clojure When you are coming from a language like Java you are used to some things like:Structure everything – Static typing is your friend, so smack every data you have into a class. Lots of ceremony – When you work in Java you create a huge amount of classes. (for [i (range 1 100)] (println i))

Causal ordering - Scattered Thoughts Causal ordering is a vital tool for thinking about distributed systems. Once you understand it, many other concepts become much simpler. We’ll start with the fundamental property of distributed systems: Messages sent between machines may arrive zero or more times at any point after they are sent This is the sole reason that building distributed systems is hard. For example, because of this property it is impossible for two computers communicating over a network to agree on the exact time. If we can’t agree on the time then we can’t always agree on what order things happen in. This concept is called causal ordering and is written like this: A->B (event A is causally ordered before event B) Let’s define it a little more formally. If A and B happen on the same machine and A happens before B then A->B If I send you some message M and you receive it then (send M)->(recv M) If A->B and B->C then A->C This image shows a nice way to picture these relationships. Communication bounds causality

Clojure Programming 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.

Training and Certification Resources NetBeans and Java Training Several of these courses also help you prepare for certification in Java technology. Oracle University: Training Offerings for Developers The following courses from Oracle University use NetBeans IDE. Java Certification Validate your development skills and advance your career with an Oracle Certification in Java technology. Discounts are available when you purchase a Certification Value Package which includes the training, certification exam voucher and a free exam retake – just in case you need it. Other Professional Training Offerings for Developers Java Passion: Online Classes for anyone who wants to enhance their knowledge and programming skill on all Java and Web 2.0 technologies: Courses cover Java SE, Java EE, Ajax, Ruby/Ruby on Rails, Groovy, Scala, and much more! Community Training Here are free courses from the NetBeans community and beyond: NetBeans Platform Certified Training Also check out our community support options.

Clojure Libraries Clojure - home Architectures and ABIs detailed » Thiago Macieira's blog Yesterday I wrote about instruction set and ABI manuals. Today I’d like to go into details about the ABIs I listed there. This was done mostly as a summary for me: it’s tiresome to search for the information in the manuals, especially since some of the manuals are PDFs without links. For example, I never remember what is the order of the registers used in parameter passing on x86-64. As a bonus for you, dear reader, I added a few words about each platform. First, a summary with numbers. Notes: i386 or x86 or IA-32 The x86 architecture is the oldest in consideration and its age shows. The name x86 is because the 80386 (family 3) was followed by the 80486 (family 4), the Pentium (family 5) and the Pentium Pro (P6 archiecture, family 6). The instructions on x86 have variable lengths and can be anywhere from 1 to 15 bytes, averaging usually between 3 and 5 bytes, making the code density around 4 instructions per 16 bytes. x86-64 Itanium (IA-64) ARM 32-bit mode (AArch32) Thumb sub-mode

Clojure History[edit] Rich Hickey is the creator of the Clojure programming language, with work experience on scheduling systems, broadcast automation, audio analysis and fingerprinting, database design, yield management, exit poll systems, and machine listening.[4] Before Clojure, he developed dotLisp, a similar project based on the .NET platform. Hickey spent about 2½ years working on Clojure before publicly releasing it, much of that time working exclusively on Clojure without external funding. Philosophy[edit] Clojure's approach to concurrency is characterized by the concept of identities,[7] which represent a series of immutable states over time. Syntax[edit] Like most other Lisps, Clojure's syntax is built on S-expressions that are first parsed into data structures by a reader before being compiled. Macros[edit] Language features[edit] Variants[edit] Variations on the Clojure language have been developed for platforms other than the JVM: Examples[edit] Hello world: Defining a function:

Clojure box - loading book examples from "Programming Clojure" > Wherever the files goes after C-x C-f ~/.emacs and then C-x C-s is where > emacs thinks your home directory is. I would just go with that. It's > normally in %appdata%, but it won't be there until you create it and save > it. yes, this is better than my #2 > Robert? Here is my entire .emacs file, which is extremely basic but got me up and running at least: (setq swank-clojure-extra-classpaths '()) (add-to-list 'swank-clojure-extra-classpaths (add-to-list 'swank-clojure-extra-classpaths "C:/Dev/technomancy-clojure-http-client/src") (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. You'll notice the paths are different (I changed it during my first post) but obviously they aren't relevant. But with 1.0 out now I haven't had as many issues. Rob - show quoted text -

Related: