2015-12-18
| 00:09 | owlbird | It'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:28 | zereraz | hi, I have a doubt |
| 00:28 | zereraz | I did, lein new test, then cd test, then lein run but it gave me error |
| 00:28 | zereraz | No :main namespace specified in project.clj. |
| 00:29 | zereraz | don't know what to do |
| 00:31 | zereraz | ok I found the problem, I had to create using "lein new app my-app" |
| 00:31 | zereraz | rather than just lein new my-app |
| 02:57 | keep_learning | Hello everyone |
| 02:57 | aztak | mornin' |
| 02:58 | keep_learning | Could some one please tell how to download a web page containing java script |
| 03:08 | keep_learning | I got one idea but it's not working with my functional mindset. |
| 03:09 | keep_learning | I am trying to use clj-webdriver but it seems to me that it's changing the states of browser by invoking the commands. |
| 04:54 | keep_learning | Hello everyone |
| 04:54 | keep_learning | I am getting error for this code. |
| 04:54 | keep_learning | http://lpaste.net/147323 |
| 04:54 | keep_learning | IllegalArgumentException Don't know how to create ISeq from: net.cgrand.enlive_html$html_content$fn__4387 clojure.lang.RT.seqFrom (RT.java:528) |
| 04:55 | keep_learning | Right now I am trying to find the links of google search |
| 04:55 | keep_learning | so I am running a web driver to execute the javascript and enlive to find all the tags [:a] |
| 07:36 | noncom | keep_learning: well, first of all the top section of the namespace is weird... are you typing this in the repl? |
| 07:36 | keep_learning | noncom, Thank you for reply |
| 07:36 | keep_learning | noncom, Yes |
| 07:37 | keep_learning | noncom, but now I have moved that code to file |
| 07:37 | keep_learning | so I have written the same thing in file |
| 07:38 | noncom | keep_learning: next: https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L655 |
| 07:38 | noncom | the html-content function returns a function |
| 07:39 | noncom | this 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:40 | noncom | keep_learning: are you sure these two functions can work together like in your code? |
| 07:41 | keep_learning | noncom, I was trying to figure and changed the code |
| 07:42 | keep_learning | noncom, http://lpaste.net/147329 |
| 07:42 | noncom | does it give the same erorr? |
| 07:43 | keep_learning | noncom, So now it's working but I am newbie so I don't know how to idiomatic clojure code |
| 07:43 | noncom | keep_learning: oh |
| 07:43 | noncom | did you read this? https://github.com/swannodette/enlive-tutorial |
| 07:43 | noncom | gives a good insight into the topic.. |
| 07:43 | noncom | keep_learning: also, one rule of a thumb: never use use :) |
| 07:44 | noncom | it is deprecated so much |
| 07:45 | keep_learning | noncom, Yes, From there I am trying to figure out bits of enliven |
| 07:46 | noncom | keep_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:46 | noncom | :) |
| 07:47 | noncom | but as you said, you have the regular file-like ns declaration in your actual code, so it is ok |
| 07:47 | noncom | but still i'd strongly advice you to get rid of use |
| 07:47 | keep_learning | noncom, I have knowledge of Haskell so I am comfortable with functional part except how to import library :) |
| 07:48 | noncom | keep_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:48 | noncom | like, if you look into any clojure file from any code, like the enlive lib itself, you'll see that at the top |
| 07:49 | noncom | keep_learning: doh, enlive uses a thousand :require here https://github.com/cgrand/enlive/blob/master/src/net/cgrand/enlive_html.clj#L11 |
| 07:49 | keep_learning | noncom, Thank you. Do you have quick link |
| 07:49 | noncom | one is enough |
| 07:49 | noncom | wait a sec |
| 07:50 | noncom | keep_learning: https://gist.github.com/ghoseb/287710 |
| 07:50 | noncom | keep_learning: look here for a good example: https://github.com/dakrone/cheshire/blob/master/src/cheshire/core.clj |
| 07:50 | noncom | and if you see :use or (use) - ignore it, it's not welcome these days |
| 07:51 | keep_learning | noncom, Thank you |
| 08:11 | troydm | let's say I have '((1 2) (3)) how do I convert it into '(1 2 3) ? |
| 08:11 | opqdonut | ,(apply concat '((1 2) (3))) |
| 08:11 | clojurebot | (1 2 3) |
| 08:12 | troydm | opqdonut: thx |
| 08:12 | opqdonut | ,(apply concat '((1 2) (3 4 5) (6))) -- more generally |
| 08:12 | clojurebot | (1 2 3 4 5 ...) |
| 08:15 | ridcully_ | ,(sequence cat '((1 2) (3) (4 5))) |
| 08:15 | clojurebot | (1 2 3 4 5) |
| 08:18 | BRODUS | say i have an anonymous function, how can I operate on that function as if it were a list? |
| 08:19 | luma | what do you mean "as if it were a list" |
| 08:19 | luma | how would a function be a list? |
| 08:20 | BRODUS | well i assumed that it was since we write them as such |
| 08:22 | luma | what would you do with it "as a list"? |
| 08:23 | MJB47 | ,(first '(+ 1 1)) |
| 08:23 | clojurebot | + |
| 08:23 | MJB47 | i wonder.. |
| 08:23 | MJB47 | ,((first '(+ 2 3)) 4 5) |
| 08:23 | clojurebot | 5 |
| 08:26 | BRODUS | luma: in my case, i'm trying to convert the function to a string, |
| 08:27 | MJB47 | ,(name (first '(reduce + (range 3)))) |
| 08:27 | clojurebot | "reduce" |
| 08:27 | BRODUS | i figured the function would be stored in a list data structure, am i wrong? |
| 08:28 | luma | when the code is executed, it creates a function object |
| 08:35 | hyPiRion | BRODUS: (first '(+ 2 3)) returns the symbol + |
| 08:36 | hyPiRion | ,[('+ 4 5) ('+ 4)] |
| 08:36 | clojurebot | [5 nil] |
| 08:45 | oic3ieNg | Hello. Could you recommend me a short and easy tutorial on datomic pull api? |
| 08:55 | ridcully_ | oic3ieNg: you have seen the docs, right? |
| 09:02 | oic3ieNg | ridcully_: I mean something really simple and to the point, without mbrainz, grammars, java, led zeppelin and whatnot |
| 09:18 | sdegutis | Hi. |
| 09:18 | sdegutis | How are you going? |
| 09:28 | oic3ieNg | Slowly. |
| 09:30 | noncom | BRODUS: if you read it, then it is a list, however, in runtime the functions get transformed into function objects |
| 09:30 | noncom | wow, swift! ) |
| 09:36 | noncom | drinking green tea |
| 09:36 | beaky | i love greentea |
| 09:36 | beaky | im drinking dong ding oolong rite now |
| 09:37 | noncom | nice one! |
| 09:37 | beaky | running out of it tho :( |
| 09:53 | sdegutis | Oh. |
| 11:09 | benjyzz | anyone in #clojure interested in cryptocurrencies? |
| 11:21 | TimMc | Vaguely. 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:22 | TimMc | Stellar seems neat, though. It doesn't use proof-of-work and they're trying to use it to help the unbanked exchange money. |
| 12:18 | BRODUS | any ideas on how I can get a reference to the newline character without using \n |
| 12:19 | justin_smith | \newline - \n is the letter n |
| 12:19 | justin_smith | ,(= (first "\n") \newline) |
| 12:19 | clojurebot | true |
| 12:19 | justin_smith | ,(= (first "n") \n) |
| 12:19 | clojurebot | true |
| 12:21 | BRODUS | I 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:21 | justin_smith | there is no character literal for newline that will work both inside and outside a string |
| 12:21 | justin_smith | ,(str \newline) |
| 12:21 | clojurebot | "\n" |
| 12:22 | justin_smith | though... |
| 12:23 | momerath | benjyzz & 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:24 | yenda | https://news.ycombinator.com/item?id=10758888 nice article on clojure design patterns |
| 12:26 | BRODUS | ,(eval '(char 10)) |
| 12:26 | clojurebot | \newline |
| 12:31 | justin_smith | ,(eval \newline) |
| 12:31 | clojurebot | \newline |
| 12:34 | TimMc | momerath: Heh, thanks, but I try to stay far, far away from the financial sector. :-P |
| 12:34 | beaky | ,(eval "(eval \"(eval '()))\"") |
| 12:34 | BRODUS | ,(println "(eval \newline)") |
| 12:34 | clojurebot | "(eval \"(eval '()))\"" |
| 12:34 | clojurebot | (eval \newline)\n |
| 13:30 | jdeisenberg | Want to do a websockets server. Am I better off using Clojure w. jetty/ring or ClojureScript w. node.js? |
| 13:31 | jdeisenberg | It may be running on a raspberry pi level CPU; for now, it's a normal fairly reasonable Athlon. |
| 13:32 | justin_smith | jdeisenberg: well, I definitely would not use jetty for a clojure websocket server |
| 13:32 | jdeisenberg | Ring would be a better choice, then? |
| 13:33 | justin_smith | jdeisenberg: ring is a protocol that has adaptors, the jetty ring adaptor does not do websockets |
| 13:33 | justin_smith | but aleph or netty or http-kit with ring are all options that do websockets with ring |
| 13:34 | justin_smith | jdeisenberg: jvm clojure is not apropriate for doing anything serious on arm, at least not with raspberry pi quantities of RAM available |
| 13:35 | justin_smith | clojure will do amazing things on a machine that has sufficient RAM, but it doesn't really do light weight |
| 13:36 | jdeisenberg | Yeah, I sort of thought that would be a problem. |
| 13:36 | justin_smith | clojurescript and pixie are both definitely usable on the raspberry pi |
| 13:36 | justin_smith | pixie is experimental, and clojurescript has an odd dev toolchain |
| 13:37 | keep_learning | Hello everyone. |
| 13:37 | keep_learning | I am working with clj-webdriver |
| 13:37 | keep_learning | and trying to run this code |
| 13:37 | keep_learning | (get-url "https://www.tripadvisor.in/") |
| 13:38 | keep_learning | (quick-fill-submit (xpath "#GEO_SCOPED_SEARCH_INPUT" city) |
| 13:38 | keep_learning | (xpath "#mainSearch")) |
| 13:38 | keep_learning | but 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:38 | justin_smith | keep_learning: get-url will return a string, right? |
| 13:40 | justin_smith | oh, never mind - it navigates the browser |
| 13:40 | keep_learning | justin_smith, I think Navigate the browser to `url`. |
| 13:40 | keep_learning | yes |
| 13:41 | justin_smith | keep_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:42 | justin_smith | keep_learning: and xpath returns a string https://github.com/semperos/clj-webdriver/wiki/Taxi-API-Documentation#xpath |
| 13:43 | justin_smith | keep_learning: seems like that would be the error |
| 13:43 | keep_learning | justin_smith, Yeah |
| 13:43 | keep_learning | justin_smith, Thank you |
| 13:46 | jdeisenberg | justin_smith: thanks for the info. |
| 13:57 | ghost_ | justin_smith: what do you use for development? I mean, text editor |
| 13:58 | keep_learning | justin_smith, Could you please tell me if I my CSS selector is correct or not ? |
| 13:58 | keep_learning | (quick-fill-submit {"global_nav_search_form#GEO_SCOPED_SEARCH_INPUT" city} |
| 13:58 | keep_learning | {"global_nav_search_form#mainSearch" "Hotel"} |
| 13:58 | keep_learning | {"global_nav_search_form.SEARCH_BUTTON" click}) |
| 13:59 | keep_learning | I am taking the form id global_nav_search_form and then filling both forms |
| 13:59 | keep_learning | GEO_SCOPED_SEARCH_INPUT and mainSearch |
| 14:00 | keep_learning | https://www.tripadvisor.in/ |
| 14:00 | keep_learning | I am getting TimeoutException Timed out after 10 seconds waiting for clj_webdriver.wait.proxy$java.lang.Object$ExpectedCondition$66be6a90@23d96cee |
| 14:00 | keep_learning | because I have (wait-until false 10000) |
| 14:00 | keep_learning | to wait for 10 sec |
| 14:01 | justin_smith | yeah, I'm not sure about the selector syntax for that lib, sorry |
| 14:02 | keep_learning | justin_smith, No problem. I am just trying to figure out all the way. Thanks for your help |
| 14:24 | ghost_ | justin_smith: it's kind of important for me, because I want to finally settle on something |
| 14:28 | kungi | I am trying to use the BarbaryWatchService (https://github.com/gjoseph/BarbaryWatchService/blob/master/Demo.asciidoc) from Clojure. |
| 14:29 | kungi | In 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:30 | ridcully_ | WatchEvent$Kind ? |
| 14:31 | kungi | ridcully_: Sadly no |
| 14:31 | kungi | I get an "Unable to resolve symbol" error |
| 14:32 | kungi | ridcully_: I am trying to call this function: https://github.com/gjoseph/BarbaryWatchService/blob/master/src/main/java/com/barbarysoftware/watchservice/WatchableFile.java#L36 |
| 14:34 | ridcully_ | aren't those then StandardWatchEventKind/ENTRY_CREATE ? |
| 14:35 | kungi | ridcully_: Yes they are. Let me show you a bit more code |
| 14:35 | justin_smith | kungi: should be something like (.register wf (into-array WatchEvent$Kind [event, event, ...])) |
| 14:35 | justin_smith | oh wait, I missed an arg there |
| 14:35 | kungi | https://gist.github.com/47635b4ea28dae353be4 |
| 14:36 | kungi | justin_smith: I tried that and is does not work ... :-( |
| 14:36 | justin_smith | what symbol is it unable to resolve? |
| 14:36 | kungi | WatchEvent$Kind |
| 14:37 | justin_smith | kungi: what does your import look like? |
| 14:37 | justin_smith | importing WatchEvent won't import WatchEvent$Kind - they each have to be imported separately |
| 14:38 | kungi | justin_smith: AHA! Sweet |
| 14:38 | kungi | justin_smith: thank you I was not aware of this |
| 14:38 | justin_smith | in 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:39 | ridcully_ | (inc justin_smith) |
| 14:39 | justin_smith | well, not *just*, but... |
| 14:39 | kungi | (inc justin_smith) |
| 14:39 | ridcully_ | bah stupid bot |
| 14:39 | ridcully_ | started weekend already |
| 15:05 | spieden | i 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:40 | felixn | anyone 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:40 | j-pb | we abandoned midje long ago, I'd go with plain clojure test :) |
| 15:41 | j-pb | we 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:55 | felixn | j-pb: how do you rerun the test? `test-refresh` seems to be working a lot better, but sometimes I do have to restart |
| 15:57 | spieden | j-pb: yeah, i wish they didn't use magic symbols like that |
| 15:57 | j-pb | felixn: intellij actually :) |
| 15:57 | j-pb | cursive has really nice core.test integration |
| 15:57 | j-pb | on the cljs end there is doo |
| 15:57 | j-pb | spieden: yeah, does it work at all with test.check? our codebase would just collapse without it ^^ |
| 15:58 | spieden | j-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:59 | spieden | i'd switch back in a heartbeat if it did |
| 16:00 | spieden | hmm looks like just repl |
| 16:00 | felixn | j-pb: nice, I'll give cursive a try. intellij is amazing for python, though atom is very easy on the eyes |
| 16:01 | j-pb | spieden: yeah, you do send tests in current repl to ns, I agree that it would be nicer to have continuous checking :) |
| 16:02 | spieden | midje seduced me with its code reload and autotest |
| 16:02 | felixn | anyone 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:02 | j-pb | spieden: but you don't need midje for that I think https://github.com/jakepearson/quickie |
| 16:07 | spieden | cool i'll check it out |
| 16:07 | spieden | definitely 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:08 | spieden | j-pb: ^^ |
| 16:08 | j-pb | manual reloading |
| 16:08 | j-pb | breaks less stuff and is only one keystroke :) |
| 16:39 | lokien_ | What do you guys use for editing Clojure? IDE, good old Emacs with Paredit? |
| 16:46 | futuro | lokien_: emacs + paredit + cider + clj-refactor |
| 16:47 | lokien_ | futuro: standard emacs bindings? |
| 16:47 | futuro | yeah |
| 16:47 | lokien_ | Masochist |
| 16:48 | lokien_ | futuro: anyway, thanks. I think I'll do the same |
| 16:48 | futuro | I hear spacemacs is pretty good if you want modal editing |
| 16:48 | futuro | lokien_: np |
| 16:48 | j-pb | lokien_: intellij and cursive is pretty nice |
| 16:48 | j-pb | but if you're already an emacs head, then you maybe want to stay one ;) |
| 16:49 | lokien_ | futuro: I'm using it now but emacs bindings for workspaces and vim's for editing are making me cringe |
| 16:49 | lokien_ | futuro: and huge tutorials aren't really my thing |
| 16:50 | futuro | yeah, 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:50 | futuro | lokien_: why not vim+fireplace+other stuff? |
| 16:50 | lokien_ | j-pb: I'm not, I just want something simple with autocomplation and repl |
| 16:51 | lokien_ | futuro: repl was awful last time, I'll give it a shot tomorrow |
| 16:51 | lokien_ | autocompletion*, durr |
| 16:51 | futuro | lokien_: word, I'm interested in how that goes |
| 16:52 | j-pb | lokien_: cursive has pretty decent refactoring tools, that's why I use it |
| 16:52 | lokien_ | futuro: I'll let you know |
| 16:52 | lokien_ | j-pb: large codebases? |
| 16:53 | ridcully_ | vim, fireplace, paredit |
| 16:53 | futuro | ridcully_: how's it's refactoring support? |
| 16:53 | j-pb | lokien_: yeah pretty, I wouldn't know how to navigate them without show usages |
| 16:53 | ridcully_ | non existing? |
| 16:54 | futuro | ridcully_: ah, ok |
| 16:54 | lokien_ | ridcully_: how do you connect to the repl? is it just sitting in another terminal tab? |
| 16:54 | j-pb | futuro: 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:55 | ridcully_ | yes. :Connect nrepl-url - or just :Console (via vim-salve) |
| 16:55 | lokien_ | 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:55 | j-pb | lokien_: I mean ^^ |
| 16:55 | j-pb | lokien_: intellij has a pretty long undo history |
| 16:56 | j-pb | it's not as nice as emacs undo tree, but tbh I never had any problems with cursive refactorings |
| 16:56 | lokien_ | j-pb: I'm not a smart man |
| 16:57 | lokien_ | ridcully_: no tmux or other goofy stuff? |
| 16:58 | ridcully_ | usually tmux - and tmux things made into my aliases. so your goofy is my normal |
| 16:58 | futuro | it looks like there's some work surrounding the refactor-nrepl https://github.com/Deraen/vim-cider |
| 16:59 | lokien_ | ridcully_: it will eventually become my normal too. big thanks, see goofy-me in a month |
| 17:00 | Deraen | Fireplace will also automatically try connecting to nrepl when trying to evaluate something, so :Connect is not usually necessary |
| 17:01 | lokien_ | futuro: I'll check it tomorrow, thank you too |
| 17:01 | ridcully_ | for cljs i use a patch - so this works fine for me in both universes |
| 17:01 | lokien_ | Daraen: really? oh |
| 17:01 | ridcully_ | yeah, :Connect is usually not needed - but it allows you to connect to lein repl without project.clj e.g. |
| 17:01 | Deraen | Yes. Lein and Boot both write a .nrepl-port file which is used by editors to automatically detect nrepl |
| 17:02 | lokien_ | I've been typing that all the time |
| 17:02 | lokien_ | And memorizing repl's port |
| 17:02 | lokien_ | Sweet baby jesus |
| 17:03 | Deraen | About 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:04 | Deraen | Not as easy to use, but it |
| 17:04 | Deraen | it's possible to do pretty much anything with those. |
| 17:04 | lokien_ | Cursive was too much rocket science for me, as every IDE |
| 17:18 | felixn | I'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:20 | j-pb | felixn: those are not meant or suitable for mutable state |
| 17:20 | j-pb | just in case that's how you want to use them :) |
| 17:21 | j-pb | felixn: do you want to process a tree, or what do you mean by recursive map? |
| 17:21 | felixn | I'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:22 | j-pb | don't use transients for that they are a perfromance optimisation nothing more |
| 17:22 | j-pb | I'd look at zippers maybe, they are perfect for traversing a tree, and accumulating state in a loop |
| 17:27 | j-pb | felixn: it kinda depends, how large is you nested datastructure? |
| 17:27 | j-pb | will a simple update-in suffice? |
| 17:29 | felixn | j-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:29 | j-pb | felixn: could you describe a bit more what you want to do :) |
| 17:29 | j-pb | zippers are great for example for manipulating xml |
| 17:31 | j-pb | felixn: it takes some adjusting, but generaly speaking you never ever need mutable state if you're just processing data |
| 17:44 | futuro | reducers was one of those things that took me a while to wrap my head around |
| 17:48 | lambda-11235 | Would anyone recommend using measjure for unit analysis? Has anyone used it. |
| 17:50 | justin_smith | lol, this page is the only google hit for measjure: https://gist.github.com/ddillinger/5154002#file-gistfile1-txt-L46 |
| 17:52 | lambda-11235 | Its spelled without the s, and I get the github account when I google it (https://github.com/arrdem/meajure). |
| 17:52 | lambda-11235 | Are there any other unit analysis that do algebraic analysis? |
| 17:52 | justin_smith | ahh, I googled measjure and only found that amusing gist :) |
| 17:53 | ridcully_ | you googled ass |
| 17:53 | justin_smith | lambda-11235: not that I know of, and arrdem is a smart cookie, that's probably a good lib |
| 17:53 | justin_smith | ridcully_: no, I just chose to highlight that line :P |
| 17:53 | ridcully_ | :) |
| 17:54 | amalloy | the only successful clojure project: nonfailjure |
| 17:54 | justin_smith | haha |
| 18:03 | rhg135 | that's amusing |
| 18:26 | anoctopus | Anyone here using squiggly-clojure? I can't get it to show anything |
| 18:46 | rhg135 | hmm, where can I get the latest jar of clojure? |
| 18:47 | justin_smith | rhg135: maven should have it |
| 18:47 | rhg135 | I think they were on github, might have been cljs |
| 18:47 | justin_smith | rhg135: http://clojure.org/downloads |
| 18:47 | rhg135 | I'll do that then. thx |
| 18:48 | justin_smith | rhg135: 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:49 | rhg135 | I'm working on a script to aid in writing acrostic poems |
| 18:51 | rhg135 | as an aside, how much ram could you get away with? I have a weak arm board running this irc client |
| 18:51 | justin_smith | rhg135: cool |
| 18:52 | rhg135 | 368M total ram D: |
| 18:52 | justin_smith | I haven't really tested, my clojure-1.8.jar repl is taking under 20 megs right now |
| 18:53 | justin_smith | but I also haven't asked it to do much :) |
| 18:54 | rhg135 | This sucks wrt ram. I couldn't even compile lxml; gcc kept dying |
| 18:54 | rhg135 | kept getting killed |
| 18:55 | justin_smith | rhg135: hmm - did you try something like -O0 ? |
| 18:56 | rhg135 | justin_smith: I said some choice words, installed the binary from the distro, and copied it to my venv |
| 18:56 | justin_smith | :) |
| 18:57 | rhg135 | fortunately arch had the exact version :D |
| 18:58 | rhg135 | the alternative was run lazybot instead; which seems less likely |
| 19:03 | felixn | https://gist.github.com/anonymous/0207a6b8e9ad905bd24c <-- j-pb: woo! thanks for recommending zipper, works really well for this |
| 19:04 | felixn | feel free to criticize the code, second day messing around |
| 19:05 | felixn | with clojure that is |
| 19:08 | cfleming | spieden: No test runner integration yet, although I'm hoping to do that very soon. |
| 19:08 | cfleming | spieden: Unfortunately it appears to be tricky to make that work with auto-runners, but that might just need some investigation. |
| 19:08 | cfleming | spieden: But a one-off "Run all tests" type thing is very easy. |
| 19:09 | cfleming | My ultimate goal is a Wallaby-JS type thing. |
| 19:45 | tolstoy | I'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:46 | justin_smith | tolstoy: 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:47 | tolstoy | Ok. |
| 19:48 | tolstoy | justin_smith: Well, I can pull it down as a dep, so good enough. Oy. Signing. |
| 19:54 | justin_smith | tolstoy: 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:55 | tolstoy | Hm. Not there. Not even in the org.clojars.<username> part. |
| 19:56 | tolstoy | Perhaps the regenerate once an hour or so? |
| 19:56 | justin_smith | tolstoy: what about org.clojars.username/project |
| 19:56 | justin_smith | does that show the latest jar? |
| 19:56 | tolstoy | Nope. |
| 19:58 | tolstoy | The site is going down "this weekend". |
| 19:58 | justin_smith | tolstoy: oh, wait, I mean clojars.org/org-name/project |
| 19:59 | tolstoy | Either one. Try finding com.zentrope/quiescent |
| 20:29 | oracle123 | I 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:29 | oracle123 | please check the sample code: http://paste.lisp.org/display/231639 |
| 20:30 | oracle123 | In each function I called set-driver! to bind a firefox instance to the thread running that function |
| 20:31 | oracle123 | But how could the function uses a wrong firefox instance? |
| 21:46 | tolstoy | Weird. 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:48 | tolstoy | Interesting. If I enter the passphrase for the account I'm logging in FROM, it works. Oy. |
| 21:50 | amalloy | tolstoy: 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:53 | eriktjacobsen | Hey 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:53 | eriktjacobsen | changed from like 110mb down to 62mb…. without any noticable changes in dependencies…. is lein leaving out my internal classes? |
| 21:55 | amalloy | i mean, a jar is just a .zip file. open it up yourself and see if that's what's happening |
| 21:55 | amalloy | personally i'd try lein do clean, uberjar and see what happens - god knows what happens to stale classflies from AOT compiling |
| 21:55 | eriktjacobsen | mostly wondering if anyone has seen similar issues latetly with lein, we are looking into whats going on specifically |
| 22:09 | domgetter | I'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:14 | turbofail | ,(reduce ((map inc) conj) #{} [0 1 2]) |
| 22:14 | clojurebot | #{1 3 2} |
| 22:15 | turbofail | ,(transduce (map inc) conj [] [0 1 2]) |
| 22:15 | clojurebot | [1 2 3] |
| 22:16 | turbofail | there's all sorts of fun ways to do it |
| 22:17 | turbofail | ,(into #{} (map inc) [0 1 2]) |
| 22:17 | clojurebot | #{1 3 2} |
| 22:19 | turbofail | i guess to answer your specific question, the answer is just ((map inc) conj) |
| 22:19 | domgetter | Okay let me play with that for a bit, thank you |
| 22:20 | oracle123 | possible to get a var value for ALL threads? |
| 22:20 | oracle123 | since different thread could have different value, can we println all of hthem? |
| 22:29 | turbofail | hm... is there a reason the persistent set types don't implement IReduce? |
| 22:38 | domgetter | So what is the difference between |
| 22:38 | domgetter | ,(reduce + 1 (->> [3 4 5] (map inc) (filter even?))) |
| 22:39 | clojurebot | 11 |
| 22:39 | domgetter | ,(transduce (comp (map inc) (filter even?)) + 1 [3 4 5]) |
| 22:39 | amalloy | you shouldn't really use IReduce |
| 22:39 | clojurebot | 11 |
| 22:39 | amalloy | domgetter: the one with ->> builds a lot of cons cells and then throws them away |
| 22:40 | domgetter | ah okay so when the transducer grabs the 3, it works on it as a 3 instead of trying to work in seq-land? |
| 22:50 | domgetter | amalloy: "you shouldn't really use IReduce" why is that? |
| 22:51 | amalloy | it's not part of clojure's "public" api, or wouldn't be if anyone ever bothered to declare parts of it non-public |
| 22:51 | amalloy | you should just use clojure.core/reduce, which does the right thing (including sometimes dispatching to IReduce) based on the collection you give it |
| 23:01 | turbofail | amalloy: i wasn't intending to use IReduce directly, i was just wondering why sets don't do it |
| 23:02 | amalloy | it probably just didn't turn out to be necessary for them to implement it, in the bootstrapping code or whatever |
| 23:02 | turbofail | i don't think it's ever strictly necessary is it? |
| 23:03 | tolstoy | amalloy: Both of computers I'm using have ssh keys registered with github. It's weird. I've never seen this before. *shrug* |
| 23:04 | turbofail | IReduce is strictly a performance optimization as far as i can tell |