This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-09-05
Channels
- # announcements (4)
- # beginners (21)
- # calva (3)
- # clj-http (3)
- # clj-kondo (10)
- # clojars (5)
- # clojure (4)
- # clojure-europe (5)
- # clojurescript (71)
- # datomic (3)
- # fulcro (18)
- # helix (5)
- # introduce-yourself (2)
- # missionary (1)
- # off-topic (19)
- # polylith (21)
- # reagent (3)
- # shadow-cljs (28)
- # tools-deps (6)
- # xtdb (30)
I am trying to install datomic in my local and getting below error, Can anyone help me please
Is there a beginner friendly way to create graalvm programs? I tried https://github.com/luchiniatwork/cambada but there is something wrong with the clojure class path or something. I followed the readme example and needed to add clojure do deps.edn to make it compile but the resulting program throws Caused by: java.io.FileNotFoundException: Could not locate clojure/core__init.class,
There is a channel #graalvm where you can ask for help. And here is a nice collection of useful resources - https://github.com/lread/clj-graal-docs
Hi guys. I am learning reagent and trying to write a simple CRUD app. There is a weird behavior that I am being confused about, however. If my code is like this, the atomic immediately becomes null after every of the input change:
(defonce selected-user-map (reagent.core/atom {:name "" :surname ""}))
[:input
{:value (:name @selected-user-map)
:on-change (fn [event]
(let [new-name (-> event .-target .-value)]
(swap! selected-user-map assoc :name new-name)))}]
If I change the swap!
to reset!
, stuff works as expected:
(reset! selected-user (merge @selected-user-map {:name new-name}))
Is there any special reason on the behavior? I thought that swap!
and reset!
should have yielded similar result, or I misunderstood something?
Thanks in advance.This is a GIF for clarification. It records the behavior when I use swap!
• Select an user
• Try modifying the selected user with the input
• The selected user become null
Hi, I have problem adjusted to shadow-cljs env variables
As the https://shadow-cljs.github.io/docs/UsersGuide.html#shadow-env "not clearly" says I can read a variable via #shadow/env "TWITCH_AUTHORIZATION_TOKEN"
but instead i get an error No reader function for tag shadow/env.
my version of shadow-cljs is "2.15.2"
here is my shadow-cljs.edn:
{:source-paths
["src/main"]
:dependencies
[[reagent "1.1.0"]
[cljs-ajax "0.8.4"]]
:dev-http {8080 "public"}
:builds
{:frontend
{:target :browser
:modules {:main {:init-fn app/start}}
:closure-defines {events.async/TWITCH_AUTHORIZATION_TOKEN #shadow/env "TWITCH_AUTHORIZATION_TOKEN"}}}}
also my .env:
TWITCH_AUTHORIZATION_TOKEN="blalbbllba"
so my question is how to read a env variable then?That file looks like a weird amalgamation of a project.clj, a deps.edn, and the shadow-cljs.edn file described in those docs
And that is exactly the error I would expect in you tried to use the shadow tag readers in a deps.edn file
how do you write hiccup for @keyframes
tag for css animation? Muchos Gracias!
https://github.com/noprompt/garden has support for media queries and keyframes
HI I had a look at garden... but I still can't generate the keywords definition.
(println (css [(keyword "@keyframes") {:from {:background {:color "red"}}
:to {:background {:color "blue"}}}
"example"]))
Generates ->
@keyframes {
from-background-color: red;
to-background-color: blue;
}
Which looks good... but I want to generate
@keyframes example {
from-background-color: red;
to-background-color: blue;
}
However when I run the following
(println (css [(keyword "@keyframes") "example" {:from {:background {:color "red"}}
:to {:background {:color "blue"}}}]))
I get
@keyframes, example {
from-background-color: red;
to-background-color: blue;
}
@U01EFUL1A8M Many thanks for your help. But I can't figure out how to still use it! Please can you show me 1 example? I'll be forever grateful!
@U06MDAPTP Sorry to bother you. Is there a proper tutorial for using garden somewhere?
Does this help?
(ns user
(:require [garden.stylesheet :refer [at-keyframes]]
[garden.core :refer [css]]))
(css (at-keyframes :slidein
[:from {:transform "translateX(0%)"}]
[:to {:transform "translateX(100%)"}]))
the example is ‘translated’ from: https://developer.mozilla.org/en-US/docs/Web/CSS/@keyframes
ahh... I see what the problem is... the name of the keyframes also needs to be a keyword... instead of a string!! Thank you very much @U01EFUL1A8M!! I would have never figured this out! Many thanks!