2012-02-08
| 00:44 | akhudek | If col is a sorted-set with custom comparator, having (disj col (first col)) not change col must mean that the comparator is buggy right? |
| 00:46 | amalloy | mmmm, not necessarily. it might be an empty set |
| 00:47 | akhudek | definitly not empty :/ |
| 00:47 | amalloy | then i think it must be broken somehow |
| 00:48 | akhudek | ok, thanks |
| 01:16 | muhoo | what does lein trampoline actually do? jump execution to a vector in ROM? |
| 01:16 | muhoo | only time i've heard the term trampoline used was in embedded microcontrollers |
| 01:32 | sgronblo | Is there some pattern/function for getting the first true value returned by a list of functions? |
| 01:35 | ibdknox | ,(first ((apply juxt [true? false? coll?]) [])) |
| 01:35 | clojurebot | false |
| 01:35 | ibdknox | ,(first (filter identity ((apply juxt [true? false? coll?]) []))) |
| 01:35 | clojurebot | true |
| 01:35 | ibdknox | lol |
| 01:35 | ibdknox | not what you wanted |
| 01:36 | ibdknox | I wanted juxt in there, but I guess not |
| 01:36 | ibdknox | ,(first (filter identity (map #(% []) [true? false? coll?]))) |
| 01:36 | clojurebot | true |
| 01:38 | ibdknox | sgronblo: the not retarded answer: (first (filter #(% []) [true? false? coll?])) |
| 01:39 | Raynes | ~amalloy |
| 01:39 | clojurebot | amalloy is <amalloy> just use juxt, it'll be great |
| 01:40 | ibdknox | actually, you wanted the value so the previous one is correct |
| 01:40 | ibdknox | that last one returns the function |
| 01:40 | Raynes | ibdknox: Bed time, perhaps? |
| 01:40 | ibdknox | yeah |
| 01:40 | ibdknox | I stayed up way too late and got up far too early |
| 01:43 | muhoo | #(% []) ? so, (true? []) why the empty list there? |
| 01:43 | ibdknox | the vector represents some value you might execute the function against |
| 01:43 | muhoo | ah |
| 01:43 | ibdknox | if they're all zero arg functions you could remove it |
| 02:04 | sgronblo | ibdknox: Yeah, but I was more interested in if this is a widely used pattern in clojure/FP? |
| 02:13 | scottj | sgronblo: have you seen some-fn? |
| 03:43 | Blkt | good morning everyone |
| 03:50 | seancorfield | hi Blkt |
| 03:58 | Blkt | hi seancorfield :D |
| 04:31 | seancorfield | I'm not usually online in the middle of the night (for me)... it's kinda quiet here... |
| 04:33 | ejackson | yeah, the euro/UK crowd is not so big yet |
| 04:33 | ejackson | perhaps EuroClojure will raise pulses som |
| 04:41 | clgv | I think there are fewer IRC using Clojurians in Europe. |
| 04:42 | lucian | i'm un the UK |
| 04:42 | lucian | s/un/in/ |
| 04:42 | lucian | i don't use clojure much, though |
| 04:44 | ejackson | these kids and their bookface. |
| 04:45 | lucian | ejackson: i had to google bookface ... |
| 04:45 | ejackson | glad to hear it. welcome, grey hair. |
| 04:46 | lucian | ejackson: i'm 22... |
| 04:47 | ejackson | like I said |
| 04:47 | ejackson | gramps |
| 04:50 | seancorfield | I'm from the UK but live in San Francisco (well, about 35 miles SE). |
| 04:51 | seancorfield | I did some Lisp and FP stuff at University (Surrey) back in the *cough* early 80's... |
| 04:51 | ejackson | I'm from SA but live in the UK. Love postmodernity ! |
| 04:52 | seancorfield | One of the UK ThoughtWorkers has just moved over here and is asking about running Clojure dojo events which would be cool. |
| 04:52 | Fossi | well, i guess most of the people from europe idle :) |
| 04:53 | seancorfield | I run the San Francisco Clojure meetup and the members have asked for more hands on stuff so that would fit in really well... He used to organize the London Clojure dojo events... Lucky for us :) |
| 04:53 | seancorfield | Wish I could be in the UK for EuroClojure... it would be fun to see how the european Clojure community compares... |
| 04:54 | clgv | oh, there is a EuroClojure event? |
| 04:54 | Fossi | no there is no eureclojure event |
| 04:54 | clgv | lol, that site is broken: http://euroclojure.com/2012/ |
| 04:54 | Fossi | at least not unti l i booked my cheap ticket :> |
| 04:56 | seancorfield | How much Clojure in production is there in Europe then? |
| 04:57 | ejackson | seancorfield: For me it will be nice to be non-jetlagged as well as exhausted, like at the Conj |
| 04:57 | ejackson | seancorfield: not a lot |
| 04:57 | Fossi | i know about 10ish in germany |
| 04:57 | ejackson | in the UK some of the banks have desks doing it, and there are a few of us indies scattered about the place |
| 04:57 | Fossi | depends on how you count "production" though |
| 04:59 | lucian | ejackson: banks? really? |
| 04:59 | ejackson | the Thoughtworks guys know it, but as far as I know, haven't found a client willing to use it |
| 04:59 | seancorfield | ejackson: I'll be in the UK at the end of September - my wife is judging a cat show in Stevenage on September 22/23 and two weeks later she's judging in Moscow so we'll hang out with friends and family in between... Hoping for a tech conference in London or Amsterdam in that period too so I can turn it into a business trip :) |
| 05:00 | ejackson | lucian: yeah, at least two (from the calls I get from recruiters desperate to find anybody who speaks this.... what's it called again ?) |
| 05:00 | lucian | ejackson: really? i know some clojure :) |
| 05:01 | ejackson | seancorfield: aah yes... expenses :) |
| 05:03 | seancorfield | She's judging a cat show in Australia in August but we're paying for those flights ourselves. At least the Stevenage / Moscow clubs will cover her airfare to England / Russia. But not mine. |
| 05:04 | ejackson | also, the guys at metail.co.uk have some Clojure in production |
| 05:05 | seancorfield | Seems to be a lot more Clojure sneaking into production over here... |
| 05:05 | lucian | the java angle seems to be paying off |
| 05:06 | seancorfield | That's how we started using Clojure - we're already on the JVM... we tried Scala but it didn't really fit the team's "culture"... |
| 05:07 | lucian | also, scala's syntax is disgusting |
| 05:09 | seancorfield | LOL, I got into trouble for saying that in public... |
| 05:09 | lucian | seancorfield: how so? it's quite an obvious fact |
| 05:09 | lucian | it's almost as stupidly complicated as C++'s |
| 05:09 | Fossi | no |
| 05:09 | Fossi | it's far more stupid |
| 05:10 | lucian | (also, i'm saying this as a pythonista, not a list weenie) |
| 05:10 | lucian | s/list/lisp/ |
| 05:10 | lucian | Fossi: you must not know C++ syntax particularly well :) |
| 05:10 | Fossi | the method-binding-changing: alone makes me *RAGE* |
| 05:10 | Fossi | on the other hand |
| 05:10 | Fossi | if i ever have to use scala i can make a lispish dialect |
| 05:11 | Fossi | by only using : methodnames and putting paranthesis everywhere :> |
| 05:11 | lucian | i see only one advantage with scala: more similar to java (which also implies easier to interact with java machinery) |
| 05:12 | Fossi | that's also quite a big downside too |
| 05:12 | pandeiro | anyone know why GClosure's History fires event callbacks twice on every hash change? i am using cljs one's wrapper but it seems straightforward enough |
| 05:12 | Fossi | as in: in reallife projects styles get mixed up like *hell* |
| 05:12 | Fossi | it's a major pita |
| 05:12 | Fossi | you never know where a functional part starts and where it will end suddently |
| 05:13 | seancorfield | lucian: i actually think clojure's java interop is better than scala's |
| 05:13 | Fossi | pandeiro: i think some browsers actually do that |
| 05:14 | lucian | seancorfield: maybe. it's still easier to extend a java class in scala, and then furter extend in java |
| 05:14 | Fossi | yeah, like that's a good thing :> |
| 05:15 | lucian | Fossi: only if someone enforces java |
| 05:15 | pandeiro | Fossi: thanks for the lead, hadn't considered that |
| 05:15 | seancorfield | lucian: yeah, but in scala it's real easy to get munged class names unless you steer clear of nearly all of scala's useful features |
| 05:16 | lucian | yeah, i guess |
| 05:16 | Fossi | pandeiro: just a hinch |
| 05:21 | ejackson | seancorfield: The one where he gets his Fez out is my favourite thing ever |
| 05:22 | lucian | seancorfield: ah, good idea. i've been reading the book and having to re-read paragraphs a lot |
| 05:23 | pandeiro | seancorfield: for the awesome intro music, right? |
| 05:27 | seancorfield | pandeiro: it'll drives me nuts by the end of the course, i'm sure... |
| 05:27 | seancorfield | sussman has really animated eyebrows... :) |
| 05:27 | pandeiro | but by then you'll be that wizard so... |
| 05:28 | seancorfield | he was great at the conj... covered a lot of ground in an hour... took me back to my university days at times :) |
| 05:29 | lucian | we did java at uni ... |
| 05:30 | ejackson | i did assembly only, don't complain |
| 05:30 | ejackson | :P |
| 05:31 | lucian | heh |
| 05:33 | seancorfield | java didn't exist when i was at uni ... heck, c++ didn't exist until i was doing my phd! |
| 05:34 | seancorfield | (not that i did c++ at uni... didn't start that until '92) |
| 05:35 | ejackson | i remember being super excited one day to get my hands no a C compiler for my chip. SO HIGH LEVEL ! |
| 05:36 | ejackson | java did exist though :P |
| 05:38 | seancorfield | This is turning into the Four Yorkshiremen sketch... :) |
| 05:39 | lucian | heh |
| 05:48 | ejackson | hehe, in snow this deep ! |
| 05:52 | pandeiro | Fossi: you were right btw, issue with double firing of hash-change events is Chromium-specific. I would never have thought... |
| 05:57 | Fossi | pandeiro: i had a similar problem lately, that's why i suspected it :) |
| 05:59 | pandeiro | Fossi: actually Firefox does same... b/c there's a onpopstate event and an onhashchange event and GClosure's history watcher fires on each for some reason... so you always get a double navigation event |
| 06:01 | lucian | pandeiro: sounds like a bug in GClosure's history watcher. i'm using Backbone to do the same thing and it fires one of the two |
| 06:03 | pandeiro | lucian: good to know... i could fall back to GClosure's History (not Html5History) ... tbh probably easiest to just write it with plain JS |
| 06:03 | lucian | pandeiro: if i were you i'd write my own history watcher in cljs, i think |
| 06:09 | pandeiro | lucian: yeah, that's what I meant... I'd also like to submit an issue to GClosure but have no idea how/where or even what version I am using |
| 06:09 | pandeiro | lucian: curious, are you using backbone from cljs? |
| 06:10 | lucian | pandeiro: no, CoffeeScript |
| 08:39 | clgv | consider the following: (import 'java.lang.management.ManagementFactory) (ManagementFactory/getOperatingSystemMXBean) on a linux java I get a UnixOperatingSystemMXBean from the second form. what do I get on windows? can anyone try? |
| 09:20 | jkdufair | any of the authors of any of the clojure books here, by chance? |
| 09:24 | clgv | can someone with windows and java 6 (or 5) try the following (import 'java.lang.management.ManagementFactory) (ManagementFactory/getOperatingSystemMXBean) and tell me if the returned object has a getProcessCpuTime method? |
| 09:28 | jkdufair | clgv: it seems to |
| 09:29 | jkdufair | i'm on java 1.6.0_30 on windows 7 |
| 09:30 | clgv | ok |
| 09:30 | clgv | thx |
| 09:30 | jkdufair | np. curious: what are you writing? |
| 09:32 | clgv | I need the used cpu time to estimate parallel execution ratio |
| 09:32 | jkdufair | ah cool |
| 10:18 | Fossi | any word yet on who wants to give talks at euroclojure? |
| 10:21 | cemerick | I'm sure they're going to get a pile of proposals. |
| 10:22 | Fossi | guess so too :) |
| 10:24 | dsabanin | hey guys |
| 10:24 | dsabanin | I wonder what is a good way to make this: (contains? ["abc"] "abc") to return true |
| 10:25 | dsabanin | I mean, is there something other than contains? that would work the way I expect? |
| 10:26 | ordnungswidrig | dsabanin: ,(some #{"needle"} ["hay" "needle" "hay"]) |
| 10:26 | cemerick | ,(some #{"x"} ["x"]) |
| 10:26 | clojurebot | "x" |
| 10:27 | dsabanin | nifty! thanks :) |
| 10:30 | dsabanin | should that work if my collection is clojure.lang.ArraySeq? |
| 10:30 | dsabanin | this is args array I get in main func |
| 10:30 | ordnungswidrig | should work with any sequence |
| 10:31 | dsabanin | I get Exception in thread "main" clojure.lang.ArityException: Wrong number of args (1) passed to: core$-main$fn |
| 10:31 | dsabanin | on: (some #("--client") args) |
| 10:31 | dsabanin | ouch |
| 10:32 | dsabanin | sorry :) |
| 10:32 | dsabanin | I'm newbie :D |
| 10:54 | jkdufair | can anyone suggest why 'read-line seems to work in a repl (and even in slime when wrapped in 'swank.core/with-read-line-support but does not work via "lein run"? |
| 10:55 | humasect | :dev-dependencies ? |
| 10:56 | jkdufair | i have swank-clojure in :dev dependencies |
| 10:56 | jkdufair | but i tried it without the wrapper |
| 10:57 | humasect | hmm. i use emacs |
| 10:57 | jkdufair | i do too :-) |
| 10:57 | humasect | clojure-jack-in ? =) |
| 10:57 | jkdufair | works great there |
| 10:58 | jkdufair | trying to build a standalone app |
| 10:58 | humasect | ahh standalone with repl? how come ? |
| 10:58 | jkdufair | standalone w/o repl |
| 10:58 | jkdufair | hence the lein run |
| 10:58 | humasect | lein repl should work if clojure-jack-in works |
| 10:58 | jkdufair | lein repl works fine. just not lein run |
| 10:59 | humasect | ah hmm.. if using swank there, perhaps move to :dependencies if lein run doesn't look at :dev-dependencies |
| 11:01 | jkdufair | not using swank |
| 11:02 | jkdufair | commented it out. same issue |
| 11:05 | humasect | what i mean to say, that lein run does not use dev-dependencies |
| 11:05 | humasect | if using the dependencies in the app itself, perhaps add them there instead. |
| 11:06 | jkdufair | i took the deps out of the app altogether |
| 11:07 | humasect | those are needed |
| 11:07 | raek | jkdufair: there is another bug/problem with read-line and lein run. it is actually a bug in ant |
| 11:07 | jkdufair | ah fun. any workarounds? |
| 11:08 | humasect | to be clear, my suggestion is to move dev-dependencies to dependencies. and see what happens after lein deps; lein run |
| 11:08 | raek | jkdufair: there are some threads on the leiningen google group about this |
| 11:09 | jkdufair | ok. i'll look. thx |
| 11:28 | gf3 | technomancy: hola, I'm having an issue starting the latest swank-clojure standalone → http://cloud.gf3.ca/E25Z |
| 11:29 | gf3 | technomancy: and `lein swank` dies after a few seconds → http://cloud.gf3.ca/E1K8 |
| 11:46 | brett_h | how can I list the available methods on an instance at the repl? |
| 11:49 | mdeboard | brett_h: You mean like the clojure equivalent of dir()? |
| 11:51 | brett_h | ching chong potato |
| 11:51 | raek | brett_h: if you use emacs you can use C-c I |
| 11:51 | brett_h | thanks |
| 12:01 | technomancy | gf3: sure, if the port is taken try specifying another (lein swank 4006) or better yet, use M-x clojure-jack-in |
| 12:01 | gf3 | technomancy: it, unfortunately, fails for every port |
| 12:02 | gf3 | technomancy: also unfortunate, but I must use the standalone because I am using Slimv |
| 12:03 | amalloy | wow, i don't think i'd have the patience to try all 64k ports |
| 12:05 | gf3 | amalloy: ಠ_ಠ |
| 12:06 | technomancy | if Java is reporting "Address in use" for every single port on your machine it seems like swank not working is the least of your worries =) |
| 12:06 | technomancy | seriously though; I've never heard of that |
| 12:08 | amalloy | i bet it's not the swank port that's in use, it's port 80 which he tries to listen to at compile-time via an init.clj or something |
| 12:08 | hiredman | amalloy: I like it |
| 12:10 | amalloy | though the stacktrace sure looks like it's from swank, now that i look closer |
| 12:16 | technomancy | I love how the exception message doesn't even tell you which port had the conflict |
| 12:17 | gf3 | technomancy: it's very helpful |
| 12:41 | technomancy | jkdufair: you probably want lein trampoline run |
| 12:41 | technomancy | gotta head off, but try lein help trampoline |
| 12:42 | jkdufair | technomancy: funny i was literally just reading that in the docs |
| 12:42 | jkdufair | thanks so much |
| 12:43 | jkdufair | argh. cygwin vs. java = jkdufair fail |
| 12:44 | jkdufair | probably time to just install linux in a vm on my computer |
| 12:44 | jkdufair | or save my pennies for a mac |
| 12:44 | jkdufair | anyone doing clojure on windows with emacs/slime/swank/lein? |
| 12:53 | romain_p | Hi everyone, could someone point me to a good korma tutorial? |
| 12:53 | romain_p | (without lobos or such...) |
| 12:53 | brett_h | more than http://sqlkorma.com/docs ? |
| 12:54 | romain_p | brett_h: yup, in particular I would like to understand the mapping between tables and korma entities |
| 12:57 | romain_p | brett_h: there is a blog post that describes a blog engine that uses korma, but it also uses lobos to create the DB schema... |
| 13:00 | jaley_ | I'm getting a stack overflow error with 1024 visible lines in the stack trace, all in clojure.core... any suggestions as to how i could've caused that to happen? :s |
| 13:01 | TimMc | Nothing obvious from that description. |
| 13:01 | yawNO | wrong recursion? |
| 13:01 | yawNO | just guessinh |
| 13:02 | jaley_ | yawNO: well, I'm using loop and recur |
| 13:03 | yawNO | recur must be in trailing position |
| 13:03 | jaley_ | yawNO: for 20,000 iterations |
| 13:03 | yawNO | (am i right?) |
| 13:03 | jaley_ | yawNO: yeah well it won't compile unless it is, right? |
| 13:03 | AimHere | I think clojure detects if it's in tail and complains |
| 13:03 | yawNO | no clue |
| 13:03 | yawNO | i think AimHere is right though |
| 13:05 | TimMc | &(fn [x] (recur 6) 7) |
| 13:05 | lazybot | java.lang.UnsupportedOperationException: Can only recur from tail position |
| 13:05 | TimMc | jaley_: Paste your stacktrace on refheap.com |
| 13:06 | jaley_ | TimMc: ok will do. I've canned it right now because it makes emacs die somewhat, but I'll get it back and ping in here when it's read (takes a few minutes, processing more data than my laptop can handle) |
| 13:17 | jaley_ | TimMc: not sure if there's really any information in this... https://refheap.com/paste/682 |
| 13:18 | jaley_ | TimMc: is the problem possibly that I just have too many next lazy seqs? |
| 13:18 | jaley_ | TimMc: I meant *nested*, not next |
| 13:18 | amalloy | $google stackoverflow clojure prime dbyrne |
| 13:18 | lazybot | [recursion - Recursive function causing a stack overflow - Stack ...] http://stackoverflow.com/questions/2946764/recursive-function-causing-a-stack-overflow |
| 13:19 | amalloy | jaley_: same problem as that one |
| 13:19 | amalloy | except you're calling concat rather than filter/remove |
| 13:20 | jaley_ | amalloy: yeah i have a remove |
| 13:20 | jaley_ | amalloy: nice guess! :) |
| 13:20 | amalloy | &(first (reduce concat (repeat 2000 '(1)))) |
| 13:20 | lazybot | java.lang.StackOverflowError |
| 13:20 | amalloy | not a guess; the stacktrace has all the information i need :P |
| 13:21 | jaley_ | amalloy: will doseq with :when work? |
| 13:21 | amalloy | uh |
| 13:21 | amalloy | it won't do the same thing? i can't answer that question |
| 13:22 | amalloy | like, doseq is for mutation and side effects over an existing sequence; remove and concat are for building sequences |
| 13:23 | jaley_ | amalloy: sorry yeah I was forgetting you can't actually see my code for a minute there... whoops. OK thanks for the help, problem solved |
| 13:37 | jsabeaudry | Is there a way to programmatically obtain a list of all libraries loaded in the current project and their version? (from within the project) |
| 13:37 | TimMc | &(loaded-libs) |
| 13:37 | lazybot | ⇒ #{cd-client.core cheshire.core cheshire.factory cheshire.generate cheshire.parse clj-config.core clj-http.client clj-http.cookies clj-http.core clj-http.util clj-time.core clj-time.format clojail.core clojail.jvm clojail.testers clojure.contrib.zip-filter clojure.con... https://refheap.com/paste/683 |
| 13:38 | TimMc | Oh, version? Dunno. |
| 13:39 | TimMc | jsabeaudry: You mean, get the deps listed in project.clj? |
| 13:40 | jsabeaudry | TimMc, Yes, recursively |
| 13:40 | TimMc | recursively... |
| 13:40 | jsabeaudry | well, not recursively is a nice first step |
| 13:42 | ibdknox | so basically you want the dependency graph? |
| 13:43 | jsabeaudry | ibdknox, Yes, well a flattened version of it would be fine, just libraries loaded and their respective versions |
| 13:49 | TimMc | jsabeaudry: `lein pom; mvn dependency:tree` |
| 13:50 | TimMc | For some reason I thought you wanted to do this from inside Clojure. |
| 13:56 | hagna | so if I don't declare a variable dynamic what's the big deal? |
| 13:57 | jsabeaudry | TimMc, I do want it to do from clojure, from the project itself, think of an about page where you could see all the libs that are used in the project |
| 13:58 | jsabeaudry | TimMc, I guess (loaded-libs) is the closest thing and I'll have to let go the versions... |
| 13:58 | TimMc | hagna: Then you don't get to use (binding ...) on it, or some other value-altering operations. |
| 13:59 | TimMc | No biggie. |
| 13:59 | ibdknox | TimMc: Are you starting the NoBiggie movement? |
| 14:01 | jsabeaudry | ibdknox, Found out about jayq yesterday, I think that lib is going to be very popular, is it the death of pinot? |
| 14:01 | TimMc | ibdknox: what |
| 14:02 | ibdknox | jsabeaudry: not the death :) The rebirth, all the other parts of pinot are in their own libs |
| 14:02 | ibdknox | TimMc: NoSQL, NoOps, NoBiggie? |
| 14:04 | ibdknox | technomancy: this heroku survey should allow you to check multiple boxes :p |
| 14:05 | technomancy | ibdknox: the leiningen one? |
| 14:06 | ibdknox | technomancy: no, I suspect you actually had nothing to do with this one :) I got some developer survey this morning |
| 14:06 | ibdknox | from Heroku |
| 14:06 | technomancy | oh, heh |
| 14:06 | TimMc | ibdknox: Hah! Got it. |
| 14:06 | ibdknox | :p |
| 14:06 | technomancy | my survey's way better |
| 14:07 | ibdknox | the one you had a bit ago? I filled that one out |
| 14:08 | ibdknox | apparently people are getting interested in CLJS: https://github.com/languages/Clojure lol |
| 14:09 | emezeske | ibdknox: the exhibitionist! |
| 14:09 | ibdknox | lol |
| 14:10 | ibdknox | I often find lots of neat things people are working on through that list |
| 14:11 | ibdknox | emezeske: how're the libs working out? |
| 14:11 | y3di | has anyone built anything noteworthy in clojurescript yet? |
| 14:12 | ibdknox | y3di: not quite ready for the public yet, but in the next month or so I'll be releasing something sizable |
| 14:12 | emezeske | ibdknox: great! I have 90% of my stuff transitioned from my ad-hoc stuff to your libs now |
| 14:14 | y3di | ibdknox: can you say what we should be expecting? or is it a surprise? |
| 14:14 | emezeske | ibdknox: crate is very nice, hopefully I will contribute to it soon with more page/form helpers |
| 14:15 | ibdknox | y3di: a fun way to play with/learn a little clojure :) |
| 14:15 | ibdknox | emezeske: cool |
| 14:15 | ibdknox | I was just lazy and didn't port all of them over :) |
| 14:16 | TimMc | From "Most Watched Overall": richhickey / clojure-contrib |
| 14:16 | TimMc | :-( |
| 14:16 | emezeske | ibdknox: should not be hard to do with the foundation you have in place. |
| 14:16 | ibdknox | TimMc: I know :( |
| 14:16 | ibdknox | emezeske: yeah, should be super easy :) |
| 14:17 | ibdknox | about 100 more watchers and Noir will kick it off the list |
| 14:18 | emezeske | ibdknox: hopefully I'll release this thing I made with fetch soon. It's a macro that lets you create a google app engine datastore record with validation and a full CRUD API, in maybe 5 lines of code |
| 14:18 | ibdknox | sweet |
| 14:19 | emezeske | It used to build the CRUD API out via a bunch of REST-ful routes in compojure |
| 14:19 | emezeske | But with fetch, like 50% of that code melted away |
| 14:19 | ibdknox | RPC ftw |
| 14:19 | emezeske | mmmhmm! |
| 14:20 | muhoo | where is fetch? |
| 14:20 | muhoo | googling fetch is.... unsatisfying. |
| 14:21 | ibdknox | http://github.com/ibdknox/fetch |
| 14:21 | muhoo | thanks |
| 14:21 | muhoo | see, all i needed to know is who wrote it, then it'd have been easy to find :-) |
| 14:21 | ibdknox | hehe |
| 14:22 | muhoo | do you accept patches for readme's ? |
| 14:23 | pandeiro | ibdknox: webapp clojurescript ide? :) |
| 14:24 | ibdknox | pandeiro: haha a little, but that's not the real thing |
| 14:24 | ibdknox | muhoo: depends on the patch ;) I didn't mean for these to be fully released quite yet |
| 14:24 | ibdknox | hence why they're not my normal level of documented |
| 14:24 | muhoo | i was just enjoying the README.md |
| 14:25 | muhoo | yeah, if it abstracts AJAX away with clojure, that will be very helpful |
| 14:25 | pandeiro | ibdknox: a cljsfiddle would be pretty sweet... |
| 14:26 | ibdknox | pandeiro: That wouldn't be too hard to build |
| 14:26 | pandeiro | i was thinking about it yesterday |
| 14:26 | ibdknox | TimMc: what ended up happening with the CLJS repl? |
| 14:26 | pandeiro | i even went down the websocket rabbithole |
| 14:26 | TimMc | ibdknox: It's in the freezer. |
| 14:26 | ibdknox | lol |
| 14:26 | TimMc | I don't feel like beating my head against namespace issues. |
| 14:27 | muhoo | i'd rather have somethig more like slime |
| 14:27 | muhoo | which, iirc, cljs already has |
| 14:28 | pandeiro | muhoo: i don't think cljs works with slime |
| 14:28 | ibdknox | there's some way to run the cljsrepl in emacs |
| 14:28 | ibdknox | I couldn't get it to work with vimclojure :( |
| 14:28 | pandeiro | totally yeah but slime is something else |
| 14:28 | ibdknox | ah |
| 14:28 | pandeiro | slime has... AUTOCOMPLETE |
| 14:28 | ibdknox | oh |
| 14:29 | pandeiro | and a bunch of other stuff |
| 14:29 | pandeiro | but it got me at autocomplete |
| 14:30 | muhoo | heh, with M-/, everything has autocomplete :-P |
| 14:39 | jkdufair | so cljs is feature-complete and runs on the js vm and does not require the jvm? |
| 14:40 | pandeiro | jkdufair: requires jvm to compile, still |
| 14:40 | jkdufair | ah ok. pretty cool, nonetheless |
| 15:13 | TimMc | brehaut: We were talking about 'reverse and conjugation the other day. If I write (defn assoc-meta [metable & kvs] (with-meta metable (apply assoc (meta metable) kvs))), is that a conjugation on assoc? |
| 15:15 | amalloy | (aside: you know about vary-meta, right?) |
| 15:16 | technomancy | actually that's not true; nm |
| 15:17 | brehaut | TimMc: let me get my brain engaged |
| 15:17 | TimMc | amalloy: Looks about right, thanks. |
| 15:22 | brehaut | TimMc: yeah i think it might be a conjugation |
| 15:25 | TimMc | brehaut: I was unsure because reverse is self-inverse. |
| 15:25 | brehaut | TimMc: its a little confused because a bunch of the functions take multiple args |
| 15:26 | brehaut | TimMc: the example that made it really clear for me was lines and unlines in haskell forming a dual |
| 15:27 | jcrossley3 | if i have an object from a 3rd-party lib that implements java.util.Map, can i "extend" it to implement clojure.lang.IPersistentMap as well? |
| 15:33 | amalloy | jcrossley3: no; you can read it like a regular map but you can't "assoc" it |
| 15:33 | amalloy | if you want to, just dump it into a clojure map with into (easy, since you can read it as if it were one already) |
| 15:35 | jcrossley3 | amalloy: thanks |
| 15:37 | jcrossley3 | amalloy: would that be lazy? or is there a fn i could call that would turn it into a map without realizing everything? |
| 15:37 | amalloy | maps ain't lazy |
| 15:38 | brehaut | TimMc: https://gist.github.com/1773494 |
| 15:39 | alexyk | so what's up with textmate-clojure? it still wants cake |
| 15:39 | brehaut | wow, thats still maintained in any form? |
| 15:40 | alexyk | brehaut: cake? |
| 15:40 | brehaut | textmate-clojure |
| 15:41 | alexyk | brehaut: that's what I'd like to know. The world stops in the summer of 2011, for cake and all cake-based things. Did leon took over completely and is a superset of cake now? |
| 15:41 | alexyk | lein |
| 15:42 | brehaut | lein and cake are in the process of merging |
| 15:42 | brehaut | i believe the expression (merge-with (comp technomancy raynes ninjudd) lein cake) is taking some time to evaluate |
| 15:43 | alexyk | ah, flatland/cake is updated 1/23/2012 |
| 15:43 | alexyk | lancepantz |
| 15:43 | alexyk | so enlighten me, lein shows a server port now when I say leon repl. Is it doing two JVMs as cake did? |
| 15:48 | jsabeaudry | Is there a way to tell lein to optimize for speed when creating a uberjar? |
| 15:49 | TimMc | jsabeaudry: You can avoid the AOT compilation entirely with the lein-jit plugin I wrote. |
| 15:50 | Somelauw | I am bored |
| 15:55 | jsabeaudry | TimMc, Interesting, didn't know that existed, however I'm am not concerned about portability, I'm investigating cheap ways of improving performance, I already have the warn on reflection setup for example |
| 15:56 | TimMc | jsabeaudry: Oh, you want the resulting jar to be fast, not the creation process. |
| 15:56 | TimMc | Yeah, definitely give lein-jit a miss, then! |
| 16:04 | arohner | in 1.3, can I declare a var :dynamic after the fact? |
| 16:05 | Raynes | arohner: You can call setDynamic on it. |
| 16:06 | arohner | yeah, I just realized that |
| 16:06 | arohner | thanks! |
| 16:11 | romain_p | stupid korma question: if I want to put each defentity in its own namespace (foo.models.user, foo.models.post) how do I avoid circular dependencies when declaring relationships ? (post belongs to user, user has many posts)... |
| 16:11 | mebaran151 | ure |
| 16:11 | romain_p | stupid korma question: if I want to put each defentity in its own namespace (foo.models.user, foo.models.post) how do I avoid circular dependencies when declaring relationships ? (post belongs to user, user has many posts)... |
| 16:11 | mebaran151 | sorry about that; emacs buffer switch fail :( |
| 16:11 | romain_p | oops |
| 16:11 | Raynes | Double fail. |
| 16:13 | ibdknox | romain_p: I stick the entity definitions in one file usually, and then have all my logic for them in their own files |
| 16:13 | romain_p | ibdknox: OK, will try that way |
| 16:16 | TimMc | ibdknox: Yeah, just put them all in a .h files... |
| 16:16 | romain_p | ibdknox: do you ever think about porting noir-blog to korma? That would make a nice tutorial |
| 16:17 | ibdknox | romain_p: seems like something someone in the community could do :) If I manage to find some free time, there are a few things like that I'd like to do though. |
| 16:18 | ibdknox | TimMc: Oh god... header files? it pains us. :p |
| 16:18 | ibdknox | ~guards |
| 16:18 | clojurebot | SEIZE HIM! |
| 16:19 | TimMc | It's funny because it's true. |
| 16:19 | ibdknox | I know :( Unfortunately, I'm not sure of a better solution to get around circular dependencies in that case. They are inherently interdependent |
| 16:20 | ibdknox | the only thing you can do is factor the common bits out, which would be the entities. |
| 16:21 | ibdknox | it's not often that the single pass nature of Clojure bothers me, but when it is an issue, it ends up being a bit ridiculous |
| 16:31 | TimMc | Everything in one file. Done. |
| 16:32 | TimMc | I hope you like scrolling. |
| 16:32 | Raynes | TimMc: Have you seen jedahu's story? |
| 16:32 | TimMc | nope |
| 16:32 | TimMc | Is that the doc app? |
| 16:32 | Raynes | https://github.com/jedahu/story/blob/master/src/story/core.clj |
| 16:32 | Raynes | megafile |
| 16:33 | TimMc | Can't be longer than clojure/core.clj |
| 16:33 | Raynes | It isn't, but give it a couple of months. |
| 16:33 | ibdknox | I start getting antsy at around 500 lines |
| 16:33 | TimMc | which I don't even try to open in Firefox |
| 16:33 | Raynes | jedahu lives by the file, dies by the file. |
| 16:41 | seancorfield | longest file at World Singles is 600 lines |
| 16:41 | seancorfield | we have one at 316 lines, another at 247, everything else is below 200 |
| 16:43 | romain_p | 849 lines? That's a small ocaml file by their standards :( |
| 16:43 | seancorfield | just under 4kloc, of which just over 700 is unit tests |
| 16:43 | ibdknox | what'd you use for project level lines? |
| 16:50 | hiredman | our utils namespace at work is 1,056 lines |
| 16:51 | seancorfield | ibdknox: do you mean "how did (i) count lines?" - i just used wc |
| 16:51 | ibdknox | I see |
| 16:51 | jedahu | Raynes: hey, that's not fair! not all my work is like that, and it was written in one hackety session :-) |
| 16:52 | Raynes | jedahu: Hehe. :) |
| 16:52 | Raynes | That's pretty cool for one session. |
| 16:52 | Raynes | Regardless of massive files. :P |
| 16:53 | jedahu | well, perhaps one session is a wee exaggeration. the reality is that I needed it quickly and couldn't afford to spend much time on the niceties |
| 16:57 | TimMc | whoa |
| 16:57 | TimMc | "niceties" is an anagram of "nice ties" |
| 16:58 | TimMc | (It must be about the end of the work-day...) |
| 16:58 | hagna | space isn't a character? |
| 16:58 | Raynes | &(seq "1 2 3") |
| 16:58 | lazybot | ⇒ (\1 \space \2 \space \3) |
| 16:58 | TimMc | Raynes: No, in the "anagram". |
| 16:58 | hagna | :) |
| 16:59 | Raynes | Oh. |
| 16:59 | ibdknox | OMG space exists? |
| 16:59 | ibdknox | ,\space |
| 16:59 | clojurebot | \space |
| 16:59 | TimMc | &\newline |
| 16:59 | lazybot | ⇒ \newline |
| 17:00 | ibdknox | ,\awesome |
| 17:00 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unsupported character: \awesome> |
| 17:00 | ibdknox | :( |
| 17:01 | ibdknox | I have end of the work-day syndrome too, obviously. Unfortunately it's the middle of the day |
| 17:03 | brehaut | TimMc: the latest firefoxes can display core.clj with only a minimal amount of beachballing |
| 17:05 | jondot1 | hi guys. any advice on what to use for image processing? i'd like to get image properties such as width,height and exif data. typically i'd use imagemagick (on ruby/node/anything native) |
| 17:06 | mebaran151 | jondot1: Java actually has pretty good image support baked in |
| 17:06 | brehaut | jondot1: java2d is pretty decent. you'll get height and width no problem. cant say about exif though |
| 17:07 | mebaran151 | jondot1: http://commons.apache.org/sanselan/ actually looks right up your alley |
| 17:08 | jondot1 | mebaran151, thanks |
| 17:09 | ibdknox | lol |
| 17:10 | ibdknox | I love this: "This library is pure Java. It's slow, consequently, but perfectly portable." |
| 17:10 | Raynes | Hah |
| 17:10 | jondot1 | hm, i'd rather have something fast but not portable, in this specific usecase i'm looking at. |
| 17:12 | mebaran151 | jondot1: java2d is probably as close to the metal as you're gonna find, but I can't speak for its EXIF support |
| 17:12 | jondot1 | good enough. |
| 17:14 | mebaran151 | btw, does anybody here know of a good tutorial for JGoodies or Mig |
| 17:14 | mebaran151 | I'm trying to make some Swing dialogs that don't look completely awful |
| 17:17 | jondot1 | for general knowledge, this might be good http://rsbweb.nih.gov/ij/features.html |
| 17:47 | faust45 | is it simple way in clojure to implement: one process put data to queue, another watch queue and proceeds items one by one ? |
| 17:48 | technomancy | faust45: sure; you mean in-process or over a network? |
| 17:48 | technomancy | both are easy enough |
| 17:49 | emezeske | faust45: you might also look at agents, they're not exactly what you describe, but may be applicable: http://clojure.org/agents |
| 17:49 | faust45 | technomancy: one process listen http feed and parse it and put items to queue, another watch queue and processed them |
| 17:50 | technomancy | faust45: sure, the most common way is to use rabbitmq; it's pretty straightforward |
| 17:50 | technomancy | https://github.com/technomancy/die-roboter |
| 17:52 | faust45 | technomancy: rabbitmq? i want use only native clojure java stuff |
| 17:53 | technomancy | rabbit has a native java client |
| 17:53 | technomancy | unless you're talking about in-process queues |
| 18:00 | faust45 | if i what run some action and not waiting to finished i can use agents ? |
| 18:01 | dakrone | faust45: you could also check out channels in lamina https://github.com/ztellman/lamina |
| 18:02 | faust45 | dakrone: thanks, but i just want wrap my mind around clojure features |
| 18:02 | brehaut | or anything implementing http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/BlockingQueue.html |
| 18:03 | brehaut | LinkedBlockingQueue being a favorite |
| 18:03 | dakrone | ,(doc seque) |
| 18:03 | clojurebot | "([s] [n-or-q s]); Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer." |
| 18:03 | faust45 | thanks |
| 18:04 | faust45 | but can i use agents for not blocking? or agents not suitable |
| 18:05 | brehaut | agents dont block |
| 18:05 | brehaut | if you use something like a BlockingQueue you will need to create the threads that consume or populate them yourself |
| 18:27 | hagna | hrm clojure-bitly 0.1.2 has errors about rebinding dynamic variables ... |
| 18:29 | Raynes | hagna: http://github.com/Raynes/hobbit |
| 18:29 | Raynes | Relies on a godawful old version of clj-http, so if you want to update that be my wonderful guest. |
| 18:30 | hagna | Raynes: ok I guess I could try that |
| 18:31 | hagna | Raynes: isn't it odd that lein will let me use libraries that won't work? |
| 18:31 | Raynes | Not really. |
| 18:31 | hagna | yeah guess not |
| 18:56 | hagna | Raynes: how do I get import it (:require hobbit.bitly :as bitly) ? |
| 19:00 | aperiodic | hagna: almost, but the namespace and rename bit should all be in a vector: (:require [hobbit.bitly :as bitly]) |
| 19:00 | aperiodic | hagna: if you're not renaming it, then you can omit the vector and just supply the namespace |
| 19:01 | aperiodic | hagna: and remember that in the repl, you'll need to quote the vector/namespace |
| 19:01 | hagna | aperiodic: I suppose after that I do (type bitly/bitly-url) |
| 19:01 | hagna | to see that it imported correctly? |
| 19:01 | aperiodic | yeah, that'll work |
| 19:02 | hagna | aperiodic: why do you have to quote the vector/namespace in the repl |
| 19:03 | TimMc | hagna: Because require is a function, not a macro. |
| 19:03 | aperiodic | hagna: because what require needs are symbols, but since require is a function, the symbols are evaluated before being passed to require. |
| 19:03 | kilorn | technomancy: hey, are you the maintainer of slime.el on marmalade? |
| 19:04 | amalloy | technomancy: quick, hide! |
| 19:04 | hagna | aperiodic: so (dir bitly) yields an error in the repl |
| 19:04 | kilorn | haha, no no, nothing like that, just a bigfix i'd like to offer |
| 19:04 | alexyk | technomancy: so does leon subsume all of the cake already? |
| 19:04 | alexyk | lein dammit |
| 19:04 | hagna | aperiodic: but (type bitly/bitly-url) is String |
| 19:04 | kilorn | packaging bug more correctly |
| 19:05 | Raynes | alexyk: That isn't a question. |
| 19:05 | alexyk | Raynes: prev. line |
| 19:05 | Raynes | alexyk: It doesn't have any sort of persistence yet and that's pretty low-priority. As far as functionality goes, lein 2 is pretty close if not on par with cake. |
| 19:05 | Raynes | All the way down to profiles and an awesome repl with completion and stuff. |
| 19:06 | Raynes | Actually, lein's new repl is better than cake's wa. |
| 19:06 | Raynes | was* |
| 19:06 | aperiodic | hagna: that's because the namespace-qualified symbol bitly/bitly-url refers to a string, so when it is evaluated, it evaluates to that string |
| 19:07 | technomancy | alexyk: the in-process classloader stuff isn't very well tested, and the background JVM process stuff is delegated to jark, but I think that covers most of it |
| 19:08 | technomancy | if you're interested in background JVMs I encourage you to help test out jark |
| 19:08 | technomancy | it's still in progress from what I can tell |
| 19:08 | alexyk | Raynes: so for practical purposes, textmate-clojure bundle wants cake. And expects that to start persistent JVMs, for self and project. Would renaming cake to lein there work? |
| 19:08 | alexyk | technomancy: what's jark? |
| 19:08 | Raynes | No. |
| 19:08 | technomancy | clojurebot: jark? |
| 19:08 | clojurebot | jark is a clojure daemon for scripting: http://icylisper.in/jark/ |
| 19:09 | Raynes | alexyk: My suggestion would be to remove all interactive stuff from the bundle. |
| 19:09 | Raynes | dnolen has long since abandoned it anyways. |
| 19:09 | Raynes | He was trying to make it not suck but eventually gave up. |
| 19:09 | technomancy | yeah, I don't think textmate is very suited for interacting with subprocesses |
| 19:09 | aperiodic | hagna: but when you call require, there's no var in your namespace that's mapped to by the symbol hobbit.bitly, so (require [hobbit.bitly :as bitly]) will complain that there's no var called "hobbit.bitly" |
| 19:10 | Raynes | technomancy: Sublime Text 2 is much better as far as extensions go and I think could handle that sort of thing. |
| 19:10 | hagna | aperiodic: ok |
| 19:10 | Raynes | technomancy: If only it didn't rely on textmate bundles and have completely worthless autoindentation, etc. |
| 19:10 | technomancy | kilorn: sort of. I'm trying to encourage people to move away from it towards M-x clojure-jack-in. |
| 19:10 | ibdknox | yeah ST2 is basically useless for Clojure |
| 19:10 | aperiodic | hagna: what you want pass to require is the symbol that tells require what namespace to import, so you need to quote the symbol/vector in order to prevent it from being evaluated |
| 19:11 | alexyk | Raynes: it's last edited last summer! Is it long abandonment in Internet age? |
| 19:11 | Raynes | ibdknox: Using textmate bundles was a huge mistake. If you, in the 21st century, do not have an editor that has syntax definitions that understands the structure of code at least a little, you've got a problem. |
| 19:11 | ibdknox | heh |
| 19:11 | Raynes | Even Vim does better than this. Emacs is bloody sentient with that stuff. |
| 19:11 | technomancy | well |
| 19:12 | Raynes | I've heard it whisper indentation rules into my ear. |
| 19:12 | technomancy | most emacs modes still rely on regexes, which is dumb |
| 19:12 | kilorn | technomancy: the slime.el package on marmalade references two functions from slime-contrib which are not packaged , so slime-eval-defun (*very* useful) doesn't work. may I offer a fix? https://gist.github.com/1775732 |
| 19:12 | technomancy | but you can still write a real parser if you like |
| 19:12 | alexyk | ocaml client for clojure daemon! bestiality is next |
| 19:12 | technomancy | dude! |
| 19:12 | technomancy | ocaml is awesome |
| 19:12 | alexyk | I love ocaml! |
| 19:12 | kilorn | technomancy: just copy pasted from the orig |
| 19:12 | ibdknox | Clojure is way more awesome :p |
| 19:12 | Raynes | I think I'd go with something else. |
| 19:12 | alexyk | it beat clojure for Twitter graph when I handled 5 million users |
| 19:13 | technomancy | it's good at all the things clojure sucks at |
| 19:13 | Raynes | I'd do a Haskell client for a clojure daemon. Or… a Rust client!!! |
| 19:13 | alexyk | in fact Haskell beat ocaml narrowly |
| 19:13 | technomancy | alexyk: cool |
| 19:13 | Raynes | If Rust had decent networking. It's too young. :( |
| 19:13 | alexyk | but I'm just curious why you guys say :"leon merges with cake" if you send me to mark for JVMs! |
| 19:13 | alexyk | because until leon fully subsumes cake it won't do |
| 19:14 | ibdknox | lol |
| 19:14 | alexyk | merge means you do everything better |
| 19:14 | technomancy | kilorn: hmm... is this so you can use C-M-x from inside the slime-repl? |
| 19:14 | ibdknox | this mythical leon |
| 19:14 | Raynes | It was a team merge, not a code merge. :> |
| 19:14 | technomancy | it already works from within clojure-mode |
| 19:14 | alexyk | effin' lion corrects lein |
| 19:14 | Raynes | And by team, it apparently mostly meant "Hey, Raynes is gonna work on Lein now. k?" |
| 19:14 | alexyk | Raynes: it's like, cake folks said, we're tired of it guys! |
| 19:14 | technomancy | "Ponce de Lein" |
| 19:14 | kilorn | technomancy: the repl and slime-mode, yeah, have I stumbled on something known? |
| 19:15 | alexyk | Elton John's hit "Lein" |
| 19:15 | technomancy | kilorn: I guess I'm not sure what you're looking for |
| 19:15 | technomancy | why would you use C-M-x in the repl; wouldn't RET be just as good? |
| 19:16 | alexyk | so the fact is, I can still get cake and it creates persistent JVMs, so it's what I like best, and until I can call lein2 with two JVMs I'm sticking with cake! |
| 19:16 | technomancy | is it for re-evaling something from up in the buffer's history? |
| 19:16 | technomancy | alexyk: have you tried jark? |
| 19:16 | Raynes | alexyk: And that will work fine for you until you find yourself needing to use a lein plugin or find a cake bug that we refuse to fix. :p |
| 19:17 | kilorn | technomancy: it's not for the repl, it's for evaluating in the edit buffer. what it does is find the surrounding defun no matter where inside it you are, and send it to the swank server, I use it constantly. |
| 19:17 | alexyk | technomancy: not yet! I see it exists, but from the get-go, I turned back to Clojure in Klout again and I forgot all I knew, so I want things to work out of the box. |
| 19:17 | technomancy | yeah, it's definitely immature |
| 19:17 | alexyk | So if I need to like write plumbing for leon-cake, it's a no-go |
| 19:17 | alexyk | lein dammit |
| 19:17 | alexyk | I need to teach this Lion |
| 19:17 | alexyk | to behave around spelling |
| 19:18 | technomancy | kilorn: so you're saying in clojure-mode C-M-x doesn't currently work at all? |
| 19:18 | kilorn | technomancy: it's broken in the version everyone gets by default from marmalade,I'd just like to have it work by default for new users. |
| 19:18 | technomancy | this is the first I've heard of this problem |
| 19:18 | kilorn | technomancy: it didn't for me, until I added these functions |
| 19:18 | kilorn | technomancy: what's it bound to on your machine? |
| 19:19 | technomancy | it's slime-eval-defun |
| 19:19 | technomancy | I mean, once I've connected to a slime server |
| 19:20 | emezeske | Anyone mind if I use them as a "Friend of Attendee" for $25 my Clojure West ticket? |
| 19:21 | emezeske | s/\$25 my/$25 off my/ |
| 19:28 | kilorn | technomancy: you're right, my bad, slime-eval-defun had an advice around it which had broken dependencies. |
| 19:29 | technomancy | aha, tricky |
| 19:30 | kilorn | technomancy: that's what I get for haphazardly stealing bits of people's .emacs |
| 19:30 | technomancy | it happens =) |
| 19:31 | technomancy | hmm; one more =) and we'll have balance among the parens |
| 19:31 | technomancy | (for as long as i've been connected to my bouncer anyway |
| 19:31 | technomancy | ) |
| 19:32 | kilorn | who on earth would name his project ciste?! |
| 19:33 | amalloy | why wouldn't you? |
| 19:33 | amalloy | it's not a word with a meaning in english |
| 19:34 | kilorn | because "puss-bladder" has a much nicer ring |
| 19:35 | technomancy | maybe you meant to call it "cistern" but got bored 70% of the way through typing it |
| 19:35 | amalloy | (a) you're only looking for one S there, and (b) that's cyst. ciste makes me think of cistern, personally |
| 19:35 | kilorn | shall we compare edit-distance? =) |
| 19:36 | amalloy | ,(= 2 2) |
| 19:36 | clojurebot | true |
| 19:36 | kilorn | a true case of zero-sum potato-tomato |
| 19:42 | jweiss | https://refheap.com/paste/685 <- anyone recognize what's going wrong with the stdout stream here? it's a snippet of basically clojure.contrib.trace output. not sure how the stream is being written out of order when i'm calling println. shouldn't have anything to do with laziness, right? |
| 19:43 | hiredman | printing is not synchronized |
| 19:43 | jweiss | hiredman: but it's a single thread |
| 19:43 | hiredman | what makes you think that? |
| 19:43 | kilorn | amalloy: you're right, pus does have one 's'. I take it all back. |
| 19:43 | jweiss | hiredman: i don't have any code being executed that starts new threads |
| 19:44 | jweiss | at least, not that i'm aware of |
| 19:45 | hiredman | so? I bet selenium creates threads |
| 19:47 | jweiss | hiredman: hm, i will dig deeper to see if that's it, but the selenium namespace is my own, not the actual selenium lib - that whole block hasn't even called into the selenium library yet |
| 19:49 | jweiss | and the out-of-orderness is awfully consistent to be thread contention, but i suppose even that could come out the same every time |
| 19:54 | jweiss | it sure looks like println is allowing thread execution to continue before the entire string is done printing but that doesn't seem possible. Maybe it's the emacs repl causing the issue |
| 19:55 | amalloy | it sounds more like laziness to me, if you're producing lazy sequences with a side effect of printing while trace is printing stuff. |
| 19:56 | amalloy | &(lazy-seq (print 1) (cons 1 (lazy-seq (print 2) (cons 2 nil))))) ;; probably prints overlapping |
| 19:56 | lazybot | ⇒ (121 2) |
| 19:56 | jweiss | amalloy: it sure looked like laziness to me at first. just not sure how a println can print the open paren, allow more stuff to run, and then print the data it was given. |
| 19:56 | amalloy | if the sequence it's printing is lazy, then it's like "oh, this is a sequence: i'll print a paren. now, let's see what its elements are" |
| 19:57 | amalloy | if the first element causes printing, then... |
| 19:57 | jweiss | amalloy: ah, you're right, that is what's happening |
| 19:57 | jweiss | the calculation of the first element calls a traced function. |
| 19:58 | jweiss | so... now to figure out how to force evaluation when i don't even know of the object is a lazy or even a sequence |
| 19:58 | jweiss | *if |
| 19:59 | jweiss | (if (coll? x) (doall x) x) |
| 19:59 | jweiss | something like that i guess |
| 19:59 | jweiss | but that isn't right either, that'll hang on infinite sequences |
| 20:03 | jweiss | i think if i call pr-str and pass the string to println that might help... |
| 20:09 | jweiss | damn, well, at least i'm pretty sure the original contrib lib has the same problem. |
| 20:35 | lnes | how to solve this one? http://www.4clojure.com/problem/72 |
| 20:35 | lnes | thanks |
| 20:41 | brehaut | lnes: if we tell you, you wont learn anything |
| 20:41 | brehaut | and that really defeats the point |
| 21:07 | technomancy | anyone in here who's written a lein plugin? |
| 21:10 | arohner | technomancy: me |
| 21:11 | technomancy | how do you feel about testing it on lein2? |
| 21:11 | arohner | sure. I didn't know lein2 was ready for testing |
| 21:12 | technomancy | well, I'd like to ensure more plugins work before getting lots of users to try it out |
| 21:13 | technomancy | mind if I pm? |
| 21:13 | arohner | please do |
| 21:15 | TimMc | technomancy: ~anyone :-P |
| 21:15 | technomancy | heh |
| 21:15 | TimMc | And I'd be happy to test it out on lein2. |
| 21:16 | TimMc | Does lein2 have a self-installer yet, or do I have to use the shell script? |
| 21:17 | technomancy | TimMc: you have to bootstrap it with lein1 |
| 21:18 | TimMc | k |
| 21:21 | technomancy | TimMc: getting my private messages? |
| 21:28 | TimMc | oops, yes |
| 21:28 | TimMc | wandered off |
| 21:29 | Frozenlock | I'm trying (once again) to get started on clojure. In Emacs, I do the M-x clojure-jack-in while in my project.clj file, but I only get a *swank* buffer, with the whole swank code written in it. Any idea what I might be doing wrong? |
| 21:30 | technomancy | Frozenlock: try "lein plugin install swank-clojure 1.4.0" maybe |
| 21:30 | TimMc | Frozenlock: You might be better off just using lein run and lein test for now -- don't let tools get in the way of learning the language. |
| 21:31 | TimMc | (Oh, and lein repl, of course.) I haven't bothered to get set up with swank-clojure yet. |
| 21:33 | Frozenlock | technomancy: Good catch, but I have already done it ;) |
| 21:33 | technomancy | Frozenlock: do you have the latest version I mean? |
| 21:33 | technomancy | the old version spewed out a lot more code |
| 21:34 | Frozenlock | Urhm... let me check that |
| 21:34 | Frozenlock | TimMc: you mean without Emacs???? |
| 21:34 | TimMc | No, I use Emacs, just not an integrated REPL. |
| 21:36 | Frozenlock | Technomancy: I now have 1.3.0, 1.3.1 and 1.4.0 in my lein plugins folder. Still isn't working. |
| 21:36 | Frozenlock | Those are the last line in my *swank* buffer: (provide 'slime-repl) |
| 21:36 | Frozenlock | ;;; slime-repl.el ends here |
| 21:36 | Frozenlock | |
| 21:36 | Frozenlock | (run-hooks 'slime-load-hook) |
| 21:36 | Frozenlock | user=> Connection opened on local port 64903 |
| 21:37 | Frozenlock | #<ServerSocket ServerSocket[addr=localhost/127.0.0.1,port=0,localport=64903]> |
| 21:37 | Frozenlock | |
| 21:37 | technomancy | Frozenlock: is it just a few lines (~20) or pages and pages? |
| 21:37 | Frozenlock | About 11k lines |
| 21:38 | technomancy | ok, try manually clearing out all but 1.4.0 out of ~/.lein/plugins |
| 21:38 | technomancy | newer versions of lein do this for you, but you must have installed with an older version |
| 21:38 | Frozenlock | Oh I can't, because apparently I'm using the file I'm trying to erase. -_- |
| 21:39 | TimMc | On Windows? |
| 21:39 | Frozenlock | Yes |
| 21:39 | Frozenlock | Don't throw rocks at me |
| 21:39 | TimMc | No, I just keep forgetting that Windows doesn't allow you to delete in-use files. |
| 21:40 | Frozenlock | It isn't the case on other OS? I was taking this as a universal rule... Don't erase file in use. |
| 21:40 | TimMc | Sort of. |
| 21:40 | technomancy | IIRC it's like GC; the blocks won't be freed until there's really no one using it |
| 21:40 | TimMc | Linux (and Mac?) delete the path, but the process keeps hold of the file handle. |
| 21:41 | TimMc | This can lead to a *different* sort of hilarity. |
| 21:41 | Frozenlock | technomancy: should I delete the snapshot.jar file too? (155 ko) |
| 21:41 | technomancy | sure |
| 21:42 | mebaran151 | any guide to do pretty swing with clojure? I'm using seesaw, but I want to make pretty forms for this app. Any guideline would be appreciated |
| 21:42 | Frozenlock | Working! |
| 21:42 | Frozenlock | Thanks guys! |
| 21:42 | technomancy | sweet |
| 21:51 | TimMc | OK, would it be *terrible* etiquette to rename and move my lein-jit project to lein-otf? |
| 21:51 | TimMc | Rationale: "JIT compilation" is ambiguous, and "OTF compilation" (on-the-fly) is not. |
| 22:22 | TimMc | Ugh, lein-jit is currently broken, I think. |
| 23:03 | tacoman | newbie question: I've read that contrib is going away, yet things like vimclojure depend on contrib. Am I misreading something, or am I going to have to adjust my dependencies somehow to deal with this? |
| 23:05 | TimMc | tacoman: Many Clojure 1.2 project depend on monolithic clojure.contrib, and there is no monolithic contrib for 1.3. However, vimclojure is probably running in a different JVM from your code. |
| 23:05 | tacoman | so install vimclojure using clojure1.2, and use 1.3 for my own code? |
| 23:06 | tacoman | and I won't run into any issues with multiple Clojures installed, right? |
| 23:06 | TimMc | technomancy: Has something changed in leiningen that would break lein-otf? I'm relying on :main pulling a dev-dependency into the uberjar, but I think that is no longer happening. |
| 23:06 | TimMc | tacoman: Right, because you don't actually install Clojure -- it's just a dependency that happens to be a compiler and runtime,. :-) |
| 23:06 | tacoman | gotcha. cool stuff |
| 23:07 | tacoman | how frequently do they make changes like this big, out of curiosity? I'd imagine frequently given the age of the language |
| 23:08 | arohner | tacoman: this has been the biggest (and most painful) change that's been made in clojure's history |
| 23:08 | arohner | and I've been here since '08 |
| 23:08 | TimMc | tacoman: The big change in clojure.core was just numerics. contrib is a separate issue that totally overshadows the core stuff. |
| 23:09 | tacoman | good to know. is there a way to get an email subscription to the dev newsgroup just to read, without having to send in the contributor's agreement and add yourself into the group? |
| 23:09 | tacoman | I'm curious, but I don't have enough experience to actually do much useful yet |
| 23:09 | TimMc | Monolithic contrib never should have happened -- it was a maintenance nightmare. |
| 23:13 | arohner | tacoman: you don't need a CA to read the dev newsgroup |
| 23:13 | arohner | you need a CA to submit patches |
| 23:13 | tacoman | well, I know it's on Groups, but I want it sent to my email. the form to do that asked if I'd signed an agreement |
| 23:14 | tacoman | I mostly wanted to make sure I wasn't wasting someone's time by filling that out without one |
| 23:36 | technomancy | TimMc: yeah, sorry I must have missed that in my explanation |
| 23:36 | technomancy | :dev-dependencies is replaced by :profiles |
| 23:36 | technomancy | TimMc: also: thumbs up on a rename |
| 23:44 | TimMc | technomancy: No, I mean lein-jit doesn't seem to work in 1.6.2 (and 1.7) anymore! |
| 23:44 | TimMc | Bah, I'll work on this tomorrow. |
| 23:44 | technomancy | oy |
| 23:44 | technomancy | hrm |
| 23:44 | TimMc | I even tried a checkout-dep. |
| 23:45 | technomancy | well 1.6.2 hasn't changed. =) |
| 23:45 | technomancy | wait, you mean using :plugins? |
| 23:45 | TimMc | Nope, when using :dev-dependencies |
| 23:45 | TimMc | Should I be using plugins instead? |
| 23:45 | technomancy | eventually |
| 23:53 | k9quaint | anyone used JDO in clojure? |