This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-18
Channels
- # aleph (4)
- # announcements (2)
- # babashka (48)
- # beginners (59)
- # calva (5)
- # cider (14)
- # clj-kondo (4)
- # cljs-dev (3)
- # clojure (77)
- # clojure-europe (6)
- # clojure-italy (6)
- # clojure-nl (5)
- # clojure-spec (4)
- # clojure-uk (67)
- # clojurescript (19)
- # clr (3)
- # cursive (7)
- # datomic (36)
- # duct (33)
- # events (3)
- # figwheel (1)
- # fulcro (4)
- # funcool (2)
- # graalvm (3)
- # jobs (1)
- # joker (25)
- # kaocha (1)
- # leiningen (45)
- # malli (17)
- # off-topic (103)
- # quil (1)
- # re-frame (16)
- # reitit (1)
- # rewrite-clj (27)
- # shadow-cljs (39)
- # spacemacs (3)
- # sql (11)
- # tools-deps (14)
- # vim (41)
Does a patch like this work well with (advanced) compilation?
(when-not #?(:clj (resolve 'ex-message)
:cljs (exists? ex-message))
(defn ex-message [ex]
(when (instance? #?(:clj Throwable :cljs js/Error) ex)
#?(:clj (.getMessage ^Throwable ex)
:cljs (.-message ex)))))
ex-message exists in clojure now btw
so in this particular case, you can just use ex-message
portably
well ok then :)
specifically: https://github.com/borkdude/sci/pull/159
Where i can find some examples with clojurescript for pre conditions types with a basic foo object.
(defn foo [x y]
{:pre [(map? x) (or (number? y) (string? y))]
;
)
hey everyone, hope the week has been off to a great start -- I am trying to add a dropdown component to my website. it would open on click and would have a couple of options that to choose from. any suggestions/resources on how i could implement this?
Are you describing a <select> HTML element? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select
yes exactly.. except the hamster haha
Something like this should work:
(defn foo [a b]
(toString [this] (str a ", " b)))
(s/fdef foo
:args (s/cat :a string? :b string?)
:ret string?)
(deftest mytest
(stest/instrument `foo)
(testing "unstrument in finally works"
(is (= "John Smith" (foo "John" "Smith"))))
(stest/unstrument `foo))
@ablazevix selectize is a popular option (do you notice the pun?)
Nice one hah!
Hey again, I've been continuing to work on the small app, and would love to have get some advice. I am trying to make an app that lets you send emails to people. The idea is that you specify an option, input name and email. Then this gets saved into a table, from which later the emails get sent. Here's a mockup
I've got some code going, but I am struggling with adding things into a table. I am not sure how to translate the text inputs into the table. My idea is that once names are inputted in the lines, and the person has clicked on the option, the button add to sendees can get triggered in which instance the table gets populated.
Here's my code for views as of now.
@ablazevix sounds pretty similar to TodoMVC, I would check out the re-frame example: https://github.com/day8/re-frame/blob/master/examples/todomvc/src/todomvc/views.cljs
@isak Awesome, thanks for the tip! 🙂