Model-View-Controller, a classic architectural pattern in Clojure
Planet Clojure
by Janet A. Carr
1d ago
I&aposm sure for some of you Model-View-Controller (MVC) resembles more of an anti-pattern than something to reach for when writing Clojure, but I think it&aposs a great example of what architecture should accomplish, especially what can be accomplished in Clojure. MVC decouples state, state changes, and state usage. One way to compose this architecture uses three classic software design patterns: Strategy as our controller to update the model, observer to notify the view and controller, and composite as our view hierarchy. MVC diagram If we want to do this in Clojure, we can use the ..read more
Visit website
Why Clojure?
Planet Clojure
by tammy cravit
2d ago
This is going to be the first post in a series about Clojure and how to get started with it. In this post, I’ll talk about what Clojure is, why it’s interesting to learn, and how to get a Clojure environment set up on your system. In subsequent posts, I’ll dive into the basics of Clojure and give you some pointers for how to get started with it. What is Clojure? Clojure is a functional progra ..read more
Visit website
Why Clojure?
Planet Clojure
by tammy cravit
2d ago
This is going to be the first post in a series about Clojure and how to get started with it. In this post, I’ll talk about what Clojure is, why it’s interesting to learn, and how to get a Clojure environment set up on your system. In subsequent posts, I’ll dive into the basics of Clojure and give you some pointers for how to get started with it. What is Clojure? Clojure is a functional progra ..read more
Visit website
ClojureScript UIs in 500 Bytes
Planet Clojure
by Chris McCormick
2d ago
tl;dr: you can generate very small (less than 1k) JS artifacts from ClojureScript with some tradeoffs. I worked out a list of rules to follow and made the cljs-ultralight library to help with this. Most of the web apps I build are rich front-end UIs with a lot of interactivity. Quite often they are generating audio in real time and performing other complicated multimedia activites. This is where ClojureScript and shadow-cljs really shine. All of the leverage of a powerful LISP with its many developer-friendly affordances (editor integration, hot-loading, interop, repl) brought to bear, allowi ..read more
Visit website
Bad nREPL: 10 Things You Hate About nREPL
Planet Clojure
by Bozhidar Batsov
2d ago
New is always better. – Barry Stinson, Senior Clojure developer Over the years I’ve heard countless complaints about nREPL and its numerous perceived flaws. I dawned me today that it might be a good idea to write this “living”1 article that will try to catalog and address some of them. I’ll focus mostly on the common complaints in the Clojure community, but I’ll also touch upon some of the broader perceived issues with the nREPL protocol itself. Bencode sucks A lot has been said about the choice of Bencode for encoding data between the client and the server. The format was very primitive the ..read more
Visit website
The Fibonacci Sequence in Clojure
Planet Clojure
by tammy cravit
2d ago
I was playing around this morning, and I decided to see what I could find about implementing the Fibonacci sequence in Clojure. For those unfamiliar with the Fibonacci sequence, which is named for a 13th-century Italian mathematician, it is a deceptively simple mathematical sequence where each term is constructed by the following rules: If n = 0, then fib(n) = 0 If n = 1, then fib(n) = 1 ..read more
Visit website
Finding Clojure: New Beginnings
Planet Clojure
by Quick Blogger
3d ago
Introduction Sometimes, in a vast and healthy developer ecosystem of a language like Clojure, it can be difficult to know where to get started when you want to build an application. The target audience of this series is developers who have some Clojure syntax in their hands and want to start building applications. Over a series of posts we'll build stagehand, a web application for managing an inventory of servers. In this case, an inventory is, in the style of Ansible, a collection of data including system and network information. Specifically, the Servers in our inventory can be: Grouped int ..read more
Visit website
First edition of my Clojure book is launched
Planet Clojure
by Karthikeyan A K.
6d ago
I am happy that first edition of my Clojure book is launched, one can get it here. I thank all those who have helped me to achieve this. Though I have put myself as the author many have contributed to it, for example the AsciiDoctor project, Language Tools, the Free Software Foundation and so on, to name a few. I am committed to learn Clojure more to make myself a better software engineer, and I will be documenting my work here. I plan to release video tutorial of my book soon, it too will be libre and gratis. I might release 2nd edition of my book by Jan 2024 where it will contain more secti ..read more
Visit website
Why I decided to learn (and teach) Clojure
Planet Clojure
by Marcio Frayze
1w ago
In 2017 I started to learn more about the universe of Functional Programming. This paradigm was gaining traction and most object-oriented programming languages ​​were adding more and more features inspired by this paradigm, including the language that I used the most: Java. After the JDK 8 release in March 2014, it became common to hear Java developers using terms like: functional programming, streams, optional, map, flat map, etc. But many people around me still ignored these new features and, I confess, it took me a while to adopt them. The ideas sounded very interesting, but putting them in ..read more
Visit website
Strategy pattern in Clojure
Planet Clojure
by Karthikeyan A K.
1w ago
Notes clj꞉user꞉> ; Use `alt+enter` to evaluate ;; strategy pattern (+ 4 3) 7 clj꞉user꞉> (* 4 3) 12 clj꞉user꞉> ((if true + *) 4 3) 7 clj꞉user꞉> ((if false + *) 4 3) 12 clj꞉user꞉> (defn add [a b] (+ a b)) #'user/add clj꞉user꞉> (defn multiply [a b ] (* a b)) #'user/multiply clj꞉user꞉> ((if false add multiply) 4 3) 12 clj꞉user꞉> ((if true add multiply) 4 3) 7 ..read more
Visit website

Follow Planet Clojure on Feedspot

Continue with Google
Continue with Apple
OR