2014-08-24
| 00:27 | zeebrah | is there any plans for a standard document for clojure? |
| 00:35 | andyf | zeebrah: You mean like the Common Lisp HyperSpec and/or standards document? I don't think so |
| 00:36 | zeebrah | andyf: or like C99 yep |
| 00:38 | andyf | Like most recent languages I can think of other than JavaScript, it is defined by its doc strings and implementation |
| 00:48 | zeebrah | andyf: yeah but you'd rather be in the C/Java/Scheme/CL camp than Ruby/bf/etc in terms of being a legitimate language with a standard imho |
| 00:49 | andyf | Examples where I'd think it is in good company: Perl, Python, Go, and yes even Ruby |
| 00:50 | andyf | The main reason for standards are if you have multiple implementations and you want programs to work on all of them that conform to standard |
| 00:54 | zeebrah | i'm not sure the company of perl and ruby inspire confidence though |
| 00:54 | andyf | Because? |
| 00:56 | zeebrah | if there was a standard you could have multiple competing implementations with different strengths and weaknesses |
| 00:57 | andyf | You can have that without a standard |
| 00:58 | zeebrah | not really though because you have to make choices based on implementation quirks |
| 00:58 | andyf | Python and Ruby have several implementations |
| 01:01 | andyf | But I guess I don't really see multiple competing implementations as an advantage, if the main one is open source and works well enough |
| 01:05 | zeebrah | im sure there are a lot of advantages, better performance, correctness, more use cases where one impl is better suited than another one, etc |
| 01:06 | zeebrah | you can rest on your laurels less like python did with the GIL thing all those years |
| 01:06 | zeebrah | documentation and understand how your code will behave for users too |
| 01:07 | aravindh | Hello! Why does (= [1 2 3] (sorted-set 1 2 3)) return false? |
| 01:07 | andyf | Sets are never equal to vectors in Clojure |
| 01:08 | andyf | You would get true if you wrapped seq call around sorted-set exit |
| 01:08 | andyf | Replace "exit" with "expr" there |
| 01:09 | aravindh | @andy - thanks, got it |
| 01:09 | zeebrah | andyf: you can't really say 'never equal to vectors in clojure' without having a standard either :P that could change in the next release hah |
| 01:10 | mthvedt | zeebrah: the behavior of collection equality comes over from the java standard |
| 01:11 | zeebrah | mthvedt: not really the point |
| 01:11 | mthvedt | zeebrah: the point is there’s a ‘standard’, if implicit |
| 01:12 | andyf | zeebrah: I can say it if I qualify with "in any Clojure version releases so far, up to 1.6". But I understand your point. |
| 07:46 | razum2um | hi folks, could be a newbie q, but why cannot I get a full stacktrace with my lines of code? https://gist.github.com/razum2um/497e677f44e9e693688c |
| 07:50 | razum2um | oh, nevermind, just wonder why default depth of stacktrace is 12 |
| 07:51 | pyrtsa | (doc pst) |
| 07:51 | clojurebot | "([] [e-or-depth] [e depth]); Prints a stack trace of the exception, to the depth requested. If none supplied, uses the root cause of the most recent repl exception (*e), and a depth of 12." |
| 07:51 | pyrtsa | razum2um: That's why. ^ |
| 07:52 | razum2um | pyrtsa: yep, thx but I think in lot of cases it's too small default |
| 07:53 | pyrtsa | AFAICT, pst was intended to be used manually on the REPL so if it isn't long enough for you, just give another number. Otherwise, you can always dig out the full stack trace from the exception yourself. :) |
| 08:04 | razum2um | btw, is there an automatic way to start a repl in a repl? and subsequently - rescue all the expections and start a repl it that context (i.e. get the best debugger ever thought) ? |
| 08:10 | razum2um | found (clojure.main/repl) will try to use technique like in tools.trace to redefine all functions in a ns |
| 08:10 | razum2um | just wonder if such attempt exist |
| 08:13 | justin_smith | razum2um: there is ritz, which kind of fits that bill. But in my experience better than the best debugger is to write stateless functions and verify their behavior with the sort of input and output they will get. Exceptions should be for things that are out of your control at runtime (user or hardware problems), and not for buggy code |
| 08:15 | razum2um | justin_smith: it's a beautiful theory. i'm importing db records and some of them fail importing, besides, this code is not mine, but inherited, i need to dig in why it's happening on some rear data |
| 08:16 | justin_smith | razum2um: maybe you want preconditions or assertions on your importing function |
| 08:16 | razum2um | i need some kind of rescue + break |
| 08:16 | justin_smith | that's what (try ... (catch ...)) is for |
| 08:17 | justin_smith | if it's an exception you think you can work around |
| 08:17 | razum2um | yep, doing so, but ideally want to have smth like tools.trace to redefine functions and automatically doing so |
| 08:18 | justin_smith | I think technomancy 's robert-hooke library can do that. https://github.com/technomancy/robert-hooke/ |
| 08:19 | justin_smith | but do you really have that many different functions you need to wrap in try blocks? |
| 08:19 | razum2um | yep, saw this, but didnt think is this context, thanks! |
| 08:21 | razum2um | currently my data has changed dramatically and failures are happening in many places at random rows, besides some attempts took 5min to reach the point of failure |
| 08:22 | razum2um | just tired of this start->inject try->restart process |
| 08:23 | justin_smith | razum2um: another technique I like is (def failures (atom [])) ... and then inside the function (try .... (catch Exception e (swap! failures conj args))) - then inside the repl, make unit tests or assertions based on the the data that provokes errors |
| 08:24 | razum2um | justin_smith: good idea, remembers me of let it fail :) |
| 08:24 | justin_smith | and if not doing so already, you need to be doing all this in a repl for this to work of course |
| 08:24 | razum2um | btw, inside (clojure.main/repl) how to access the parent binding? |
| 08:24 | justin_smith | parent binding? |
| 08:25 | razum2um | (catch Exception e (clojure.main/repl)))) |
| 08:25 | razum2um | how to access locals in this function |
| 08:25 | justin_smith | I don't think that will let you access locals from inside the form that launched it |
| 08:25 | justin_smith | it's not meant to do so |
| 08:26 | razum2um | can i pass binding manyally? |
| 08:26 | justin_smith | razum2um: you could use something like my above failures atom trick to pass the locals up to the namespace level |
| 08:28 | razum2um | hm :| sounds like ugly trick in this context |
| 08:29 | justin_smith | razum2um: it seems like you want recoverable conditions like common lisp has. This isn't really a clojure feature, and I suspect any emulation of it will be an ugly trick. |
| 09:51 | razum2um1 | justin_smith: yeah, found this - https://github.com/GeorgeJahad/debug-repl |
| 10:45 | Chousuke | spwa tampere population density |
| 10:45 | Chousuke | oops. |
| 12:13 | luxbock | when using cider-stacktrace, cider-stacktrace-jump works in clojure.core files, i.e. it pops up the buffer with the relevant source and line number, but for some reason it's not working with my own source files |
| 12:14 | luxbock | do others have this same problem and is there a solution to it? I quite like the new stacktrace mode |
| 12:15 | justin_smith | you may want to ask on #clojure-emacs - I think that should work with your own namespaces in cider |
| 13:01 | annapawlicka | Does anyone have any esperience with accessing Clojars data feeds? (https://github.com/ato/clojars-web/wiki/Data) I'm seeing Access-Control-Allow-Origin error on my GET requests, no matter whether I request json or jsonp or the default. |
| 13:33 | shekibobo | anyone in here use expectations for testing? |
| 13:36 | shekibobo | I'm trying to get my first test set up, but don't understand this error: |
| 13:36 | shekibobo | Error refreshing environment: java.io.FileNotFoundException: Could not locate test/myproject/core__init.class or test/myproject/core.clj on classpath: |
| 13:37 | shekibobo | using lein-autoexpect |
| 13:39 | shekibobo | test file is in /test/myproject/core.clj |
| 14:11 | gfredericks | shekibobo: what command do you use to start that? |
| 14:12 | gfredericks | my guess is that you or something is prepending 'test' to a namespace name |
| 14:13 | justin_smith | shekibobo: do your core ns and your core test ns have the same relative path? |
| 14:13 | justin_smith | because it looks like they would |
| 14:13 | justin_smith | and that breaks thing |
| 14:13 | shekibobo | I actually switched to speclj |
| 14:14 | shekibobo | that got things working |
| 14:14 | shekibobo | but they probably did |
| 14:14 | justin_smith | just saying, if you have src/myproject/core.clj and test/myproject/core.clj that is intrinsically broken |
| 14:15 | shekibobo | well, I think it was called test/myproject/core_test.clj |
| 14:15 | justin_smith | that's not what you said above |
| 14:15 | justin_smith | or maybe the issue is the name of the test ns |
| 14:17 | gfredericks | lol |
| 14:17 | gfredericks | "was having trouble running my tests, so I tried switching test libraries, and that worked." |
| 14:18 | gfredericks | "I kept getting this syntax error, so I switched to python and it went away." |
| 14:19 | shekibobo | well, I came across a site that talked about deprecating expectations |
| 14:20 | shekibobo | pretty new to this ecosystem, so I'm just trying things out |
| 14:21 | gfredericks | huh; I don't *think* it's deprecated |
| 14:21 | shekibobo | looks like it's not deprecated, though |
| 14:21 | shekibobo | now that I check github |
| 14:21 | shekibobo | last update 19 days ago |
| 14:21 | shekibobo | *shrug* |
| 14:30 | gfredericks | shekibobo: was it http://blog.jayfields.com/2012/11/clojure-deprecating-expectationsscenari.html |
| 14:48 | shekibobo | yeah, that was it. just didn't remember exactly what triggered me to switch libs |
| 16:35 | kqr | is there a function (fn [f x] (if x (f x))) that I'm missing? |
| 16:36 | kqr | or a macro, rather, I suppose |
| 16:36 | kqr | or maybe not |
| 16:36 | kqr | i'm so used to non-strict evaluation |
| 16:37 | kqr | ...I think I mean a function, yeah |
| 16:37 | justin_smith | a macro would not be needed there - since you need to fully evaluate x regardless of the branch taken |
| 16:38 | justin_smith | (I guess you could have a version where x is nil and f is not a valid function, and avoid that error with a macro...) |
| 16:38 | justin_smith | maybe? |
| 16:38 | kqr | probably, but that's not going to be the case in my code |
| 16:38 | justin_smith | there is fnil to give f a default argument for a nil input |
| 16:38 | kqr | i'm just curious if that function exists as part of clojure.core or something like that, and I'm just not finding it |
| 16:39 | kqr | i saw fnil, but i want the call to be ignored entirely if the argument is nil |
| 16:39 | justin_smith | but I don't think there is #(and %2 (% %2)) |
| 16:39 | amalloy | kqr: it's a bit like one of the things added in 1.5, i think test->? |
| 16:39 | amalloy | ,(test-> nil inc) |
| 16:39 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: test-> in this context, compiling:(NO_SOURCE_PATH:0:0)> |
| 16:39 | amalloy | ugh, i don't remember what names he settled on |
| 16:40 | kqr | cond->? some->? |
| 16:40 | amalloy | cond-> |
| 16:40 | amalloy | ,(cond-> nil inc) |
| 16:40 | clojurebot | #<AssertionError java.lang.AssertionError: Assert failed: (even? (count clauses))> |
| 16:40 | justin_smith | ,(clojure.repl/apropos "->") |
| 16:40 | clojurebot | (cond->> -> as-> some->> ->VecSeq ...) |
| 16:40 | amalloy | man, i give up |
| 16:40 | kqr | hehe |
| 16:40 | amalloy | i don't use those things |
| 16:40 | kqr | some-> |
| 16:40 | kqr | looks right |
| 16:41 | kqr | ,(some-> nil inc) |
| 16:41 | clojurebot | nil |
| 16:41 | kqr | ,(some-> 3 inc) |
| 16:41 | clojurebot | 4 |
| 16:41 | kqr | yay |
| 16:41 | kqr | thanks |
| 16:42 | kqr | when you say "he", are you talking about hickey or someone else? |
| 16:47 | amalloy | hickey |
| 16:49 | kqr | is he like the BDFL of clojure or does he just happen to be very active in development? |
| 16:50 | mercwithamouth | .... |
| 16:50 | catern | he is the creator and BDFL |
| 16:50 | kqr | i knew he was the creator, I just wasn't sure about the BDFL part :> |
| 16:53 | catern | he is King Hickey, first of his line, BKFL, champion of the order of the curved line |
| 16:55 | kqr | haha |
| 16:55 | kqr | it's so weird coming to a new PL community |
| 16:55 | clojurebot | No entiendo |
| 16:55 | kqr | and going from knowing a lot to knowing nothing |
| 16:55 | rpaulo | King Hickey, GBE |
| 16:58 | kqr | if I have moved a function from one namespace to another, and try to reload the namespace that now has the function in it, the REPL complains about "f already refers to <old-namespace>/f" even though that's been removed. how do I fix that without restarting the REPL? |
| 17:04 | zoldar | kqr: maybe try ns-unmap ? |
| 17:04 | zoldar | kqr: http://stackoverflow.com/a/5571144 |
| 17:05 | kqr | zoldar, that did the trick |
| 17:06 | kqr | zoldar, do you happen to know why f was in the user namespace, even though I, as far as I know, never imported it to there? |
| 17:06 | justin_smith | kqr: also, if you require :as instead of use this stuff comes up less often (though it's slightly more verbose) |
| 17:06 | justin_smith | kqr: wait, you were getting those warnings without calling use? that's weird |
| 17:07 | zoldar | kqr: I have no idea |
| 17:07 | justin_smith | kqr: if you require or use, the function is not "in" the user ns, but it has a binding there |
| 17:07 | justin_smith | the error is about the binding, not about where it is defined |
| 17:07 | kqr | justin_smith, I require :as in all my files |
| 17:08 | justin_smith | OK, what about in the repl? |
| 17:08 | kqr | justin_smith, I haven't use'd or required anything in the REPL as far as I know |
| 17:08 | justin_smith | then how the hell is that function even defined? |
| 17:08 | kqr | does leiningen do some requiring when I run lein repl? |
| 17:08 | kqr | or wait a minute |
| 17:09 | justin_smith | how are you loading this code into your repl? |
| 17:09 | kqr | I reload the namespaces with (use 'name.space :reload) |
| 17:09 | justin_smith | right |
| 17:09 | justin_smith | and use creates bindings |
| 17:09 | kqr | that maybe counts |
| 17:09 | kqr | yeah |
| 17:09 | justin_smith | the error says two bindings have the same name |
| 17:09 | justin_smith | which they do |
| 17:09 | justin_smith | because you are using use |
| 17:09 | kqr | that makes a lot of sense! |
| 17:09 | kqr | things making sense makes me happy |
| 17:10 | zoldar | usually, you don't use use |
| 17:10 | kqr | is there a better way to reload your project? |
| 17:10 | justin_smith | so, going back to my first comment on this subject, if you (require '[foo.bar :as bar] :reload) instead of (use 'foo.bar :reload), this problem disappears |
| 17:10 | zoldar | sorry, couldn't resist |
| 17:10 | kqr | justin_smith, ah |
| 17:11 | kqr | justin_smith, is that what people normally do when they work with their project in the REPL or am I missing something? |
| 17:11 | justin_smith | that's what I normally do |
| 17:11 | kqr | it feels awkwardly verbose, is all I'm thinking |
| 17:11 | justin_smith | I think most people do a keystroke that makes their editor do some equivalent for them |
| 17:11 | kqr | ah |
| 17:11 | justin_smith | there is also :reload-all |
| 17:11 | justin_smith | for recursive reloading |
| 17:11 | kqr | that sounds more like what I want |
| 17:12 | justin_smith | this still doesn't cover the more subtle problem that reloading can only add things to namespaces |
| 17:12 | justin_smith | it doesn't remove things even if the definition is no longer there |
| 17:12 | justin_smith | (you also have to watch out for defonce, and things like defmulti that have defonce semantics) |
| 17:13 | justin_smith | ,(doc ns-unmap) |
| 17:13 | clojurebot | "([ns sym]); Removes the mappings for the symbol from the namespace." |
| 17:13 | justin_smith | that solves that problem |
| 17:14 | zoldar | kqr: afaik, tools.namespace provides some tooling to make such operations easier |
| 17:14 | kqr | where do I start looking when I get error messages like "ClassCastException java.lang.Boolean cannot be cast to clojure.lang.Symbol clojure.core/alias (core.clj:3940)"? |
| 17:14 | kqr | zoldar, i saw that mentioned somewhere else, yeah |
| 17:14 | justin_smith | kqr: (pst) - then look for calls in your own code |
| 17:14 | kqr | zoldar, i'll have to look at it once I'm slightly more comfortable with just the default system |
| 17:15 | justin_smith | one thing with clojure is we end up with very deep call stacks |
| 17:15 | kqr | justin_smith, that's a good idea for future errors, thanks. in this case, it happens when I try to :reload-all, so there are no calls that are mine hehe |
| 17:16 | justin_smith | kqr: weird, maybe one of your namespaces being recursively reloaded has a broken ns form |
| 17:17 | justin_smith | alias is a function that implements the namespace binding for use / require |
| 17:17 | justin_smith | ,(doc alias) |
| 17:17 | clojurebot | "([alias namespace-sym]); Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the symbolic name of the target namespace. Use :as in the ns macro in preference to calling this directly." |
| 17:17 | kqr | what I'm trying to eval is (require 'my-project.core :as 'my-project :reload-all) |
| 17:17 | justin_smith | ok, that's malformed |
| 17:17 | kqr | ah |
| 17:18 | justin_smith | (require '[my-project.core :as my-project] :reload-all) |
| 17:18 | kqr | oh |
| 17:18 | kqr | I see |
| 17:18 | kqr | I can't believe I missed that – you even typed it correctly before! |
| 17:18 | kqr | thanks |
| 17:18 | justin_smith | np |
| 17:18 | kqr | clojure certainly feels a lot different from my main work horse – haskell |
| 17:19 | kqr | but in a sort of "i'm finally coming home" way |
| 17:19 | kqr | it's difficult to put into words |
| 17:19 | justin_smith | yes, the branch between the ml family and the lisp family happened decades ago, and they are hardly a typical ml and typical lisp :) |
| 17:20 | kqr | my main problem so far (beyond the normal beginner ones, such as getting lost in the ecosystem) is that the syntax looks sort of...messy |
| 17:20 | kqr | I'm not sure why that is though |
| 17:20 | justin_smith | I'm glad to hear you're getting to feel comfortable with clojure, it's a great language imho |
| 17:20 | justin_smith | (inc clojure) |
| 17:20 | lazybot | ⇒ 18 |
| 17:21 | justin_smith | it's not much of a syntax, and it has little to no sugar in it |
| 17:22 | andyf | I know I've seen examples of this before, but I can't recall where right now. I want to require or use a namespace conditionally at a certain point in my code, and then call functions inside of it after that. And I want the file to compile. Examples you can point me at? |
| 17:22 | justin_smith | resolve |
| 17:22 | zoldar | kqr: end of the comment for the example antlr grammar for clojure by parr describes it well ;) https://github.com/antlr/grammars-v4/blob/master/clojure/Clojure.g4 |
| 17:24 | kqr | zoldar, hehe. what's weird is that when I did a little common lisp a few years ago, I remember the syntax not being a problem at all. the parens disappeared after a few days and so on |
| 17:24 | kqr | zoldar, I guess I expected that to happen quicker with clojure, but maybe it'll take some time |
| 17:26 | zoldar | kqr: probably, there's still a bit more sugar, like literals for vectors, sets, maps, anonymous fns etc. |
| 17:26 | kqr | yeah those things are great though |
| 17:27 | sveri | Hi, how can I assert that a function is returned by one of my methods with midje? |
| 17:27 | kqr | i should probably be put into rehab for my abuse of maps for all kinds of communication between functions... |
| 17:27 | amalloy | the vector literals aren't actually syntax sugar for anything, though |
| 17:28 | amalloy | like, (defn foo [x] x). how do you "de-sugar" the []s? |
| 17:37 | andyf | kqr: It is hard to go too far with maps :) |
| 17:37 | kenrestivo | has anyone tried using friend-oauth2 with google apps oauth2 login system? |
| 18:09 | schmee | I get a strange error with core.async, "No method in multimethod '-item-to-ssa' for dispatch value: :fn", from this code: https://gist.github.com/schmee/6d6bbeff46a40c28a7ac (<15 LOC) |
| 18:24 | Bronsa | schmee: go blocks cannot cross fn boundaries |
| 18:25 | Bronsa | schmee: a >!/<! operation must be in the same lexical scope of the go block, and in the same fn |
| 18:25 | schmee | Bronsa: aha! |
| 18:25 | schmee | Bronsa: do you have any idea how I could rewrite that so that it works? |
| 18:25 | schmee | just move in the go-block? |
| 18:26 | Bronsa | schmee: I'm no core.async expert, but I think you can just write that as (sloop socket #(put! c %)) |
| 18:27 | schmee | Bronsa: I'll try that, thanks! |
| 18:30 | schmee | (inc Bronsa) |
| 18:30 | lazybot | ⇒ 46 |
| 20:07 | shekibobo | I'm trying to understand and solve the 0-1 knapsack problem, which seems to depend on maintaining a matrix of values that can be updated over the process of running a recursive function |
| 20:07 | shekibobo | since everything is immutable, how would I even go about recording those values somewhere? |
| 20:08 | amalloy | shekibobo: loop (or reduce) over a vector of vectors |
| 20:19 | kristof | shekibobo: Are you familiar with the technique of passing state as an explicit argument? |
| 20:19 | kristof | shekibobo: loop and recur with the state explicitly |
| 20:19 | shekibobo | if you mean passing the mutated version of something to a recursive function, yeah |
| 20:19 | kristof | shekibobo: Right, but if you try that in clojure you might blow the stack, so use recur :) |
| 20:20 | shekibobo | does recur have to be used with loop? |
| 20:20 | justin_smith | recur also works with functions |
| 20:20 | shekibobo | ok |
| 20:20 | justin_smith | but is an error if not in the tail position |
| 20:20 | shekibobo | ok |
| 20:20 | justin_smith | (unlike scheme where a self call may or may not be a tail call, with no error checking from the compiler) |
| 20:29 | shekibobo | what does memoize do? |
| 20:29 | justin_smith | shekibobo: it remembers the return value it got with a particular set of arguments, with the same args in the future it returns the same result again, from the cache |
| 20:30 | justin_smith | shekibobo: so it's great, as long as you don't count on any side effects |
| 20:30 | shekibobo | ok |
| 20:30 | justin_smith | (and as long as you know you will be getting the same args over and over) |
| 20:30 | justin_smith | so like memoizing + would likely be a waste of ram |
| 20:30 | shekibobo | right |
| 20:30 | justin_smith | but memoizing fib, and fib being recursive, is a smart plan |
| 20:31 | shekibobo | because it remembers all the past arguments->return values that it received? |
| 20:31 | justin_smith | because then you can implement a naive recursive fib, and still get decent performance after the first call |
| 20:31 | justin_smith | right |
| 20:31 | shekibobo | that might be what I'm looking for, then, thanks |
| 20:31 | justin_smith | so it only needs to recurse the first time it hits a particular arg - after that it just gets the result from cache |
| 20:31 | justin_smith | shekibobo: depending on the flexibility you need, there is also core.cached |
| 20:31 | justin_smith | for ttl caching etc. |
| 20:32 | shekibobo | ok, thanks |
| 20:32 | shekibobo | probably memoize for my purposes |
| 20:33 | kristof | justin_smith: "with no error checking from the compiler" What's wrong with a self call that isn't in tail position? A lot of functions on trees look like that. |
| 20:34 | amalloy | kristof: nothing is wrong with it. justin_smith's point is that you don't want to write something that you *think* is tail recursive if it actually isn't |
| 20:34 | justin_smith | kristof: sure, but I mean recur is checked for tail position |
| 20:34 | kristof | gotcha |
| 20:34 | kristof | Carry on |
| 20:55 | shekibobo | ahh, good ol' stack overflow... |
| 21:06 | danielcompton | Headlining feature of clojure 1.8: dissoc-in |
| 21:06 | catern | oh boy |
| 21:07 | gtrak | lol finally |
| 21:07 | gtrak | it's going to break so many codebases |
| 21:07 | gtrak | make them spew warnings |
| 21:14 | TimMc | danielcompton: whaaat, really? |
| 21:15 | amalloy | TimMc: i'm pretty sure danielcompton was saying that as some kind of mix of hope and irony |
| 21:19 | danielcompton | Hope and irony, also will come with disco-in, a function that returns you to the 70's |
| 21:20 | amalloy | y'know, TimMc, i'm always complaining that the behavior of dissoc-in wouldn't be obvious, but you've come up with a behavior so intuitive i can't object |
| 21:24 | justin_smith | danielcompton: only if we get disco-stu as well |
| 21:24 | TimMc | amalloy: No, no, this is dissco-in |
| 21:25 | TimMc | diss + disco in |
| 21:25 | danielcompton | justin_smith: disco-stuart-halloway |
| 21:26 | justin_smith | lol |
| 21:26 | TimMc | What about disco-stuart-sierra? |
| 21:26 | danielcompton | the other Stuart |
| 21:27 | justin_smith | sounds like there will need to be a dance-fight to establish the true holder of the disco-stu title |
| 21:31 | TEttinger | the simpsons marathon is pretty great right now |
| 21:32 | TimMc | What mile are they on? |
| 21:34 | sritchie | just pushed an announcement for om-bootstrap to the mailing list: https://github.com/racehub/om-bootstrap |
| 21:34 | sritchie | doc site with live examples, if anyone’s interested: http://om-bootstrap.herokuapp.com/ |
| 21:35 | sritchie | launching a project on a sunday night, woohoo!! |
| 21:35 | justin_smith | nice |
| 21:37 | TEttinger | 278 hours of one show, wow |
| 21:38 | justin_smith | that's 151.78053237410072 meters of show per hour |
| 21:38 | justin_smith | pretty slow pace for a marathon |
| 21:39 | justin_smith | #units |
| 21:40 | catern | lol |
| 21:41 | catern | good ole units |
| 22:19 | maravillas | sritchie: that looks incredibly handy |
| 22:19 | sritchie | yeah, it’s been great |
| 22:19 | sritchie | maravillas: still missing some of the more awesome components, but I should be able to knock those out this week |
| 22:20 | mynomoto | sritchie: looks amazing! |
| 22:20 | sritchie | thanks! |
| 22:22 | sritchie | it was fun to write the doc site using the library :) |
| 22:22 | mynomoto | sritchie: looks like you have more than react-bootstrap itself. |
| 22:26 | gtrak | is the pedestal lein template out of date? I can't get interactive reload going with run-dev.. other question, is pedestal use growing? |
| 22:30 | beamso | is anyone using schema with clojurescript? |
| 22:32 | gtrak | beamso: lots of people are |
| 22:33 | beamso | i'm having an issue where my attempt to check/validate data against a schema gives me a 'No protocol method Schema.walker defined for type undefined:' message in the console of my web browser. any ideas? |
| 22:38 | amalloy | beamso: that's what a null pointer exception looks like in javascript |
| 22:38 | amalloy | your schema is undefined, instead of a schema |
| 22:44 | beamso | oh, okay |
| 22:46 | sritchie | beamso: yeah, I’ve had that |
| 22:46 | sritchie | typo |
| 22:59 | danielcompton | gtrak: Pedestal App has been 'put on ice', Pedestal Service is still being developed |
| 22:59 | gtrak | yes, I knew that already, I figured out the issue with the template. |
| 22:59 | danielcompton | 'put on ice' -> taken to the great garbage collector in the sky |
| 22:59 | gtrak | haha |
| 23:00 | gtrak | well, I wonder if it'll ever get critical mass, I've been using compojure for a long time already, ready to branch out. |
| 23:00 | gtrak | and the async stuff + transit is appealing. |
| 23:04 | danielcompton | gtrak: is Pedestal using Transit? |
| 23:05 | gtrak | i don't think it is, I'm just thinking ahead. |
| 23:05 | gtrak | i mean, obviously that's something they'll do eventually |
| 23:05 | gtrak | if not internally already |
| 23:06 | danielcompton | gtrak: do you know how much Cognitect is using Pedestal internally? |
| 23:06 | sarcher | hi anyone around that is familiar with clojure data.xml? |
| 23:06 | sarcher | and is willing to help a newb. |
| 23:06 | gtrak | danielcompton: I know they use it for some client projects. |
| 23:06 | gtrak | but that's about it |
| 23:06 | gtrak | that's about all I know, rather. |
| 23:12 | amalloy | ~anyone |
| 23:12 | clojurebot | Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..." |
| 23:13 | lpvb | every channel on freenode has this rule lol |
| 23:29 | arrdem | (inc justin_smith) |
| 23:29 | lazybot | ⇒ 65 |
| 23:32 | TEttinger | sarcher, did you have a question? |
| 23:32 | catern | "has anyone ever dealt with people falling prey to the XY problem?" |
| 23:33 | TEttinger | has anyone seen how ~anyone works? |
| 23:42 | sarcher | TEttinger: http://stackoverflow.com/q/25478704/1310 |
| 23:43 | sarcher | TEttinger: I took the time to write it up on stackoverflow. |
| 23:43 | TEttinger | cool |
| 23:43 | sarcher | I'm trying to learn clojure and the first thing I know I'll need to do is parse xml and do something with it. |
| 23:44 | sarcher | so i'm reimplementing something i've done before in java. |
| 23:44 | sarcher | it didn't take me long to get stuck :) |
| 23:45 | TEttinger | conveniently linked by that stack overflow is http://stackoverflow.com/questions/14333637/how-can-i-lazily-parse-big-xhtml-file-in-clojure?rq=1 |
| 23:45 | kristof | I wonder how clojure performs on Zing. :o |
| 23:45 | TEttinger | it's great how stack overflow waits for you to post to suggest stuff that might make you not have to post :P |
| 23:46 | TEttinger | this first answer here too, sarcher. http://stackoverflow.com/questions/9939844/huge-xml-in-clojure |
| 23:48 | TEttinger | there's a hidden comment there that could be helpful: Got this working with wikipedia dumps - nice. You'll want to wrap it in with-open and dorun to get it to lazily work through a large list: (with-open [rdr (fn-that-opens-a-reader)] (dorun (->> ...as above... |
| 23:50 | sarcher | TEttinger: I actually looked at the suggested answers when i typed up the question. |
| 23:50 | sarcher | I think the links you posted will get me what I need. Thanks! |
| 23:50 | TEttinger | no prob. |
| 23:51 | TEttinger | I can make an answer if I need the karma, I'm at like 13... |
| 23:51 | TEttinger | nah |
| 23:51 | sarcher | feel free to put in an answer |
| 23:51 | sarcher | i'll up vote / accept it haha. |
| 23:51 | sarcher | I wasn't searching for "HUGE XML CLOJURE" |
| 23:51 | sarcher | hehe |
| 23:51 | sarcher | it may help someone in the future |
| 23:51 | sarcher | if not i'll write the answer once I get it working. |
| 23:56 | arrdem | anyone know of a text formatting library in Clojure? |
| 23:57 | arrdem | I'm toying with the idea of a "document" as a sequence of nodes describing plain text formatting operations, and transformers to and from raw strings to enable restructuring/reformatting by blocks. |
| 23:58 | arrdem | say {:op :indent :width 2 :children [:text] :text "my two space indented block"} etc. |