News

GitHub - clojure/data.csv

Contribute to clojure/data.csv development by creating an account on GitHub.

Advent 2019 part 11, Integrant in Practice

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I’ve been a fan ...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I’ve been a fan of Integrant pretty much ever since it...

Hard CIDER: Find Usages | Meta Redux

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. The ...

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. The State of CIDER survey was super insightful for me on many levels. Here’s one example - I realized that users might have missed some recent developments. A few people had commented it’d be nice if CIDER had a build-in “find usages (references)” functionality and funny enough - it already has this.

GitHub - matthewdowney/excel-clj: Declarative generation of Excel documents & PDFs with Clojure from higher level abstractions (tree, table) or via a manual grid specification.

Declarative generation of Excel documents & PDFs with Clojure from higher level abstractions (tree, table) or via a manual grid specificati...

Declarative generation of Excel documents & PDFs with Clojure from higher level abstractions (tree, table) or via a manual grid specification. - matthewdowney/excel-clj

Advent 2019 part 10, Hillcharts with Firebase and Shadow-cljs

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Recently I led a w...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Recently I led a workshop for a client to help them...

State of CIDER 2019 Results | Meta Redux

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. It t...

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. It took me a while to write this article, but it’s finally here. I’ve opted to group related questions into several broader themes. Here we go… Note: You can find all the raw data from the survey here. I couldn’t figure out how to share with everyone the diagrams (mostly pie charts) that I got from Google Forms directly with you. If someone know how to do this - please, let me know.

GitHub - athos/postmortem: A tiny value-oriented debugging tool for Clojure(Script), powered by transducers

A tiny value-oriented debugging tool for Clojure(Script), powered by transducers - athos/postmortem

Advent 2019 part 9, Dynamic Vars in ClojureScript

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Clojure has this g...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Clojure has this great feature called Dynamic Vars, it...

PaperCall.io - Clojure/north 2020

From Lazy Lisper to Confident Clojurist - Alexander Oloo - YouTube

The Clojure community is filled with really smart people, with great ideas writing very few tutorials and less documentation. At times it c...

The Clojure community is filled with really smart people, with great ideas writing very few tutorials and less documentation. At times it can be quite intimi...

Clojure shootout: keep vs filter

Oh no, it happened again it’s time to filter or keep you ponder for hours it’s so you don’t know which way to go

GitHub - liquidz/daddy: Small configuration management tool for Clojure

Small configuration management tool for Clojure. Contribute to liquidz/daddy development by creating an account on GitHub.

Advent 2019 part 8, Everything is (not) a pipe

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I’ve always been...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I’ve always been a big UNIX fan. I can hold my own in a...

Journal 2019.24 - spec and-, tools.deps.graph – Inside Clojure

Tales of Developing Clojure

A Guiler's Year of Racket - YouTube

by Christopher Webber At: FOSDEM 2019 https://video.fosdem.org/2019/K.4.201/guileracket.webm Having used Guile for the previous number of y...

by Christopher Webber At: FOSDEM 2019 https://video.fosdem.org/2019/K.4.201/guileracket.webm Having used Guile for the previous number of years and being an ...

Developer Economics Survey | Developer tools, apps, design, games

The Developer Economics survey is run by independent analyst firm /Data, reaching over 40,000+ developers in 167 countries annually. It is ...

The Developer Economics survey is run by independent analyst firm /Data, reaching over 40,000+ developers in 167 countries annually. It is for Software developers: professionals, hobbyists & students, working across all major areas: mobile, web, desktop, cloud, IoT, AR/VR, games, ML & data science.

GitHub - magnetcoop/object-storage.ftp: A library that provides an Integrant key for managing objects in a FTP server.

A library that provides an Integrant key for managing objects in a FTP server. - magnetcoop/object-storage.ftp

Advent 2019 part 5, Clojure in the shell

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I already showed y...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. I already showed you netcat, and how it combines...

These are the Voyages of the Porkostomus: MECCA Paint

ESP32-wrover-cljs-advanced.md · GitHub

GitHub Gist: instantly share code, notes, and snippets.

Pimp my Print Method: Prettier Clojure Built-in Types | Meta Redux

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. Trus...

This article is part of the “Meta Advent 2019” series. I’ve committed to writing a new blog post here every day until Christmas. Trust me, it wasn’t easy to find the right name for this article. I started off with the pompous sounding “Improving the Printed Representation of Certain Clojure Built-in Object Types” and needed half an hour to come to the current title. Naming is hard! So, what’s the fancy sounding title all about? Have you noticed that many Clojure types are not represented in a particularly “user-friendly” way in the REPL?1 Here are a few examples: Clojure 1.10.1 user=> + #object[clojure.core$_PLUS_ 0x2bc12da "[email protected]"] user=> print-method #object[clojure.lang.MultiFn 0x3122b117 "[email protected]"] user=> (atom 5) #object[clojure.lang.Atom 0x17ae7628 {:status :ready, :val 5}] user=> (find-ns 'clojure.core) #object[clojure.lang.Namespace 0x5b78fdb1 "clojure.core"] Here we have a function, a multi-method, an atom and a namespace object. While when you’re used to Clojure their printed representations probably make sense to most people, they certainly are confusing to newcomers. The representation of + in particular is pure gold when it comes to clarity. The real question, however, is “Can we do better than this?”. Yes, we can! People using CIDER or editors backed by cider-nrepl (e.g. vim-fireplace and Calva) might be confused by the examples I gave, because they’d get something pretty different in their REPLs. Let’s do this one more time in CIDER’s REPL: user> + #function[clojure.core/+] user> print-method #multifn[print-method 0x757ca063] user> (atom 5) #<[email protected]: 5> user> (find-ns 'clojure.core) #namespace[clojure.core] I don’t know about you, but I find this version much easier to comprehend. So, time for the crux of this article - how did we achieve this? It’s pretty simple actually - we simply leveraged print-method, a built-in Clojure multi-method that controls how an object gets printed. Here’s an excerpt from the actual implementation: (def ^:dynamic *pretty-objects* "If true, cider prettifies some object descriptions. For instance, instead of printing functions as #object[clojure.core$_PLUS_ 0x4e648e99 \"[email protected]\"] they are printed as #function[clojure.core/+] To disable this feature, do (alter-var-root #'cider.nrepl.print-method/*pretty-objects* not)" true) (defmacro def-print-method [dispatch-val arg & strings] `(defmethod print-method ~dispatch-val [~arg ~'^Writer w] (if *pretty-objects* (do [email protected](map #(list '.write 'w %) strings)) (#'clojure.core/print-object ~arg ~'w)))) (defn- translate-class-name [c] (main/demunge (.getName (class c)))) ;;; Atoms ;; Ex: #atom[{:foo :bar} 0x54274a2b] (def-print-method Atom c "#atom[" (pr-str @c) (format " 0x%x]" (System/identityHashCode c))) ;;; Function objects ;; Ex: #function[cider.nrepl.print-method/multifn-name] (def-print-method AFunction c "#function[" (translate-class-name c) "]") It’s a bit more complicated than it needs to be, mostly because of the wrapper def-print-method macro that makes each print-method aware of a dynamic var that controls the pretty-printing. It’s needed in a tool like CIDER, in case some users don’t like the different printing, but I guess most people won’t need this if they’re just tweaking something in their local setup. All in all - you need this code in some namespace that gets required early-on in your application and you’re done. That’s exactly what cider-nrepl does. While writing this article I also realized that I should really move this code to Orchard, as it’s not nREPL-specific in any way, and having it as part of Orchard would make it easier for more people to reuse the code directly. The technique is not without its flaws, though. Recently a CIDER user ran into the following problem:2 (defrecord Foo [] clojure.lang.IDeref (deref [x] x) ) (Foo.) ;; => ;; 2. Unhandled clojure.lang.ExceptionInfo ;; ;; 1. Caused by java.lang.IllegalArgumentException ;; Multiple methods in multimethod 'simple-dispatch' match dispatch value: class ;; scratch.Foo -> interface clojure.lang.IDeref and interface ;; clojure.lang.IPersistentMap, and neither is preferred Solving the problem is as easy as adding: (prefer-method print-method clojure.lang.IPersistentMap clojure.lang.IDeref) Still, I do believe that implementing IDeref in a record is a bad idea, and I’m also reasonably sure this is the only bug report we’ve got in the 5 years since this feature was added to CIDER. This leads me to believe it works fairly well for most people. That’s all I had for you today. I hope you managed to learn something useful. See you tomorrow! For my definition of “user-friendly” I guess. ↩ This bug report was my inspiration to write the article you’re now reading. ↩

String Similarity Made Easy | Martín Varela

The setting For a few years now I've had an itch to scratch, namely, finding a nice way of keeping a normalized bibliographic database to u...

The setting For a few years now I've had an itch to scratch, namely, finding a nice way of keeping a normalized bibliographic database to use with LaTeX 1. BibTeX unfortunately lends itself to a lot of variability in how entries are stored, and in my experience, it's always been slightly painful to work with, especially when collaborating with other authors. Very often entries are incomplete, or repeated under different keys, or use inconsistent formatting (e.

Advent 2019 part 4, A useful idiom

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Here’s a little ...

This post is part of Advent of Parens 2019 , my attempt to publish one blog post a day during the 24 days of the advent. Here’s a little Clojure idiom that never fails to bring...

DevOps: The magic of going back in time with Datomic (August Lilleaas' blog)

The CRUD blog

AWS Lambda announces Provisioned Concurrency