Another Word For It Patrick Durusau on Topic Maps and Semantic Diversity

October 7, 2015

Computational Literary Analysis

Filed under: Clojure,Computational Literary Analysis,Lisp — Patrick Durusau @ 8:07 pm

Computational Literary Analysis by Atabey Kaygun.

From the post:

Description of the problem

One of the brilliant ideas that Kurt Vonnegut came up with was that one can track the plot of a literary work using graphical methods. He did that intuitively. Today’s question is “Can we track the plot changes in a text using computational or algorithmic methods?”

Overlaps between units of texts

The basic idea is to split a text into fundamental units (whether this is a sentence, or a paragraph depends on the document) and then convert each unit into a hash table where the keys are stemmed words within the unit, and the values are the number of times these (stemmed) words appear in each unit.

My hypothesis is (and I will test that in this experiment below) that the amount of overlap (the number of common words) between two consecutive units tells us how the plot is advancing.

I will take the fundamental unit as a sentence below.

Clojure, Lisp, computational literary analysis, what’s there not to like? 😉

Given the hypothesis:

the amount of overlap (the number of common words) between two consecutive units tells us how the plot is advancing

Atabey doesn’t say what his criteria is for “the plot advancing.” I mention that because both of the plots he offers trail off from their highs.

If there is a plot advance, shouldn’t the respective speeches build until they peak at the end?

Or is there some more complex “plot advancement” at play?

One of the things that makes this and similar analyses useful, particularly of well known speeches/works, is that we all “know” the high points. We have been conditioned to hear those as distinct, when the original hearers/readers were encountering it for the first time.

Such tools can pry us out of the rut of prior analysis. Sometimes.

September 25, 2015

Three Reasons You May Not Want to Learn Clojure [One of these reasons applies to XQuery]

Filed under: Clojure,Functional Programming,XQuery — Patrick Durusau @ 7:34 pm

Three Reasons You May Not Want to Learn Clojure by Mark Bastian.

From the post:

I’ve been coding in Clojure for over a year now and not everything is unicorns and rainbows. Whatever language you choose will affect how you think and work and Clojure is no different. Read on to see what some of these effects are and why you might want to reconsider learning Clojure.

If you are already coding in Clojure, you will find this amusing.

If you are not already coding in Clojure, you may find this compelling.

I won’t say which one of these reasons applies to XQuery, at least not today. Watch this blog on Monday of next week.

September 11, 2015

Clojure Remote – Coming February 2016

Filed under: Clojure,Conferences — Patrick Durusau @ 1:06 pm

Clojure Remote – Coming February 2016

From the webpage:

Clojure Remote will be Clojure’s first exclusively remote conference. While I firm up the details, sign up to get news as it happens, and take an opportunity to provide any feedback you have on how you’d like to see the conference run.

Sounds interesting!

I’ve signed up for more details as they arrive.

You?

September 8, 2015

Alda: A Manifesto and Gentle Introduction

Filed under: Clojure,Music — Patrick Durusau @ 11:02 am

Alda: A Manifesto and Gentle Introduction by Dave Yarwood.

From the webpage:

What is Alda?

2015-08-18-alda

Alda’s ambition is to be a powerful and flexible music programming language that can be used to create music in a variety of genres by typing some code into a text editor and running a program that compiles the code and turns it into sound. I’ve put a lot of thought into making the syntax as intuitive and beginner-friendly as possible. In fact, one of the goals of Alda is to be simple for someone with little-to-no programming experience to pick up and start using. Alda’s tagline, a music programming language for musicians, conveys its goal of being useful to non-programmers.

But while its syntax aims to be as simple as possible, Alda will also be extensive in scope, offering composers a canvas with creative possibilities as close to unlimited as it can muster. I’m about to ramble a little about the inspiring creative potential that audio programming languages can bring to the table; it is my hope that Alda will embody much of this potential.

At the time of writing, Alda can be used to create MIDI scores, using any instrument available in the General MIDI sound set. In the near future, Alda’s scope will be expanded to include sounds synthesized from basic waveforms, samples loaded from sound files, and perhaps other forms of synthesis. I’m envisioning a world where programmers and non-programmers alike can create all sorts of music, from classical to chiptune to experimental soundscapes, using only a text editor and the Alda executable.

In this blog post, I will walk you through the steps of setting up Alda and writing some basic scores.

Whether you want to create new compositions or be able to “hear” what you can read in manuscript form, this looks like an exciting project.

A couple of resources if you are interested in historical material:

The Morgan Library &amp: Museum’s Music Manuscripts Online, which as works by J. S. Bach, Beethoven, Brahms, Chopin, Debussy, Fauré, Haydn, Liszt, Mahler, Massenet, Mendelssohn, Mozart, Puccini, Schubert, and Schumann, and others.

Digital Image Archive of Medieval Music (DIAMM).

The sources archived include all the currently known fragmentary sources of polyphony up to 1550 in the UK (almost all of these are available for study through this website); all the ‘complete’ manuscripts in the UK; a small number of important representative manuscripts from continental Europe; a significant portion of fragments from 1300-1450 from Belgium, France, Italy, Switzerland and Spain. Such a collection of images, created under strict protocols to ensure parity across such a varied collection, has never before been possible, and represents an extraordinary resource for study of the repertory as a whole. Although these manuscripts have been widely studied since their gradual discovery by scholars at various times over the past century, dealing with the repertory as a whole has been hampered by the very wide geographical spread of the manuscripts and the limitations of microfilm or older b/w photography. Fragments are far more numerous than complete sources, but most of them are the sole remaining representatives of lost manuscripts. Some are barely legible and hard to place and interpret. They amount to a rich but widely scattered resource that has been relatively neglected, partly because of difficulty of access, legibility and comparison of materials that are vulnerable to damage and loss.

Being aware, of course, that music notation has evolved over the years and capturing medieval works will require mastery of their notations.

A mapping from any form of medieval notation to Alda I am sure would be of great interest.

August 21, 2015

Parens of the Dead

Filed under: Clojure,ClojureScript,Functional Programming,Games,Programming — Patrick Durusau @ 7:43 pm

Parens of the Dead: A screencast series of zombie-themed games written with Clojure and ClojureScript.

Three episodes posted thus far:

Episode 1: Lying in the Ground

Starting with an empty folder, we’ll lay the technical groundwork for our game. We’ll get a Clojure web server up and running, compiling and sending ClojureScript to the browser.

Episode 2: Frontal Assualt

In this one, we create most of the front-end code. We take a look at the data structure that describes the game, using that to build up our UI.

Episode 3: What Lies Beneath

The player has only one action available; revealing a tile. We’ll start implementing the central ‘reveal-tile’ function on the backend, writing tests along the way.

Next episode? Follow @parensofthedead

Another innovative instruction technique!

Suggestions:

1) Have your volume control available because I found the sound in the screencasts to be very soft.

2) Be prepared to move very quickly as episode one, for example, is only eleven minutes long.

3) Download the code and walk through it at a slower pace.

Enjoy!

Conversations With Datomic

Filed under: Clojure,Datomic — Patrick Durusau @ 1:14 pm

Conversations With Datomic by Carin Meier. (See Conversations With Datomic Part 2 as well.)

Perhaps not “new” but certainly an uncommon approach to introducing users to a database system.

Carin has a “conversation” with Datomic that starts from the very beginning of creating a database and goes forward.

Rewarding and a fun read!

Enjoy!

July 15, 2015

Clojure At Scale @WalmartLabs

Filed under: BigData,Clojure,Functional Programming — Patrick Durusau @ 3:41 pm

From the description:

There are many resources to help you build Clojure applications. Most however use trivial examples that rarely span more than one project. What if you need to build a big clojure application comprising many projects? Over the three years that we’ve been using Clojure at WalmartLabs, we’ve had to figure this stuff out. In this session, I’ll discuss some of the challenges we’ve faced scaling our team and code base as well as our experience using Clojure in the enterprise.

I first saw this mentioned by Marc Phillips in a post titled: Walmart Runs Clojure At Scale. Marc mentions a tweet from Anthony Marcar that reads:

Our Clojure system just handled its first Walmart black Friday and came out without a scratch.

Black Friday,” is the Friday after the Thanksgiving holiday in the United States. Since 2005, it has been the busiest shopping day of the year and in 2014, $50.9 billion was spend on that one day. (Yes, billions with a “b.”)

Great narrative of issues encountered as this system was built to scale.

July 14, 2015

Beyond Code

Filed under: Clojure,Programming — Patrick Durusau @ 3:44 pm

From the description:

To understand large legacy systems we need to look beyond the current structure of the code. We need to understand both how the system evolves and how the people building it collaborate. In this session you’ll learn about a Clojure application to mine social information such as communication paths, developer knowledge and hotspots from source code repositories (including Clojure itself). It’s information you use to improve both the design and the people-side of your codebase. We’ll also look at some interesting libraries like Incanter and Instaparse before we discuss the pros and cons of writing the tool in Clojure.

From the presentation:

“Laws” of Software Evolution

Continuing Change

“a system must be continually adapted or it becomes progressively less satisfactory”

Increasing Complexity

“as a system evolves, its complexity increases unless work is done to maintain or reduce it.

Those two “laws” can be claimed for software but they are applicable to any system, including semantics.

Adam develops code that uses source control logs to identify “hot spots” in code, which is available at: Code Maat.

You are likely to also be interested in Adam’s book: Your Code as a Crime Scene: Use Forensic Techniques to Arrest Defects, Bottlenecks, and Bad Design in Your Programs

Early in his presentation Adam mentions that the majority of a programmer’s time isn’t spent programming but rather “…making changes to existing code and the majority of that, trying to understand what the code does….” Imagine capturing your “understanding” of existing code using a topic map.

That increases your value-add to the organization. Yes?

July 7, 2015

What Lies Beneath: A Deep Dive into Clojure’s data structures

Filed under: Clojure,Functional Programming,Programming — Patrick Durusau @ 2:03 pm

What Lies Beneath: A Deep Dive into Clojure’s data structures by Mohit Thatte. (slides)

From the description:

Immutable, persistent data structures are at the heart of Clojure’s philosophy. It is instructive to see how these are implemented, to appreciate the trade-offs between persistence and performance. Lets explore the key ideas that led to effective, practical implementations of these data structures. There will be animations that should help clarify key concepts!

Video: Running time a little over thirty-five minutes (don’t leave for coffee).

Closes with a great reading list.

You may also want to review: Purely functional data structures demystified (slides).

Description:

I spoke about ‘Purely Functional Data structures’ at Functional Conference 2014 in Bangalore. These are my slides with an extra section on further study.

This talk is based on Chris Okasaki’s book title Purely Functional Data Structures. The gist is that immutable and persistent data structures can be designed without sacrificing performance.

Computer trivia question from the first video: Why are the colors red and black used for red and black trees?

June 30, 2015

Spark in Clojure

Filed under: Clojure,Spark — Patrick Durusau @ 8:34 pm

Spark in Clojure by Mykhailo Kozik.

From the post:

Apache Spark is a fast and general engine for large-scale data processing.

100 times faster than Hadoop.

Everyone knows SQL. But traditional databases are not good in hadling big amount of data. Nevertheless, SQL is a good DSL for data processing and it is much easier to understand Spark if you have similar query implemented in SQL.

This article shows how common SQL queries implemented in Spark.

Another long holiday weekend appropriate posting.

Good big data practice too.

June 15, 2015

Clojure By Example

Filed under: Clojure,Programming — Patrick Durusau @ 3:47 pm

Clojure By Example by Hirokuni Kim.

From About:

I don’t like reading thick O’Reilly books when I start learning new programming languages. Rather, I like starting by writing small and dirty codes. If you take this approach, having many simple codes examples are extremely helpful because I can find answers to these questions very easily.

How can I define a function?

What’s the syntax for if and else?

Does the language support string interpolation?

What scopes of variables are available?

These are very basic questions, but enough to start hacking with the new languages.

Recently, I needed to learn this completely new language Clojure but couldn’t find what I wanted. So, I decided to create one while learning Clojure.

Hopefully, this helps you to start learning and writing Clojure.

Personally I like the side-by-side text — code presentation. You?

June 14, 2015

ClojureCL

Filed under: Clojure,OpenCL,Parallel Programming,Parallelism — Patrick Durusau @ 2:35 pm

ClojureCL

From the getting started page:

ClojureCL is a Clojure library for High Performance Computing with OpenCL, which supports:

  • GPUs from AMD, nVidia, Intel;
  • CPUs from Intel, AMD, ARM etc;
  • Computing accelerators and embedded devices (Intel Xeon Phi, Parallella, etc.).
  • BTW, the page is asking for native English speakers to help edit the pages. Recent enough effort that the documentation may not be set in stone, unlike some projects.

    You have to smile at the comment found under: Making sense of OpenCL:

    Once you get past the beginner’s steep learning curve, it makes sense, and opens a whole new world of high-performance computing – you practically have a supercomputer on your desktop. (emphasis added)

    I’m not accustomed to that much honesty in documentation. 😉

    Surprising enough to make it worthwhile to read further.

    Enjoy!

    June 4, 2015

    How I tracked FBI aerial surveillance

    Filed under: Clojure,Government,Privacy — Patrick Durusau @ 9:42 am

    How I tracked FBI aerial surveillance by John Wiseman.

    John give full details of how he scooped AP by 25 days on FBI aerial surveillance. Not to mention that he links to how you can build a similar setup. A setup that uses Clojure! (Plus a software defined radio for you hobbyists out there.)

    Assembling a cast of watchers/employees at airports who can photograph people exiting specific planes would be a big step towards matching people up to surveillance flights. Not to mention running photo searches to identify the people themselves.

    A gold fish bowl world isn’t the best choice but the government has made that choice. It is up to the rest of us to see that they enjoy the full benefit of that choice. Perhaps they will choose differently at some point in the future.

    May 12, 2015

    Creative computing with Clojure

    Filed under: Art,Clojure,Music — Patrick Durusau @ 3:56 pm

    Creative computing with Clojure by Carin Meier.

    From the post:

    Clojure is gaining traction and popularity as a programming language. Both enterprises and startups are adopting this functional language because of the simplicity, elegance, and power that it brings to their business. The language originated on the JVM, but has since spread to run on the CLR and Node.js, including web browsers and mobile devices. With this spread of practical innovation, there has been another delightful development: a groundswell of people making art with Clojure.

    Carin covers music, visual arts, dance, and animation, with pointers to videos and projects.

    If you are looking for a challenging but enjoyable escape from the daily news, this is a good place to start!

    April 16, 2015

    clojure-datascience (Immutability for Auditing)

    Filed under: Clojure,Data Science — Patrick Durusau @ 5:56 pm

    clojure-datascience

    From the webpage:

    Resources for the budding Clojure Data Scientist.

    Lots of opportunities for contributions!

    It occurs to me that immutability is a prerequisite for auditing.

    Yes?

    If I were the SEC, as in the U.S. Securities and Exchange Commission, and NOT the SEC, as in the Southeastern Conference (sports), I would make immutability a requirement for data systems in the finance industry.

    Any mutable change would be presumptive evidence of fraud.

    That would certainly create a lot of jobs in the financial sector for functional programmers. And jailers as well considering the history of the finance industry.

    April 6, 2015

    Down the Clojure Rabbit Hole

    Filed under: Clojure,Functional Programming — Patrick Durusau @ 7:08 am

    Down the Clojure Rabbit Hole by Christophe Grand.

    From the description:

    Christophe Grand tells Clojure stories full of immutability, data over behavior, relational programming, declarativity, incrementalism, parallelism, collapsing abstractions, harmful local state and more.

    A personal journey down the Clojure rabbit hole.

    Not an A to B type talk but with that understanding, it is entertaining and useful.

    Slides and MP3 are available for download.

    Enjoy!

    March 16, 2015

    Grafter RDF Utensil

    Filed under: Clojure,DSL,Graphs,Linked Data,RDF — Patrick Durusau @ 4:11 pm

    Grafter RDF Utensil

    From the homepage:

    grafter

    Easy Data Curation, Creation and Conversion

    Grafter’s DSL makes it easy to transform tabular data from one tabular format to another. We also provide ways to translate tabular data into Linked Graph Data.

    Data Formats

    Grafter currently supports processing CSV and Excel files, with additional formats including Geo formats & shape files coming soon.

    Separation of Concerns

    Grafter’s design has a clear separation of concerns, disentangling tabular data processing from graph conversion and loading.

    Incanter Interoperability

    Grafter uses Incanter’s datasets, making it easy to incororate advanced statistical processing features with your data transformation pipelines.

    Stream Processing

    Grafter transformations build on Clojure’s laziness, meaning you can process large amounts of data without worrying about memory.

    Linked Data Templates

    Describe the linked data you want to create using simple templates that look and feel like Turtle.

    Even if Grafter wasn’t a DSL, written in Clojure, producing graph output, I would have been compelled to mention it because of the cool logo!

    Enjoy!

    I first saw this in a tweet by ClojureWerkz.

    March 1, 2015

    Clojure and Overtone Driving Minecraft

    Filed under: Clojure,Games,Music — Patrick Durusau @ 4:53 pm

    Clojure and Overtone Driving Minecraft by Joseph Wilk.

    From the post:

    Using Clojure we create interesting 3D shapes in Minecraft to the beat of music generated from Overtone.

    We achieve this by embedding a Clojure REPL inside a Java Minecraft server which loads Overtone and connects to an external Supercollider instance (What Overtone uses for sound).

    Speaking of functional programming, you may find this useful.

    The graphics and music are impressive!

    February 18, 2015

    Clojure (introduction)

    Filed under: Clojure,Functional Programming — Patrick Durusau @ 2:35 pm

    Clojure (introduction) by Marko Bonaci.

    Another “Clojure? That’s a Lisp, for god’s sake!” Clojure introduction by a rehabilitated Lisp avoider.

    From some of the Lisp horror stories, I have to wonder if the C or C++ communities have agents they send out to teach Lisp. 😉

    Your experience here will be nothing like any prior unpleasant Lisp memories!

    The GitHub view of the tutorial exposes other interesting resources on Scala, Spark, and more.

    I first saw this in a tweet by Anna Pawlicka

    February 2, 2015

    Master Concurrent Processes with core.async

    Filed under: Clojure,Functional Programming,Programming — Patrick Durusau @ 7:21 pm

    Master Concurrent Processes with core.async

    From the post:

    One day, while you are walking down the street, you will be surprised, intrigued, and a little disgusted to discover a hot dog vending machine. Your scalp tingling with guilty curiosity, you won’t be able to help yourself from pulling out three Sacagawea dollars and seeing if this contraption actually works. After accepting your money, it will emit a click and a whirr, and out will pop a fresh hot dog, bun and all.

    The vending machine exhibits simple behavior: when it receives money, it releases a hot dog, then readies itself for the next purchase. When it’s out of hot dogs, it stops. All around us are hot dog vending machines in different guises, independent entities concurrently responding to events in the world according to their nature. The espresso machine at your favorite coffee shop, the pet hamster you loved as a child – everything can be modeled in terms of behavior using the general form, “when x happens, do y.” Even the programs we write are just glorified hot dog vending machines, each one an independent process waiting for the next event, whether it’s a keystroke, a timeout, or the arrival of data on a socket.

    machine

    Clojure’s core.async library allows you to create independent processes within a single program. This chapter describes a useful model for thinking about this style of programming as well as the practical details you need to actually write stuff. You’ll learn how to use channels, alts, and go blocks to create independent processes and communicate between them, and you’ll learn a bit about how Clojure uses threads and something called “parking” to allow this all to happen efficiently.

    One of the things I like the best about CLOJURE for the BRAVE and TRUE by Daniel Higginbotham is the writing style.

    Yes, most processes are more complicated than a hot dog vending machine but then the inside of a hot dog vending machine if probably more complicated than you would think as well. But the example captures enough of the essence of the vending machine to make it work.

    That’s a rare authoring talent and you should take advantage of it whenever you see it. (As in Daniel’s Clojure site.)

    January 21, 2015

    Be a 4clojure hero with Emacs

    Filed under: Clojure,Editor — Patrick Durusau @ 7:14 pm

    Be a 4clojure hero with Emacs by Artur Malabarba.

    From the post:

    This year I made it my resolution to learn clojure. After reading through the unexpectedly engaging romance that is Clojure for the Brave and True, it was time to boldly venture through the dungeons of 4clojure. Sword in hand, I install 4clojure.el and start hacking, but I felt the interface could use some improvements.

    It seems only proper to mention after Windows 10 an editor that you can extend without needing a campus full of programmers and a gaggle of marketing folks. Not to mention it is easier to extend as well.

    Artur has two suggestions/extensions that will help propel you along with 4clojure.

    Enjoy!

    I first saw this in a tweet by Anna Pawlicka.

    January 19, 2015

    More Power for Datomic Datalog: Negation, Disjunction, and Range Optimizations

    Filed under: Clojure,Datomic — Patrick Durusau @ 7:52 pm

    More Power for Datomic Datalog: Negation, Disjunction, and Range Optimizations by Stuart Halloway.

    From the post:

    Today’s Datomic release includes a number of enhancements to Datomic’s Datalog query language:

    • Negation, via the new not and not-join clauses
    • Disjunction (or) without using rules, via the new or and or-join clauses
    • Required rule bindings
    • Improved optimization of range predicates

    Each is described below, and you can follow the examples from the mbrainz data set in Java or in Clojure.

    The four hours of video in Datomic Training Videos may not be enough for you to appreciate this post but you will soon enough!

    If you want a steep walk on queries, try Datomic Queries and Rules. Not for the faint of heart.

    Enjoy!

    Datomic Training Videos

    Filed under: Clojure,Datomic,Functional Programming — Patrick Durusau @ 7:38 pm

    Datomic Training Videos by Stu Halloway.

    Part I: What is Datomic?

    Part II: The Datomic Information Model

    Part III: The Datomic Transaction Model

    Part IV: The Datomic Query Model

    Part V: The Datomic Time Model

    Part VI: The Datomic Operational Model

    About four (4) hours of videos with classroom materials, slides, etc.

    OK, it’s not Downton Abbey but if you missed it last night you have a week to kill before it comes on TV again. May as well learn something while you wait. 😉

    Pay particular attention to the time model in Datomic. Then ask yourself (intelligence community): Why can’t I do that with my database? (Insert your answer as a comment, leaving out classified details.)

    A bonus question: What role should Stu play on Downton Abbey?

    January 6, 2015

    Parsing fixed-width flat files with Clojure

    Filed under: Clojure,Data Mining — Patrick Durusau @ 9:07 am

    Parsing fixed-width flat files with Clojure by Fredrik Dyrkell.

    From the post:


    This particular file is an example file for the Swedish direct debit transaction reports. Each row is fixed 80 characters long. Previously when I’ve worked with application integration between banks and ERP systems, I’ve often encountered these types of files. It is quite handy to be able to parse them, either completely or just extract relevant information, and send on further into another system.

    Learn some Clojure and add a tool to parse fixed-width files. Nothing wrong with that!

    The example here is a bank file but fixed width reports abound in government repositories.

    Enjoy!

    I first saw this in a tweet by PlanetClojure.

    January 4, 2015

    Cascalog 2.0 In Depth

    Filed under: Cascalog,Clojure,Hadoop — Patrick Durusau @ 10:06 am

    Cascalog 2.0 In Depth by Sam Ritchie.

    From the post:

    Cascalog 2.0 has been out for over a year now, and outside of a post to the mailing list and a talk at Clojure/Conj 2013 (slides here), I’ve never written up the
    startingly long list of new features brought by that release. So shameful.

    This post fixes that. 2.0 was a big deal. Anonymous functions make it easy to reuse your existing, non Cascalog code. The interop story with vanilla Clojure is much better, which is huge for testing. Finally, users can access the JobConf, Cascading’s counters and other Cascading guts during operations.

    Here’s a list of the features I’ll cover in this post:

    • new def*ops,
    • Anonymous function support
    • Higher order functions
    • Lifting Clojure functions into Cascalog
    • expand-query
    • Using functions as implicit filters in queries
    • prepared functions, and access to Cascading’s guts

    As if that weren’t enough, 2.0 adds a standalone Cascading DSL with an API similar to Scalding’s. You can move between this Cascading API and Cascalog. This makes it easy to use Cascading’s new features, like optimized joins, that haven’t bubbled up to the Cascalog DSL.

    I’ll go over the Cascading DSL and the support for non-Cascading execution environments in a later post. For now, let’s get into it.

    If you want to follow along, go ahead and clone the Cascalog repo, cd into the “cascalog-core” subdirectory and run “lein repl”. To try this code out in other projects, run “lein sub install” in the root directory. This will install [cascalog/cascalog-core "3.0.0-SNAPSHOT"] locally, so you can add it to your project.clj and give the code a whirl.

    Belated but welcome review of the features of Cascalog 2.0!

    I particularly liked the suggested “follow along” approach of the post.

    Enjoy!

    January 2, 2015

    Clojure 2014 Year in Review

    Filed under: Clojure,Functional Programming,Programming — Patrick Durusau @ 5:52 pm

    Clojure 2014 Year in Review by Stuart Sierra.

    A good collection of links to Clojure news in 2014. Easy to scan to see if you missed anything or to revisit things you saw.

    +1!

    December 29, 2014

    Bioclojure: a functional library for the manipulation of biological sequences

    Filed under: Bioinformatics,Clojure,Functional Programming — Patrick Durusau @ 12:05 pm

    Bioclojure: a functional library for the manipulation of biological sequences by Jordan Plieskatt, Gabriel Rinaldi, Paul J. Brindley, Xinying Jia, Jeremy Potriquet, Jeffrey Bethony, and Jason Mulvenna.

    Abstract:

    Motivation: BioClojure is an open-source library for the manipulation of biological sequence data written in the language Clojure. BioClojure aims to provide a functional framework for the processing of biological sequence data that provides simple mechanisms for concurrency and lazy evaluation of large datasets.

    Results: BioClojure provides parsers and accessors for a range of biological sequence formats, including UniProtXML, Genbank XML, FASTA and FASTQ. In addition, it provides wrappers for key analysis programs, including BLAST, SignalP, TMHMM and InterProScan, and parsers for analyzing their output. All interfaces leverage Clojure’s functional style and emphasize laziness and composability, so that BioClojure, and user-defined, functions can be chained into simple pipelines that are thread-safe and seamlessly integrate lazy evaluation.

    Availability and implementation: BioClojure is distributed under the Lesser GPL, and the source code is freely available from GitHub (https://github.com/s312569/clj-biosequence).

    Contact: jason.mulvenna@qimberghofer.edu.au or jason.mulvenna@qimr.edu.au

    The introduction to this article is a great cut-n-paste “case for Clojure in bioinformatics.”

    Functional programming is a programming style that treats computation as the evaluation of mathematical functions (Hudak, 1989). In its purest form, functional programming removes the need for variable assignment by using immutable data structures that eliminate the use of state and side effects (Backus, 1978). This ensures that functions will always return the same value given the same input. This greatly simplifies debugging and testing, as individual functions can be assessed in isolation regardless of a global state. Immutability also greatly simplifies concurrency and facilitates leveraging of multi-core computing facilities with little or no modifications to functionally written code. Accordingly, as a programming style, functional programming offers advantages for software development, including (i) brevity, (ii) simple handling of concurrency and (iii) seamless integration of lazy evaluation, simplifying the handling of large datasets. Clojure is a Lisp variant that encourages a functional style of programming by providing immutable data structures, functions as first-class objects and uses recursive iteration as opposed to state-based looping (Hickey, 2008). Clojure is built on the Java virtual machine (JVM), and thus, applications developed using BioClojure can be compiled into Java byte code and ran on any platform that runs the JVM. Moreover, libraries constructed using Clojure can be called in Java programs and, conversely, Java classes and methods can be called from Clojure programs, making available a large number of third-party Java libraries. BioClojure aims to leverage the tools provided by Clojure to provide a functional interface with biological sequence data and associated programs. BioClojure is similar in intent to other bioinformatics packages such as BioPerl (Stajich et al., 2002), BioPython (Cock et al., 2009), Bio++ (Dutheil et al., 2006) and BioJava (Prlić et al., 2012) but differs from these bioinformatics software libraries in its embrace of the functional style. With the decreasing cost of biological analyses, for example, next-generation sequencing, biologists are dealing with greater amounts of data, and BioClojure is an attempt to provide tools, emphasizing concurrency and lazy evaluation, for manipulating these data.

    I like the introduction as a form of evangelism but use of Clojure and Bioclojure in bioinformatics to demonstrate its advantages is the better form of promotion.

    Evangelism works best when results are untestable, not so well when results can be counted and measured.

    December 22, 2014

    Building a System in Clojure (and ClojureScript)

    Filed under: Clojure,ClojureScript,Programming — Patrick Durusau @ 8:22 pm

    Building a System in Clojure (and ClojureScript) by Matthias Nehlsen.

    From about this book:

    This book is about building a complex system in Clojure and ClojureScript. It started out as a blog series about my BirdWatch application, a side project for reasoning about a live stream of tweets coming in from the Twitter Streaming API and visualized in a web application that is written in ClojureScript.

    In the book, we will follow the data and watch how it is transformed in different parts of the application until it finally triggers the user interface to change within a few hundred milliseconds after a tweet has been tweeted.

    For now, I have only transferred the articles from the aforementioned series, but over the holidays I will work on adapting the content to the book format and also start working on new content.

    Please sign up as a reader for free if you think you might at all be interested in the topics that will be covered. Later on, you can decide if you want to pay the suggested price or not. Of course you can also pay right away if you like, but that’s entirely up to you. In either case, you want to click the Buy Now button. Then you can select an amount between zero and infinity.

    Feedback during the writing process is much appreciated. There’s a Google Group for this purpose.

    Now is a great time to sign up as a reader or to purchase this book!

    The non-configurable push down flow of tweets in my current Twitter client is simply intolerable. I get a day or more behind in tweets and prefer to avoid attempting to accurately scroll a day or more backwards in the feed.

    Searching history plus current tweets may not do everything I want but Matthias’ book may help me tweak the interface into something more to my liking.

    While you are looking at this book, check out some of the other books and publishing model at Leanpub. I don’t have any personal experience with Leanpub but it sounds like a publishing venue worth pursuing.

    December 15, 2014

    wonderland-clojure-katas

    Filed under: Clojure,Programming — Patrick Durusau @ 8:21 am

    wonderland-clojure-katas by Carin Meier.

    From the webpage:

    These are a collection of Clojure katas inspired by Lewis Carroll and Alice and Wonderland

    Which of course makes me curious, is anyone working on Clojure katas based on The Hunting of the Snark?

    SnarkTitle1.

    Other suggestions for kata inspiring works?

    December 13, 2014

    The Ultimate Guide to Learning Clojure for Free

    Filed under: Clojure,ClojureScript,Programming — Patrick Durusau @ 10:20 am

    The Ultimate Guide to Learning Clojure for Free by Eric Normand.

    From the post:

    Are you interested in learning Clojure? Would you like to get started without risking your money on a book? Is there something that can help you even know whether you want to learn Clojure?

    Well, yes.

    I learned Clojure for free. In fact, I’m a bit of a cheapskate. For many years I would avoid spending money if there was a free alternative. I also keep an eye on resources that pop up around the internet.

    I have assembled what I believe to be the best resources to start with if you want to get into Clojure but want to spend $0.

    Eric has a focus on beginner with a few intermediate resources.

    Are there any additions you would suggest?

    I first saw this in a tweet by Christophe Lalanne.

    « Newer PostsOlder Posts »

    Powered by WordPress