This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (27)
- # ai (1)
- # announcements (2)
- # aws (66)
- # babashka (2)
- # beginners (34)
- # calva (28)
- # cider (5)
- # clj-kondo (18)
- # clojure (16)
- # clojure-europe (4)
- # clojure-norway (2)
- # clojure-uk (3)
- # clojurescript (11)
- # code-reviews (23)
- # conjure (23)
- # core-logic (1)
- # cursive (12)
- # datalevin (1)
- # datomic (9)
- # introduce-yourself (3)
- # kaocha (3)
- # klipse (4)
- # malli (42)
- # midje (1)
- # minecraft (1)
- # missionary (4)
- # music (1)
- # nextjournal (10)
- # polylith (5)
- # re-frame (2)
- # reitit (1)
- # releases (1)
- # sci (126)
- # shadow-cljs (4)
- # sql (2)
- # tools-deps (11)
Hello everyone, noob alert 😬 What is the best book for someone who has done object oriented programming all of his life till now and now has to work in a clojure project. I want understand all from its basic in easy terminology.
However, the “best book” for any topic depends on the reader. I would suggest reading a few and sticking to the one that resonates the most.
Besides books, the official docs in Clojure's website are very good, and there are some early talks by Rich which really help "getting it"
"Grokking Simplicity" by Eric Normand and "Data-Oriented Programming" by Yehonathan Sharvit, both do a great job of going over the fundamental functional concepts without being language specific. "Clojure for the brave and true" is still a great book for beginner Clojure.
https://practical.li/ has free books and videos to help learn and practice Clojure. Working through the 4Ever Clojure challenges is an excellent way to understand the core functions in Clojure. Try to get comfortable with REPL driven development approach, it will make learning Clojure a lot faster.
Hey, I'm building dead simple slot booking system for 1 event. Scale is about ~100 people. I need advice for database and deployment options. I was considering firebase for db and heroku for deployment. The cheaper the price and effortless the usage the better.
I've created a simple Reagent project which I want to use in this way:
1. I have some data objects (a bunch of nested maps and lists) which I edit in my favorite text editor.
2. These data are then rendered using ClojureScript/Reagent.
3. The data won't be changed by the UI.
There are three subdirectories in https://github.com/mentiflectax/hello-reagent/tree/master/src:
I assume that
clj contains the server code, and
cljs the client code (please correct me if I'm wrong).
Question: Into which of these directories should I put my data object in order to be able to display it with Reagent in browser?
Cljs sounds right. Unless you did want to share the data with front/back, in this case cljc.
It’s also OK to mix your clj/cljc/cljs files under a single source tree. The Clojure and ClojureScript compilers will just ignore the code for the other side. Organizing this way can sometimes simplify your use of shared code/data.
trying to mock a function out with,
with-redefs - seems that, when I run a future, my redefs no longer apply, docs says its redefined for all threads, but future that was spawned inside the block seems to ignore it
are you blocking on that future? it’s likely your future doesn’t fully complete until after you dropped out of the
notice the following results:
user> (defn foo  1) #'user/foo user> (with-redefs [foo (constantly 42)] (future (Thread/sleep 100) (prn (+ (foo) 1)))) #<[email protected]: :pending>2 user> (with-redefs [foo (constantly 42)] @(future (Thread/sleep 100) (prn (+ (foo) 1)))) 43 nil user>
yep. when dealing with
with-redefs you have to make sure all work is done before you drop out of the form. otherwise you’re going to run into what you’re seeing
yes, that’s one way to do it; though i’d say try to not deal with concurrency +
with-redefs because it can get hairy