#clojure log - Jun 18 2015

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

1:34 WickedShell: Answered my own question, but for posterity if anyone looked into it, a JComponent can only be active on one panel at a time, and I had an intermediate panel that temproraily grapped one of the components causing the code I pasted to take a size of 0

2:00 tmtwd_: can anyone help with this project.clj file?

2:00 http://pastebin.com/bArUYNVL

2:00 it won't compile

2:21 iany: tmtwd: i think you need to add clojure and clojurescript in your dependencies.

2:23 tmtwd: try a template like chestnut or duct to see how people structure their apps.

2:23 tmtwd: ok

2:38 WickedShell: Is there a mechanisim to see how many go statements can be run simultaneously? (I'm assuming its related to number of cpu cores + x or some such)

3:56 elvis4526: Guys I have a blank - what's the name of the lein plugin that have integration with cider that allows to format a clojure buffer?

3:56 It removes blankspace, it align parenthese, etc...

4:12 dstockton: elvis4526: lein-cljfmt?

4:12 https://github.com/weavejester/cljfmt

4:32 kaffeeboehnchen: Hey. So, I get an ByteInputStream from http-kit which contains json. What would be the best way to cast that to a string? I saw that I could use (chars …) if I can get an array of that stream, but I have no clue how to do that in clojure.

4:44 elvis4526: kaffeeboehnchen: Are you the on sending the json ?

4:44 one*

4:44 kaffeeboehnchen: elvis4526: Yes.

4:44 The content-type is application/json

4:44 elvis4526: are you sure ? I had the same problem a couple days ago

4:44 do you have the wrap-json-body middlware ?

4:45 kaffeeboehnchen: no

4:45 Ah, I see

4:45 elvis4526: https://github.com/ring-clojure/ring-json

4:45 "The wrap-json-body middleware will parse the body of any request with a JSON content-type into a Clojure data structure:"

4:45 kaffeeboehnchen: thanks for the hint elvis4526, I hope I can make it myself from here :)

4:46 elvis4526: no problem! It's actually the first time I know the answer of a question I see here lol

4:46 kaffeeboehnchen: :D

4:51 phillord: Just installed CIDER 0.9 and am having problems -- the server starts, the connection starts, I get the "quote of the day", but then no REPL, no CIDER menu. Anyone got any ideas what to check?

4:54 oddcully: (inc elvis4526)

4:54 lazybot: ⇒ 1

5:15 elvis4526: dstockton: yes thanks !!

5:57 kwladyka: I am confuse about using "!" in functions name like "create-user!". From one hand create-user has outside efect, BUT it is expected outside effect. We can expect calling this function. From one hand i read we should use ! for I/O functions, but from other hand i read we should use "!" when function has not expected outside effect.

5:57 So... what is true convenction?

5:58 wasamasa: [citation needed]

5:58 especially for the last one

5:59 kwladyka: mmm i read all this things about 1 month ago.... now i have time to organize that in my head :)

5:59 lumafi: https://github.com/bbatsov/clojure-style-guide#changing-state-fns-with-exclamation-mark

6:00 wasamasa: also, what's the deal with "expecting"

6:00 that is hardly objective

6:01 kwladyka: lumafi, i belibe is it even better https://github.com/bbatsov/clojure-style-guide#refs - but still what with function with unexpected outside effect?

6:01 wasamasa: just because I expect a db to be a mutable mess doesn't mean I can omit the bangs for functions interacting with it

6:01 lumafi: how would a function have an unexpected side effect?

6:02 the thing about STM transactions is that the code inside the transaction might run more than once

6:02 kwladyka: wasamasa, yes but when you call create-user you expect it will create him in DB, but for example you don't expect it will add him to newsletter by default

6:02 noidi: use a bang (!) for non-idempotent side effects

6:02 lumafi: if something there causes a side effect like adding a value to a database, the value might be added many times

6:02 even if you only call the function once in your code

6:03 wasamasa: kwladyka: by that argumentation it would be ok if it were named create-user-and-add-them-to-newsletter

6:04 kwladyka: lumafi, value may be added many times even if i run function once?

6:04 wasamasa: kwladyka: which totally isn't what the bang convention is about

6:04 lumafi: kwladyka, yes.

6:04 since the code inside the transaction can be run multiple times

6:04 until the transaction succeeds

6:05 "Another feature common to STMs is that, should a transaction have a conflict while running, it is automatically retried."

6:05 from http://clojure.org/refs

6:06 kwladyka: oh but i can only happen in STM

6:07 lumafi: yes, that's what i said

6:07 kwladyka: summing up: use ! for all I/O and STM functions?

6:08 oh, not

6:08 only for STM

6:08 lumafi: no, use ! for functions that are NOT safe to call inside an STM transaction

6:08 so basically anything that has a non-idempotent side effect

6:09 kwladyka: mmm i have a little problem to translate non-idempotent into my language :)

6:11 wasamasa: kwladyka: idempotent = execute the function as often as you want, it won't alter any state

6:12 lumafi: idempotent = has the same effect, even if you run it more than once

6:12 wasamasa, not exactly. an idempotent function can alter state, but it will alter it the same way if you run it once, twice or ten times

6:13 wasamasa: like, an add-user-if-not-present

6:13 lumafi: yes

6:15 kwladyka: thanky you, it is good explanation

6:17 WickedShell: Is there a mechanisim within async to have a sliding buffer (or any other type of buffer strategy for a channel) report if it throughout a value? (trying to prove that I am recieiving all the data I think I am)

6:19 wasamasa: https://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/buffers.clj#L51

6:21 WickedShell: wasamasa, I don't see any mechanisim for reporting/counting dropped samples? (or was that your point? :P )

6:23 kwladyka: I am looking library for ORM database fors Postgresql, someting like http://laravel.com/docs/5.1/eloquent-relationships - is some mature library for that?

6:23 wasamasa: WickedShell: it's calling itself a sliding buffer, duh

6:24 kwladyka: i found this https://github.com/razum2um/awesome-clojure#orm-and-sql-generation but is it up to date?

6:24 wasamasa: just use clojure.jdbc

6:24 WickedShell: wasamasa, right, I like that fact and take advantage of it. The question is that I want to profile and see if I actually ever fail to consume before the buffer is full. I don't know of anyway to do that at the moment

6:27 kwladyka: wasamasa, whati with https://github.com/remodoy/clj-postgresql ?

6:29 wasamasa: kwladyka: it is using clojure.jdbc...

6:29 kwladyka: oh...

6:30 wasamasa: so far all I see additionally to that is connection pooling and auto-conversion of types

6:32 kwladyka: wasamasa, and what with https://github.com/razum2um/awesome-clojure#orm-and-sql-generation ? Did you use them?

6:32 wasamasa: kwladyka: after working for some time with activerecord, I've started hating ORMs

6:32 kwladyka: why?

6:32 clojurebot: because that's not how macros work

6:32 p_l: ActiveRecord is probably one of the most horrible ones out there...

6:33 wasamasa: because they generate horrible SQL (which half of the time doesn't perform well) and are leaky abstractions

6:33 after all, SQL is a perfectly fine DSL already

6:33 kwladyka: i will be glad if you can share with me your experience :)

6:33 wasamasa: adding another one over that and not screwing up is hard

6:36 kwladyka: mmm i also found some troube when i wanted complicated nesty query, but from simple queries it was good... but the true is i was thinkig about sense of that :)

6:36 wasamasa: I'm not buying the argument of abstracting over databases either

6:37 you will choose a primary solution eventually, so why compromise and not use it to its full abilities?

6:38 p_l: wasamasa: out of ORMs, DataMapper and Sequel were much better in my experience, with Sequel being closer to being pure ORM - that is, it provided an object-based interface to whatever SQL you wanted ;)

6:38 kwladyka: mmm i want have architecture independed from DB like http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html http://blog.find-method.de/index.php?/archives/209-Dependency-inversion-in-Clojure.html - i am not sure what really mean by "abstracion over database", but i believe code should be elastic and always ready for changes

6:39 p_l: kwladyka: clean architecture would separate "data storage layer" which might interact with database from some other concepts

6:41 wasamasa: switching your production database isn't something you're doing just because you feel like it and more of an emergency thing

6:41 kwladyka: p_l, but on the end in this layer i have to use someting :)

6:41 wasamasa: like, if you were silly enough to use a proprietary solution that got bought and shut down by apple

6:41 kwladyka: wasamasa, yes but i can always change client library for DB

6:41 wasamasa: or have learned that abandoning the relational concept was a stupid thing

6:43 it's sort of like my experience with buying headphones

6:44 I used to have cheap ones with cables that constantly broke, bought expensive ones with replacable cables, then never had to replace the cable

6:44 retrospectively I could have saved me the trouble by just buying higher quality headphones in the first place

6:45 kwladyka: from my experience only basic ready solutions are worth to use. If i use something more then basic, always in one moment i want do someting uncommon and it is more comlicated and doesnt make sens :)

6:47 wasamasa, yeah phones have to be expensive. Anyway companies still stop support them after 3 years

6:48 or less

6:48 justin_smith: kwladyka: I own headphones with a lifetime guarantee

6:48 wasamasa: well, I have a model here they stopped supporting after fourty years

6:49 because they ran out of a specific type of metal for producing new transducers

6:49 but I don't care as long as I can get replacement earpads

6:51 TEttinger: I'm quite happy with these "Apple Earpods" that came with my dad's iPhone

6:52 he used in-ear headphones, so he gave these to me

6:52 the bass is significantly better than most earbuds

6:52 and they seem pretty durable, I keep them in my pocket getting battered slightly, no sign of damage after a year or two

6:54 Bronsa: I keep destroying headphones, I forget I have them on and just walk away from the pc

6:54 TEttinger: (surprising since the original apple headphones just crapped out so fast)

6:54 solution: never get up from the PC

6:54 justin_smith: TEttinger: for about $10 more than the price of the earpods, you can get something about 10x better http://www.amazon.com/Xiaomi-Piston-Headphone-Headset-Earphones/dp/B00V9RKSAA/ref=sr_1_26?ie=UTF8&qid=1434624867&sr=8-26&keywords=iem

6:54 TEttinger: well the price was uh "no additional charge"

6:55 justin_smith: TEttinger: they go for ~$10 new

6:55 Bronsa: I've even had to replace the audio board of my laptop as I broke the headphone port :(

6:55 kwladyka: justin_smith, do you also think ORM for SQL are not worth to use and use clojure/java.jdbc instead?

6:56 TEttinger: arethey in-ear, justin_smith? I hate the sound in-ear ones make when the cord moves against my beard

6:56 justin_smith: kwladyka: that would be my preference, yeah. ORM has leaky abstractions. I did work on a custom abstraction over sql myself (caribou).

6:56 TEttinger: yeah, they are, and fair point about that sound

6:57 kwladyka: i need some headphone to talk with clients and... i bought one with higher price and is was bad... next time i bought the cheapest and i am verry happy with them, so it is worth to remember price is not the rule always

6:57 justin_smith: TEttinger: but in terms of quality / price those guys for $20 are really hard to beat

6:57 TEttinger: indeed

6:58 I bought a mattress some time ago, it was literally the cheapest one in the store. pretty much every human or animal who lies down on it soon realizes that low price does not necessarily mean low quality, then they fall asleep

6:59 the salesman was trying to sell ones for twice the price, but I practically fell asleep on this thing in the store

7:00 there's some connection to be drawn to OSS vs. proprietary, expensive tools

7:00 "OSS is comfy"

7:36 Guthur: Hi, has anyone tried to use the jmonkey engine from clojure

7:36 I was following http://www.thejach.com/view/2012/5/getting_started_with_jmonkeyengine_and_clojure

7:36 but get a NPE on startup

7:39 TEttinger: Guthur: do you specifically need 3d?

7:40 play-clj is 2d only but is much nicer to use, I would say

7:42 there's quil for idiomatic 3d as well, Guthur https://github.com/quil/quil

8:25 mearnsh: so one of my deps (jarohen/chord) has the dep [net.unit8/fressian-cljs "0.1.0"], but fressian-cljs is broken (https://github.com/kawasima/fressian-cljs/pull/3). i tried using git-lein-deps to use james-henderson's fork instead but no luck so far (https://www.refheap.com/102673)

8:25 any pointers on how to handle such a situation? maybe lein checkout dependencies?

8:31 phillord: I have CIDER starting, up to the "quote of the day" but I never get a REPL -- anyone got any ideas about how to check what is wrong?

8:33 Guthur: TEttinger: JME3 seemed the more complete 3D game engine.

8:34 TEttinger: yeah, I don't know if it still is. has there been a single published game using JME, actually? all I know are ones using LWJGL

8:35 Guthur: not sure

8:36 didn't think there would be that many published games on JVM to begin with

8:36 TEttinger: libgdx lists many, most are 2d

8:36 minecraft uses LWJGL I am fairly sure

8:37 Guthur: ah yeah, how could I forget that one

8:38 I'll check out lwjgl

8:38 just doing some initial investigation at the moment

8:38 TEttinger: LWJGL is a lower level binding to OpenGL, but LibGDX adds a ton of thick wrapping to that to make it nicer in OOP Java, and play-clj takes libgdx and makes it nicer to use in immutable Clojure. but last I checked, play-clj does not support 3d

8:38 I mean, adding that feature to play-clj would be awesome

8:41 Guthur: doesn't seem to mention the 2D limitation here https://github.com/oakes/play-clj

8:42 indeed it says...

8:42 "A Clojure library that provides a wrapper for libGDX, allowing you to write 2D and 3D games "

8:42 I'll give it a whirl

8:44 kaffeeboehnchen: Does anybody have an idea how I can return the (:id …)? https://paste.xinu.at/QlJXH/clojure The post is working but http-kit always thinks it gets no return and throws a 404 to a client and I would like to return the id. :/

9:07 Sorella: kaffeeboehnchen: http-kit returns promises. You need to use `@the-promise` to get the value of that promise. `@<expression yielding a promise>` will block the thread until the value is returned.

9:08 kaffeeboehnchen: ah, thanks Sorella

10:15 jonathanj: so there's a zipper function for going up and down, each of which give you a location

10:16 but (root) gives you the node value of the root and not a location?

10:19 i have a flat vec of data that i want to be turned into a tree, i wrote this and i think it can be improved but i don't know how: https://pb.codehash.net/042a244ded9e460b856eb87234dd23c0

10:29 noncom: what currently is the library to create XML with clojure?|

10:29 iwillig: noncom: some people use this https://github.com/clojure/data.xml

10:31 jonathanj: the reduce function seems a bit hacky

10:32 noncom: jonathanj: what do you mean?

10:32 why hacky?

10:34 jonathanj: i mean my reduce function in my paste

10:34 (my-zipper (zip/root (zip/append-child ...))) seems hacky

10:34 noncom: ah..

10:35 unforunately i am not too much into zipping and building trees like that, so i cannot comment on this :)

10:46 noncom: can i somehow make data.xml to not emit the xml header tag?

10:49 iwillig: ^^^

10:49 asked myseld :)

10:49 s/myseld/myself

10:53 ptrckbrwn: I'm trying to iterate over a lazy-seq while updating a transient, is there a common pattern for doing this?

10:57 iwillig: noncom: i am not sure sorry. i never need to do that

10:58 noncom: okay so i'll just strip the resulting string...

10:59 ptrckbrwn: What I'm trying to do is take a list that may contain duplicates and then generate a hash-map of {"items" number-of-appearances}.

10:59 s/"items"/"item"

11:00 iwillig: noncom: it seems like you set the encoding but not to drop the header tag

11:00 https://github.com/clojure/data.xml/blob/master/src/main/clojure/clojure/data/xml.clj#L370-L385

11:01 noncom: iwillig: yes, looks like the header tag is made by the XMLStreamWriter itself

11:01 so okay, i guess it is far easier to just post-process the string

11:12 gfredericks: I'm using leiningen in docker, with my ~/.m2 directory mounted inside the docker container to avoid downloading deps, but it seems to download them anyways and I can't figure out why; does anybody have any guesses?

11:19 oh I might've been misconcepted

11:22 indeed.

11:39 lvh: Is there an idiom for "first elem in coll that matches pred", other than (first (keep pred coll))

11:39 I wanna say some, except some returns the result of the pred it seems

11:41 pyrtsa: (first (filter pred coll)) or (->> coll (filter pred) first)

11:42 egli: lvh: isn't that what some does?

11:42 https://clojuredocs.org/clojure.core/some

11:42 pyrtsa: keep probably isn't what you want when pred returns true/false.

11:43 lvh: err, yeah, sorry, filter :)

11:43 ,(some #(= % 7) [2 4 6 7])

11:43 clojurebot: true

11:43 lvh: notably not 7 :(

11:45 egli: ,(some #(and (= % 7) 7) [2 4 6 7])

11:46 clojurebot: 7

11:46 egli: lvh: lame but it works

11:46 lvh: Yeah :)

11:46 lumafi: ,(some #{7} [2 4 6 7])

11:46 clojurebot: 7

11:47 egli: ,(some #(and (= % 7) %) [2 4 6 7])

11:47 clojurebot: 7

11:52 lvh: So, that latter one works better because I have a coll of *maps*, and I'm trying to match the first map that has some value for a given eky

11:52 key*

12:25 dagda1: is it possible to also take the last element when the take-while is predicate is false.

12:35 gfredericks: take-while+1 ?

12:36 ,(defn take-while+1 [pred coll] (lazy-seq (when-let [[x & xs] (seq coll)] (if (pred x) (cons x (take-while+1 pred xs)) (list x)))))

12:36 clojurebot: #'sandbox/take-while+1

12:36 gfredericks: ,(take-while+1 #(< % 10) (range))

12:36 clojurebot: (0 1 2 3 4 ...)

12:41 dagda1: gfredericks: is that the name of the function take-while+1

12:41 gfredericks: right I see what you mean

12:43 gfredericks: works a treat, thanks

12:46 gfredericks: dagda1: that's what I would call it; you could probably find it in a utility library but I don't know which

12:47 dagda1: gfredericks: yeah I just found a take-until in contrib

12:59 kwladyka: what solution do you use to hide ids from users in URL? Additional column in db with uuid or encrypt id or ... ?

13:02 gfredericks: kwladyka: what's the goal? prevent users from guessing other ids?

13:03 kwladyka: gfredericks, prevent users to know the numbers of row in the table, like how many users, orders etc. you have

13:04 just not let them easy estimate scale of business like for example in e-stores

13:24 lnostdal_android: I've used uuids for that

13:46 aaelony: New to Spark. Trying version1.4.0.a on ec2 and running ./bin/spark-sql causes an error and returns to the linux prompt. Shouldn't this give me a Hive SQL shell to issue SQL commands?

13:46 wrong channel, disregard :(

14:06 Shayanjm: I have a seq of sets of maps that I'd like to combine into one large set of maps

14:06 I've been stabbing in the dark but haven't been able to get the expected result

14:06 any input would be helpful :)

14:11 danielglauser: Shayanjm: have you looked at http://clojuredocs.org/clojure.core/merge

14:11 Shayanjm: danielglauser: I did, merge-with union didn't work as well as I thought it would

14:11 or at least, didn't do what I thought it would

14:11 be trying something else

14:11 might've worked

14:13 danielglauser: ,(apply merge [{:a :a} {:b :b} {:c :c}])

14:13 clojurebot: {:a :a, :b :b, :c :c}

14:13 danielglauser: Shayanjm: ^^^

14:14 justin_smith: danielglauser: there are no sets there

14:15 danielglauser: justin_smith: Missed that part...

14:16 justin_smith: Shayanjm: ##(reduce into [#{{:a 0}} #{{:a 0} {:b 1}} #{{:c 2}}])

14:16 lazybot: ⇒ #{{:b 1} {:a 0} {:c 2}}

14:16 justin_smith: seq of sets of maps into a set of maps

14:16 Shayanjm: justin_smith: I just did (set (apply concat <seq of set of maps>))

14:17 justin_smith: Shayanjm: reduce into does less work

14:17 but that will get hte same result

14:17 Shayanjm: sweet

14:18 reduce into is very elegant though

14:18 justin_smith: and does less work :)

14:18 but sometimes the CPU cycles just don't matter

14:18 Shayanjm: swapped it

14:27 ambrosebs: blog post on gradual typing for clojure http://frenchy64.github.io/2015/06/19/gradual-typing.html

14:32 dnolen: ambrosebs: cool! like the look of blog :)

15:06 lvh: I imagine there's a high concentration of people here who already know this, but there's a crowdfunding link at the bottom and you should totally go give ambrosebs money so he can make typed clojure(script) happen :)

15:08 ambrosebs: dnolen: cheers!

15:08 lvh: thanks! :)

15:08 lvh: thank *you*

15:08 it has been a critical tool for convincing people clojure's a thing

15:08 FP is a decent sell but then they start talking about type systems

15:09 so the more I can say "yep we have those" the more parens I get to move around on a daily basis, which makes me happier

15:09 dnolen: yeah I know the Clojure stuff alone is a ton of work, excited to see some of this goodness supported for ClojureScript :)

15:09 hfaafb: mmm parens

15:09 oddcully: (inc ambrosebs)

15:09 lazybot: ⇒ 11

15:10 ToxicFrog: lvh: is this different from core.typed or the same thing?

15:11 lvh: ToxicFrog: ambrosebs is the person to ask stuff but yes, this is core.typed

15:11 ToxicFrog: I just use it, I know little about how the sausage is made :)

15:11 ToxicFrog: Aah.

15:11 I meant "is typed clojure the same as core.typed", not really asking about impl :)

15:11 I had bad experiences with core.typed last time I used it, maybe I'll try it again next year

16:07 amalloy: ToxicFrog: there's not really any such thing named typed clojure; it's just a descriptor for the thing named core.typed

16:27 arrdem: amalloy: the idea in Ambrose's writing seems to be that "typed clojure" is the subset of Clojure code with core.typed anns, constrasted with "untyped clojure" and "untyped jvm interop" in recent posts.

16:27 for "typed" being "core.typed ensured"

17:07 randomcharhere: new to clojure how do yoi do compund if statements as in if((x=1)and(y=1)) ...

17:08 justin_smith: (doc and)

17:08 clojurebot: "([] [x] [x & next]); Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true."

17:08 arrdem: randomcharhere: (if (and (= x 1) (= y 1)) true-case false-case)

17:08 justin_smith: o/

17:09 randomcharhere: woot thanks :)

17:09 arrdem: $grim clj::clojure.core/and

17:09 justin_smith: randomcharhere: also ##(let [x 1 y 1] (= x y 1))

17:09 lazybot: ⇒ true

17:09 justin_smith: = is varargs, if you really are comparing two things to the same value

17:10 amalloy: (letfn [(one? [x] (= x 1))] (every? one? [x y])) is cool, if you want your code to sound like weird awkward questions about everyone

17:11 justin_smith: haha

17:11 Bronsa: lol

17:11 (inc amalloy)

17:11 lazybot: ⇒ 282

17:11 randomcharhere: :P

17:11 arrdem: surely you can get a juxt in there..

17:13 amalloy: (every? true? ((juxt #{x} #{y}) 1))

17:13 oh er

17:13 (every? one? ((juxt #{x} #{y}) 1))

17:13 randomcharhere: is there a more functioanl repl out there some where the one I'm using is akward... for win8

17:13 amalloy: randomcharhere: leiningen's

17:14 randomcharhere: is what I'm using in a dos window ...

17:14 j-pb: (inc yogthos|away)

17:14 lazybot: ⇒ 1

17:14 amalloy: well, emacs or vim or eclipse or intellij all have great clojure plugins

17:14 probably other tools too, but i feel like those are the big 4

17:14 j-pb: randomcharhere: gorilla repl is kinda nice

17:14 randomcharhere: cool

17:15 j-pb: if you don't have a usefull unix terminal :)

17:15 randomcharhere: never heard of that one

17:15 j-pb: http://gorilla-repl.org

17:15 notebook, similar to jupiter a.k.a. IPython

17:16 arrdem: randomcharhere: cursive (https://cursiveclojure.com/) is quite good and will probably be easier to set up under windows than a raw leiningen repl or something else.

17:17 randomcharhere: think main reason I stuck with win/dos repl for this long is cause I didnt want to add learning a new iterface plus a new anguage

17:19 j-pb: yeah cursive is great

17:19 but its a full ide

17:21 arrdem: compared to learning vim or emacs, cursive is very low investment

17:21 j-pb: haha yeah

17:22 randomcharagain: thanks for the info :)

17:22 arrdem: np

17:43 lvh: What's the idiom for "Give me a list/vec of what happens when you call this function n times"? (It picks something randomly, so I'm expecting different results)

17:43 Right now I'm doing (for [i (range (rand-int 2))] ...)

17:43 arrdem: (doc repeatedly)

17:43 clojurebot: eval service is offline

17:44 arrdem: http://conj.io/store/v1/org.clojure/clojure/1.7.0-alpha4/clj/clojure.core/repeatedly/

17:44 fuck you hiredman

17:44 lvh: arrdem: huh?

17:44 arrdem: Thanks, though :)

17:46 mearnsh: can anyone explain these results? (only the last line of each function is different) https://www.refheap.com/102696

17:47 oops,

17:47 i forgot to change the outputs of my examples when i reduced the fns to their minimum example

17:47 hopefully my confusion is clear though

17:48 the-kenny: mearnsh: you override the `int' function with a function argument of the same name

17:49 mearnsh: of course! thanks

17:49 the-kenny: mearnsh: then you try to call `int' as a function. But `int' inside your function is a number.

17:49 mearnsh: complete blindspot there

17:49 the-kenny: (Clojure is a LISP-1 where this doesn't work)

17:49 mearnsh: right

17:49 cheers

17:59 jonathanj: how would i merge (bond?) one zipper onto another?

18:00 hiredman: what does that mean?

18:03 if a zipper is an adt with a set of operations, what do those operations mean on a merged zipper?

18:26 justin_smith: first world problems: the HTML spec says anything at all is valid in the fragment, but if you try to just put edn in there the browser refuses to just send it to the app as is :P

18:26 "it has spaces in it, you must have intended it to be a google search!"

18:27 j-pb: lol

18:27 justin_smith: j-pb: now if I just use cljs to inject edn into the fragment, it totally works

18:27 it's just the human UI that fucks up

18:28 stupid browsers

18:28 j-pb: yeah

18:28 mearnsh: stupid humans

18:29 erikcw: yogthos|away: Can you ping me when you have a minute. I have a question for you about reagent-forms

18:31 justin_smith: (swap! yogthos update-in [:away] not)

18:41 amalloy: justin_smith: we have update now!

18:49 justin_smith: d'oh

20:43 Bronsa: dnolen: FYI Namespace is not Named in clj, that's why we have ns-name

20:46 dnolen: unrelated but I believe making Var a Fn rather than just an IFn could break trampoline

20:54 dnolen: Bronsa: yeah will fix Namespace just busy trying to get anything to work. Will note the trampoline thing.

20:55 Bronsa: dnolen: want a ticket?

20:55 dnolen: Bronsa: nah just working on this stuff all day tomorrow anyhow

20:55 Bronsa: k

20:56 dnolen: let me know when the new fancy cljs is ready for release, I think we need to do a tools.reader+cljs release

20:58 dnolen: Bronsa: def!

21:31 Niac: can anybody give me some help on how to write a interpretor in clojure

21:34 arrdem: Niac: quite possibly what do you need to know?

21:36 Niac: i want to know how to start it

21:37 all i know it's how to create project and how to use clojure api

21:38 but i dont know about the interpretor

21:38 arrdem: This could help, it's a brainfsck interpreter project in clojure https://ochronus.com/brainfuck-in-clojure-in-40-lines/

21:38 Bronsa: Niac: interpreter for what?

21:43 Niac: THEORY

21:44 Bronsa: i want to learn Semantic

21:45 Bronsa: i used to use program language,but i dont really know what language is

21:47 bailon: I want to know the essence.

21:50 eriktjacobsen: Niac can you explain? what essence? what program language?

21:58 Niac: the essence of language

21:58 the theory of language

21:59 the rules of language

21:59 how to make a new language

22:00 justin_smith: Niac: read this book, and do all the exercises http://web.mit.edu/alexmv/6.037/sicp.pdf

23:31 yedi: is there a way to make a core async channel with a buffer size of 0?

23:31 something where any messages put on the channel with dissappear if no go thread is currently listening on that channel

23:32 i want to fix a bug with double clicking a button submitting an action multiple times in my cljs app

Logging service provided by n01se.net