#clojure logs

2013-02-12

00:00spjti'm just thinking of myself. I just moved from a job where I was the "senior developer" as a junior in college, because I could remember more obscure PHP BS than anyone else
00:00yogthosspjt: first they switch for writing concise java, then they learn about higher order functions, and then mind blown :P
00:01spjtI wrote a PHP "framework" based on "higher order functions" in the form of callbacks
00:02spjtwell, my beef jerky is done, that means it's bedtime.
00:05technomancyanyone familiar with the guts of nrepl.el? I can't figure out how to initiate a connection without showing the *nrepl* buffer.
00:10michaelr525hey..
00:12michaelr525anyone knows of an alternative webchat for freenode?
00:12michaelr525my work blocks the official one..
00:15ppppaulfrozenlock, there are some github things, but no recordings as far as i know.
00:17Xorlevspjt: Scala in the wrong hands _is_ scary. I know of a company who was Scala <and> PHP, then their Scala developer up and left them. Heard it wasn't good Scala either.
00:23ivanso unfortunately you cannot raise TieredStopAtLevel from 1 to 4 at runtime because the flag is not writeable and management.cpp stops you
00:25ivanunless you want to do super bad things with JNI of course
00:43michaelr525hey
00:44JanxSpirithow can I map over a map to call toString on the values, returning a new map with those values?
00:46technomancyJanxSpirit: (zipmap (keys m) (map str (vals m)))
00:46JanxSpirittechnomancy thanks - I'll take a look at that
00:51ivanno love for obfuscation? (into {} (map #(assoc % 1 (str (val %))) m))
02:08ivan&[java.lang.Long/TYPE (java.lang.Long/TYPE)]
02:08lazybot⇒ [long long]
02:17Raynesivan: It's a really long long.
02:19ivanby induction I should be able to wrap as many parens around a static field access as I want
02:22amalloyivan: you've proved N=0 and N=1. i look forward to the proof for N=N+1
02:23amalloyfor reference, i provide ##(((((((((fn this [] this)))))))))
02:23lazybot⇒ #<sandbox8276$eval16174$this__16175 sandbox8276$eval16174$this__16175@b29eda>
02:23RaynesWhat the fuoh I see.
02:23RaynesTook me a second.
02:24RaynesNice work.
02:31tomoj&(dissoc (group-by #(subs (.getName %) 0 (.lastIndexOf (.getName %) ".")) (vals (ns-imports *ns*))) "java.lang")
02:31lazybotjava.lang.SecurityException: You tripped the alarm! clojail.testers.ClojailWrapper@17305e0 is bad!
02:31tomojwell, it's BigInteger, BigDecimal, Callable, and Compiler
02:33tomojRT, Keyword, Symbol, IPersistentMap etc are there, but commented out
02:33tomojwonder why
02:36Raynestomoj: What are we talking bout?
02:36ivanthe bottom of https://gist.github.com/rednaxelafx/1165804 has a lot of great info about -XX:+PrintCompilation and JVM optimization/deoptimization
02:36tomojthe default imports
02:36RaynesCool.
02:37tomoj&Compiler
02:37lazybotjava.lang.SecurityException: You tripped the alarm! class clojure.lang.Compiler is bad!
02:38arcatan._____.
02:40PhonatacidHi. Is it possible to make an inherited constructor private in clojure. A bit like gen-class' expose-methods, but with the opposite effect. (if I remember well, this is possible in java).
03:47tekkki have a sequence with multiple sequences and want to remove the wrapper sequence eg. '( (:foo) (:bar) (:baz) )
03:47tekkkhow can i do that?
03:47michaelr525hey..
03:48cmdrdatstekkk: (apply concat '(...)) ?
03:49tomojwhere did you get a sequence with multiple sequences? :)
03:52amalloyPhonatacid: there is no such thing as an inheited constructor
03:52amalloyin clojure or in java
03:54PhonatacidSo if ,say, I have a class extending the Exception class and want to force to initialize it with parameters (String message, SpecialObject so) instead of just (String message), there is no way to do it ?
03:54Phonatacidanyway I gave up gen-classing exceptions.
04:04michaelr525Phonatacid: there is an example of exception gen classing here: https://github.com/maxweber/clj-facebook-graph/blob/master/src/clj_facebook_graph/FacebookGraphException.clj
04:06Phonatacidthank you, but I think I'll use slingshot from now on.
04:10michaelr525y
04:11michaelr525cool..
04:12michaelr525IRCing in emacs in tmux over ssh from work :)
04:14alex_baranoskylatest release of Slamhound fixes a bug and makes it work nicer w/ clojure.test
04:28MacCoasterHi folks, are there any better alternatives to writing this? http://pastebin.com/9Z0dkz1c
04:40thorwilMacCoaster: why (apply generate-post [file (second args) (nth args 2)])? doesn't (generate-post file (second args) (nth args 2)) work?
04:40cmdrdatsMacCoaster: For starters, destructure args? (let [[x y z] args] (map (fn [file] (generate-post file y z)) (get-posts x)))
04:41MacCoasterthorwil: it's over a map, file is obtained from a list
04:41thorwilMacCoaster: so what?
04:42MacCoastercmdrdats: looking up destructure args, thanks.
04:43cmdrdatsMacCoaster: well worth while - will save you tons of first, second and nth pain :)
04:43MacCoasteryeah, that looks really nice. I'm just new to clojure :D
04:44cmdrdatsMacCoaster: if you have control of generate-post, move the post arg to the end
04:44cmdrdatsthen you can (map (partial generate-post y z) (get-posts x))
04:44MacCoasterwhat do you mean, move the post arg to the end?
04:44cmdrdatswhich is a bit nicer
04:45MacCoasteroh you mean the file?
04:45cmdrdats(defn generate-post [file y z]) to (defn generate-post [y z file])
04:45MacCoasteraha, so basically currying.
04:45MacCoasterI was kind of looking for that. :)
04:45cmdrdatspartial application :)
04:46cmdrdatsI'm still trying to figure where the difference is, but apparently it's not quite currying
04:47thorwili think it's called currying when it happens implicitly
04:47cmdrdatsaha
04:47MacCoastercmdrdats: currying is just n functions with single args each, which is what partial application of one argument kind of does
04:48MacCoasterfrom my understanding anyway
04:48thorwilMacCoaster: what i meant regarding apply: (apply str ["b" "e" "r" "t"]) vs (str "b" "e" "r" "t")
04:48cmdrdatsah, with partial application as clojure does it, if you ((partial generate-post y) z), you'll get an arity exception
04:48cmdrdatsinstead of a function that takes another arg
04:49cmdrdatsso, not curried, but just partially applied
04:49MacCoasterthorwil: anyway, back to your so what: if i did (map (generate-post file (second args) (nth args 2)) (get-posts (first args))), where would file come from?
04:50tgoossenswhen using midje filter i get this error: lein midje :filter core
04:50tgoossensException in thread "main" java.io.FileNotFoundException: Could not locate :filter__init.class or :filter.clj on classpath:
04:50tgoossens at clojure.lang.RT.load(RT.java:432)
04:50thorwilMacCoaster: i did not suggest a change outside of the fn body
04:51MacCoasterthorwil: ah, I misunderstood
04:54MacCoasterthanks cmdrdats, thorwil!
04:55thorwilnp
04:57cmdrdatsMacCoaster: any time :)
05:07tgoossensI'm using nrepl in emacs for the first time now. I succesfully connected to a nrepl server but can't seem to find an easy way of a whole clj file in the repl. And later on evaluating an expression that gets evaluated on that repl server
05:08cmdrdatstgoossens: C-c C-l for loading a file, and C-M-x to push the current top level form?
05:08cmdrdatsi think :P
05:09tgoossensi'll try that. probably going to search for a cheat sheet
05:09tgoossens*should
05:15ljosIs there anywhere I can read about creating my own exceptions and extending java exceptions in clojure?
05:16ljosIt seems to be mostly really old information out there.
05:16tgoossensanyone uses emacs for other programming languages than lisp?
05:16ljosyes.
05:16ljostgoossens: yes
05:17tgoossensljos: tell me more
05:17tgoossensµ
05:18ljostgoossens: I use it for everything except Java, but I plan to change that.
05:18tgoossensinteresting java in emacs
05:18tgoossensjust using emacs for the first time btw
05:18ljosI plan to change to eclim-emacs
05:18ljosbut I dont do any Java right now so I haven't had the chance.
05:19tgoossensi now will have to work on a project in java for a few months
05:19tgoossensmaybe i should try it out
05:19cmdrdatsi tried to switch to java dev in emacs
05:19cmdrdatsnot a good idea - too much syntax cruft to haul around
05:20ljosI do Go, Python and Clojure for the moment.
05:20cmdrdatseclipse does a phenomenal amount of shifting for you, which emacs doesn't really deal with
05:20tgoossensmmmyes
05:20cmdrdatsthat was my finding, anyhow
05:20ljosI tried a couple of years back as well. I changed back to eclipse rather quickly, but with emacs-eclim it looks promising.
05:21tgoossensljos: interesting. I've noticed that Go is gaining some popularity
05:21cmdrdatsljos: I'll check out emacs-eclim :)
05:21ljostgoossens: I'm just learning it by myself right now. Not using it in production.
05:23ljosBut emacs seems to be a good fit for it. There is even an official emacs-mode in it.
05:26tgoossenscool
05:32cmdrdatsljos: haha, just had a look at emacs-eclim - brilliant idea, am going to give it a shot
05:35tgoossensljos: me too
05:39tgoossensinteresting, emacs mode for sublime + eclim for sublime
05:39tgoossensits going to be a hard choice (certainly now i'm at the point of learning emacs)
05:40tgoossensbecause sublime looks also quite nice
05:41ljosOne of the big reasons I am not using sublime instead of emacs is that emacs is open source.
05:44cmdrdatsjust having paredit for java is going to change my life...
05:45cmdrdatsif I had to pick one feature in emacs I can't live without, it would be paredit
05:45cmdrdatsand barely anything else implements it properly
05:47tgoossensAlso a sublime paredit plugin is in the make
05:48ljoscmdrdats:paredit is the bees knees.
06:46ljosWhich is the ideomatic constructor: (->Object) or (Object.) ? I like -> better...
06:46tgoossensHow can i avoid having to type Math/abs Math/sin . Like an import static in java
06:47cmdrdatsljos: (Object.) :P
06:48tgoossensi just want
06:48tgoossensabs, sin , cos
06:48vijaykirantgoossens: import-static http://richhickey.github.com/clojure-contrib/import-static-api.html
06:48lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/import-static-api.html and try to stop linking to rich's repo.
06:48cmdrdatstgoossens: (defn abs [x] (Math/abs x))
06:48vijaykiranbut it isn't migrated yet
06:48tgoossenscmdrats: i'd prefer not to do that :p
06:49Foxboroncmdrdats: https://github.com/masondesu/sublime-paredit
06:49tgoossensfoxboron: so far it doesn't work for mer
06:49tgoossens*me
06:50cmdrdatsFoxboron: looks cool :) glad to see paredit making it's way around :D
06:51cmdrdatstgoossens: tbh - you should just live with Math/sin and Math/abs
06:51ljosWhat does ->Object do different then Object.
06:51ljos?
06:51cmdrdatsbecause you really do want your external calls fairly explicit
06:51cmdrdatswhich is probably why import-static wasn't migrated
06:52tgoossenscmdrdats: i'm not willing to do that :)
06:52cmdrdatssame reason why (use) is a bad idea, vs (require)
06:52cmdrdatsljos: I understand (Object.) is idiomatic :)
06:52cmdrdatstgoossens: why not?
06:53ljoscmdrdats: It seems to be most often used, but what is the real difference between . and -> ?
06:53cmdrdats-> is the threading macro
06:54cmdrdats. is for java access
06:54Foxboronljos, i believ Clojure Programming say (Object.) is the most preffered.
06:54Foxboronbelieve*
06:54cmdrdatsso -> is more general
06:54cmdrdats(-> 1 inc inc) => 3
06:54ljos->Constructor is not the threading macro.
06:54ljosthe space is important.
06:55cmdrdatsoh.. well, then (->Object) is a bad idea from readability :P
06:55cmdrdatsbecause it looks like a threading macro
06:56tgoossensbecause I don't want to type it over and over again. For the same reasons you use import static in java to make your code cleaner
06:56ljosNo. Because you cannot use the macro with a constructor.
06:56cmdrdatsthen a (defn) is what you want, perhaps in a math ns?
06:57cmdrdatsljos: example?
06:59ljoscmdrdats: (->Integer 1) returns an integer of 1, but (-> Integer 1) is a type error.
07:00ljoswait. there is something wrong.
07:01cmdrdatsljos: ye, (->Integer 1) doesn't work? :P
07:02cmdrdatsnot sure why you want to (->Integer 1) instead of (Integer. 1)?
07:02cmdrdatsor if you prefer (-> 1 Integer.)
07:06cmdrdatstgoossens: code cleaner vs code clearer.. trust me, implicit importing of functions drive you nuts down the line, but as the example shows, it's trivial to implement import-static in your own code if you really want it
07:06alexnixonljos: you might be thinking of records, which implicitly have two constructor fns, ->RecordName and map->RecordName
07:06tgoossensok
07:06cmdrdatsalexnion: thanks - I forget about records!
07:07ljosalexnixon: that is it.
07:07the-kennyWhat's the hot thing for gui nowadays?
07:07ljosalexnixon: but I got the two mixed up and see that I can use the Record. as well.
07:08ljos* Record. constructor.
07:09alexnixonljos: yeah, though the Record. version isn't a function
07:10alexnixon(map ->Foo [1 2 3]) ; works
07:10alexnixon(map Foo. [1 2 3]); doesn't work
07:10michaelr525the-kenny: web
07:11ChongLihmmm
07:11the-kennymichaelr525: Heh :D I need to do some hardware (serial) interfacing and I don't want to go the server/client route
07:11the-kennytoo much hassle
07:12ChongLiwhen a cljs case gets turned into javascript the order of the clauses changes?
07:12ChongLior is this the work of the closure compiler?
07:12cmdrdatsthe-kenny: web is probably your quickest route, but if you want to trudge through swing, seesaw is pretty neat
07:14yedioh sick, postgresql supports arrays
07:15ljosalexnixon: I see. Thank you for the clarification.
07:21michaelr525the-kenny: another options is to use ClojureCLR with WPF or WinForms :)
07:22michaelr525I think I saw a blog post of someone who did it
07:22the-kennymichaelr525: I'm on OS X ;)
07:22the-kennyI'll try seesaw. Just wanted to check if there's something newer/better
07:27michaelr525the-kenny: Qt with clojure: http://runningwithrails.com/2012/09/clojure-and-qt-for-desktop-applications/
08:21kaoDis there any reason why conj behaviour is structure dependent?
08:24ChongLikaoD: yes
08:24ChongLiit's optimal
08:25ChongLiconj puts elements on the front of list
08:25ChongLiand on the end of a vector
08:25kaoDso conj is guaranteed to be optimal
08:25kaoDk thx
08:25ChongLiif you want consistent behaviour
08:25ChongLiuse cons
08:29thorwili need to validate that a string is of the form "a-b" ("1-2", "flip-flop" ...)
08:29thorwili thought i could just use split and count the pieces, but that fails for "a-b-"
08:36gfredericksthorwil: is "a-b-" valid?
08:36gfrederickswhat about "a-b-c"?
08:37thorwilgfredericks: "a-b-" should be invalid, but isn't now, since split drops the final "-" without adding a result
08:38thorwilgfredericks: "a-b-c" is invaild and easily recognised, because i test for the number of parts
08:39michaelr525thorwil: maybe regex?
08:39gfredericks#"[^-]+-[^-]+"
08:39thorwilhttps://www.refheap.com/paste/11206
08:39gfredericksthorwil: ^ that should work, eh?
08:39gfredericksalso it looks a bit like a face which is a plus
08:40thorwilheh
08:40pjstadiggfredericks: that will probably match "a-b-c" though
08:40pjstadigyou'll need like ^ and $
08:40gfrederickspjstadig: I assumed re-matches
08:40pjstadig#"^[^-]+-[^-]+$"
08:40gfredericks,(re-matches #"[^-]+-[^-]+" "a-b-c")
08:40clojurebotnil
08:40gfredericks,(re-matches #"[^-]+-[^-]+" "a-bc")
08:40clojurebot"a-bc"
08:41pjstadigwell that works then :)
08:42gfredericksw00h! you can always be right if you make up enough unstated assumptions
08:42thorwilcool, thanks!
08:42thorwilthough i wonder if just testing for a final "-" and then maybe doing the split necessary anyway isn't much cheaper
08:46pjstadigi think a regular expression will end up being pretty performant
08:48thorwili already see the code with re-matches is much shorter
08:49gfredericksregular expressions are _always_ the right answer
08:49gfredericksexcept when macros are
08:49ChongLibonus points if your regexes are generated by macros
08:50thorwilor threads
08:50gfredericksman you should be able to unquote inside a regex
08:50thorwiljust to mentions was has been brought up re 99 problems
08:50gfredericks,`#"foo ~(+ 1 2)"
08:50clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ExceptionInInitializerError>
08:50pjstadighuh
08:50pjstadighttps://blogs.oracle.com/nashorn/entry/clojurescript_repl_if_you_build
08:52ChongLiyeah I don't know what's going on there
08:53ChongLiI hope Bodil will explain
08:53ChongLiring in a volcano? what's lord of the rings got to do with this?
08:53BodilChongLi: Explain what? :)
08:54ChongLiBodil: your little visit to oracle?
08:54ChongLiI guess oracle is mount doom?
08:55BodilChongLi: I think the Tolkien references in that post refer to this: https://twitter.com/bodil/status/299139231144607744 :)
08:55ChongLiahh, haha
08:56BodilLong story... Marcus told me a while back Oracle are hiring developers like crazy, I said "yeah, I guess you're staffing up to invade Gondor."
08:57ChongLiyeah, oracle is pretty scary
08:57Bodil(Marcus being the guy who wrote the post.)
08:57ChongLibut I'm glad they're hiring more developers rather than lawyers
08:58pjstadigBodil: the nashorn repl looks cool
08:58BodilYeah, I was surprised to visit the Oracle office in Stockholm and find actual developers working on cool stuff. Not what I expected. :)
08:58Bodilpjstadig: It's really just the Rhino repl without the Rhino. Kind of waiting for Nashorn to become fast enough to make that count. :)
08:59pjstadigsure, but it'll be interesting to see how well nashorn can do
09:00BodilDefinitely. It's pretty slow right now booting the Cljs runtime, but according to the Oracle guys the JIT stuff isn't quite done yet and it should improve a lot when it is.
09:00ChongLithat'll be nice
09:10ljosWhen define a new type in clojure and want to use that in a different namespace I need to do (:import [ns type]), but if that ns has a - in it like this-ns, I have to do (:import [this_ns type]). Is this considered a bug or just something we have to live with?
09:11gfredericksljos: not a bug
09:12gfredericksit's just the abstraction being leaky, which happens when you start doing java things
09:13ljosgredericks: I do understand that this because java-classes can not contain -, but I would have thought that in the import statement it would just auto-translate - to _.
09:14gfredericksI suppose it could do that. I don't expect most people would like that though.
09:14ljosgfredericks: But this isn't really java interop directly. Or is there a better way to import deftype created types?
09:14gfredericksimport is always java interop
09:14ChongLiis there an idiomatic way to handle vendor-prefixed functions in cljs?
09:14ljosOk.
09:14gfredericksljos: you might be able to get away with using deftype without importing
09:15gfrederickse.g., use the ->Foo constructor function
09:15gfredericksbut deftype is quasi interoppy already
09:16TimMccmdrdats: There's actually some subtlety to the import-static thing, namely that cos as a fn requires reflection, and cos as a macro can't be passed around.
09:16ljosofc it would call the underlying platform, but I wouldn't call or want it to be /interop/ as it is a language feature and sometihng that should be the same for different platforms.
09:16TimMccmdrdats: Err, sorry, *as a fn requires boxing
09:52Phonatacidhey, is there a way to set a global exception handler in clojure. I can do this in java by using ThreadGroups...
09:55ohpauleezPhonatacid: You can do the same thing in Clojure, or you can use dynamic captue: http://oobaloo.co.uk/dynamic-error-capture-with-clojure
09:58tsdhHi. I have some lib that has some deftypes and some protocols, and some protocols are extended upon types using (extend-protocol ...). Now I have some project that uses the lib, and in there I get IllegalArgumentException because some protocol method isn't defined for the class generated by deftype. But that's wrong. (extenders MyProtocol) lists the class.
10:00tsdhOh, it seems it's some weird class loading issue. The class listed in (extenders MyProtocol) is not the same class than (class myObjectIWasInvokingTheProtocolMethodOn).
10:01tsdhThe class in extenders was loaded by #<AppClassLoader sun.misc.Launcher$AppClassLoader@82aaec8>, and the class of the object was loaded by #<DynamicClassLoader clojure.lang.DynamicClassLoader@5e012913>. So it seems to be some class loading issue...
10:01Phonatacidohpauleez: thank you. It was an interesting read and I'll try to build my code like this next time. But I'll just use java's Thread.UncaughtExceptionHandler since I'm trying to catch java exceptions.
10:02ohpauleezPhonatacid: totally welcome
10:23yedicallenbot: it doesn't support {{ block.super }} either?? cmon bro
10:23yedicallenbot: might beregretting that decision
10:35Frozenlockohpauleez: Oh my poor eyes... that's a very little font you have there.
10:35ohpauleez:)
10:36ohpauleezI apologize
10:36ohpauleezSlides can be downloaded
10:36ohpauleezsorry if you're on a portable
10:39FrozenlockI'm on a dual 24 inches display and still find it tiny :/
10:49maioI have to store list of some things and I need to be able to add items into this list from different threads (http requests). what should I use? atom, ref, var, ..?
10:50ChongLiatom
11:26dnolenstuartsierra: another CLJS release w/ 418 applied?
11:27stuartsierraworking right now, but I'll take a look later
11:28ohpauleezthank you both
11:28dnolenstuartsierra: thx
11:29bbloomis there a bot shortcut to get to a ticket?
11:29bbloom$jira CLJS-418
11:53jjl`hi folks. what's the standard way of supporting third party modules? i'm thinking they'll conform to an interface, but where to put them? and how to notify the main application of their existence?
11:58brainproxybest library for working with URLs?
11:59hugodjjl`: https://github.com/pallet/chiba is a small wrapper to load "plugins" based on them defining namespaces under known prefixes. It doesn't impose any interface. Often people use the final section of the namespace as a function name to look for within the namespace (c.f. lein plugins)
12:00jjl`hugod: and they'd just go somewhere in the classpath?
12:01hugodjjl`: yes
12:01jjl`excellent. thanks
12:05technomancy_chiba city! =D
12:05ChongLichiba city blues
12:11technomancy_bbloom: I think lazybot only knows about github issues
12:15hugodbbloom: fwiw, https://github.com/hugoduncan/muir is the outcome of our conversation around ast transforms the other day
12:16bbloomhugod: i've been off the grid for a week & a half, my brain needs to be rebooted. remind me what we talked about
12:19hugodbbloom: I needed to write an ast transform that could pass information up the tree, and was wondering if fipp could help me - you basically suggested it wouldn't, and pointed me at analyze
12:20bbloomhugod: ah, right. ok, let me peek at this
12:20bbloomhugod: did you look at Attribute Grammars too?
12:20hugodbbloom: never heard of those
12:21bbloomhttp://en.wikipedia.org/wiki/Attribute_grammar
12:24hugodthanks for the pointer - looks like I have more reading to do :)
12:25bbloomheh, but cool stuff
12:25bbloommay i ask: what are you using it all for?
12:28AtKaaZis this the right way to import an inner class? (import '[com.tinkerpop.blueprints TransactionalGraph$Conclusion])
12:30hugodbbloom: in pallet, the user writes functions that call actions. These actions are not executed immediately, but are used to build an "action-plan". Each action returns a value, but the value can't be used until execution time. Pallet has functions/forms to handle expressions using action values, but it doesn't make for natural code. I'm experimenting with translating "plain" clojure into the correct pallet forms.
12:31bbloomhugod: ah, i see
12:31bbloomtricky business
12:33hugodI've tried all sorts of tricks so far - monads, macros, etc, but the code still isn't very obvious to write for advanced use cases
12:38bbloomhugod: this is a problem i've thought about a bit too.... you want to allow "arbitrary" code, but in reality it isn't arbitrary. it's some subset subject to some restrictions
12:38bbloomthe same problem comes up in a lot of domains
12:39bbloomthere's no good way to get the exact feature set you want short of writing your own language, but that means you lose a lot of features & predictability of the base/host language
12:39bbloomit seems that the problem is that the base language, in this case clojure, is too rich
12:40bbloomand there is no obvious way to thin it out
12:45jjl`you either have to allow arbitrary code or parse it properly
12:46jjl`in the case of arbitrary code, you trust they'll only do the things you permit, calling parts of a library to construct these plans
13:03drorbemetHi, today I am looking for a clojure project on github or elsewhere, which gives a good example of how to configure a clojure project for TDD, debug, automatic documentation and deployment. Does any one have a hint which project to choose?
13:04hugodbbloom: indeed - I was looking at racket's languages for inspiration. There you can expose the host language, but restrict it too
13:06bbloomhugod: can you link me to that reference page?
13:33aphyrAnyone have a clue about getting lein-rpm to package a fat jar?
13:33aphyrI don't know at project time what the uberjar's file name is going to be, so I can't specify it in :sources
13:34technomancy_aphyr: if you don't mind leaving out the version number from the filename you can set :uberjar-name in project.clj
13:41hugodbbloom: yet to find a good reference page. http://queue.acm.org/detail.cfm?id=2068896 is quite useful though
14:03danlarkinmmitchell: hi!
14:03danielglausermmitchell: Wassup!
14:03dakronemmitchell: hi!
14:03yazirianmmitchell: hi
14:03hiredmanmmitchell: yo
14:03pjstadigmmitchell: yo
14:03mmitchellhello!
14:04leathekdmmitchell: yo
14:04drewcmmitchell: hey hey!
14:05ChongLimmitchell sure is popular around here!
14:06joegallowhoa.
14:06joegallowait a second.
14:06joegallo*the* mmitchell is here?
14:06drewrI can't believe it's mmitchell!!!11
14:06drewcjoegallo: I know! Amazing !!
14:07TimMcI don't even know who mmitchell is and *I'm* amazed!
14:07scgilardijoegallo: that's Mr. Mitchell to the likes of you
14:07joegalloi'm sorry sir!
14:16svjsonDoes "java.lang.NoClassDefFoundError: clojure/lang/ILookupHost" mean anything to anyone?
14:16hiredmanit means you are trying to use code compiled with one version of clojure with another version of clojure
14:17hiredman(abi incompatible)
14:18svjsonAha, thanks
14:30Marble68o/
14:35ChongLihmmm
14:36ChongLiGPU Process in chromium pegs at 100% CPU usage no matter how small the canvas is (even 10x10 pixels)
14:36ChongLiI find it hard to buy the argument that it's compositing that is causing this
14:40atyzHey guys, I'm a bit of a clojure idiot, trying to deploy my first app with immutant. However i didn't create it with lein new immutant, how would i setup my project to work with it
14:40atyzits just a simple compojure app
14:40brainproxyanyone used clojure and one of PayPal's SDKs or their REST API to process payments or donations?
14:41brainproxyI've got an old creaky rails / activemerchant thing that I need to revamp (barely even remember how it works... built 3 years ago)
14:42thalassios_xelonhello :))
14:42thalassios_xelonhow to delete a value from a vector if you know the index?>
14:43jcrossley3atyz: you shouldn't have to do much. 'lein new immutant' isn't required. it just creates a blank src/immutant/init.clj file for you.
14:43thalassios_xelon(fun? [1 2 3] 3) ----> [
14:44thalassios_xelon(fun? [1 2 3] 1) ----> [1 3]
14:44atyzahh jcrossley3 - so basically i can jsut run lein immutant init
14:44atyzthank you
14:46jcrossley3atyz: sure thing
14:47thalassios_xelonhow to delete a value from a vector if you know the index?
14:48TimMcthalassios_xelon: You just asked that.
14:49dnolenthalassios_xelon: there's no operation that does that
14:49ChongLiyou could use keep-indexed
14:50dnolenthalassios_xelon: well it can be done, linearly. perhaps when Michal Marcyk gets further along w/ RRB-Trees it can be done efficiently.
14:51thalassios_xelonok thx :)
14:51thalassios_xelonkeep-indexed i dont know what that means...
14:52dnolen,(doc keep-indexed)
14:52clojurebot"([f coll]); Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included. f must be free of side-effects."
14:52xavrileyhi could anyone help me with extracting a (defproject) from a project.clj file?
14:52ChongLi,(keep-indexed (fn [i e] (when-not (= i 1) e)) [1 2 3])
14:52clojurebot(1 3)
14:53thalassios_xelonok,thx :)
14:53dnolenthalassios_xelon: note keep-indexed doesn't preserve the vector type, so you still need to combine with (into [] ...) to get the behavior you want.
14:53akhudek(let [v [1 2 3 4 5] i 2] (into (subvec v 0 i) (subvec v (inc i))))
14:54dnolenthalassios_xelon: akhudek solution is a bit better for large vectors
14:54xavrileyI've got this so far: (defn extract-defproject [#^LineNumberingPushbackReader rdr]
14:54xavriley (loop [leindef rdr]
14:54xavriley (when (= "defproject" (str (first (read leindef))))
14:54xavriley (prn (read (first leindef)))
14:54xavriley (recur rdr))))
14:55ChongLithough I'd imagine keep-indexed would be better if you want to remove more than one element
14:55ChongLisince you'd otherwise have to create a lot of subvecs
14:55thalassios_xelonok i will do it with subvecs
14:57dnolenBodil: btw, how well does the Nashorn CLJS repl behave, it's pretty cool that they talk about it here - http://blogs.oracle.com/nashorn/entry/clojurescript_repl_if_you_build
14:58technomancyxavriley: (first (drop-while #(not= 'defproject (first %)) (repeatedly (read rdr)))) ; maybe
14:59Bodildnolen: They're the ones who helped me compile Nashorn in the first place so I could write the REPL, so it's nice to see them take responsibility for it. :)
14:59ChongLihow does nashorn compare to v8 etc?
14:59Bodildnolen: It's essentially the same as the Rhino REPL except it's using Nashorn instead... benchmarks are currently not available.
15:00dnolenBodil: is the startup time for Nashorn any different?
15:00dnolenBodil: I imagine node-repl is still the best far as that goes
15:00Bodildnolen: It's better than Rhino, but not much. I was promised a fix for that though - apparently they're still working on the JIT.
15:01Bodildnolen: Yeah, Node is still noticeably faster than Nashorn. We'll see when they get their JIT patches in, though... once startup is finished, it seems very fast.
15:02dnolenBodil: nice
15:02ChongLiwhy do chrome flags have names like "Disable accelerated 2D canvas: Enable"
15:02ChongLiso stupid
15:02mrb_bkthat's awesome Bodil
15:07xavrileytechnomancy: thanks, it's not quite right but I can work on it.
15:20brainproxyrecommendations on example/s of a robust clojure-based test suite for a clojure-based web service?
15:28tommoguys, i'm learning clojure and cannot think of any exercises at all, any ideas?
15:28matthavenertommo: 4clojure.com
15:29tommomatthavener: ahh perfect, ty
15:29matthavenerno problem
15:31cemerickBrutal: inline deftype/record method implementations *must* be grouped by interface/protocol https://gist.github.com/cemerick/4773110
15:32lynaghkcemerick: the second interface implementation for Object overrides the first one?
15:32cemericklynaghk: or something equivalent
15:32jweissif i want to take the quoted expression [[x y] [1 2]] and the quoted expression (+ 1 2) and build (let [[x y] [1 2]] (+ 1 2)) i have a problem where the expression may have a mix of qualified symbols and local ones. Is there any easy way to sort that out? my naive attempt ends up with 'Can't let qualified name: user/x'.
15:32lynaghkcemerick: do you get a warning from the interpreter_
15:32lynaghk?
15:32cemerickheh, no
15:33cemerickThus, "brutal". :-)
15:33lynaghkcemerick: todo: add checker to kibit
15:33dnolencemerick: yeah, a warning would be nice - that issue is probably a problem for CLJS too
15:33cemerickStared at that a looong time before I tried forcing the impls together, thinking "nah, this can't be it" :-)
15:34dnolencemerick: heh, I definitely don't think that style should be allowed
15:35cemerickdnolen: the implementations were being generated by a macro, and I didn't even think to bother collapsing the impls on a per-interface basis
15:35cemerickI don't really see a reason to disallow it.
15:36dnolencemerick: because it's a pain, deftype/record macros already insane
15:36cemerickThat's an implementation detail. :-P
15:37dnolencemerick: it's also the kind of allowed redundancy around multiple :use, :require, etc
15:37cemerickit's all bad karma anyway, the result of my attempting to use the same macro from clj and cljs
15:37dnolenbetter to be stricter about what is allowed and give friendly warnings / errors
15:37amalloycemerick: i have had a patch for that in jira for ages, rhickey told me to bugger off
15:38hiredmanit never even occured to me to try and do it that way
15:38amalloysomewhere i have a macro that re-groups stuff by interface for you
15:40cemerickWhatever the approach, it's all in the 'fit and polish' category.
15:43jweiss$findfn ['conj 'clojure.core/conj]
15:43amalloyjweiss: []
15:43lazybot[]
15:44jweisshm, so once my symbol is bare-quoted, it's too late to get it resolved with syntax-quote?
15:45jweiss,(let [x 'conj] `~x)
15:45clojurebotconj
15:45amalloyjweiss: for all X, (identical? X `~X)
15:45amalloy`~x is like (first (list x))
15:47cemerickjweiss: how crazy do you want to get?
15:48cemerick,(let [v (resolve 'conj)] (symbol (-> v .ns .name name) (name (.sym v))))
15:48clojurebotclojure.core/conj
15:48jweissamalloy: if I have an expression like (+ x y) and one like [[x y] [1 2]] can i build (let [[x y] [1 2]] (clojure.core/+ x y)) without using something like postwalk-replace?
15:48tommoguys, why doesnt #(str "Hello, " %) suffice for answering question 16 on 4clojure?
15:49xeqitommo: wheres the ! ?
15:49jweisscemerick: but you're starting with the var. i want to start with the bare symbol
15:50tommoxeqi: thanks lol
15:50jweissok i see
15:51amalloywhy would you do this, jweiss?
15:52amalloyif you're relying on resolve to produce clojure.core/+, there's no difference between that vs producing + and letting the compiler resolve the symbol itself
15:52jweissamalloy: i'm trying to treat automated tests as data, keeping the expressions unevaluated. (i had tried going the other way, saving the expressions with serializable-fn but that required all my callers to use it).
15:52amalloyexcept that in your case, if the user has (let [+ (fnil + 0)] ...) their version of plus curiously gets ignored
15:52spuzwhat is the ' seen in "(resolve 'conj)"?
15:53amalloyso? + is just as unevaluated as clojure.core/+
15:53jweissamalloy: the probelm isn't + really, it's x and y. they'll get resolved to user/x when i really want them to stay unqualified.
15:53SegFaultAXspuz: A quote.
15:54SegFaultAX&(+ 1 2 3 4)
15:54lazybot⇒ 10
15:54spuzSegFaultAX, is it clojure syntax for something?
15:54SegFaultAX&'(+ 1 2 3 4)
15:54lazybot⇒ (+ 1 2 3 4)
15:54SegFaultAXspuz: Yes, it's a quote, see above.
15:54spuzok thanks
15:54amalloyjweiss: only if you're surrounding them with `, which i can't really see why you'd be doing
15:55jweissamalloy: well, eventually the expression will get passed to eval, so symbols have to get resolved
15:56amalloyuhhh. eval is going to use the same rules that ` would have used, except that it will understand not to resolve locals like x and y
15:56amalloy(eval '(let [[x y] [1 2]] (+ x y))) works just fine
15:57amalloyyou don't need to interfere with symbol resolution at all
15:57jweissamalloy: oh right, duh. i got stuck on this before and the answer was to bind *ns* to the same ns where the expression originally came from.
15:59jweisssorry, forgot what that had been for.
16:02dxeh&'([1 2] [3 4] [5 6]) 2) [5 6])
16:02lazybot⇒ ([1 2] [3 4] [5 6])
16:28dabdHere http://clojure.org/special_forms it says: "If a name symbol is provided, it is bound within the function definition to the function object itself, allowing for self-calling, even in anonymous functions."
16:28dabdif a name symbol is provided then the function is not anonymous, am I missing something?
16:29llasram##((fn me! [] me!))
16:29lazybot⇒ #<sandbox8276$eval23310$me_BANG___23311 sandbox8276$eval23310$me_BANG___23311@571165>
16:29Bodildabd: It's anonymous in the sense that it's not bound to any symbol external to the function.
16:29thalassios_xelon,(+ 2 3)
16:29clojurebot5
16:30TimMcIn a sense, *all* Clojure fn values are anonymous.
16:30dabdBodil: whenever I define local functions I made them anonymous or use letfn
16:30ChongLiBodil: you could also call it a pseudonymous function :)
16:30dabdI didn'«t know it was possible to name a function locally
16:30tommo,(/ 22 7)
16:30clojurebot22/7
16:30dabdmake them*
16:30TimMctommo: Rationals are surprisingly useless.
16:30tommo:D
16:31llasramAnd the eponymous function: ##@#'fn
16:31lazybot⇒ #<core$fn clojure.core$fn@7d948b>
16:32dabdthe only purpose of naming a function locally is to allow self recursion since you can't use the name after the definition of the fn
16:32dabdor am I wrong?
16:33Bodildabd: That sounds about right.
16:33dabdjust tried this: (let [f (fn my-fn [x] x)] (my-fn 3))
16:34bbloomhugod: sorry, had to run before. i checked the irc logs & saw your message. reading that acm post now
16:34TimMcGiving a fn a name also makes for better stack traces. :-P
16:35dabd you can also use recur with an anonymous fn so i don't think it is very useful unless it is for readability
16:36Bodildabd: Recur only works for tail recursion. The named fn allows for non-tail recursion too.
16:36dabdok
16:37hugodbbloom: let me know should you find anything better on racket's languages
16:39dxeh&(let [x 3, y 10] (- y x))
16:39lazybot⇒ 7
16:41leif-pHi, all. I am trying to get emacs nrepl autocompletion working, and getting a "ClassNotFoundException: complete.core" error. The top hits on google are bug reports that mark this as "fixed," but I think I have the most up-to-date elisp packages. Has anyone else here personally resolved this problem?
16:49gfredericksTimMc: rationals are not useless.
16:51amalloyTimMc: there is also some dark magic whereby when you let a function its local name becomes part of its classname: ##(let [foo (fn [] 1)] (class foo))
16:51lazybot⇒ sandbox8276$eval23388$foo__23389
16:53dabdI am looking at the computer shootout language site comparing Clojure to OCaml http://benchmarksgame.alioth.debian.org/u64q/benchmark.php?test=all&amp;lang=clojure&amp;lang2=ocaml
16:54dabdinteresting how Clojure has a nice performance in some benchmarks
16:55ChongLithose benchmarks have little to do with the language
16:55dabdyes the code is tweaked for performance
16:55dabdif you compare the Ocam code looks more idiomatic
16:56dabdthough in the imperative style
16:56ChongLiand the code for the different languages really varies in quality
16:57ChongLialso I think it's not really a good idea to compare dynamic and static languages
16:57dnolendabd: and the benchmarks could probably be made to be faster than OCaml on nearly every single one. But's it's a fairly boring exercise.
16:57dabda statically typed clojure would be an interesting language
16:58ChongLihttps://github.com/frenchy64/typed-clojure
16:58dnolendabd: if you know what you're doing you can nearly always gets Java performance out of Clojure.
16:58dabddnolen: and probably the ocaml programs can be made even faster
16:58ChongLierr
16:58technomancyif java is currently beating ocaml in that benchmark it probably means the submission just isn't very good
16:58TimMcamalloy: The fn's classname also incorporates the enclosing fn's name, I think.
16:58dnolendabd: perhaps, but my impression is that OCaml doesn't offer any significant advantage perfwise over Java
16:59amalloysure, that much is pretty clear
16:59dabddnolen: I thought ocamlopt produced native code almost as fast as C. Can Java beat that?
16:59ChongLiyeah and if you put enough work into it you can make any clojure program as fast as java
16:59TimMc&(class ((fn foo [] ((fn bar [] (fn baz []))))))
16:59lazybot⇒ sandbox8276$eval23432$foo__23433$bar__23434$baz__23435
17:00TimMcOh, I suppose they are "inner classes".
17:00jcrossley3llasram: is the meetup in the same building as ARUG?
17:00ChongLiI think it's far more interesting to compare how complicated it is to write certain kinds of programs in various languages
17:00dnolendabd: these are I've heard about here and there. But my impression of FP langs against C is - take any such claims with serious skepticism - at least in the arean of microbenchmarks
17:01ChongLiI'd like to see some people take a shot at rich's ant colony demo
17:01ChongLi(in other languages)
17:02technomancyChongLi: someone tried to do it in CL, with hilarious results
17:03hiredmanthe ant colony demo is really showing off the stm, most languages don't have an stm, so people use locks and say "look you can do it in my language too" missing the point
17:03ChongLisure, they can use locks
17:03ChongLiI just want to see what that'd look like
17:03hiredmanwhich misses the point
17:04ChongLiI bet it'd be pretty non-trivial
17:04desertmonadForgive my ignorance, but isn't stm implemented with locks?
17:04hiredmanthe ant colony demo is about getting consistent reports out of a complex process without impeding the process
17:05hiredmandesertmonad: it is
17:05ChongLibut if you're going to write an stm first and then use that, you're cheating
17:06ChongLijust as someone writing a lisp interpreter in C in order to do a logic programming DSL is cheating
17:06hiredman~cheating
17:06clojurebotcheating is clojure
17:06drewcahem CL? STM? www.p-cos.net/documents/cstm.pdf
17:07hiredmanthank you for jumping in to the middle of a conversation and completely missing the point
17:07hiredmanit really helps
17:09desertmonaddrewc: don't mind hired man, he's having his period
17:10drewcdesertmonad: it happens.
17:10technomancyputting mutable data structures in STM doesn't really help; IIRC that was the conclusion MS research reached when they experimented with a C# STM.
17:10technomancyyou have to have immutability baked in for it to make sense
17:11hiredmanthe reason that the common lisp impl for the ant colony demo someone put forward was laughable was exactly because it used a naive locking strategy that completely missed the point of the demo
17:11hiredmanhttps://groups.google.com/forum/?fromgroups=#!msg/comp.lang.lisp/HQFMhGrKrcg/cGnhGgmRbKgJ
17:13ChongLiyeah it's not really an impl
17:13ChongLiit's an imitation
17:14TimMcdesertmonad: That's not appropriate.
17:14ChongLiit doesn't satisfy the requirements (coordination and consistency)
17:14drewchiredman: I remember that actually ... I was a lisper back then myself :)
17:15hiredmandrewc: your immediate and unthinking defense of common lisp gave it away
17:15desertmonadTimMc: you are right. sorry hiredman.
17:15hiredman(when no one was attacking common lisp)
17:15TimMcAnyway, he's always like that. :-P
17:16TimMcRelevant: http://www.mit.edu/~jcb/tact.html
17:17drewcmy defense? are you that flawed that you think it was a defense? ;)
17:18gfredericksTimMc: that's the most memorable thing I've read today
17:18gfrederickswell maybe cgrand's decaying lists
17:18gfredericksbut it's at least #2
17:18hiredmandrewc: I think reacting to "oh the specific port of the ants sim to common lisp is flawed because it uses with locks and not an stm" with "ahem, cl has an stm" is a knee jerk defensive reaction
17:19hiredman"* drewc has no idea what is going on or what is being chatted about, but saw CL and STM"
17:19ChongLithat the hell? adblock plus is telling me "It seems that you meant www.mst.edu"
17:19ChongLiwhat?
17:19clojurebotwhat is 2d6
17:19dxehare there any jvm bytecode manipulation libraries ____that are built in clojure____
17:19desertmonadTimMc: perhaps I am neither a nerd or normal, but that essay reads to me like an excuse for nerds to be jerks. We can go to #emacs for that. I've always been struck by how generally kind and helpful the clojure community is.
17:20TimMcdesertmonad: Yeah, it could be read that way. I see it as an educational tool for bridging certain cultural divides.
17:20drewchiredman: is that what I was reacting to? amazing .. well thank you for telling me, at least now I know what was going on and being chatted about!
17:20TimMc#clojure is *fantastic*. I love y'all.
17:21hiredmandxeh: not really, there was a port of the clojure compiler to clojure that included it's own bytecode generation stuff written in clojure
17:21TimMcChongLi: When that ABP feature went live it told me that instead of www.example.com perhaps I wanted www.example..com? (extra dot)
17:21hiredmandxeh: is there a reason not to use asm or bcel?
17:21ChongLiTimMc: I'll be sure to disable it
17:21dxehhiredman: is it basically just a port of objectweb asm or something
17:21SurlyFrogI would /really/ appreciate it if anyone could take a minute and comment on a piece of code I wrote to merge two sorted seqs. It seems like I may have made it more complex than necessary. Feels like there must be a more idiomatic way to do this. http://pastebin.com/BQLSEvBs
17:22dxehand hiredman because those are both designed with OO and it could get weird
17:22dxehanyways doesnt matter i guess i will just write my own lib
17:22hiredmandxeh: I have no idea, it was generally dismissed out of hand as being silly to reimplement all that stuff
17:22ChongLiTimMc: OK that's weird; there's no preference for the anti-phishing option?
17:22hiredmandxeh: using asm from clojure is fine
17:22amalloywell, this won't work on sequences containing nil or false, for starters, SurlyFrog
17:22TimMcChongLi: I think it offered to turn itself off.
17:23dxehhiredman: not like its hard to implement anyways the jvm spec is amazingly documented
17:23ChongLiTimMc: still a bad UI choice
17:23dxehi plan on writing a syntax tree structure anyways so it would be easier to start off from scratch
17:23SurlyFrogamalloy: true
17:23TimMcIt's feeping creaturism.
17:23hiredmanthe only short fall I've had with asm is for parsing bytecode
17:23ChongLiTimMc: if I had enabled it, would I have ever had an opportunity to disable it again?
17:24dxehah, i actually wrote a few java "deobfuscator"s (using different libraries each time such as asm, bloat, bcel, serp, etc)
17:24dxehbasically they all reverse obfuscation techniques but ofc they were in java
17:24amalloythe general structure is basically okay, although since you're not using laziness or vectors it reads like a port from common lisp
17:24hiredmanyou know asm is in the jdk now with java 7 (re-rooted under sun.* somewhere)
17:25dxehhiredman: not the latest version though
17:25amalloySurlyFrog: for a working, lazy implementation, see https://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L259
17:25dxehanyways im just gonna write my own bytecode lib
17:25hiredmansorry java 8 I mean
17:25SurlyFrogamalloy: yeah, that's what I was thinking. I mean, this is pretty much how I would do it in Common Lisp. If the seqs passed in as parameters are lazy, do I not preserve the laziness?
17:25amalloyno
17:25SurlyFroghow come?
17:25SurlyFrogwhere do I break it?
17:26amalloyeverywhere. you don't attempt to do anything lazy
17:26amalloytail recursion has exactly the opposite goal of laziness
17:26SurlyFroghmmm….
17:27SurlyFrogthe laziness is giving me craziness...
17:27leif-pemacs nRepl autocomplete question: it works with [lein repl + M-x nrepl], works with [M-x nrepl-jack-in], but does *not* work if I put (nrepl/start-server …) in my app init fn. Anyone run into this problem?
17:27gfredericksif you wrapped the body in lazy-seq and replaced tail recursion with explicit recursion?
17:27amalloy*nod*
17:27SurlyFrogoh….I think I see what you mean...
17:28hiredmanleif-p: you don't have all the nrepl middleware that lein includes
17:28gfredericksthe lazy-seq macro immediately does nothing, and runs the body later when necessary
17:28gfredericksSurlyFrog: so each time the function gets called it just returns a thunk until you actually ask for something; so it'll only get realized once step at a time
17:29SurlyFroggfredericks: okay, I'm following you. Just need to get my head completely around it.
17:31SurlyFrogso it would be something like: `(lazy-seq (cons (if (pred a b) a b) (merge-seqs seq-a seq-b) … with a bit of logic there to rip off the head and what not.
17:32leif-phiredman: Thanks! So my best best is to dig into how the lein repl task starts its server?
17:33hiredmansure
17:35gfredericksSurlyFrog: sounds right
17:46devinusanybody know what the latest light table version is?
17:48erikodevinus: I believe 0.2.7
18:01jweissis there a way to check if a given expression will compile in a given namespace, without causing side effects of actually evaluating it? I know i could (eval `(fn [] ~e)) or some such, but it seems like that might end up wasting a lot of permgen space.
18:13gfredericksjweiss: that is a fascinating question
18:13gfredericksI'm fascinated by whether or not a correct implementation would be easy
18:14gfrederickslikely not
18:14FrozenlockWould tryclojure be considered the smallest webrepl example?
18:14jweissgfredericks: i'm experimenting with using expressions for my "tests" rather than no-arg functions, but I don't want to completely lose compile-time checking. so the above would probably do what I want, but seems like it would waste memory
18:15amalloyjweiss: that won't waste any permgen
18:15amalloythe classloader that eval uses will get thrown away, and then the classes it loaded will get thrown away
18:15jweissamalloy: doesn't each anonymous function become a new class?
18:15jweissah
18:15jweissgood to know
18:15gfrederickswoah that's crazygonuts
18:16gfredericksI had no idea classloaders were so disposable
18:25amalloygfredericks: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L6585
18:30gfredericksamalloy: cool, thanks
18:31tgoossensAnyone read "Programming Language Pragmatics, Third Edition." . Would you recommend it?
18:34ravsterhello all
18:34ChongLihi
18:42Frozenlock!! https://github.com/technomancy/serializable-fn
18:42RaynesFrozenlock: Just now discovered that?
18:43FrozenlockYeah, I'm late to the party, nobody invited me :(
18:43RaynesFrozenlock: https://github.com/flatland/clojail/blob/master/src/clojail/testers.clj
18:43anykaohi, folks. How do you develop clojurescriopt in vim interactively?
18:43RaynesWritten entirely in terms of serializable functions.
18:43FrozenlockRaynes: Well I just discovered that by looking at the clojail doc :)
18:44ravsterI'm working with the 'friend' auth system, and I'd like to know if I can have friend do some dynamic authorization. Specifically, I don't want to just know if a user has an account on the system, but I want to make sure that the user is allowed to access a particular path, and the path is going to have a 'department id number' in it.
18:45ravsterWe were thinking of populating the user ':roles' key with stuff that would have the correct auths for it.
18:46ravsterI don't know if this is the right way to go about it, has anyone else tried something like this? Also, please let me know if I need to elaborate on the problem.
18:51dxehhttp://pastebin.com/BH78bKHg results in Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: buf in this context, compiling:(cbml/core.clj:9)
18:51dxehnot sure why it would do that though
18:52hiredmandxeh: there are lots of things wrong there
18:53hiredmandef creates a global binding of a namespaced name to a value
18:53hiredmanyou should not use it in side a function
18:53dxehoh okay
18:53Frozenlockdxeh: www.refheap.com
18:53hiredmandxeh: let is lexically scoped, let bindings only exist in the body of the let
18:54dxehright
18:54dxehso is that what my error comes from, me trying to globablly declare within a function
18:54hiredmanno
18:54hiredmanyou will not get an error for that
18:55hiredmanlook at the def magic line, look at the let binding for buf
18:56dxehk fixed it lol
18:56dxehi am just trying to pick up clojure :P i havent learned a lisp yet so i wanna use clojure :D
19:09FrozenlockIs adding something in your lein profile sufficient to add it in all projects? I'm trying to get serializable-fn to work, but I keep getting an error with (use '[serializable-fn]) in the REPL. Doing 'lein deps :tree' in the project I'm currently in also shows the serializable-fn package.
19:09FrozenlockOh wait, it's serializable.fn ?!
19:10technomancyyeah, you should be able to add it to :dependencies in :user
19:11FrozenlockYup, that's what I've done. It works now, I just assumed a bad namespace.
19:13dxeh,defrecord
19:13clojurebot#<CompilerException java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/defrecord, compiling:(NO_SOURCE_PATH:0)>
19:13dxehhow do you make the bot link to articles?
19:14FrozenlockI wonder if something would break by using the serializable/fn in 'defn', instead of core/fn.
19:20FrozenlockWell no, everything seems to work...
19:23FrozenlockI must be missing something here; why is the serializable/fn not the default behavior in clojure?
19:23technomancyFrozenlock: memory usage, I think
19:24technomancythere's been talk for ages about some kind of "dynamicity knobs" that would let you tune usefulness vs memory usage, but nobody's done anything about it because jira
19:25technomancywell, other than allowing locals clearing to be disabled
19:26tomojbecause jira?
19:28technomancybecause jira is _
19:28FrozenlockShame.. I really like the serialization, but requiring it everywhere is a little cumbersome
19:28technomancyfill in the blanks as you choose =)
19:30FrozenlockReally fun: (second (read-string (pr-str my-fn))) --> ([x] (+ 1 x))
19:30tomojjira is so difficult to use that people can't communicate effectively enough about dynamicity knobs to get something done?
19:31tomojI mean, I understand jira hate, but not what that has to do with getting something done
19:31technomancytomoj: sure, that's a kind way to put it
19:31tomojI'm actually probably a few weeks away from either running out of atlassian free time or buying jira :/
19:34FrozenlockWould hooking 'ns' work to use/require stuff in each namespace?
19:34abp```Seriously? No tools out there that do a better job tomoj?
19:34abp```Wow I'm well over quoted.
19:34tomojI'm sure there are, haven't found one yet. suggestions? :)
19:36technomancyanything? bugzilla would be an improvement.
19:37abpI don't know many from working with them, but there are a lot of hosted platforms for collaborative work..
19:37abppivotal tracker, fogreek stuff etc.
19:37hiredmandoes bugzilla even have an api?
19:37hiredmanI guess it does
19:38abpOr are those not clunky enough to get any work done?
19:39headshothiredman: crappy xmlrpc
19:39hiredmanguys, you can write core.logic programs for querying jira, https://github.com/hiredman/jiralog, game over
19:39tomojwe pretty much just use greenhopper. I've wondered about trello
19:40tomojthe api looks interestingly complete
19:42abptomoj: Greenhopper is an interface on top of jira?
19:42cemerickhiredman: problem solved :-P
19:43abptomoj: Oh, no I see.
19:43hiredmancemerick: it doesn't work well with the clojure jira install for some reason
19:43hiredmanthe rest api doesn't return any fields there
19:44TimMcWe use JIRA at work and I don't hate it.
19:44hiredmanditto
19:44hiredmanit is better then what we used before
19:44TimMcWe also don't use it for communication. It's just for issue tracking.
19:45TimMcIf conversation on dynamicity knobs is not progressing, that's a social problem and not a technical one.
19:45hiredmanyep, actually I just wired up a jenkins build to move issues around in jira to sync up with our code review pull requests
19:46TimMcCute.
19:46abpYea.
19:46TimMcGithub really needs to get on the ball and make Issues and PRs play better together.
19:46hiredmanI think the issue is the people who would most want the dynamicity knobs are the ones filled with the most bile around the current process
19:46abpJenkins Clojure test integration is still lein test configured as cmd call?
19:47hiredmansee, I am ok with jira, but I don't care about the knobs and don't really want them
19:47hiredmanabp: we have a bin/ci script checked in to each repo that jenkins calls
19:48cemerickso, there are no base types in cljs (e.g. equivalents to java.util.List)
19:49cemerickand extend-protocol and extend-type both require symbols for types (not forms like (type foo)), so a dispatch for `default` can't extend a type to a protocol dynamically at runtime
19:50cemerickso it seems that protocol extensions must be specified explicitly for each concrete type ahead of time. Correct, or no?
19:50hiredmancemerick: in clojure you can get around that by using let or def
19:50technomancyTimMc: yeah, fair enough. I use "jira" as a shorthand for "jira and other deficiencies in the clojure contribution process"
19:50abphiredman: To shell out to lein test? Or doing environment setup as nescessary, also?
19:50hiredmanabp: yes
19:51hiredmanabp: also publishing artifacts etc
19:51cemerickhiredman: well, there's often base types that you can extend to and be done with it; but, even if there aren't (e.g. with array types), you can do (extend-type (class foo) SomeProtocol ...)
19:51hiredmanall that stuff is versioned that way
19:51hiredmancemerick: have you tried (let [x (class foo)] (extend-type x SomeProtocol ...)) ?
19:52abpI haven't done anything with Jenkins or any CI-server, ever. But soon have to. Assist in setup at least.
19:52hiredmanif you use something like bin/ci you can keep build stuff in version control
19:53technomancyyeah, highly recommend using something like bin/ci
19:54hiredmanwe also have a little project for grabbing the xml build configs from jenkins, checking them in to git, and then a jenkins build that watches that git repo and re-pushes configs in to jenkins
19:54hiredman"we heard you like ci, so we ci'ed your ci"
19:55abpCould someone of you sketch out a little example from experience, please? Just found https://github.com/technomancy/leiningen/wiki/Jenkins while googling for Clojure with Jenkins.
19:55hiredmantechnomancy used to work here
19:56abphiredman: You guys take project automation serious. :)
19:56hiredmanoh
19:56hiredmanthat doesn't seem to be written by technomancy
19:56technomancyabp: those instructions are a lot more complex than they need to be
19:56hiredmanoh, maybe it is
19:56technomancyno, some other guy
19:56abpI see some half-assed setup choking in dust on the horizon..
19:56technomancymaking a jenkins job for lein itself is unnecessary
19:57technomancythere's a proper jenkins plugin for lein now I think
19:57abpDidn't even looked into it that close. Just saw some resource and thought it would suffice.
19:58cemerickhiredman: that compiles, but does not appear to work
19:58technomancyhttps://wiki.jenkins-ci.org/display/JENKINS/leiningen+plugin
19:59technomancypersonally I think it's easier just to use the bin/ci approach and pull lein in using the same mechanism you use to get jenkins
19:59technomancybut until lein2 lands in apt I must grant that this approach can be considered lacking
20:02cemerickhrm, perhaps it does
20:02abptechnomancy: Well, wow. I thougt that plugin was dead when searching around. The github-link I found by that time was https://github.com/pyr/jenkins-leiningen, but that 404s. It's https://github.com/jenkinsci/leiningen-plugin now apparently..
20:03technomancyabp: cool; feel free to update the wiki
20:03technomancyI already nixed the old instructions, but you could add this in
20:04hiredmancemerick: it works in clojure
20:04technomancyjenkins is a bit too clicky-clicky for my taste, but there are ways to set it up via proper config files
20:04NeekuOfPersiahiredman, am I still your biggest love?
20:05technomancyoh, except for the user management. that's just completely ridiculous.
20:05cemerickhiredman: well, you don't need the let in clojure anyway. i.e. (extend-protocol X (type []) (y [k] (count k))) just works
20:05technomancylast I checked anyway.
20:05cemerickthough it does seem to work in cljs now that I restarted my repl.....
20:05cemerickusing a let to get the type, that is
20:06cemericks/get/capture
20:06hiredmancemerick: there is some case where it is (was?) required
20:11hiredmancemerick: that actually fails if (type []) isn't the first type the protocol is extend to
20:12cemerickhiredman: what version of Clojure? Not seeing that here with 1.5.blah
20:13hiredman1.4 I guess?
20:13hiredman(extend-protocol X String (y [x] x) (type []) (y [k] (count k))) npes
20:14cemerickhiredman: oh, I thought you meant "first", temporally
20:16hiredmanhttps://github.com/clojure/clojure/blob/master/src/clj/clojure/core_deftype.clj#L66
20:20gozaboruis there a way to use partition-by with context? (e.g. how can I split a sequence ( [1 2 3 2 3 1] ) into increasing subsequences ( [1 2 3] [2 3] [1] ) )
20:21hiredmanpartition-by > ?
20:21hiredmanerr <?
20:21gozaboruright, that's what I was thinking
20:22gozaborubut I'm doing it wrong
20:22amalloyhiredman: partition-by doesn't get two elements
20:22amalloyhttps://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L224 ;; partition-between
20:22gozaboruexcellent, thanks amalloy!
20:35FrozenlockHow does one get the doc from a namespace? (doc clojure.core) just throws an error :/
20:40gfredericks,(-> clojure.core quote find-ns meta :doc)
20:40clojurebot"Fundamental library of the Clojure language"
20:42FrozenlockOh sure, obvious :P
20:42FrozenlockThanks
20:46ravsterHey, I'm getting a weird error in my program. I've got one function calling another function and passing in some variables. Those variables can be seen and are the correct type in the first function, but they are just 'nil' in the second function. I'm thoroughly stumped. I've been at this for a few hours. Any tips on what I should try to find out whats going on here?
20:47hiredmanrestart your repl
20:47gfredericksif that doesn't work, simplify your code as much as you can and give a paste
20:49ravsterhiredman: will do. thanks. didn't think about that.
20:50ravsterThe second function is accessed through a few namespace changes. Would that be an issue?
20:51hiredmanwhat do you mean by namespace changes?
20:55ravsterfunction 1 is calling function 2 in another namespace. in the second namespace, function 2 is defined as a partial of a function in yet another namespace. We're dealing with datomic-simple, and trying to have functions not know about stuff they don't need to know.
20:55gfredericksravster: that description sounded pretty tame
20:55ravstertame?
20:56gfredericksno obvious issues
20:56gfredericksregular usage
20:56ravsteroh, okay.
20:56gfredericksshould work
20:58ravsteryeah, whats even more frustrating is that we have 2 partial functions to the same base function, and one of them works just fine. maddening as heck.
21:12FrozenlockHmm... isn't (:refer-clojure :exclude [ns]) supposed to prevent 'ns' from being imported in the current namespace?
21:12cliftonis there a good resource for either getting started doing web development with clojure, or a coherent collection of best practices?
21:12cliftonive read Clojure Programming and I'd like to make something useful
21:13brehautclifton: what do you need that isnt covered by ring and compojure (as outlined in clojure programming) ?
21:14gfredericksFrozenlock: I thought so
21:14FrozenlockNot only does it still refer it, but I can't redefine it :/
21:15Frozenlock(doc ns) will always give me the clojure.core/ns documentation.
21:15clojurebot"([name docstring? attr-map? references*]); Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:refer-clojure ...) (:require ...) (:use ...) (:import ...) (:load ...) (:gen-class) with the syntax of refer-clojure/require/use/import/load/gen-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults
21:15cliftonasset packaging, development mode reloading, application structure etc
21:16brehautclifton: back to front; app structure varies a lot depending on the app, front end requirements, datastorage etc
21:16gfredericksFrozenlock: that seems to be the case for me too
21:17Frozenlock:(
21:17brehautclifton: dev mode reloading you can be handled by a ring library
21:17FrozenlockAnd ns-unmap won't accept a macro...
21:17gfrederickseh?
21:17FrozenlockOh I need a symbol
21:18brehautclifton: there isnt a huge amount of asset management stuff around at the moment. i think dieter might be the only thing in usable state atm, and its only for stuff that runs via node.js tools
21:18FrozenlockDone (ns-unmap *ns* 'ns)... still have 'ns' in my namespace.
21:18FrozenlockThe indestructible 'ns'
21:19brehautclifton: https://github.com/weavejester/ring-reload-modified
21:19cliftonah
21:19cliftonthanks for the link
21:19zach`I've been using emacs for five minutes and it's already my irc client. :-D
21:19brehautclifton: the #' on #'handler is vital for that to work right (its a var quote; ie you pass the var, not what the var is currently point to through)
21:20Frozenlockzach`: That's the path to enlightenment :P
21:20gfredericksFrozenlock: fortunately grepping clojure/src for 'ns' only gives 5407 results so this should be a snap to figure out
21:20cliftonright, it needs a reference
21:21ravsterzacht: wow. you catch on to it way quicker than I did
21:21zachtravster it's nothing to do with me. I downloaded Emacs Live.
21:22Frozenlockgfredericks: I tried with other clojure.core macros and it doesn't behave like this. ns is magical.
21:23gfredericksFrozenlock: just kidding it's 5451 matches
21:23FrozenlockAh! Easy as cake then.
21:23FrozenlockWhich is a lie. Ohhhh I'm so funny.
21:27brehautclifton: https://github.com/edgecase/dieter that was the asset thing i mentioned
21:27cliftonthanks
21:27cliftonfound a good site scaffold generator
21:28cliftonhttps://github.com/eprunier/lein-webapp-template
21:28cliftonin case anyone else comes in here and asks
21:29cliftonand noir isnt being updated anymore is it?
21:29Frozenlockclifton: nope
21:29cliftonah, too bad
21:29brehautnoir is deprecated, long live libnoir ?
21:30brehauthttp://blog.raynes.me/blog/2012/12/13/moving-away-from-noir/
21:31cliftonand ring-reloader is the type of thing that you add to dev-dependencies only, right?
21:31brehautthe things that noir provided that libnoir does not tend to be abstractions that get in the road of just writing web apps the ring way
21:31brehautwhich is to say, leveraging the crap out of middlewares
21:32brehautits all fulcrums and levers, gfredericks
21:36cliftonis there a good pattern to use for logging within a ring app
21:37gfredericksmiddleware?
21:38abpWould it make any sense to define named contexts in compojure like (context #paging "page/:page" [:page] (GET "/ugliness/#paging" ...)) for example?
21:39abpbeing able to
21:43brehautabp: O_o what does that even mean?
21:44brehautabp: are you meaning something different to the existing compojure context macro?
21:44abpbrehaut: context at the end of the route instead of the beginning?
21:44gfredericks#paging looks like a data reader literal
21:44abpoh sure, not good
21:44abpmore like :paging then.
21:44abpI'm tired and being stupid.
21:45brehautabp: you could do that with a parametrically defined route (ie, a route returned from a function) using vector route definitions rather than strings
21:45abp# was just the first thing coming to my mind for context
21:45FrozenlockI give up, `ns' really is immortal.
21:46brehautabp: compojure's existing context function is used for embeding a handler into another compojure route with a path prefix
21:46abpbrehaut: Oh, ok. Should start a route experimenting project probably. I just need to define a lot of routes supportinh paging, so my mind is coming up with random ideas to abstract that.
21:47abpbrehaut: sure and i wanted to make em *fix
21:48brehautabp: you could always make a middleware that slashes the paging off the end of the url and chucks it into the request map
21:49abpbrehaut: That sound much more reasonable anyway. Thanks. ;)
21:50abpThe other stupid thing I was thinking about is more syntax sugar for defelem'd fns in Hiccup. Like (link-to :id.class ...)
21:51abpI need to hire someone to shut down my stupid ideas that keep me from sleeping at night.
21:52Frozenlockabp: You mean instead of (link-to {:class "id class"} ...) ?
21:52FrozenlockOh wait
21:52abpFrozenlock: Yeah, those are getting really offensive at times..
21:52Frozenlock(link-to {:id "some-id" :class "some-class"} ...) :-)
21:53abpFrozenlock: sure
21:53abp(link-to#id.class ..) would be even more hiccupish.. :x
22:06abpFrozenlock: But that does not work out, of course. Writing wrappers like hiccup-bootstrap or giddyup is the way to go.
22:07Frozenlockabp: Wow, I was planning on doing something on bootstrap... you just saved me so much boilerplate code...
22:08abpIt's astonishing how well thought out Ring, Compojure and Hiccup are.
22:08abpJust to name a few. :)
22:08abpFrozenlock: Be sure to look at https://github.com/jkk/formative then.
22:08abpFrozenlock: Forms on steroids and bootstrap renderers in there too.
22:08Frozenlockabp: It's great hanging out in the Clojure world and realize how much OTHERS are so much more brilliant, isn't it? :P
22:09FrozenlockAhhh forms! Of course I will watch that.
22:09abpFrozenlock: Yea, sure. At least there are always some people to invalidate my stupid ideas. But I've got so much on the plate that I don't move forward on anything anymore..
22:10abpFrozenlock: I use formative on a current project, large time saver. Pushed some declarative constraint validators by catched jdbc-exceptions on top of it too.
22:15abpjkkramer is a dsl-generator. :)
22:18jkkramerI prefer DSVs ;)
22:19danlarkinvolvos?
22:19Sgeo This is a thing, apparently, but I saw it from #lisp which is weird since they're a CL channel
22:19Sgeohttp://www.kickstarter.com/projects/376627045/lispcast-introduction-to-clojure-videos
22:19jkkramerhttp://www.youtube.com/watch?v=3yvrs9S0RIw
22:20danlarkin:p
22:20jkkramerabp: glad to hear it's been a time saver
22:24abpjkkramer: Oh, indeed re DSVs! Formative is pretty cool. I set out on field specific validation-rules overwriting datatype-validations regarding https://github.com/jkk/formative/issues/9 Hope I get something satisfying cooked up. Did you think further on that?
22:26jkkramerabp: haven't had a chance yet; open to contributions. Will probably be hacking on it more in a couple weeks for a client gig
22:27abpjkkramer: Also I would be interested in getting some sort of i18n for verily. You too? :)
22:28jkkramernot a bad idea
22:28jkkramerI honestly haven't done much i18n stuff yet in clojure
22:31abpjkkramer: Me neither. But using formative without it is at least a little hurdle. Honestly, I have no idea what would be a good solution in Clojure. Timbre uses an atom for configuration, probably not what we want. But haven't thought about it..
22:32jkkramerabp: at the very least, if all messages are customizable, someone can tailor it to their needs
22:32jkkramerthey shouldn't be hardwired
22:33abpjkkramer: Yea, but you probably did it for your needs. Glad you're developing all that stuff in the first place.
22:35jkkramerabp: got tired of cranking out rigid, monotonous html for forms
22:36jkkramerabp: verily is also used in a db abstraction lib i'll hopefully get around to releasing soon…
22:37abpjkkramer: Cool, like de-duplicating all the sql-constraint validations?
22:38abpjkkramer: I just did an formative/with-fallback wrapping with-constraint-fallback that picks up an exception class to validation message mapping from the form spec. But only for key constraints.
22:39abpjkkramer: Pesky little hacks to keep going.
22:41jkkramerabp: mostly simple data model-level validations for "entities". the db lib validates relationships and such
22:42jkkramerabp: I hear you on the hacks. I don't want to release anything till it's been battle-tested and shaped by real needs
22:43abpjkkramer: Ok. So do you actually wire up formative, honeysql etc. into a tasty clj-web-app orchestra? ;)
22:45jkkramerabp: indeed :) though I try to keep concerns separated as much as possible
22:46abpjkkramer: Sounds interesting.
22:46jkkramerabp: I have a django-admin-style crud generator thing working now that pulls all these libs in. still needs a lot of work though
22:47abpjkkramer: Now it even sounds incredibly fascinating. :P I'm hacking crud stuff together like mad atm. Rapid prototyping under the flag of trying clojure.. ugh.
22:48gozaborujust broke 1k on 4clojure :)
22:52jkkramerabp: building the right abstractions is hard but I feel like once it's done right, building web apps in clojure will be insanely fun
22:55abpjkkramer: For sure. It's even now under pressure, just using what's there already. I'm lacking focus in my spare time, reading and trying way to much stuff, preventing me from getting many concretes out the door. My todo-lists are embarrassingly long..
23:03sorenmacbethIs there a better way for testing if function argument is a byte array using :pre that (= (.getName (class arg)) "[B") ?
23:06sorenmacbethI thought I could do something with (instance?), but couldn't get it
23:24amalloysorenmacbeth: http://stackoverflow.com/questions/14796964/how-to-check-if-a-clojure-object-is-a-byte-array
23:26sorenmacbethamalloy: thanks
23:26Frozenlockamalloy: Any idea on how to exclude 'ns', or maybe redefine it in a repl? It seems to survive everything I try.
23:27amalloydon't do it, bro
23:27Frozenlockbut I wanna!
23:28technomancyFrozenlock: can't be done, unfortunately
23:28technomancyit's hard-coded in really hard
23:28abpHm, replacing for with mapcat can yield an inconvenient fn to map.
23:29amalloyabp: huh?
23:29technomancyI really wish it could; it's just anti-egalitarian the way it is
23:29technomancy(see ns+)
23:29Frozenlocktechnomancy: really really hard.. ns-unmap, exluce, redefining.. nothing works
23:29Frozenlockexclude even.
23:29technomancyFrozenlock: I think it's hard-coded in the java
23:30Frozenlockns+?
23:30clojurebotDon't bash in place
23:30technomancyFrozenlock: ns+ is an ns replacement
23:30abpamalloy: (for [[x & more] xs :let [y (last more)] ...)) => (mapcat (fn [[x & more]] (let ...))) ?
23:30technomancysimilar to what you're trying to do
23:31abpduh xs at end of mapcat
23:31Frozenlock,(apropos "ns+")
23:31clojurebot()
23:32SurlyFrogCould someone explain something from "The Joy of Clojure" for me? In section 6.3, there is a discussion of laziness that includes this definition: http://pastebin.com/XAtdq5Mn Why does running `(lz-rec-step (range 200000))` give a StackOverflowError but `(dorun (lz-rec-step (range 200000)))` does not?
23:32technomancyFrozenlock: https://code.google.com/p/clj-nstools/
23:33FrozenlockGasp, clojure code not on github
23:33technomancythis is ancient code
23:33technomancyolder than Clojure's move to github iirc
23:34technomancySurlyFrog: the repl is forcing the whole seq to be realized at once
23:34Frozenlock"; The name had to be changed to ns+ because "ns" and "in-ns" cannot be redefined in any namespace."
23:34amalloySurlyFrog: printing it is what causes the exception
23:35FrozenlockI refuse it! I'm supposed to be in control with a lisp!
23:35amalloytechnomancy: not really a very interesting point of view: the whole seq is only two elements long
23:35amalloyit's just that it's very deep
23:35technomancyoh, ok
23:35technomancyFrozenlock: edit the java then =)
23:35technomancythis isn't symbolics =\
23:35SurlyFrogtechnomancy: and amalloy: thanks I see it
23:35abpamalloy: proper https://www.refheap.com/paste/11238
23:36abpamalloy: Isn't there a forcat yet? =D
23:37amalloywhy would there be? just use for
23:46abpamalloy: Hell yeah..
23:50cliftonany advice on trying to read stacktraces?
23:51abpclifton: read
23:52abpclifton: http://blog.jayfields.com/2012/06/reading-clojure-stacktraces.html
23:52cliftonthanks :)
23:58yedihow would i get data from my project.clj project inside of my clojure program?
23:58yediand/or, do people usually use project.clj to do their own configuration, or is that just generally left alone for lein stuff?
23:59amalloyyedi: it's not really encouraged. technomancy likes lein users to build apps that don't need lein