This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-22
Channels
- # announcements (17)
- # beginners (11)
- # biff (5)
- # calva (22)
- # cider (30)
- # clj-kondo (33)
- # clj-on-windows (20)
- # clojure (59)
- # clojure-dev (25)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (13)
- # clojure-sweden (5)
- # clojure-uk (6)
- # clojurescript (5)
- # community-development (2)
- # cursive (4)
- # datahike (5)
- # datalevin (7)
- # datomic (11)
- # emacs (8)
- # events (1)
- # gratitude (1)
- # hoplon (5)
- # hyperfiddle (1)
- # lsp (59)
- # matrix (11)
- # polylith (14)
- # portal (3)
- # practicalli (1)
- # rdf (2)
- # reitit (9)
- # releases (3)
- # rum (5)
- # yamlscript (6)
As a beginner I'm curious about the benefits of using Datomic with Clojure versus a SQL database. I recognize my familiarity bias. In my small corner of the JavaScript world I had never heard of Datomic until I started learning Clojure. Is Datomic often used in production Clojure projects? Or is SQL still the overwhelming standard?
Both are common. I don't think there is any data sample that actually answers this question though.
You may with a clear conscience separate the two questions. NoSQL with Datalog is a very splendiferous thing (relative to SQL). And Clojure is a very splendiferous thing (relative to you-name-it). In fact, Clojure is so splendiferous that you might be astonished how easy SQL is, with plain unvarnished JDBC that you would find awful clunky in Java. Look for examples using resultset-seq. No need to slay all dragons at once.
@U06QGV6BVHV if you want to jump on a slack call i can try to answer some of your questions.
@U0DJ4T5U1 That's really generous! I'm available
Another option to consider -- although it's still prerelease right now -- XTDB v2 is a bitemporal database in the same vein as Datomic that has full support for SQL even tho' it is a columnar database under the hood (built on Apache Arrow). It's both free and open source, and built in Clojure by the Juxt folks.
I'm also happy to chat about #C1Q164V29 in Clojure since I maintain both clojure.java.jdbc
(the old Contrib lib) and next.jdbc
(the next-gen version of that), and also HoneySQL for turning Clojure data structures into SQL (so you have a composable DSL for SQL).
I am trying to use Alembic to add dependencies to my project without restarting the repl. I am not sure I am following the instructions correctly. I added alembic to my profiles file and can now use it in the project. I added a dependency to my project.clj file, and then wrote and executed the following comment form:
(comment (require '[alembic.still :refer [load-project])
(load-project "project.clj")
)
However, I am still not able to import my new dependency (clj-http 3.13.0, if it matters).I'm trying to use clj-async-profiler and have this added in my deps.edn
:aliases {:jvm-opts ["-Djdk.attach.allowAttachSelf"]}
what does it mean to 'enable that alias'? include it in the 'require' in the namespace?
(ns my-name-space (:require [jvm-opts]))
for example?you won't need to do anything in the namespace: those options are passed to the JVM, which means they are already applied when the JVM starts up.
first, you need a key to define a name for that alias: :jvm-opts
is an entry in the map for a given alias. for example:
:aliases {:profiler {:jvm-opts ["-Djdk.attach.allowAttachSelf"]}}
enabling an alias means adding it to the list of options passed to the clojure
CLI (see https://clojure.org/reference/clojure_cli#aliases). so instead of clojure -M -m my-main-fn
it would be clojure -M:profiler -m my-main-fn
.Most IDEs have an option for which aliases to include when the repl is started.