2012-07-24
| 00:30 | kauschovar | /q/uit |
| 01:45 | mtm | how do I type hint a method return type (say, in a deftype) when the method returns a non-primitive array? (for example an array of Foo) |
| 01:45 | adu | hi mtm |
| 01:46 | mtm | howdy adu |
| 01:47 | aphyr | mtm: array types don't actually exist in the JVM. |
| 01:47 | aphyr | It's just an Array. |
| 01:48 | aphyr | (covariant types are only enforced by javac and stripped due to type erasure) |
| 01:50 | mtm | hmm. okay, let me see if that makes the compiler happy |
| 02:02 | mtm | (^"[LFoo;" bar [this]) |
| 02:03 | aphyr | Seriously? I've always hinted mine as ^ArrayList, etc. |
| 02:03 | aphyr | Huh, new trick I guess. :) |
| 02:05 | mtm | I'm deftypeing an interface that has an overloaded method that only varies in the type of the arg and return type (same arrity). compiler kept barfing when I said the return type was an Array. But, hey, at least there's a way to do it :) |
| 02:15 | craigbro | awooo |
| 02:17 | yankov | are there any data structure servers in clojure (something similar to redis) ? |
| 02:22 | amalloy | aphyr: you're thinking of generic types like ArrayList; actual raw arrays do exist on the jvm |
| 02:48 | wingy | im using "lein cljsbuild auto" and the browser gives me error: GET http://localhost:3000/deps.js 404 (Not Found) |
| 02:48 | wingy | does anyone know what the issue is? |
| 03:06 | wingy | the compiled js file is working as expected, the only issue is that i get that error message above |
| 03:16 | ro_st | how do i get enlive to put a seq of content items (strings and nodes produced by defsnippet) into a node? |
| 03:16 | ro_st | (content) is ignoring everything past the first value in the seq, and (apply content seq) also only uses the first value |
| 03:18 | kral | namaste |
| 03:22 | ro_st | ah i was trying to use a string as a sequence. |
| 03:22 | ro_st | and it was trying to use the first element as a fn |
| 03:39 | ro_st | what's the right way to un-lazy a sequence? |
| 03:40 | ro_st | i guess (vec) will do |
| 04:12 | wingy | lein-cljsbuild rocks |
| 04:12 | wingy | so simple to use |
| 04:17 | ro_st | yup |
| 04:27 | wingy | and cljs works really smooth |
| 04:29 | ro_st | is it possible to use enlive's defsnippet without any transformations? |
| 04:39 | ro_st | good old (identity) does the trick |
| 04:39 | wingy | haha |
| 04:40 | wingy | cool fn |
| 05:04 | ro_st | wingy, did you grab the advanced example for cljsbuild and use that as a template? |
| 05:04 | ro_st | if not, i recommend doing so. phantomjs unit testing ftw |
| 05:04 | wingy | ro_st: no the simple one |
| 05:04 | wingy | ill look into that right now |
| 05:04 | wingy | i tried :advanced compiling but it broke my app |
| 05:04 | wingy | https://github.com/emezeske/lein-cljsbuild/blob/0.2.4/sample.project.clj |
| 05:04 | ro_st | we already have phantomjs set up on our CI mac mini so it was a no brainer to use |
| 05:06 | ro_st | https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/advanced/project.clj |
| 05:06 | wingy | ro_st: phantomjs is using node.js? |
| 05:06 | ro_st | so with this i'm developing with lein ring server, and lein cljsbuild auto dev |
| 05:06 | ro_st | and every now and then i lein cljsbuild once prod |
| 05:07 | ro_st | no, it's a headless webkit wrapper |
| 05:07 | ro_st | http://phantomjs.org/ |
| 05:08 | wingy | reminds me about http://zombie.labnotes.org/ |
| 05:08 | wingy | which is on node.js |
| 05:09 | ro_st | yeah |
| 05:09 | ro_st | nice thing about phantom is being able to do stuff like svg rendering |
| 05:09 | wingy | ro_st: your app still works on advanced compilation? |
| 05:09 | ro_st | because it's a full webkit, rather than a simulated js dom |
| 05:09 | wingy | i c |
| 05:10 | ro_st | yep, works |
| 05:12 | ro_st | it's about 90% crossover code (clj copied to cljs and then compiled) |
| 05:12 | ro_st | and the crossover code is well tested |
| 05:15 | wingy | ro_st: so you are using clj code in the browser? |
| 05:16 | ro_st | yup |
| 05:16 | ro_st | for the 'model' stuff |
| 05:16 | ro_st | where there's no dependency on external io |
| 05:16 | wingy | cool |
| 05:21 | ro_st | production js with gzip comes in at around 50kb |
| 05:21 | ro_st | not bad |
| 05:21 | ro_st | given that 100% of the page's code is in there |
| 05:22 | ro_st | debug js is 1.2mb :-) |
| 05:22 | ro_st | but only 200kb with gzip |
| 05:24 | otfrom | morning all |
| 05:25 | otfrom | anyone on who knows their way around counterclockwise? |
| 05:26 | alexyakushev | Something specific you are interested in? |
| 05:28 | otfrom | my teammate is trying to start up ccw and he's getting "Error: Could not find or load main class clojure.main" after it working all day yesterday |
| 05:29 | otfrom | I'm digging through google as well, but just wondering if it was an obvious thing |
| 05:33 | alexyakushev | Is it the same project he worked on yesterday? |
| 05:34 | otfrom | yes |
| 05:34 | cemerick | otfrom: Is this when running a project, or some error related to the functioning of the actual IDE/plugin? |
| 05:38 | alexyakushev | Oh, hi Chas! Any chance you can take a look at NREPL-22? I would just like to know if this could be expected in nREPL some day or making a special Android fork is better |
| 05:41 | ro_st | emezeske: how do i stop `lein ring server` from (or "destroying main-debug.js" "building main-debug.js as well as main.js")? |
| 05:41 | ro_st | it's a pain to have to poke the dev auto builder after restarting ring (due to fiddling with views.clj, for example) |
| 05:47 | cemerick | alex_baranosky: Yeah, I'll knock that out next time I'm in nREPL. Will probably parameterize the stack size so people can choose what to use on a per-app basis. |
| 05:53 | cemerick | alexyakushev: oh, I highlighted the wrong Alex. See above. ^^ Also, track http://dev.clojure.org/jira/browse/NREPL-8 instead. |
| 05:55 | otfrom | cemerick: got it fixed now. Getting our new intern to write up what he did. He did a re-install as a part of trying to fix it and came across some issues |
| 05:55 | otfrom | I've been running around so haven't had time to complete track it down |
| 05:55 | cemerick | otfrom: Sure, glad it's humming now. Definitely have him post to the ccw users ML. Laurent is on the ball. |
| 05:56 | cemerick | The latest ccw betas have been sublime. :-P |
| 05:59 | otfrom | they look quite good |
| 06:00 | ro_st | cemerick: when do you sleep? :-) |
| 06:02 | cemerick | ro_st: Nearly every night. ;-) |
| 06:02 | alexyakushev | cemerick: Thank you! I wasn't paying attention to NREPL-8. |
| 06:06 | sayyestolife | Hello. |
| 06:08 | Raynes | ro_st: He just gets up early. |
| 06:09 | Raynes | cemerick: The Emacs situation is getting much better thanks to nrepl and nrepl.el. |
| 06:09 | cemerick | Raynes: That's good. |
| 06:09 | sayyestolife | I'm using hiccup and I'm trying to create a form, with form-to, in which when I press submit I'd (with GET) the URL changes to localhost/?text=some_text and I'd like to have a url like localhost/some_text, instead. Is this possible? |
| 06:10 | cemerick | Raynes: better than SLIME yet? |
| 06:11 | Raynes | cemerick: In different ways. nrepl.el is not a hack, has actual releases, and is based on nrepl which is not a hack, and has actual releases. It'll get SLIME's features over time, and is already building up quite an arsenal. Like one patch away from everyone recommending SLIME users switch. |
| 06:11 | Raynes | cemerick: What I'm saying here is that you should use Emacs. k? |
| 06:11 | cemerick | heh :-D |
| 06:11 | cemerick | Sounds awesome. |
| 06:12 | cemerick | If you and technomancy start recommending the switch, then I will call nREPL a success and retire. |
| 06:12 | Raynes | Haha |
| 06:12 | Raynes | I'm already using it in place of SLIME. :D |
| 06:13 | cemerick | Emacs + viper + not-SLIME. Sacrilege. ;-) |
| 06:13 | Raynes | evil, dude. |
| 06:13 | Raynes | People who use viper need to get with the program. |
| 06:13 | cemerick | oh, sorry |
| 06:13 | cemerick | heh |
| 06:13 | Raynes | :P |
| 06:13 | Raynes | Anyways, I should probably sleep, given that I have a job and stuff. |
| 06:13 | Raynes | Later. |
| 06:13 | cemerick | Hopefully this means someone other than me will put together an nrepl-friendly cljs browser repl thingie. |
| 06:27 | ro_st | Raynes: did they manage a new release of nrepl.el earlier? |
| 06:29 | antoineB | hello how to reduce a list of ref? |
| 06:29 | antoineB | @(reduce #(ref (* @%1 @%2)) a) |
| 06:30 | antoineB | where it seems more natural to write (reduce #(* @%1 @%2) a) |
| 06:32 | stain | well, think oif every step of the reduce replacing %1 with the previous result |
| 06:32 | stain | and so if you call (deref) every time, you have to make a new ref |
| 06:33 | stain | well, think oif every step of the reduce replacing %1 with the previous result |
| 06:33 | stain | @(reduce #(ref (* @%1 @%2)) a) |
| 06:33 | stain | would work |
| 06:33 | antoineB | it works |
| 06:33 | stain | no |
| 06:33 | stain | (reduce #(* %1 %2) (map deref a)) |
| 06:34 | stain | map is lazy, so it won't deref early |
| 06:34 | antoineB | thanks you |
| 06:37 | stain | alternatively, deref the first element of the list to get started: |
| 06:37 | stain | (reduce #(* %1 @%2) (cons @(first a) (rest a))) |
| 06:37 | stain | but that is old-skool lisp |
| 06:39 | antoineB | thanks |
| 06:41 | ro_st | anyone using shoreleave? |
| 06:46 | augustl | can I read out leiningen profile values from my application? The use case is for different API URLs in dev and production. |
| 06:47 | ro_st | augustl: 12factor.net/config |
| 06:47 | augustl | ro_st: what about it? |
| 06:47 | ro_st | better to set env vars and use System/getenv to pull them into a your.app.config namespace (def CONFIG-VALUE (System/getenv "CONFIG_VALUE")) |
| 06:48 | augustl | I'm currently using env vars |
| 06:48 | ro_st | sorry, (def ^:dynamic CONFIG-VALUE (System/getenv "CONFIG_VALUE")), dynamic so you can rebind them in tests |
| 06:50 | augustl | ro_st: I'm currently using refs, I'll look up dynamic, never used that before |
| 06:51 | augustl | hmm it's not documented on http://clojure.org/special_forms#def |
| 06:51 | ro_st | http://clojure.org/vars |
| 06:51 | ro_st | so in my midje test ns's i have |
| 06:52 | ro_st | (background (around :contents (binding [config/CONFIG-VALUE "some-testing-value"] ?form))) |
| 06:52 | ro_st | causing midje's facts to run against a different config… new mysql/mongo databases, a testing git repo, paths to test files, etc |
| 06:53 | ro_st | leaving the production code entirely unaffected, and no production or staging configuration in the versioned codebase |
| 07:04 | ro_st | with enlive, is there a simpler way to define a static snippet with no transformations than this? |
| 07:04 | ro_st | (em/defsnippet s "file.html" ["div#thing div"] [] ["div"] identity) |
| 07:16 | sayyestolife | Using hiccup, how can one make form-to create a form action such that it contains values from other fields in the form? For example a text field with the value of foo should become a url of localhost/foo? |
| 07:16 | ambrosebs | Is there a HOF that takes any number of arguments and returns the first? Like (fn [a & rest] a) |
| 07:17 | ambrosebs | A normal function, rather |
| 07:35 | sayyestolife | Using noir, how can I match defpages which matches urls such as localhost/?foo=bar |
| 07:35 | sayyestolife | ? |
| 07:37 | stain | (comp first list) |
| 07:38 | ro_st | i don't think the url matcher considers querystring values, sayyestolife. those should appear in the params hash that your page handler receives |
| 07:39 | sayyestolife | okay |
| 07:40 | sayyestolife | where can I get that then ro_st? |
| 07:41 | ro_st | i have no idea :-) i've never used noir |
| 07:42 | sayyestolife | hmm ok! thanks anyway |
| 07:42 | ro_st | (defpage [:post "/todos"] {:keys [title due]} |
| 07:42 | ro_st | :keys [foo] |
| 07:42 | ro_st | then use foo in your defpage body |
| 07:43 | ro_st | http://webnoir.org/, 3rd getting started section |
| 07:43 | sayyestolife | hmmm okay |
| 07:47 | sayyestolife | the thing is though, I'm not using post, I'm using get |
| 07:47 | ro_st | "You just pass it a "route" and supply a destructuring form for the parameters of the request (basically, the GET or POST values)." |
| 07:47 | ro_st | so |
| 07:47 | ro_st | (defpage [:get "/woohoo"] {:keys [foo]} (print foo)) |
| 07:48 | ro_st | localhost/woohoo?foo=bar |
| 07:48 | ro_st | ; => "bar" |
| 07:48 | stain | sayyestolife: j just to check - any reason for query string? (like form submit?) |
| 07:50 | sayyestolife | stain: I don't mind either way, my issue is that I want the user to be able to enter a url in a text-input and then be able to share that url with other people (while I present some stuff on that url) |
| 07:50 | sayyestolife | perhaps query strings are a bad fit for this? |
| 07:51 | ro_st | for a single url, no |
| 07:51 | stain | no, query string are perfect for URLs |
| 07:51 | ro_st | unless you expect stupidly long urls |
| 07:51 | sayyestolife | ok, then my problem remains |
| 07:51 | stain | if you did /aboutPage/http://example.com/ instead then you would get trouble with /aboutPage/http://example.com/?fred=1337 |
| 07:52 | stain | as a query parameter it is easy to escape |
| 07:53 | sayyestolife | that is true, I'll stick with a query parameter |
| 07:53 | stain | I have a similar problem as my app navigates a REST resource, but I need different local resources depending on the remote resource |
| 07:54 | stain | like http://example.com/runs/inputs/?url=http://example.org/server/ |
| 07:54 | sayyestolife | ok, however I still have a problem on how to do a defpage which will "catch" this |
| 07:55 | stain | something strictly hierarchical like http://example.com/,http://example.org/server/,/runs/inputs got very silly |
| 08:02 | sayyestolife | nevermind I got it now |
| 08:03 | sayyestolife | (defpage [:get "/"] params) <- params is the query string map |
| 08:05 | ro_st | boom chicka wow |
| 08:09 | ro_st | holy crap i'm enjoying cljs |
| 08:09 | ro_st | compared to google closure javascript it's a dream come true |
| 08:10 | ro_st | i've got the core ui interaction of our app stitched together with enfocus actions and snippets and, like, 80 lines of glue |
| 08:12 | ro_st | 1414 lines of code all-in, including tests. simply amazing how expressive clojure is |
| 08:13 | ro_st | previous codebase is over 10kloc, excluding the tests |
| 08:21 | gfredericks | ro_st: I don't think I could go back |
| 08:29 | Cheiron | Hi, what would be a good way to append many lists/vectors together? |
| 08:30 | gfredericks | concat |
| 08:30 | gfredericks | if you have a list of lists/vectors you'll probably want (apply concat my-lists-and-vectors) |
| 08:32 | Cheiron | I have this scala code : (left ++ right ++ top) toArray . wondering how to map this to clojure |
| 08:32 | gfredericks | I suspect (concat left right top) |
| 08:32 | Cheiron | (.toArray (concat left right top)) ? |
| 08:33 | gfredericks | &(.toArray (concat [1] [2] [3])) |
| 08:33 | lazybot | ⇒ #<Object[] [Ljava.lang.Object;@dbb9b9> |
| 08:33 | gfredericks | oh wow I guess so |
| 08:34 | gfredericks | there's a clojure function for that though |
| 08:34 | gfredericks | &(apropos "array") |
| 08:34 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: apropos in this context |
| 08:34 | gfredericks | &(clojure.repl/apropos "array") |
| 08:34 | lazybot | ⇒ (parse-array object-array boolean-array long-array short-array char-array into-array float-array int-array double-array to-array-2d byte-array array-map make-array to-array emit-array-impls) |
| 08:34 | gfredericks | &(doc to-array) |
| 08:34 | lazybot | ⇒ "([coll]); Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collection.toArray()." |
| 08:35 | gfredericks | so to-array would probably be more idiomatic than .toArray |
| 08:35 | Cheiron | that is great, thanks! |
| 08:40 | magopian | guys, i'm kinda stuck on the problem 28 of 4clojure: http://www.4clojure.com/problem/28#prob-title (here's my attempt : https://friendpaste.com/63zwTYPpT5tkRxxxMWf412) |
| 08:41 | magopian | i'm pretty sure my attempt is not complete yet, but for the moment i'm trying to figure why the error, what it means |
| 08:46 | goodieboy | what's the recommended library for dealing with dates? I need to get the current time, minus 1 day etc.. |
| 08:47 | goodieboy | oh, clj-time looks nice |
| 08:49 | Frozenlock | goodieboy: That's what I use; works really well. |
| 08:50 | goodieboy | Frozenlock: yeah works nicely. How do you format dates? I want to extract just the yyyy-mm-dd from (now) |
| 08:53 | goodieboy | Frozenlock: ahh, the formatters namespace, nice |
| 09:03 | wingy | not easy to use external libs with cljs |
| 09:03 | wingy | someone here with experience in including jquery into the compliation set? |
| 09:03 | wingy | is that possible? |
| 09:19 | no7hing | am i right with my assumption that a not initialized var (def my-var) and a change at some later point, makes that same change thread-local? |
| 09:25 | ro_st | wingy: you use externs. and add it with its own script tag |
| 09:25 | ro_st | see https://github.com/shoreleave/demo-shoreleave-solr/blob/master/project.clj |
| 09:26 | ro_st | then you can do ($ "selector") |
| 09:26 | wingy | ro_st: im doing it atm with angularjs, bootstrap and jquery |
| 09:26 | wingy | its taking forever to parse |
| 09:27 | ro_st | you mean compile? |
| 09:27 | wingy | yeah |
| 09:27 | ro_st | :whitespace or :advanced? |
| 09:27 | wingy | advanced |
| 09:27 | wingy | :) |
| 09:27 | ro_st | advanced will take long. lots of static analysis and ast rewriting going on |
| 09:27 | wingy | yeah |
| 09:28 | ro_st | highly suggest using cljsbuild auto with a :whitespace config by default, and only working through :advanced prior to commit |
| 09:28 | wingy | yeah |
| 09:28 | wingy | i have to see if advanced works if i have all libs as externs |
| 09:29 | ro_st | try :simple ? |
| 09:29 | wingy | wanna use dead code elimination |
| 09:29 | ro_st | it's not as aggresive as advanced, but it does still do renaming, which will trigger externs |
| 09:30 | wingy | isn't that a must do with cljs since its using a lot of code underneath? |
| 09:30 | wingy | yeah but i think that the production code will have to use advanced compilation |
| 09:30 | wingy | so im testing it now |
| 09:31 | ro_st | only if you're dealing with performance issues. for developing new logic, whitespace only for sure |
| 09:34 | wingy | i hope it wont take 1 hour :) |
| 09:40 | ro_st | my advanced builds take 20 seconds from cold boot, 3 seconds when hot |
| 09:40 | ro_st | no externs, though. |
| 09:45 | djcoin | I have a sceptic question: why does Leiningen seems so simple in Clojure as opposed to Scala build tools (eg: sbt, buildr etc.) ? |
| 09:46 | sh10151 | well buildr is multilanguage |
| 09:46 | dgrnbrg | Hello clojurians, I'm seeing my lein freeze up while trying to collect dependencies--it seems that it can't access clojars over https through my proxy. Is there a non-https mirror of clojars? |
| 09:48 | S11001001 | dgrnbrg: same url |
| 09:48 | S11001001 | notwithstanding scheme :) |
| 09:49 | dgrnbrg | S11001001: my lein command times out, complaing that it could not transfer the artifacts for several deps, such as org.clojure/clojure 1.4.0, slingshot/slingshot 0.10.2, or org.clojure/core.logic 0.7.5 |
| 09:49 | dgrnbrg | which are all on clojars |
| 09:52 | S11001001 | dgrnbrg: yeah. Anyway, same url |
| 09:52 | dgrnbrg | S11001001: should this url exist? http://clojars.org/repo/org/clojure/clojure/1.+/clojure-1.+.pom |
| 09:52 | duck11231 | djcoin: leiningen was designed to *seem* simple (yet allowing power if you need it) |
| 09:53 | S11001001 | dgrnbrg: no |
| 09:54 | S11001001 | dgrnbrg: incidentally, you'll get spurious reports of failure if you couldn't retrieve from the proper location |
| 09:55 | dgrnbrg | S11001001: i'm only seeing lein try to fetch the clojure-1.+.pom urls--i never even see any other dependency urls get hit by lein2 |
| 09:55 | S11001001 | dgrnbrg: clojure is not hosted at clojars; you get it from maven central |
| 09:55 | dgrnbrg | (i'm watching the proxy logs) |
| 09:55 | djcoin | duck11231: yeah I guess so and that's great - but I don't understand why other build tool in scala, namely sbt, seems so complicated and daring |
| 09:55 | djcoin | I know I should rather go and ask :] |
| 09:55 | dgrnbrg | S11001001: but i don't see mvn central gitting hit for 1.4.0 |
| 09:56 | wingy | ro_st: im realized that externs is not what i want since the lib code is not compiled .. not much to gain for waiting for an hour or so :) |
| 09:56 | S11001001 | dgrnbrg: do you mean these +s literally or as some placeholder? |
| 09:56 | wingy | wish that jquery would work with advanced mode |
| 09:56 | pepijndevos | For the Python users in here: https://github.com/HackerSchool12/perper Clojure is fast. |
| 09:57 | ro_st | wingy: it does. externs tells the compiler that all the symbols in this externs files must not be renamed |
| 09:57 | ro_st | thereby allowing compiled code to call out to uncompiled code in the same page |
| 09:57 | ro_st | eg, jquery |
| 09:58 | dgrnbrg | S11001001: I actually see "+" in the fetched urls |
| 09:58 | S11001001 | dgrnbrg: look in your ~/.m2 to see what you have already |
| 09:58 | wingy | ro_st: i know .. but the jquery file itself is outside the compilation and not compiled |
| 09:58 | ro_st | correct |
| 09:58 | ro_st | were you trying to compile it in? |
| 09:58 | wingy | no |
| 09:59 | wingy | just using externs .. but then i thought maybe that is not what i want |
| 09:59 | wingy | maybe it would be better if i could compile jquery with my code |
| 09:59 | wingy | so there would be dead code elimination |
| 09:59 | dgrnbrg | S11001001: good call--that got it to hit |
| 09:59 | scriptor | wingy: jquery by itself isn't google closure compatible, I think |
| 09:59 | scriptor | so you might not be able to use advanced optimizations on it |
| 09:59 | wingy | scriptor: yeah doesn't seem to be |
| 10:00 | wingy | ok so my only bet is using externs |
| 10:00 | ro_st | yes |
| 10:00 | wingy | or whitespace :) |
| 10:00 | ro_st | you don't want to subject end users to whitespace |
| 10:00 | ro_st | mine is 1.2mb |
| 10:01 | wingy | scriptor ro_st : but even if jquery could be compiled would that be a good thing to do? i am thinking about caching |
| 10:01 | wingy | and CDNs |
| 10:01 | dgrnbrg | S11001001: apparently, it's able to fetch all the dependencies, but then it appears to choke and say that it couldn't find the deps after it times out |
| 10:01 | dgrnbrg | so it never actually launches |
| 10:01 | ro_st | for jquery specifically, i'd say keep it out |
| 10:01 | wingy | yeah .. lets not compile libs |
| 10:02 | ro_st | some libraries would benefit from compilation, which is what projects like c2 are about |
| 10:02 | scriptor | yea, ideally you'd just need closure's framework anyway |
| 10:02 | wingy | scriptor: im using bootstrap and it's using jquery :( |
| 10:02 | wingy | or i would have used google closure instead now when im on cljs |
| 10:02 | S11001001 | dgrnbrg: poms aren't jars? |
| 10:03 | dgrnbrg | S11001001: sorry, it fetchs the poms & the jars--i just realized that it might be another component that i need to investigate |
| 10:03 | scriptor | wingy: yea, then just using jquery as an extern might be the way to go |
| 10:03 | nDuff | wingy: Huh? You can still use the Closure Compiler with jQuery. |
| 10:03 | nDuff | wingy: ...it just has to be an extern. |
| 10:03 | ro_st | jquery has been hand optimised. closure compiler is just going to wreck it |
| 10:04 | nDuff | wingy: ...jayq will pretty much automate that, and is the sane thing to be using anyhow. |
| 10:04 | scriptor | nDuff: right, he was asking about actually compiling jquery so you wouldn't need to use it as an extern |
| 10:04 | wingy | nDuff: i know but having jquery already loaded makes me wanna use it instead since bootstrap and angularjs is using it |
| 10:04 | nDuff | ro_st: yes, but you don't run the jQuery library through the compiler; that's silly. |
| 10:04 | nDuff | wingy: ...so use it! |
| 10:04 | nDuff | wingy: I'm using jqayq as an accessor to an already-loaded external jQuery library and it works perfectly fine. |
| 10:05 | nDuff | wingy: ..._with_ my code being compiled with advanced optimizations. |
| 10:05 | wingy | ok then .. externs it is .. tonight when im sleeping .. will take like 2 hours to extern jquery, angularjs and bootstrap :) |
| 10:05 | nDuff | wingy: jQuery already has an externs file available. |
| 10:05 | nDuff | wingy: ...as part of jayq, which is part of why folks have been advising that you use it. |
| 10:06 | ro_st | i'm not getting what's taking 2 hours |
| 10:06 | ro_st | it should be a couple seconds difference bringing externs in |
| 10:06 | ro_st | unless you're keeping a 286 busy |
| 10:07 | nDuff | ro_st: ...well, I gather it's actually writing the externs file being discussed |
| 10:07 | ro_st | how? externs have to be hand written afaik |
| 10:07 | nDuff | Exactly. |
| 10:07 | wingy | :externs [ |
| 10:07 | wingy | "resources/public/app/lib/jquery/jquery.min.js" |
| 10:07 | wingy | "resources/public/app/lib/angular/angular.min.js" |
| 10:07 | wingy | "resources/public/app/lib/angular/angular.resource.min.js" |
| 10:07 | wingy | "resources/public/app/lib/bootstrap/bootstrap.min.js" |
| 10:07 | wingy | ] |
| 10:07 | ro_st | nooo. externs are not the libraries themselves |
| 10:07 | wingy | is that correct? |
| 10:07 | nDuff | There's metadata expected to exist in the externs. |
| 10:07 | wingy | ro_st: it could be |
| 10:08 | nDuff | wingy: no, it's not correct. |
| 10:08 | ro_st | they are stub lists of the public api of same |
| 10:08 | nDuff | wingy: ...the jQuery externs file, in particular, has a lot of typing metadata for use by the compiler. |
| 10:09 | ro_st | for example: http://code.google.com/p/closure-compiler/source/browse/trunk/contrib/externs/jquery-1.3.2.externs.js?r=66 |
| 10:09 | hcastro | can someone help me understand how to convert a map to a variable number of arguments? https://gist.github.com/3170082 |
| 10:09 | S11001001 | hcastro: apply hash-map |
| 10:09 | ro_st | hcastro: (fn 1 2 3) = (apply fn [1 2 3]) |
| 10:10 | ro_st | wingy: this need for externs is one of the big reasons people don't use gclosure. it's a bloody pain in the ass to use 3rd party javascript |
| 10:10 | nDuff | hcastro: ...or do you mean you want them destructured for you? |
| 10:10 | nDuff | hcastro: it's not clear to me what you're asking. |
| 10:11 | hcastro | nDuff: line 15 and 16 of the gist is what i'd like to accomplish |
| 10:11 | wingy | ro_st nDuff : "You can either create an externs file manually, or if you're willing to put up with some warnings, you can use the library as its own externs file, as is demonstrated below." |
| 10:11 | wingy | from http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html |
| 10:11 | nDuff | wingy: it's only sometimes just "some warnings" |
| 10:11 | hcastro | nDuff: line 12 is how it expects arguments, 7 and up is accepting function |
| 10:11 | nDuff | wingy: ...not at all a safe thing to assume. |
| 10:11 | ro_st | yeah |
| 10:12 | wingy | then it seems externs is a tedious way to make it work |
| 10:12 | wingy | :( |
| 10:12 | wingy | ill try it later tonight though |
| 10:12 | nDuff | wingy: ...but if someone else has already done the tedious work, why are you complaining? |
| 10:12 | wingy | since im using angularjs and bootstrap as well |
| 10:14 | wingy | and tedious work is tediuos work is always bad .. not a winner no matter who is doign the boring job |
| 10:14 | nDuff | *shrug*. |
| 10:15 | nDuff | wingy: If you dig to the bottom of the huge pile of hardware and software you're using right now, there's no end of tedious work other people have done involved in it. |
| 10:15 | nDuff | hcastro: (apply your-fn (apply concat {:a 1 :b 2})) |
| 10:16 | wingy | so we need to know the boring parts and make it fun |
| 10:16 | wingy | doesn't mean complaining |
| 10:16 | wingy | just not ignoring |
| 10:18 | nDuff | wingy: It's not my problem to worry about whether it's boring to optimize the bus line routes in the hardware. Why is it your problem to avoid using tools where other people have had to do tedious work to enable them? |
| 10:18 | wingy | nDuff: didn't i just mention that am using other libs as well? |
| 10:18 | nDuff | Sure. |
| 10:18 | nDuff | So, the tedious work for those might have to be done -- but if you share the results, it has to be done _once_. |
| 10:18 | wingy | ill check on jayq but i think i still need to extern the other ones |
| 10:19 | nDuff | *nod*. |
| 10:20 | ro_st | wingy: angular for its bindings? |
| 10:20 | ro_st | there's this |
| 10:20 | ro_st | http://shoreleave.github.com/shoreleave-pubsub/ |
| 10:21 | ro_st | which allows you to create topics (publishers) and subscribe damn near anything to it |
| 10:21 | ro_st | perfect for modelling the flow of data around a js app without writing loads of cruddy boilerplate |
| 10:21 | wingy | ill check it out |
| 10:22 | nDuff | Hmm. |
| 10:22 | wingy | i like angularjs's doc and ease of use .. good to have a pattern to follow as well |
| 10:23 | wingy | and pretty cool concept to extend the html with dynamic features |
| 10:23 | wingy | in just 2 days i have a really professional website .. and i don't even know that much still :) |
| 10:23 | wingy | also its using bootstrap .. perfect match |
| 10:24 | wingy | also really good integration testing |
| 10:24 | ro_st | unfortunately ohpauleez released it right before becoming ludicrously busy at work |
| 10:25 | wingy | an example: http://angular.github.com/angular-phonecat/step-8/test/e2e/runner.html |
| 10:25 | wingy | never used such great browser testing framework before |
| 10:25 | sh10151 | style question for you guys... regarding "optional" arguments... |
| 10:26 | sh10151 | which is better, (func :opt1 "thing" :opt2 "other") or (func {:opt1 "thing" :opt2 "other"}) |
| 10:26 | sh10151 | i tend to think the first but it could be my CL bias |
| 10:27 | S11001001 | sh10151: perhaps you should exploit the fact that a map cannot possibly be confused at runtime for a keyword |
| 10:28 | sh10151 | What do you mean? |
| 10:29 | sh10151 | the other wrinkle is that some values in the optional arguments are themselves going to be maps |
| 10:31 | ro_st | i like the former |
| 10:31 | dgrnbrg | I've isolated a problem w/ lein2, my proxy, and seesaw. If I include any version of seesaw in my project.clj, it only fetches the seesaw pom and never actually gets the jars, so lein just hangs. If I omit seesaw, lein can fetch every other dependency from clojars and maven central. Any idea why seesaw would cause this behavior as a dep? |
| 10:32 | wmealing | is your project on github ? |
| 10:33 | dgrnbrg | wmealing: it's proprietary :( |
| 10:33 | wmealing | can you reproduce on a smaller project ? |
| 10:33 | S11001001 | sh10151: (fn self ([] (self {})) ([{:keys [...]}] real-impl) ([k v & o] (self (apply hash-map k v o)))) |
| 10:33 | dgrnbrg | if i change the seesaw version to 1.4.{0,1,2,3} i can see it fetch the pom in lein's output, but then it pauses |
| 10:34 | dgrnbrg | could it perhaps be that seesaw depends on an unrearchable package/ |
| 10:34 | sh10151 | S11001001: ah, I see, so both can be supported |
| 10:34 | sh10151 | S11001001: i like it |
| 10:34 | hcastro | nDuff: thank you |
| 10:34 | wmealing | it may be |
| 10:34 | wmealing | if you can put it on git |
| 10:35 | wmealing | i'll test |
| 10:35 | wmealing | how about that |
| 10:35 | dgrnbrg | that's not possible because of the proxy at my workplace |
| 10:35 | dgrnbrg | or at least, it's a pia |
| 10:36 | S11001001 | dgrnbrg: you could tar a sample project, base64-encode it, and paste that on a paste service |
| 10:36 | dgrnbrg | let me see if i can repro |
| 10:36 | S11001001 | can't promise that wmealing will be willing to do the reverse |
| 10:36 | S11001001 | can promise I'm not :) |
| 10:37 | dgrnbrg | it fails if i just do lein2 new, then add [seesaw "1.4.0"] as a dep |
| 10:37 | wmealing | heh |
| 10:37 | wmealing | that was what i wanted to know, but im lazy |
| 10:37 | wmealing | and a github clone would b equicker |
| 10:37 | wmealing | give me a moment |
| 10:39 | wmealing | ok, i have confirmed it works for new projects |
| 10:39 | wmealing | http://pastebin.com/cCiU0JAA |
| 10:39 | wmealing | so, why would your work proxy block a package |
| 10:39 | nDuff | wmealing: ...in the future, would you mind using a pastebin w/o all the ads? gist.github.com is a great one; pastebin.com is really awful to anyone not running an adblocker. |
| 10:39 | wmealing | thats odd |
| 10:40 | wmealing | nDuff, sure.. i'll remember that |
| 10:40 | dgrnbrg | wmealing: i am crossing an ntlm proxy w/ cntlm, which works for everything else |
| 10:40 | dgrnbrg | and i see that all the deps you got were from clojars and central, which work for me |
| 10:40 | wmealing | i keep forgetting as i do run one |
| 10:40 | wmealing | dgrnbrg, hmm.. |
| 10:40 | wmealing | tcpdump can you find anything timing out ? |
| 10:41 | dgrnbrg | wmealing: i can watch my proxy log, but i don't have sudo |
| 10:41 | wmealing | that sounds horrible |
| 10:42 | dgrnbrg | wmealing: i can see it connecting to clojars and centrol |
| 10:42 | wmealing | nothing "times out" |
| 10:42 | clojurebot | @ has nothing to do with whether sth is evaluated or not |
| 10:43 | dgrnbrg | wmealing: nothing is timing out |
| 10:58 | locojay | hi i m getting No protocol method ISeqable.-seq defined for type object: [object NodeList] when tring to acces first elem of a Nodelist. what lib should which define's these |
| 11:00 | elliottw | what's the easiest way to get the middle items in a list? is there something equiv to last-1? |
| 11:01 | hyPiRion | elliottw: middle items? |
| 11:02 | hyPiRion | like, all items but the last one? |
| 11:02 | elliottw | hyPiRion so i want to do something with the first item, the last item, and then put them back in teh list |
| 11:02 | elliottw | something like (join (first foo) (middle foo) (last foo)) |
| 11:03 | elliottw | but if i don't know the length of foo, i thought maybe there was something really simple i'm just missing |
| 11:03 | hyPiRion | What kind of structure is foo? Is it a list or a vector? |
| 11:04 | tmciver | elliottw: for last-1: (last (butlast your-list)) |
| 11:04 | locojay | c2 seems to have all of this |
| 11:04 | elliottw | tmciver butlast is what i was looking for… thanks man(er woman) |
| 11:05 | hyPiRion | If it's a vector, then I'd do something like this: |
| 11:05 | tmciver | elliottw: ha! you're welcome . . . man. |
| 11:06 | hyPiRion | (let [n (dec (count foo))] (assoc foo 0 (f1 (foo 0)) n (f2 (foo n)))) |
| 11:07 | hyPiRion | Where foo is the vector, f1 is the operation on the first element, f2 is the operation on the last element. |
| 11:09 | hashpuppy | I posted this in here late last night and got a few responses. I thought I'd try again once more, this morning. If you could, I've created a very brief productivity poll that aims to query members of the Scala, Haskell, and Clojure community: https://docs.google.com/spreadsheet/viewform?pli=1&formkey=dGZpbHExdHZteXY4VkpaRnBQUzRPRHc6MQ#gid=0 |
| 11:12 | hyPiRion | hashpuppy: I drink a lot of tea, you should consider other kinds of caffeine next time you do this survey ;) |
| 11:12 | hyPiRion | I'll convert it into cups of coffee. |
| 11:12 | hashpuppy | thank you |
| 11:13 | hyPiRion | May I ask what it is for? Is it of pure interest? |
| 11:14 | stain | I can tell you, in 27 degrees productivity drops! |
| 11:14 | stain | hashpuppy: I don't exercise per day, but per week, I am not sure what to reply |
| 11:15 | _nmmn | i dont meditate, now sure if 5+ means, i dont do it |
| 11:15 | wingy | does anyone know why i get: GET http://localhost:3000/deps.js 404 (Not Found) in the browser |
| 11:15 | wingy | im using "lein-cljsbuild" |
| 11:15 | wingy | with whitespace compilation |
| 11:16 | hashpuppy | hyPiRion: pure interest. stain: i should have put more thought into that question for that situation. |
| 11:16 | mtkoan | wingy: no optimzations, right? |
| 11:17 | wingy | mtkoan: only removing whitespace and comments |
| 11:17 | stain | I went for the first option.. but I do 75 minutes once or twice a week |
| 11:17 | mtkoan | wingy: https://www.refheap.com/paste/3764 |
| 11:18 | mtkoan | you need to set CLOSURE_NO_DEPS = true; when not using optimzations |
| 11:18 | hyPiRion | hashpuppy: Cool. If you get an interesting result, you should write about it. :) |
| 11:18 | hashpuppy | definitely |
| 11:19 | mtkoan | excercise is so important for my programming ;) |
| 11:20 | wingy | mtkoan: cool it worked |
| 11:20 | wingy | do you guys prefer using jQuery or GClosure? |
| 11:21 | wingy | seems that knowing your way around GClosure could be great when using cljs |
| 11:21 | mtkoan | I use both, *shrug* |
| 11:22 | dhkl | wingy: without the closure compiler, the generated js is kind of huge :-) |
| 11:22 | wingy | mtkoan: what do you think about each of them? |
| 11:23 | wingy | dhkl: yepp |
| 11:23 | Bronsa | http://blog.datomic.com/2012/07/datomic-free-edition.html |
| 11:23 | mtkoan | wingy: I like jq because there are tons of ready-made plugins for me to use, and fancy UI effects |
| 11:23 | mtkoan | also jayq: https://github.com/ibdknox/jayq |
| 11:25 | wingy | mtkoan: why are you using GClosure? |
| 11:25 | wingy | with that i mean the library part |
| 11:31 | mtkoan | wingy: the goog.net namespace, listening for history state changes (goog.history) |
| 11:33 | mtkoan | http://closure-library.googlecode.com/svn/docs/class_goog_net_XhrIo.html for ajax |
| 11:34 | gtrak | anyone know a clojure hadoop dfs wrapper? |
| 11:40 | llasram | gtrak: Most people -- including myself -- do most of our hadoopery via Cascalog. Raw HDFS access all I've seen is pure interop w/ the Java API. Which honestly isn't all that bad |
| 11:40 | llasram | s,do,seem to do, he qualified |
| 11:56 | cljr | does anyone here have experience deploying clojure on heroku? |
| 11:58 | mknoszlig | cljr: does their tutorial not work for you? |
| 11:59 | cljr | mknoszlig: unfortunately no. when I try to run foreman start I get "exited with code 0" as an error |
| 11:59 | cljr | I'm running a pretty basic compujure stack |
| 11:59 | mknoszlig | cljr: lein 2? |
| 11:59 | cljr | and i can do lein run -m app.core and it works fine... |
| 12:00 | cljr | mknoszlig: lein 1.7.1 |
| 12:00 | mknoszlig | cljr: ok, by the book :) |
| 12:01 | mknoszlig | cljr: and lein run -m ... works while lein trampoline run -m ... doesn't? |
| 12:03 | ro_st | where's the right place to see what's coming up in clojure 1.5? |
| 12:04 | cljr | mknoszlig: both run fine from command line, neither work via foreman start |
| 12:04 | stuarthalloway | ro_st: featurewise, if it isn't done (in JIRA) or designed (in Confluence) already, unlikely to be in 1.5 |
| 12:04 | stuarthalloway | the big thing is reducers |
| 12:05 | wingy | i have this project.clj https://www.refheap.com/paste/3765 and im following https://github.com/emezeske/lein-cljsbuild/blob/0.2.4/doc/CROSSOVERS.md but i get: WARNING: Unable to find crossover: yobistore.crossover |
| 12:05 | Cheiron | Hi, i'm facing this situation: extract some code into private functions (defn-) or define them as closures inside let form . the method that contains this let form is going to be called many many times |
| 12:06 | Cheiron | closures inside let form are really neat but since the function is going to be called many many times, am i going to face memory issues? |
| 12:07 | mknoszlig | cljr: hm, i have no experience with foreman unfortunately, but i'm guessing there should be a way to get more information on what went wrong inside foreman... |
| 12:07 | cljr | mknoszlig: yeah, its gotta be something small, thanks for the attempt |
| 12:07 | mknoszlig | cljr: sorry i couldn't really help, good luck though :) |
| 12:10 | technomancy | cljr: are you seeing it fail when deployed, or just locally with foreman? |
| 12:11 | technomancy | there's honestly not much point to using foreman locally |
| 12:18 | cljr | technomancy: sorry, its failing at both places |
| 12:19 | cljr | technomancy: figured that it might not matter failing locally so I went straight to heroku like you are suggesting and it gives me a message when I check the process that it "starting for 24s...", etc |
| 12:19 | technomancy | cljr: if you /msg me the app name I can take a closer look |
| 12:27 | wingy | regarding why i got: WARNING: Unable to find crossover: yobistore.crossover was because i changed "src" folder to "src-clj" |
| 12:27 | wingy | just switched it back and it works great |
| 12:27 | wingy | crossover is so cool |
| 12:59 | gtrak | llasram: yes, that's what I've settled on I think |
| 12:59 | gtrak | thanks |
| 12:59 | emezeske | wingy: When you changed src to src-clj, did you update the :source-path (or :source-paths) option in your project.clj? |
| 12:59 | wingy | emezeske: i did |
| 13:00 | wingy | weird it still didn't work |
| 13:01 | emezeske | Hmm.. lein-cljsbuild looks for crossovers anywhere in the classpath, and the main :source-path should always be in the classpath. That's weird. |
| 13:01 | emezeske | I use src-clj in my own projects, and it works there. |
| 13:15 | dnolen | Datomic free edition looks pretty sweet, anybody played around with it yet? |
| 13:23 | goodieboy | how do you go through each line from a stream reader? |
| 13:25 | siscia | emezeske, mk, this help me figure out http://www.mrgunnar.net/ap.cfm?subpage=348270 |
| 13:26 | siscia | emezeske, mk, this help me figure out (I mean this other one...dammed clipboard) http://david-mcneil.com/post/16535755677/clojure-custom-map |
| 13:26 | cemerick | dnolen: FD looks pretty killer. Great work. :-) |
| 13:29 | ToxicFrog | goodieboy: line-seq? |
| 13:29 | goodieboy | ToxicFrog: ok gotcha! |
| 13:29 | gerunddev | goodieboy: Wrap your stream in a BufferedReader then do line-seq |
| 13:30 | goodieboy | gerunddev: is that io/reader ? |
| 13:30 | gerunddev | goodieboy: Yes |
| 13:30 | goodieboy | cool ok thanks! |
| 13:30 | gerunddev | ,(doc line-seq) |
| 13:30 | clojurebot | "([rdr]); Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader." |
| 13:31 | goodieboy | gerunddev: so i could be able to (for example) call (take 1 (line-seq rdr)) lazily? |
| 13:32 | gerunddev | goodieboy: Yeah I did that the other day to skip the first line of a csv :) |
| 13:32 | gerunddev | sorry (drop 1 (line-seq rdr)) is what I did, but yeah both work |
| 13:32 | goodieboy | gerunddev: ok perfect |
| 13:40 | dnolen | cemerick: thanks! yes I think it makes core.logic applicable to a much larger set of problems. It's also pretty extensible - possible to add new solvers, new constraint types |
| 13:42 | dnolen | cemerick: 0.8 will probably also be followed by a considerable amount of documentation. |
| 13:46 | goodieboy | gerunddev: weird, do you know what would cause with-open to never return? |
| 13:57 | goodieboy | this never returns, why? (with-open [rdr (io/reader my-stream)] (doseq [l (take 10 rdr))) |
| 13:57 | goodieboy | oops sorry, i meant to wrap the rdr with line-seq in the take |
| 13:58 | goodieboy | (with-open [rdr (io/reader my-stream)] (doseq [l (take 10 (line-seq rdr)))) |
| 14:02 | ro_st | dnolen: enjoyed your talk! def going to give core.logic a gander |
| 14:02 | ro_st | another reason to put some time into The Little Schemer, as well |
| 14:02 | clojurebot | learning a new runtime is much harder than learning a new language. |
| 14:02 | ro_st | amen to that |
| 14:04 | dnolen | ro_st: thanks! it's fun stuff. I have some new ambitious optimization ideas floating around post-0.8 which I'm looking forward to exploring. |
| 14:04 | ro_st | and the wedding seating planner is actually a really good example |
| 14:06 | dnolen | ro_st: heh yes :) I think there's a lot of stuff like that actually. You kind of have to get your head into the declarative mindset to see the applications. |
| 14:07 | ro_st | is there some sort of koan style exercise that one can work with to get one's feet wet? |
| 14:07 | ro_st | the core.logic TodoMVC |
| 14:08 | dnolen | ro_st: there is a unfinished core.logic koans thing, but nothing really comprehensive. I hope to address some of that w/ 0.8 documentation push. |
| 14:08 | ro_st | awesome |
| 14:09 | ro_st | i'm well into cljs now. really enjoying it. being able to actually read and debug the whitespace-mode js is quite helpful |
| 14:10 | ro_st | dnolen: how do you code in black and white?! |
| 14:10 | ro_st | or was that for the preso |
| 14:10 | dnolen | ro_st: just for presentation |
| 14:10 | duck11232 | Which is less optimization, whitespace or simple? I thought it was whitespace, but simple seemed more readable in my tests |
| 14:10 | dnolen | duck11232: whitespace is less optimization. |
| 14:10 | ro_st | whitespace |
| 14:11 | ro_st | which is really just a concatenation of the generated cljs->js source |
| 14:11 | ro_st | simple does renaming and some other things, and advanced does the full monty with static analysis, inlining, dead-code removal, etc |
| 14:12 | ro_st | so nice to do gclosure without having any deps.js hopscotchery |
| 14:17 | dgrnbrg | what does the :repo-manager key do in repositories in leiningen? |
| 14:18 | technomancy | dgrnbrg: not entirely sure what the effect is, but it's intended to be set for things like nexus and archiva where a single repo proxies to a bunch of others |
| 14:18 | duck1123 | ok, comparing the 2 outputs, simple outputs varialbe names like 'a' as opposed to 'temp__3971__auto___7041'. I think I'll stick with simple |
| 14:18 | pandeiro | how would i access functions from one of my project's namespaces using light table & lein-light? it doesn't seem to work with namespaced symbols ie (foo.core/my-func 1 2 3) |
| 14:18 | dgrnbrg | technomancy: i am trying to set up nexus locally, but i find that when i add it as a mirror w/ or w/o the repo-manage key, lein just hangs. If i remove it as a mirror, all is well. Any idea? |
| 14:20 | technomancy | that kind of stuff is handled deep inside aether, so I don't think we have much control over it unfortunately |
| 14:20 | technomancy | dgrnbrg: cemerick might know though |
| 14:21 | dgrnbrg | technomancy: thanks! i'm trying to figure out this whole deployment thing, but it's tricky |
| 14:21 | cemerick | dnolen: that it's all available in cljs makes things even more interesting :-) |
| 14:22 | technomancy | dgrnbrg: yeah, supposedly switching to something like nexus should be transparent |
| 14:22 | dnolen | cemerick: haha well not yet :) but soon |
| 14:23 | cemerick | dnolen: oh? I thought you were keeping it ambivalent re: clj v. cljs all along? |
| 14:23 | cemerick | dgrnbrg, technomancy: know what? |
| 14:23 | dnolen | cemerick: no, they are slightly different for now. |
| 14:24 | cemerick | Noted. |
| 14:24 | cemerick | plv8 has prompted me to noodle on all sorts of potential cljs database insanity. |
| 14:25 | technomancy | I was wondering how long it would take for that to happen =) |
| 14:26 | dgrnbrg | cemerick: maybe you know what :repo-manager does when passed to a mirror in lein? |
| 14:26 | cemerick | technomancy: Just noodling, still. Heroku postgres doesn't support plv8 yet. ;-) |
| 14:27 | cemerick | dgrnbrg: I'm not entirely clear, myself. IIRC, I left it undocumented for that reason in pomegranate. |
| 14:27 | dgrnbrg | lol |
| 14:27 | dgrnbrg | :) |
| 14:27 | dgrnbrg | well, i hope to get something mostly working soon |
| 14:27 | cemerick | dgrnbrg: what are you trying to do? |
| 14:28 | dgrnbrg | cemerick: i'm trying to set up an internal nexus, and get lein to push to it, and also get the nexus to proxy central & clojars, and i have to do everything through cntlm, which is an ntlm->http proxy bridge |
| 14:28 | dgrnbrg | ugh |
| 14:29 | dnolen | CLJS users- we have a big REPL enhancement patch - http://dev.clojure.org/jira/browse/CLJS-138 - would like to hear if this works for folks. |
| 14:29 | cemerick | dgrnbrg: I had the exact same setup until recently, modulo the HTTP proxy. Stuff "just worked". |
| 14:29 | ro_st | i haven't quite gotten to using the repl in cljs yet |
| 14:30 | dgrnbrg | cemerick: i have never used nexus |
| 14:30 | dgrnbrg | i think nexus can walk the proxy |
| 14:30 | ro_st | is it possible to cljs repl from within emacs? |
| 14:30 | dgrnbrg | but when I add the nexus as a :mirror, it hangs |
| 14:30 | ro_st | i don't think i could live without all the clojure-mode and paredit toys |
| 14:30 | dgrnbrg | it == lein |
| 14:30 | dgrnbrg | Is there a way to have lein deploy not require a gpg key? |
| 14:30 | cemerick | dgrnbrg: are you using the proxy, or is the nexus? |
| 14:31 | hiredman | speaking of clojurescript, how do people distribute clojurescript libraries, as jars? |
| 14:31 | dnolen | hiredman: yes |
| 14:31 | dgrnbrg | cemerick: i have set up lein to..ooh |
| 14:31 | dgrnbrg | i need to have lein not proxy to that host |
| 14:31 | dgrnbrg | hmm |
| 14:31 | pandeiro | ro_st: yes it's possible |
| 14:32 | dgrnbrg | how do i communicate proxy host exclusions to aether through lein? |
| 14:32 | hiredman | I have a clojurescript drawbridge client (nrepl over http) but I need to remove the use of jquery and get it working with the google closure ajax bits |
| 14:32 | pandeiro | i use dnolen's method of setting the inferior lisp program to the cljs repl invocation and voila |
| 14:32 | ro_st | pandeiro: got a link? |
| 14:33 | ro_st | and, (probably asking for a lot now), is it possible to have both a jvm repl and a cljs repl running in emacs at the same time? |
| 14:33 | ro_st | or does it not make sense to do so |
| 14:33 | mtkoan | ro_st: sure |
| 14:33 | hiredman | that and my also unreleased cljs compiling middleware for nrepl make embedding clojure and cljs code evaluation in a browser pretty nice |
| 14:33 | jweiss | is there another way to test if a symbol resolves to a var other than (try (resolve sym) (catch Exception _ nil)) ? |
| 14:34 | mtkoan | run the jvm repl with swank, and the cljs one as inferior-lisp process |
| 14:34 | pandeiro | ro_st: yes it's possible, and the cljs repl is in my-clojure.el here: https://github.com/pandeiro/dotemacs |
| 14:34 | pandeiro | what mtkoan said |
| 14:35 | duck1123 | ro_st: if you run the cljs repl using inferior-lisp, you should get most of the functionality you want |
| 14:35 | ro_st | yummy |
| 14:35 | ro_st | thanks guys |
| 14:35 | ro_st | this shit is NINJA |
| 14:35 | ro_st | :-) |
| 14:36 | mtkoan | pandeiro: wow I think my .emacs.d is a mess now |
| 14:36 | ro_st | brb, re-putting 2year old to bed :-/ |
| 14:36 | duck1123 | I haven't found the cljs repl all that useful IMO. I prefer the firebug repl for most things |
| 14:36 | pandeiro | mtkoan: mine is totally outdated looking at it now... |
| 14:36 | pandeiro | duck1123: it's nice w/ a tiling wm that you can set up so the repl is right under the browser where firebug/chrome inspector would be |
| 14:39 | hiredman | duck1123: in theory you could write an extension that added a clojurescript repl to firebug, you would just need to run the compiler as a service |
| 14:39 | cemerick | except that in-browser tools are, almost by definition, bad |
| 14:40 | duck1123 | hiredman: I've been trying to get the reverse working well for me. (pulling firebug/js console into emacs) |
| 14:40 | pandeiro | cemerick: even chromium's inspector? i find it pretty good |
| 14:40 | dnolen | duck1123: I'd prefer that people help wrap up source maps :) |
| 14:41 | technomancy | duck1123: via mozrepl? |
| 14:42 | cemerick | pandeiro: Well, I was fundamentally talking about tools for interacting with code (editors/REPLs/debuggers/etc). Inspectors are occasionally handy, but definitely auxiliary for me. |
| 14:42 | duck1123 | technomancy: That's what I tried. I got it working a little bit, but then my attentions went elsewhere. |
| 14:42 | cemerick | pandeiro: Critical for the DOM and such though, that's for sure. |
| 14:43 | pandeiro | cemerick: yeah i find the autocomplete essential as the browser APIs have become too enormous for me to keep track of |
| 14:43 | technomancy | I have fond memories of mozrepl, but that was in 07 or so |
| 14:45 | duck1123 | technomancy: the newer version seems pretty good. I intend to delve into it deeper when I have time |
| 15:00 | daniel__1 | anyone know of a clojuredocs for kindle? |
| 15:00 | daniel__1 | clojuredocs.org that is |
| 15:08 | ro_st | (repeatedly (inc #'source-maps)) |
| 15:08 | ro_st | dnolen: how far along are sourcemaps? |
| 15:08 | dnolen | ro_st: http://dev.clojure.org/display/design/Source+Maps |
| 15:09 | dnolen | ro_st: not very, but it's also not a ton of work - we need to be able to read a source map and generate one. |
| 15:09 | ro_st | great |
| 15:09 | ro_st | so at least we can get advanced js back to whitespace-ish js |
| 15:10 | ro_st | that already is a huge help |
| 15:11 | dnolen | ro_st: looking at the Mozilla JS version looks like ~550 lines of code, I'd be surprised if more than that was involved. we can already vlq64 encode/decode. |
| 15:11 | dnolen | ro_st: I think sensibly augmenting the analyzer will be trickier. |
| 15:12 | ro_st | i believe line and column numbers are tricky? |
| 15:14 | gfredericks | dnolen: do you have a sec for a high-level core.logic impl question? |
| 15:15 | gfredericks | (not real involved, just didn't want to type it out needlessly) |
| 15:16 | dnolen | gfredericks: what's up? |
| 15:18 | gfredericks | dnolen: when reading TRS, my impression was that a lot of effort was going in to essentially implementing lazy seqs; so when I see the core.logic impl, my main question is why that effort was mirrored rather than using clojure's lazy seqs directly. Am I misunderstanding something? |
| 15:18 | dnolen | gfredericks: lazy seqs don't work. |
| 15:18 | amalloy | gfredericks: i don't think that's true |
| 15:18 | gfredericks | amalloy: which part? |
| 15:20 | dnolen | gfredericks: http://clj-me.cgrand.net/2012/01/30/the-reasoned-scheduler/ |
| 15:21 | gfredericks | dnolen: this looks interesting, thanks |
| 15:21 | dnolen | gfredericks: core.logic tried to use lazy sequences - failed miserably. |
| 15:21 | gfredericks | oh very nice he brings up my question directly :D |
| 15:22 | amalloy | gfredericks: i think what's untrue is that TRS is trying to implement lazy seqs |
| 15:22 | amalloy | lazy seqs are one-way, lcons-es are two-way |
| 15:25 | dnolen | amalloy: gfredericks is actually talking about something different. as you say lcons are there so we can get Scheme-like pairs for relational ops. but the implmentation around the stream of *solutions* is lazy sequence like. |
| 15:25 | dspp | im trying to generate a .mobi version of clojuredocs.org, has anyone seen one before? |
| 15:25 | dspp | so i dont waste my time |
| 15:25 | gfredericks | aw man amalloy's comment sounded like it was going to be quite insightful :D :( |
| 15:26 | amalloy | oh. i don't remember seeing lazy streaming of solutions in TRS |
| 15:26 | gfredericks | amalloy: inc & friends |
| 15:26 | dnolen | amalloy: it's not in the actual book - it's in those 2 pages of cryptic macro code at the end. |
| 15:26 | gfredericks | they must have at least touched on it. I couldn't have read the cryptic stuff too closely |
| 15:27 | gfredericks | I also read it in the paper but I remember it being familiar at that point |
| 15:27 | amalloy | i read the chapter on unification, but i think i skipped/skimmed the pile of impl details after that |
| 15:27 | dnolen | gfredericks: they don't really, there's a one page cryptic description by Chung-chieh Shan at the end. |
| 15:28 | dnolen | gfredericks: it's actually lucidly written but if you're not familiar with monadic style code it's pretty hard to understand. |
| 15:29 | dnolen | amalloy: TRS only really covers substitution map & unification - it doesn't get into how goals actually work. |
| 15:29 | dnolen | well it does but in 1 page of text and 2 pages of macros. |
| 15:59 | mtkoan | how does one create a jar of a clojurescript library? |
| 16:00 | triyo | Hey Clojurians! A bit OT; can anyone recommend a good book on subject matter of `Distributed computing'? |
| 16:00 | emezeske | mtkoan: One way is to use lein-cljsbuild, and set ":jar true" in your config options |
| 16:01 | emezeske | mtkoan: https://github.com/emezeske/lein-cljsbuild/blob/master/sample.project.clj#L68 |
| 16:01 | mtkoan | emezeske: thank you |
| 16:02 | antares_ | triyo: http://my.safaribooksonline.com/book/software-engineering-and-development/9780321312839 is pretty great |
| 16:02 | antares_ | triyo: it is only in part about distributed parts but those are helpful and well written |
| 16:04 | gerunddev | triyo: Are you already familiar with parallel computing and just looking for distributed? |
| 16:04 | triyo | antares_: Thanks for the link and recommendation. I'll have a look. |
| 16:09 | triyo | gerunddev: I haven't mastered parallel computing but I have made greater headway than in the distributed computing space |
| 16:09 | triyo | And the two are quite distance of course (share memory, etc.) |
| 16:09 | triyo | *shared |
| 16:11 | hiredman | https://github.com/hiredman/nrepl-cljs-middleware |
| 16:12 | gerunddev | triyo: I found Concurrent Programmin in Java by Doug Lea to have good constructs. The fact that he then went on to build them in java.util.concurrent is secondary :) |
| 16:13 | gerunddev | triyo: Concurrent in different theads, processes, and machines have needed similiar abstractions from my experience. |
| 16:16 | technomancy | clojurebot: jcip? |
| 16:16 | clojurebot | jcip is Java Concurrency in Practice |
| 16:16 | technomancy | wait |
| 16:16 | technomancy | clojurebot: java concurrency in practice? |
| 16:16 | clojurebot | java generics are http://en.wikipedia.org/wiki/Generics_in_Java |
| 16:16 | cemerick | hiredman: sweet |
| 16:16 | cemerick | The sample doc is borked though |
| 16:16 | technomancy | clojurebooooooooot |
| 16:16 | technomancy | oh |
| 16:16 | technomancy | clojurebot: j.u.c.? |
| 16:16 | clojurebot | It's greek to me. |
| 16:16 | hiredman | cemerick: yeah, well, as you have noted many times the org-mode renderer on github is lame |
| 16:17 | technomancy | clojurebot: juc? |
| 16:17 | clojurebot | Cool story bro. |
| 16:17 | technomancy | clojurebot: java.util.concurrent? |
| 16:17 | clojurebot | java.util.concurrent is "When I find myself in times of trouble / Prof. Doug Lea comes to me / Coding lines of wisdom / j.u.c." |
| 16:17 | cemerick | hiredman: yup, I gave up on them for non-markdown content a while ago. |
| 16:17 | hiredman | :/ |
| 16:18 | technomancy | joke ruined |
| 16:21 | gtrak | Raynes: ever thought about porting lazybot to xmpp? |
| 16:22 | Raynes | gtrak: Thought about it, yes. |
| 16:23 | antares_ | Raynes: Y U NO REVIEW monger's CODE |
| 16:24 | Raynes | antares_: I thought I told you I'd investigate some this weekend? Or was that last weekend? |
| 16:24 | antares_ | Raynes: I don't remember weekends being mentioned by ok :) |
| 16:24 | antares_ | *but |
| 16:27 | cpinera | Hi. I'm trying to write a test and I want to fake a function that does some I/O. I've read that I can use binding to re-bind the function to my fake, but I'm getting an exception that says "Can't dynamically bind non-dynamic var". |
| 16:28 | Raynes | In clojure 1.3+, vars are not dynamic unless explicitly declared so. |
| 16:28 | emezeske | cpinera: Are you using binding, or with-redefs? |
| 16:29 | Raynes | (def ^:dynamic foo 0) |
| 16:29 | technomancy | cpinera: you probably want with-redefs |
| 16:29 | technomancy | your reading material is unfortunately outdated |
| 16:30 | cpinera | emezeske: I'm using binding. I'll use with-redefs :) |
| 16:31 | cpinera | technomancy: Excellent, I'll do that. Where can I find some more up to date documentation on unit testing with Clojure? |
| 16:33 | technomancy | cpinera: unfortunately I don't know of any good free resource. the oreilly book probably has the best coverage. if you need something free, maybe Mark Volkmann's article |
| 16:33 | technomancy | I mean I don't know of a free resource that focuses on testing |
| 16:34 | triyo | Joe Armstrong PhD thesis `Making reliable distributed systems in the presence of software errors'. Seems to be very much what I'm after. |
| 16:34 | triyo | http://www.sics.se/~joe/thesis/armstrong_thesis_2003.pdf |
| 16:35 | cpinera | technomancy: Perfect. Problem solved. I'm really thankful! |
| 16:39 | gtrak | Raynes: should it be pretty easy to do (xmpp) ? I looked at the code briefly |
| 16:40 | Raynes | gtrak: It probably wouldn't be that difficult with a good xmpp library. |
| 16:41 | duck11231 | it's a shame that library is Smack |
| 16:42 | hiredman | xmpp is *streaming* xml, the start of a xmpp connection is an open tag and the end is an end tag |
| 16:42 | hiredman | crazy |
| 16:42 | hiredman | absolutely nuts |
| 16:43 | gtrak | jeez |
| 16:43 | gtrak | and here i was thinking gtalk was superior to aim for 9 years |
| 16:43 | nDuff | ... |
| 16:44 | brehaut | gtrak: all IM protocols are rubbish, just in different ways |
| 16:44 | duck11231 | even with the XML, XMPP is still better than aim |
| 16:44 | duck11231 | I'll defend that one |
| 16:44 | nDuff | XML namespaces are a beautiful, beautiful thing to have in a messaging protocol |
| 16:45 | nDuff | gives you the ability to embed content of different types, add local extensions without breaking other parsers... |
| 16:45 | hiredman | your entire connection to an xmpp server, for however long the single connection lasts, is a single valid xml document |
| 16:45 | nDuff | Yep. |
| 16:45 | technomancy | minus the closing tag though? |
| 16:46 | hiredman | technomancy: well, once the connection is over, it includes the closing tag |
| 16:46 | hiredman | so it is a valid xml doc |
| 16:46 | hiredman | sure |
| 16:46 | brehaut | nDuff: the biggest problem is that most XML parsers that validly handle namespaces dont handly the madness of streaming, and while XML is easy, NS'ed xml parsing is not so easy |
| 16:47 | technomancy | it's not a whole lot crazier than having every file loaded by the clojure compiler be wrapped in an implicit (do ...) |
| 16:47 | hiredman | technomancy: a source file, and a connection stream are two different things |
| 16:48 | duck11231 | I think most engines ignore the inital <steram> tag and just parse each packet |
| 16:48 | nDuff | brehaut: Eh? There are _lots_ of XML parsers that handle streaming gracefully -- heck, there are API standards (ie. SAX) that have multitudes of compliant parsers that require it. |
| 16:49 | brehaut | things i do not want to have to do: write an real application that consumes XML using only SAX |
| 16:49 | nDuff | *nod* -- that's fair 'nuff. |
| 16:50 | duck11231 | Openfire uses XPP and Tigase has their own XML lib |
| 16:50 | brehaut | nDuff: the thing i dont understand with xmpp is what the streaming buys. if it was a series of xml documents over the connection, you'd get all the namespacing gains, without all the weirdness |
| 16:51 | hiredman | http://telehash.org/ seems like it could be the basis for something more sane |
| 16:51 | technomancy | I really hope that goes places |
| 16:51 | nDuff | Mmm. Couldn't tell you that myself, actually -- it's over half a decade before I was actually following closely (was using XMPP as a message bus), and there's a lot that's leaked out of my head in that time. |
| 17:17 | technomancy | very interesting: http://wiki.eclipse.org/Jetty/Feature/Continuations |
| 17:23 | gtrak | you're not supposed to be able to M-. code with a remote swank connection are you? |
| 17:23 | gtrak | because if I am, it's broken |
| 17:23 | technomancy | gtrak: not out of the box |
| 17:23 | technomancy | you can make it happen with tramp though |
| 17:24 | gtrak | oh ya? |
| 17:24 | technomancy | the details elude me at the moment |
| 17:24 | yedi | any of you guys try out go yet? |
| 17:24 | gtrak | i'm actually editing local files here |
| 17:24 | gtrak | I just want it to send forms to the server |
| 17:25 | technomancy | google's go is too mainstream; I'm picking up the original one: https://code.google.com/p/go/issues/detail?id=9 |
| 17:26 | arohner | gtrak: you can eval forms remotely w/ C-x C-e |
| 17:26 | gtrak | yea, that part works |
| 17:26 | gtrak | if I could M-. I'd be in heaven |
| 17:27 | technomancy | gtrak: tavis rudd implemented that in swank, but I don't think it's documented |
| 17:27 | technomancy | I think the config all happens on the slime side though |
| 17:51 | semperos | writing custom relations with core.logic, using records I've defined in my API |
| 17:52 | semperos | here's an example: https://gist.github.com/3172908 |
| 17:53 | semperos | when I run this via run*, instead of getting back Element records (which is what wd/find-elements returns), I get back simple clojure.lang.PersistentArrayMap's |
| 17:54 | semperos | so if I then want to do something with elements that satisfy conditions in my run* statements, I have to do a hacky map->Element on what get's bound before using it |
| 17:55 | semperos | am I missing something fundamental about using Clojure records with core.logic? is this intentional? |
| 17:55 | semperos | dnolen: any thoughts? if you have a sec ^^^ |
| 18:52 | lynaghk | cemerick: ping |
| 18:55 | mdeboard | I'm interested in LINQ-like functionality for Clojure, and have worked some with Cascalog, but I'm looking for a Cascalog that doesn't require Hadoop. In other words I Just want the cascalog DSL. Are tehre any projects out there like this? |
| 18:55 | lynaghk | mdeboard: you might want to look into the newly released Datomic free edition, which gives you Datalog querying on native Clojure collections. |
| 18:56 | mdeboard | Seems like a ton of additional overhead for the segment of functionality I want |
| 18:56 | brehaut | mdeboard: LINQ-like is quite broad… do you want linq in general, or a specific linq implementation? |
| 18:57 | mdeboard | brehaut: declarative querying a la cascalog. Forget I said anything about LINQ, I want Cascalog without requiring hadoop |
| 18:57 | brehaut | mdeboard: because in the general case, clojure.algo.monads and linq are equivalent |
| 18:57 | lynaghk | mdeboard: I'd actually try it out and benchmark it re: additional memory usage. I wouldn't be surprised if it's negligable. |
| 18:57 | lynaghk | mdeboard: you can also try rolling your own using core.logic. |
| 18:57 | brehaut | mdeboard: declarative querying of what exactly; SQL DBs ? |
| 18:57 | mdeboard | lynaghk: By overhead I mean setup & configuration |
| 18:57 | brehaut | in memory records? |
| 18:58 | mdeboard | brehaut: XML, i.e. System.Xml.Linq in C# |
| 18:58 | mdeboard | I need to quit mentioning Linq |
| 18:58 | brehaut | right |
| 18:59 | mdeboard | I saw a Cascalog mailing list post where sritchie said he'd like to see an XML tap but I don' ttihnk anything came of it |
| 18:59 | brehaut | mdeboard: i had good luck with clojure.zip, clojure.xml and clojure.data.zip |
| 18:59 | brehaut | doesnt handle NS's though |
| 18:59 | mdeboard | Good call, I think I've used each of those separately |
| 19:00 | brehaut | xml-> is magic |
| 19:00 | mdeboard | brehaut: Not much of a worry thankfully, it's pretty simple XML |
| 19:00 | brehaut | the other possibility might be enlive's xml support (which is equivalently limited) |
| 19:00 | mdeboard | I'll look into that |
| 19:00 | mdeboard | I'm rewriting a C# library at work in Clojure, bit by bit |
| 19:01 | brehaut | or you could port System.Xml.Linq to clojure.algo.monads ;) |
| 19:01 | mdeboard | Ha, I don't know enough C# (almost none) to be of any use there |
| 19:01 | mdeboard | also the word monad scares me |
| 19:01 | brehaut | its just a monoid in the category of endofunctors, whats the problem? |
| 19:02 | hiredman | ~endofunctor |
| 19:02 | clojurebot | endofunctors are functors that map a category to itself. |
| 19:02 | mdeboard | brehaut: lol |
| 19:02 | hiredman | ~shrimp |
| 19:02 | clojurebot | shrimp must be the new gotos |
| 19:02 | hiredman | ~shrimp |
| 19:02 | clojurebot | shrimp are small |
| 19:02 | brehaut | mdeboard: really though, its jsut an interface. happens that its quite abstract is all |
| 19:02 | hiredman | clojurebot: jerk |
| 19:02 | clojurebot | you cut me deep, man. |
| 19:02 | brehaut | ~shrimp |
| 19:02 | clojurebot | shrimp must be http://okmij.org/ftp/Scheme/monad-in-Scheme.html |
| 19:03 | brehaut | ~botsnack |
| 19:03 | clojurebot | Thanks, but I prefer chocolate |
| 19:03 | brehaut | hiredman: does clojurebot still have the inference stuff? |
| 19:03 | hiredman | I think so |
| 19:04 | hiredman | I don't recall removing it |
| 19:04 | mdeboard | brehaut: I'll keep that in mind :P |
| 19:05 | brehaut | mdeboard: the trick is to start off not worrying about monads in general, and just worrying aobut specific implementations |
| 19:07 | aphyr | Is there an idiomatic way to do exit handling in clojure? A callback before VM shutdown? Signal handlers? |
| 19:08 | ahkurtz | is a continuation a monad, if the continuation only returns things in the same type at every iteration? |
| 19:08 | brehaut | there is a continuation monad yes |
| 19:08 | hiredman | continuations don't return |
| 19:08 | brehaut | not sure if its advisable in clojure |
| 19:09 | ahkurtz | continuations return eventually ... even if it's nothing? |
| 19:09 | brehaut | isnt the point of continuations that they continue rather than return? |
| 19:10 | ahkurtz | you can't use them if they never return ... I guess I'm just too stupid |
| 19:10 | ahkurtz | there is some point where execution stops? |
| 19:11 | hiredman | a lot of times the term continuation is used to describe things that are not continuations, callbacks, etc |
| 19:12 | brehaut | ahkurtz: ive heard of continuations described as dynamic goto |
| 19:12 | hiredman | a continuation is a jump, jumps don't return |
| 19:12 | ahkurtz | how does a continuation exit once entered? |
| 19:13 | brehaut | ahkurtz: perhaps the implemenation details of continuations as functions is causing confusion? |
| 19:13 | hiredman | "Lambda: The Ultimate GOTO" http://repository.readscheme.org/ftp/papers/ai-lab-pubs/AIM-443.pdf |
| 19:13 | ahkurtz | ty |
| 19:13 | brehaut | s/as functions/model with functions/ |
| 19:15 | ahkurtz | so, if execution ceases it's not a continuation? |
| 19:15 | ahkurtz | I have a recursive function that passes it's previous work to it's next iteration, then returns at base case |
| 19:15 | ahkurtz | not a continuation? |
| 19:15 | ahkurtz | *its |
| 19:15 | hiredman | nope |
| 19:16 | hiredman | the continuation is implicit, hidden |
| 19:16 | ahkurtz | do you happen to have an example of clojure code that is a continuation? or is this a theoretical mathematical thing that I'm conflating with programming? |
| 19:16 | hiredman | clojure doesn't have continuations |
| 19:18 | hiredman | I guess continuation that returns a value would be a coroutine |
| 19:18 | hiredman | guess a |
| 19:20 | ahkurtz | my problem is that I'm calling CPS and continuation the same |
| 19:47 | cemerick | lynaghk: hallo |
| 20:25 | gert | I'm working on a library that needs to throw exceptions... should I use `ex-info` and `ex-data`? Or create my own exception classes? I like Slingshot, but have a feeling ex-info and ex-data might replace its functionality. is that correct? |
| 20:26 | technomancy | gert: I'd say throw with ex-info and catch with slingshot |
| 20:26 | hiredman | slingshot uses ex-data and ex-info on versions of clojure that have them |
| 20:26 | gert | oh cool! |
| 20:27 | hiredman | https://github.com/scgilardi/slingshot/blob/master/src/slingshot/support.clj#L22 |
| 20:28 | gert | hiredman: that's clever, ta for the link. |
| 20:29 | technomancy | is Stone gone for good now? |
| 20:30 | hiredman | technomancy: well, it isn't called Stone anymore, it was reworked to look as much like the ExceptionInfo class that made it in to clojure as possible |
| 20:31 | technomancy | cool |
| 20:32 | technomancy | IMO Stone was a tiny bit too cute for situations where people would be seeing it without knowing anything about slingshot |
| 20:43 | brehaut | hi gert |
| 20:43 | gert | brehaut: hi! |
| 20:44 | gert | we're the only kiwis on here I suppose? :) |
| 20:44 | brehaut | talios too sometimes |
| 20:44 | brehaut | and arbscht |
| 20:44 | brehaut | and rbarraud |
| 20:45 | brehaut | but they are aucklanders, so i dont know if they count |
| 20:45 | gert | haha |
| 20:45 | rbarraud | <ears_burning> huh? :) |
| 20:45 | gert | I didn't know we had so many clojurians in nz. |
| 20:45 | gert | we should start a club |
| 20:45 | brehaut | im going to call it #clojure |
| 20:45 | rbarraud | radical! ;-) |
| 20:45 | rbarraud | 1,2,3... Yep, I count |
| 20:46 | rbarraud | hiya WLG! :) |
| 20:46 | gert | only local clj people I know are my employee and myself |
| 20:47 | rbarraud | I could disguise myself as a Greenhithean ... probably wouldn't fool you though eh? :) |
| 20:47 | gert | nah it's all AKL to me. but I kinda like akl, so it's all good |
| 20:47 | rbarraud | 'onya matey ;-) |
| 20:48 | rbarraud | I am a WnTronGisAckler anyway |
| 20:48 | brehaut | all at once? |
| 20:48 | rbarraud | geographic version of MPD i suppose ;-) |
| 20:49 | brehaut | juxt or comp i guess |
| 20:49 | rbarraud | Time division Multiplexed |
| 20:49 | gert | and I'm dutch import, so not so precious about inter-city rivalry. working full-time (and then some) on a clojure project here. |
| 20:49 | brehaut | how often are you in the tron? |
| 20:50 | rbarraud | not very these days but can be persuaded if there are beer/chili/motorcycles/Linux involved :) |
| 20:50 | brehaut | ha |
| 20:50 | rbarraud | I have a delivery trip to make soonish... as soon as my M/C is properly legal again |
| 20:50 | rbarraud | Amateur Radio gear (1296MHz convertor and IC202) |
| 20:51 | rbarraud | long overdue loan :-/ |
| 20:51 | brehaut | oops |
| 20:51 | rbarraud | how bout u? up in AKL much? |
| 20:52 | brehaut | not particuarlly often; i hate dealing with getting anywhere when i do |
| 20:52 | rbarraud | i haven't checked with arbscht lately - his server was down - but he was hosting some LISPy/Clojureish stuff |
| 20:52 | brehaut | mostly only for the occasional show or conf thing |
| 20:52 | brehaut | lisp.geek.nz? |
| 20:52 | rbarraud | perhaps we should start a Clojure meetup? or is that fragmentation? The JVM languages one covers it anyway |
| 20:52 | rbarraud | yup |
| 20:53 | brehaut | it might fragment too much eh |
| 20:53 | gert | there's a functional programming meetup in Welly but it's not overly active I think |
| 20:54 | brehaut | i kinda think an FP meetup would be better than a JVM meetup… |
| 20:54 | rbarraud | IIRC SharkBrain may have some interest in Clojure |
| 20:54 | brehaut | bbs, need to get some kai |
| 20:55 | rbarraud | there are a few of us functionally-minded on the Shore wh ohave been thru all of the MIT SICP lecture videos (and loved them :) ) - check out #sicp here on freenode.net |
| 20:55 | rbarraud | we usually hang out most days casually |
| 20:56 | rbarraud | we have been meeting Friday nights when we can get a quorum |
| 20:56 | rbarraud | F2F that is |
| 20:56 | rbarraud | pizza etc usually involved |
| 20:56 | rbarraud | it's gone OT a lot onto things like LLVM |
| 20:56 | gert | sounds like all the fun is happening up north |
| 20:56 | rbarraud | and Harvard Legal Philosophy lectures ;-) |
| 20:57 | rbarraud | gert: i may be down in WN quite soon to visit my Dad and Bro+family |
| 20:57 | rbarraud | might be nice to catch up for a beer or something |
| 20:57 | gert | chur! |
| 20:58 | rbarraud | kinda trying to persuade some fellow #sicp -ers to make a road trip of it too ... not a lot of success so far though |
| 20:59 | gert | rbarraud: get in touch with me when you know more about your plans |
| 20:59 | rbarraud | whats best way ? I'm @rbarraud on Twitter |
| 21:00 | gert | I'm @gertalot |
| 21:00 | rbarraud | kewl |
| 21:00 | rbarraud | if we follow ea other we can DM email addrs etc |
| 21:00 | gert | done. :) |
| 21:01 | rbarraud | kewl me doing that too |
| 21:01 | rbarraud | gotta afk now sorry - lunch Must Be Attended ;-) |
| 21:01 | rbarraud | nice chatting |
| 21:01 | gert | yeah same! catch you later! |
| 21:20 | gfredericks | $mail dnolen that cgrand blog post was quite enlightening; thanks again |
| 21:20 | lazybot | Message saved. |
| 21:28 | steveo_ | anybody using mahout with cascalog? |
| 21:34 | gfredericks | &(read-string ":p'") |
| 21:34 | lazybot | ⇒ :p' |
| 21:35 | jeremyheiler | /join #compojure |
| 21:36 | jeremyheiler | meh |
| 22:03 | mattmoss | Is there a doc/web page that documents generally accepted identifier conventions? IE, that *ident* is for dynamic vars, or that -ident is blah blah blah..., etc.? |
| 22:03 | hiredman | https://github.com/hiredman/drawbridge-cljs huzzah |
| 22:08 | gfredericks | does turning off clojure.core/*assert* turn off assertions in clojurescript? |
| 22:08 | amalloy | mattmoss: there's http://dev.clojure.org/display/design/Library+Coding+Standards, which isn't really what you want but is sorta related |
| 22:08 | duck1123 | that's it. I was going to do other things tonight... I'm setting up my server for nrepl |
| 22:09 | mattmoss | amalloy: Thanks, good reference. |
| 22:13 | hiredman | http://s8.postimage.org/hm262cozp/Screen_Shot_2012_07_24_at_7_09_58_PM.png plotting data using jplot with clojurescript in browser using nrepl for compilation |
| 22:14 | hiredman | jqplot I guess? jquery plotting plugin thing |
| 22:26 | KyleBrodie | Hello hello how are all the clojurians? |
| 22:27 | gert | what authentication framework do people use in production? Sandbar? Friend? a Java solution? |
| 22:43 | enoch2038 | i'm in brisbane, AU |
| 22:45 | brehaut | gert: i think friend looks like it makes more sense going forward |
| 22:49 | gfredericks | how do I do foo[bar] in cljs? |
| 22:49 | acagle | /join #compojure |
| 22:49 | Raynes | You should never foo your bar. |
| 22:49 | Raynes | That got me in trouble once. |
| 22:49 | gert | can I define a protocol that inherits from another protocol? Or am I thinking to java-interface-y? |
| 22:49 | gfredericks | gert: nope |
| 22:50 | gfredericks | so I guess yep? |
| 22:50 | Raynes | gert: No and you're a bad person for wanting to. |
| 22:50 | gert | Raynes: sorry :) |
| 22:50 | Raynes | :P |
| 22:50 | brehaut | gfredericks: http://himera.herokuapp.com/synonym.html is your friend |
| 22:51 | sproc | gfredericks: (nth bar foo) |
| 22:51 | gfredericks | sproc: where bar is a string |
| 22:51 | brehaut | gfredericks: get |
| 22:52 | gfredericks | brehaut: that can't be true |
| 22:52 | gfredericks | brehaut: I think you're taking that page more literally than it was intended |
| 22:53 | brehaut | ah |
| 22:53 | gfredericks | the "Accessing Values" section is not about interop |
| 22:53 | gfredericks | I want interop |
| 22:53 | brehaut | does (.-bar foo) work ? |
| 22:53 | clsimons | gfredericks: (get {"hi" "there"} "hi") ; => "there" |
| 22:53 | gfredericks | well what I really want is x[0] |
| 22:53 | gfredericks | and (.-0 x) does not work |
| 22:54 | brehaut | gfredericks: you are talking about a js obj rather than a map right? |
| 22:54 | gfredericks | clsimons: that's a cljs map not a primitive js object |
| 22:54 | gfredericks | brehaut: yes |
| 23:02 | gert | Raynes: I see the error of my ways now re protocols. I blame lack of sleep. |
| 23:03 | gfredericks | surely jayq must address this issue |
| 23:05 | amalloy | gfredericks: (get x 0), right? |
| 23:06 | gfredericks | amalloy: if that did native js property access I would thing x being a map would break |
| 23:06 | gfredericks | being a cljs-map I mean |
| 23:06 | amalloy | okay, i didn't understand any of that, but i'd still like to point out get != aget |
| 23:06 | gfredericks | ah nope |
| 23:06 | gfredericks | doesn't satisfy the ILookup protocol |
| 23:07 | gfredericks | oh aget looks promising |
| 23:07 | amalloy | aget will emit x[0] |
| 23:07 | gfredericks | I want that |
| 23:07 | amalloy | well then |
| 23:07 | amalloy | do i have good news for you |
| 23:08 | gfredericks | thank you sir for your good tidings |
| 23:11 | craigbro | awoo |
| 23:12 | Hodapp | werewolves |
| 23:12 | craigbro | of london |
| 23:12 | Hodapp | ON THE HIIIIIIIIIIIIIIIIGHWAY TO HELLLLLLLLLLLLLLLLLLLLL |
| 23:12 | Hodapp | ...wrong song? |