Archive for the ‘Functional Programming’ Category

Fundamentals of Functional Programming (email lessons)

Tuesday, February 14th, 2017

Learn the fundamentals of functional programming — for free, in your inbox by Preethi Kasireddy.

From the post:

If you’re a software developer, you’ve probably noticed a growing trend: software applications keep getting more complicated.

It falls on our shoulders as developers to build, test, maintain, and scale these complex systems. To do so, we have to create well-structured code that is easy to understand, write, debug, reuse, and maintain.

But actually writing programs like this requires much more than just practice and patience.

In my upcoming course, Learning Functional JavaScript the Right Way, I’ll teach you how to use functional programming to create well-structured code.

But before jumping into that course (and I hope you will!), there’s an important prerequisite: building a strong foundation in the underlying principles of functional programming.

So I’ve created a new free email course that will take you on a fun and exploratory journey into understanding some of these core principles.

Let’s take a look at what the email course will cover, so you can decide how it fits into your programming education.
…(emphasis in original)

I haven’t taken an email oriented course in quite some time so interested to see how this contrasts with video lectures, etc.

Enjoy!

Functional Programming in Erlang – MOOC – 20 Feb. 2017

Wednesday, February 8th, 2017

Functional Programming in Erlang with Simon Thompson (co-author of Erlang Programming)

From the webpage:

Functional programming is increasingly important in providing global-scale applications on the internet. For example, it’s the basis of the WhatsApp messaging system, which has over a billion users worldwide.

This free online course is designed to teach the principles of functional programming to anyone who’s already able to program, but wants to find out more about the novel approach of Erlang.

Learn the theory of functional programming and apply it in Erlang

The course combines the theory of functional programming and the practice of how that works in Erlang. You’ll get the opportunity to reinforce what you learn through practical exercises and more substantial, optional practical projects.

Over three weeks, you’ll:

  • learn why Erlang was developed, how its design was shaped by the context in which it was used, and how Erlang can be used in practice today;
  • write programs using the concepts of functional programming, including, in particular, recursion, pattern matching and immutable data;
  • apply your knowledge of lists and other Erlang data types in your programs;
  • and implement higher-order functions using generic patterns.

The course will also help you if you are interested in Elixir, which is based on the same virtual machine as Erlang, and shares its fundamental approach as well as its libraries, and indeed will help you to get going with any functional language, and any message-passing concurrency language – for example, Google Go and the Akka library for Scala/Java.

If you are not excited already, remember that XQuery is a functional programming language. What if your documents were “immutable data?”

Use #FLerlangfunc to see Twitter discussions on the course.

That looks like a committee drafted hashtag. 😉

Reflecting on Haskell in 2016

Monday, December 26th, 2016

Reflecting on Haskell in 2016 by Stephen Diehl.

From the post:

Well, 2016 … that just happened. About the only thing I can put in perspective at closing of this year is progress and innovation in Haskell ecosystem. There was a lot inspiring work and progress that pushed the state of the art forward.

This was a monumental year of Haskell in production. There were dozens of talks given about success stories with an unprecedented amount of commercially funded work from small startups to international banks. Several very honest accounts of the good and the bad were published, which gave us a rare glimpse into what it takes to plant Haskell in a corporate environment and foster it’s growth.

If you are at all interested in Haskell and/or functional programming, don’t miss this collection of comments and links. It will save you hours of surfing, looking for equivalent content.

Clojure/conj 2016 – Videos – Sorted

Monday, December 5th, 2016

Clojure/conf 2016 has posted videos of all presentations (thanks!) to YouTube, which displays them in no particular order.

To help with my viewing and perhaps yours, here are the videos in title order:

  1. Adventures in Understanding Documents – Scott Tuddenham
  2. Audyx.com 40k locs to build the first web – based sonogram – Asher Coren
  3. Barliman: trying the halting problem backwards, blindfolded – William Byrd, Greg Rosenblatt
  4. Becoming Omniscient with Sayid – Bill Piel
  5. Building a powerful Double Entry Accounting system – Lucas Cavalcanti
  6. Building composable abstractions – Eric Normand
  7. Charting the English Language…in pure Clojure – Alexander Mann
  8. Clarifying Rules Engines with Clara Rules – Mike Rodriguez
  9. Clojure at DataStax: The Long Road From Python to Clojure – Nick Bailey
  10. A Clojure DSL for defining CI/CD orchestrations at scale – Rohit Kumar, Viraj Purang
  11. Composing music with clojure.spec – Wojciech Franke
  12. In situ model-based learning in PAMELA – Paul Robertson, Tom Marble
  13. Juggling Patterns and Programs – Steve Miner
  14. Overcoming the Challenges of Mentoring – Kim Crayton
  15. A Peek Inside SAT Solvers – Jon Smock
  16. Powderkeg: teaching Clojure to Spark – Igor Ges, Christophe Grand
  17. Production Rules on Databases – Paula Gearon
  18. Programming What Cannot Be Programmed: Aesthetics and Narrative – D. Schmüdde
  19. Proto REPL, a New Clojure Development and Visualization Tool – Jason Gilman
  20. Simplifying ETL with Clojure and Datomic – Stuart Halloway
  21. Spec-ulation Keynote – Rich Hickey
  22. Spectrum, a library for statically "typing" clojure.spec – Allen Rohner
  23. Using Clojure with C APIs for crypto and more – lvh
  24. WormBase database migration to Datomic on AWS: A case Study – Adam Wright

Enjoy!

Type-driven Development … [Further Reading]

Saturday, October 1st, 2016

The Further Reading slide from Edwin Brady’s presentation Type-driven Development of Communicating Systems in Idris (Lamda World, 2016) was tweeted as an image, eliminating the advantages of hyperlinks.

I have reproduced that slide with the links as follows:

Further Reading

On total functional programming

On interactive programming with dependent types

On types for communicating systems:

On Wadler’s paper, you may enjoy the video of his presentation, Propositions as Sessions or his slides (2016), Propositions as Sessions, Philip Wadler, University of Edinburgh, Betty Summer School, Limassol, Monday 27 June 2016.

Exotic Functional Data Structures: Hitchhiker Trees

Sunday, September 18th, 2016

Description:

Functional data structures are awesome–they’re the foundation of many functional programming languages, allowing us to express complex logic immutably and efficiently. There is one unfortunate limitation: these data structures must fit on the heap, limiting their lifetime to that of the process. Several years ago, Datomic appeared as the first functional database that addresses these limitations. However, there hasn’t been much activity in the realm of scalable (gigabytes to terabytes) functional data structures.

In this talk, we’ll first review some of the fundamental principles of functional data structures, particularly trees. Next, we’ll review what a B tree is and why it’s better than other trees for storage. Then, we’ll learn about a cool variant of a B tree called a fractal tree, how it can be made functional, and why it has phenomenal performance. Finally, we’ll unify these concepts to understand the Hitchhiker tree, an open-source functionally persistent fractal tree. We’ll also briefly look at an example API for using Hitchhiker trees that allows your application’s state to be stored off-heap, in the spirit of the 2014 paper “Fast Database Restarts at Facebook”.

David Greenberg (profile)

Hitchhiker Trees (GitHub)

Fast Database Restarts at Facebook by Aakash Goel, Bhuwan Chopra, Ciprian Gerea, Dhrúv Mátáni, Josh Metzler, Fahim Ul Haq, Janet Wiener.

You could have searched for all the information I have included, but isn’t it more convenient to have it “already found?”

FPCasts

Tuesday, September 13th, 2016

FPCasts – Your source for Functional Programming Related Podcasts

Ten (10) sources of podcasts, with a link to the latest podcast from each source.

Without notice to the reader, the main link to each podcast series is a link to an RSS file.

Not a problem but took me by surprise on my first visit.

As useful as this will be, indexed podcasts where you could jump to a subject of interest would be even better.

Enjoy!

Category Theory 1.2

Tuesday, August 30th, 2016

Category Theory 1.2 by Bartosz Milewski.

Brief notes on the first couple of minutes:

Our toolset includes:

Abstraction – lose the details – things that were different are now the same

Composition –

(adds)

Identity – what is identical or considered to be identical

Composition and Identity define category theory.

Despite the bad press about category theory, I was disappointed when the video ended at the end of approximately 48 minutes.

Yes, it was that entertaining!

If you ever shied away from category theory, start with Category Theory 1.1 and follow on!

Or try Category Theory for Programmers: The Preface, also by Bartosz Milewski.

Elementary Category Theory and Some Insightful Examples

Saturday, August 13th, 2016

Elementary Category Theory and Some Insightful Examples (video)

From the description:

Eddie Grutman
New York Haskell Meetup (http://www.meetup.com/NY-Haskell/events/232382379/)
July 27, 2016

It turns out that much of Haskell can be understood through a branch of mathematics called Category Theory. Concepts such as Functor, Adjoints, Monads and others all have a basis in the Category Theory. In this talk, basic categorical concepts, starting with categories and building through functors, natural transformations, and universality, will be introduced. To illustrate these, some mathematical concepts such as homology and homotopy, monoids and groups will be discussed as well (proofs omitted).

Kudos to the NYC Haskell User’s Group for posting videos of its presentations.

For those of us unable to attend such meetings, these videos are a great way to remain current.

ARGUS

Tuesday, August 9th, 2016

ARGUS by Christopher Meiklejohn.

From the post:

This is one post in a series about programming models and languages for distributed computing that I’m writing as part of my history of distributed programming techniques.

Relevant Reading

  • Abstraction Mechanisms in CLU, Liskov, Barbara and Snyder, Alan and Atkinson, Russell and Schaffert, Craig, CACM 1977 (Liskov et al. 1977).
  • Guardians and Actions: Linguistic Support for Robust, Distributed Programs, Liskov, Barbara and Scheifler, Robert, TOPLAS 1982 (Liskov and Scheifler 1983).
  • Orphan Detection in the Argus System, Walker, Edward Franklin, DTIC 1984 (Walker 1984).
  • Implementation of Argus, Liskov, Barbara and Curtis, Dorothy and Johnson, Paul and Scheifer, Robert, SIGOPS 1987 (Liskov et al. 1987).
  • Distributed Programming in Argus, Liskov, Barbara CACM 1988 (Liskov 1988).

I’m thinking about how to fix an XFCE trackpad problem and while I think about that, wanted to touch up the references from Christopher’s post.

Apologies but I was unable to find a public version of: Implementation of Argus, Liskov, Barbara and Curtis, Dorothy and Johnson, Paul and Scheifer, Robert, SIGOPS 1987 (Liskov et al. 1987).

Hoping that easier access to most of the relevant reading will increase your enjoyment of Christopher’s post.

Enjoy!

Functional TypeScript

Wednesday, August 3rd, 2016

Functional TypeScript by Victor Savkin.

From the post:

When discussing functional programming we often talk about the machinery, and not the core principles. Functional programming is not about monads, monoids, or zippers, even though those are useful to know. It is primarily about writing programs by composing generic reusable functions. This article is about applying functional thinking when refactoring TypeScript code.

And to do that we will use the following three techniques:

  • Use Functions Instead of Simple Values
  • Model Data Transformations as a Pipeline
  • Extract Generic Functions

Let’s get started!

Parallel processing has been cited as a driver for functional programming for many years. It’s Time to Get Good at Functional Programming

The movement of the United States government towards being a “franchise” is another important driver for functional programming.

Code that has no-side effects can be more easily repurposed, depending on the needs of a particular buyer.

The NSA wants terabytes of telephone metadata to maintain its “data mining as useful activity” fiction, China wants telephone metadata on its financial investments, other groups are spying on themselves and/or others.

Wasteful, not to mention expensive, to maintain side-effect ridden code bases for each customer.

Prepare for universal parallel processing and governments as franchises, start thinking functionally today!

QML: A Functional Quantum Programming Language

Wednesday, August 3rd, 2016

QML: A Functional Quantum Programming Language

From the post:

QML is a functional language for quantum computations on finite types. The language introduces quantum data and quantum control structures, and integrates reversible and irreversible quantum computation. QML is based on strict linear logic, hence weakenings, which may lead to decoherence, have to be explicit.

The design of QML is guided by its categorical semantics: QML programs are interpreted as morphisms in the category FQC of Finite Quantum Computations. This provides a constructive semantics of irreversible quantum computations realisable as quantum gates. The relationships between the category FQC and its classical reversible counterpart, FCC (Finite Classical Computations), are also explored.

The operational semantics of QML programs is presented using standard quantum circuits, while a denotational semantics is given using superoperators.

This research has been supported by the EPSRC, via the MathFIT initiative, grant number GR/S30818/01. We are also involved in the EPSRC research network on the Semantics of Quantum Computation (QNET).

Having closely read Commercial National Security Algorithm Suite and Quantum Computing FAQ from the NSA, or it more popular summary, NSA Warns of the Dangers of Quantum Computing by Todd Jaquith, I know you are following every substantive publication on quantum computing.

By “substantive publication” I mean publications that have the potential to offer some insight into the development or use of quantum computers. The publications listed here qualify as “substantive” by that criteria.

With regard to the “dangers” of quantum computing, I see two choices:

  1. Reliance on government agencies who “promise” to obey the law in the future (who have broken laws in the past), or
  2. Obtain the advantages of quantum computing before such government agencies. (Or master their use more quickly.)

Unless you view “freedom” as being at the sufferance of government, may I suggest pursuit of #2 as much as interest and resources permit?

Functor Fact @FunctorFact [+ Tip for Selling Topic Maps]

Tuesday, June 28th, 2016

JohnDCook has started @FunctorFact, tweets “..about category theory and functional programming.”

John has a page listing his Twitter accounts. It needs to be updated to reflect the addition of @FunctorFact.

BTW, just by accident I’m sure, John’s blog post for today is titled: Category theory and Koine Greek. It has the following lesson for topic map practitioners and theorists:


Another lesson from that workshop, the one I want to focus on here, is that you don’t always need to convey how you arrived at an idea. Specifically, the leader of the workshop said that if you discover something interesting from reading the New Testament in Greek, you can usually present your point persuasively using the text in your audience’s language without appealing to Greek. This isn’t always possible—you may need to explore the meaning of a Greek word or two—but you can use Greek for your personal study without necessarily sharing it publicly. The point isn’t to hide anything, only to consider your audience. In a room full of Greek scholars, bring out the Greek.

This story came up in a recent conversation about category theory. You might discover something via category theory but then share it without discussing category theory. If your audience is well versed in category theory, then go ahead and bring out your categories. But otherwise your audience might be bored or intimidated, as many people would be listening to an argument based on the finer points of Koine Greek grammar. Microsoft’s LINQ software, for example, was inspired by category theory principles, but you’d be hard pressed to find any reference to this because most programmers don’t want to know or need to know where it came from. They just want to know how to use it.

Sure, it is possible to recursively map subject identities in order to arrive at a useful and maintainable mapping between subject domains, but the people with the checkbook are only interested in a viable result.

How you got there could involve enslaved pixies for all they care. They do care about negative publicity so keep your use of pixies to yourself.

Looking forward to tweets from @FunctorFact!

ClojureBridge…beginner friendly alternative to the official Clojure docs

Tuesday, June 14th, 2016

Get into Clojure with ClojureBridge

Welcome to ClojureBridge CommunityDocs, the central location for material supporting and extending the core ClojureBridge curriculum (https://github.com/ClojureBridge/curriculum). Our goal is to provide additional labs and explanations from coaches to address the needs of attendees from a wide range of cultural and technical backgrounds.

Arne Brasseur ‏tweeted earlier today:

Little known fact, the ClojureBridge community docs are a beginner friendly alternative to the official Clojure docs

Pass this along and contribute to the “beginner friendly alternative” so this becomes a well known fact.

Enjoy!

Modeling data with functional programming – State based systems

Sunday, May 22nd, 2016

Modeling data with functional programming – State based systems by Brian Lee Yung Rowe.

Brian has just released chapter 8 of his Modeling data with functional programming in R, State based systems.

BTW, Brian mentions that his editor is looking for more proof reviewers.

Enjoy!

SOAP and ODBC Erlang Libraries!

Friday, April 22nd, 2016

Bet365 donates Erlang libraries to GitHub by Cliff Saran.

From the post:

Online bookie Bet365 has released code into the GitHub open-source library to encourage enterprise developers to use the Erlang functional programming language.

The company has used Erlang since 2012 to overcome the challenges of using higher performance hardware to support ever-increasing volumes of web traffic.

“Erlang is a precision tool for developing distributed systems that demand scale, concurrency and resilience. It has been a superb technology choice in a business such as ours that deals in high traffic volumes,” said Chandru Mullaparthi, head of software architecture at Bet365.

I checked, the SOAP library is out and the ODBC library is forthcoming.

Cliff’s post ends with this cryptic sentence:

These releases represent the first phase of a support programme that will aim to address each of the major issues surrounding the uptake of Erlang.

That sounds promising!

Following @cmullaparthi to catch developing news.

Clojure/west 2016 – Videos! [+ Unix Sort Trick]

Monday, April 18th, 2016

I started seeing references to Clojure/west 2016 videos and to marginally increase your access to them, I have sorted them by author and with a Unix sort trick, by title.

Unix Sort Trick (truthfully, just a new switch to me)

Having the videos in author order is useful but other people may remember a title and not the author.

I want to sort the already created <li> elements with sort, but you can see the obvious problem.

By default, sort uses the entire line for sorting, which given the urls, isn’t going to give the order I want.

To the rescue, the -k switch for sort, which allows you to define which field and character offset in that field to use for sorting.

In this case, I used 1, the default field and then character offset 74, the first character following the > of the <a> element.

Resulted in:

In full: sort -k 1.74 sort-file.txt > sorted-file.txt

SICP [In Modern HTML]

Monday, April 18th, 2016

SICP by Andres Raba.

Poorly formatted or styled HTML for CS texts is a choice, not a necessity.

As proof I offer this new HTML5 and EPUB3 version of “Structure and Interpretation of Computer Programs” by Abelson, Sussman, and Sussman.

From the webpage:

Modern solutions such as scalable vector graphics, mathematical markup with MathML and MathJax, embedded web fonts, and syntax highlighting are used. Rudimentary scaffolding for responsive design is in place, which adapts the page for viewing on pocket devices and tablets. More tests on small screens are needed to adjust the font size and formatting, so I encourage feedback from smartphone and tablet owners.

Enjoy!

Brave Clojure: Become a Better Programmer

Wednesday, March 23rd, 2016

Brave Clojure: Become a Better Programmer by Daniel Higginbotham.

From the post:

Next week week I’m re-launching www.braveclojure.com as Brave Clojure. The site will continue featuring Clojure for the Brave and True, but I’m expanding its scope a bit. Instead of just housing the book, the purpose of the site will be to help you and the people you cherish become better programmers.

Like many other Clojurists, I fell in love with the language because learning it made me a better programmer. I started learning it because I was a bit bored and burnt out on the languages and tools I had been using. Ruby, Javascript, Objective-C weren’t radically different from each other, and after using them for many years I felt like I was stagnating.

But Clojure, with its radically different approach to computation (and those exotic parentheses) drew me out of my programming funk and made it fun to code again. It gave me new tools for thinking about software, and a concomitant feeling that I had an unfair advantage over my colleagues. So of course the subtitle of Clojure for the Brave and True is learn the ultimate language and become a better programmer.

And, four years since I first encountered Rich Hickey’s fractal hair, I still find Clojure to be an exceptional tool for becoming a better programmer. This is because Clojure is a fantastic tool for exploring programming concepts, and the talented community has created exceptional libraries for such diverse approaches as forward-chaining rules engines and constraint programming and logic programming, just to name a few.

Mark your calendar to help drive the stats for Daniel’s relaunch of www.braveclojure.com as Brave Clojure.

Email, tweet, blog, etc., to help others drive not only the relaunch stats but the stats for following weeks as well.

This could be one of those situations where your early participation and contributions will shape the scope and the nature of this effort.

Enjoy!

LANGSEC: Taming the Weird Machines (Subject Identities in Code/Data)

Saturday, March 19th, 2016

LANGSEC: Taming the Weird Machines by Jacob Torrey.

From the post:

Introduction

I want to get some of my opinions on the current state of computer security out there, but first I want to highlight some of the most exciting, and in my views, promising recent developments in security: language-theoretic security (LangSec). Feel free to skip the next few paragraphs of background if you are familiar with the concepts to get to my analysis, otherwise, buckle up for a little ride!

Background

If I were to distill the core of the LangSec movement into a single thesis it would be this: The complexity of our computing systems (both software and hardware) have reached such a degree that data must treated as formally as code. A concrete example of this is return-oriented programming (ROP), where instead of executing shellcode loaded into memory by the attacker, a number of gadgets are found in existing code (such as libc) and their addresses chained together on the stack and as the ret instruction is repeatedly called, the semantics of the gadgets is executed. This hybrid execution environment of using existing code and driving it with a buffer-overflow of data is one example of a weird machine.

Such weird machines crop up in many sorts of places: viz. the Intel x86 MMU that has been shown to be Turing-complete, the meta-data of ELF executable files that can drive execution in the loading & dynamic-linking stage, etc… This highlights the fact that data can be treated as instructions or code on these weird machines, much like Java byte-code is data to an x86 CPU, it is interpreted as code by the JVM. The JVM is a formal, explicit machine, much like the x86 CPU; weird machines on the other hand are ad hoc, implicit and generally not intentionally created. Many exploits are simply shellcode developed for a weird machine instead of the native CPU.

The “…data must be formally treated as code…” caught my eye as the reverse of “…code-as-data…,” which is a characteristic of Lisp and Clojure.

From a topic map/subject identity perspective, the problem is accepting implied subject identities and therefore implied properties and associations.

Being “implied” and not “explicit,” the interaction of subjects can change when someone, perhaps a hacker (or a fat-fingered user), supplies values that fall within the range of implied subject identities, properties, or associations.

Implied subject identities, properties, or associations, in code or data, reside in the minds of programmers, making detection well nigh impossible. At least prior to some hacker discovering an implied subject identity, property or association.

Avoiding implied subject identities, properties and associations will require work, loathsome to all programmers, but making subject identities explicit, enumerating their properties and allowed associations, in code and data, is a countable activity.

Having made subject identities explicit, capturing those results in code based on those explicit subject identities more robust. You won’t be piling implied subject identities on top of implied subject identities, or in plainer English, you won’t be writing cybersecurity software.

PS: Using a subject identity discipline does not mean you must document all of your code using XTM. You could but DSLs designed for your code/data may be more efficient.

Open Source Clojure Projects

Monday, March 14th, 2016

Open Source Clojure Projects by Daniel Higginbotham.

Daniel Higginbotham of Clojure for the Brave and True, has posted this listing of open source Clojure projects with the blurb:

Looking to improve your skills and work with real code? These projects are under active development and welcome new contributors.

You can see the source at: https://github.com/braveclojure/open-source, where it says:

Pull requests welcome!

Do you know of any other open source Clojure projects that welcome new contributors?

Like yours?

Just by way of example, marked as “beginner friendly,” you will find:

alda – A general purpose music programming language

Avi – A lively vi (a spec & implementation of vim)

clj-rethinkdb – An idomatic RethinkDB client for Clojure

For the more sure-footed:

ClojureCL – Parallel computations on the GPU with OpenCL 2.0 in Clojure

Enjoy!

Elm explained

Sunday, March 13th, 2016

Elm explained by Nik Silver.

From the webpage:

Some demonstration code and commentary to explain various fundamental features of the Elm language. The idea is mainly just to be able to read and understand Elm code, not so much how to use it well.

I will still be posting about the FBI’s efforts to rape Apple but I want to get back to delivering more technical content as well.

Enjoy!

I first saw this in a tweet by Jessica Kerr.

PS: See also: Discovering the Elm Language.

Program Derivation for Functional Languages – Tuesday, March 29, 2016 Utecht

Wednesday, March 9th, 2016

Program Derivation for Functional Languages by Felienne Hermans.

From the webpage:

Program Derivation for Functional Languages

Program derivation of course was all the rage in the era of Dijkstra, but is it still relevant today in the age of TDD and model checking? Felienne thinks so!

In this session she will show you how to systematically and step-by-step derive a program from a specification. Functional languages especially are very suited to derive programs for, as they are close to the mathematical notation used for proofs.

You will be surprised to know that you already know and apply many techniques for derivation, like Introduce Parameter as supported by Resharper. Did you know that is actually program derivation technique called generalization?

I don’t normally post about local meetups but as it says in the original post, Felienne is an extraordinary speaker and the topic is an important one.

Personally I am hopeful that at least slides and/or perhaps even video will emerge from this presentation.

If you can attend, please do!

In the meantime, if you need something to tide you over, consider:

A Calculus of Functions for Program Derivation by Richard Bird (1987).

Lectures on Constructive Functional Programming by R.S. Bird (1988).

Richard Bird’s Publication page.

A brief introduction to the derivation of programs by Juris Reinfelds (1986).

Dimpl: An Efficient and Expressive DSL for Discrete Mathematics

Sunday, February 28th, 2016

Dimpl: An Efficient and Expressive DSL for Discrete Mathematics by Ronit Jha.

Abstract:

This paper describes the language DIMPL, a domain-specific language (DSL) for discrete mathematics. Based on Haskell, DIMPL carries all the advantages of a purely functional programming language. Besides containing a comprehensive library of types and efficient functions covering the areas of logic, set theory, combinatorics, graph theory, number theory and algebra, the DSL also has a notation akin to one used in these fields of study. This paper also demonstrates the benefits of DIMPL by comparing it with C, Fortran, MATLAB and Python &emdash; languages that are commonly used in mathematical programming.

From the comparison, solving simultaneous linear equations:

dimpl

Much more is promised in the future for DIMPL:

Future versions of DIMPL will have an extended library comprising of modules for lattices, groups, rings, monoids and other discrete structures. They will also contain additional functions for the existing modules such as Graph and Tree. Moreover, incorporating Haskell’s support for pure parallelism and explicit concurrency in the library functions could significantly improve the efficiency of some functions on multi-core machines.

Can you guess the one thing that Ronit left out of his paper?

You guessed it!

Discrete Mathematics Programming Language – A Domain-Specific Language for Discrete Mathematics.

The Github URL for the repository. 😉

You should check out his homepage as well.

I have only touched the edges of this paper but it looks important.

Comments/suggestions?

I first saw this in a tweet by José A. Alonso

27 Reasons to Attend Clojure/West 2016 + Twitter List

Wednesday, February 17th, 2016

Clojure/West 2016 Speakers

I extracted the speaker list plus twitter accounts where available from the speakers list for Clojure/West 2016.

Now you have twenty-seven reasons to attend! Stack those up against any to not attend.

Register: April 15th-16th, Seattle Marriott Waterfront

April 15th is “tax day” in the United States.

Wouldn’t you rather be having fun with Clojure than grubbing around with smudged and/or lost receipts? I thought so. Register today!

Whether the government picks you pocket one day or the next makes little difference.

File early and attend while the tax hounds try to decide if Thai numerals printed in Braille are a legitimate tax return. 😉

  1. Matthias Felleisen Types are like the Weather, Type Systems are like Weathermen
  2. Alex Kehayias Functional Game Engine Design for the Web
  3. Allison Carter, From Fluxus to Functional: A Journey Through Interactive Art
  4. Amie Kuttruff, Deepen and Diversify the Clojure Community with Jr Engineers
  5. Aysylu Greenberg, (+ Loom (years 2))
  6. Bryce Covert, USE lisp WITH game – Making an Adventure Game with Clojure
  7. Christopher Small, Datalog all the way down
  8. Claire Alvis, Creating DSLs – a tale of spec-tacular success and failure
  9. Daniel Higginbotham, Parallel Programming, Fork/Join, and Reducers
  10. Devon Peticolas, One Million Clicks per Minute with Kafka and Clojure
  11. Donevan Dolby, Managing one of the world’s largest Clojure code bases
  12. Gerred Dillon, ClojureScript and Lambda: A Case Study
  13. Ghadi Shayban, Parsing Text with a Virtual Machine
  14. Jack Dubie, Fast full stack testing in om.next
  15. Jonathan Boston, Caleb Phillips, Building a Legal Data Service with Clojure
  16. Katherine Fellows, Anna Pawlicka, ClojureBridge in Practice
  17. Mario Aquino, The Age of Talkies
  18. Michael Drogalis, Inside Onyx
  19. Michał Marczyk, defrecord/deftype in Clojure and ClojureScript
  20. Mikaela Patella, Web Development is Distributed Systems Programming
  21. Nathan Marz, Specter: powerful and simple data structure manipulation
  22. Nathan Sorenson, Hybrid Automata and the Continuous Life
  23. Patrick O’Brien, Braid Chat: Reifying Online Group Conversations
  24. Paula Gearon, Production Rules in Datomic
  25. Peter Schuck Hash Maps: more room at the bottom
  26. Priyatam Mudivarti, Caching half a billion user transactions
  27. Stuart Sierra, The Joys and Perils of Interactive Development

PS: Be careful how you use the term “weathermen.” The professionally paranoid in government remember a different meaning that what you may intend. As do some of the rest of us.

Clojure for the Brave and True (Google Group)

Saturday, February 13th, 2016

Clojure for the Brave and True (Google Group) by Daniel Higginbotham.

First there was the website: Clojure for the Brave and True.

Then there was the book: Clojure for the Brave and True.

But before the book there was Daniel’s twitter account: @nonrecursive.

There’s no truth to the rumor of a free print trade publication with the title: Clojure for the Brave and True so please direct your questions and answers to:

Clojure for the Brave and True (Google Group)

Enjoy!

Designing with Data (Clojure)

Thursday, February 11th, 2016

Designing with Data by Michael Dorgalis.

Slides from keynote at Clojure Remote 2016.

Without the video of the presentation, the usual difficulties of using slides in isolation obtain.

On the plus side, you have to work harder for the information and that may enhance your retention/comprehension.

Enjoy!

Clojure for Data Science [Caution: Danger of Buyer’s Regret]

Saturday, February 6th, 2016

Clojure for Data Science by Mike Anderson.

From the webpage:

Presentation given at the Jan 2016 Singapore Clojure Users’ Group

You will have to work at the presentation because there is no accompanying video, but the effort will be well spent.

Before you review these slides or pass them onto others, take fair warning that you may experience “buyer’s regret” with regard to your current programming language/paradigm (if not already Clojure).

However powerful and shiny your present language seems now, its luster will be dimmed after scanning over this slides.

Don’t say you weren’t warned ahead of time!

BTW, if you search for “clojure for data science” (with the quotes) you will find among other things:

Clojure for Data Science Progressing by Henry Garner (Packt)

Repositories for the Clojure for Data Science Processing book.

@cljds Clojure Data Science twitter feed (Henry Garner). VG!

Clojure for Data Science Some 151 slides by Henry Garner.

Plus:

Planet Clojure, a metablog that collects posts from other Clojure blogs.

As a close friend says from time to time, “clojure for data science,”

G*****s well.” 😉

Enjoy!

New Clojure website is up!

Thursday, January 14th, 2016

Clojure

From the website:

Clojure is a robust, practical, and fast programming language with a set of useful features that together form a simple, coherent, and powerful tool.

The Clojure Programming Language

Clojure is a dynamic, general-purpose programming language, combining the approachability and interactive development of a scripting language with an efficient and robust infrastructure for multithreaded programming. Clojure is a compiled language, yet remains completely dynamic – every feature supported by Clojure is supported at runtime. Clojure provides easy access to the Java frameworks, with optional type hints and type inference, to ensure that calls to Java can avoid reflection.

Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy and a powerful macro system. Clojure is predominantly a functional programming language, and features a rich set of immutable, persistent data structures. When mutable state is needed, Clojure offers a software transactional memory system and reactive Agent system that ensure clean, correct, multithreaded designs.

I hope you find Clojure’s combination of facilities elegant, powerful, practical and fun to use.

Rich Hickey
author of Clojure and CTO Cognitect

I think the green color scheme in the header was intended to tie in with the download link for Clojure 1.7.0. 😉

If you haven’t downloaded Clojure 1.7.0, what are you waiting for?

Enjoy!

Clojure Distilled

Tuesday, January 5th, 2016

Clojure Distilled by Dmitri Sotnikov.

From the post:

The difficulty in learning Clojure does not stem from its syntax, which happens to be extremely simple, but from having to learn new methods for solving problems. As such, we’ll focus on understanding the core concepts and how they can be combined to solve problems the functional way.

All the mainstream languages belong to the same family. Once you learn one of these languages there is very little effort involved in learning another. Generally, all you have to do is learn some syntax sugar and the useful functions in the standard library to become productive. There might be a new concept here and there, but most of your existing skills are easily transferable.

This is not the case with Clojure. Being a Lisp dialect, it comes from a different family of languages and requires learning new concepts in order to use effectively. There is no reason to be discouraged if the code appears hard to read at first. I assure you that the syntax is not inherently difficult to understand, and that with a bit of practice you might find it to be quite the opposite.

The goal of this guide is to provide an overview of the core concepts necessary to become productive with Clojure. Let’s start by examining some of the key advantages of the functional style and why you would want to learn a functional language in the first place.

Dmitri says near the end, “…we only touched on only a small portion of the overall language…,” but it is an impressive “…small portion…” and is very likely to leave you wanting to hear more.

The potential for immutable data structures in collaborative environments is vast. I’ll have something longer to post on that next week.

Enjoy!