#clojure logs

2015-06-18

01:34WickedShellAnswered 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
02:00tmtwd_can anyone help with this project.clj file?
02:00tmtwd_http://pastebin.com/bArUYNVL
02:00tmtwd_it won't compile
02:21ianytmtwd: i think you need to add clojure and clojurescript in your dependencies.
02:23ianytmtwd: try a template like chestnut or duct to see how people structure their apps.
02:23tmtwdok
02:38WickedShellIs 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)
03:56elvis4526Guys I have a blank - what's the name of the lein plugin that have integration with cider that allows to format a clojure buffer?
03:56elvis4526It removes blankspace, it align parenthese, etc...
04:12dstocktonelvis4526: lein-cljfmt?
04:12dstocktonhttps://github.com/weavejester/cljfmt
04:32kaffeeboehnchenHey. 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.
04:44elvis4526kaffeeboehnchen: Are you the on sending the json ?
04:44elvis4526one*
04:44kaffeeboehnchenelvis4526: Yes.
04:44kaffeeboehnchenThe content-type is application/json
04:44elvis4526are you sure ? I had the same problem a couple days ago
04:44elvis4526do you have the wrap-json-body middlware ?
04:45kaffeeboehnchenno
04:45kaffeeboehnchenAh, I see
04:45elvis4526https://github.com/ring-clojure/ring-json
04:45elvis4526"The wrap-json-body middleware will parse the body of any request with a JSON content-type into a Clojure data structure:"
04:45kaffeeboehnchenthanks for the hint elvis4526, I hope I can make it myself from here :)
04:46elvis4526no problem! It's actually the first time I know the answer of a question I see here lol
04:46kaffeeboehnchen:D
04:51phillordJust 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?
04:54oddcully(inc elvis4526)
04:54lazybot⇒ 1
05:15elvis4526dstockton: yes thanks !!
05:57kwladykaI 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.
05:57kwladykaSo... what is true convenction?
05:58wasamasa[citation needed]
05:58wasamasaespecially for the last one
05:59kwladykammm i read all this things about 1 month ago.... now i have time to organize that in my head :)
05:59lumafihttps://github.com/bbatsov/clojure-style-guide#changing-state-fns-with-exclamation-mark
06:00wasamasaalso, what's the deal with "expecting"
06:00wasamasathat is hardly objective
06:01kwladykalumafi, i belibe is it even better https://github.com/bbatsov/clojure-style-guide#refs - but still what with function with unexpected outside effect?
06:01wasamasajust because I expect a db to be a mutable mess doesn't mean I can omit the bangs for functions interacting with it
06:01lumafihow would a function have an unexpected side effect?
06:02lumafithe thing about STM transactions is that the code inside the transaction might run more than once
06:02kwladykawasamasa, 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
06:02noidiuse a bang (!) for non-idempotent side effects
06:02lumafiif something there causes a side effect like adding a value to a database, the value might be added many times
06:02lumafieven if you only call the function once in your code
06:03wasamasakwladyka: by that argumentation it would be ok if it were named create-user-and-add-them-to-newsletter
06:04kwladykalumafi, value may be added many times even if i run function once?
06:04wasamasakwladyka: which totally isn't what the bang convention is about
06:04lumafikwladyka, yes.
06:04lumafisince the code inside the transaction can be run multiple times
06:04lumafiuntil the transaction succeeds
06:05lumafi"Another feature common to STMs is that, should a transaction have a conflict while running, it is automatically retried."
06:05lumafifrom http://clojure.org/refs
06:06kwladykaoh but i can only happen in STM
06:07lumafiyes, that's what i said
06:07kwladykasumming up: use ! for all I/O and STM functions?
06:08kwladykaoh, not
06:08kwladykaonly for STM
06:08lumafino, use ! for functions that are NOT safe to call inside an STM transaction
06:08lumafiso basically anything that has a non-idempotent side effect
06:09kwladykammm i have a little problem to translate non-idempotent into my language :)
06:11wasamasakwladyka: idempotent = execute the function as often as you want, it won't alter any state
06:12lumafiidempotent = has the same effect, even if you run it more than once
06:12lumafiwasamasa, 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
06:13wasamasalike, an add-user-if-not-present
06:13lumafiyes
06:15kwladykathanky you, it is good explanation
06:17WickedShellIs 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)
06:19wasamasahttps://github.com/clojure/core.async/blob/master/src/main/clojure/clojure/core/async/impl/buffers.clj#L51
06:21WickedShellwasamasa, I don't see any mechanisim for reporting/counting dropped samples? (or was that your point? :P )
06:23kwladykaI am looking library for ORM database fors Postgresql, someting like http://laravel.com/docs/5.1/eloquent-relationships - is some mature library for that?
06:23wasamasaWickedShell: it's calling itself a sliding buffer, duh
06:24kwladykai found this https://github.com/razum2um/awesome-clojure#orm-and-sql-generation but is it up to date?
06:24wasamasajust use clojure.jdbc
06:24WickedShellwasamasa, 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
06:27kwladykawasamasa, whati with https://github.com/remodoy/clj-postgresql ?
06:29wasamasakwladyka: it is using clojure.jdbc...
06:29kwladykaoh...
06:30wasamasaso far all I see additionally to that is connection pooling and auto-conversion of types
06:32kwladykawasamasa, and what with https://github.com/razum2um/awesome-clojure#orm-and-sql-generation ? Did you use them?
06:32wasamasakwladyka: after working for some time with activerecord, I've started hating ORMs
06:32kwladykawhy?
06:32clojurebotbecause that's not how macros work
06:32p_lActiveRecord is probably one of the most horrible ones out there...
06:33wasamasabecause they generate horrible SQL (which half of the time doesn't perform well) and are leaky abstractions
06:33wasamasaafter all, SQL is a perfectly fine DSL already
06:33kwladykai will be glad if you can share with me your experience :)
06:33wasamasaadding another one over that and not screwing up is hard
06:36kwladykammm 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 :)
06:36wasamasaI'm not buying the argument of abstracting over databases either
06:37wasamasayou will choose a primary solution eventually, so why compromise and not use it to its full abilities?
06:38p_lwasamasa: 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 ;)
06:38kwladykammm 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
06:39p_lkwladyka: clean architecture would separate "data storage layer" which might interact with database from some other concepts
06:41wasamasaswitching your production database isn't something you're doing just because you feel like it and more of an emergency thing
06:41kwladykap_l, but on the end in this layer i have to use someting :)
06:41wasamasalike, if you were silly enough to use a proprietary solution that got bought and shut down by apple
06:41kwladykawasamasa, yes but i can always change client library for DB
06:41wasamasaor have learned that abandoning the relational concept was a stupid thing
06:43wasamasait's sort of like my experience with buying headphones
06:44wasamasaI used to have cheap ones with cables that constantly broke, bought expensive ones with replacable cables, then never had to replace the cable
06:44wasamasaretrospectively I could have saved me the trouble by just buying higher quality headphones in the first place
06:45kwladykafrom 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 :)
06:47kwladykawasamasa, yeah phones have to be expensive. Anyway companies still stop support them after 3 years
06:48kwladykaor less
06:48justin_smithkwladyka: I own headphones with a lifetime guarantee
06:48wasamasawell, I have a model here they stopped supporting after fourty years
06:49wasamasabecause they ran out of a specific type of metal for producing new transducers
06:49wasamasabut I don't care as long as I can get replacement earpads
06:51TEttingerI'm quite happy with these "Apple Earpods" that came with my dad's iPhone
06:52TEttingerhe used in-ear headphones, so he gave these to me
06:52TEttingerthe bass is significantly better than most earbuds
06:52TEttingerand they seem pretty durable, I keep them in my pocket getting battered slightly, no sign of damage after a year or two
06:54BronsaI keep destroying headphones, I forget I have them on and just walk away from the pc
06:54TEttinger(surprising since the original apple headphones just crapped out so fast)
06:54TEttingersolution: never get up from the PC
06:54justin_smithTEttinger: 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
06:54TEttingerwell the price was uh "no additional charge"
06:55justin_smithTEttinger: they go for ~$10 new
06:55BronsaI've even had to replace the audio board of my laptop as I broke the headphone port :(
06:55kwladykajustin_smith, do you also think ORM for SQL are not worth to use and use clojure/java.jdbc instead?
06:56TEttingerarethey in-ear, justin_smith? I hate the sound in-ear ones make when the cord moves against my beard
06:56justin_smithkwladyka: that would be my preference, yeah. ORM has leaky abstractions. I did work on a custom abstraction over sql myself (caribou).
06:56justin_smithTEttinger: yeah, they are, and fair point about that sound
06:57kwladykai 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
06:57justin_smithTEttinger: but in terms of quality / price those guys for $20 are really hard to beat
06:57TEttingerindeed
06:58TEttingerI 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
06:59TEttingerthe salesman was trying to sell ones for twice the price, but I practically fell asleep on this thing in the store
07:00TEttingerthere's some connection to be drawn to OSS vs. proprietary, expensive tools
07:00TEttinger"OSS is comfy"
07:36GuthurHi, has anyone tried to use the jmonkey engine from clojure
07:36GuthurI was following http://www.thejach.com/view/2012/5/getting_started_with_jmonkeyengine_and_clojure
07:36Guthurbut get a NPE on startup
07:39TEttingerGuthur: do you specifically need 3d?
07:40TEttingerplay-clj is 2d only but is much nicer to use, I would say
07:42TEttingerthere's quil for idiomatic 3d as well, Guthur https://github.com/quil/quil
08:25mearnshso 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)
08:25mearnshany pointers on how to handle such a situation? maybe lein checkout dependencies?
08:31phillordI 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?
08:33GuthurTEttinger: JME3 seemed the more complete 3D game engine.
08:34TEttingeryeah, 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
08:35Guthurnot sure
08:36Guthurdidn't think there would be that many published games on JVM to begin with
08:36TEttingerlibgdx lists many, most are 2d
08:36TEttingerminecraft uses LWJGL I am fairly sure
08:37Guthurah yeah, how could I forget that one
08:38GuthurI'll check out lwjgl
08:38Guthurjust doing some initial investigation at the moment
08:38TEttingerLWJGL 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
08:38TEttingerI mean, adding that feature to play-clj would be awesome
08:41Guthurdoesn't seem to mention the 2D limitation here https://github.com/oakes/play-clj
08:42Guthurindeed it says...
08:42Guthur"A Clojure library that provides a wrapper for libGDX, allowing you to write 2D and 3D games "
08:42GuthurI'll give it a whirl
08:44kaffeeboehnchenDoes 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. :/
09:07Sorellakaffeeboehnchen: 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.
09:08kaffeeboehnchenah, thanks Sorella
10:15jonathanjso there's a zipper function for going up and down, each of which give you a location
10:16jonathanjbut (root) gives you the node value of the root and not a location?
10:19jonathanji 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:29noncomwhat currently is the library to create XML with clojure?|
10:29iwillignoncom: some people use this https://github.com/clojure/data.xml
10:31jonathanjthe reduce function seems a bit hacky
10:32noncomjonathanj: what do you mean?
10:32noncomwhy hacky?
10:34jonathanji mean my reduce function in my paste
10:34jonathanj(my-zipper (zip/root (zip/append-child ...))) seems hacky
10:34noncomah..
10:35noncomunforunately i am not too much into zipping and building trees like that, so i cannot comment on this :)
10:46noncomnoncom: can i somehow make data.xml to not emit the xml header tag?
10:49noncomiwillig: ^^^
10:49noncomasked myseld :)
10:49noncoms/myseld/myself
10:53ptrckbrwnI'm trying to iterate over a lazy-seq while updating a transient, is there a common pattern for doing this?
10:57iwillignoncom: i am not sure sorry. i never need to do that
10:58noncomokay so i'll just strip the resulting string...
10:59ptrckbrwnWhat 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:59ptrckbrwns/"items"/"item"
11:00iwillignoncom: it seems like you set the encoding but not to drop the header tag
11:00iwillighttps://github.com/clojure/data.xml/blob/master/src/main/clojure/clojure/data/xml.clj#L370-L385
11:01noncomiwillig: yes, looks like the header tag is made by the XMLStreamWriter itself
11:01noncomso okay, i guess it is far easier to just post-process the string
11:12gfredericksI'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:19gfredericksoh I might've been misconcepted
11:22gfredericksindeed.
11:39lvhIs there an idiom for "first elem in coll that matches pred", other than (first (keep pred coll))
11:39lvhI wanna say some, except some returns the result of the pred it seems
11:41pyrtsa(first (filter pred coll)) or (->> coll (filter pred) first)
11:42eglilvh: isn't that what some does?
11:42eglihttps://clojuredocs.org/clojure.core/some
11:42pyrtsakeep probably isn't what you want when pred returns true/false.
11:43lvherr, yeah, sorry, filter :)
11:43lvh,(some #(= % 7) [2 4 6 7])
11:43clojurebottrue
11:43lvhnotably not 7 :(
11:45egli,(some #(and (= % 7) 7) [2 4 6 7])
11:46clojurebot7
11:46eglilvh: lame but it works
11:46lvhYeah :)
11:46lumafi,(some #{7} [2 4 6 7])
11:46clojurebot7
11:47egli,(some #(and (= % 7) %) [2 4 6 7])
11:47clojurebot7
11:52lvhSo, 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:52lvhkey*
12:25dagda1is it possible to also take the last element when the take-while is predicate is false.
12:35gfrederickstake-while+1 ?
12:36gfredericks,(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:36clojurebot#'sandbox/take-while+1
12:36gfredericks,(take-while+1 #(< % 10) (range))
12:36clojurebot(0 1 2 3 4 ...)
12:41dagda1gfredericks: is that the name of the function take-while+1
12:41dagda1gfredericks: right I see what you mean
12:43dagda1gfredericks: works a treat, thanks
12:46gfredericksdagda1: that's what I would call it; you could probably find it in a utility library but I don't know which
12:47dagda1gfredericks: yeah I just found a take-until in contrib
12:59kwladykawhat solution do you use to hide ids from users in URL? Additional column in db with uuid or encrypt id or ... ?
13:02gfrederickskwladyka: what's the goal? prevent users from guessing other ids?
13:03kwladykagfredericks, prevent users to know the numbers of row in the table, like how many users, orders etc. you have
13:04kwladykajust not let them easy estimate scale of business like for example in e-stores
13:24lnostdal_androidI've used uuids for that
13:46aaelonyNew 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:46aaelonywrong channel, disregard :(
14:06ShayanjmI have a seq of sets of maps that I'd like to combine into one large set of maps
14:06ShayanjmI've been stabbing in the dark but haven't been able to get the expected result
14:06Shayanjmany input would be helpful :)
14:11danielglauserShayanjm: have you looked at http://clojuredocs.org/clojure.core/merge
14:11Shayanjmdanielglauser: I did, merge-with union didn't work as well as I thought it would
14:11Shayanjmor at least, didn't do what I thought it would
14:11Shayanjmbe trying something else
14:11Shayanjmmight've worked
14:13danielglauser,(apply merge [{:a :a} {:b :b} {:c :c}])
14:13clojurebot{:a :a, :b :b, :c :c}
14:13danielglauserShayanjm: ^^^
14:14justin_smithdanielglauser: there are no sets there
14:15danielglauserjustin_smith: Missed that part...
14:16justin_smithShayanjm: ##(reduce into [#{{:a 0}} #{{:a 0} {:b 1}} #{{:c 2}}])
14:16lazybot⇒ #{{:b 1} {:a 0} {:c 2}}
14:16justin_smithseq of sets of maps into a set of maps
14:16Shayanjmjustin_smith: I just did (set (apply concat <seq of set of maps>))
14:17justin_smithShayanjm: reduce into does less work
14:17justin_smithbut that will get hte same result
14:17Shayanjmsweet
14:18Shayanjmreduce into is very elegant though
14:18justin_smithand does less work :)
14:18justin_smithbut sometimes the CPU cycles just don't matter
14:18Shayanjmswapped it
14:27ambrosebsblog post on gradual typing for clojure http://frenchy64.github.io/2015/06/19/gradual-typing.html
14:32dnolenambrosebs: cool! like the look of blog :)
15:06lvhI 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:08ambrosebsdnolen: cheers!
15:08ambrosebslvh: thanks! :)
15:08lvhthank *you*
15:08lvhit has been a critical tool for convincing people clojure's a thing
15:08lvhFP is a decent sell but then they start talking about type systems
15:09lvhso 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:09dnolenyeah I know the Clojure stuff alone is a ton of work, excited to see some of this goodness supported for ClojureScript :)
15:09hfaafbmmm parens
15:09oddcully(inc ambrosebs)
15:09lazybot⇒ 11
15:10ToxicFroglvh: is this different from core.typed or the same thing?
15:11lvhToxicFrog: ambrosebs is the person to ask stuff but yes, this is core.typed
15:11lvhToxicFrog: I just use it, I know little about how the sausage is made :)
15:11ToxicFrogAah.
15:11ToxicFrogI meant "is typed clojure the same as core.typed", not really asking about impl :)
15:11ToxicFrogI had bad experiences with core.typed last time I used it, maybe I'll try it again next year
16:07amalloyToxicFrog: there's not really any such thing named typed clojure; it's just a descriptor for the thing named core.typed
16:27arrdemamalloy: 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:27arrdemfor "typed" being "core.typed ensured"
17:07randomcharherenew to clojure how do yoi do compund if statements as in if((x=1)and(y=1)) ...
17:08justin_smith(doc and)
17:08clojurebot"([] [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:08arrdemrandomcharhere: (if (and (= x 1) (= y 1)) true-case false-case)
17:08arrdemjustin_smith: o/
17:09randomcharherewoot thanks :)
17:09arrdem$grim clj::clojure.core/and
17:09justin_smithrandomcharhere: also ##(let [x 1 y 1] (= x y 1))
17:09lazybot⇒ true
17:09justin_smith= is varargs, if you really are comparing two things to the same value
17:10amalloy(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:11justin_smithhaha
17:11Bronsalol
17:11Bronsa(inc amalloy)
17:11lazybot⇒ 282
17:11randomcharhere:P
17:11arrdemsurely you can get a juxt in there..
17:13amalloy(every? true? ((juxt #{x} #{y}) 1))
17:13amalloyoh er
17:13amalloy(every? one? ((juxt #{x} #{y}) 1))
17:13randomcharhereis there a more functioanl repl out there some where the one I'm using is akward... for win8
17:13amalloyrandomcharhere: leiningen's
17:14randomcharhereis what I'm using in a dos window ...
17:14j-pb(inc yogthos|away)
17:14lazybot⇒ 1
17:14amalloywell, emacs or vim or eclipse or intellij all have great clojure plugins
17:14amalloyprobably other tools too, but i feel like those are the big 4
17:14j-pbrandomcharhere: gorilla repl is kinda nice
17:14randomcharherecool
17:15j-pbif you don't have a usefull unix terminal :)
17:15randomcharherenever heard of that one
17:15j-pbhttp://gorilla-repl.org
17:15j-pbnotebook, similar to jupiter a.k.a. IPython
17:16arrdemrandomcharhere: 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:17randomcharherethink 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:19j-pbyeah cursive is great
17:19j-pbbut its a full ide
17:21arrdemcompared to learning vim or emacs, cursive is very low investment
17:21j-pbhaha yeah
17:22randomcharagainthanks for the info :)
17:22arrdemnp
17:43lvhWhat'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:43lvhRight now I'm doing (for [i (range (rand-int 2))] ...)
17:43arrdem(doc repeatedly)
17:43clojureboteval service is offline
17:44arrdemhttp://conj.io/store/v1/org.clojure/clojure/1.7.0-alpha4/clj/clojure.core/repeatedly/
17:44arrdemfuck you hiredman
17:44lvharrdem: huh?
17:44lvharrdem: Thanks, though :)
17:46mearnshcan anyone explain these results? (only the last line of each function is different) https://www.refheap.com/102696
17:47mearnshoops,
17:47mearnshi forgot to change the outputs of my examples when i reduced the fns to their minimum example
17:47mearnshhopefully my confusion is clear though
17:48the-kennymearnsh: you override the `int' function with a function argument of the same name
17:49mearnshof course! thanks
17:49the-kennymearnsh: then you try to call `int' as a function. But `int' inside your function is a number.
17:49mearnshcomplete blindspot there
17:49the-kenny(Clojure is a LISP-1 where this doesn't work)
17:49mearnshright
17:49mearnshcheers
17:59jonathanjhow would i merge (bond?) one zipper onto another?
18:00hiredmanwhat does that mean?
18:03hiredmanif a zipper is an adt with a set of operations, what do those operations mean on a merged zipper?
18:26justin_smithfirst 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:26justin_smith"it has spaces in it, you must have intended it to be a google search!"
18:27j-pblol
18:27justin_smithj-pb: now if I just use cljs to inject edn into the fragment, it totally works
18:27justin_smithit's just the human UI that fucks up
18:28justin_smithstupid browsers
18:28j-pbyeah
18:28mearnshstupid humans
18:29erikcwyogthos|away: Can you ping me when you have a minute. I have a question for you about reagent-forms
18:31justin_smith(swap! yogthos update-in [:away] not)
18:41amalloyjustin_smith: we have update now!
18:49justin_smithd'oh
20:43Bronsadnolen: FYI Namespace is not Named in clj, that's why we have ns-name
20:46Bronsadnolen: unrelated but I believe making Var a Fn rather than just an IFn could break trampoline
20:54dnolenBronsa: yeah will fix Namespace just busy trying to get anything to work. Will note the trampoline thing.
20:55Bronsadnolen: want a ticket?
20:55dnolenBronsa: nah just working on this stuff all day tomorrow anyhow
20:55Bronsak
20:56Bronsadnolen: let me know when the new fancy cljs is ready for release, I think we need to do a tools.reader+cljs release
20:58dnolenBronsa: def!
21:31Niaccan anybody give me some help on how to write a interpretor in clojure
21:34arrdemNiac: quite possibly what do you need to know?
21:36Niaci want to know how to start it
21:37Niacall i know it's how to create project and how to use clojure api
21:38Niacbut i dont know about the interpretor
21:38arrdemThis could help, it's a brainfsck interpreter project in clojure https://ochronus.com/brainfuck-in-clojure-in-40-lines/
21:38BronsaNiac: interpreter for what?
21:43NiacTHEORY
21:44NiacBronsa: i want to learn Semantic
21:45NiacBronsa: i used to use program language,but i dont really know what language is
21:47Niacbailon: I want to know the essence.
21:50eriktjacobsenNiac can you explain? what essence? what program language?
21:58Niacthe essence of language
21:58Niacthe theory of language
21:59Niacthe rules of language
21:59Niachow to make a new language
22:00justin_smithNiac: read this book, and do all the exercises http://web.mit.edu/alexmv/6.037/sicp.pdf
23:31yediis there a way to make a core async channel with a buffer size of 0?
23:31yedisomething where any messages put on the channel with dissappear if no go thread is currently listening on that channel
23:32yedii want to fix a bug with double clicking a button submitting an action multiple times in my cljs app