Fork me on GitHub
#beginners
<
2016-03-11
>
Tim03:03:27

how do you translate this into clojure: output.write((byte) r);

Tim03:03:35

I mean casting r to byte?

Tim03:03:01

oh never mind, byte is a method in this case

Tim03:03:55

oh, actually I don’t think it is a method, for example, how would I do this in clj?

int i =132;
byte b =(byte)i;

echristopherson04:03:20

wow, I didn't know java had a byte type

Tim04:03:53

it should by (byte 32) or something

krchia04:03:09

does figwheel support reloading .clj file changes?

adamkowalski04:03:54

nope, but you have a repl 😛

krchia04:03:32

in figwheel, i decoupled it so that i do lein figwheel and lein run

krchia04:03:39

now i don’t get clj changes 😞

adamkowalski04:03:00

what ide are you using?

adamkowalski04:03:04

and dont use lein figwheel

krchia04:03:07

is there a lein ring server equivalent for http-kit?

adamkowalski04:03:21

configure emacs + cider to work with figwheel through nrepl

krchia04:03:47

i’ve spent so much time configuring stuff, i think i’m tired of trying to get the optimum dev setup already

krchia04:03:56

is there a good reason for that?

adamkowalski04:03:28

yeah there is a HUGE advantage

adamkowalski04:03:37

that means that you can use cider jack in

adamkowalski04:03:56

and actually get all your awesome cider features while using figwheel

adamkowalski04:03:10

either that or try to use intellij + cursive for a no frills setup

krchia04:03:34

ah, i will look into that maybe some other time

krchia04:03:42

thanks for the heads up

krchia04:03:20

i follow the instructions here and include wrap-reload, i’m not sure why saving .clj files isn’t reloading my changes..

alexmiller13:03:15

Generally, Clojure never uses floats

alexmiller13:03:10

I expect there is a conversion happening in there, probably in the arithmetic operation

pez18:03:45

@krchia: I can really recommend setting your figwheel dev workflow up to use nrepl from cider. It’s done in under 15 minutes and you’ll just love it.

jasoncummings8618:03:27

can anyone point me toward documentation that would explain how to import a 3rd party java library?

alexmiller19:03:48

there are two levels to that: 1) adding the library as a dependency to your project (usually done in your leiningen project.clj :dependencies) - this adds the Java library to your classpath, making the Java classes available 2) importing the classes for use in your code

alexmiller19:03:06

which one are you looking for more help on?

alexmiller19:03:04

for #2 - http://clojure.org/reference/libs has some examples of using import to import Java classes and make them available for use in your Clojure namespace

krchia19:03:43

@pez sorry, the difference between using nrepl and lein figwheel+run on terminal is lost on me

krchia19:03:50

could you tell me more? simple_smile

pez20:03:37

I don’t know what kind of workflow you achieve with lein figwheel+run, but with cider jack-in and nrepl you have this direct connection with the browser from your code that I just have not experienced before. Can you evaluate a sexpr in your code easily with your setup?

krchia20:03:19

what do you mean by that? i usually just write in my .clj/cljs file, then save it and look at the changes in the browser

krchia20:03:26

is there an alternative?

krchia20:03:11

sometimes i use the repl to test small functions, but i usually write the function in the .clj/cljs file and make generous use of printlns to see the output

krchia20:03:25

or (.log js/console some-data-i-want-to-seee)