This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-05
Channels
- # aleph (190)
- # bangalore-clj (4)
- # beginners (31)
- # boot (127)
- # braid-chat (2)
- # cider (2)
- # cljs-dev (79)
- # cljsrn (7)
- # clojure (81)
- # clojure-dev (1)
- # clojure-greece (40)
- # clojure-italy (3)
- # clojure-korea (8)
- # clojure-new-zealand (5)
- # clojure-russia (5)
- # clojure-spec (87)
- # clojure-uk (13)
- # clojurescript (50)
- # cloverage (10)
- # component (4)
- # core-async (37)
- # cursive (26)
- # datascript (20)
- # datomic (29)
- # editors (2)
- # emacs (12)
- # hoplon (63)
- # jobs (2)
- # lein-figwheel (1)
- # leiningen (17)
- # liberator (2)
- # off-topic (19)
- # om (31)
- # onyx (9)
- # pedestal (4)
- # proton (1)
- # re-frame (22)
- # reagent (13)
- # ring (1)
- # ring-swagger (9)
- # spacemacs (5)
- # specter (4)
- # untangled (24)
- # vim (29)
can anyone tell me how to turn down the volume on speak?
there isn't a way, but you could do (speak :theme "woodblock")
which uses softer sounds
Its the voice that's blowing out my speakers, and if I turn them down some other way, I can't hear the rest very well
Its a nice feature to have and I'd like to keep it on if I can
definitely try the woodblock sound theme. much softer
ooh i think i understand now, it's the warning/error voice?
correct
the sounds were pretty loud too before. Right now I'm only getting the voice so I can't tell how much softer that is
are you on a mac or on linux?
how come when I'm trying to use ui elem image, it only works with a :url attribute but won't take it locally out of my assets with a :src attribute (yes, assets is set in build.boot)? When I do that, the whole elem won't render at all, including siblings). Isn't "image" supposed to be roughly the equivalent to the "img" html element?
lightbulb, well, I could turn the whole system's volume down with alsamixer too, but then other things are way too soft. IMO speak needs a :volume attribute
Fair enough. Also on a Mac there is no way that I know of to control the volume of individual applications from a mixer like pavuvontrol. Every app has its own volume control.
does pavuvontrol do individual apps, or is it systemwide?
@vigilancetech pavucontrol will do individual apps. If your distro doesn't use pulseaudio it by defualt it can be a bit of a pain to get setup though.
the mixer will only show when speak makes a sound. You will need to modify a file so boot runs, switch to pavucontol then adjust it when speak makes the sound. It will be fidderly!
hmm... well, my package manager says its installed, so I'll have to give it a try, thanks.
If you can make it say warning its easier, you have a little more time to adjust it. Just tested it and the volume level does persist between each time it makes a sound.
I could probably use that on facebook too. They're notorious for always starting every vid at full volume and blowing out one's speakers
Yeah. It works right down to individual tabs in chrome. Although it will probably make all your tabs afterwards muted as it can't tell the difference between sites. My screenshot was youtube and deezer.
I don’t know how Javelin works under the hood but this really suprised me:
(defc x 1)
(defc= computed
(let [inner-binding "huh"]
(when (and x inner-binding)
(prn inner-binding))))
;; prints “huh"
(defc x 1)
(defc= computed
(let [inner-binding "huh"]
(when (and inner-binding x) ;; swapped arguments in and
(prn inner-binding))))
Use of undeclared Var biz.cells/inner-binding at line 154...@adamfrey are you saying you were surprised by the first one? because that's how it's supposed to work, curious how you might have thought it would otherwise work. the 2nd example looks like a bug of some kind, i try to repro
I’m having trouble getting macro expand to work in cljs to see what’s actually happening
hm, wasn't able to reproduce with javelin 3.8.4
^^ macro you can use to debug
if you have time to put together a minimal failing thing i can experiment
my guess would be you're using a version of cljs newer than the cell= macro can cope with
it depends on aspects of cljs that break every year or two
it works for me with [org.clojure/clojurescript "1.7.228"]
yeah it's hard keeping up with cljs
any inroad you can make to debug, much appreciated
definitely something we'll need to figure out
@alandipert here’s a gist with the two macroexpand forms: https://gist.github.com/AdamFrey/d47061f05ee7de145ee3a69bb31b5a20
what does (println (let* [x 1] (let* [y x] y)))
print out in your setup?
or rather, (println ((fn* ([a] (let* [x a] (let* [y x] y)))) 1))
if that also breaks i'd say it's a cljs regression
hm i made a rhino repl in cljs master and don't see it
I just tried to reproduce this in a project i've got going. I could reproduce it but downgrading my clojurescript didn't fix it.
ok, let me rephrase: is ui image supposed to be able to use :src instead of :url? If so then I'll have to look to my paths (which I currently don't see any problem with)
Hi! I want to draw charts using a 3rd party charting library with hoplon. There are charts.js and chartist.js avialable via cljsjs. I found couple of examples how they can be used with reframe: https://gist.github.com/edwthomas When I tried porting those examples to hoplon all I managed to do is bar chart from chart.js example kind-a working sometimes 🙂. Can somebody show how those examples should be done properly in hoplon ?
@greenhorse is "rev-chartjs" in the first example the id of a canvas element?
@greenhorse i see you don't call any function from cljsjs.chartjs. does it apply itself automatically to canvases somehow?
oh nvm - had to click to expand
looks like you put the "chartjs-component" class on canvases to make them render?
@alandipert that code isn't mine. I am trying to port it to hoplon. Basicaly I want just to draw a chart using hoplon and one of those libraries..
got it. i'll have an example for you shortly
(page "index.html"
(:require [cljsjs.chartist]))
(defn chart
[chart-data]
(with-let [self (canvas)]
(let [ctx (.getContext self "2d")]
(with-init
(cell= (js/Chart. ctx (clj->js chart-data)))))))
(def chart-data
(cell
{:type "bar"
:data {:labels ["2012" "2013" "2014" "2015" "2016"]
:datasets [{:data [5 10 15 20 25]
:label "Rev in MM"
:backgroundColor "#90EE90"}
{:data [3 6 9 12 15]
:label "Cost in MM"
:backgroundColor "#F08080"}]}}))
(defn add-random-data
[data]
(-> data
(update :labels conj (gensym))
(update :datasets #(mapv (fn [m] (update m :data conj (rand-int 30))) %))))
(html
(head
(title "Chart Example"))
(body
(chart chart-data)
(button :click #(swap! chart-data add-random-data))))
@greenhorse ^^ totally untested... but i hope it conveys the basic idea
the idea is to encapsulate the charting function in a defn
or defelem
that takes its data as a cell argument
@alandipert ok. I will give it a try. Thanks !
no prob. it's kind of the general hoplon recipe for working with 3rd party libs, really. make a custom element with cell arguments, and that applies data in a cell to an element via the 3rd party lib after the page is loaded, and then after that, whenever the cell changes
@alandipert I have it working. Thanks! I will see if I can port the chartist.js example as well.
@alandipert I have a workaround for now, but if I get time later I’ll try to make up a minimal repro case
@greenhorse great! yeah you might be able to identify some patterns in there and come up with a pretty sweet and general chart component. lemme know if you do 😄