Clojure programming language discussion

440 readers
1 users here now

Clojure is a Lisp that targets JVM and JS runtimes

Finding information about Clojure

API Reference

Clojure Guides

Practice Problems

Interactive Problems

Clojure Videos

The Clojure Community

Clojure Books

Tools & Libraries

Clojure Editors

Web Platforms

founded 4 years ago
MODERATORS
1
 
 

Clojure Deref (Oct 3, 2024)

https://clojure.org/news/2024/10/03/deref

Welcome to the Clojure Deref! This is a weekly link/news roundup for the Clojure ecosystem (feed: RSS). Thanks to Anton Fonarev for link aggregation. Podcasts, videos, and media Maintainable Clojure code: Visualizing structure and quality...

#clojure #clj #cljs !clojure@lemmy.ml @clojure@lemmy.ml

2
 
 

Breakout Game in ClojureDart

https://buttondown.com/tensegritics-curiosities/archive/game-tutorial-in-clojuredart/

This issue is about following the Flame’s Brick Breaker tutorial in ClojureDart. This was prompted by Ian Chow (who just released a CLJD app onto the stores) mentioning, en passant, he struggled to port this tutorial. We couldn’t let this slip, so...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

3
 
 

I've created a small library that allows to create mock functions. You can record the calls to the function and check arguments with it. It happened to me multiple times that somebody has changed the function that was mocked and it didn't comply with the values returned by mock or the function was called differenty in the code.

I recently added a support for instrumentation of mock functions with Malli schemas. If you declare a mock for a function that has Malli function schema, it will instrument the mock. This allows to discover mocks returning invalid values or accepting invalid arguments or the number of arguments.

Here's an example:

(require '[malli.core :as m])

(m/=> my-inc [:=> [:cat :int] :int])
(defn my-inc [x]
  (inc x))

;; You have to provide a symbol of function 
;; or with or without namespace (aliases are supported).
(def my-inc-mock (mock-fn 'my-inc 1))

(my-inc-mock 0)
;=> 1

(my-inc-mock "foo")
;=> An exception ::invalid-input

(def my-inc-mock2 (mock-fn 'my-inc nil))
(my-inc-mock2 1)
;=> An exception ::invalid-output

This instrumentation works also with a macro for defining mocks.

(with-mocks [my-inc 2]
  (my-inc "foo"))
;=> An exception ::invalid-input

(with-mocks [my-inc nil]
  (my-inc 1))
;=> An exception ::invalid-output
4
 
 

Holy Dev Newsletter September 2024

https://blog.jakubholy.net/2024/09-newsletter/

Welcome to the Holy Dev newsletter, which brings you gems I found on the web, updates from my blog, and a few scattered thoughts. You can get the next one into your mailbox if you subscribe.What is happeningI have been to Heart of Clojure in...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

5
 
 

Functional Programming Languages

https://ericnormand.me/functional-programming-languages

A list of the functional programming languages you can build a career on and use at work.

#clojure #clj #cljs !clojure@lemmy.ml @clojure

6
 
 

Backwards Game of Life

http://pepijndevos.nl/2024/10/01/backwards-game-of-life.html

I got a litlte bit nerd sniped by the following video and decided to implement game of life in clojure.core.logic, because any logic program can be evaluated forwards and backwards. Without further ado here is my implementation: (ns...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

7
 
 

Migrating terabytes of data instantly (can your ALTER TABLE do this?)

https://blog.redplanetlabs.com/2024/09/30/migrating-terabytes-of-data-instantly-can-your-alter-table-do-this/

Every seasoned developer has been there: whether it’s an urgent requirement change from your business leader or a faulty assumption revealing itself after a production deployment, your data needs to change, and fast. Maybe a newly-passed tariff...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

8
 
 

Messages from our Sponsors (including jobs 🏢👨‍💻👩🏽‍💼💻)

https://gaiwan.co/blog/messages-from-our-sponsors-including-job-openings-2/

Hope everyone had a wonderful time at Heart of Clojure last week! After the pandemic shutdowns, it&aposs been so hard to find communities meeting in person, so I&aposm proud that we made Heart of Clojure happen for 250+ Clojure and functional...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

9
10
11
 
 

Generating multiplication tables with Clojure

https://clojure-diary.gitlab.io/2024/09/29/generating-multiplication-tables-with-clojure.html

Code (defn single-line [number multiplicant] (str number " X " multiplicant " = " (* number multiplicant))) ;; (def num 5) ;; (println ;; (clojure.string/join "\n" ;; (map single-line (repeat 10 5) (range 1...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

12
 
 

Clojure Deref (Sept 26, 2024)

https://clojure.org/news/2024/09/26/deref

Welcome to the Clojure Deref! This is a weekly link/news roundup for the Clojure ecosystem (feed: RSS). Thanks to Anton Fonarev for link aggregation. Podcasts, videos, and media Apropos 2024-09-24 - Apropos Clojure Did you know CoPilot...

#clojure #clj #cljs !clojure@lemmy.ml @clojure@lemmy.ml

13
 
 

Heart of Clojure - An Indeterminate Consequential Conference

https://gaiwan.co/blog/heart-of-clojure-an-indeterminate-consequential-conference/

After coming back to Taiwan, a LinkedIn post written by a Clojurian who attended Heart of Clojure soon caught my eye.Perhaps it&aposs time for some small, new, and incredibly neat and performant Clojure-based consultancy to be born, hmm?It sounds...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

14
 
 
15
16
17
 
 

Behavioral Programming in Clojure

https://thomascothran.tech/2024/09/in-clojure/

Behavioral Programming is a relatively new programming paradigm that excels at isolating and composing behaviors in event driven system. It is unrelated to behavior driven development. Behavioral programming was invented by David Harel, who also...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

18
 
 

Visualizing TVTropes - Part 2: Neo4j optimizations

http://numergent.com/2015-04/Visualizing-TVTropes-Part-2-Neo4j-optimizations.html

Welcome. You may want to first catch up on Part 1 of this little experiment.All done? OK then.The whittlingSo we have 220k nodes and 16MM relationships. Querying through them is less than speedy, even after we’ve ensured we’re using Neo4j’s...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

19
 
 

Visualizing TVTropes - Part 3: Proper batching

http://numergent.com/2015-04/Visualizing-TVTropes-Part-3-Proper-batching.html

The story so farYesterday we were discussing our (admittedly) somewhat ghetto, not-quite-batched Neo4j implementation.The long and short of it is that I was initially attacking the import process as one would on a JDBC client for a relational...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

20
 
 

Contract Programmer Seeks Job in Cambridge (£500 reward)

http://www.learningclojure.com/2024/09/contract-programmer-seeks-job-in.html

Anyone in Cambridge need a programmer? I'll give you £500 if you can find me a job that I take.CV at http://www.aspden.comI make my usual promise, which I have paid out on several times:If, within the next six months, I take a job which lasts...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

21
 
 

Datomic and Content Addressable Techniques: An Ultimate Data Wonderland

https://www.latacora.com/blog/2024/09/13/datomic-and-content-addressable-techniques/

Latacora collects and analyzes data about services our clients use. You may have read about our approach to building security tooling, but the tl;dr is we make requests to all the (configuration metadata) read-only APIs available to us and store...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

22
 
 

ClojureScript and Chrome extensions

http://numergent.com/2015-09/ClojureScript-and-Chrome-extensions.html

There’s not as much documentation on building a Chrome extension with ClojureScript, so I thought I’d document my findings on the current state of libraries.Yes, you can of course build Chrome extensions with ClojureScript, as other articles have...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

23
 
 

Clojure Deref (Sept 19, 2024)

https://clojure.org/news/2024/09/19/deref

Welcome to the Clojure Deref! This is a weekly link/news roundup for the Clojure ecosystem (feed: RSS). Thanks to Anton Fonarev for link aggregation. From the core Hey, it’s that time again - PLEASE fill out the 2024 State of Clojure survey....

#clojure #clj #cljs !clojure@lemmy.ml @clojure@lemmy.ml

24
 
 

JUXT Cast: Static vs Dynamic Typing - A Balanced Discussion on Modern Programming Practices

https://juxt.pro/blog/dynamic-vs-static-with-jake-howard

In this podcast episode, JUXT's leadership team and guest Jake Howard explore the benefits of dynamic typing and its role in today’s development landscape - Video.

#clojure #clj #cljs !clojure@lemmy.ml @clojure

25
 
 

Building a podcast with Clojure

https://jmglov.net/blog/2024-09-18-podcast-soundcljoud.html

In addition to spending far too much of my time doing silly things with Clojure and then even farther too much of my time writing about doing silly things with Clojure, I spend some of my time thinking about, talking about, and participating in...

#clojure #clj #cljs !clojure@lemmy.ml @clojure

view more: next ›