#clojure logs

2013-12-20

00:26tmallenis this the place for clojurescript discussion?
00:27tmallenthere are 37 people in #clojurescript but no topic so i thought maybe it had a different channel
00:28technomancywe tried to make #clojurescript happen, but I think it was a failed attempt
00:28technomancygo for it
00:28ddellacostatmallen: people certainly talk about it a lot here, I didn't even realize there was much different in #clojurescript
00:28tmallenhehe
00:28tmallenok thank you
00:28ddellacostathat is, didn't realize there was a different group
00:28technomancynot that I'll be any use
00:28ddellacostatechnomancy: haha, why??
00:28lazybotddellacosta: Definitely not.
00:28technomancyddellacosta: I've never[1] used clojurescript
00:28tmallenwhat is the best book for learning clojure, this new clojurescript library called Om looks interesting so i was going to learn clojure to learn a lisp and use this library
00:29tmallenhm, there should be a ? in there somewhere
00:29ddellacostatechnomancy: ah, okay. I'll do my best then. :-)
00:29technomancy[1] for more than a hello world
00:29tmallenthe oreilly book looked really good when i saw it in the store a while ago
00:29ddellacostatmallen: if you're unfamiliar with Clojure, I would recommend Clojure Programming: http://www.clojurebook.com
00:30tmallenok, yea, that one looked great, i'll pick it up
00:30technomancyI don't know if there's anything out there that does a thorough job of covering clojurescript
00:30ddellacostatmallen: oh yeah, that's the same one
00:30tmalleneh clojure script is just js libraries on clojure
00:30technomancyI suspect potential book authors are waiting for the tooling people to get things more polished
00:30technomancyuuuuuuh
00:30ddellacostayeah, I think Stuart Sierra put one out a while back, but not sure it is still relevant. However, your best bet is to start with Clojure and then play around
00:30tmalleni have helped a lot of cljs users in ##closure-tools surprisingly
00:31ddellacostatmallen: yes, definitely, a strong knowledge of Google Closure helps tremendously
00:31technomancythere are a lot of differences
00:31tmallen(i use closure compiler so it is a small change for me)
00:31tmallenddellacosta: i know way too much about the lcousre tools :p
00:31ddellacostatechnomancy: certainly, there are a ton of differences--but wouldn't you say that learning Clojure itself (leaving aside Java inter-op) is the best first step, or no?
00:32tmallenddellacosta: thats good to know :0
00:32tmallener :)
00:32technomancyddellacosta: I'm probably not qualified to say =)
00:32ddellacostaBTW, the new edition of Joy of Clojure contains a section explicitly on ClojureScript: http://www.manning.com/fogus2/
00:33tmallenis that out yet
00:33technomancypeople used to say they'd learn CL in order to learn Clojure because it had better books, which I think is silly
00:33ddellacostatechnomancy: haha, okay. Well, your point certainly stands, there is a lot different in terms of JS- vs. Java-inter-op specifics
00:33technomancynot that this is the same thing
00:33tmallenif i use clojure will i have to use ant and maven and crap like that
00:34ddellacostatechnomancy: ah, I see what you're saying. Well, in this case, I can honestly say that a solid knowledge of Clojure helps tremendously in grokking ClojureScript, at least in terms of the core language. There is always inter-op specifics
00:34technomancyddellacosta: mostly just the tooling and getting started story seems to be really rough. weavejester was just in here a few hours ago with a big pile of questions and ended up giving up on cljs for the time being because he couldn't get a repl going.
00:34tmallendo clojure projects often use java tools
00:34tmallen*clojurescript
00:34technomancytmallen: no one's gonna make you us emaven =)
00:34tmallenor clojure in general, or is there full tooling written in clojure?
00:34ddellacostatechnomancy: oh man, yeah...it is still rough. That's a bummer to hear regarding weavejester though. :-(
00:35technomancytmallen: basically the only people using maven for clojure are the clojure/core folks
00:35tmallentechnomancy: yea but if lots of open source clojure projects use ant or maven, i'll have to lear nthem
00:35ddellacostatmallen: I don't touch much Java tooling--we use technomancy's lein
00:35tmallenoh o
00:35tmallenk
00:35technomancybeen years since I've seen a project using ant
00:35ddellacostatmallen: and that seems to be the case for a lot of folks, in my experience
00:35tmallenoh he wrote leiningen/
00:35tmallen?
00:35ddellacostayes, the other guy you're talking to wrote leiningen. ;-)
00:35tmallentechnomancy: cool :)
00:35technomancywith lots of help =)
00:36tmallenwhere is standard vim stuff for clojure?
00:36ddellacostait's definitely a significant part of why using Clojure is great
00:36tmallenis it in some misc part of the clojure distribution?
00:36ddellacostatmallen: vim stuff for Clojure, um, whatsitcalled
00:36technomancyaw shucks
00:36ddellacostatechnomancy: :-)
00:36ddellacostatmallen: are you looking for this? https://github.com/tpope/vim-fireplace
00:37tmalleni bet most clojure users use emacs
00:37tmallenhehe tpope is a clojure user ?
00:37ddellacostatmallen: ah, and here: https://github.com/guns/vim-clojure-static
00:37tmallenneat
00:37ddellacostatmallen: yah!
00:37tmallentpope is a minor idol of mine because most of my open source projects are vim plugins
00:37ddellacostatmallen: I think there is a subset of Clojure folks also using emacs + evil
00:37ddellacostatmallen: ah, cool. :-)
00:38tmallenwhat is "static editing"?
00:38tmallenfrom https://github.com/guns/vim-clojure-static
00:38technomancytmallen: tooling is divided into that which needs a connection to a clojure process and that which doesn't
00:38tmallenoh
00:38ddellacostagotcha, didn't know what that meant either
00:38tmallenhas somebody written about this separately from that oreilly book?
00:39tmallenlike in a blog post
00:39ddellacostatmallen: which, vim?
00:39ddellacosta+ clojure?
00:39tmallenoh i dunno
00:39tmallenso that's the only place somebody usese that termi guess
00:39tmallenbut coding never requires connection to the running process right?
00:39tmallenand building
00:39tmalleni can't see how it would
00:40ddellacostatmallen: coding Clojure? no, certainly not--but using a repl is very handy
00:40tmallenso "static eidting" seemed redundant
00:40ddellacostatmallen: you'll find a lot of folks using Clojure often will do a lot of stuff in the repl as a first pass
00:40tmallenanywho :) ok this is great, i've got everything i need
00:40technomancytmallen: most people develop with a repl open
00:40technomancyconstantly compiling and trying functions out as you go
00:40ddellacostawhat he said ^
00:40tmallenemacs is a lot friendlier for pushing repl stuff to a file
00:41tmallennot many vim plugin authors write stuff like that
00:41technomancyvim's infrastructure for that kind of thing is pretty limited, but somehow people are able to make it work
00:41ddellacostatmallen: yeah, I think the emacs integration tends to be better...but I just don't know, I'm not a vim guy unfortunately
00:41technomancycoding clojure without a repl is pretty cumbersome since launch times are so slow
00:41tmallenall vim needs is support for background processes and it would be really strong for these sorts of things
00:41technomancybut IMO coding *anything* without a repl is pretty terrible
00:42tmallentechnomancy: google cc takes so long too because java
00:42ddellacostatmallen: btw, if you are getting started in ClojureScript, I would recommend checking out a few things in particular to start: first of all, check out this post by dnolen: http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/
00:42tmallenyea i'm always popping in a repl in py or js
00:42ddellacostatmallen: then check out some of his other posts--this one is especially useful, methinks: http://swannodette.github.io/2013/11/07/clojurescript-101/
00:42tmallenheh
00:43tmallen"Open the provided index.html (at the root of the project directory) in Google Chrome." weak
00:43technomancytl;dr you are about to embark on a magical voyage of discovery; best of luck
00:43tmalleneveryone knows to ctrl-shift-k in firefox
00:43ddellacostatmallen: this is also really useful: https://github.com/magomimmo/modern-cljs, and I wrote this recently which may be of use: http://davedellacosta.com/cljs-dom-survey
00:43technomancyit's dangerous to go alone; take this: https://github.com/tpope/vim-fireplace
00:43tmallenhehe thanks :)
00:44ddellacostatmallen: well, I'm sure you could suggest to dnolen that he give more respect to FF users. ;-)
00:44tmallen:)
00:44tmallenok thanks, i'm sure i'll be back
00:44ddellacostatmallen: anyways, good luck, and you should feel free to ask whatever here...folks tend to be quite friendly.
00:44technomancyhttp://magicalgametime.com/post/48470399171
00:44tmallensure thing
00:45ddellacostatechnomancy: love it
00:45technomancy<3 magical game time
00:45ddellacostatechnomancy: but, I hope you're not comparing vim to a sword...hahaha
00:45tmallenvim is more like a switchblade
00:45ddellacostayeah, and emacs like an uber multi-tool, kinda heavy and awkward at times
00:45tmallenvi is a razor blade
00:46technomancyddellacosta: if a keyboard can be a lightsaber
00:46tmallened is a needle
00:46ddellacostatechnomancy: fair 'nuff
00:47ddellacostaanyways, good luck tmallen, I gotta get back to work
00:47technomancythat whole blog though... I could read it cover to cover
00:47technomancyhttp://magicalgametime.com/post/54704162326 <3
00:47ddellacostatechnomancy: it's pretty great, didn't know it existed!
00:48tmallenooh i'm gonna write some vim plugins now!
00:48ddellacostatechnomancy: that last one you linked to reminds me a lot of this book I read as a kid, so many times...The Phantom Tollbooth
00:49technomancyoh man I love that book
00:49technomancycan't wait for my kids to get old enough for it
00:49ddellacostayeah, I feel like that book gave me a really awesome feeling about learning and exploring that continues to this day.
00:49ddellacostathat must be awesome to think of your kids reading that book, very nice
00:50ddellacostaalright, now I'm serious, back to work...cheers technomancy
00:50technomancylater
00:50technomancywait, are you in japan or something?
00:50ddellacostatechnomancy: oh, yeah
00:50ddellacostain Japan, I work remotely for a Canadian company
00:50technomancynice!
00:50technomancylove the remote life
00:51technomancy(mostly)
00:51technomancybut I'll let you get back to work
00:51ddellacostayeah, it's not bad...sometimes gets a bit lonely, but luckily my co-workers are night owls
00:51ddellacostatechnomancy: no worries, see ya around!
01:43ryantmHow do I parse out the metadata of a form?
01:44zerokarmaleftI think you're going to have to explain that further
01:44ryantmFor example (some-function '(ns ^{:doc "docstring"}) => {:doc "docstring"}
01:46ryantmzerokarmaleft: Does that clarify my question?
01:49zerokarmaleftryantm: yes, that clarifies it enough for me to know I don't have an answer for you :)
01:49ryantmthanks!
01:56The_AAA
01:57Tyrant(defn all-paths [doc] (map #(str "/" (string/join "/" (map name %1))) (first (reduce (fn [[acc set] p] (if (contains? set p) [acc set] [(conj acc p) (conj set p)])) [[] #{}] (visit-nodes [] (xpath/$x "./*" doc) (fn [p n] p))))))
01:57gunsryantm: Do you mean you want the metadata of a form without evaluating it?
01:59TEttinger,(doc meta)
01:59clojurebot"([obj]); Returns the metadata of obj, returns nil if there is no metadata."
02:02zerokarmaleftthat won't work on a quoted form
02:03ryantmYeah, it does weird stuff like tell me I have unbalanced parens when I do not.
02:04gunsryantm: why can't you just use the Clojure reader?
02:05zerokarmaleftryantm: quote doesn't delay evaluation of ^ since it's a reader macro
02:08ryantmzerokarmaleft: ah, that makes some sense.
02:08ryantmguns: Perhaps I can use the Clojure reader. I'll look into it.
02:09gunsclojure.core/read
02:14logic_prog_does cljs have a notion of "weak reference" ? I have a map of (id -> dom nodes), but I want this map to be a weak references -- i.e. if a node is only referenced by this map, then I want the node deleted
02:17zerokarmaleftryantm: you may want to check out tools.reader
02:21ryantmzerokarmaleft: i'll look at it, thanks!
02:22alandipertlogic_prog_: you can use a WeakMap if it's available; cljs shares GC and reference semantics w/ the platform
02:23logic_prog_alandipert: so basically, study the docs of the browser (i.e. chrome/firefox/safari) ?
02:30alandipertlogic_prog_: right. in your case, assuming id is a string, maybe a map of id -> WeakSet<dom nodes>, as keys can't be primitives in ES6 WeakMap or shims
02:30logic_prog_https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap#Browser_compatibility
02:30logic_prog_so basically to use this,
02:30logic_prog_I have to tell my users to go to chrome://flags
02:30logic_prog_and turn on experimental javascfipt ? :-)
02:31alandipertyes! and they can take pride in living on the bleeding edge!
02:31alandipertor... you can figure out another way to accomplish what you want that doesn't need weak map ;-)
02:33logic_prog_wtf
02:33logic_prog_https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet
02:33logic_prog_doesn't even exist
02:33ryantmzerokarmaleft: read-string seems to erase the metadata (clojure.tools.reader/read-string "(ns ^{:doc \"a\"} foo.bar)") becomes the list (ns foo.bar)
02:34alandipertlogic_prog_: oh, i was thinking just make one with a WeakMap of vals of all 'true' or something
02:34alandipertlogic_prog_: (that's basically what clojure sets are)
03:08zerokarmaleftryantm: right, the tools.reader impl of read-string mimics clojure's, but you can override the behavior of read-meta
03:19jowagHi, what was the problem with equals in java so that a custom equiv had to be implemented?
03:20clgvjowag: different hashing in clojure I guess
03:21clgvjowag: since hashing and equality are coupled for determing non-equality via the hash fast
03:25jowagclgv: thanks, but both in equals and in equiv the hash must be same for two equivaleng objects
03:27jowagclgv: and one can always override Object.hashcode if different hashing strategy is needed
03:28notofihi guys, I want to define a custom deftype wrapping a hash-map which implements clojure.lang.ILookup and throws an exception when the key is not present instead of returning nil, also it forces delay objects. My colleagues think this breaks the contract of keywords and 'get' which state that when the value can not be found it should return nil. Any opinions?
03:28clgvjowag: that seems to be the commit of the change https://github.com/clojure/clojure/commit/df0e4b677bdb563abdc2aa03cb8e6376eceaf8d5
03:29jowagtechnomancy mentions in a mailing list that ".equals must follow broken Java equality semantics, where .equiv is free to follow correct one.". I was wondering what is broken in javas equals...
03:30jowagclgv: maybe it's about how the numbers are handled?
03:31jowagnotofi: If you implement ILookup you should not throw if not found
03:31jowagnotofi: either return nil or not found value, is it was provided by caller
03:31logic_prog_how does clojurescript's meta data work? in particular, how is it that I can attach meta data to a dom node?
03:31clgvjowag: I was just thinking in that same direction. probably there is a closed jira ticket somewhere that explains this further
03:32notofijowag: ok I understand. But Another thing were I am not so sure is when I want to have a lazy hash map were values are delays and lookup forces those. Would this be unidiomatic?
03:32clgvnotofi: is the default arg for get no option?
03:32clgv,(get {:a 1} :b 42)
03:32clojurebot42
03:32alandipertjowag: string equality is weird, i like that clojure = unweirds it
03:33notoficlgv: default arg is nil I guess
03:33clgvnotofi: no, I mean you can supply what you want and forget about exceptios ;)
03:33clgv ,(get {:a 1} :b :not-found)
03:33clojurebot:not-found
03:34notoficlgv: yeah we want to make our code more strict and just throw everywhere when the value is not found, intead of adding :not-found manually
03:34clgv({:a 1} :b :not-found)
03:34jowag,(= 3 (java.math.BigInteger/valueOf 3))
03:34clojurebottrue
03:34jowag,(.equals 3 (java.math.BigInteger/valueOf 3))
03:34clojurebotfalse
03:34clgvnotofi: are you sure that this is a good idea? that will probably break reusability of the functions on later occassions
03:35TEttinger,(= 3 3N)
03:35clojurebottrue
03:35notoficlgv: yeah I see that its not a good idea
03:36clgvnotofi: maybe adding schema verifications in :pre/:post conditions when debugging is an option
03:36jowagnotofi: get in lazy hash maps would force the value, so it would block until value is fetched
03:37notofijowag: you think it would be unidiomatic?
03:37jowagnotofi: if the fetching reveals that there is no value for a given key in the underlaying thing you fetch from, I would not throw but return nil/not-found
03:37jowagnotofi: if however there was some error in fetching, like connection problem, I would definately throw
03:39jowagnotofi: lazy maps are completely valid concept and are idiomatic, if you use them for the right problem. Here is one impl. of lazy maps, https://bitbucket.org/kotarak/lazymap
03:43seriously_randomI don't understand what I am doing wrong with a simple for loop: http://pastebin.com/krxPduCX
03:45jowagseriously_random: ise defn instead of def in line 5
03:49carkwhat jowag said, but furthermore, for isn't a looping construct, it's list comprehension
03:49clgvseriously_random: still implementing the permutationset?
03:49logic_prog_is there a way to tell clojure edn read-string to use rrb-vectors rather than vectors ?
03:50jowaglogic_prog_: only if you implement a custom data reader literal and use it in the .edn in places where you want rrb-vectors
03:51jowaglogic_prog_: if you want rrb-vectors for all vectors readed from .edn, you have to change edn reader
03:51logic_prog_so basically I'd have to change pr-str
03:51logic_prog_so that rrb-vectors are output in a special form ?
03:52jowaglogic_prog_: now you are talking about printing rrb-vectors in edn format
03:52logic_prog_right
03:52logic_prog_beacuse I have to ouput rrb-vectors in edn foramt to read them back in, no?
03:52clgvlogic_prog_: yes. make sure they have a literal to read them back in
03:53jowaglogic_prog_: well that depends on the printer. The default pr-str printer is very complicated and complected and it does not at all produce EDN
03:53logic_prog_hmm, I've been using pr-str together wtih edn/read-string
03:53logic_prog_what should I be using with edn/read-string instead?
03:54jowaglogic_prog_: try to look at it differently. COnverting a normal vector into rrb is a fast constant time operation. I would suggest to read EDN usual way, and then in your code convert the vectors into rrb if needed.
03:54clgvlogic_prog_: you could just alter print-method for rrb-vector to let them be printed with an apropriate literal
03:55logic_prog_wait, what? vector -> rrbvector is constant time operation?
03:55clgvlogic_prog_: imho that should be or become part of the rrb-vector lib
03:55jowaglogic_prog_: and rrb-vector can print vector as it would be a normal clojure vector
03:55opqdonutwth, gen-class and gen-interface docstrings both say "When not compiling, does nothing."
03:56opqdonuthowever gen-interface is implemented as (if *compile-files* (doit) (dosomethingelse))
03:56jowaglogic_prog_: yes, constant time and very fast
03:56opqdonutwhereas gen-class is implemented as (when *compile-files* (doit))
03:56clgvlogic_prog_: since you are using it, how mature is core.rrb-vector in your opinion?
03:56logic_prog_clgv: I haven't ahd any problem so sfar
03:56logic_prog_clgv: I like the fast splicing / concat
03:56logic_prog_clgv: I think it should repalce standard vectors
03:57clgvlogic_prog_: really, afaik some operations are faster on standard vector
03:57jowagclgv: in CLJ or in CLJS?
03:57clgvclojure jvm ;)
03:57logic_prog_clgv: imho, for the imes where constant time access is important
03:58logic_prog_I'd proably drop to something lower level than clja nyway
03:58clgvyeah right, I just meant for normal vector use cases
04:00clgvis splice + reverse + concat also supported efficiently? like in a_1, ... , a_n, b_1, ..., b_k, c_1, ..., c_m to a_1, ... , a_n, b_k, ..., b_1, c_1, ..., c_m
04:00seriously_randomclgv, no. I am now at powerset
04:00seriously_randomhttp://pastebin.com/8EHtEFDs <-- how to use cons properly?
04:01clgvseriously_random: if you do not build a lazy-seq simply dont ;)
04:01seriously_randomclgv, sorry? I don't get it
04:02clgvseriously_random: do not use cons in this case. it seems you want `list` or `list*`
04:03clgvlogic_prog_: is reverse efficient and is it possible to efficiently concat a reverse subvec with rbb-vectors ?
04:04seriously_randomclgv, would you mind showing a sample code?
04:04jowagalandipert: BTW why yet another DSL in hoplon? I mean .hl files have custom syntax :(
04:04logic_prog_clgv: hmm, I never used reverse (and thus did not spend time reading up on it)
04:05logic_prog_clgv: I can imaigne an efficient way to do it, but I don't know if rrb-vectors implements it that way
04:05clgvseriously_random: (list a b c) instead of (cons a (cons b (cons c nil)))
04:05jowagclgv: there is no such concept as a reverse collection in a Clojure unfortunately
04:05jowagclgv: you can get reverse seq at most
04:05clgvlogic_prog_: yeah. it is efficient on vectors. the question is if it works on rrb-vectors
04:06clgv,(type (reverse [1 2 3]))
04:06clojurebotclojure.lang.PersistentList
04:06clgvoh
04:06clgv,(type (rvec [1 2 3]))
04:06clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: rvec in this context, compiling:(NO_SOURCE_PATH:0:0)>
04:06seriously_randomclgv, what if I need (() (1) (1 2)) then I add 2 to (() (1))?
04:06clgv$findfn [1 2 3] [3 2 1]
04:06jowagclgv: told you :)
04:06clgvstill no lazybot? :(
04:06lazybot[clojure.core/rseq clojure.core/reverse]
04:07clgvah^^
04:07clgvdamn
04:08clgvok rrb-vector supports `rseq` but that's not sufficient for the mentioned use case
04:10seriously_randomclgv, here is the code in python: http://pastebin.com/HB0EfE8F
04:21seriously_randomclgv, getting closer: http://pastebin.com/iHyLZkwj
04:23clgvjowag: logic_prog_: well, I have created an enhancement ticket now...
04:25seriously_randomclgv, done! http://pastebin.com/f7mT5kh3
04:26seriously_randomnoob question, is clojure slower than python?
04:27bitemyappI like his brand of diplomacy: http://www.sourceware.org/ml/libc-alpha/2000-08/msg00053.html
04:27carki think clojure is faster than python, but python has many libraries that are faster due to these being done with c
04:28jowagclgv: as you cannot insert at the front of the vector, I doubt reverse vector will be implemented soon
04:29jowagseriously_random: what cark said
04:30clgvjowag: I do not want it for Clojure's vector, but for rrb-vector. it might be possible there because efficient concatenation is possible as well
04:31jowagclgv: rrb-vector has a very similar internal structure to the clojures HAMT vectors. Problem is that there are array chuks inside and you would have to reverse them
04:32seriously_randoma way to quickly turn sequence '((1) (1 2)) into a set #{#{1} #{1 2}}?
04:32alandipertjowag: like rseq?
04:32alandipert,(set (map set '((1) (1 2)))
04:32clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
04:32clgvjowag: ok. I'll see what the maintainers will answer ;)
04:32jowagclgv: or introduce a layer of logic determining the direction of the vector, which would be hard to do efficiently
04:33jowag,(doc rseq)
04:33clojurebot"([rev]); Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is empty returns nil"
04:33jowagalandipert: result from rseq is nor a persistent collection
04:33seriously_randomalandipert, thanks
04:34jowagalandipert: or to be precise, not the same type of persistent collection :)
04:35alandipertjowag: you could deftype a thing, backed bya vector, that implements ILookup and does the index arithmetic to present a vector-like thing in reverse perhaps
04:36bitemyapparrdem: http://hydkyll.blogspot.de/2013/12/example-from-brml-in-haskell.html
04:36alandipertjowag: actually there's probably a billion interfaces you'd need to implement, but that's the basic idea :-)
04:36jowagalandipert: of course, but conj and subvec and converting it to the rrb-vectr (what clgv wants) would be very hard to do efficiently
04:37clgvjowag: well if it is O(log_{32}(n)) like concatenation that suffices ;)
04:38jowagclgv: if you desperately need reverse for vectors, consider a finger trees
04:39alandipertjowag: gotcha, i missed the context
04:39clgvjowag: well. reverse and concatenation is the needed feature set for 2-opt neighborhood on TSP
04:40jowagalandipert: anyway, about that hoplon, why the custom DSL for .hl files?
04:40clgvjowag: but I am not sure how well it scales since there will be arbitrary large and many slices reversed
04:40jowagclgv: There are finger trees for CLJS and CLJ as well, https://github.com/wagjo/data-cljs
04:42alandipertjowag: just part of what we needed to do to escalate markup to program in a way that made sense for the kinda apps we build
04:42jowagclgv: But the constant overhead on their operations is not usually feasible, thats why rrb-vectors were created instead
04:43jowagalandipert: I've skimmed through the getting started and thought, oh well yet another DSL to learn...
04:43sverihi, is there a lib which helps me to access REST interfaces from clojurescript?
04:45jowagsveri: https://github.com/yogthos/cljs-ajax perhaps?
04:46clgvjowag: data.finger-trees only supports rseq as well ;)
04:47sverijowag: thank you :-) do you know if it supports basic auth? i have not seen it mentioned on the github page
04:47jowagclgv: yes, but reversing them would be much simpler, log n perhaps
04:49jowagsveri: don't know
04:49alandipertjowag: if it makes you feel any better, the only DSL-ish parts are saying 'page' instead of ns, and ending your file with a call to a dom function. the rest is cljs and a macro or two
04:50alandipertjowag: our production stuff is namespaced html + regular .cljs, we show the single-file approach in getting started so that we can demo all the parts in the same file
04:56jowagalandipert: it's just a matter of taste, but I like hiccups approach more. You can see that what you are dealing with are clojures data structures and not a god-knows-what macros.
04:57alandipertjowag: i'd be curious to hear your thoughts on the "HTML Evaluator" section of http://hoplon.io/#/home/
05:01jowagalandipert: do you keep holding a reference to the DOM object form CLJSs 'vars'?
05:03alandipertjowag: yes, but no dom objects are created when the page runs
05:07jowagalandipert: I have no problem with this but I'm wondering whether browsers generally guarantee that they do not fiddle with DOM objects in the background and that you can assume they will always point to the right element. Another thing is that you are preventing GC as long as you hold onto the DOM object, but you surely know that.
05:12alandipertjowag: afaik browsers don't do that. and yes the gc situation is OK because we only create dom nodes once, on load, and hang onto them forever
05:20ddellacostasimple question: how do I make a function from a list?
05:20davddellacosta: what's in the list?
05:21ddellacostalike, the actual resolved name + args: (+ 1 1)
05:22ddellacostabut I get: clojure.lang.PersistentList cannot be cast to clojure.lang.IFn
05:22Morgawrdo you guys know of any resources I could read about how dosync is implemented and how it manages delayed side-effect operations like sending to agents upon retrying? (Aside from reading the source code which I'm going to do now)
05:23Morgawrlike interesting articles or stuff like that
05:25ddellacostaspecifically, I want to return a function from the list--that is, I want to pass it around as a function, so it can be evaluated normally: (some-fn-made-from-list ...)
05:25fredyrMorgawr: http://java.ociweb.com/mark/stm/article.html
05:25fredyrMorgawr: and https://github.com/tvcutsem/stm-in-clojure
05:26alandipert,((fn [op & args] (apply partial (resolve op) args)) '(+ 1 2))
05:26clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol>
05:26Morgawrfredyr: thanks!
05:26Morgawrwill give them a read
05:26fredyrsure
05:28alandipert,((fn [[op & args]] (apply partial (resolve op) args)) '(+ 1 2)) ;?
05:28clojurebot#<core$partial$fn__4198 clojure.core$partial$fn__4198@1cbab62>
05:29ddellacostaalandipert: thanks...I guess partial was what I was looking for!
05:30alandipertddellacosta: np!
05:32alandipertddellacosta: have you seen hoplon btw? as you're a purveyor of cljs dom stuff i'm very interested in your thoughts
05:33ddellacostaalandipert: I have only just seen it, but haven't had a chance to dig in yet...there is so much flying by lately! But I'll definitely take a closer look and let you know what I think.
05:34alandipertddellacosta: cool thx!
05:34ddellacostaalandipert: that + OM is making my head spin...haha
05:34alandipertthere are definite similarities
05:34ddellacostaalandipert: definitely psyched in general that people are putting this kind of cool stuff out there. I have this feeling lately like the CLJS world is miles ahead, and the rest of the world hasn't figured it out yet...
05:34ddellacostabut, I suppose I'm biased. ;-)
05:36alandipertddellacosta: na you're totally right, we're the best ;-)
05:37ddellacostaalandipert: haha, okay. :-)
05:37ddellacostaalandipert: gotta go have dinner with my wife...cheers! Look forward to checking out hoplon in more detail.
05:45jowagalandipert: so looking at the compiler, the .hl file is just {:ns "...", :setup [] :html []} map with a nicer syntax
05:52ProfpatschIs there a way to send everything that comes out of System/out to *out*? That is, to connect Streams?
05:52ProfpatschTwo outgoing streamst
05:52Profpatsch*streams.
05:53hyPiRionWell, yeah
05:55hyPiRionyou'd have to replace System/out with an outputstream sending the values to both streams
05:57Profpatsch hyPiRion: How would I do that? The Java System of streams has a quite high value of *sucking ass*.
05:58hyPiRionYou'd have to make a new class through e.g. reify, and replace that class with System/setOut
05:59ProfpatschEven better, *out* is a PrintWriter and System/out is a static PrintStream, which don’t even inherit the same base class.
06:01hyPiRionProfpatsch: Obligatory rant: http://hypirion.com/musings/how-to-cancel-a-blocking-read
06:02ProfpatschI can make a new PrintStream from an OutputStream, but there is no way I can see how to get an OutputStream from PrintWriter.
06:04ProfpatschCan I pipe all data from *out* to System/out somehow?
06:05hyPiRionhm
06:05hyPiRion,(binding [*out* System/out] (prn "hello"))
06:05clojurebot#<ClassCastException java.lang.ClassCastException: java.io.PrintStream cannot be cast to java.io.Writer>
06:06hyPiRionalthough that likely kills your purpose
06:06ProfpatschThat’s the wrong direction.
06:06ProfpatschWait … Ugh, I don’t get it.
06:07ProfpatschMy original problem is that the REPL doesn’t display anything from System/out, but the java classes I want to wrap use it a lot.
06:09ProfpatschThis *has* to be a known and fixed problem, I’m certainly not the first to stumble into this.
06:11hyPiRionthat's a different problem though
06:11hyPiRionare you using emacs?
06:12ProfpatschhyPiRion: Yep, cider with nrepl
06:12ProfpatschOr the other way around. ;)
06:13hyPiRionHmm, that's sort of a nREPL-problem I think. Check if *nrepl-server* contains the printed message.
06:13hyPiRion(It usually doeS)
06:21ProfpatschUh, yeah, it does.
06:21ProfpatschWhy is it sent there and not to the repl?
06:25hyPiRionI think it's related to emacs and no threading. It seems to happen when you fire up a new thread on the JVM
06:26ProfpatschOh, okay. Thanks!
06:49ProfpatschHow do I get the class Object (java: Object.class)? Object/class doesn’t work.
06:50ProfpatschNor does (.class Object)
06:51ProfpatschFound it: (class Object)
06:52ProfpatschWow, that was close. :)
07:17clgvIs there a possibility to clear java.lang.ThreadLocal values from a different thread, e.g. after finishing a parallel computation?
07:35ProfpatschActually with (class) I get the class of an object, Object itself will do.
07:47Morgawr,(let [map1 { :a 1 :b 2 :c 3 } set1 #{:a :b}] (apply dissoc map1 (keys (apply dissoc map1 set1))))
07:47clojurebot{:a 1, :b 2}
07:48Morgawrwhat's a better way to do this? difference between a map and a set and obtain only the keys that are present in the set
07:48clgvMorgawr: clojure.set/select-keys
07:48Morgawrwelp
07:48Morgawrthanks
07:48Morgawrevery time I stumble upon this stuff haha
07:49clgv$findfn {:a 1 :b 2 :c 3 d:4} [:a :c] {:a 1 :c 3}
07:49clgvI like to challenge lazybot ;)
07:49lazybot[clojure.core/cond clojure.core/dosync clojure.core/import clojure.core/prn clojure.core/refer-clojure clojure.core/print clojure.core/newline clojure.core/comment clojure.core/or clojure.core/load clojure.core/await clojure.core/declare clojure.core/println clojure.... https://www.refheap.com/22068
07:49clgvuff
07:50clgvthats plainly wrong dear bot ;)
07:50Morgawrwait, what's findfn? it looks for all possible combinations of functions that can produce a given output form the given input?
07:50clgv&(require 'clojure.set)
07:50lazybot⇒ nil
07:50Morgawrfrom*
07:52clgvoh it's clojure.core/select-keys ;)
08:16sbhuiyanHi there, I was wondering if anybody can answer a question about friend and configuring multiple workflows
08:18sbhuiyanI'm getting the behaviour where all workflows are run and if one of them throws and Exception, regardless of the result of other workflow, it still generates a 403
09:18seriously_randomcreate a new vector from first and second element in other vector? e.g. (magic (first '[1 2 3]) (second '[1 2 3]))
09:20stuartsierra,((juxt first second) [1 2 3])
09:20clojurebot[1 2]
09:20seriously_randomhow about a sequence?
09:21stuartsierra,(vec (take 2 (range))
09:21clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
09:21stuartsierra,(vec (take 2 (range)))
09:21clojurebot[0 1]
09:24seriously_random(first '[1 2 3]) --> make it (1)?
09:25mdrogalisWalk into office after Christmas party - desk is missing.
09:25mdrogalisMust have been one heck of a party. :P
09:25seriously_random(cons (first '[1 2 3]) '())
09:25lumafi,(take 1 [1 2 3])
09:25clojurebot(1)
10:33gfredericks(defmacro cond->-> [x & pairs] (if-let [[c form & more] (seq pairs)] `(let [x# ~x] (cond->-> (if (-> x# ~c) (-> x# ~form) x#) ~@more)) x))
10:33gfrederickslike cond-> but the conditions are threading forms as well
10:34stuartsierrabbloom: Do you have benchmark code for CLJ-1200 that shows performance improvement?
10:34stuartsierraI've tried half a dozen things, but any differences are lost in the noise.
11:17coventryIs there a right way to run a "CREATE DATABASE" SQL command in clojure/java, via jdbc or similar?
11:36gfrederickscoventry: I'm not familiar with alternatives, but every time I've done it has been through jdbc/do-commands
11:50coventrygfredericks: Thanks.
12:38lethjakmanhey, any recommendations on clojure web frameworks? I need threading and I'm a big fan of rails. I saw pedestal but I'm not sure what I think of it
12:38`cbplethjakman: there's pedestal and caribou
12:38mdrogalisBy threading, you mean you need an async web framework? Or a backend that uses extensive currency?
12:39lethjakmanmdrogalis: backend that uses concurrancy. I don't want one person to get held up while other people are doing things.
12:39lethjakman`cbp: interesting I haven't seen caribou, I'm looking at pedestal right now
12:39lethjakmanany experience with them
12:39lethjakman?
12:40mdrogalislethjakman: There's also Luminus.
12:40`cbpnope :D. I just usually combine compojure with ring + whatever else libs I wanna add in
12:40mdrogalisBut really, those two concerns are orthogonal.
12:40lethjakman`cbp: ahhh ok.
12:40lethjakmanmdrogalis: why's that?
12:41lethjakmanhmmm haven't heard of that one
12:41mdrogalislethjakman: Why would your concurrency concern intersect with your choice of web framework?
12:42lethjakmanmdrogalis: because a web framework that doesn't allow for concurrancy tends to be a bit slow.
12:42mdrogalislethjakman: I think we're talking about two very different things lol
12:42mdrogalisI'll let someone else field this one.
12:43lethjakmansorry. perhaps I'm wording something wrong.
12:43technomancylethjakman: clojure doesn't have any frameworks/libraries that don't allow for concurrency
12:43lethjakmantechnomancy: really?
12:43mdrogalisIt's okay.
12:43lethjakmanthat isn't something I was aware of
12:43technomancyif you tried to release one you would get raw tomatoes thrown at you basically
12:43lethjakmanis clojure multi threaded?
12:43technomancys/raw/rotten/
12:44gfrederickslethjakman: yes
12:44hiredmanruntimes are mutlithreaded, not languages?
12:44lethjakmanI'm actually coming from a scheme background a few years back. how is clojure with memory management?
12:44hiredmanautomatic?
12:44gfrederickslethjakman: that's more a question about the JVM
12:45lethjakmanahhh ok.
12:45lethjakmandoes it put a lot of overhead on the JVM?
12:45lethjakmanI guess that's a better question
12:45lethjakmansorry for all the n00b questions.
12:45hiredmanlethjakman: that depends on what you are doing
12:47gfrederickslethjakman: from a web dev vantage point, I don't think so
12:48carki think it's fair to say there is much overhead with the datastructures, everything being boxed and all
12:52lethjakmaninteresting. I'll have to play with it.
12:52lethjakmanI've been hearing clojure is pretty effecient
12:52lethjakmanI want to see it compared to ruby
12:52lethjakmanwhich is my current framework.
12:52carkclojure is way faster than ruby
12:52cark_way_ faster
12:53lethjakmancark: can you support that?
12:53lethjakmanI'm honestly worried about the concurrancy because that's somethign that wasn't handled well in ruby from the start.
12:53carkmhh, no real benchmark, just experience
12:53hiredmanlethjakman: which ruby?
12:54carkthe concurency story in clojure is very good
12:54carkit's one of its main selling points
12:54hiredmanhttp://www.techempower.com/benchmarks/
12:54lethjakmanhiredman: 1.9 and rails belowe 4.0 didn't really do concurrancy. it's better now but a lot of the libraries aren't concurrant.
12:54lethjakmanis there a clojure package manager?
12:54`cbpconcurrency and parallelism are basically clojure's raison d'être
12:55carkin this benchmark it looks like jruby is doing better
12:55lethjakman`cbp: clojure isn't on this chart.
12:55lethjakmancark: I've heard that actualy.
12:56technomancylanguages aren't fast or slow; programs are
12:56lethjakman`cbp: oooo.
12:56lethjakmaninteresting.
12:56hiredmanlethjakman: which chart?
12:56technomancywell, to be pedantic: a given execution of a program is fast or slow
12:56lethjakmantechnomancy: of course. but some programs are better written in other languages.
12:56carkyes it isn't a language benchmark, it's an application stack benchmark
12:56lethjakmanI've had an idea that clojure might be nice for a web framework for a whil and haven't looked into it.
12:56technomancylethjakman: indeed
12:58lethjakmanthank you all, I appreciate your advice/discussion.
12:58lethjakmanI think I'm gonna do a bit more research.
12:58hiredmancompojure is the only explicitly clojure thing on the techempower benchmarks, where it clocks in faster than rack, but for example, java servlets came in second in the whole thing, and you can use the serlet api from/in clojure (in fact compojure is generally used via a ring <-> servlet adapter)
12:58lethjakmanahh interesting.
12:59hiredmanrack-jruby actually scores surprisingly high
13:00hiredmanit looks like they are using torqbox, someone should submit and immutant based compojure version
13:00technomancythe tl;dr is that the JVM has the best GC and JIT in the world, and that Clojure imposes a lot less runtime overhead than JRuby since it's designed specifically for the JVM without the constraints of backwards compatibility
13:01technomancyClojure is often slower than Java due to immutability creating higher load on the GC, (and a few other factors) but since it removes the potential for a large class of bugs generally no one minds
13:02lethjakmanahhh interesting.
13:02lethjakmanbut java is ugly...
13:02carkugly but pretty damn fast
13:02lethjakmanand tends to be slow to develop in.
13:02lethjakmancark: c++ is and always will be faster.
13:02lethjakmanif I'm going for something optimized with slower dev time I'd probably use that.
13:02lethjakmanespecially with c++11
13:03technomancythe best advice for writing concurrent code in Java is to use immutability anyway, and immutable data structures in Java are very clumsy and IIRC don't always exhibit the same structural sharing as clojure, so it can end up even slower
13:03lethjakmaninteresting.
13:03lethjakmanvery interesting.
13:03lethjakmandid you guys learn clojure in school or for fun?
13:04carki think the difference between c++ and java performances in the server space is vannishingly small
13:04carkspecially for long running processes
13:04tcrawleyhiredman: the next major version of Immutant will be based on the same underpinnings as the torqbox gem. I'm working on the foundations of that now
13:04tcrawleyonce I have something useful, I'll add it to the benchmark suite
13:05tcrawleythough I dislike micro benchmarks
13:05technomancylethjakman: I don't know of any schools that teach it
13:05clojurebotexcusez-moi
13:05carkthey should !
13:06lethjakmanbenchmarks are a good starting point I think.
13:06lethjakmancark: like everything else it depends on what you're doing. anything with huge memory management is better done in C++.
13:07lethjakmanI kinda want to try Go for servers as well. I've heard it's concurrancy is good.
13:07technomancyGo still has mutable data structures by default
13:07technomancyso I'm sure it's good compared to Ruby or JS, but... yeah
13:08carkgo is fun
13:08lethjakmaninteresting. but it's not run on the JVM. is immutable still important?
13:08carkbut yes, once you get used to persistent data structures, it's hard to go back, even in a single threaded context
13:08technomancywriting concurrent code without immutability is like tight-rope walking
13:08technomancyit's possible to do, and it can be spectacular when done well
13:09technomancyit can also be spectacular when done badly
13:10carklethjakman: immutability and jvm are orthogonal
13:10carkthe only thing required is a GC
13:11Pupnikis that actually true?
13:11technomancyconcurrent code without immutability *or* a GC is like tight-rope walking while juggling flaming swords
13:11technomancytheoretically possible!
13:11carkyou can't do persitent without garbage collection
13:12lethjakmanlol....
13:12carkbe it a primitive reference counting or anything, but you need it
13:13jcrossley3hiredman: the torqbox perf is due mostly to jboss' undertow, specifically switching the rack impl from servlets to undertow's HttpHandlers.
13:15hiredmanjcrossley3: neat
13:18hiredmanhttps://github.com/piranha/ring-undertow-adapter like magic, I look and it is there
13:39logic_progDOM Nodes are trees, not DAGs. Clojure datat can be a DAG rather than just a tree. Thus, in Om, what happens when I have a certain piece of data repeated twice within the clojure data structure. DOes it correctly create two nodes, or incorrectly try to share 1 node?
13:47dnolen,(let [m {:foo "bar"}] (identical? m (assoc m :foo "bar")))
13:47clojurebottrue
13:47dnolenlove it
13:48dnolenlogic_prog: 2 nodes
13:48logic_progdnolen: how does it handle this?
13:48logic_progdnolen: I was trying to re-invent this myself
13:49dnolenlogic_prog: what do you mean?
13:49logic_progdnolen: and wanted to tag each piece of clojure data with a meta data containing the html node
13:49logic_progdnolen: but then when I copy a piece of clojure data, the html node also gets the same reference from the meta
13:49dnolenlogic_prog: Om just takes a DAG of values to another DAG of values
13:49dnolenvia React
13:50logic_progdnolen: if OM is Dag -> Dag, how do we get a HTML DOM Tree ?
13:50dnolenlogic_prog: the real one? React handles that
13:50logic_progdnolen: nice, thanks!
13:53logic_progdnolen: one more dumbass question: is the virtual dom a tree or a dag?
13:55dnolenlogic_prog: pretty sure it's a tree if it mirrors the DOM
13:58logic_progdnolen: the fog has been lifted. Thanks for answering all my questions!
14:25justin_smithlethjakman: regarding your "does clojure have a package manager" way up in the scrollback, the best thing to do is use lein, where you don't manage the packages on your system, but rather the dependencies + versions which will be used by each project
14:25lethjakmanjustin_smith: that's good to know. thank oyu.
14:26justin_smithlethjakman: this is project specific, so conflicts of versions only happen inside a project, never between projects (unlike many runtimes where only one lib version can be installed so you get into managing multiple "installations" etc.)
15:08logic_progin cljs, is goog.dom get element by id an expensive or cheap operation?
15:09logic_progis it just a "lookup this string in this map"
15:09logic_progor is there somethign complicated going on?
15:09logic_progi.e. is it taht much more expensive than just looking up in a hashmap?
15:10dnolenlogic_prog: pretty sure it just delegates to document.getElementById
15:10dnolenand the performance will be browser dependent
15:11logic_progdnolen: would you happen to know if document.getElementById happen to be any more costly than just a hash map lookup?
15:11stuartsierraIt's one of the most commonly-used DOM functions; I'm sure it's as optimal as possible. :)
15:11dnolenlogic_prog: I've never looked at how it's implemented in any particular browser
15:14logic_proghttp://stackoverflow.com/questions/1854859/jquery-performance-wise-what-is-faster-getelementbyid-or-jquery-selector <-- hmm, looks like I can't get faster than this anyway
15:15dnolenlogic_prog: step 1 don't use jQuery if you are concerned about performance.
15:22dbellI came across #js in several cljs projects lately---what does it mean?
15:22gfredericksdbell: reader literal for js arrays and objects
15:22dbellah
15:22dbellty gfred
15:36emaphis /join #part
15:37egosumwhat are people using for postgres in Clojure these days? Prefer to not have much of an ORM
15:37`cbpclojure.jdbc or korma
15:38`cbpyou wont find much in the ways of ORMs in clojure
15:40egosum`cbp: nice, thanks
15:42dobry-dendatomic
15:43bitemyappdatomic isn't a SQL abstraction library, it's a whole database.
15:44egosumbitemyapp: it's a data abstraction library, isn't it? it's not exactly a DB, since it uses other DBs to do DB-y things
15:44elfenlaidem, hi there, here is description of my problem https://gist.github.com/elfenlaid/8019408 ; tl dr i need to create 1kk tiny objects, but memory consumption going nuts, any suggestions or best practices ? :)
15:44gfredericksit uses other DBs to do file system things
15:45egosumgfredericks: a file system is just a type of database
15:45gfredericksegosum: now the word "database" is less useful
15:46dobry-denbitemyapp: i know it wasn't what egosum was looking for, but it still answers the question.
15:46hiredmanegosum: how are you measuring memory usage, and is that 300mb all live data, or will some of it be cleared on the next gc?
15:46dobry-deni really like datalog
15:47gfredericksegosum: but seriously it uses them at a pretty low level; I think it's confusing to say it uses them for db functions;
15:47egosumdobry-den: same; i actually think I'll be using datomic
15:47hiredmanoh whoops
15:47dobry-denclojure's sql abstractions i've tried still have me writing strings frequently. i'm done with that
15:47hiredmanelfenlaid: how are you measuring memory usage, and is that 300mb all live data, or will some of it be cleared on the next gc?
15:47gfredericksdobry-den: honeysql is good for avoiding strings
15:48egosumgfredericks: I see what you're saying, but i'm not sure who it's confusing
15:48bitemyappegosum: Datomic completely takes over the semantics of how you interact with your data. The way it uses Postgres et al is very low level and not accessible to an end user.
15:48technomancyI like c.j.jdbc but I hate not getting syntax highlighting for queries
15:48bitemyappegosum: do not use Datomic assuming you'll be able to side-step the peer library.
15:48gfredericksegosum: I've had a lot of datomic conversations and it's a common point of confusion
15:48egosumbitemyapp: for sure
15:48clojurebotI don't understand.
15:48bitemyapphoneysql is decent and composable'ish.
15:49egosumtechnomancy: emacs doesn't make it easy to syntax highlight sections of a buffer :(
15:49dobry-denyeah, datomic is quite the leap from 'i want to use postgres from clojure', but it's a fun journey.
15:49bitemyappthat's a pretty common thing though.
15:50bitemyappegosum: I use Datomic a lot at work and I'm very happy with it, but seriously, don't kid yourself. It's nothing like using PostgreSQL in the usual fashion.
15:50egosumbitemyapp: absolutely; i've been playing around with it a bit, and while i'm still pretty confused about some things, it's really enjoyable. i love writing datalog
15:51egosumgfredericks: interesting; my mental model of datomic is that it's an application that executes queries on an in-memory datastructure (ideally; else it pulls from the backing DB), and sequentially writes to that backing DB
15:51gfredericksI ended up not writing datalog too much; it often wasn't as efficient
15:51bitemyapptechnomancy: Fascinating new ways in which Scala is horrifying: https://github.com/puffnfresh/wartremover/issues/29
15:52bitemyappgfredericks: as opposed to what, reducing across datoms?
15:52egosumgfredericks: how so?
15:52elfenlaidhiredman, the problem is that all is live data, that's kind of exercise in data mining and I try to do it as simple as possible. Right now the measurements consists of activity monitor observations, but it quite freaking me out
15:52bitemyappegosum: datalog ain't fast, he isn't joking.
15:52dobry-denYou want to query the raw datom index when you can
15:52gfredericksbitemyapp: yeah that sort of thing
15:52egosumbitemyapp: oh I buy it, i'm just curious how slow!
15:52bitemyappI've fiddled with the datoms API, but it's not clear to me how to leverage the indexes.
15:52hiredmanelfenlaid: just becuase all off your final data in the seq is live that doesn't mean everything created while creating the seq is live
15:53hiredmanelfenlaid: how are you getting that 300mb number?
15:53dobry-denbitemyapp: http://www.infoq.com/presentations/datomic-use-case
15:53gfredericksegosum: I guess that's tough to quantify
15:53bitemyapphum, you can select index. I don't remember that changing anything.
15:53gfredericksbitemyapp: and extra args for the index values
15:53bitemyappI guess it must.
15:53egosumgfredericks: heuristically
15:53hiredmanelfenlaid: tools like top which is generally what people reach for first are bad at measuring real memory usage
15:53dobry-denCraig does a good job illustrating the evat avet eavt indexes
15:53bitemyappgfredericks: that must've been the part I was missing.
15:54gfredericksbitemyapp: yeah I was able to do pretty much whatever I wanted, just more tediously
15:54bitemyappcool, learned something today already :)
15:54gfredericksbitemyapp: it's also nice cuz it's actually lazy
15:54gfrederickswhich for some reason datalog isn't
15:54bitemyappgfredericks: wonder if it'd be worthwhile to make a simple, low-level wrapper to datoms?
15:54bitemyappgfredericks: yeah the non-laziness of datalog was killing me.
15:54hiredmanelfenlaid: there are lots of things to reduce memory usage, but the first thing is to determine if you have a real problem
15:54gfredericksbitemyapp: my guess was it was to be more java-friendly but java iterators are totally normal amirite?
15:55bitemyappgfredericks: people use them, so I thought.
15:55gfredericks,(instance? java.util.Collection (range 10))
15:55clojurebottrue
15:55gfredericks^ and there's that
15:55gfredericksso I have no idea
15:55dobry-deni would think anyone that uses datomic ends up with a simple wrapper around d/datoms for most of their find-by lookups
15:55gfrederickslaziness would've been great for pipelining for me
15:56gfredericksdobry-den: yeah I wrote a few helpers like that
16:01elfenlaidhiredman, thanks, it's really the right philosophy to follow :) so, a question is can objects from lazy-seq be cleared with gc if there aren't links to them?
16:02dobry-denhas anyone implemented any sort of fuzzy matching for datomic fulltext search? i'm not sure of the exact concept i want to be googling for
16:07elfenlaidhiredman, htop shows 200mb(on fresh repl) => 400mb(after parse-cvs call)
16:09logic_prog, (+ 1 2)
16:09clojurebot3
16:09logic_progis there any jvm as lightweight as beam?
16:09elfenlaidbut memory consumption quite stable after several calls, so parse-cvs likely is not leaking
16:10logic_progI'd like to have lots of little clojure processes on their own jvms
16:10hiredmanelfenlaid: so there you go, you've already cut your memory usage by one third
16:11technomancylogic_prog: you can put a bunch of isolated classloaders into one JVM
16:11technomancybut anything calling native code can crash the whole thing
16:11logic_progbut I can't force kill threads in jvm, since stop is deprecated
16:11logic_progI'd like "little jvms" that I can kill when they misbehave
16:12logic_prograther than have one monolothic jvm
16:13elfenlaidhiredman, :) i'm new to gc environment, may be it is an idiomatic behavior and i'm not reaching the optimization and profiling part of the book yet :P but thanks for help anyway
16:13technomancythere's no such thing as a lightweight JVM, sorry
16:13dobry-denTo answer my own question, TIL about quotation marks in fulltext search -_-
16:14logic_progtechnomancy: dumb question: what is it about erlang vs java that allows erlang to have lightweight beam, but java to not have lightweight jvm?
16:15bitemyapplogic_prog: Azul is a thing, you know.
16:16technomancylogic_prog: partly because the JVM has really good JIT, they've chosen to optimize for one monolithic process that takes over the whole machine
16:16technomancyalso BEAM evolved in that direction originally because early revisions were super unstable
16:16logic_progluajit seems very lighweight
16:16logic_progyet it has a decent jit
16:17technomancyso they *had* to have a design in which they were isolated and disposable
16:17technomancymuch like a millionaire who is still careful about money because he grew up in the depression
16:17tbaldridgeluajit is one of the best dynamic jits on the planet
16:17tbaldridgemostly because lua semantics are so simple.
16:17technomancylogic_prog: well no one really uses lua outside the context of embedding
16:17technomancyso their priorities are totally different
16:18technomancySun wrote the JVM to sell big-iron servers
16:18stuartsierraThe JVM has evolved to be heavily optimized for throughput in large applications. BEAM / Erlang evolved to be optimized for high-availability.
16:18logic_progstaurtsierra: I have never seen you here. what do you know about clojure?
16:18gfredericksjavascript evolved to be optimized for ___
16:18logic_prog:-) j/k
16:19tbaldridgelogic_prog: nah, it's okay. I work with stuartsierra and I wonder that too
16:19tbaldridge:-P
16:19stuartsierra:P
16:19hyPiRionhaha
16:19logic_progso suppose I really wanted killable clojure functions (say when they infinte loop), sounds like I should look into the cljs->lua backends
16:19logic_progsince lua processes are chepa
16:20logic_progso I'm writing this large scale app, and I'd prefer to have interchangeable parts that can be killed w/o restarting the main server
16:20stuartsierraBoom! https://github.com/clojure/clojure/search?q=%22stuart+sierra%22&amp;ref=cmdform
16:20bitemyapp`cbp: up to 83 stars :)
16:20tbaldridgelogic_prog: lua processes are completely isolated. that is, they aren't connected at all.
16:20tbaldridgelogic_prog: you have to run 1 VM per thread and come up with your own message passing.
16:20logic_progyes, I'm okay with that,
16:21logic_prog"message passsing in cojure is just pr-str + edn/read-string + sockets"
16:21logic_progso if I had clj -> lua, that'd be like 10 lines of code
16:21tbaldridgesure, if you want it to be slow.
16:21hyPiRionlogic_prog: It's completely doable in Clojure to kill threads through. Futures and threads have .cancel
16:21hyPiRionor .interrupt
16:21hyPiRionWell, "kill"
16:21logic_prog.interrupt / .cancel depends on the thread itself checking for interrupts
16:21technomancyIIRC the whole "future cancelling is unreliable" thing is overblown
16:22technomancyun-cancellable operations are pretty rare; I think it's just native code
16:22stuartsierraAnd I/O.
16:22hyPiRionBut you can't cancel I/O reads.
16:23hyPiRionOn the JVM, anyway. http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4514257
16:25technomancyyeah, we ended up writing a cancellable-copy for our worker cluster at my last gig
16:25hyPiRiontechnomancy: I'm sorry. :(
16:26technomancymeh; wasn't bad: https://github.com/technomancy/die-roboter/blob/master/src/die/roboter.clj#L195
16:26technomancy(for what we needed anyway)
17:07Mandarhi
17:07Mandarquick question: is destructuring the most idiomatic way to get a value in an "embedded" vector?
17:07Mandar(let [{{x 5} 1} my-vector] (println x))
17:07Mandari do this for instance
17:07Mandaris there anything more idiomatic?
17:08Mandar(what i could write in another language is: my-vector[1][5])
17:09alandipertMandar: (get-in my-vector [1 5]) is another way
17:09Mandarthank you!
17:10technomancy,(let [myvec [1 [2 3 4[ 5]]]] (get-in myvec [1 3 0]) )
17:10clojurebot5
17:10technomancyoh too slow
17:10Mandarit's way easier to read, thanks
17:10hiredmanvectors of vectors are weird
17:10hiredmanyou will almost certainly at some point end up turning the outer vector in to a seq
17:10TEttingeralso, update-in is useful for changing one value
17:11technomancyalso destructuring a vector against a vector is more common, but ugly if you only need the fifth thing
17:11hiredmanI would either switch to a matrix library, or look at some other data representation
17:12Mandari just need to store a few values by group
17:12Mandari don't need a key, i just want them to be ordered so vectors seemed like the right data structure
17:13hiredmanMandar: is the outmost vector logically a collection or logically part of the thing?
17:14bitemyapptechnomancy: my poor coworker is trying to reproduce the different behaviors of my Emacs setup from scratch in a clean install. He's literally doing archaeology on my dotfiles the poor bastard.
17:14bitemyapppretty funny though.
17:14bitemyappfeels a bit like Pham Nuwen...
17:14Mandarhiredman: it's just a collection
17:14hiredmanif the outermost vector is logically a collection you'll have a better time assuming it is a seq
17:15Mandarbut then wouldnt' be a bit harder to get the third column?
17:15Mandari just need fast access to a specific column
17:16technomancybitemyapp: hehe
17:16TEttinger,(get-in {:a [0 1 2 3]} [:a 2)
17:16clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: )>
17:16TEttinger,(get-in {:a [0 1 2 3]} [:a 2])
17:16clojurebot2
17:16TEttinger,(update-in {:a [0 1 2 3]} [:a 2] inc)
17:16clojurebot{:a [0 1 3 3]}
17:17hiredmanMandar: ok
17:17TEttingerreturns the whole collection, same collection types, with one element modified by inc
17:17Mandari'm building a small app to handle conjugation actually
17:18Mandarso my values are forms of verbs for instance
17:18Mandarand my keys really are a conjugation number
17:18TEttingerser -> soy eres es...
17:18Mandarwith rules like "verbs of the 1st group end with ..."
17:18hiredmanMandar: I would switch to a map with pairs as keys
17:18clojurebotExcuse me?
17:18technomancybitemyapp: how much do you know about how xmonad works?
17:18hiredmanyou have a database of things indexed by some value
17:19hiredman{[0 1] "foo"}
17:19Mandarthis could also work
17:20bitemyapptechnomancy: drips and drabs, from hacking on it in my .xmonad/* and reading what dons has said about building it. Why?
17:21hiredmanand then you can get more complicated, {{:row 0} #{"foo"} {:column 1} #{"foo" "bar"} {:row 1} #{"bar"}}
17:21hiredmanstart doing set logic and implement sql
17:22Mandarhaha, that's a bit far ahead
17:22technomancybitemyapp: I have this crazy idea of a continuous spread of workspaces instead of discrete ones; something you could hook up to an HMD+digital compass to pan around in analog
17:23bitemyapptechnomancy: oculus?
17:23technomancyand the only chance in hell I'd have of actually doing it (still slim) would be to hack it into xmonad
17:23hiredmantechnomancy: that is the same as having 1 big workspace
17:23technomancybitemy
17:23bitemyappI think the non-discrete nature would bother me.
17:23technomancyoops
17:24technomancybitemyapp: something like that. I don't care about stereoscopic, but even modulo that it appears to be cost-competitive
17:24technomancybitemyapp: you'd need the ability to lock it down or your neck would tire, sure
17:25technomancyhiredman: yeah, provided you can zoom to a particular spot
17:27technomancyI didn't say it was a good idea
17:30bitemyappI think it's a neat idea.
17:30bitemyappIt'd just need to some work to work well
17:32logic_progdumbass question: I know how to use clojure rrb-vector. How do I use rrb-vector in cljs?
17:33technomancybitemyapp: that's why I'm asking now even though no studies have been made on the prolonged health effects of HMDs =)
17:33bitemyapplogic_prog: import this: https://github.com/clojure/core.rrb-vector/blob/master/src/main/cljs/cljs/core/rrb_vector.cljs
17:35logic_progbitemyapp: what do I add to project.clj ?
17:36bitemyapplogic_prog: that's the $10,000 question on ClojureScript lately.
17:36logic_progyeah how else am I supposed ot use this?
17:36logic_proggit clone and copy the entire cljs directory into my cljs directory ?
17:37TEttingerlogic_prog: https://github.com/clojure/core.rrb-vector#releases-and-dependency-information
18:21bitemyappnoprompt: yo
18:22nopromptbitemyapp: hey buddy
18:22bitemyappnoprompt: A buddy should be joining us, so it might be 3. Saturday or sunday?
18:25nopromptbitemyapp: sunday should work for me.
18:25bitemyappnoprompt: sweet. time?
18:27technomancyBronsa: https://github.com/technomancy/leiningen/commit/248362f2e72973eeeab8cb85e8ed1657b751e4fb
18:33nopromptbitemyapp: i don't see why 3pm wouldn't work but i'm open to whatever is convenient
18:34Bronsatechnomancy: thanks!
18:34technomancythank dsantiago =)
18:40Bronsa(inc dsantiago) ;; thanks :)
18:40lazybot⇒ 1
18:42bitemyappnoprompt: no, I meant 3 of us.
18:42bitemyappnoprompt: would you be up for starting around 1 pm?
18:44bitemyappnoprompt: we'll be working on frak++ right?
18:53Mandaris there a command in leiningen to rename a project?
18:54logic_progisn't it just vim
18:54logic_progs/old-name/new-name/ ?
18:54logic_progs/vim/vim project.clj/
18:54Mandaryes, but you also have to rename the directories
18:54Mandari thought there might be something
18:54logic_progyou mean "mv" ? :-)
18:54Mandar:)
18:54hiredmanyou don't actually have to rename the directories
18:55Mandarit's cleaner, isn't it?
18:55hiredman*shrug*
18:56hiredmanthe point is the namespacing mirroring directory structure is orthogonal to the maven coordinates
18:57hiredmanone does not → anything about the other
18:58nopromptbitemyapp: sure. we can do that.
18:58Mandarhiredman, ok thanks
19:01bitemyappnoprompt: sweet.
19:12Mandarhey, i can bother you some more now
19:13Mandar(sorry)
19:13Mandarhere's some code: https://github.com/agolp/sangria/blob/master/src/sangria/core.clj
19:13bitemyappMandar: are you working on Sangria?
19:14Mandarmy brain just might
19:14Mandarbut i'm not aware
19:14Mandari would like to check in the conjugate function if a word is composite and if so do some specific bindings in my let
19:14bitemyappSangria doesn't look like a proper NLP library, are you sure that isn't what you need?
19:15Mandaris sangria a library i was not aware of?
19:16Mandarit's just a dumb name i gave to my learning project
19:16bitemyappno, that's what I was trying to determine when I asked you if it was yours.
19:16Mandaroh yes it is sorry
19:16bitemyappYou didn't give a clear answer, so I assumed it as something you were trying to leverage.
19:16Mandarenglish is not my first language (and i'm a bit tired)
19:16bitemyappIt's fine.
19:17Mandarso i'm just writing a smallish app to help my little sister learn her spanish
19:17bitemyappMandar: what's your native language?
19:17Mandarfrench
19:18Mandarso everything works fine for simple verbs, i can conjugate them at the present tense
19:19Mandari'm trying to handle composite ones
19:19Mandarwhich end with "se"
19:19Mandarso (if = (clojure.string/join (take-last 2 verb)) "se") ... i need to cut the ending
19:20bitemyappMandar: I didn't know Spanish had consistent conjugation.
19:20Mandarand add a pronoun before
19:20Mandari'm not sure whether it works for every verb
19:20Mandari just checked the 15 verbs my sister gave me
19:20bitemyappMandar: you don't want to take-last a string.
19:21bitemyapp,(.endsWith "base" "se")
19:21clojurebottrue
19:21Mandaroh great, that's exactly the kind of things i need to learn
19:21bitemyapp^^ The above is more declarative and idiomatic.
19:21bitemyappMandar: you should be extremely careful with processing human text on a character by character basis without the assistance of an NLP library.
19:21bitemyappI realize your problem scope is limited, and that's okay, just be aware that it won't really work in the general case.
19:22Mandarsure
19:22Mandari've done some stemming and basic word manipulation in other languages before
19:22Mandarbut i just need to handle specific lowercase verbs here
19:23Mandarso what's the idiomatic way to rewrite these (take-last) ?
19:23Mandarwhen i want to actually get the termination, or the root
19:23Mandara regexp looks overkill
19:23bitemyappoh yeah, if you want to just slice it, then yeah, take-last.
19:24bitemyappI was talking about the endsWith case.
19:24Mandarthank you!
19:24bitemyappworking with strings as lists will fall apart in any kind of high performance situation but I doubt it matters to you right now.
19:25Mandaris there a way to add an if clause inside a let?
19:26bitemyappMandar: well there's if-let and when-let.
19:26Mandar(hey it didn't like (.endsWith word "se")
19:26bitemyappMandar: there's also or/and based short-circuiting for values in a let expression.
19:26Mandaroh yes, i've read about those
19:27Mandarthere's just so much to use i can't remember the right syntax for each situation
19:28Mandar(i had a syntax error sorry)
19:28rovar_awaybitemyapp: won't the seq operations operate on the strings as vectors?
19:29bitemyapprovar: https://github.com/clojure/core.typed/wiki/Strings
19:31justin_smith,(map (comp class seq) [[0 1 2] "hello"])
19:31clojurebot(clojure.lang.PersistentVector$ChunkedSeq clojure.lang.StringSeq)
19:32rovarbitemyapp: huh
19:33rovarso what is the recommended path to high performance string operations?
19:34Mandarjava functions i guess?
19:35AimHerejVM bytecode!
19:36justin_smithstring ops, whether clojure.string or via interop
19:37bitemyapparrdem: http://i.imgur.com/aK4BUza.jpg
19:37bitemyapprovar: depends on the operation.
19:40bitemyapprovar: ropes are good for mass insert/delete, vectorized/array-based strings are good for cache-oblivious linear scans, inverted indexes for search...
19:41TEttingerropes?
19:41Mandaris it idiomatic to imbricate let clauses?
19:41TEttingeris that the opposite of extricate?
19:42Mandarinterleave
19:42Mandarput one inside the other?
19:42bitemyapptechnomancy: my coworker is really taking to the Emacs "craft thine own lightsaber" thing.
19:42hiredman,(let [a 1 b (inc a)] [a b])
19:42clojurebot[1 2]
19:42bitemyapptechnomancy: now he's diving into Helm, ag, the works.
19:43technomancybitemyapp: are you relishing having a sith apprentice?
19:43justin_smithMandar: more common to see (let [a (f x) _ (frob a) b (b x)] b)
19:43bitemyapptechnomancy: yes, partly because there are so many vim/Sublime Text/PyCharm users here.
19:43justin_smithMandar: so assinging to an unused var (_ by convention) instead of nesting lets
19:43bitemyapptechnomancy: so having an Emacs user that isn't me or the other Common Lisp weenie is kinda cool.
19:44Mandarjustin_smith, i would like to throw an if somewhere in there
19:44Mandarso i cannot rely only on destructuring
19:44Mandarwould it be bad to have a let inside an if-let ?
19:45justin_smithno, not bad at all
19:45Mandarthanks, i'll try to show some code
19:52bitemyappWhen did JVM become synonymous with Unix? I thought JVM users were trying to hide from the OS?
19:54technomancyI think it's more that "computers" became synonymous with Unix?
20:10bitemyapptbaldrid_: are persistent array maps supposed to be broken in clojure-py?
20:10bitemyapptree maps seem okay though.
20:27bitemyappactually persistent tree map seems a bit fucked too/
20:29xeqitechnomancy: I think that happened around jurassic park time
20:31technomancyhehe
20:53logic_progwith apologies for my dumbass question: how do I modify https://github.com/clojure/core.rrb-vector/blob/master/project.clj so that (require [cljs.core.rrb-vector]) does not result in a good.require could not find cljs.core.rrb-vector
20:57Mandarhttps://github.com/agolp/sangria/blob/master/src/sangria/core.clj
20:57Mandari've added support for composite verbs
20:58Mandaras expected, it's getting ugly
20:59Mandarit looks like i could remove some of these lets, but i don't know how
21:00Mandari'd prefer find-root not to check for composite words again
21:08logic_progwhat do I put in project.clj so that lein cljsbuild can have access to core.rrb-vector, from cljs land?
21:26egosumis lobos *the* way to go about migrations (without maintaining text/text files of SQL)?
21:26egosumand if so, is there some better documentation somewhere (i haven't found it yet), or is reading the code the expected way of learning how to use it?
21:40danlentzapologies for silly question but what is the proper way to "re-export" from one namespace symbols inherited ("used") from another?
21:41danlentzyou might guess im coming at this from a common-lisp perspective
21:41justin_smith(def new-name other-lib/old-name) will work
21:42justin_smithbut why not just let the end user refer to the other lib if they want it?
21:42danlentzi want to create a top level namespace that can be "used" containing the public api from a sub-namespace where the implementation lives
21:43justin_smithwhy not have private definitions instead?
21:43justin_smithand use is a bad idea anyway
21:43justin_smithbetter to require :as
21:43danlentzwell thats a good question.
21:43danlentzrihght i meant that
21:43danlentzrequire
21:44justin_smithanother common convention is to end a name with a * or - if you don't think it will be widely useful outside the lib itself
21:44justin_smithsee let* vs. let
21:45justin_smithyou almost always want the latter
21:45danlentzi guess the answer is that i was looking to re-export the public symbols from more than one sub-namespace
21:45justin_smithwell def works for that
21:46danlentzie i have clj-uuid.digest and clj-uuid.bitmop and was looking to create a single top level namespace to be required called clj-uuid
21:47andyf__danlentz: And perhaps you are asking if there is a way to do this wholesale rather than one symbol at a time?
21:47bitemyapparrdem: sub and I are doing DotA. you in?
21:47danlentzthks def will do
21:47justin_smithdanlentz: for example in caribou.field we define a data structure that is going to be used by people using model - field is an implementation detail for model (def models field/models)
21:48danlentzkind of brittle in that the list will require to be maintained in sync with implementation namespaces
21:48andyf__danlentz: You left and rejoined in the few seconds it took for me to ask: and perhaps you are asking if there is a way to do this wholesale rather than one symbol at a time?
21:48danlentzyes
21:49danlentzsorry colloquy is crap
21:49danlentzandyf__: yes wholesale
21:49justin_smithns-publics will get you everything exported by an ns
21:49justin_smithif you want to do it in a wholesale automated way
21:50danlentzah ok
21:50danlentzcool
21:50justin_smith,(ns-publics 'clojure.core)
21:50clojurebot{sorted-map #'clojure.core/sorted-map, read-line #'clojure.core/read-line, re-pattern #'clojure.core/re-pattern, cond->> #'clojure.core/cond->>, keyword? #'clojure.core/keyword?, ...}
21:50danlentzdoing it this way worked very well in CL i guuess not quite ideal with clojure
21:50justin_smithit isn't really the design clojure has in mind
21:51andyf__justin_smith: And then you would need to do ns-intern or something in the current namespace? Or can def be made to work in the loop one would do over ns-publics results?
21:52andyf__er, that would be intern, not ns-intern
21:52danlentzalso the def technique may interfere with proper docstrings in cider?
21:52justin_smithandyf__: you would need a macro to call def on the values returned one at a time, or use ns-intern I guess, I am less familiar with the latter but something like that should be possible
21:52justin_smithdanlentz: def accepts doc strings, which you can get from the original via meta
21:53danlentzdefing a var to be a function i read somewhere is not smiled upon
21:53justin_smith,(-> 'clojure.core ns-publics first second meta :doc)
21:53clojurebot"keyval => key val\n Returns a new sorted map with supplied mappings. If any keys are\n equal, they are handled as if by repeated uses of assoc."
21:53danlentzmaybe ns-intern is better
21:57justin_smith,(doc intern)
21:57clojurebot"([ns name] [ns name val]); Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var."
21:57justin_smiththat is the one that should work
21:59justin_smithyou would still have to manually copy over the metadata
21:59justin_smithwith-meta to attach it, meta to grab it
22:01danlentz(map #(apply (partial intern (ns-name *ns*)) %) (ns-publics 'clj-uuid.api))
22:01danlentzhow bout that?
22:01justin_smithyou still need to grab the metadata
22:02danlentzugh
22:02justin_smithif you want doc strings etc.
22:02danlentzy time to rethink tyhis approach i think
22:03justin_smithif you apply the meta to the symbol based on the meta of the original that will work though
22:04justin_smith,(-> 'clojure.core ns-publics ('cond->) meta)
22:05clojurebot{:macro true, :ns #<Namespace clojure.core>, :name cond->, :arglists ([expr & clauses]), :column 1, ...}
22:12danlentzalthough this approach does have benefit of "insulating" other ns's from the somewhat "contageous" nature of the primitive-math library
22:26Mandarhey, it's getting better: https://github.com/agolp/sangria
22:26Mandari just have to look more into namespaces
22:26Mandarthe repl didn't like me making up a name for my second namespace
22:27Mandari had to (load-file ...) manually before requiring the namespace
22:29Mandarthanks for your help everyone
22:33justin_smithMandar: the - needs to be changed to _ in the file name
22:34justin_smiththough you can keep the name of the ns the same
22:34justin_smithcommon beginner tripup
22:34Mandarjustin_smith, thank you!
22:34justin_smithnp, that messed with my head when I started using clojure too
22:36danlentzfriday night seems to be namespace night here on the #clojure channel!
22:37justin_smiththank you for subscribing to namespace facts!
22:37justin_smithdid you know a clojure namespace is a hash map from names to values?
22:37justin_smithnow you do!@
22:37Mandar:)
22:39Mandari'm really impressed with the community
22:39Mandar(but i need sleep - good night guys!)
22:40justin_smithgood night
22:40danlentzi think the key, similar to the way i learned to love cl packages, is to develop a personal namespace practices that work and then stick to that template with religeous ferver
22:41danlentzjustin_smith: thanks again for the tips
22:41justin_smithnp
22:41technomancyAin't no party like a namespace party because a namespace party requires no class.
22:42danlentzim finally invited to a party!
22:42technomancyyeah, we really needed a cleric.
22:44danlentzelf cleric rolls 1 and chokes on ns symbol re-exportation plans
22:45justin_smithbitemyapp is a high priest of Haskell
22:47danlentzscroll "bar" erupts in a tower of flames
22:57bitemyappjustin_smith: no no, just a deacon. I'm working my way up.
22:57bitemyappgood timing though, was about to dig into some hask.
22:58technomancy"hask"?
22:58technomancydo people actually say that?
22:58bitemyapptechnomancy: that's the name of the category.
22:59bitemyapptechnomancy: http://www.haskell.org/haskellwiki/Hask
22:59justin_smithI'm gonna code me up some cloj yo
23:02bitemyappI was going to dig into some category theory. Come on guys :|
23:03justin_smithI still have category theory on my "to learn more" list
23:03justin_smithGeneralized Abstract Nonsense 4 lyfe
23:05bitemyappjustin_smith: hum. I think that's a bit unfair to the field but okay. :)
23:06justin_smithhttp://en.wikipedia.org/wiki/Abstract_nonsense
23:06bitemyappjustin_smith: it's used self-deprecatingly and by outsiders.
23:06justin_smithyeah, I find it charming
23:07justin_smith"Note that referring to an argument as "abstract nonsense" is not supposed to be a derogatory expression, and is actually often a compliment regarding the sophistication of the argument."
23:25technomancyTIL
23:34akhudekjustin_smith: that's abstract nonsense
23:40justin_smithindeed!