This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-11-06
Channels
- # bangalore-clj (16)
- # beginners (120)
- # boot (21)
- # cider (24)
- # clara (9)
- # cljs-experience (1)
- # cljsrn (1)
- # clojure (218)
- # clojure-dev (3)
- # clojure-italy (12)
- # clojure-losangeles (4)
- # clojure-norway (2)
- # clojure-russia (2)
- # clojure-spec (19)
- # clojure-uk (178)
- # clojurescript (52)
- # cursive (7)
- # data-science (55)
- # datomic (25)
- # defnpodcast (11)
- # emacs (5)
- # fulcro (27)
- # hoplon (2)
- # leiningen (14)
- # midje (9)
- # off-topic (132)
- # onyx (19)
- # other-languages (23)
- # portkey (2)
- # re-frame (31)
- # reagent (1)
- # ring-swagger (15)
- # shadow-cljs (58)
- # slack-help (13)
- # spacemacs (22)
- # sql (7)
- # test-check (13)
@tkjone use like this
(def speech (new (.-webkitSpeechRecognition js/window)))
...
(defn apresentar-mensagem [mensagem]
(log mensagem))
(defn- apresentar-resultados [resultados]
(let [indice (.-resultIndex resultados)
mensagem (.-transcript (aget (.-results resultados) indice 0))
mensagem-ant (.-transcript (aget (.-results resultados) 0 0))]
(if (not (and (= 1 indice) (= mensagem-ant mensagem)))
(apresentar-mensagem (clojure.string/trim mensagem)))))
...
;; configure in your main
(set! (.-continuous speech) true)
(set! (.-lang speech) "pt-BR")
(set! (.-onresult speech) #(apresentar-resultados %))
...
Hello all I use this
:npm-deps {"react-md" "1.2.4"}
:install-deps true
and I saw node_modules in root of project after starting REPL. Do I have to include it manually to use react-md?
I didn麓t understand how to use it, any reference to give me?https://clojurescript.org/news/2017-07-12-clojurescript-is-not-an-island-integrating-node-modules
hello. can someone enlighten me what does ->
mean in this context please?
counter/->Controller
@bravilogy it's like the word to
. e.g. toController
@bravilogy Notable: When you define a record like so: (defrecord Controller [a b])
a function that constructs the record is created with the name ->Controller
@bravilogy means our friend keechma
https://keechma.com/annotated/counter/
Does anybody have an answer to this SO question: https://stackoverflow.com/questions/28481272/clojurescript-error-could-not-find-or-load-main-class-clojure-main Tooling has been killing me with kindness 馃槵, so I decided to give the ClojureScript quickstart a shot. The question has been viewed 1.7k times so I guess a lot of people have been hitting the issue.
@mohamedhayibor I do recommend using a tool to get started. try https://github.com/shadow-cljs/quickstart-browser or https://github.com/bhauman/lein-figwheel/wiki/Quick-Start. the official quick-start guide is rather low-level.
I don鈥檛 think anybody seriously uses the cljsc
command. I actually forgot it exists at all.
Thanks @thheller I got some luck "running figwheel on cursive" with re-frame
's template but recently hit an issue where new dom elements were not being pushed to the browser. I thought that I had fundamental misunderstanding on tooling/setting, reasons of me circling back around to the basics. I'll dig around 馃槂
ah ok, thought you were just getting started. the basics don鈥檛 cover live-reloading so you鈥檒l probably need to dig into #re-frame #reagent.
I just noticed that empty string is truthy in clojurescript but falsy in clojure. Has it always been like this? I'm a little surprised
[8:0]~shadow.user=> (if "" :truthy :falsy)
:truthy
[10:1]~cljs.user=> (if "" :truthy :falsy)
:truthy
does anyone know of a good way to determine why the production build size for a cljs project is so large? like something that tells me how much JS is coming from which namespace?
@currentoor I鈥檝e used source-map-explorer successfully before
thanks @anmonteiro, did you have to do anything special to make it work with the advanced compilation output of a cljs project?
it won鈥檛 report the exact size of your bundle if you have foreign libs
simply because they鈥檙e usually not source mapped
i see
so im guessing i have to have source maps on for this to work?
Error: An error occurred while trying to read the map file at /Users/karantoor/src/adstage-report-center/resources/public/js/intl-messageformat-with-locales.min.js.map
I鈥檓 getting a file missing error.yes, you need to feed it source maps
got it, thanks
it works!
the answer to this might be 'no, don't do that" when trying to write fast numeric code in CLJ, we have primtive-math when trying to write fast numeric code in CLJS -- is there anything to use ?
@qqq sometimes you get numeric optimizations for free from modern VMs (thinking of https://youtu.be/LopU-kMpe8I)