Fork me on GitHub
#beginners
<
2016-07-28
>
brownmoose3q08:07:45

How can we represent a small integer number in binary representation as byte, so to have from 85 "01010101" with zeros not thrown off ?

brownmoose3q08:07:04

Convert with Integer/toBinaryString and somehow regulate how much zeros should be added in the head ? sounds messy and I don't know how implement this regulation short

andrepnh12:07:24

@brownmoose3q: you could calculate the desired size and then use that with clojure.pprint/cl-format to pad the zeros

brownmoose3q14:07:19

Looks messy 😃 I'll check it, thx

renan15:07:37

[clojurescript] hi, i'm using Figwheel, my question is how using external library/JavaScript file in Figwheel? but i tried the key ':externs' but the repl/clojurescript not load the library, this is js file http://waveformjs.org/waveform.js and for create extern file, i used Extern Generators (http://jmmk.github.io/javascript-externs-generator/)

greenhorse21:07:57

http://www.4clojure.com passed 1 million mark today

polymeris23:07:18

did you include :foreign-libs, @renan? Is the js loaded into the browser?

polymeris23:07:44

forget about externs at first, you can turn off optimizations in the compiler

polymeris23:07:29

that said, I have run into issues where figwheel would complain about the declared namespace not existing when you load it into the cljs repl

polymeris23:07:47

everything still worked, tho, as long as the js is loaded by the browser