276
4
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Simulating Prisoner’s Dilemma

https://suvratapte.com/simulating-prisoners-dilemma/

A recent Veritasium video got me interested in Game Theory and I decided to try to implement some of the experiments in game theory. The word “game” in game theory makes it seem that it is related to casual computer or board games. A game has some...

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

277
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

SQL generation: Golang's builder pattern vs Clojure's persistent map

https://dev.to/veer66/sql-generation-builder-pattern-vs-persistent-map-1bfl

I worked on a TODO code assignment for showing off my skills, and more importantly, showing my weak points. I coded in Golang and Masterminds/squirrel. Later, I ported only the SQL generation part to Clojure to compare and discuss why I prefer...

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

278
2
submitted 5 months ago by mindaslab@lemmy.ml to c/clojure@lemmy.ml
279
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Clojure/conj 2024 CFP

https://clojure.org/news/2024/06/07/conj-cfp

The Clojure/conj 2024 Call for Presentations is open now until July 5! We are seeking proposals for both 40 minute sessions and 10 minute lightning talks in the tracks: Language, Experience Report, Library, Tools, Ideas, and Fun. Talks can be...

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

280
2
submitted 5 months ago by clojure@clj.social to c/clojure@lemmy.ml

Clojure/conj 2024 CFP

https://clojure.org/news/2024/06/07/conj-cfp

The Clojure/conj 2024 Call for Presentations is open now until July 5! We are seeking proposals for both 40 minute sessions and 10 minute lightning talks in the tracks: Language, Experience Report, Library, Tools, Ideas, and Fun. Talks can be...

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

281
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

April and May 2024 Short-Term Project Updates

https://www.clojuriststogether.org/news/april-and-may-2024-short-term-project-updates/

We’ve got several updates to share from our Q1 and Q2 project developers. Check out the latest in their April and May reports. clj-merge tool: Kurt Harriger Compojure-api: Ambrose Bonnaire-Sergeant Instaparse: Mark Engelberg Jank: Jeaye...

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

282
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml
283
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Compromised visions are superior

https://ericnormand.substack.com/p/compromised-visions-are-superior

Real constraints force better products

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

284
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

April & May 2024 Short-Term Project Updates

https://www.clojuriststogether.org/news/april-may-2024-short-term-project-updates/

We’ve got several updates to share from our Q1 and Q2 project developers. Check out the latest in their April and May reports. clj-merge tool: Kurt Harriger Compojure-api: Ambrose Bonnaire-Sergeant Instaparse: Mark Engelberg Jank: Jeaye...

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

285
1
submitted 5 months ago by clojure@clj.social to c/clojure@lemmy.ml

Clojure Deref (June 1, 2024)

https://clojure.org/news/2024/06/01/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 and videos :arne-brasseur (tea, travel, taoism and HoC) - Lost in Lambduhhs FDB...

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

286
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Clojure Deref (June 1, 2024)

https://clojure.org/news/2024/06/01/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 and videos :arne-brasseur (tea, travel, taoism and HoC) - Lost in Lambduhhs FDB...

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

287
0
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Engenharia de software: precisa de faculdade?

https://dev.to/lucasheriques/engenharia-de-software-precisa-de-faculdade-4elm

Postato originalmente no Dev na Gringa Substack. Assine se quiser receber futuros artigos por e-mail. Eu me formei em Engenharia de Software em 2019 na PUC Minas. E me lembro bem de uma das minhas primeiras aulas na faculdade, no primeiro...

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

288
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Engenharia de software: precisa de faculdade?

https://dev.to/lucasheriques/engenharia-de-software-precisa-de-faculdade-1g59

Postato originalmente no Dev na Gringa Substack. Assine se quiser receber futuros artigos por e-mail. Eu me formei em Engenharia de Software em 2019 na PUC Minas. E me lembro bem de uma das minhas primeiras aulas na faculdade, no primeiro...

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

289
1
submitted 5 months ago by yogthos@lemmy.ml to c/clojure@lemmy.ml
290
1
submitted 5 months ago by yogthos@lemmy.ml to c/clojure@lemmy.ml

uses wget to pull audio and video data from a reddit link and ffmpeg to stitch them together

#!/usr/bin/env bb
(require '[clojure.java.shell :refer [sh]]
         '[clojure.string :as string]
         '[cheshire.core :as cheshire]
         '[org.httpkit.client :as http]
         '[clojure.walk :as walk])

(defn http-get [url]
  (-> @(http/get url {})
      :body))

(defn find-base-url [data]
  (let [results (atom [])]
    (walk/postwalk
     (fn [node]
       (when (and (string? node) (.contains node "DASH"))
         (swap! results conj node))
       node)
     data)
    (some-> @results first (string/replace #"DASH_[0-9]+\.mp4" ""))))

(defn find-best-quality [names audio?]
  (->> ((if audio? filter remove) #(.contains (.toLowerCase %) "audio") names)
       (sort-by
        (fn [n]
          (-> n
              (string/replace #"\.mp4" "")
              (string/replace #"[a-zA-Z_]" "")
              (Integer/parseInt))))
       (last)))

(defn find-parts [base-url data]
  (let [url (atom nil)
        _ (walk/prewalk
           (fn [node]
             (when (and (map? node)
                        (contains? node :dash_url))
               (reset! url (:dash_url node)))
             node)
           data)
        xml (http-get @url)
        parts (->> (re-seq #"<BaseURL>(.*?)</BaseURL>" xml) (map second))
        best-video (find-best-quality parts false)
        best-audio (find-best-quality parts true)]
    [(str base-url best-video) (str base-url best-audio)]))

(defn filename [url]
  (let [idx (inc (.lastIndexOf url "/"))]
    (subs url idx)))

(defn tsname []
  (str "video-" (System/currentTimeMillis) ".mp4"))

(let [data (-> (first *command-line-args*) (str ".json") http-get (cheshire/decode true)) 
      base-url (find-base-url data)
      [video-url audio-url] (find-parts base-url data)
      video-file (filename video-url)
      audio-file (filename audio-url)]
  (sh "wget" video-url)
  (sh "wget" audio-url)
  (sh "ffmpeg" "-i" video-file "-stream_loop" "-1" "-i" audio-file "-shortest" "-map" "0:v:0" "-map" "1:a:0" "-y" (tsname))
  (sh "rm" audio-file video-file))
291
2
submitted 5 months ago by clojure@clj.social to c/clojure@lemmy.ml

Clojure/conj 2024 Registration

https://clojure.org/news/2024/05/30/clojure-conj-registration

Clojure/conj is the oldest gathering of the Clojure community - join us for the next edition on Oct 23-25, 2024! We will be returning to the George Washington Masonic National Memorial in Alexandria, VA — we were last there in 2013. Conference...

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

292
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml
293
5
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Deploying a full-stack Clojure app with Kamal on a single server

https://bogoyavlensky.com/blog/deploying-full-stack-clojure-app-with-kamal/

Learn how to deploy a full-stack Clojure application using Kamal, covering project setup, server configuration, and automated CI/CD deployment for a seamless development experience.

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

294
3
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Clojure Goodness: Extending is Macro With Custom Assertions #Testing #Clojure

https://blog.jdriven.com/2024/05/Clojure-Goodness-Extending-is-Macro-With-Custom-Assertions/

The is macro in the clojure.test namespace can be used to write assertions about the code we want to test. Usually we provide a predicate function as argument to the is macro. The prediction function will call our code under test and return a...

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

295
3
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Programmer as Modeler

https://ericnormand.substack.com/p/programmer-as-modeler

A vision for programmers at the heart of the business

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

296
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Embracing the Left Shift Mentality in Software Testing

https://flexiana.com/2024/05/embracing-the-left-shift-mentality-in-software-testing

In the rapidly evolving landscape of software development, the left shift mentality has emerged as a pivotal strategy to enhance product quality and make every delivery count. But what exactly is left shift? In the context of software testing, left...

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

297
1
Antler - Elegy (clj.social)
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Antler - Elegy

http://langnostic.inaimathi.ca/posts/antler--elegy

We're almost at the end of the program.Week 7If you recall, an earlier Antler notes piece said Week 7 Is where you'll be asked to exit if there's judged to be no shot. Don't take it personally, but have it in mind, and see if you can put something...

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

298
2
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

Dead simple core.async job system in Clojure

https://blog.janetacarr.com/creating-a-dead-simple-asynchronous-job-system-in-clojure/

In my off time (and my on time, for that matter) I&aposve been working on this quirky thing I&aposve called Scinamalink (sounds like &aposskinamarink&apos). Scinamalink lets customers send Magic login links to their users with a single REST API...

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

299
2
submitted 5 months ago by clojure@clj.social to c/clojure@lemmy.ml

Clojure Deref (May 24, 2024)

https://clojure.org/news/2024/05/24/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 and videos :david-nolen ( + clojurescript creative) - Lost In Lambduhhs Ep 117:...

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

300
1
submitted 5 months ago by planet@clj.social to c/clojure@lemmy.ml

This Week In Python

https://dev.to/bascodes/this-week-in-python-1khk

Fri, May 17, 2024 This Week in Python is a concise reading list about what happened in the past week in the Python universe. Python Articles Homoiconic Python – McCarthy's Lisp in Python lists Lessons learned reinventing the...

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

view more: ‹ prev next ›

Clojure programming language discussion

451 readers
2 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