#clojure logs

2015-12-18

00:09owlbirdIt's possible to use info->'food' ? 'carrots' to query 'carrots' whether or not a member of info (jsonb) in PostgreSQL 9.4 , but the jdbc library treats '?' as a prepared statement, how do I fix that?
00:28zererazhi, I have a doubt
00:28zererazI did, lein new test, then cd test, then lein run but it gave me error
00:28zererazNo :main namespace specified in project.clj.
00:29zererazdon't know what to do
00:31zererazok I found the problem, I had to create using "lein new app my-app"
00:31zererazrather than just lein new my-app
02:57keep_learningHello everyone
02:57aztakmornin'
02:58keep_learningCould some one please tell how to download a web page containing java script
03:08keep_learningI got one idea but it's not working with my functional mindset.
03:09keep_learningI am trying to use clj-webdriver but it seems to me that it's changing the states of browser by invoking the commands.
04:54keep_learningHello everyone
04:54keep_learningI am getting error for this code.
04:54keep_learninghttp://lpaste.net/147323
04:54keep_learningIllegalArgumentException Don't know how to create ISeq from: net.cgrand.enlive_html$html_content$fn__4387 clojure.lang.RT.seqFrom (RT.java:528)
04:55keep_learningRight now I am trying to find the links of google search
04:55keep_learningso I am running a web driver to execute the javascript and enlive to find all the tags [:a]
07:36noncomkeep_learning: well, first of all the top section of the namespace is weird... are you typing this in the repl?
07:36keep_learningnoncom, Thank you for reply
07:36keep_learningnoncom, Yes
07:37keep_learningnoncom, but now I have moved that code to file
07:37keep_learningso I have written the same thing in file
07:38noncomkeep_learning: next: https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L655
07:38noncomthe html-content function returns a function
07:39noncomthis https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L553 , however idk what it expects, most likely not a function
07:40noncomkeep_learning: are you sure these two functions can work together like in your code?
07:41keep_learningnoncom, I was trying to figure and changed the code
07:42keep_learningnoncom, http://lpaste.net/147329
07:42noncomdoes it give the same erorr?
07:43keep_learningnoncom, So now it's working but I am newbie so I don't know how to idiomatic clojure code
07:43noncomkeep_learning: oh
07:43noncomdid you read this? https://github.com/swannodette/enlive-tutorial
07:43noncomgives a good insight into the topic..
07:43noncomkeep_learning: also, one rule of a thumb: never use use :)
07:44noncomit is deprecated so much
07:45keep_learningnoncom, Yes, From there I am trying to figure out bits of enliven
07:46noncomkeep_learning: well, that your second example of code looks ok to me, except that it still uses repl-like requirements section and uses (use)
07:46noncom:)
07:47noncombut as you said, you have the regular file-like ns declaration in your actual code, so it is ok
07:47noncombut still i'd strongly advice you to get rid of use
07:47keep_learningnoncom, I have knowledge of Haskell so I am comfortable with functional part except how to import library :)
07:48noncomkeep_learning: well, but i think you already know this thing: (ns my-ns (:require [aaa.a :as b] [ads.asd :as ggg :refer [n]]) (:import some.java.Clazz))) ... ?
07:48noncomlike, if you look into any clojure file from any code, like the enlive lib itself, you'll see that at the top
07:49noncomkeep_learning: doh, enlive uses a thousand :require here https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L11
07:49keep_learningnoncom, Thank you. Do you have quick link
07:49noncomone is enough
07:49noncomwait a sec
07:50noncomkeep_learning: https://gist.github.com/ghoseb/287710
07:50noncomkeep_learning: look here for a good example: https://github.com/dakrone/cheshire/blob/master/src/cheshire/core.clj
07:50noncomand if you see :use or (use) - ignore it, it's not welcome these days
07:51keep_learningnoncom, Thank you
08:11troydmlet's say I have '((1 2) (3)) how do I convert it into '(1 2 3) ?
08:11opqdonut,(apply concat '((1 2) (3)))
08:11clojurebot(1 2 3)
08:12troydmopqdonut: thx
08:12opqdonut,(apply concat '((1 2) (3 4 5) (6))) -- more generally
08:12clojurebot(1 2 3 4 5 ...)
08:15ridcully_,(sequence cat '((1 2) (3) (4 5)))
08:15clojurebot(1 2 3 4 5)
08:18BRODUSsay i have an anonymous function, how can I operate on that function as if it were a list?
08:19lumawhat do you mean "as if it were a list"
08:19lumahow would a function be a list?
08:20BRODUSwell i assumed that it was since we write them as such
08:22lumawhat would you do with it "as a list"?
08:23MJB47,(first '(+ 1 1))
08:23clojurebot+
08:23MJB47i wonder..
08:23MJB47,((first '(+ 2 3)) 4 5)
08:23clojurebot5
08:26BRODUSluma: in my case, i'm trying to convert the function to a string,
08:27MJB47,(name (first '(reduce + (range 3))))
08:27clojurebot"reduce"
08:27BRODUSi figured the function would be stored in a list data structure, am i wrong?
08:28lumawhen the code is executed, it creates a function object
08:35hyPiRionBRODUS: (first '(+ 2 3)) returns the symbol +
08:36hyPiRion,[('+ 4 5) ('+ 4)]
08:36clojurebot[5 nil]
08:45oic3ieNgHello. Could you recommend me a short and easy tutorial on datomic pull api?
08:55ridcully_oic3ieNg: you have seen the docs, right?
09:02oic3ieNgridcully_: I mean something really simple and to the point, without mbrainz, grammars, java, led zeppelin and whatnot
09:18sdegutisHi.
09:18sdegutisHow are you going?
09:28oic3ieNgSlowly.
09:30noncomBRODUS: if you read it, then it is a list, however, in runtime the functions get transformed into function objects
09:30noncomwow, swift! )
09:36noncomdrinking green tea
09:36beakyi love greentea
09:36beakyim drinking dong ding oolong rite now
09:37noncomnice one!
09:37beakyrunning out of it tho :(
09:53sdegutisOh.
11:09benjyzzanyone in #clojure interested in cryptocurrencies?
11:21TimMcVaguely. I've really cooled off on bitcoin because it seems like a waste of electricity and the consensus protocol is now controlled by just a few miners.
11:22TimMcStellar seems neat, though. It doesn't use proof-of-work and they're trying to use it to help the unbanked exchange money.
12:18BRODUSany ideas on how I can get a reference to the newline character without using \n
12:19justin_smith\newline - \n is the letter n
12:19justin_smith,(= (first "\n") \newline)
12:19clojurebottrue
12:19justin_smith,(= (first "n") \n)
12:19clojurebottrue
12:21BRODUSI don't think I can use that either, that expression will eventually get read as a string and I need it to not break on the \newline
12:21justin_smiththere is no character literal for newline that will work both inside and outside a string
12:21justin_smith,(str \newline)
12:21clojurebot"\n"
12:22justin_smiththough...
12:23momerathbenjyzz & TimMc : I work at Ripple - feel free to msg me if you want to talk cryptocurrencies. I hope we'll be hiring at least one more clojurist in the next year too.
12:24yendahttps://news.ycombinator.com/item?id=10758888 nice article on clojure design patterns
12:26BRODUS,(eval '(char 10))
12:26clojurebot\newline
12:31justin_smith,(eval \newline)
12:31clojurebot\newline
12:34TimMcmomerath: Heh, thanks, but I try to stay far, far away from the financial sector. :-P
12:34beaky,(eval "(eval \"(eval '()))\"")
12:34BRODUS,(println "(eval \newline)")
12:34clojurebot"(eval \"(eval '()))\""
12:34clojurebot(eval \newline)\n
13:30jdeisenbergWant to do a websockets server. Am I better off using Clojure w. jetty/ring or ClojureScript w. node.js?
13:31jdeisenbergIt may be running on a raspberry pi level CPU; for now, it's a normal fairly reasonable Athlon.
13:32justin_smithjdeisenberg: well, I definitely would not use jetty for a clojure websocket server
13:32jdeisenbergRing would be a better choice, then?
13:33justin_smithjdeisenberg: ring is a protocol that has adaptors, the jetty ring adaptor does not do websockets
13:33justin_smithbut aleph or netty or http-kit with ring are all options that do websockets with ring
13:34justin_smithjdeisenberg: jvm clojure is not apropriate for doing anything serious on arm, at least not with raspberry pi quantities of RAM available
13:35justin_smithclojure will do amazing things on a machine that has sufficient RAM, but it doesn't really do light weight
13:36jdeisenbergYeah, I sort of thought that would be a problem.
13:36justin_smithclojurescript and pixie are both definitely usable on the raspberry pi
13:36justin_smithpixie is experimental, and clojurescript has an odd dev toolchain
13:37keep_learningHello everyone.
13:37keep_learningI am working with clj-webdriver
13:37keep_learningand trying to run this code
13:37keep_learning(get-url "https://www.tripadvisor.in/")
13:38keep_learning(quick-fill-submit (xpath "#GEO_SCOPED_SEARCH_INPUT" city)
13:38keep_learning (xpath "#mainSearch"))
13:38keep_learningbut getting IllegalArgumentException No implementation of method: :find-elements of protocol: #'clj-webdriver.core/IFind found for class: java.lang.String clojure.core/-cache-protocol-fn (core_deftype.clj:554)
13:38justin_smithkeep_learning: get-url will return a string, right?
13:40justin_smithoh, never mind - it navigates the browser
13:40keep_learningjustin_smith, I think Navigate the browser to `url`.
13:40keep_learningyes
13:41justin_smithkeep_learning: looks like quick-fill-submit wants its args to be hash-maps https://github.com/semperos/clj-webdriver/wiki/Taxi-API-Documentation#quick-fill-submit
13:42justin_smithkeep_learning: and xpath returns a string https://github.com/semperos/clj-webdriver/wiki/Taxi-API-Documentation#xpath
13:43justin_smithkeep_learning: seems like that would be the error
13:43keep_learningjustin_smith, Yeah
13:43keep_learningjustin_smith, Thank you
13:46jdeisenbergjustin_smith: thanks for the info.
13:57ghost_justin_smith: what do you use for development? I mean, text editor
13:58keep_learningjustin_smith, Could you please tell me if I my CSS selector is correct or not ?
13:58keep_learning(quick-fill-submit {"global_nav_search_form#GEO_SCOPED_SEARCH_INPUT" city}
13:58keep_learning {"global_nav_search_form#mainSearch" "Hotel"}
13:58keep_learning {"global_nav_search_form.SEARCH_BUTTON" click})
13:59keep_learningI am taking the form id global_nav_search_form and then filling both forms
13:59keep_learningGEO_SCOPED_SEARCH_INPUT and mainSearch
14:00keep_learninghttps://www.tripadvisor.in/
14:00keep_learningI am getting TimeoutException Timed out after 10 seconds waiting for clj_webdriver.wait.proxy$java.lang.Object$ExpectedCondition$66be6a90@23d96cee
14:00keep_learningbecause I have (wait-until false 10000)
14:00keep_learningto wait for 10 sec
14:01justin_smithyeah, I'm not sure about the selector syntax for that lib, sorry
14:02keep_learningjustin_smith, No problem. I am just trying to figure out all the way. Thanks for your help
14:24ghost_justin_smith: it's kind of important for me, because I want to finally settle on something
14:28kungiI am trying to use the BarbaryWatchService (https://github.com/gjoseph/BarbaryWatchService/blob/master/Demo.asciidoc) from Clojure.
14:29kungiIn https://github.com/gjoseph/BarbaryWatchService/blob/master/src/main/java/com/barbarysoftware/watchservice/WatchEvent.java there is a public static interface Kind<T> how can I address this through java interop?
14:30ridcully_WatchEvent$Kind ?
14:31kungiridcully_: Sadly no
14:31kungiI get an "Unable to resolve symbol" error
14:32kungiridcully_: I am trying to call this function: https://github.com/gjoseph/BarbaryWatchService/blob/master/src/main/java/com/barbarysoftware/watchservice/WatchableFile.java#L36
14:34ridcully_aren't those then StandardWatchEventKind/ENTRY_CREATE ?
14:35kungiridcully_: Yes they are. Let me show you a bit more code
14:35justin_smithkungi: should be something like (.register wf (into-array WatchEvent$Kind [event, event, ...]))
14:35justin_smithoh wait, I missed an arg there
14:35kungihttps://gist.github.com/47635b4ea28dae353be4
14:36kungijustin_smith: I tried that and is does not work ... :-(
14:36justin_smithwhat symbol is it unable to resolve?
14:36kungiWatchEvent$Kind
14:37justin_smithkungi: what does your import look like?
14:37justin_smithimporting WatchEvent won't import WatchEvent$Kind - they each have to be imported separately
14:38kungijustin_smith: AHA! Sweet
14:38kungijustin_smith: thank you I was not aware of this
14:38justin_smithin the java view WatchEvent$Kind "belongs to" and is "inside of" WatchEvent, in the jvm, WatchEvent$Kind is just a funny name in the same package WatchEvent is in
14:39ridcully_(inc justin_smith)
14:39justin_smithwell, not *just*, but...
14:39kungi(inc justin_smith)
14:39ridcully_bah stupid bot
14:39ridcully_started weekend already
15:05spiedeni needed to "patch" datomic entities today by diffing current vs previous attribute values and generating assertions. so amazingly straight forward in clojure -- even handles cardinality many (but not rels) https://gist.github.com/spieden/79255a3a0f27e2c372d8
15:40felixnanyone have autotesting that works for them? I'm using midje, but it's not identifying cljc files o_O. also if I remove a test, it keeps the stale output when reloading
15:40j-pbwe abandoned midje long ago, I'd go with plain clojure test :)
15:41j-pbwe had a pretty nasty bug in out production system that we didnt' find because we forgot a => in midje wich made the test always pass
15:55felixnj-pb: how do you rerun the test? `test-refresh` seems to be working a lot better, but sometimes I do have to restart
15:57spiedenj-pb: yeah, i wish they didn't use magic symbols like that
15:57j-pbfelixn: intellij actually :)
15:57j-pbcursive has really nice core.test integration
15:57j-pbon the cljs end there is doo
15:57j-pbspieden: yeah, does it work at all with test.check? our codebase would just collapse without it ^^
15:58spiedenj-pb: hmm not to my knowledge. does cursive have integration with the intellij test runner now or is it still just "send to REPL" style?
15:59spiedeni'd switch back in a heartbeat if it did
16:00spiedenhmm looks like just repl
16:00felixnj-pb: nice, I'll give cursive a try. intellij is amazing for python, though atom is very easy on the eyes
16:01j-pbspieden: yeah, you do send tests in current repl to ns, I agree that it would be nicer to have continuous checking :)
16:02spiedenmidje seduced me with its code reload and autotest
16:02felixnanyone know if it's possible to get the name of an 'clojure.core.logic/lvar? I think it maybe (.getField (lvar "foo" false) "name"), but not sure how to import the datatype functions
16:02j-pbspieden: but you don't need midje for that I think https://github.com/jakepearson/quickie
16:07spiedencool i'll check it out
16:07spiedendefinitely would be nice to use that "Re-run last test action in REPL" action. do you guys use the cursive auto code reloading or tools.namespace for your in-ide test workflow?
16:08spiedenj-pb: ^^
16:08j-pbmanual reloading
16:08j-pbbreaks less stuff and is only one keystroke :)
16:39lokien_What do you guys use for editing Clojure? IDE, good old Emacs with Paredit?
16:46futurolokien_: emacs + paredit + cider + clj-refactor
16:47lokien_futuro: standard emacs bindings?
16:47futuroyeah
16:47lokien_Masochist
16:48lokien_futuro: anyway, thanks. I think I'll do the same
16:48futuroI hear spacemacs is pretty good if you want modal editing
16:48futurolokien_: np
16:48j-pblokien_: intellij and cursive is pretty nice
16:48j-pbbut if you're already an emacs head, then you maybe want to stay one ;)
16:49lokien_futuro: I'm using it now but emacs bindings for workspaces and vim's for editing are making me cringe
16:49lokien_futuro: and huge tutorials aren't really my thing
16:50futuroyeah, pretty much whatever editor you're currently using is the one you should use for clojure, assuming you're not specifically looking for a new one
16:50futurolokien_: why not vim+fireplace+other stuff?
16:50lokien_j-pb: I'm not, I just want something simple with autocomplation and repl
16:51lokien_futuro: repl was awful last time, I'll give it a shot tomorrow
16:51lokien_autocompletion*, durr
16:51futurolokien_: word, I'm interested in how that goes
16:52j-pblokien_: cursive has pretty decent refactoring tools, that's why I use it
16:52lokien_futuro: I'll let you know
16:52lokien_j-pb: large codebases?
16:53ridcully_vim, fireplace, paredit
16:53futuroridcully_: how's it's refactoring support?
16:53j-pblokien_: yeah pretty, I wouldn't know how to navigate them without show usages
16:53ridcully_non existing?
16:54futuroridcully_: ah, ok
16:54lokien_ridcully_: how do you connect to the repl? is it just sitting in another terminal tab?
16:54j-pbfuturo: I'm not a fan ob hour long config twiddling, the codebase I have to worry about is enough to keep me up at night :D
16:55ridcully_yes. :Connect nrepl-url - or just :Console (via vim-salve)
16:55lokien_j-pb: I always end up deleting half of my code doing refractoring in an IDE (or doing other spooky stuff I can't undo)
16:55j-pblokien_: I mean ^^
16:55j-pblokien_: intellij has a pretty long undo history
16:56j-pbit's not as nice as emacs undo tree, but tbh I never had any problems with cursive refactorings
16:56lokien_j-pb: I'm not a smart man
16:57lokien_ridcully_: no tmux or other goofy stuff?
16:58ridcully_usually tmux - and tmux things made into my aliases. so your goofy is my normal
16:58futuroit looks like there's some work surrounding the refactor-nrepl https://github.com/Deraen/vim-cider
16:59lokien_ridcully_: it will eventually become my normal too. big thanks, see goofy-me in a month
17:00DeraenFireplace will also automatically try connecting to nrepl when trying to evaluate something, so :Connect is not usually necessary
17:01lokien_futuro: I'll check it tomorrow, thank you too
17:01ridcully_for cljs i use a patch - so this works fine for me in both universes
17:01lokien_Daraen: really? oh
17:01ridcully_yeah, :Connect is usually not needed - but it allows you to connect to lein repl without project.clj e.g.
17:01DeraenYes. Lein and Boot both write a .nrepl-port file which is used by editors to automatically detect nrepl
17:02lokien_I've been typing that all the time
17:02lokien_And memorizing repl's port
17:02lokien_Sweet baby jesus
17:03DeraenAbout refactoring stuff, I rarely miss Cursives's features as Vim has great macros and several other features which make it easy to repeat same modifications to multiple places in one file or even to all files in project.
17:04DeraenNot as easy to use, but it
17:04Deraenit's possible to do pretty much anything with those.
17:04lokien_Cursive was too much rocket science for me, as every IDE
17:18felixnI'm trying to recursively map, but at the same time keep a running total state along side. is there a good way to do this in clojure? I'm having trouble finding an article that explains assoc! / persistent! / transient well
17:20j-pbfelixn: those are not meant or suitable for mutable state
17:20j-pbjust in case that's how you want to use them :)
17:21j-pbfelixn: do you want to process a tree, or what do you mean by recursive map?
17:21felixnI'm rewriting a nested data structure, but I want to keep track of what I rewrote in a map, and return the rewritten data structure along with the final mapping. trying to figure out how XD
17:22j-pbdon't use transients for that they are a perfromance optimisation nothing more
17:22j-pbI'd look at zippers maybe, they are perfect for traversing a tree, and accumulating state in a loop
17:27j-pbfelixn: it kinda depends, how large is you nested datastructure?
17:27j-pbwill a simple update-in suffice?
17:29felixnj-pb: it's small, I'm checking out zipper right now. it's really hard to figure out how to use these things from the documentation XD https://clojuredocs.org/clojure.zip/zipper
17:29j-pbfelixn: could you describe a bit more what you want to do :)
17:29j-pbzippers are great for example for manipulating xml
17:31j-pbfelixn: it takes some adjusting, but generaly speaking you never ever need mutable state if you're just processing data
17:44futuroreducers was one of those things that took me a while to wrap my head around
17:48lambda-11235Would anyone recommend using measjure for unit analysis? Has anyone used it.
17:50justin_smithlol, this page is the only google hit for measjure: https://gist.github.com/ddillinger/5154002#file-gistfile1-txt-L46
17:52lambda-11235Its spelled without the s, and I get the github account when I google it (https://github.com/arrdem/meajure).
17:52lambda-11235Are there any other unit analysis that do algebraic analysis?
17:52justin_smithahh, I googled measjure and only found that amusing gist :)
17:53ridcully_you googled ass
17:53justin_smithlambda-11235: not that I know of, and arrdem is a smart cookie, that's probably a good lib
17:53justin_smithridcully_: no, I just chose to highlight that line :P
17:53ridcully_:)
17:54amalloythe only successful clojure project: nonfailjure
17:54justin_smithhaha
18:03rhg135that's amusing
18:26anoctopusAnyone here using squiggly-clojure? I can't get it to show anything
18:46rhg135hmm, where can I get the latest jar of clojure?
18:47justin_smithrhg135: maven should have it
18:47rhg135I think they were on github, might have been cljs
18:47justin_smithrhg135: http://clojure.org/downloads
18:47rhg135I'll do that then. thx
18:48justin_smithrhg135: just yesterday I downloaded clojure.jar via that link, because I wanted to do something in a repl on a weak vps instance I was logged into via my phone :P
18:49rhg135I'm working on a script to aid in writing acrostic poems
18:51rhg135as an aside, how much ram could you get away with? I have a weak arm board running this irc client
18:51justin_smithrhg135: cool
18:52rhg135368M total ram D:
18:52justin_smithI haven't really tested, my clojure-1.8.jar repl is taking under 20 megs right now
18:53justin_smithbut I also haven't asked it to do much :)
18:54rhg135This sucks wrt ram. I couldn't even compile lxml; gcc kept dying
18:54rhg135kept getting killed
18:55justin_smithrhg135: hmm - did you try something like -O0 ?
18:56rhg135justin_smith: I said some choice words, installed the binary from the distro, and copied it to my venv
18:56justin_smith:)
18:57rhg135fortunately arch had the exact version :D
18:58rhg135the alternative was run lazybot instead; which seems less likely
19:03felixnhttps://gist.github.com/anonymous/0207a6b8e9ad905bd24c <-- j-pb: woo! thanks for recommending zipper, works really well for this
19:04felixnfeel free to criticize the code, second day messing around
19:05felixnwith clojure that is
19:08cflemingspieden: No test runner integration yet, although I'm hoping to do that very soon.
19:08cflemingspieden: Unfortunately it appears to be tricky to make that work with auto-runners, but that might just need some investigation.
19:08cflemingspieden: But a one-off "Run all tests" type thing is very easy.
19:09cflemingMy ultimate goal is a Wallaby-JS type thing.
19:45tolstoyI'm getting a 'Forbidden - redeploying non-snapshots is not allowed' on clojars, but I don't see my lib up there. Has something changed in the last couple of years?
19:46justin_smithtolstoy: just because you can't see the lib available doesn't always mean it isn't up there - you might want to see if any clojars maintainer is available on #leiningen
19:47tolstoyOk.
19:48tolstoyjustin_smith: Well, I can pull it down as a dep, so good enough. Oy. Signing.
19:54justin_smithtolstoy: a common one is that the version you pushed up doesn't show up in search (yet?) but if you go to the project/artifact page itself the latest version will be visible
19:55tolstoyHm. Not there. Not even in the org.clojars.<username> part.
19:56tolstoyPerhaps the regenerate once an hour or so?
19:56justin_smithtolstoy: what about org.clojars.username/project
19:56justin_smithdoes that show the latest jar?
19:56tolstoyNope.
19:58tolstoyThe site is going down "this weekend".
19:58justin_smithtolstoy: oh, wait, I mean clojars.org/org-name/project
19:59tolstoyEither one. Try finding com.zentrope/quiescent
20:29oracle123I am using clj-webdriver & core.aysnc, in the -main function, I call a function will use firefox1, and then in the go block,I used firefox2. however I found the main thread used the wrong firefox instance.
20:29oracle123please check the sample code: http://paste.lisp.org/display/231639
20:30oracle123In each function I called set-driver! to bind a firefox instance to the thread running that function
20:31oracle123But how could the function uses a wrong firefox instance?
21:46tolstoyWeird. I can "git pull" from github just fine, unless I ssh into this box. Then it prompts me for a passphrase (which I don't have).
21:48tolstoyInteresting. If I enter the passphrase for the account I'm logging in FROM, it works. Oy.
21:50amalloytolstoy: my guess: the box you're SSHing to doesn't have your github ssh credentials on it, and you don't have your ssh client set up to forward the agent that's running locally
21:53eriktjacobsenHey guys, little bit of an emergency: as of right now, my production uberjar is giving at runtime missing classes errors for my own classes… ie java.lang.NoClassDefFoundError: pipeline/youtube/api$get_bulk_channel_info$fn__354 where get-bulk-channel-info is definitely a function inside of that namespace. have been using latest versions of lein for awhile without issue. Also (and this may or may not be related), the size of the uberjar has
21:53eriktjacobsenchanged from like 110mb down to 62mb…. without any noticable changes in dependencies…. is lein leaving out my internal classes?
21:55amalloyi mean, a jar is just a .zip file. open it up yourself and see if that's what's happening
21:55amalloypersonally i'd try lein do clean, uberjar and see what happens - god knows what happens to stale classflies from AOT compiling
21:55eriktjacobsenmostly wondering if anyone has seen similar issues latetly with lein, we are looking into whats going on specifically
22:09domgetterI'm trying to come to an understanding of transducers. I understand that if I run (map inc) I will get back a transducer, and that it has three arities, and I know that one of them takes a "reduction function", so my question is: How would I construct a reduction function that reduces into a set?
22:14turbofail,(reduce ((map inc) conj) #{} [0 1 2])
22:14clojurebot#{1 3 2}
22:15turbofail,(transduce (map inc) conj [] [0 1 2])
22:15clojurebot[1 2 3]
22:16turbofailthere's all sorts of fun ways to do it
22:17turbofail,(into #{} (map inc) [0 1 2])
22:17clojurebot#{1 3 2}
22:19turbofaili guess to answer your specific question, the answer is just ((map inc) conj)
22:19domgetterOkay let me play with that for a bit, thank you
22:20oracle123possible to get a var value for ALL threads?
22:20oracle123since different thread could have different value, can we println all of hthem?
22:29turbofailhm... is there a reason the persistent set types don't implement IReduce?
22:38domgetterSo what is the difference between
22:38domgetter,(reduce + 1 (->> [3 4 5] (map inc) (filter even?)))
22:39clojurebot11
22:39domgetter,(transduce (comp (map inc) (filter even?)) + 1 [3 4 5])
22:39amalloyyou shouldn't really use IReduce
22:39clojurebot11
22:39amalloydomgetter: the one with ->> builds a lot of cons cells and then throws them away
22:40domgetterah okay so when the transducer grabs the 3, it works on it as a 3 instead of trying to work in seq-land?
22:50domgetteramalloy: "you shouldn't really use IReduce" why is that?
22:51amalloyit's not part of clojure's "public" api, or wouldn't be if anyone ever bothered to declare parts of it non-public
22:51amalloyyou should just use clojure.core/reduce, which does the right thing (including sometimes dispatching to IReduce) based on the collection you give it
23:01turbofailamalloy: i wasn't intending to use IReduce directly, i was just wondering why sets don't do it
23:02amalloyit probably just didn't turn out to be necessary for them to implement it, in the bootstrapping code or whatever
23:02turbofaili don't think it's ever strictly necessary is it?
23:03tolstoyamalloy: Both of computers I'm using have ssh keys registered with github. It's weird. I've never seen this before. *shrug*
23:04turbofailIReduce is strictly a performance optimization as far as i can tell