#clojure logs

2012-10-06

00:02aperiodicarrdem: what, gg=G no good?
00:07SgeoHow often is let with mutable over lambda done in Clojure?
00:30SgeoIs there a way to suggest changes to Clojuredoc?
00:31SgeoPretty much to hunt down all uses of #{} where there should be a note about it vs. contains?
00:42SgeoIs it supposed to be interesting that it's easy to nest ->> inside -> but not the other way around?
01:08duck1123is anyone here using lolg to do their cljs logging, and if so, have you noticed the newline after every message?
01:09duck1123although I'm thinking it might be straight up goog.debug.Console that's doing it
01:19arrdemaperiodic: never seen that one before...
01:19aperiodicarrdem: what, =? it's pretty handy
01:20arrdemcan you explain that?
01:20arrdemI've never seen it
01:21arrdemand it has sudenly selected everything
01:21arrdem0.o
01:21aperiodicthat doesn't seem right
01:21aperiodicgg moves you to top of file
01:21aperiodic= is the formatting command
01:22aperiodicG moves you to the bottom
01:22arrdemk... according to SO = only fixes indentation
01:22arrdemah
01:22aperiodicoh, i thought that's what you meant
01:22arrdemI haz idea
01:25arrdembingo
01:25arrdemhanfway there, thanks!
01:25aperiodicsure thing
01:26arrdemcrap..
01:26arrdemImma just eval and pprint this crap
01:49SgeoI have it.
01:49SgeoI know what my ideal syntax for using monads looks like, and how it works.
01:54SgeoIt would probably be best to use jimduey's protocol monads
01:58SgeoAnd relies on delimc
02:55RoxxiHey, I got a riddle for anyone who's still awake... https://www.refheap.com/paste/5569
02:55RoxxiI've spent 2 hours suffering at the hands of this...
02:59ivanRoxxi: you must use the return value from assoc!
02:59ivanRoxxi: you can't just bang on the transient like that
03:00RoxxiOh?
03:00Roxxicrap.
03:00Roxxilol
03:00RoxxiI thought that was the whole point?
03:02ivanhttp://clojure.org/transients see two paragraphs before Example
03:03RoxxiI'm abusive, what can I say?
03:03RoxxiThank you *so* much ivan.
03:04ivanI did not believe it when I read it in Clojure Programming. that ! is very confusing.
03:05RoxxiHeh. For whatever reason, that didn't stick with me either. I just thought it was the same as calling mutative methods.
03:08RoxxiSoooo what's a good syntatic element to use to iterate through a sequence, but so that I can use the return value each time... reduce?
03:33brainproxyhaving little luck getting clojure.pprint/write to enforce a right margin
03:34brainproxywhat I want is for "submaps" of the map to get likewise pretty-printed
03:34brainproxymaybe right-margin isn't what I'm looking for ...
06:37john2xis it possible to use a function with arity 2 with `map`, but pass a "fixed" argument for the second parameter?
06:41john2xah `repeat` does the trick for the second parameter..
07:04_ulisesjohn2x: alternatively you could use an anonymous fn and fix the parameter yourself in there?
07:21jajuHello nice folks!
07:21jajuI need some help with my IDE setup - emacs, nrepl, lein.
08:51casiondoes anyone know of any places that discuss clojure.core.reducers? I need a bit of a boost in understanding their usefulness and application
09:00fredyrcasion: have you looked at the screencast about the library?
09:00fredyror presentation really
09:00casionfredyr: no, I have't found that yet
09:00casionor didn't notice it :)
09:00fredyrhang on, i'll see if i can find the link
09:01fredyroh here it is
09:01fredyrhttp://www.infoq.com/presentations/Clojure-Reducers
09:01casionawesome, thank you
09:02fredyryw
09:12wingyif i want to put a new element in a sequence should i use conj or cons?
09:12wingythey both give the same results
09:12wingy(conj old-sequence 4)
09:12wingy(cons 4 old-sequence)
09:16TimMcwingy: It depends on which abstraction you are using: Sequence or polymorphic collections.
09:19TimMcIf you know it's a sequence, use cons. If you want conj's behavior for a known collection type, use conj. If you have a collection of known or unknown type but definitely just want a sequence back with the new element on the front, use cons.
09:23wingyso it depends on what i want back as well
09:23wingymakes sense
09:45antoineBhello
09:46gfredericks~hello
09:46clojurebotBUENOS DING DONG DIDDLY DIOS, fRaUline gfredericks
09:47antoineBbonjour
09:47antoineBi would like to know how to do "window.test = 12;" in clojure script?
09:48antoineB(. set! (js/window test) 12) doesn't work
09:51wingywouldn't the ability to call (.equals-ignore-case str1 str2) instead of (.equalsIgnoreCase str1 str2) be sweeter?
09:52gfredericksantoineB: (set! (.-test js/window) 12)
09:52gfrederickswingy: there'd be a bit of translation ambiguity there, no?
09:53wingyyeah
09:53antoineBgfredericks: where did you find the doc?
09:54gfredericksantoineB: oh I'm just familiar with cljs
09:54gfredericksantoineB: http://himera.herokuapp.com/index.html has it on the front page
09:55casionwhy is it .-property?
09:55antoineBok thanks
09:55casionI've never touched cljs, just curious
09:56gfrederickscasion: have to distinguish from (.property foo) which calls property as a function
09:56gfredericks(.property foo) => foo.property()
09:56casionahh, I see
09:56gfredericks(.-property foo) => foo.property
09:57antoineBit doesn't use the clojure syntax
09:57gfredericksclojure doesn't have a syntax for that
09:57gfredericksor maybe they added the .-foo stuff recently
09:57gfredericksI'm not certain whether the JVM has such cases
09:57antoineB(. set! (js/window test) 12)
09:57antoineBit is the clojure syntax
09:59casionjava uses getters/setters
09:59casionso variable access is a method call (usually)
09:59antoineBoh i make a mistake the syntax is : (set! (. instance property) value)
10:00antoineBgetters/setters is a convention not a "have to"
10:01casionthat's why I said 'usually'
10:03gfredericksis "foo.bar() = 12" a legal thing to do in JS?
10:03gfredericksI can't imagine what it would mean
10:03antoineBno
10:04gfredericksoh well we still need a syntax for accessing properties
10:04gfredericksin clj do we just use (. instance property)?
10:06antoineB(.-property instance)
10:08gfrederickswell that matches cljs
10:08casionI've never seen .-property in clj?
10:10casionhttp://clojure.org/java_interop#set
10:11casionI sure hope that's correct, since the code I'm working on now does it that way and it appears to work ;)
10:16wingyhow do i get the current timestamp for clj?
10:16wingyso i can save it in datomic
10:19casion,(.toString (java.util.Date.)
10:19clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
10:19casionmeh, that should work
10:20casion,(.toString (java.util.Date.))
10:20clojurebot"Sat Oct 06 14:13:20 UTC 2012"
10:23wingy,(java.util.Date.)
10:23clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ExceptionInInitializerError>
10:24wingycasion: in the repl it returns Sat Oct 06 16:16:49 CEST 2012||
10:24wingyhow can i return the timestamp for the db?
10:24casioniirc date always returns utc
10:25wingyso the repl is converting it to human friendly output?
10:25clojurebotclojure.repl in swank is not useful for two reasons: 0) everything it provides has an enhanced version in slime and 1) having to re-refer it every time you changed namespaces would be annoying
10:42wingycasion: http://joda-time.sourceforge.net/index.html seems nice
10:44wingyand https://github.com/seancorfield/clj-time
11:01antoineB,(for [[x y] '(1 2 3 4 5 6) (+ x y))
11:01clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: Unmatched delimiter: )>
11:01antoineB,(for [[x y] '(1 2 3 4 5 6)] (+ x y))
11:01clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException: nth not supported on this type: Long>
11:03gfredericksantoineB: you're destructuring a number
11:03gfredericks,(let [[x y] 1] x)
11:03clojurebot#<UnsupportedOperationException java.lang.UnsupportedOperationException: nth not supported on this type: Long>
11:03antoineByes just understand it
11:04antoineBi can use partial for what i want
11:04antoineBother idea?
11:04antoineBi mean partition not partial
11:04gfredericksantoineB: I couldn't tell what you were actually trying to do
11:05antoineBhave x = 1 and y = 2 for the first loop, x = 3 y = 4 for the second etc...
11:05antoineB(for [[x y] '(1 2 3 4 5 6) (+ x y))
11:05gfredericksah; yeah partition 2 would work fine
11:07Sgeopartition?
11:07clojurebotpartition is probably not what you want; see partition-all.
11:07dlitvakclojurebot: you dont know that!
11:07clojurebotNo entiendo
11:07dlitvak:P
11:08gfredericksclojurebot: partition |might| be what you want. But also there is partition-all.
11:08clojurebotAck. Ack.
11:08antoineBi assume to be even
11:08gfredericksthen you are good
11:09gfrederickspartition-all doesn't make sense in a lot of contexts
11:09sexpGirlI've got a quick question regarding my "workflow" if I want to use Emacs / nrepl / nrepl.el and also do some unit testing. I'd like to have both a nrepl.el Emacs buffer opened and be able to run unit tests. How should I do it? Should I run some terminal next to my Emacs and launch the tests from there? If so, which command should I use to run the tests?
11:09dlitvaksexpGirl: lein test
11:10dlitvaksexpGirl: considering that you started your project using leiningen
11:10sexpGirldlitvak: so when running the tests I'd have two JVMs running? One for the REPL and one for the test?
11:10sexpGirldlitvak: yup, yup, Leiningen ; )
11:10dlitvaksexpGirl: you can also run the tests from the repl
11:10dlitvakbut im a bit unsure on how that was done
11:11sexpGirldlitvak: ok, I'll go read about "lein test" and then try that
11:31technomancysexpGirl: `lein test` isn't good for a interactive workflow; it's just a sanity check
11:31technomancyyou should use clojure.test/run-tests from the repl during development
11:31antoineBdo you often have name clash in clojure? (eg: (defn abc [name] (name :test))
11:31antoineB)
11:31technomancyspinning up a new lein just to see if your change broke something is way too slow
11:32gfredericksantoineB: you mean accidentally shadowing clojure.core/name? It happens to me sometimes yes.
11:33antoineByes
11:33technomancyantoineB: it basically only happens with name
11:33antoineBis there some technics to avoid it? (now i just rename the args)
11:34technomancytype inference =)
11:35antoineBthere is no type inference in clojure
11:35antoineB(and maybe more in clojurescript)
11:35technomancywell there is, it's just not done yet
11:36antoineBwhat?
11:36clojurebotwhat is bla
11:36technomancyclojurebot: google typed clojure
11:36clojurebotFirst, out of 13700 results is:
11:36clojurebotfrenchy64/typed-clojure · GitHub
11:36clojurebothttps://github.com/frenchy64/typed-clojure
11:36dnolenantoineB: I'm not sure that it's true that Clojure doesn't do a little bit of type inference here and there.
11:37dnolenantoineB: CLJS definitely has some where it needs it
11:37technomancyclojurebot: forget what |is| bla
11:37clojurebotI forgot that what is bla
11:40technomancyantoineB: anyway the real answer is you just learn what the error message for that problem looks like so that when it occasionally happens you can spot it pretty much instantly
11:40antoineBtechnomancy: i write it in the "stuff to check when error"
11:41technomancyin practice it happens fairly rarely
11:41antoineBabout frenchy64 i don't understand what it could be used for
11:45chouserI had the same kind of problem in python the other day, but didn't recognize the error message. Took several minutes to find it.
12:14antoineBis there a convention for mutable method? maybe "!"
12:15akhudekantoineB: that's right, ending in "!" is the convention
12:16akhudekhttp://dev.clojure.org/display/design/Library+Coding+Standards
12:22mindbender1emezeske: is there a way of programmatically telling cljsbuild to check if there any modified files and compile if any
12:24antoineBmindbender1: i remmember seeing that
12:25akhudekcljsbuild auto
12:25akhudekor wait, I suppose you don't mean the command line
12:25mindbender1antoineB: I need to make that call from within my code.
12:25mindbender1yes
12:25akhudektake a look at the cljsbuild plugin source
12:26mindbender1I'm there trying to figure it out
12:26akhudekline 128
12:26akhudekhttps://github.com/emezeske/lein-cljsbuild/blob/master/plugin/src/leiningen/cljsbuild.clj
12:27akhudekIt's private though :-/
12:27akhudekbut you can probably call cljsbuild
12:27clojurebotI don't understand.
12:28akhudekand just specify auto as a subtask
12:28mindbender1akhudek: I'll try that and see what I get get. Thanks for the link
12:29akhudek(leiningen.cljsbuild/cljsbuild project "auto")
12:29mindbender1akhudek: maybe for project I only pass relevant info in a map
12:30akhudekat minimum it needs the build options, but probably other things too
12:31mindbender1yeah
12:36mindbender1akhudek: (leiningen.core.project/init-project (leiningen.core.project/read)) can get me the full project
12:37akhudeknice!
13:34adrian_any tips for abstracting over mutable datastructures? like implementing DOM uis?
13:35adrian_need to rearrange dom trees in response to events
13:35adrian_maybe just suck it up and define lots of ! functions?
13:35akhudekadrian_: maybe check out enfocus?
13:38adrian_hmm I was avoiding it because I didn't like the idea of using css selectors to find dom nodes I'd generated
13:40casionadrian_: I'm doing something similar in clj and I'm using enlive. I'm not famliar with enfocus but if it's comparable then it's rather simple to do
13:42casionI did end up writing 'a few' functions to wrap common selectors, but it's resulted in very easy to read code
13:42adrian_yeah I think enfocus is based on enlive
13:42Frozenlo`You can also check domina (enfocus is built on top)
13:43adrian_using domina
13:43adrian_this might be more what I'm after:
13:43adrian_http://www.haskell.org/haskellwiki/Functional_Reactive_Programming
13:48akhudekadrian_: There was a lot of discussion about that on the dev list not to long ago, but I'm not aware of any commonly accepted solution yet. There are a few libraries trying to implement bits of reactive programming though. e.g. https://github.com/ohpauleez/shoreleave pub/sub
13:49akhudekalso http://dev.clojure.org/display/design/Reactive+Programming
13:50adrian_cool, thanks
13:57lynaghkping: dnolen
13:58lynaghkb
13:58dnolenlynaghk: pong
13:59lynaghkdnolen: So I've run into another situtation where I want to do fancy map matching
13:59lynaghkbeyond my super hackery of core.match as an event bus.
14:00lynaghkBasically, I want to do nested map matching and then rewriting using a set of rules.
14:01lynaghkSomething like, "if an associative object has these (potentially nested) field/value pairs", I want to grab these bits into logic vars and splat them out over here.
14:01lynaghkI took a look at the unification stuff in core.logic, but it was too strict: e.g., {:a ?x} wouldn't "match" with {:a 2 :b 4}
14:02dnolenlynaghk: yeah still pondering how to support that in core.logic, likely a new map like data type that isn't so strict about unification.
14:03lynaghkAnyway, my question is whether 1) loosening this up is fairly straightforward and 2) if you think rules like that would be maintainable in the large
14:03lynaghkah. Yeah, I'm hoping to do a very general kind of matching that includes record types and fields within the records.
14:04dnolenlynaghk: it is pretty straightforward - make a new type that unifies with maps, handle both (== u v) && (== v u) - the unification on this type doesn't care that the count doesn't match, just that the keys presents in the new type are prsent in the map.
14:04dnolenlynaghk: there's actually a ticket for this in JIRA
14:05lynaghkdnolen: here's a bit more context about what I'm actually trying to do: https://gist.github.com/971172f891a8de633203
14:06lynaghkdnolen: ah, cool. I'll look into that, thanks.
14:08dnolenlynaghk: this sounds very interesting.
14:09dnolenlynaghk: I'd happily take a patch for the ticket - http://dev.clojure.org/jira/browse/LOGIC-49
14:09lynaghkdnolen: I think it'd be a lot of fun, yeah. The biggest problem I'm grappling with now is explicit (which I like as a programmer) vs. smart implicit (which is what users will want...until it turns into Clippy)
14:09dnolenlynaghk: http://github.com/clojure/core.logic/blob/master/src/main/clojure/clojure/core/logic.clj#L1502
14:10dnolenlynaghk: map unification is quite simple - it should be easy to see how it should be changed to do what you want for this new type.
14:10clojurebotc'est bon!
14:10lynaghkWe should be able to extend to anything that is associative, no?
14:10dnolenlynaghk: you need a new type say SubMap (horrible name)
14:11dnolenlynaghk: I think you should stick with maps, because vectors are associative too.
14:11dnolenIUnifyWithSubMap
14:11lynaghkdnolen: why not try and get vectors in on the fun?
14:12dnolenlynaghk: I need to think about it some more - but I guess it should be ok
14:13dnolenlynaghk: I would be concerned with protocol resolution ambiguities - but I think since we have a concrete type SubMap or some such - you'll probably be ok.
14:13lynaghkdnolen: yeah, definitely. I'm still very new at all this logic programming---I'm at the "boy, it'd be nice if everything was declarative and pattern-matchy" but haven't actually done serious work with that mindset so I dunno about hidden issues.
14:14dnolenlynaghk: one thing that's a bit weird is that is the type of the reified value.
14:15dnolenlynaghk: so it's might be a bit strange that a map like thing unifies with a vector and you get a map like thing out of unification - not a sequential thing.
14:15dnolenlynaghk: kind hard to say if that would be problem in practice w/o tring it out.
14:17lynaghkdnolen: yeah, I'll start kicking it around if I'm convinced that rules-rewriting is a sane thing to do in the first place = )
14:18dnolenlynaghk: my gut instinct is that it should only work with maps.
14:18dnolenlynaghk: you can easily try it out locally by extending to vector
14:18dnolenlynaghk: if you don't run into trouble we could consider loosening the behavior.
14:19lynaghkThe use case I'm thinking of for my pattern matching is to make a rule that matches, e.g., a scale that starts at 0 (i.e., a record with one field that is a vector whose first element is 0)
14:19dnolenlynaghk: the rules rewriting sounds kinda awesome to me :)
14:19puchaczhi, has anybody put clojure inside postgres process using http://pgfoundry.org/projects/pljava/ ?
14:19lynaghkdnolen: until there are 200 and you don't know what is being invoked to change your spec...
14:20dnolenlynaghk: yes, I think I see what you're going for. But if you want to try for a patch, got for the map behavior and loosen it locally to vector in your project.
14:21dnolenlynaghk: after some time if it seems OK to you I'd be open to considering it further.
14:22lynaghkdnolen: okay, rad. I'll keep you posted.
14:22lynaghkgotta run, thanks for the pointers
14:23dnolenlynaghk: np
14:45Jacob_GoodsonHey everyone
14:46Jacob_GoodsonI need some help with understanding macros
14:46Jacob_Goodson=> (defmacro wrapper [x] `'[(~x :seq)]) #'user/wrapper => (for [x [1 2 3]] (wrapper x)) ([(x :seq)] [(x :seq)] [(x :seq)])
14:47Jacob_Goodsonhmm
14:47Jacob_Goodsonterrible format
14:47Jacob_GoodsonCan someone help me?
14:48dnolenseems like you want - (defmacro wrapper [x] `[(list ~x :seq)])
14:50Jacob_GoodsonI just want to be able to put code in between other code, the seq is there to test if it works
14:50Jacob_Goodsonill try what you gave me
14:50Jacob_Goodsonthank you
14:50dnolen,'[(x :seq)]
14:50clojurebot[(x :seq)]
14:51dnolenJacob_Goodson: you're macro is quoting the following expression, so that's what you're going to get
14:51dnolen,(let [x 1] '[(x :seq)])
14:51clojurebot[(x :seq)]
14:51dnolen,(let [x 1] [(x :seq)])
14:51clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
14:51dnolen,(let [x 1] [(list x :seq)])
14:51clojurebot[(1 :seq)]
14:53Jacob_Goodsonthank you very much for your help(all who helped)
14:53Jacob_Goodsonwhy does list work?
14:54dnolenJacob_Goodson: quoting an expression will produce a list with symbols unevaluated. So it does *two* things.
14:55dnolenby just using list, symbols will be evaluted to their values.
14:55Jacob_Goodsonhmm
14:55Jacob_GoodsonI thought list just returned a list lol
14:56Jacob_Goodsonseems very useful in a macro
14:57Jacob_Goodsondnolen thank you once again
15:01dnolenJacob_Goodson: a list does just return a list
15:01dnolenJacob_Goodson: but you were writing '(... stuff ...) which also returns a list
15:02dnolen(= '(1 2) (list 1 2))
15:02dnolen,(= '(1 2) (list 1 2))
15:02clojurebottrue
15:02dnolen,(let [x 2] (= '(1 x) (list 1 x)))
15:02clojurebotfalse
15:02Jacob_Goodsonso it jsut forces evaluation of a symbol?
15:02Jacob_Goodsonwhen used the way we did?
15:03dnolenJacob_Goodson: it's quoting that prevents evaluation of a symbol.
15:05dnolen,'[x 1]
15:05clojurebot[x 1]
15:05dnolen,'{x 1}
15:05clojurebot{x 1}
15:08dgrnbrgdnolen: I just made a breakthrough with core.logic tracing
15:08dgrnbrgI have successfully traced zebrao
15:08dnolendgrnbrg: whoa!
15:09dnolendgrnbrg: like you produced the search tree for it?
15:09dgrnbrgyeah
15:09dgrnbrgI made a few changes to handle recursion and unification
15:09dnolendgrnbrg: insane :)
15:10dnolendgrnbrg: that's really awesome - would love to see that work get folded in!
15:10dgrnbrgI thread the seen set through all the goals, so that you don't need to retrace an already-seen goal (although the mplus thunks still are a problem)
15:10jamiiWell this is weird - https://gist.github.com/3845808
15:10dgrnbrgwant to see the output of zebrao?
15:10dnolendgrnbrg: hells yeah!
15:10dgrnbrgI'd love to know if there's something i could do differently to recover more/better info
15:11dnolendgrnbrg: btw, I'm up for grabbing a drink & chat on Monday, sorry for the slow reply.
15:11dgrnbrgno problem--sounds great :)
15:12dgrnbrghttps://gist.github.com/3845814
15:12dgrnbrgI made a new type of exp called a :nofollow
15:12dgrnbrgthat's things like project, unify, etc
15:12dgrnbrgthings that you don't want to call into
15:13dgrnbrgdnolen: would you like the zebrao code alongside, or do you know it well by now ;)
15:14dnolendgrnbrg: that makes sense. sure!
15:14dgrnbrgYou see, the one thing that i'm still overtracing is the mplus's streams
15:16dgrnbrgdo you have any idea for how I could give the mplus's continuation thunk a new "seen" set?
15:16jamiiOk, turns out I'm not crazy - https://gist.github.com/3845808
15:17dgrnbrgsince currently each branch has no idea about the other branches, since I think that their substitutions are fixed to be identical when the conde splits their clauses
15:18dnolendgrnbrg: ah yes ... I'm assuming you're using something based on my approach where seen is an atom or something?
15:18dgrnbrgactually, it's all purely functional
15:19dgrnbrgseen is an mvalue
15:19dgrnbrgso in bind I descend to the next goal while carrying along the seen set
15:19dgrnbrgthat's why you have [:goal :seen] after the first time you see a goal in every bindchain
15:20dgrnbrgbut you don't have that for the mpluses
15:20dnolendgrnbrg: nice, so at mplus can't you just go through them independently?
15:20dgrnbrgso i'm looking at the implementation of conde
15:21dgrnbrgwhich does (mplus* ~@(bind-conde-clauses a clauses))
15:21dgrnbrgwhich is going to look like (mplus* (bind* a clauses1) (bind* a clauses2) (bind* a clauses3))
15:22dgrnbrghang on, i've got to disable spelling correction on my mac
15:22dgrnbrgthis is killing me to type
15:24dnolendgrnbrg: ah right ...
15:24dnolendgrnbrg: so this is something you've written from scratch yourself then?
15:24dgrnbrgright, so the issue is that the implementation of mplus in the TraceSubstitutions monad is (mplus [this f] (if (seen (class f) (tracer (conj _tree [mplus :seen] seen)) (let [new-subst (unwrap (f))] (merge-substs this new-subst))
15:24dgrnbrgit's heavily based on the code you wrote in the "interp" branch of core.logic
15:25dgrnbrgbut i had to change some things to play nicely with unification and mplus
15:25dgrnbrgto trace fewer paths, since the code you wrote enumerated all paths and could hit stackoverflow in certain cases, depending on the use of mplus
15:26dgrnbrgthe reason that happened is that it didn't carry the "seen" set to the subtree, only to the parent
15:26dgrnbrgbut you can explore both directions
15:26dgrnbrgwhen i did that, I realized that I had to change where I added the :conde to the search tree, since it messed up the tree rendering code
15:26dgrnbrgso I moved the detection of mplus branches into the mplus method
15:26dnolendgrnbrg: ah right ... to be honest I'm a bit confused at how interp.clj works - I did that very quickly as a proof of concept :)
15:27dgrnbrggive me 20 minutes to annotate my code and push it to github
15:27dnolendgrnbrg: excellent.
15:31doomlordis 'lighttable' any good
15:31dnolendoomlord: it's pretty sweet for playing around with Clojure
15:31doomlordparts of it look like visual studios' "code definition window" on steroids
15:32dnolendoomlord: there's a lot of work that needs to be done before it's good dev environment. it's promising that the team uses it to build it.
15:32doomlordah "dogfood"
15:32dnolendoomlord: even in it's current form it's a pretty impressive ClojureScript app.
15:41dgrnbrgdnolen: here's my shot at documenting what I did: https://github.com/dgrnbrg/core.logic/blob/dgrnbrg-interp/src/main/clojure/clojure/core/logic/interp.clj
15:41dgrnbrgthere's a bit of code in core.clj too, but that's just some interfaces with tracing metadata
15:42dgrnbrgit also has a lot of desugared core.logic :)
15:43dgrnbrgyou can see in the results that it traces the mpluses in parallel, so you get duplicate tracing of goals that appear in multiple branches of the same mplus
15:44dgrnbrgit'd be reasonable to clean that up when replanning for parallelization, but it'd be even cooler if that cleanup step could be skipped
15:44dgrnbrgit's possible that the automatic interleaving precludes that, though, since the substitutions are currently closed over, and it's be a huge refactoring to change that
15:44dgrnbrgI suppose also the tracing could be done with an atom, which would also solve things
15:46jamiiThis makes me so happy:
15:46jamii(deftest self-describing
15:46jamii (= pattern-ast (vec (parse pattern-syntax)))
15:46jamii (= seq-pattern-ast (vec (parse seq-pattern-syntax))))
15:49dnolendgrnbrg: great! I'll take a closer look and try this out later. digging a bit nto constraint refactoring at the moment.
15:49dgrnbrgdnolen: cool, good luck! I'm going to be thinking about what a planner would look like to integrate this w/ jim duey's fj branch
15:50dgrnbrgand fixing some other projects of mine up :)
15:50dnolendgrnbrg: Will said some interesting things about Ciao's approach.
15:51dgrnbrgis there a record of that anywhere I could check out?
15:51dnolendgrnbrg: in Ciao they use complexity annotations - perhaps that + the trace information is enough to infer a good plan?
15:51dgrnbrgI was thinking that i'd just add a simple "parallel-scoring" mechanism to the substitution monad
15:52dgrnbrgsome simple heuristic like unification costs 1 and everything else is free might be sufficient
15:52dgrnbrgand fork after you hit cost 20, reseting the cost back to 0 post-fork
15:53dgrnbrgwith a system for better annotations to further improve the results?
15:53dgrnbrgthat seems easy to implement, and potentially very effective
15:53wingyis there a way to make this more DRY (if (get options :back-path) (get options :back-path) "/")
15:54dnolendgrnbrg: yes I think a simple heuristic approach would be good just collect some basic results. and then perhaps see where annotations might help where that doesn't work.
15:54dnolendgrnbrg: I don't have a specific Ciao paper handy ... and I don't see anythign obvious on their site, they've published a lot
15:55dgrnbrgdo you have any interesting and expensive core.logic programs (> 500ms) that I could look at? And that just use the basics?
15:55dnolendgrnbrg: Will cites this one in his dissertation - http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.53.7913
15:56dnolendgrnbrg: zebra is actually a pretty good one to try this one I think.
15:56dgrnbrgdnolen: that only takes 15ms on my machine :(
15:56dgrnbrgit'll only be meaningful to parallelize something that takes 500ms+
15:56dnolendgrnbrg: it maybe tough to beat the optimal ordering, but reorder the goals, it can be as slow as 500ms.
15:57dnolendgrnbrg: on your machine I think it'll be slower than that.
15:57dnolen~550ms on a 4 core i7 if you have a bad ordering if I remember correctly.
15:57clojurebotswank.core/break is simple debugging breakpoints with swank-clojure: http://hugoduncan.org/post/2010/swank_clojure_gets_a_break_with_the_local_environment.xhtml
15:58dnolendgrnbrg: I'm also keen to see if this work can be applied to the constraint stuff ... parrallel sudoku would be fun.
15:58jamiiI'm trying (and failing) to use the new record reader syntax - https://gist.github.com/3845928
15:58dgrnbrgdnolen: I reversed the goals, and it's doing terrible
15:58dnolendgrnbrg: great! ;)
15:59dgrnbrgactually, it's too terrible
15:59dgrnbrgit's been several seconds
15:59jamiiI have clojure 1.4.0 in my project.clj. Is there any way to double-check that I'm using the right version from inside 'lein repl'?
15:59dnolendgrnbrg: I think if you just put membero goals before firsto nexto righto, you should be good.
16:00doomlorddoes clojure do type infering in its compiler ? .. does the greater use of immutability makes this easier than other lisps
16:01dnolendoomlord: I think most of the type inference in the compiler is around interop - CLJS does some to avoid checking for Clojure's idea of truthy values instead of JS's
16:01dgrnbrgdnolen: it is staying fast :(
16:01dgrnbrgwhy couldn't you write worse code?
16:02dgrnbrgi think the unification in the front is too intelligent
16:03dgrnbrgif i put the bare unification after 4 memberos, i get 70ms/run, but if i put it after the 5th membero, it seems to take a very, very long time
16:03dgrnbrgpossibly diverged
16:05dnolendgrnbrg: maybe but the search is pretty huge if you don't do it right.
16:11dnolendgrnbrg: you're using run* right?
16:11dgrnbrgdnolen: i am trying run1
16:11dgrnbrgis that breaking it?
16:11dgrnbrgit still hasnt finished running
16:11dgrnbrgand somehow it's using 700% cpu
16:12dgrnbrgwtf…i think my machine's going to overheat (if i dissappear, you'll know why)
16:12dnolendgrnbrg: haha, the perils of zebra
16:12AimHere700% CPU? Have they invented virtual processor time to go with virtual memory?
16:13dgrnbrgit's a convention for multicore systems :) 700% cpu means it's using 7 cores fully
16:13antares_AimHere: 700% = 7 cores 100% utilized
16:13AimHereYou guys know how to make technology seem far less miraculous than it should
16:15ivanoh how boring it is to not be really confused
16:15dnolenjamii: hmm I'm not sure why that doesn't work ... the record literal syntax
16:16dgrnbrgwell, this ordering sucks
16:17dgrnbrgi'm going to try something else that's a bit faster
16:17dnolendgrnbrg: http://gist.github.com/3845966, ~500ms for this order on my machine using run*
16:17dnolendgrnbrg: in this case we do want run*, we want proof there is only one answer
16:17dnolenrun 1 doesn't give us that.
16:20dgrnbrgdnolen: awesome--that's giving me around 500ms
16:20jamiidnolen: It works in files, perhaps the lein2 repl is just doing something wrong
16:21jamiidnolen: possibly breaking things into seperate forms by {} () [] which breaks on #user.Foo{}
16:21jamiidnolen: yep - https://gist.github.com/3845982
16:21jamiiWill file a bug for that
16:22dnolenjamii: ah yeah I was trying with lein repl myself.
16:27jamiihttps://github.com/technomancy/leiningen/issues/806
16:33dgrnbrgdnolen: which part of town would you like monday? i work around soho
16:57qerub(read-string "`[1]") ; => (clojure.core/apply clojure.core/vector (clojure.core/seq (clojure.core/concat (clojure.core/list 1))))
16:57qerubIsn't that a really strange result?
17:01devnhello all
17:01ivanqerub: I think it has to do that in case you decide to unquote or splice-unquote something
17:02ivanthere was a ClojureWest talk on macros
17:02devnqerub: which part of it do you think is strange
17:10qerubivan: ok, thanks. I'll take a look at that talk.
17:10qerubdevn: Partly that it returns vector+seq+concat+list instead of just vector, but mainly that the syntax-quote is handled as early as read-time.
17:10qerubdevn: Compare with Scheme: (first (read (open-input-string "`[1]"))) => 'quasiquote
17:11qerubAt first I found it strange that the symbols had been namespace-bound, but then I realized it does that to avoid unexpected variable captures in macros.
17:12qerubIs there a article on the design decisions of Clojure's macro system somewhere?
17:14qerubivan: This one? http://www.infoq.com/presentations/Clojure-Macros
17:14ivanyep
17:14ivanthough it might lack the design decisions you're looking for
17:15qerubLooks interesting anyway.
17:18antoineBsomething i never be sure, is macro done at compilation, i mean alway done at compilation?
17:18devndamn qerub left
17:18antoineBi expect a "no" answer
17:18devner: "damn, qerub left."
17:18qerubdevn: ?
17:19devnoh sorry, my autocomplete wasn't working for you for some reason
17:19devnqerub: quasiquote in clojure has been discussed in the past on the list IIRC
17:19chouserantoineB: understanding that compilation can happen during runtime, the answer is "yes" -- macros are normally only expanded during compilation
17:19devnqerub: https://groups.google.com/forum/?fromgroups#!topic/clojure/bQxffjeQkFU
17:20devnthat might be of some value to you
17:21qerubdevn: Thank you!
17:21antoineBchouser: when i say compilation, i mean "c" like compilation
17:21devnqerub: it's not a whole story, but maybe it will give you some more to work from
17:23antoineBchouser: so in fact view macro as function that don't evalute param and evaluate return is the good way
17:24chouserHm, I think that'll trip you up at some point.
17:24holohi
17:24chouserit's a function that's run at compile time and its return value is spliced into the code being compiled.
17:24antoineBso it takes param rearrange them, and "compile" the result
17:24devnqerub: just dug this up as well:
17:25devnqerub: https://github.com/hiredman/syntax-quote
17:25devnqerub: referenced from: http://blog.8thlight.com/colin-jones/2012/05/22/quoting-without-confusion.html
17:25qerubdevn: Sweet! I'm trying to get a grasp of the different tradeoffs when designing macro systems and my focus is currently on Clojure's, all pointers appreciated.
17:25devnyou've drank the koolaid? err i mean! read Let Over Lambda? ;)
17:26devns/drank/drunk
17:28qerubMacro koolaid…? Sure, I've had my share. I haven't actually read all of LOL yet. Thanks for the reminder to continue.
17:29devnheh, im just kidding. it's an interesting book, but the author just *loves* macros and takes every opportunity to tell you they're the most wonderful thing in the world
17:30devnthere's a bit more nuanced discussion of them in Clojure I think, see: http://blip.tv/clojure/michael-fogus-the-macronomicon-5970233 (which is a response/continuation of: http://blip.tv/clojure/christophe-grand-not-dsl-macros-4540700)
17:30devnqerub: ^
17:30qerubPowerful abstractions are always cool. :)
17:30holois this path correct for bash in heroku to find lein? "PATH=.lein/bin:/usr/local/bin:/usr/bin:/bin". my app is crashing because bash cannot find lein. don't remember doing anything stupid. probably i did it anyway
17:31devnholo: you're talking about on deploy?
17:31holodevn, yes "heroku logs" show it
17:32devnholo: ive actually never needed to tell heroku where lein is because it just knows, but ive been doing most of my work on EC2 as of late. what are you trying to do with lein?
17:33qerubdevn: I had missed fogus' response. Thanks for the links.
17:33devnholo: also, what stack?
17:34devnqerub: not a problem! since you're interested in the nitty gritty, doing some careful hunting on the mailing list is a great idea, but also, there's this!
17:34devnhttp://www.google.com/cse?cx=partner-pub-1237864095616304%3Ae7qm3gycp2b&amp;ie=UTF-8&amp;q=quasiquote&amp;sa=Go&amp;siteurl=clojure-log.n01se.net%2F&amp;ref=www.google.com%2Fsearch%3Fq%3Dclojure%2Birc%26oq%3Dclojure%2Birc%26sugexp%3Dchrome%2Cmod%3D7%26sourceid%3Dchrome%26ie%3DUTF-8&amp;ss=1000j186994j10#gsc.tab=0&amp;gsc.q=quasiquote&amp;gsc.page=1
17:34antoineBis there an interest in using immutability in clojurescript?
17:34holodevn, cedar
17:34devnwhat does your project.clj look like?
17:35devnqerub: yeesh, that url is hideous... http://bit.ly/QTrSiu
17:35holodevn, min-lein-version "2.0.0"
17:35holodevn, want full file?
17:35devnholo: hm, that's the main question i had actually, but yeah, if you dont mind gisting it
17:35qerubdevn: :)
17:35devnor refheaping it
17:35holosure
17:37holodevn, https://gist.github.com/3846200
17:41holodevn, oh zeus.. i had PATH: PATH=... in my heroku config
17:41devn:)
17:41holodevn, fixing it sorted it out of course. i'm sorry to make you waste time
17:42devni was going to say: PATH=./lein/bin:... should be sufficient
17:42devnholo: it's not trouble. happy to help
17:42devns/not/no
17:42holodevn, i appreciate your help. thanks
17:42devnnp
17:43devnholo: have you seen https://github.com/heroku/heroku-buildpack-clojure ?
17:46devnholo: it sounds like you got it figured out, but my experience is that with heroku there's inevitably some vooodoo required at some point, and since technomancy is at heroku and has been doing clojure for a long while, that repo is probably a good resource
17:46antares_devn: hey. If I remember correctly you were part of the documentation debate a few weeks ago, right?
17:47antares_but we have LOGS!!
17:47devni barely remember what happened yesterday, so forgive me, but i'm drawing a blank. it's entirely possible i popped in for a second
17:47devnantares_: sounds like you want to talk about something: hit me
17:48antares_devn: just wanted to say that we are done with plumbing for http://clojure-doc.org and now just need to migrating existing tutorials and other content, and write new one
17:48dnolendgrnbrg: hey I'll be close to the Times.
17:48dgrnbrgdnolen: i don't know where that is :/
17:49devnantares_: i think i have something that may be of interest to you
17:49jamiiWoot - https://github.com/jamii/strucjure
17:50jamiiAnd under 400 LOC
17:50holodevn, am in not i'm using that buildpack by default? at this point i cannot complain about heroku. it's really a great platform service. but the hard times are still to come
17:50jamiiAdmittedly one of those lines is 3k characters
17:50dnolendgrnbrg: times square
17:51antares_devn: yeah? well, do tell
17:51devnantares_: now you lit a fire under me. are you going to be around for a few minutes?
17:51antares_devn: you have 20 in-depth guides about everything Clojure hidden in a private git repo?
17:51dgrnbrgdnolen: is that where the name comes from?
17:51devnantares_: actually, sort of...
17:51antares_devn: sure
17:52holodevn, s/am in not i'm/am i not
17:55devnholo: i think the build pack stuff is new-ish, but im not sure, either way it cant hurt to know about that if you get into slightly more non-standard territory
17:57devnantares_: erm, almost there, i keep blowing the heap for some reason? :X
17:58devnoh, nevermind, found it, was testing query performance
18:00holodevn, that's cool. thanks
18:00devnantares_: https://bc7p.showoff.io/
18:01devnthis is an old idea that im redoing because i did it all wrong the first time, and it's still wrong at the moment, but anyway, type "let" into the input text box and search
18:01devnantares_: you there? (this url is only good for 5min)
18:02antares_devn: looks like hoogle or hayoo? pretty cool
18:02antares_devn: yes, I am playing with it
18:02devnit needs work. it's using postgres right now, but i think it should be primarily a faceted solr search
18:03antares_devn: gee. You are old school :)
18:04antares_devn: seriously though, I think that faceted search can work but if you go with it, ES is much nicer to work with.
18:05adiabaticI'd like to be able to copy and paste the (= …) lines in 4clojure into something that either emacs+nREPL or 'lein test' can handle. I'm trying the latter way, and I'm doing (deftest a-test (map is [(= …) (= …)])) in core_test.clj. Thing is, when I run `lein test`, it errors out with a RuntimeException: Can't take value of a macro. Should I look into dosomething functions/macros/special forms to get what
18:05adiabaticI want?
18:05devnpeople keep telling me that, but one thing that i get for free with solr is ive already built a couple of solr-backed rails sites which use an already built search discovery tool that does a lot of work i dont want to do
18:06devnlike accreting constraints, bookmarks, etc.
18:06zackmmmsHey, are reader macros still off limits in clojure?
18:06devnzackmmms: yes
18:06ordnungswidrigadiabatic: "is" is a macro thus cannot be applied to a value with map
18:06adiabaticordnungswidrig: I figured that's what the error message was saying
18:07ordnungswidrighowever: (map #(is [(= ..) (=…)]) …) or like that should do
18:07ordnungswidrigadiabatic: or you are looking for "are"
18:07devnantares_: anyway, i want to put this out there as sort of a card catalogue of simple examples, and provide an API so you could augment your examples or something
18:07antares_devn: you are scaring me. Rails? There is http://clojureelasticsearch.info ;)
18:07antares_devn: but it's pretty cool. I think it may be less useful in a dynamically typed language but all such experiments lead in the right direction.
18:08aperiodicordnungswidrig: careful, you'll need to realize the sequence that the map produces at some point
18:08devnantares_: well, it gets more interesting, all of the stuff you're seeing there has been run through clojail. what im not currently doing is any kind of analysis, but i could be.
18:08adiabaticordnungswidrig: I probably am!
18:09ordnungswidrigadiabatic: then dorun is more likely what you want
18:09clojurebotRoger.
18:09zackmmmsdven: So even with an extensible reader, there is no way I could write `{parameters}` and have it be valid clojure code
18:10antares_devn: what kind of, for example?
18:10devnantares_: actually, datomic could be really interesting too, people have built the cons cell on top of datomic. there are some holes still though, like the fact that id want to use a different analyzer than the one datomic provides
18:12devnantares_: like when i safely read the sexp and capture it's output and/or value, it creates a map, right? {:input "(+ 1 1)", :out nil, :value "2"}
18:12devnbut it could also flatten it and get all of the symbols used and pop those into :symbols #{+ and or}
18:12antares_interesting
18:14devni mean it's not magic or anything, but since you're already reading the damn thing, you may as well use that opportunity to play around with it. hell, you could try to automatically rewrite the expression using kibit or clojure-refactoring to alternatively provide a thread-first and thread-last version of the same expression
18:16devnantares_: anyway, i guess i'd like to know if you see any value in tying what im building together with what you're working on, sort of a value add for clojure-doc?
18:17antares_devn: yes and no. Let me explain.
18:17antares_devn: we want clojure-doc.org to be more than just a collection of tutorials and guides. And we want to cover more than just the language (stuff like how JVM ecosystem works or what Leiningen is is equally important).
18:17antares_but we won't cover the API reference part, for example
18:18antares_because there are already resources that do that reasonably well
18:18antares_clojuredocs.org will be adapted for 1.4 and ported to be 100% clojure over time
18:18antares_as for this thing, once it works well, I think we can dedicate an article to it and certainly link to it
18:19antares_maybe even give you a subdomain, why not
18:19antares_but clojure-doc.org is primarily a content site
18:19antares_devn: does that answer your question?
18:28wingyhow do i get the request body/querystring in compojure?
18:30aperiodicwingy: https://github.com/weavejester/compojure/wiki/Destructuring-Syntax
18:31dnolendgrnbrg: gotta run here, but I'm happy to meet somewhere halfway.
18:31dgrnbrgdnolen: sounds good-- sync over email?
18:32dnolendgrnbrg: yes, talk soon.
18:33wingyaperiodic: thx
18:40azkeszhi guys, what is the order in which the bindings are executed inside the let form ? and is that guaranteed?
18:40antares_azkesz: anecdotal evidence suggests top-to-bottom and yes, I believe it is always the same
18:41antares_,(let [a 1 b (inc a)] b)
18:41Frozenlockazkesz: 'let' in clojure is like 'let*' in lisp.
18:41clojurebot2
18:41azkeszi don't know lisp though :)
18:41Frozenlock:P
18:41antares_Frozenlock: there is even let* in clojure.core
18:41aperiodic,(let [a 1 _ (prn a) a 2 _ (prn a)] a)
18:41clojurebot1
18:41clojurebot2
18:41clojurebot2
18:41eggsbyazkesz: that just means 'let sequential', so each one happens after the prior
18:41azkesz,(let [b (inc a) a 1] b)
18:41clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context, compiling:(NO_SOURCE_PATH:0)>
18:42azkeszunderstood guys, thanks so much
18:42Frozenlockantares_: What does it do?
18:42azkeszafter all the bindings are inside a vector right? []
18:42antares_Frozenlock: that's a helper for clojure.core/let
18:43antares_Frozenlock: my point is that there probably has been some inspiration from Common Lisp and such
18:43antares_azkesz: right but that may or may not be the reason
18:43chouserlet is actually a macro. let* is the special operator. I think its like let without destructuring
18:43antares_azkesz: you just want that kind of guarantee for conveience
18:43antares_*convenience
18:46azkesztrue but if it were a set... any ordering would be lost i figure, but even as vector the order could've been from last to first, I guess I only meant it's vector instead of set so the order at least is not lost if it's indeed ever to be used
18:47azkeszwell I noticed this code which seems to require that let keep the order else it would've been flawed
18:48SgeoOh, reset! as in the thing for atoms
18:48wingyhttps://github.com/weavejester/valip seems not very active
18:48wingyhttps://github.com/michaelklishin/validateur is better choice?
18:48wingyneed to validate form inputs
18:49azkeszjudging by the author, probably :)
18:50antares_wingy: valip is definitely not bad. validateur in 1.x has some limitations we can't overcome in a compatible way but if you don't need i18n, it will do what you need.
18:51antares_wingy: also, validateur is pretty trivial to extend with custom validators. They are just Clojure functions. Not sure about valip.
18:51wingyantares_: ill look into both
18:52antares_Sgeo: reset! basically set the new value for an atom, completely ignoring the current one
18:52Sgeoantares_, I was getting confused because of the use of reset in delimc, for something totally different
18:54antares_Sgeo: delimc?
18:54Sgeohttps://github.com/swannodette/delimc
18:54SgeoDelimited continuations for Clojure
18:54adiabaticfiddlesticks. Looked up the interface for split-at to do 4clojure #49 and they gave away the answer.
18:55antares_Sgeo: sounds too hardcore for my brain
18:55Sgeoantares_, it is a little for me, but there's a clear connection between these and monads which I think will make monads easier to use
18:56SgeoI think what I want to write will look something like:
18:57Sgeo(reset [(+ (bind-cont [1 2 3]) (bind-cont [4 5 6]))]
18:58SgeoWhich should be the same as (for [a [1 2 3] b [4 5 6]] (+ a b))
18:58SgeoWell, same conceptually
18:58SgeoAlthough different return types I guess
18:59SgeoThe concept is simple: A function that binds a monadic value to the continuation
18:59azkesz,(for [a [1 2 3] b [4 5 6]] (+ a b))
18:59clojurebot(5 6 7 6 7 ...)
19:00SgeoHmm, maybe reset-return...
19:00SgeoWould get rid of that []
19:01SgeoBasically, I want to put dnolen and jimduey in a particle collider and collide them.
19:06wingyhttp://clojurewerkz.org/articles/about.html
19:06wingylooks like a good project
19:07antares_wingy: thank you
19:08wingyantares_: who are you?
19:08wingyMichael or Alex?
19:08adiabaticLambda in a gear-looking thingy. Though it was Half-Life related, at first…
19:08antares_wingy: Michael
19:09wingyantares_: are you using those projects in your company?
19:09wingyyou got a lot of dbs covered
19:10antares_wingy: I use some, Alex uses some. We originally did not use Riak but later replaced mongodb with it.
19:10antares_besides Romulan, no clojurewerkz project is purely experimental
19:10wingyantares_: just curious .. how was it better than mongo?
19:10antares_that's why we have the docs
19:11wingyyeah good that you are focusing on the doc quality
19:11antares_wingy: it can handle very high write volumes with predictable latencies. As the load increases, you just add nodes.
19:11wingyseems like a missing feature in clj land
19:11casionantagon: how do you create your docs?
19:11antares_also, it is ridiculously easy to operate
19:11casionerr, wrong tab complete
19:11casionantares_: how do you create your docs
19:11antares_casion: github.com/clojurewerkz/docslate. Doc repos are under github.com/clojurewerkz
19:12wingyantares_: you are using neo4j as well? its a nice lib
19:12wingydb i mean
19:12antares_wingy: we do, although I believe there is now a better option in the graph DB space
19:12wingyantares_: which one?
19:12antares_but neo4j is the most mature, that's true
19:12antares_titan
19:12antares_https://github.com/thinkaurelius/titan
19:13devnantares_: speaking of subdomains, you sure you dont want a subdomain under getclojure.org? :)
19:14antares_devn: as soon as I am sure I get clojure :)
19:14casionantares_: you don't genreate stubs from the code?
19:14antares_devn: what is getclojure.org?
19:14casiongenerate*
19:14devnantares_: and yeah, that answers my question -- im just trying to think of how we can roll clojure-doc, clojuredocs, and something like im building all into one tight package
19:14devnantares_: the future home of what i showed you earlier
19:14antares_casion: API references are generated, see http://clojurerabbitmq.info nav bar, for example.
19:14wingyantares_: i used to use neo4j before datomic .. why do you think titan is better than neo4j?
19:14Sgeodevn, what did you show antares_
19:14Apage43antares_: I looked at titan.. but it seems to be a kind of naive implementation.. I expect it will never be as fast as neo4j
19:15antares_Apage43: are you serious?
19:15antares_Apage43: well, have you used neo4j for real?
19:15devnSgeo: https://m61j.showoff.io/
19:15Apage43i've used neither at scale
19:15Apage43just played with them
19:15devnSgeo: type "let" into input -- it's undergoing a rewrite right now
19:15Apage43so i am coming from nowhere
19:15antares_neo4j is nice but 1. It's not a speed daemon and because it is transactional, it probably never will be. 2. It has no backups or HA in the OSS edition. The latter is why I will probably never used it again.
19:16antares_titan with cassandra and hbase has replication and distribution built-in
19:16casionthis is apparently over my head
19:16wingyyeah https://groups.google.com/forum/#!msg/aureliusgraphs/vkQkzjN8fo0/Sz_pLjWr7tcJ
19:16antares_Apage43: and Titan developers test it on data sets like full orkut dump
19:16antares_billions of relationships
19:16Apage43It's just the "distribution" part where I feel like it gets to be a hard problem.
19:16antares_it certainly has reasonable performance even with huge volumes
19:17antares_Apage43: they outsource the problem to hbase and cassandra
19:17antares_which, in my opinion, solved it pretty well
19:17antares_this is the most interesting part, you get transactions thanks to titan even on top of eventually consistent data stores
19:17antares_that is pretty remarkable and gives you a lot of good from both sides
19:18antares_Apage43: neo4j distribution is pretty complex, especially the id generation and syncing part with concurrent transactions :)
19:18antares_Apage43: so, it's fair to be skeptical about titan because it is young, but neo4j is far from perfect, especially on the ops side
19:19Apage43ah, well, I figured neo4j solved distribution by not having it =P
19:19antares_Apage43: the library :) there is REST server on top of it now :)
19:19antares_Apage43: titan can use berkeley DB Java edition to work basically like neo4j embedded
19:19antares_Apage43: also, keep in mind that neo4j is GPL and titan is apache 2.0
19:19antares_oceans of difference
19:19wingyi thought about neo4j or datomic but settled with datomic since it is closer to clojure and also it has time travel built in :)
19:20wingyantares_: do you have thoughts on datomic?
19:20antares_wingy: haven't used it. I think its value proposition is significant but I don't have any short term need in it. And they definitely don't need a Clojure client from us :)
19:20Apage43Oh yeah, the only thing I'd really like neo4j better than other things for is raw perf, which it can only do because it can't scale out
19:21Apage43so if you really do have billions of things it's probably hard to use it anyway.
19:21wingyApage43: my friend said that sicne Neo4j can't scale out to multiple machines he wont use it
19:21antares_wingy: if you like clojurewerkz and the docs, feel free to spread the word on twitter or clojure ML. Not to stroke our egos, to raise the awareness of now much a difference solid documentation makes.
19:22wingywhat happens when your machine's capacity runs out with Neo4j? then you are screwed?
19:22lpvbWhy is ClojureCLR not gaining any interest?
19:22Apage43wingy: right. Titan does that. and it does the silliest thing that will work, which is it just shoves the graph nodes in a distributed k-v store like cassandra or HBase
19:22antares_wingy: with Neo4J Server, you are not. But it's not about capacity, it's the backups and HA parts in the Community Edition that are problematic.
19:22UrthwhyteF# and entrenched interests probably?
19:22casionantares_: is there any intent on documenting how you document things?
19:22wingyantares_: unfortunately im not very popular in Twitter :) .. I will be one day though I hope :)
19:22antares_casion: hm, there honestly isn't much to it. We can write a blog post.
19:22wingybut i usually spread words in irc channels and google groups
19:23devnlpvb: lots of reasons, some historical, some related to number of people actively working on it, F#, and probably more
19:23antares_casion: the toolchain is very straightforward, it uses Jekyll and gists (or Pygments, in which case you will need to install it), everything is in a git repo and written in Markdown.
19:23casionantares_: straightforward if I knew what any of those things were :|
19:23devncasion: google :)
19:23wingyApage43: like Datomic .. it is using other dbs as storage
19:23antares_wingy: you can instantly become popular on the clojure ML :)
19:24wingypretty clever .. like dbs are using fs
19:24holoRaynes, your conch version number doc disagrees between github and clojars
19:24casiondevn: if I have to research it, I would say it's not exactly straightfoward :)
19:24wingythey are one level on top of those dbs
19:24antares_wingy: just post something saying that docs make a huge difference and it should be a top short term priority for Clojure/core and such.
19:24casionnot necessarily complicated, but not straightfoward
19:24antares_wingy: of course, if you don't want to, no problem with that :)
19:24devncasion: seriously, if you googled them you could grok the whole thing by definition
19:25antares_holo: submit a PR? Raynes is pretty ace at merging other people's work
19:25Apage43wingy: yeah, datomic can do a lot more clever stuff around caching though
19:25wingyantares_: whats clojure ML?
19:25devnmarkdown: turns plaintext to HTML, jekyll: static site generator, gists: gist.github.com (a pastebin), pygments: syntax highlighting
19:25antares_casion: ok. I think we will write a blog post next weekend. I have something pretty cool to work on and announce next week.
19:25antares_wingy: Clojure mailing list, the google group
19:26antares_wingy: https://groups.google.com/group/clojure
19:26holoantares_ it's just a small doc mistake, is it really necessary? ._.'
19:26devnantares_: so are you going to build a static site generator for clojure-doc?
19:26casiondevn: that was far more useful than the last 15 minutes of googling I've done
19:27devncasion: instead of google i should have maybe said github
19:27antares_holo: of course, people will be using an outdated version otherwise
19:27devnquicker to skim the readmes of those projects
19:27antares_devn: we have it already
19:27casiondevn: it's pretty well to assume I've lived in a cave for the last 15 years
19:27devnantares_: where's the repo?
19:27antares_devn: we use jekyll with a template repo all clojurewerkz.org projects use
19:27devnantares_: oh, right, but you said earlier it will be 100% clojure? no?
19:27antares_devn: https://github.com/clojuredocs/cds
19:27antares_devn: clojuredocs.org will be
19:28antares_the API reference site
19:28antares_not CDS
19:28devnnot clojurewerkz or clojure-doc?
19:28devnantares_: the domain is a bit confusing given there's already a clojuredocs
19:28antares_devn: clojure-doc (CDS, clojure doc site). clojurewerkz.org is not affiliated with CDS>
19:28antares_devn: yeah but we don't have control over clojuredocs.ogr
19:28antares_and there is no way to quickly split it into two parts
19:28devnis zkim MIA?
19:29wingyantares_: again, really love your initiative with the umbrella project .. when i get money ill poor somewhat in clj community making libs great
19:29antares_devn: we could not reach him so far. I hope someone in SF will help me with that soon.
19:29wingypour
19:29antares_devn: the main reason is that we simply don't want to wait and potentially destabilize clojuredocs.org
19:29antares_but we need to publish our progress somewhere
19:30antares_we are now at a point where all there is left to do is to write, edit, publish, rinse, repeat
19:30wingygood doc .. good defacto libs .. simple and easy to create more projects
19:30devnweird, zkim's last commit is a month ago and his twitter moved from napple to _zkim, which doesnt exist
19:30antares_with a few people involved. We will also have guidelines in place for other folks who want to contribute.
19:30antares_Like a list of low-hanging fruits, document structure, etc
19:31devnantares_: im already on board, buddy
19:31devnjust give me a list of crap to do
19:31antares_devn: as far as I know zkim does not currently use Clojure at his company. But I am sure we will reach him somehow.
19:32antares_devn: we have a list of initial guides that need to be written. I can show it to you right now.
19:32devnhit me
19:33wingyantares_: you could almost start a company around those projects
19:33antares_wingy: probably not :) at least, no short term interest
19:34wingyim sure there are demands on high quality libs/support
19:34wingyno?
19:34clojurebotno is tufflax: there was a question somewhere in there, the answer
19:34lpvbI'm getting tired of vim not having great language integration. Does emacs have clojure autocompletion and jump to declarations?
19:34technomancynot enough to support a company
19:34wingyare you sure? libs are really valuable to other companies
19:35wingyin that case the clj market is not very high
19:35technomancycorrect
19:35devnman, the CA discussion is happening again on the clojure ML
19:35wingytechnomancy: its that bad huh
19:36wingyi wonder why though .. clj is way cool
19:36casionlpvb: yes
19:36wingyperhaps datomic can boost it up and make marketing for it
19:36devni work for a consulting company and we have people who are asking us for clojure specifically
19:36antares_wingy: there are enough companies using Clojure but not enough yet to build a complete company around just libraries :)
19:36wingyare you sure?
19:36wingyi mean libs are everything :)
19:36antares_wingy: the same is true for even pretty popular languages. So companies like Typesafe do all kinds of things.
19:37antares_wingy: nope. Working products are everything.
19:37devnim curious how well chas has done on clojure atlas
19:37antares_but it takes more than libs to get there
19:37devnclojure atlas should probably get some love somewhere
19:37devni know it's for pay, but it's really useful
19:37antares_devn: are you getting my PMs?
19:37ivanit does not cost $200 to send a letter from Russia
19:37devnantares_: yeah, sorry, just saw them
19:37antares_ivan: yes it does
19:37antares_ivan: via fedex
19:38antares_and if you use Russian postal services, we all know how reliable it is
19:38ivannormal postal mail is reliable enough in my experience, and you can always send two
19:39ivanmaybe your local post office really hates you?
19:39casionmy experience with most russian postal has been very good
19:39wingy"you want your devs to build products or libs"
19:39antares_ivan: yeah it just takes 4 months
19:40antares_ivan: so if I want to contribute a small doc improvement, I will have to wait for 4 months. that's ridiculous.
19:41antares_wingy: you are partially right, there is value in good libs. But to have a successful company behind a language you will have to do way more than just develop libraries. Which is fine, I just don't think it's the goal for clojurewerkz right now.
19:41wingyyepp .. just saw something really valuable in your project
19:42wingyquality :)
19:42wingyi personally would love to pay you for maintaining stuff
19:42wingyif i want that .. a lot of people want .. i can't be alone
19:42wingythats like the golden rule .. one person wants something means big market
19:43wingyor lets rephrase .. one person wants to pay for your thing means big market
19:43antares_wingy: maybe we will set up a donations site but I believe it will be better if both myself and Alex keep working on clojurewerkz.org as part of working on something else :)
19:43antares_and gain more contributors (Neocons, Monger and Welle already have several)
19:43wingyyepp .. was just sharing my thoughts :)
19:44akhudekis there a clojurescript + compojure lein new template somewhere?
19:46wingyakhudek: start setting up compojure first .. then clojurescript with lein-cljsbuild .. its dead simple
19:46wingyyou dont need no template
19:46akhudekI was just being lazy, I already have projects using the combo. ;-)
19:46wingyah
20:14adiabaticI can use the value of (type "blah") as a map key, right?
20:14danlarkinwhy not try it
20:15danlarkin,{(type "blah") 42}
20:15clojurebot{java.lang.String 42}
20:15adiabaticgood, that means I'm not going off in the wrong direction
20:15adiabaticthanks!
20:16adiabatic,(= (type "blah") (type "blaaaaad"))
20:16clojurebottrue
20:16adiabatic,(== (type "blah") (type "blaaaaad"))
20:16clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.Number>
20:22SgeoI am contemplating a function that I want to call bind-cont
20:22SgeoBut, considering that it would likely get used frequently, is bc a good name?
20:22Sgeoor BC?
20:23adiabaticYou can always make a shorter alias later, right?
20:29zoldarantares_: I will do the pull request but one question, because I'm a bit of a noob when it comes to git workflow - how to get my fork's master in sync with original repo? :)
20:29antares_zoldar: if you don't have a fork?
20:30antares_zoldar: in that case, just fork it. If you already have a fork, it should be as simple as pulling from Neocons master and pushing to your repo.
20:30zoldarantares_: no no, I already have a fork, I just wonder if this is something done from gui, or is it just explicit pull on git level
20:30zoldarokat
20:30zoldarokay*
20:30antares_zoldar: git pull git://github.com/michaelklishin/neocons.git master should get you there
20:31Sgeo$mail dnolen I need to be able to write an fn that only makes sense in the context of a reset, but is not itself in a reset
20:31lazybotMessage saved.
20:31SgeoHmm, then again, maybe (reset (defn blah)) would work sufficeintly well
20:41holodid anyone notice that when running scripts using "foreman run <command> <args>", if <args> contains a single flag -x/--xxx, the number of arguments printed by echo $# will be 0?
20:43holowish is really bad..
20:43holo*which
20:47technomancyholo: for doing clojure dev on heroku, you really only need foreman to check the syntax of your procfile
20:47technomancyit's really not necessary for running your app in dev
20:48technomancyforeman is not that useful with leiningen since lein has good alias support
20:52holotechnomancy, i need foreman to read .env
20:53SgeoOk, this seems way way way way way too easy
20:54SgeoAnd it doesn't work
20:56SgeoIt may be delimc brokenness
20:57SgeoAs in a "doesn't know how to use Clojure" way, not a "Some weird concept has gone wonky" way
20:58Sgeohttps://github.com/swannodette/delimc/blob/master/src/delimc/core.clj#L131
20:58SgeoCan someone explain to me the purpose of that ~'make-funcallable?
20:58SgeoWould make-funcallable not work there for some reason?
20:59SgeoCould ~'make-funcallable cause issues when it comes to namespacing?
20:59holotechnomancy, what do you mean with "good alias support"?
20:59clojurebottechnomancy: you're right I should explain the reason. The reason is I would like to be able to call aether with an extra parameter for introducing my own :transfer-listener.
21:00holohun?
21:00clojureboti think chunking is to blame
21:00SgeoYep, that construct is used elsewhere and causes issues
21:00SgeoI think I understand why it would be used though
21:01holoclojurebot is not really a bot?
21:01zoldarantares_: done, hope I haven't screwed anything up
21:01aperiodicoh man, clojurebot just passed the turing test!
21:01aperiodic~botsnack
21:02clojurebotbotsnack is scoobysnack
21:02aperiodicclojurebot: forget botsnack is scoobysnack
21:02clojurebot'Sea, mhuise.
21:02Sgeo~botsnack
21:02clojurebotThanks! Can I have chocolate next time
21:03antares_zoldar: pretty sure you haven't :) testing it locally…
21:04doctordaebak_dropping by to let everyone know about a hardware project that some in the clojure community might be quite interested in
21:05doctordaebak_kickstarter to create a 16-core computer for $99
21:05doctordaebak_http://www.kickstarter.com/projects/adapteva/parallella-a-supercomputer-for-everyone
21:06doctordaebak_hoping those here who want to see it funded, will also pass the word on to any who are interested in multithreaded and parallel applications
21:07antares_zoldar: merged. One minor thing: please move the test to relationships_test. I will release a snapshot either way, of course.
21:08zoldarantares_: at first I intended to do so, and even started adding a test for nodes but then I've spotted the test in cypher_test and followed the pattern
21:08antares_zoldar: the idea is that we will move more and more stuff to use cypher internally but tests are organized by features, regardless of the implementation
21:08SgeoI want to slap dnolen
21:08antares_zoldar: yeah, that's for direct use of Cypher
21:10zoldarantares_: ok, I will keep it in my mind
21:12SgeoWhile developing with the aid of the REPL, how much of a risk is there of removing a function but still accidentally relying on it, and not noticing because the function is still defined in the REPL?
21:12antares_zoldar: thank you for contributing! The most exciting part of working on OSS is seeing other people find your projects useful enough to get involved :)
21:12antares_Sgeo: it is more common to hit an old protocol implementation. It is not very common, though.
21:13antares_but you can hit various issues with hot code reloading, it is a very hard problem. I don't think anybody but Erlang solved it even distantly well.
21:18technomancyholo: just run export $(cat .env) first
21:18technomancyholo: or use environ
21:19SgeoJust verifying: I'm allowed to say that dnolen made a mistake, right?
21:19technomancyit's not required to put things in .env; it's just a convention
21:20technomancynot a particularly good one on the JVM given that the environment is immutable without restarting
21:22technomancySgeo: it isn't that uncommon to accidentally depend upon a function that isn't there anymore unfortunately
21:23Sgeoclojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Can't specify more than 20 params, compiling:(c:\Users\Sgeo\DEV\Clojure\delimonads\src\delimonads\core.clj:5)
21:23technomancyholo: by good alias support I mean the fact that you can add an alias for a complete command, like :aliases {"go" ["run" "-m" "my.launcher" "--fast"]}
21:29antares_Sgeo: JVM methods cannot take more than 20 params
21:30SgeoI have no idea how I'm giving anything more than 20 params
21:32zoldar&((def n [:a :b :c]) (def r [22 33]) (butlast (interleave n (conj r nil))))
21:32lazybotjava.lang.SecurityException: You tripped the alarm! def is bad!
21:33zoldar&(let [n [:a :b :c]) r [22 33]] (butlast (interleave n (conj r nil))))
21:33lazybotjava.lang.RuntimeException: Unmatched delimiter: )
21:34Sgeoantares_, I don't see what in the code could cause that :/
21:34antares_Sgeo: is the source up somewhere?
21:34zoldar&(let [n [:a :b :c] r [22 33]] (butlast (interleave n (conj r nil))))
21:35lazybot⇒ (:a 22 :b 33 :c)
21:35zoldarright... is there some more elegant/succint way to do that?
21:35Sgeohttps://gist.github.com/3846768
21:36SgeoOh hey my docstring's wrong
21:37gfredericks,(doc interleave)
21:37clojurebot"([c1 c2] [c1 c2 & colls]); Returns a lazy seq of the first item in each coll, then the second etc."
21:38SgeoAt any rate, I know how to fix delimc's problem with namespacing
21:39gfredericks&((fn f [xs ys] (when (seq xs) (lazy-seq (cons (first xs) (f ys (rest xs)))))) [:a :b :c] [22 33])
21:39lazybot⇒ (:a 22 :b 33 :c)
21:40SgeoTell me if I'm wrong, but if you :use a namespace, can you still use the vars within that namespace in a fully qualified way?
21:40gfredericksI think you can use anything fully qualified, and are responsible for it being loaded
21:41gfredericksso if you :use it then you've satisfied the being-loaded part
21:41SgeoThanks
21:41SgeoSo I just need to make every special form-ish thing defined by delimc be fully-qualified
21:42SgeoI should probably do that for everything not just delimc.core
21:43SgeoHow do I restart or at least close the REPL in nREPL.el?
21:44zoldargfredericks: doesn't (seq ...) actually realize its' argument (provided it's a lazyseq) - that would in part defeat the purpose of using lazy-seq.. ?
21:46gfrederickszoldar: just the first element
21:46gfrederickszoldar: I don't believe it defeats the purpose of lazy-seq
21:51zoldarSgeo: Sgeo there's nrepl-restart and nrepl-quit in upcoming 0.1.5 version, but I suppose you would have to fetch it directly from github
21:51zoldargfredericks: I suppose that I'm mixing something up, nevermind...
21:51gfredericksit's tricksy
21:55holotechnomancy, nice. can lein also parse env files in format ENV=value?
21:56SgeoThe more I think about it, the more I prefer how Common Lisp handles symbols over Clojure
21:56SgeoAt least, to the extent I understand the different
21:56Sgeodifference
21:57gfrederickshow does common lisp handle symbols?
21:59rbarraudVery nicely ;-)
21:59rbarraudPCL FTW
22:01SgeoAs far as I understand, the namespace is always part of the symbol, when a symbol is read in by the reader, the namespace is known
22:02gfredericksdoes that mean that the reader expands 'conj to 'clojure.core/conj or that the programmer types in 'clojure.core/conj?
22:03SgeoThe former
22:03Sgeo,*ns*
22:03clojurebot#<Namespace sandbox>
22:03Sgeo,(= 'sandbox/foo 'foo)
22:03clojurebotfalse
22:03SgeoIn Common Lisp, the equivalent would be true, iirc`
22:06Sgeo* (intern "FOOBAR")
22:06SgeoFOOBAR
22:06Sgeo:INTERNAL
22:06Sgeo* (eq 'cl-user::foobar 'foobar)
22:06SgeoT
22:07gfredericksso that makes the qualification behavior in ` unnecessary?
22:07SgeoIf I understand everything correctly, yes
22:08gfredericksare there other advantages?
22:08holotechnomancy, forget my question. just noticed the envs are already in a format compatible with bash. thanks for the tips. i'm going to move this to lein
22:09Sgeogfredericks, for starters, dnolen's library would be working
22:09Sgeo>.>
22:09gfrederickswhich lib?
22:09Sgeodelimc
22:18rbarraud20params sounds pathological to /me
22:19casion&(let [n [:a :b :c] r [22 33]] (replace r (take 5 (interleave n (range 3)))))
22:19lazybot⇒ (:a 22 :b 33 :c)
22:19Sgeorbarraud, well, I for one am not doing it deliberately
22:20casionif you throw counts for n and n+r, it would work with arbitrary sized seqs
22:20SgeoCan Clojure fns accept more than 20 parameters?
22:20amalloyof course
22:20casionand it's faster than the aforementioned solutions
22:20SgeoOk, good
22:21SgeoBecause apply means that people seem to write fns that take arbitrary amount of parameters (e.g. concat) and with apply it actually becomes reasonable to feed in a lot of parameters for various possibly useful reasons
22:21octagoncasion: what does the ampersand do there in front of the expression?
22:21Sgeooctagon, tells lazybot to do it
22:21Sgeoand , is for clojurebot
22:21octagonSgeo: oh ok
22:22gfredericksand $ is for lazybot. And ~ is for clojurebot. And ## is for lazybot. And ...
22:22casionzoldar: ping if you didn't see the code I posted above
22:23zoldarcasion: seen it, thanks
22:24octagonit's interesting that ((fn (vector 'x) (inc x)) 1) gives an error
22:24gfredericksfn is not a function
22:24octagonseems like that should not happen, but i can see why it fails
22:24octagonyes
22:24octagonbut still
22:25casion&((fn [x] (vector 'x) (inc x)) 1)
22:25lazybot⇒ 2
22:25gfredericksin that case you'd have to quote the x in a vector as well
22:25casionseems to work fine
22:25gfrederickscasion: he means using (vector 'x) instead of [x] as the arg list
22:25casionohh
22:26Sgeooctagon, you might like Tcl
22:26octagonthe point is that you can't feed in a list of forms
22:27octagonyou need to use the reader syntax for vector
22:27octagoni don't see fn* exposed in my repl
22:27gfredericksfn* is a special form
22:27gfredericks,((fn* [x] x) :hehe)
22:27clojurebot:hehe
22:28gfredericksyou can use it, you just can't reference it
22:28octagon,((fn (vector 'x) x) 1)
22:28clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol>
22:28octagon,((fn* (vector 'x) x) 1)
22:28clojurebot#<CompilerException java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to clojure.lang.IPersistentVector, compiling:(NO_SOURCE_PATH:0)>
22:29octagonone of the cool things about lisps is that you can normally convert a list of things into an expression that can be evaluated
22:29octagoni don't see a way to do that here
22:30gfredericksmacros and eval
22:30octagonunsatisfying
22:30lancepantzanyone know how to get an nio.ByteBuffer from a BufferedInputStream?
22:30octagonyou'd have to use the macro to give you the reader syntax [x]
22:31gfredericks,(eval (list 'fn (vector 'x) (list '+ 15 'x)))
22:31clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
22:31gfredericksoctagon: I'm not sure what you mean by that
22:31Sgeooctagon, check out Tcl, it works exactly how you want in this regard
22:32Sgeo(but probably not in many other regards, in particular, not very functional, no quasiquoting, stringiness, and mutable things require names)
22:32octagonSgeo: tcl really? i wasn't that into it in 1999
22:32SgeoBut the point is that there are no special forms in Tcl.
22:33SgeoIf something's expecting a block of code, or of some syntax, you can dynamically create it
22:34octagonSgeo: well you don't need to resort to tcl for that
22:34octagonSgeo: most lisps work that way
22:34Sgeoerm, not really? At least, not in a way that doing it is generally supported/accepted/idiomatic in the community
22:35octagonwhy is the argument list a vector and not a list, like in scheme, for instance
22:35gfredericksclojure uses vectors in a few different syntactic places because it gives a bit more visual variety to the code
22:35gfrederickseasier to read
22:36octagongfredericks: that's not a reason
22:36gfredericksoh darn
22:36SgeoCommon Lisp, Clojure, and Scheme have macros, which accept literal code, but no clean way to generate code to pass in to a macro, without using the (unidiomatic in those Lisps but idiomatic in Tcl) eval
22:36gfredericksI'll have to work on that.
22:36octagonthat's something you add to your emacs
22:36octagonthere must be a technical reason
22:37casionI've seen it explained elsewhere that it's the reason gfredericks stated
22:38casionfor that matter, it was an IRC log with rhickey speaking
22:38gfredericksoctagon: I appreciate that the code has decent readability without having to lean on a particular text editor
22:39octagonwell i'm surprised, then. i kind of thought that kind of syntax semicolon vs newline stuff was debunked
22:39casiondebunked?
22:39scottjoctagon: another reason that Rich has mentioned is that he doesn't like that lists are overloaded and used for both function calls and grouping. He prefers those be separate.
22:40octagonscottj: how so?
22:40SgeoWell, Lisps tend to need correct newlines and indentation to be readable :/
22:40Sgeo(let [a 1 b 2] ...) the [a 1 b 2] is not a function call or a macro usage
22:41Sgeo,(doc vec)
22:41octagonSgeo: okay, now that is an actual reason
22:41Sgeo,(doc vector)
22:41clojurebot"([coll]); Creates a new vector containing the contents of coll."
22:41clojurebot"([] [a] [a b] [a b c] [a b c d] ...); Creates a new vector containing the args."
22:41gfrederickslist forms tend to accentuate the first element
22:41octagonSgeo: so without the vector you'd need nested lists
22:42octagonas in scheme
22:42gfredericksI think all syntactic vectors in clojure could just as well be lists
22:42SgeoNot a matter of nested lists, just a matter of stylistically preferring vectors over lists in circumstances where the first element isn't especially important
22:42octagongfredericks: ugh, that's silly. in racket you can use [] in place of () if you like how that looks better
22:43scottjoctagon: rich talks about this in his simple made easy talks btw
22:43octagongfredericks: racket treats all [] as parens for that reason, so you can make it more "readable"
22:45gfredericksthat makes the code across the community less cohesive
22:45octagonSgeo: i can see the usefulness of using a vector instead of a list for the reason you mentioned; that it isn't an expression that will be evaluated
22:46octagonSgeo: but being able to express a program as a list of things is so fundamental and useful
22:46SgeoI should note that as far as I know it's a stylistic thing. Relying on it in a code-walker is probably a bad idea
22:47gfredericksoctagon: what is an example of something concrete that you can't easily do in clojure because of this?
22:47SgeoHow is (let [a 1 b 2] (+ a b)) not a list of a symbol, vector, and list?
22:47SgeoHence, a list of things?
22:47octagongfredericks: well i have this thing, it's data that is listlike
22:48octagongfredericks: and i wrote some stuff in clj that takes these lists and defines the underlying symbols that appear in this data
22:48octagongfredericks: the idea is that you evaluate the data in this special environment, and it produces a result
22:49octagongfredericks: this works because any data that is listlike can be evaled, and as long as the symbols that appear in the list data exist in the environemtn, it can be evaluated
22:50octagonthat seems like a pretty awesome property
22:50octagonbut the fact that you must introduce vectors to the list structure is unfortunate for my application
22:50SgeoI assume you're macroexpanding-all?
22:50Sgeon/m, I don't get it
22:51casionI thought he asked what your application was were this was an issue?
22:51octagonwell the project is here:https://github.com/micha/hlisp-starter
22:51octagonit reads the DOM body of the html page and evaluates it as a cljs program
22:52gfredericksyeah I'm having a hard time figuring out what the blocker is. You can (eval (list 'let (vec (apply concat name-value-map)) my-code))
22:52gfredericksthat doesn't apply to cljs though
22:53octagonwhat i can't do is <defn><vector><x/></vector><x/></defn>
22:53octagonrather <defn><vector><quote><x/></quote><x/></defn>
22:54gfredericksoh I see; so you're working (for some reason) in a domain where you only have one type of sequence
22:54octagonno, i could introduce syntax for vectors, of course
22:54octagonwhich i will do
22:55octagonbut i was just curious about why this non-uniformity was adopted, and i got some good references, so thanks for that
22:56SgeoI still don't like the existence of namespace-unqualified symbols
22:57Sgeo(require [some-ns :as some-alias]) (= 'some-ns/foo 'some-alias/foo) should be true imo
22:58SgeoIn the Common Lisp version, I had to intern the symbol. Now, I think I see why
22:58SgeoHmm
22:58Sgeo,(= #'ns #'ns)
22:58clojurebottrue
22:58SgeoHmm!
22:58gfredericks?
22:59SgeoI know how to fix delimc.
22:59SgeoResolve the symbols, should resolve to a var, right?
22:59Sgeo,(resolve 'ns)
22:59clojurebot#'clojure.core/ns
22:59gfredericksyep
22:59SgeoThese vars are in fact exactly what I want when I speak of Common Lisp symbols.
23:00gfredericksthat sounds like an important realization :)
23:00SgeoThis needs to be mentioned somewhere
23:01gfredericksthere was a talk at clojure/west entitled "namespaces, symbols, vars, oh my!" I think
23:01gfrederickssurely a video o the interwebs by now
23:01SgeoI hate videos. Any transcripts?
23:01gfredericksha; no idea
23:01gfredericksbut you probably understand most of it b ynow
23:11gfredericksI say that but just remembered I haven't actually seen the talk myself
23:13Sgeogfredericks, watching now
23:14gfredericksSgeo: let me know how it is :)
23:17Sgeogfredericks, the slides are somewhat unreadable, as in, not high enough resolution
23:29gfredericksdrat.