#clojure logs

2012-08-18

01:29rbxbxQuiet tonight.
01:31xeqiweekends usually are compared to workdays (US)
01:39gtuckerkelloggAny sugestions on making this more idiomatic? http://pastebin.com/jk6jPqcv
01:43Cr8hm, I think this is working: https://www.refheap.com/paste/4457
01:44rbxbxxeqi fair enough, guess people have to have some sort of social lives.
01:44uvtcWhat would be the intent behind creating a function that looks like: `(defn foo [x & [ys]] ...)`?
01:46rbxbxyou mean the destructuring portion?
01:46uvtcYes.
01:46Cr8uvtc: that function expects either one or two params
01:48uvtcCr8: Oh, I see. You not only want it to work with 1, 2, or more args, but you *also* want to indicate via the signature that if you pass more, they'll be ignored.
01:49Cr8actually I believe passing more would be an error
01:50uvtcEr...
01:50Cr8,(letfn [(foo [x & [y]] [x y])] [(foo 1) (foo 1 2)])
01:50clojurebot[[1 nil] [1 2]]
01:50Cr8,(letfn [(foo [x & [y]] [x y])] [(foo 1) (foo 1 2) (foo 1 2 3)])
01:50clojurebot[[1 nil] [1 2] [1 2]]
01:50Cr8nope, I'm wrong
01:50uvtcRight. They just get ignored.
01:51uvtcBut the destructuring indicates to the reader that extra args get dropped.
01:51uvtcThanks, Cr8. :)
01:52Cr8well the & just indicates to bind the next thing to the list of "the rest of the stuff", so it's just destructuring -that- list
01:52Cr8you could do
01:53Cr8,(letfn [(foo [x & [{:keys [a]}]] [x y])] [(foo 1) (foo 1 {:a 2})])
01:53clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: y in this context, compiling:(NO_SOURCE_PATH:0)>
01:53Cr8,(letfn [(foo [x & [{:keys [a]}]] [x a])] [(foo 1) (foo 1 {:a 2})])
01:53clojurebot[[1 nil] [1 2]]
01:53Cr8right, that
01:55Cr8and that all works in any destructuring of a sequence, not just arg lists
01:56Cr8,(let [l '(1 2 3)] (let [[a & [b]] l] [a b]))
01:56clojurebot[1 2]
01:57uvtcCr8: I see what your letfn example does. It says, "whatever extra args get passed, pack them up into a seq, then take that first item of the seq and treat it like it's a hash-map, taking out the val for :a and assigning it to a."
01:58amalloy(defn foo [x & [y]] ...) is just a grossly lazy way to write (defn foo ([x] ...) ([x y] ...))
01:59uvtcCr8: right, your most recent example just does the same as above. Got it.
01:59uvtcCr8: thanks.
02:00uvtcamalloy: I'm not sure what you mean. Do you mean that --- inside of `(defn foo [x & [y]] ...)` you then can expect logic that checks how many args were passed?
02:00uvtcs/you then/--- you then/
02:00Cr8you can provite different arities in a defn.
02:01uvtcCr8: Right. I know that. :)
02:02uvtcCr8: So, given amalloy's example, I'm not sure where the laziness is (real laziness, not lazy-seq laziness :) ).
02:03uvtcThe function I was looking at is:
02:03uvtchttps://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/middleware/params.clj#L33
02:03amalloyuvtc: basically. sometimes nil is the reasonable default for y, and you can elide the check, but often you see functions that wind up doing the check
02:06uvtcOk. `y` is set to nil if you don't pass in a value for it.
02:06uvtcThanks, amalloy.
02:11amalloyuvtc: i haven't looked closely, but i'd be surprised if [x & [y]] were used anywhere in the clojure source at all. it's *much* slower than a two-arg function
02:12amalloyer, two-arity
02:14uvtcamalloy: Oh, interesting. Thanks.
02:15aperiodici hear that destructuring has overhead, but are there any good links on exactly how much i should expect?
02:17amalloyaperiodic: in real life? none. i'm just exaggerating because clojure.core is tuned aggressively for performance
02:17aperiodicsweet
02:33rbarraudKiwiPing?
02:33rbarraudKiwiAucklandWaikatoPing?
02:34rbarraudEatingp
06:41firesofmayHi, How do I save the output of my clojure.test to a variable?
06:46jjcomer@firesofmay Try using the with-out-str macro. This should bind *out* to a string
06:47firesofmayjjcomer, is this correct? :
06:48firesofmay(def msg (with-out-str
06:48firesofmay (run-tests)))
06:48firesofmayjjcomer, as I am getting "" inside msg variable.
06:50borkdude,(count (with-out-str (print "foo")))
06:50clojurebot3
06:50jjcomer@firesofmay That is how you should call it.
06:53firesofmayjjcomer, borkdude that works fine for print statements. but for run-tests it does not work.
06:53firesofmaymaybe because the result is a clojure.lang.PersistentArrayMap?
06:58nbeloglazov&(doc with-err-str)
06:58lazybotjava.lang.RuntimeException: Unable to resolve var: with-err-str in this context
07:03borkdudehmm spacebar doesn't work in light table
07:04borkdudecould be because I'm in demo mode now
07:05borkdudehmm, it wants me to type (+ 4 5) in the scratch editor, but I can't
07:05jjcomer@firesofmay This worked: (let [s (java.io.StringWriter.)] (binding [*test-out* s] (with-test-out (run-tests))) (str s))
07:07firesofmayjjcomer thanks that worked :)
07:08borkdudeibdknox just for the record, I couldn't type a space in demo mode of the table
07:08borkdudeibdknox it worked when demo mode was over
07:08jjcomer@firesofmay np
08:01azkeszHi, is it possible to destructure only the last element ?
08:04foodooazkesz: good question. But if you only need the last component of a collection, why not just use (last)? Destructuring is usually used when you need to extract several different parts from a collection.
08:04gfredericksazkesz: the answer is no :)
08:05azkeszok good point, I'm merely wondering how that would be possible
08:05gfredericksreversing it first could do it
08:05gfredericksor if you know how many elements there are you could destructure the whole thing
08:06azkeszsomething like this doable? (defn y [[ ... last-2 last-1 last ]] (println "the last 3: " last-2 last-1 last))
08:06azkeszassuming I don't know the size of the passed vector
08:07azkeszbut i do want to use destructuring=)
08:07azkeszgfredericks, I mean, I don't know where I would do the reversing
08:07gfredericksdestructuring is built on the seq interface, which only supports first/rest
08:07gfredericks(defn y [arg] (let [[last] (reverse arg)] ...))
08:08gfredericksor simply (defn y [arg] (let [last-el (last arg)] ...))
08:08gfrederickswhich is more efficient
08:09azkeszwould it be more complicated for getting the last 3?
08:09azkeszI imagine having to call rest 2 times?
08:10azkeszor can the (reverse args) be used as the input vector for a destructuring? and get the first 3?
08:12azkesz,(let [rev (reverse (range 4))] (let [last last-1 last-2 & _] (println "last 3: " last-2 last-1 last))
08:12clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
08:13gfredericks(defn y [arg] (let [[last last-2 last-3] (reverse arg)] ...))
08:13azkeszthat's quite nice
08:16jmlis there a standard/recommended command-line argument parsing library?
08:16azkesz,((fn [arg] (let [[last last-1 last-2] (reverse arg)] (println "last 3: " last-2 last-1 last))) (range 10) )
08:16clojurebotlast 3: 7 8 9
08:17azkeszgfredericks, thank you
08:17Bronsajml: https://github.com/clojure/tools.cli
08:17jmlBronsa: thanks.
08:17Bronsanp
08:18azkeszhow can I find out what methods ISeq supports?
08:21azkeszfound here: http://clojure.org/sequences
08:39jmlI wish I could hug clojure.
08:47Iceland_jackjml: (you can)
09:03hyPiRionWouldn't it be more efficient to just do this?
09:03hyPiRion(let [[last-2 last-1 last] (take-last 3 (range 100))] [last-2 last-1 last])
09:03hyPiRion,(let [[last-2 last-1 last] (take-last 3 (range 100))] [last-2 last-1 last])
09:03clojurebot[97 98 99]
09:04hyPiRionAnd if you know it's a vector, then this is constant time:
09:05hyPiRion,(let [v (vec (range 100)) n (count v) {last-2 (- n 3) last-1 (- n 2) last (- n 1)} v] [last-2 last-1 last])
09:05clojurebot[97 98 99]
09:15jmlDo I have to add something to my :dependencies in project.clj to use things from clojure.contrib?
09:21jmlhow do I check if x is a substring of y?
09:25jml(.contains x y) seems to wor
09:25jmlwork, rather.
09:25Bronsathat's the way to go
09:55jmlhmm. paredit-mode isn't automatically closing braces the way it does parens and brackets
09:57llasramjml: In clojure-mode file buffers, or in the SLIME REPL buffer, or somewhere else entirely?
09:57jmlllasram: clojure-mode buffers.
09:58llasramjml: Hmm, that is odd.
09:59jmlmaybe I have the wrong version of paredit, or there's a customize setting I'm missing
10:00llasramJust clarify, which is the character you mean by "brace"?
10:01jml{
10:02llasramYeah, some other people have had problems with that in the past. Is it in fact bound to paredit-open-curly ?
10:02jmlno, apparently not.
10:02jmljust to self-insert
10:04llasramOk. And try `describe-syntax` in a Clojure buffer, and check on the syntax of { and }. The should be open and close respectively
10:05jml{ (} which means: open, matches }
10:05jml} ){ which means: close, matches {
10:05jmllooks sane to me.
10:06devnhttp://bit.ly/NaYJNx
10:07devnjml: i can help you out with that.
10:08jmldevn: cool. how?
10:09devnjml: try: (define-key slime-repl-mode-map (kbd "{") 'paredit-open-curly)
10:09devnas well as (define-key slime-repl-mode-map (kbd "}") 'paredit-close-curly)
10:09devni think that ought to do it
10:10llasramExcept that jml's problem is with clojure-mode, not with the slime repl :-)
10:10devnd'oh
10:10jmlright. I can manually bind the keys.
10:10jmlI guess I'm vaguely interested in knowing why they aren't working out-of-the-box.
10:10llasramjml: Ah!
10:11llasramSo those keys aren't bound by paredit itself
10:11llasramclojure-mode has a hook to add them when paredit-mode is already loaded
10:12llasramAssuming you don't just have an ancient/busted version of clojure-mode
10:12llasramJust re-`clojue-mode`ing your buffer should fix it
10:13jmlllasram: didn't seem to work. it's possible I do have an old version. clojure things seem to move more rapidly than its Ubuntu packaging
10:13jmls/its/their/
10:14llasramOh yeah!
10:14jml (when (>= paredit-version 21)
10:14jmlmy paredit is 20
10:14llasramAhh, well there you go
10:15llasrammarmalade to the rescue then :-)
10:15llasramOr... what's the newer cool one that builds new emacs packages straight from github repos?
10:16jmlllasram: not sure.
10:16jmlllasram: thanks for the help though
10:16llasramnp!
10:17llasramAh, MELPA: http://melpa.milkbox.net/
10:28davidd`hey, what's the relationship between ClojureScript and ClojureScript One?
10:29davidd`it looks like ClojureScript One is an example/tutorial app?
10:29djpowellclojurescriptone is basically somewhere between an example of how to get started with clojurescript, and a set of reusable frameworks
10:30davidd`oh cool thx djpowell
10:31djpowellit has some good ideas. if you'd prefer to start with a clean slate though, it is worth checking out lein-cljsbuild
10:40jmlis there a sensible flymake configuration for clojure?
10:40llasramjml: Like for auto-running tests?
10:41jmlllasram: I'm thinking more of something like pyflakes that does a quick static check for double definitions, using names that aren't defined, etc.
10:43llasramHmm. I'm not sure -- I don't think it fits with the typical workflow. I think most people have a running REPL session that they're constantly sending code to as they write it.
10:45llasramI haven't used it yet, but there is lazytest, which kicks of a process which monitors your sources and re-runs your tests whenever they change
10:45llasramBut I'm not sure of the best way to glue a persistent process into something like flymake...
10:46jmlhmm, thanks
10:46jmlit's mostly just to catch things like misspellings, or requiring modules that aren't being used.
10:52casionjml: I've yet to encounter those things when working in clojure
10:52casionlisps seem to make those concerns a non-issue due to the workflow
10:52jmlI just misspelled 'frequencies' as 'frequency'
10:53llasramSure, but didn't you then send that change to the REPL as soon as you'd typed it?
10:53casionif you're using the repl often, you'd catch that right away
10:53jmlllasram: I ran the tests which caught it
10:54llasramAre you using an Emacs-connected REPL? If not I highly suggest it
10:56jmlllasram: I am. I'm sure I'm not using it to anywhere near its full potential.
10:57jmlmostly just swapping into it and typing / copy/pasting stuff like I would to a Python repl on the command line
10:58llasramIf you're using SLIME or nrepl.el, try hitting C-c C-k every time you finish typing a reasonably complete thought
10:58jmlllasram: heh, ok. thanks.
10:58jmlbtw, would appreciate a quick glance over https://github.com/jml/anagrm/blob/master/src/anagrm/core.clj and https://github.com/jml/anagrm/blob/master/test/anagrm/core_test.clj to verify I'm not doing anything catastrophically silly.
10:59llasramThat's been the biggest workflow change for me :-) But it makes a surprisingly large difference, having the current state of your program always available to poke at as change it
11:00llasramjml: Trivial, but `anagram?` has the parameters and docstring in the wrong order. It took me a while + religiously putting params on a new line after the function name to get that right...
11:01jmlllasram: oh, good one, thanks.
11:02jmlalso, I think I can make the (use ...) call a directive in ns
11:02llasramYep, was just about to type that :-)
11:02jmldata trumps code
11:03ebaxtanyone know how to write this css selector in enlive? head > script:last-of-type? Only thing I get working is [[:head] [last-of-type :script]] but it seems a bit verbose...
11:03jmlmuch like making an omelette trumps sitting here & going hungry.
11:03jmlbbiab.
11:03llasramAlso, would suggest switching to Clojure 1.4, wherein :use is unofficially deprecated, and you can just do :require with a :refer option. Reduces the number of slightly-different things going on
11:25Frozenlockcljs: trying to load jayq from the repl (load-namespace 'jayq.core). Then I try to get the body: ($ :body), but I get this error: "Error evaluating:" ($ :body) :as "test.crypt.$.call(null,\"\\uFDD0'body\");\n"
11:25Frozenlock#<TypeError: Cannot call method 'call' of undefined>
11:25FrozenlockDid I failed in loading the library?
11:33jmlllasram: good idea. I don't really see any benefit in sticking with the Ubuntu-packaged stuff.
11:33acagle_I'm using ERC Version 5.3 with GNU Emacs 24.1.1 (x86_64-apple-darwin11.4.0, multi-tty) of 2012-08-07.
11:38jmlcan I download the API & reference docs for offline use?
11:42llasramjml: Beyond the docstrings you can get to with `slime-describe-symbol`?
11:42jmlllasram: well, I want something I can browse & search.
11:43llasramWell, you could build the docos yourself from the source, using the same process used to build the on-line version. I just try to always be online, so haven't done it myself :-)
11:43jmlhmm, ok.
11:44jmlI might hold off on that one for a bit
11:49jmloh, slime has an apropos search. neat.
12:00jmlI gather a lot of time is spent firing up the JVM when running a command-line app
12:01llasramUnfortunately. It does make it somewhat more annoying to write command-line applications in Clojure
12:03jmlyeah
12:03jmlPython's no rock star when it comes to startup time either
12:04jmlhmm. I guess I should try to do something webby now.
12:06jmlnoir certainly has a pretty looking web page
12:07Frozenlockjml: I agree, ibdknox sure has some kind of 'design' fiber in him.
12:09ludstonIt's a pity light table is so slow now.
12:09ludstonHopefully it will get quicker soon
12:09ibdknoxludston: slow now?
12:09ludstonOh hi! Huge fan!
12:09Frozenlocklol
12:10ludstonNoticable delay when typing
12:10ibdknoxreally?
12:10ludstonYeah
12:10ibdknoxtyping where?
12:10ibdknoxwhat kind of machine?
12:10ludstonChromium in linux, 8gb ram i7, KDE
12:10ludstonRunning on openjdk
12:10ibdknoxand typing anywhere is slow?
12:10ludstonYeah
12:11ludstonLike
12:11ludston0.1 seconds delay
12:11ibdknoxwoah
12:11ibdknoxhm
12:11ludstonJust enough to be jarring
12:11ibdknoxit's not delayed on osx, windows, or ubuntu :(
12:12ibdknoxthough I haven't tried chromium directly
12:12ludstonIt could be more chromium than anything else
12:12ludstonDunno how much more optimized chrome is
12:12ibdknoxI'll take a look
12:12ludstonAwesome!
12:13ibdknoxtyping certainly should not be slow
12:34ludstonibdknox: It gets slower when you have multiple tabs with javascript running on them
12:34ludstonSpecifically stuff like google's instasearch
12:35ludstonBut then killing those tabs speeds it up
12:39FrozenlockWeird... in cljs, (ns dom.test (:require [jayq.core])) doesn't seem to load the library the same way `use' would. I can't call the library's function directly.
12:40Frozenlock(ns dom.test (:require [jayq.core :as j])) works as expected: (j/$ :body) is valid.
12:41FrozenlockBut really, I would like to load a library and then have all the functions available. Is this possible?
12:41jmlI've got something that's working with 'lein test' but failing to compile with slime. It's after switching from requiring string and using it as clojure.string/lower-case to ':require clojure.string :refer (lower-case)' and updating the call sites to say just 'lower-case'
12:41jml error: java.lang.RuntimeException: Unable to resolve symbol: lower-case in this context, compiling:(/home/jml/src/clojure/anagrm/src/anagrm/core.clj:17)
12:47llasramjml: (ns ... (:require [clojure.string :refer [lower-case]])) ?
12:48llasram(Using lists instead of vectors should be fin e -- mostly just making sure everything was appropriately wrapped)
12:49llasramYou can always: (remove-ns 'namespace.symbol)
12:49llasramthen re-SLIME-compile
12:49llasramThat will force the namespace to be created afresh, if anything has gotten too confused
12:50llasram(but will leave dangling referencess to the old namespace if any others have `require`d it)
12:50jmlllasram: same behaviour with vector rather than list.
12:50jmlllasram: mucking around w/ remove-ns now.
12:51jmlllasram: https://github.com/jml/anagrm/blob/master/src/anagrm/core.clj has the code, fwiw
12:51llasramOh, and if it wasn't clear, `namespace.symbol` is the namespace you're defining, not importing from. I actually usually just do: (remove-ns (ns-name *ns*))
12:54jmlllasram: aahh, that helps (although I've seized this opportunity to restart emacs to get the new paredit I installed.)
12:59ibdknoxFrozenlock: you have to do (:use [blah :only [cool]] CLJS doesn't allow anything else
13:01llasramI should restart emacs one of these days...
13:01casionllasram: lol, I know what you mean
13:01llasramYep, May 29th :-)
13:01casionfeb 11 here
13:01llasramNice
13:01casionuptime since december
13:01casionwow
13:02casionI've restarted my slime emacs instance
13:02casionbut my C environment is pretty old lol
13:06Frozenlockibdknox: shame I have to enumerate them... but thanks for the answer!
13:07ziltiI'm trying to use clojure-jack-in with emacs-24 on Windows 7. But I always get an error message that the command \"\"java\"\" is mistyped or could not be found. I'm using the most recent version of leiningen.
13:07mdeboardDoes anyone have any resources for giving a "Why Clojure?" talk? I'm giving one at my local Scala & Lambda Lounge meetups and I'd like to not reinvent all the wheels
13:08casionibdknox: is there a roadmap for light table?
13:08Frozenlockzilti: in the command prompt, if you type "java -version", do you have something?
13:08mdeboardThat is, a talk to people who are already sold on the benefits of FP
13:08ibdknoxcasion: there are about 10 right now :)
13:09ziltiFrozenlock: Yes, I'm using Version 1.7.0_05
13:09casionibdknox: well… that's not very helpful lol
13:09ibdknoxcasion: there are some key things happening in the next couple weeks that will determine which one we execute on
13:09zilti64bit, might that be the problem?
13:09casionibdknox: alright, well good luck. Very cool work you're doing
13:11mdeboardcasion: I'm tinkering with LT atm, are you connecting to another project?
13:11casionmdeboard: not atm
13:11FrozenlockI don't think so... I was using it too. You can check http://frozenlock.org/2012/03/06/clojure-on-windows-7/, it's the notes I've taken when I installed it on my win7 machine. Note that it was for lein1, so I really don't know if it's accurate anymore.
13:11mdeboardTrying to sort out how that works exactly
13:11casionmdeboard: I couldnt figure it out, I've been trying the liverepl all day
13:12ziltiFrozenlock: thanks, I'll have a look
13:12mdeboardcasion: Are you getting a java runtime error by chance
13:12casionmdeboard: with connecting?
13:12mdeboardWlel, I connect fine
13:13mdeboardoh
13:13mdeboardoh god
13:13mdeboardibdknox: I''''''
13:13mdeboardibdknox: This is awesome.
13:13casionoh no, he's having a stroke
13:13mdeboardcasion: I think I got it sorted :P
13:13casionwhat was it?
13:13ziltiWell, it's not anything new for me there.
13:14mdeboardcasion: I restarted and went right to table, instead of going to irepl then connecting
13:14FrozenlockIs there autocompletion and docs with LT?
13:14casionmdeboard: oh!? does that make it work?
13:14ibdknoxFrozenlock: still coming
13:14mdeboardIt did here
13:14casionI've always gone straight to the repl
13:14casionmaybe that's my problem too
13:14mdeboardit's pretty awesome, wow
13:14Frozenlockibdknox: Well it's nice that it's planned :)
13:14ibdknoxthere appears to be some very weird bug that prevents the nsbrowser from loading the nss only some of the time on first connect
13:15ibdknoxa couple people have run into that
13:15ibdknoxrefreshing should resolve it
13:16firesofmayHi, What library is recommended for http connection and receiving response in clojure?
13:16ziltiHm I really suspect it could be because Java is 64-bit and emacs is 32-bit.
13:17Frozenlockfiresofmay: I use clj-http
13:17firesofmayFrozenlock, thanks checking.
13:17xeqifiresofmay: https://clojars.org/clj-http
13:18firesofmaythanks xeqi!
13:18casionmdeboard: ooh it does work then
13:18mdeboardibdknox: I've been doing some work with packaged chrome apps at work, I assume that's the eventual plan here?
13:19mdeboards/I assume that's/Is that
13:19ibdknoxmdeboard: standalone app with embedded webkit is the long term goal
13:19mdeboardahhh
13:19mdeboardI like a lot.
13:19casionok, this is way cooler than I thought
13:19mdeboardcasion: lol, my exact reaction
13:20mdeboardNow, where's my T-shirt
13:20mdeboard:P
13:20casionI can't remember the last time, if ever, that I opened an IDE and thought 'oooooOOOooOOoo this could be more useful than doing this in emacs'
13:20mdeboardYeah eventually for sure
13:20bosiewhats a good resource for learning about stm?
13:21zilticasion: lighttable looks extremely promising
13:21mdeboardbosie: The wikipedia article is good
13:21Spaceghostc2ccasion: True story yes.
13:21FrozenlockC'mon, nothing's better than Emacs
13:21mdeboardThe road to replacing emacs is a long one for me though.
13:21casionIt just needs something identical to paredit, and I'll be very happy
13:22bosiemdeboard: what are you replacing it with?
13:22casionwhoa whoa, no one said replacing emacs
13:22mdeboardbosie: Nothing yet.
13:22casionlet's not go insane here
13:22Frozenlocklet's use notepad :p
13:22mdeboardFrozenlock: Consider it done
13:23mdeboardNow if someone would just invent a browser-based version of Notepad with live code evaluation, we'd be set.
13:23casionos x supports most emacs nav commands, so this is pretty useful already
13:23casionbesides the obvious omissions
13:23foodoomdeboard: live code evaluation in general or just JS?
13:23FrozenlockI have coworkers doing code in notepad. (I'm not a programmer and I don't work in a code-related field, but still, it's sad to see)
13:23mdeboardfoodoo: I was kidding, the joke being that Light Table is browser-based with live code-evaluation
13:24mdeboardFrozenlock: Why are you in here if you're not a programmer
13:24FrozenlockBecause I'm awesome ?
13:24Frozenlock:p
13:24foodoomdeboard: Depends on the definition of a programmer. I am not a professional programmer. It's mostly a hobby
13:24FrozenlockI like to program. Perhaps one day I'll know enough to be one
13:24mdeboardI don't subscribe to the notion that "programmer" is a protected title. Farmers farm, programmers program, QED
13:24casionI'm in #c++ and I don't know a single god damned thing about C++
13:25casionso I empathize
13:25mdeboardcasion: No one does
13:25casiontouché
13:25foodoocasion: You know that it's a programming language.
13:25mdeboardIf you program, you're a programmer. It's a tautology
13:25mdeboardbut some people still need to be convinced
13:25FrozenlockOk I mispoke, I'm not a professional programmer.
13:25foodoomdeboard: convinced of what?
13:26mdeboardfoodoo, Frozenlock: Some programmers get very protective/defensive of new or hobbyist programmers calling themselves programmers
13:26bosiemdeboard: know of anything more clojure relrated?
13:26bosiemdeboard: still talking about stm ;)
13:26casionmdeboard: that's the dumbest thing I've ever heard
13:26mdeboardbosie: So, you're not looking for technical details but Clojure-specific implementation?
13:26casionI've not encountered that, but if it is common then I need to get my ski-mask and ice pick ready
13:27bosiemdeboard: well, the wiki covers the technical details rather nicely i must say
13:27foodoobosie: what don't you understand? The general concept? Or something specifc?
13:27bosiefoodoo: how its built on top of java/jvm
13:27foodoobosie: with locking
13:28mdeboardbosie: You should read about Clojure's data structures for managing state. Agents, refs, etc
13:28bosiemdeboard: k, haven't read up on those. will do, thanks.
13:28mdeboardbosie: If you're evaluating Clojure for use, you should pick up a copy of Clojure Programming
13:28bosiemdeboard: i am not evaluating
13:28bosiemdeboard: i am going to use it
13:29casionI personally like Programming Clojure better, but either is great
13:29mdeboardcasion: Those two & Joy of Clojure are all good but Clojure Programming was the first that I was able to read (almost) cover-to-cover
13:30bosiemdeboard: i bought both actually, started reading CP and i find it quite approachable. more so than PC
13:30bosiegranted, i am only 70 pages in
13:30casionmdeboard: it was the exact opposite for me. Clojure Programming assumes you've used another dynamic language
13:30casionand I haven't
13:30mdeboardcasion: Yeah, very true
13:30casionso it was very confusing for me
13:30mdeboardhuh
13:30foodooI recommend that you check out various videos on http://blip.tv/clojure because Clojure follows a specific philosophy
13:30mdeboardInteresting
13:31bosiecainus: hm. i haven't noticed
13:31Frozenlockcljs - Is there a way to print in the repl the content of #<[object Object]>?
13:31foodooAnd understanding this philosophy really helps
13:31casionProgamming Clojure expained things in a more general sense without constantly saying 'Here, just look at this python code'
13:31mdeboardand of course watch Simple Made Easy http://www.infoq.com/presentations/Simple-Made-Easy/
13:31holohi
13:31mdeboardfor great encapsulation of Clojure philosophy :)
13:31foodooSimple Made Easy is definitely a must-watch
13:31mdeboardcasion: Didn't think of that, but you're right. I definitely live in a dynamic language echo chamber :P
13:31casionmdeboard: I've spent most of my programming life doing embedded C and asm
13:32mdeboardI'll keep that in mind when doing my talk at IndyScala
13:32bosiemdeboard, foodoo bookmaraked, thanks
13:32casionclojure has been a total mindfuck for me lol
13:32bosiefoodoo: specific philosphy?
13:32casionnever used a functional or dynamic language
13:32casionor lisp
13:32casionand most everything assumes experiecne in one of those 3 things
13:32mdeboardcasion: How long have you been pergermming?
13:32bosiecasion: damn, from asm to clojure....
13:32bosie;)
13:33Frozenlockcasion: ever used a repl while coding?
13:33foodoobosie: keeping things as simple as it makes sense (incidental vs. accidental complexity), function programming, abstractions, ....
13:33casionmdeboard: hmm, 14 years doing 'professional' stuff
13:33casionlonger as a hobbyist
13:33foodoofunction -> functional
13:33mdeboardcasion: wow
13:33atsidiwhat irks me is the way everything written just assumes you were a java developer first.
13:33clojurebotIk begrijp
13:33bosieFrozenlock: i would be surprised if asm has a repl
13:33casionmdeboard: I get in trouble here just asking the wrong questions as it is
13:33foodoobosie: In MS DOS you could get into the debugger and type in assembly language statements to execute
13:33casionhalf the shit I think I'm trying to figure out isn't even applicable on FP or clojure
13:34holoi want to reduce partially a collection by joining some items of it to each other. with wich function can i accomplish this?
13:34bosiecasion: like?
13:34casionand I constantly want to know implementation details
13:34Frozenlockatsidi: +++ The hard part of clojure is the *&^&%& java understuff
13:34foodooholo: what does your input look like?
13:34casionbosie: mostly conceptual things relative to FP, like passing values around
13:34bosiefoodoo: hah, didn't know
13:34bosiecasion: good luck reading up on jvm's GC ;)
13:34casioncasion: I want to solve everything with assignment
13:35mdeboardcasion: Yeah, I describe switching from imperative programming to a functional context as it's like walking around with your hand balled into a fist (imperative) then having to learn how to relax it (fp)
13:35mdeboardcasion: and recursion, apparently
13:35Frozenlockatsidi: and now in cljs it's the damn javascript :P Every example I saw assumed you had a working knowledge of javascript and/or DOM
13:35casionmdeboard: recursion I'm ok with
13:36mdeboardcasion: Was a joke about addressing your comment to yourself
13:36mdeboard13:33 <casion> casion: I want to solve everything with assignment
13:36casionlol
13:36foodooFrozenlock: Pretty much the same thing with Clojure on the JVM, isn't its
13:36casionahahahaha
13:36holofoodoo, ["hello", "mars", "world"] i want to join "hello" with "world" . without assoc please
13:37mdeboard(clojure.string/join " ")
13:37foodooholo: And you generally want to join all odd entries together? Or what's the criterion?
13:37Frozenlockfoodoo: Yes, which is a shame IMO. It's like learning 2 languages at the same time.
13:37holofoodoo, the output would be a new collection like ["helloworld", "mars"] or ["mars", "helloworld"]
13:37foodooholo: Is your input collection alsways 3 elements long?
13:37mdeboardfoodoo: I disagree, you don't have to know anything about the JVM beyond the notion of jars to write Clojure
13:38holofoodoo, yes, the length is known (but actually i'm waiting for the negative index patch submission to the nightly builds to make it more dynamic)
13:38foodoomdeboard: When faced with stack traces, it helps to understand what is relevant to find the error. And some things just need Java interop like raising values to a power with Math/pow
13:38Frozenlockmdeboard: how to parse "12.0" ?
13:38atsidiFrozenlock: There's lots of that kind of thing. I'm always running across mentions of "now, generate a war file and deploy it as per usual." As if I deploy war files every day.
13:39holofoodoo, add the first element of the vector with the last. but i can use and odd criterion if i use a replace function first
13:39nz-what is the nice/idiomatic way to handle exceptions?
13:39atsidiThe Clojure language is pretty easy, I've written a lot of Lisp over the years, but the Java stuff under it is a much bigger learning curve.
13:39mdeboardFrozenlock: Woops, touche :)
13:40holofoodoo, the problem is, how do i really avoid assoc in this?
13:40foodooholo: So you want to have something like this: [first stuff-in-between last] --> [firstlast stuff-in-between] for any length of a collection?
13:41nz-http://en.wikipedia.org/wiki/WAR_file_format_(Sun)
13:41mdeboardfoodoo: Also true re: stack traces
13:41foodooholo: I don't see why you need to use assoc with vectors
13:41mdeboardHowever, there's no denying you have to know way more about the DOM for CLJS than the JVM for Clj
13:41Frozenlockmdeboard: Damnit
13:41foodoomdeboard: agreed
13:42FrozenlockI will need to learn the DOM stuff now :s
13:42holofoodoo, that would be the best option, because it's more dynamic, but actually for now the length is known, so any of them is good for now
13:43mdeboardibdknox: Is the warning message when you click the '-' button on the ns browser appropriately frightening?
13:44mdeboardibdknox: If I click that button does it just remove the namespace from memory or delete the actual file or what?
13:44ibdknoxmdeboard: I should put a picture of a monster
13:44ibdknoxmdeboard: both
13:44mdeboardwhat.
13:45ibdknoxyou have to confirm it
13:45foodoo(defn join-ends [coll] (let [fst (first coll) mid (butlast (next coll)) end (last coll) ] (cons (+ fst end) mid)))
13:45mdeboardThe warning should DEFINITELY say that it's going to delete the file.
13:45foodooholo: just replace the + with string concatenation or whatever you like
13:45ibdknoxhm
13:45ibdknoxok
13:45holofoodoo, checking
13:46foodooholo: currently it takes an input that consists only of numbers. So if you want to use it with strings, you have to replace the +
13:47holofoodoo, thanks
13:47ibdknoxmdeboard: what did you expect it to do?
13:47mdeboardibdknox: At least for now, when LT is running in a browser tab, I'm not expecting it to be performing file system manipulation behind the scenes. Maybe when it's a native app and there's a more obvious connection between the actual files that already exist and what I'm looking at.
13:48mdeboardibdknox: Just remove the ns from memory
13:48ibdknoxI mean it's an editor
13:48ibdknoxif you save it saves
13:48ibdknoxif you add an ns it adds a file
13:49mdeboardibdknox: Well,like I say, at least during this alpha stage when everyone, including clojure lightweights like me, are giving it a go, just make it more obvious that it deletes the file. I would be pissed if it deleted a file that wasn't under version control.
13:50mdeboard(especially the one I tried to remove :P)
13:50ibdknoxrighto
13:50ibdknoxI figured the this cannot be undone and the REMOVE made it scary enough. I will make it scarier. :D
13:51mdeboardibdknox: Scarier and more descriptive of the behavior I'd say
13:52ziltiAre 32-bit-programs on windows 7 able to "see" and call 64bit-programs?
13:54mdeboardibdknox: I guess I was unthinkingly using LT, and thought of it as simply a view on my code, disconnected (after loading it into memory) from the files themselves. Like once it's loaded, it's a new entity, and all changes that I make are to this new entity, not the old stuff. Now that I've given it a few minutes of thought that's pretty silly, but that's why I was surprised to find out it deletes the file.
13:55ibdknoxmdeboard: yeah I get where you're coming from
14:02ivanzilti: yes, though sometimes you have to turn off redirection or use C:\windows\sysnative
14:03robinkAfter adding [noir "1.2.2"] in a project.clj that also specifies [org.clojure/clojure "1.4.0"] in :dependencies, after running lein deps, I get an environment with Clojure 1.3.0 when running 'lein repl'.
14:03robinkAm I doing something wrong?
14:05nz-robink: try lein deps :tree?
14:05robinknz-: OK
14:05firesofmayI am unable to install clj-http. Here's the gist of lein deps output : https://gist.github.com/3388644. :-/
14:05nz-and see where the clojure 1.3.0 is coming from
14:05robinknz-: noir is pulling in clojure 1.3.0
14:06robinknz-: I was hoping my requirement of clojure 1.4.0 in project.clj :dependencies would clobber noir's requests for an earlier Clojure version.
14:07nz-robink: https://github.com/technomancy/leiningen/issues/736
14:08nz-that is similar issue
14:09nz-so noir has this [org.clojure/clojure "[1.2.1],[1.3.0]"]
14:10nz-meaning that it must have one of those versions, and it overrides your [org.clojure/clojure "1.4.0"]
14:10nz-what happens if you set it to [org.clojure/clojure "[1.4.0]"] in your pom.xml?
14:13robinknz-: Ah, OK
14:13robinknz-: Probably would be fixed.
14:13robinknz-: I'm using :exclusions [org.clojure/clojure] right now.
14:13robinknz-: Which also works.
14:14nz-and upgrading to noir 1.3.0-xxx would also work
14:14robinknz-: Ah, OK
14:15robinkAlso notice that org.cemerick/friend wants clojure 1.3.0
14:16robink(0.0.9, current version on clojars)
14:18nz-actually if you set clojure version to "[1.4.0]" lein probably says that it can't be found
14:19nz-and downloads about 20 different clojure-1.3.0 alpha and beta versions as a side effect
14:20robinknz-: Ah. Why would it say that it couldn't be found?
14:21nz-don't know
14:21nz-downloading those versions is aslo odd
14:21robinkI see
14:22nz-I think that is probably should say that main project.clj wants clojure 1.4.0 and noir want either 1.2.1 or 1.3.0 and those are not compatible -> error
14:23robinknz-: However, if any dependency requries an earlier version of clojure that's the one I get.
14:25nz-http://www.sonatype.com/books/mvnref-book/reference/pom-relationships-sect-project-dependencies.html#pom-relationships-sect-version-ranges
14:26nz-it is not about earlier or later version: Version number like "1.4.0" means that use 1.4.0 if possible, but use something else if not possible. "[1.4.0]" means that use that exact number
14:26robinknz-: Ah, and the packages pulling in Clojure 1.2,1.3 etc are doing the latter?
14:27nz-yes
14:27robinknz-: Ah, OK. So leiningen is doing exactly what it should.
14:27robinknz-: Which makes me mildly annoyed at the authors of those packages.
14:30robinkAlso interestingly, some packages don't show as pulling in an older version of clojure until you've added :exclusions [org.clojure/clojure] to other packages first.
14:31nz-robink: there is this issue, that should make lein warn about this: https://github.com/technomancy/leiningen/issues/734
14:32robinknz-: Also, aleph simply stating clojure 1.3.0 as a dependency (without a range) is enough to make leiningen use clojure 1.3.0.
14:36robinkLastly, Leiningen is stating that data.json pulls in clojure 1.3.0, but nowhere in data.json 0.1.3's pom.xml does it list Clojure as a dependency in either a range or a single version.
14:37uvtcWhat is being used to generate these API docs: http://weavejester.github.com/compojure/ ?
14:38weavejesteruvtc: Codox: https://github.com/weavejester/codox
14:38uvtcThanks, weavejester .
14:39nz-robink: data.json pom.xml refers to org.clojure/pom.contrib "0.0.25", maybe it is in there
14:40robinknz-: Why is it not listed as a dependency of org.clojure/pom.contrib "0.0.25"?
14:40nz-robink: it uses pom.contrib as a parent => it inherits everything from that pom
14:40robinknz-: Ah, OK
14:41nz-aleph uses this :multi-deps thing, I don't know what that actually does
14:41robinknz-: Ah, OK
14:49robinkFinally
15:08xeqifiresofmay: hmm, I see some of the dependencies in central's search http://search.maven.org/#artifactdetails|org.apache.httpcomponents|httpclient|4.2.1|jar
15:08xeqiso it should be working, but central has been having some problems lately
15:09xeqioh, but the "name or service unknown" in that output is weird
15:09firesofmayxeqi oh okay. I have opened a thread in clojure group so that others get to know as well.
15:09firesofmayxeqi, I have never seen such output before. :-/
15:10xeqican you hit that with a browser?
15:10firesofmayxeqi, the link you posted? yeah I can.
15:10xeqisorry, http://repo1.maven.org/maven2/
15:11firesofmayxeqi, server not found.
15:11firesofmayfor http://repo1.maven.org/maven2/
15:11xeqithere the problem, for some reason you can't access it, but others are working
15:11firesofmayxeqi, you can access it?
15:11xeqiyeah
15:11firesofmaystrange
15:12xeqiyeah, this is a bit beyond my ability to debug unfortunatly :/
15:12xeqiunless its something simple like /etc/hosts pointing it to the wrong spot
15:12firesofmayxeqi, no problem. Thanks for your help. Even I am not sure what's wrong.
15:12TEttinger2can someone explain to me how :sort works in congomongo?
15:13TEttinger2in the (fetch) function, you can pass :sort as an option
15:13TEttinger2but I have no idea how to tell it what to sort by
15:13firesofmayxeqi, i have nothing in my /etc/hosts so that can't be it.
15:14xeqisetting up a /etc/hosts entry for it to 93.184.215.223 might be a workaround
15:15xeqithats the ip I get back from a wget real quick
15:16firesofmayso if i do http://93.184.215.223/maven2 in the browser to check should it work?
15:16firesofmayxeqi, ^
15:17xeqiwell, maybe not.. its a cdn ip :/
15:17firesofmayxeqi, oh ok.
15:19xeqihmm, looks like they try and detect the servername and send the right files
15:19firesofmayxeqi, i think i'll wait for sometime. maybe its an area wise issue.
15:43amalloyTEttinger2: look up how to sort in mongodb, and then just pass the "clojure version" of the json map it wants
15:44TEttinger2amalloy, I think I got it (not sure)
15:44TEttinger2I passed it a map of :sort to -1 to sort in descending order
15:46michaelr525hello
15:47ebaxtso far I've found three mustache implementations in clojure, which one should I use? :)
15:48uvtcebaxt: Not sure all of those are actually the templating library.
15:48uvtcI think you want https://clojars.org/de.ubercode.clostache/clostache
15:49ebaxtclostache, stencile and https://github.com/shenfeng/mustache.clj
15:50ebaxtuvtc: and to add to the confusion the cgrand's ring dsl :)
15:51uvtcThe one I have listed at the [Dining Car](http://unexpected-vortices.com/clojure/dining-car.html) is Clostache. If you have something you'd recommend over that, for a specific reason, please let me know. :)
15:52ebaxtutvc: I haven't tried either of them :) Have you tried stencile?
15:53amalloyuvtc: dsantiago claims that stencil (his) is spec-compliant, while the others aren't even aware there is a spec
15:54xeqisee https://groups.google.com/forum/#!topic/clojure/2dRbv-S0UuQ for some discussion on spec issues
15:54uvtcgrazie
15:54xeqiI would end up usuing stencil myself
15:55xeqimainly just cause Raynes has prefiltered the choices
15:55uvtcRaynes-prefiltering is always nice.
15:55amalloyi let him pre-chew my food for me
15:56xeqigotta make sure its not poisoned
15:56uvtctee he he :)
16:05xeqiis there a listing of old conj talks?
16:06xeqiwas hoping to find an archived "schedule" page to remind myself what was talked about
16:06uvtcClostache also claims spec-compliance in the readme: https://github.com/fhd/clostache. I don't know what it means by "supporting lambdas" though.
16:07uvtcAdded Stencil to the Dining Car.
16:07uvtcAlso submitted pulls-request to add a :url to the project.clj for stencil (so the Clojars page links back to the github page).
16:08Cr8rather than regular mustache
16:08uvtcCr8: Which variant do you end up using?
16:08Cr8well, with Javascript anyway.
16:08uvtcAh.
16:09Cr8I'll use hogan or handlebars, mostly for the ability to use the parent context inside of a conditional thing
16:10Cr8even though the maintainer of mustache.js is a coworker
16:12Cr8for clojure i usually use something geared toward what i'm outputting.. hiccup for HTML
16:31mdeboardibdknox: I am encountering an issue trying to add this last function from the ns browser to the code document: http://ubuntuone.com/6BaDG5QfJS6HNd3bxTDyq9 The `(map...)' expr right before it is a new thing I added in LT. If I move the `(pdf<-)' expr above the map expr, it is copied to the code document consistently. Am I doing it wrong or is this an issue
16:32mdeboardI see, nevermind. It looks like one of the code blocks had focus so I couldn't get it to move over.
16:32ibdknoxmdeboard: I just released 0.1.1 which fixes a number of issues people ran into
16:35mdeboardibdknox: cool
16:35mdeboard"This will remove the file" :D
16:38mdeboardgeeking out over here
16:40mdeboardReally the only thing that would conceivably stand in my way of using this to work on Clojure projects is the in-line documentation that is present in clojure-mode/slime
16:41the-kenny+it should work in Emacs :)
16:41the-kenny(Nevermind my trolling here. I think Light Table is a great piece of work, especially for teaching people Clojure)
16:43mdeboardthe-kenny: What should work in Emacs?
16:44the-kennyEverything Light Table offers! :p Nah, I'm just trolling
16:44mdeboardoic
16:44mdeboardYeah I think it was a wise decision to "decomplect" Clojure and Emacs
16:45the-kennymdeboard: Yup, that's always good. It's also a very nice tool for starting Clojure. It's the "It just works" solution for everyone who's interested
16:46mdeboardtrue that
16:47the-kennyI'm also pretty curious about "Domain specific UIs". Think of previewing database queries from Congomongo, or korma-queries visualizing the JOINs
16:48the-kennyOr (I forgot the name) the library for neural networks
16:49mdeboardibdknox: Is it possible/feasible to load all the namespace definitions for a project when you connect in the Table context? Such that as soon as I connect I can use any given function in my project without having to add a namespace definition to my code doc, then evaluate it.
16:51mdeboardI demand more features for my free version of your alpha software
16:51ibdknoxmdeboard: hm, it's supposed to do that already - I'll have to see what I broke
16:51mdeboardMaybe I'm just doing it wrong, that's been the pattern so far
16:58mdeboardBummed it's closed source, I'd like to contribute.
17:02ibdknoxit'll make it there
17:02ibdknoxjust not yet - still too much in flux
17:04Raynesamalloy: Clostache has been spec compliant for a while now. It's still mighty slow compared to
17:04Raynesstencil.
17:04Raynesibdknox: I can't remember how the light table tutorial told me to add a function.
17:04Raynesibdknox: Teach me.
17:06ibdknoxRaynes: there was a bug that messed things up. It's fixed in 0.1.1 - just type ( at the bottom of an editor
17:06Raynesibdknox: Ah, yeah, I tried that and it didn't work, so I wasn't sure.
17:06RaynesCool.
17:07Raynesibdknox: How do I update now? Download the new jar, or...
17:07tomojRaynes: have you by chance tried clostache with PersistentProtocolBufferMap
17:07Raynestomoj: dsantiago is the one who benchmarks them.
17:07RaynesBut really, what does it matter? Stencil is there and it is fast.
17:07tomojoh, I hadn't seen stencil
17:07RaynesPeople keep making these things and I have no clue why.
17:08Raynes:p
17:08tomojI couldn't get clostache to work with pbufs without (into {} %) (which was OK)
17:11amalloytomoj: whuuuut. i guess i don't really know what clostache is for, but PPBMs should act like maps in all the ways i can think of
17:12tomojhmm.. the problem was that extension fields were missing
17:13tomojI should be sure I wasn't using my broken patch of clojure-protobuf
17:14amalloyi mostly don't know what extension fields are, but if seqing over the pbuf works, it's hard to see what clostache could do that doesn't work
17:17Raynesibdknox: You should figure out how to make a .app out of the light table stuff.
17:19Cr8oh heck yeah, 0.1.1 fixes my main complaint :)
17:20Raynesibdknox: I'm going to code in light table for a few minutes once it finishes updating. I'm damn near tingly.
17:27firesofmayHow do I set the platform to "WINDOWS" when I am trying to run Selenium Grid using clj-webdriver?
17:30mattmossclojure-jack-in needs sound effects...
17:30casionmattmoss: that's not hard to do
17:31mattmosscasion: I imagine emacs playing sounds is there, somewhere. Heck, it folds my laundry, washes the windows and fuels up the car, so what else can't it do? (M-x butterfly)
17:32casion(play-sound)
17:32clojurebotHuh?
17:32mattmossHeh.
17:32casionjust hook it into clojue-lack-in
17:32casionexcept maybe type it properly
17:32Raynesibdknox: Looks like switching namespaces doesn't work properly.
17:32mattmosslol..
17:33Raynesibdknox: When I switch, it isn't completely switching, it's adding stuff and not removing the old namespace's stuff.
17:33ibdknoxRaynes: hm? in the document? That's the point :)
17:33mdeboardRaynes: Do you mean it's not removing it from the code doc or
17:34Raynesibdknox: If I double click foo.bar and it adds the code on the left and then double click foo.baz, it's supposed to just add it underneath the stuff from foo.bar?
17:34RaynesIf that's expected then I apparently don't know how light table works at all.
17:36mdeboardRaynes: I don't think that's a weird thing for you to expect tbh, and I think it's reinforced by the fact the namespace definitions for the connected project aren't automatically loaded into memory, so you have to add an entire namespace to the code doc, then evaluate each block individually. Then if you want to move to another codeblock you need to hit C-S-d to clear the code doc, then load all that into memory.
17:37RaynesI'm not sure I understood anything you just said.
17:38mdeboardRaynes: My expectation was that when you connected to an existing project, you wouldn't have to manually evaluate each individual closure in order to use it in the scratch area.
17:38RaynesThat apparently isn't the case.
17:38mdeboardRaynes: Also, C-S-d to clear your code doc.
17:39mdeboardRaynes: I got the impression from ibdknox that was the case but it was recently broken
17:39Raynes*shrug*
17:40RaynesAll I know is that I just loaded a namespace into the 'doc' and it was available in scratch.
17:40RaynesAnyways, I guess if I can clear the document it's fine, but I still don't get why you'd want to put a bunch of namespaces underneath each other over there.
17:40RaynesThat's just confusing.
17:41mdeboardRaynes: "When you open something on the table, it's added to a document that acts as though all of those things were in a single file. This means you can build up a context and work in it just like you would if file organization mapped cleanly to functionality. It's time we started working with our code in more logical units; as problems to be solved."
17:41mdeboardhttp://www.chris-granger.com/2012/08/17/light-table-reaches-010/
17:42mdeboardso that in particular is deliberate
17:42RaynesOkay.
17:42RaynesI guess I misunderstood things.
17:46ibdknoxRaynes: it's an experiment - I'm not sure if it works or not. I toyed with the idea of having an NS opening just reset the thing to that NS
17:46RaynesThat's what I expected.
17:46RaynesI mean, you can clear the doc -- it isn't a big deal.
17:46ibdknoxbut individual editors would not
17:46ibdknoxerr
17:46ibdknoxfunctions
17:47ibdknoxI wanna see what people think, but my suspicion is it'll move that direction
17:47RaynesWe need paredit and git integration.
17:47Raynes:p
17:47ibdknoxtruth
17:48RaynesObviously you have more important things to worry about.
17:48ibdknoxI'm excited about the stuff we'll be able to do with git integration
17:48ibdknox:)
17:48casionCVS too!
17:48RaynesWhat's cool is that you've already got what you need to do selective staging, ibdknox.
17:49RaynesThe function blocks in the document will work just fine for that, I think.
17:49ibdknoxRaynes: yep :)
17:49RaynesAnd that's probably one of the hardest parts.
17:49mdeboardcasion: :|
17:49casionibdknox: is having the UI resize logically a high priority?
17:49casionmdeboard: muahahaha!
17:49ibdknoxcasion: resize logically?
17:49Raynesibdknox: I really like it. I mean, I can't write code in it for shit because it doesn't (at least) close brackets for me, but...
17:49RaynesIt's awfully fun.
17:50ibdknox:)
17:50casionibdknox: yeah, it seems to not handle window resizing very well
17:50ibdknoxyeah, people used to paredit will have to wait a bit before it'll suit them
17:50ibdknoxcasion: can you give an example?
17:50bosiewatching simple made easy by rich hickey
17:50bosieand i am wondering what he means by "data"
17:50casionsure, let me open it up real quick
17:50ibdknoxcasion: bigger or smaller? Bigger should be fine, but you can only reasonably make it so small
17:50mdeboardcasion, ibdknox: The result window for the scratch pane seems to resize
17:50mdeboardresize in a good way
17:51bosiemeaning i have a hash there instead of...what?
17:51Raynesibdknox: Will it ever be possible to use light table to like one-off edit a file?
17:52ibdknoxRaynes: yeah, it'll get there eventually
17:52Raynes</questions>
17:52jballancany vim users around? what plugin(s) are you using for Clojure?
17:52bosiejballanc: haven't found a good one
17:52foodoojballanc: vimclojure and tslime
17:52jballancthat's what I was afraid of
17:53jballancyeah, I'm using vimclojure and slimv
17:53jballancbut they step all over eachother
17:53foodoojballanc: didn't experience any conflicts with my setup
17:53foodoodo you know tmux?
17:54jballancyeah, I've played with tslime
17:54casionibdknox: only the left portion resizes for me at all in table
17:54casionin irepl it's fine
17:54jballancsomehow, tmux just seems like a not-really-there substitute for slim(e/v)+swank
17:55jballancalthough I heard rumor that I should be using nrepl instead of swank
17:55foodoocould be. I'm not really acquainted with Emacs
17:55RaynesRumor has it slime ain't got your love anymore.
17:56jballancwell, rumor also had it that light-table might get vim bindings ;-)
17:56RaynesIt already has them to some extent.
17:56Raynescodemirror has a vim mode.
17:56RaynesNot sure how well it works.
17:56RaynesBut codemirror has it and since light table uses it...
17:56jballanchmm...
17:56RaynesI imagine you'll be able to turn things like that on at some point.
17:57mdeboardjballanc: You could always write a chrome extension that monkey patches the bindings
17:57RaynesThe most important part is that you can contribute to make the editor better anytime you want.
17:57RaynesJust go contribute to codemirror.
17:57ibdknoxcasion: I'm not sure I believe you ;) Both are set to percentage widths, but the right side will expand much slower since it's a lower percentage
17:57ibdknoxRaynes: someone actually creatively figured out a way to turn it on in LT now :)
17:58@Chousercodemirror vim bindings were a bit of a joke, last I checked
17:58ibdknoxChouser: they've gotten better
17:58ibdknoxstill a ton of work to do
17:58@Chouseroh, good
17:58ibdknoxbut they are much better
17:59@Chouseryeah -- I'm working in emacs + evil now, so I see all the work they're doing to add vim bindings to a fully function editor
18:00ibdknoxalright, gotta go guys
18:00casionibdknox: It's because of a simbl plugin I have apparently
18:00casionit works fine when I remove it
18:01mdeboardibdknox: Back to the code mines
18:01bosiehttp://www.infoq.com/presentations/Simple-Made-Easy/ is there (simple) code showcasing his last 6 points?
18:02mdeboardbosie: Which points are those?
18:03bosiemdeboard: well, he names them "who, what, when, where, why and how"
18:03bosiefor abstraction for simplicity (49:39)
18:04jballanchmm...light table needs fullscreen for OS X :/
18:04Raynesibdknox: I'm using light table to add search methods to tentacles.
18:04jballancwait
18:04jballancfound it
18:04jballanc:)
18:06mdeboardbosie: Seems fairly straightforward to infer from context ( I just rewatched)
18:06bosiemdeboard: then i am dumb
18:07jballancis there a list of keyboard shortcuts for light table somewhere?
18:07mdeboardbosie: What I get from it is that when you're designing your abstractions, keep in mind how your data will be accessed, under what conditions, at what times, by whom
18:08bosiemdeboard: right but how do you avoid merging how and what
18:08bosiemdeboard: i imagine the java-equivalent would be interfaces?
18:08bosiemdeboard: which he says is not good
18:10jballancah, found it... it's the "^" in the corner
18:10mdeboardbosie: I don't have a good answer for you nor an example from the real world. It's like the definition of obscenity: I'll know it when I see it.
18:10atsidiDarn. I was hoping to get LB working, but I get "Exception in thread "main" javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated"
18:10atsidithe shell script worked, but nothing since the jar format has... Sigh...
18:11bosiemdeboard: same with the "why". rules? what? how can you have the why in one place, somehow defined with rules.
18:11bosiemdeboard: good for you ;)
18:12Raynesibdknox: Haha, I can't edit my project.clj in light table?
18:12RaynesYikes.
18:12RaynesI guess that falls under the one-off-file category.
18:13mdeboardbosie: I imagine the 'why' of abstraction design (pulling this out of my ass) would have to do with, like, shaping the data so that it reflects the reason the consumer is requesting the data.
18:13bosiemdeboard: which makes sense in the context of rules
18:14bosiemdeboard: wondering how you would isolate those rules and how specifically one actually writes rules
18:16mdeboardIn the context of that talk I believe he was talking about logic programming e.g. Prolog
18:16bosiecorrect
18:17bosiemdeboard: actually it says "libraries, prolog"
18:17jballancRaynes: I was able to edit a project.clj by clicking twice on the top-level namespace
18:17jballanc(in the namespace browser)
18:18RaynesReally? Cool.
18:18bosieso you guys have beta access to light table?
18:18jballancbosie: it's open to everyone
18:19jballanchttp://app.kodowa.com/playground
18:19Cr8ack
18:19Cr8where's undo? =P
18:19mdeboardbosie: There's lots of great course notes from Stanford, Princeton, etc., on abstraction design classes if you google "designing abstractions"
18:19mdeboardCr8: C-z
18:20mdeboardbosie: I'm reading http://www.stanford.edu/~ouster/CS349W/lectures/abstraction.html atm :P
18:20bosiemdeboard: first thing that popped up
18:21mdeboardya :P
18:21mdeboardi'm lazy
18:22Rayneslight table's scratch thingy isn't giving me any output for (URLEncoder/encode "Dominik Picheta" "UTF-8")
18:22RaynesOh, it has stopped giving me output for anything at all.
18:23RaynesReloading fixed it.
18:23Raynesibdknox: Stop breaking your software.
18:23Cr8ahhh
18:23mdeboardI demand features for this free software!
18:23Cr8my fingers were in the wrong place
18:23Cr8i'd been hitting alt-z
18:24Cr8which .. inserts omegas
18:24mdeboardCr8: You should consult a physician
18:24RaynesI am the alpha and the omega. The black and the white.
18:27jballancaside from a bit of key-binding schizophrenia, this is actually really neat!
18:27jballanckudos ibdknox and team!
18:36mdeboardWhat LT really needs is better IRC integration
18:53Raynesibdknox: Light table has managed to lose the code I've written twice in a row now. Not sure what is going on, but it completely broke.
18:57mdeboardRaynes: How do you mean lose? I just had an issue where I made a change to a code block, removed it from the code doc, brought it back then tried to save (the change I made was still there), but it wasn't actually modifying the file.
18:57mdeboardWhat I'm asking is, did you make a change to a block, remove it from the code doc then put it back?
18:58Raynesmdeboard: I mean I wrote a bunch of code (just added it) and then I switched namespaces and came back and the code was gone. I had also tried to evaluate the code, but that stopped working again too. I imagine the two things might be correlated.
18:58mdeboardd'oh
19:19mdeboardRaynes: By chance did you add lein-light to your profiles.clj
19:24mdeboardoops, nm, was reading obsolete blog post
19:32Cr8Raynes: i have had that happen a couple times. Now I'm paranoidly cat'ing the file to make sure it saves when I do stuff >>
19:35sadgurhi im relatively new to clojure (and fp in general) i have a question about the way to dealing with intermediate values and immutability
19:36sadgurbasically 50% of the time i want to append the number 4 to a list and then check if this list is different from the original list (which it wil be if the append happens)
19:37sadgurthe problem is how to refer to this modifed list and compare it to the original which may not be modified at all
19:37sadgurif that makes sense
19:38dnolensadgur: what kind of comparison?
19:38sadgurjust to see if the are equal
19:38sadgurthe logic is simple its just dealing with immutable values
19:38uvtcHi sadgur. Not quite sure what you mean. Perhaps you could post the code you've already tried to refheap.com?
19:39sadguryeah sure
19:39sadguri might have cracked it bear with :P
19:41uvtcsadgur: You cracked it with the bear's help? Excellent.
19:42uvtc:)
19:43sadguruvtc: they have paws for thought :)
19:43uvtchahaha
19:44uvtc"A bear walks into a bar and says "I'd like a beer and . . . . . . a packet of peanuts."
19:45sadgurha love that joke
19:47wei_currently working on a game.. how would you do interactive graphics programming in the repl?
19:48sadgurwei_: wait for lighttable?
19:48wei_haha. i actually have it open right now
19:51sadgurwell my problem was trying to create an inner binding but only 50% of the time so i couldnt refer to it outside that scope
19:51sadgurbut my solution worked fine i just made a function to handle that bit
19:51sadgurhttps://www.refheap.com/paste/4467
19:51sadgurtrival problem but i'm learning :)
19:52sadguri was trying to store the new list essential but that binding only existed 50% of the time
19:52sadgurof course the program does nothing exciting just a test :P
19:53uvtcsadgur: Since `list` is a built-in function name, might be better to use a different name there.
19:53sadguryeah i was wonder what the convention was
19:53sadgurxs
19:53sadgurperhaps
19:53sadgurhaskell powered
19:53sadgurbear-list
19:54sadgurwhat is the convention for things of that sort
19:54uvtcLessee... the docs tend to use "coll".
19:54hyPiRionIt's not that problematic as long as the function is evident.
19:54sadgurwell with a domain for the function i could call it "values" or something
19:54sadgurdepends on what i use it for
19:54sadgurgo go vim replace
19:54hyPiRionIt's common to use coll, I suppose.
19:55sadguralright thanks
19:55aperiodicwei_: quil!
19:55aperiodicwei_: https://github.com/quil/quil
19:55wei_aperiodic: thanks, I'll check it out
19:55aperiodicdynamically rebind your draw fn to see your changes live, without restarting anything
19:55aperiodicit's great fun
19:57hyPiRionAhh, I wonder when people "deprecate" (:use lib), and prefer (:require lib :refer :all) instead
19:58mdeboardHm what am I doing wrong? Clojure is telling me it can't find any of the `clj-itext.*' files on the classpath https://gist.github.com/3390408 but all the files, including the one I pasted that snippet from, are in src/clj-itext/
19:59mdeboardand each of the files has `(ns clj-itext.foo ... )' at the top.
19:59mdeboard$foo* :)
20:00Cr8mdeboard: "clj_itext" would be the dir
20:00Cr8,(munge "clj-itext")
20:00clojurebot"clj_itext"
20:00Cr8munge is the fn used to convert namespace names to dirs
20:00mdeboardOh dammit
20:00mdeboardI'm an idiot
20:01Cr8als
20:01Cr8*also
20:01Cr8,(namespace-munge "clj-itext")
20:01clojurebot"clj_itext"
20:02Cr8is for namespaces, I forgot
20:02mdeboardyeah but
20:02Cr8munge is for classes
20:02mdeboardfor src/foo_bar/baz.clj you can do (ns foo-bar.baz)
20:02Cr8right
20:02mdeboardLearned this lesson already once, my brain sucks
20:02uvtc,(doc munge)
20:02clojurebot"([s]); "
20:03uvtcClojurebot, are you making some kind of ascii face at me?
20:03sadgurnight everyone
20:03Cr8source of namespace-munge: (.replace (str ns) \- \_))
20:03Cr8source of munge: ((if (symbol? s) symbol str) (clojure.lang.Compiler/munge (str s))))
20:04uvtcCr8: Ah. Right, right. Thanks. :)
20:24arrdemI just went to bump my project's version number and realized that I wasn't using any really sane version IDing system and that all of my git-flags were named for the location of the major bug fixed or feature added. I see the X.Y.Z-{RELEASES/STABLE} convention on Clojars... is this defined somewhere?
20:25Raynes Cr8: What do you do if it hasn't written the file?
20:25RaynesBleh
20:25Cr8Raynes: make a modification and try again.
20:26cjfriszdnolen: sorry for the vague Twitter bug report
20:26Cr8it doesn't really seem to get -stuck- in a bad state for me
20:26Cr8but every once in a while I'll close a fn and reopen it to find my modifications didn't stick around, even though I thought i'd saved it
20:26kaoD_hi
20:27cjfriszOr rather, bug report via Twitter
20:29dnolencjfrisz: heh, did you figure it out?
20:30cjfriszdnolen: No, I still haven't. I just downgraded back to 0.2.0-alpha9 and everything works
20:30cjfriszdnolen: So the error I'm getting is CompilerException java.lang.AssertionError: Assert failed: Unknown predicate in [number?]
20:31dnolencjfrisz: alpha-11 is actually the latest.
20:31cjfriszdnolen: Ooooh, let me give that a shot. The Github page currently says alpha10 is the guy to add to project.clj
20:32dnolencjfrisz: yeah just updated readme, sorry about that.
20:32dnolencjfrisz: not sure if it will make a difference for you.
20:33dnolencjfrisz: seems strange that 10 doesn't work for you - all the changes were CLJS related far as I can tell.
20:33cjfriszdnolen: Still the same issue
20:33cjfriszdnolen: You should be able to reproduce it by running CTCO with the core.match dependency changed to alpha10 or alpha11
20:34dnolencjfrisz: ahh sorry my fault. here's the problem.
20:34dnolencjfrisz: you need to replace :when w/ :guard I think.
20:35cjfriszdnolen: I'll give that a shot
20:35cjfriszHave a second
20:35dnolencjfrisz: updating the README to mention breaking change.
20:35cjfriszdnolen: I figured that it might be a syntax change, but the docs still said :when
20:37dnolencjfrisz: updated the docs, sorry about that.
20:37cjfriszdnolen: That did it! Thanks!
20:37dnolencjfrisz: np.
20:37dnolencjfrisz: apologies for not keeping the docs / readme up to date.
20:40cjfriszdnolen: No easy task, I know
20:40cjfriszdnolen: Lucky for me, there's exactly one "match" in CTCO, so a single query-replace did the job
20:45xeqiarrdem: I'm a fan of semantic versioning http://semver.org/
20:46xeqithe -SNAPSHOT usually means work in development, that isn't ready for a release, but could be useable
20:53bmaddyDoes anyone know of any example code that has core.logic working with clojurescript? I'm having a hard time getting it to work.
20:54dnolenbmaddy: CLJS core.logic is very, very paired down compared to Clojure JVM version.
20:55dnolenbmaddy: the tests in the repo should give you an idea of how to get it working.
20:55bmaddyAhh, good call. Thanks, I'll check that out.
20:57arrdemxeqi: thanks. I ran into that page in my googling and didn't take it seriously. re-visiting.
20:57dnolenbmaddy: don't forget to require the macros in your ns form, easy source of error.
21:20bmaddyOh geez, I didn't recompile my cljs. *smacks-self-on-head*
21:20bmaddyit seems to be working just fine.
21:20dnolenbmaddy: cool
21:21FrozenlockIs there a wrapper for most of the javascript functions in cljs?
21:21dnolenFrozenlock: what do you mean?
21:22FrozenlockWell looking at a js code, I see document.createTextNode
21:22FrozenlockIs there a `create-text-node'-like function?
21:22dnolenFrozenlock: those aren't JS functions, those are DOM functions. and no those are not wrapped, and they won't be.
21:24FrozenlockOh! So I should call them like in the jvm? (.createTextNode ....)?
21:27dnolenFrozenlock: yes
21:27FrozenlockThank you
21:30symuynI'm having trouble getting a good word wrapping string function in Clojure. The only example I can find is at http://langref.org/all-languages/strings/reversing-a-string/textwrap, but it doesn't work for certain strings.
21:30symuynIt gives the solution of (re-seq #".{0,70} ")—
21:30symuyn,(re-seq #".{0,70} " (apply str (repeat 10 "The quick brown fox jumps over the lazy dog. ")))
21:30clojurebot("The quick brown fox jumps over the lazy dog. The quick brown fox jumps " "over the lazy dog. The quick brown fox jumps over the lazy dog. The " "quick brown fox jumps over the lazy dog. The quick brown fox jumps " "over the lazy dog. The quick brown fox jumps over the lazy dog. The " "quick brown fox jumps over the lazy dog. The quick brown fox jumps " ...)
21:31symuyn—but that doesn't work for short strings—
21:31symuyn,(re-seq #".{0,70} " "A B C")
21:31clojurebot("A B ")
21:32symuyn(Not to mention, of course, that this is naive about surrogate pairs, diacritics, and other Unicode fun, yeah. I'll probably have to write it all myself, but this should be a fairly common thing…)
21:32gfrederickswell isn't the issue not the string length but that it always fails at the end?
21:32symuynOh, good point. Hmm—
21:32gfredericks,(re-seq #".{0,70}( |\Z)" "A B C")
21:32clojurebot(["A B C" ""] ["" ""])
21:33gfredericksbam
21:33symuynExcellent; thank you very much.
21:34symuynHmm, I wonder if there's any Java or Clojure stuff for iterating on *logical* characters, such as surrogate pairs and diacritic-modified characters—I've been using Apple's Objective-C APIs lately, and their Unicode support has spoiled me, heh…
21:35amalloysymuyn: you might also like the one that lazybot uses: https://github.com/flatland/lazybot/blob/newcontrib/src/lazybot/gist.clj
21:36symuynWonderful; thank you again.
21:41Raynesamalloy: You..
21:41Raynesamalloy: You kinda just linked to something really weird.
21:43Raynesamalloy: https://github.com/flatland/lazybot/blob/develop/src/lazybot/paste.clj isn't this the same thing?
21:43RaynesOnly with a better pastebin.
21:44gfrederickswhat does [] accomplish in a regex?
21:44amalloyusually indicates the author has made an error
21:44gfredericksoh the ] must be a literal
21:45amalloyoh, sure, if there's another ] later
21:45amalloy[][] is supposed to match either square bracket, for example
21:45gfredericksI don't think it's obvious that that should work though
21:45amalloy(java's regex engine is broken so that it doesn't)
21:45gfredericksamalloy: I'm looking at line 8 from your link
21:45amalloygfredericks: it has no meaning otherwise, and it's defined to work, so...?
21:45gfredericksamalloy: reasonable definitely
21:46amalloyi seem to be matching any 50-70 characters, along with any trailing ])|" characters
21:47gfredericksright
21:47gfredericksI was only surprised at the []
21:48amalloyan important part of the perl philosophy: no syntactic construct left behind! any combination of characters that can plausibly be given meaning, must mean something :P
21:49gfredericksha
21:50gfredericksby that logic should ()) match closing parens?
21:50gfredericks(and capture it)
21:51FrozenlockCljs makes me realize how I've been spoiled with clojure-swank.
21:51gfredericksI can imagine [] beinge unhelpful for dynamically generated regexes
21:51amalloygfredericks: no good because of context, though: ()) might be preceded by a (
21:52gfredericksthese context free grammars sure are context sensitive
21:52amalloygfredericks: imagine if []abcd] didn't work, though. you'd have to write (?:]|[abcd])
21:52gfrederickswhy not [\]abcd]?
21:52amalloyoh, i guess that's probably true
21:53amalloy&(re-seq #"[\]]" "ab[]")
21:53lazybot⇒ ("]")
21:53gfredericksI don't even know what the ?: is supposed to do
21:54FrozenlockAnnnnnnnd I just killed my repl. (keys (ns 'dom.test)) was a bad idea.
21:54amalloygfredericks: without it you'd be creating a capturing group
21:54gfredericksooh that yes
21:55gfredericksI always forget about that functionality since it isn't strictly necessary
21:56gfredericksit just occurred to me that not only do backreferences allow regexes to describe more than just regular languages, I think they also cause the regexes themselves to not be context-free
21:56uvtcHow close are Java regexes to Perl 5 regexes?
21:56amalloyuvtc: very close, but not identical
21:57amalloygfredericks: yes, a lot of atrocious stuff has gotten packed into regexes
21:58uvtcOk, ok. Thanks. That's what I thought, re. regexes: Perl 5 ≅ Python ≅ Java ≅ PCRE.
21:58uvtcs/Ok/Oh/ :)
22:03uvtcOh, the docs for java.util.regex.Pattern have a "Comparison to Perl 5" section.
22:22uvtcFor a compojure project using the lein-ring plug-in, can I start the project while at the same time have access to the repl?
22:30xeqiuvtc: not that I'm aware of
22:31uvtcThanks, xeqi.
22:31xeqithough you could start a repl and call run-jetty with :join? false
22:31uvtcAh, right. Instead of using `lein ring server`.
22:37casion,(= (1) [1])
22:37clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
22:37casionderp
22:37casion,(= ('1) [1])
22:37clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to clojure.lang.IFn>
22:37casionwhatever
22:38chouser,(= '(1) [1])
22:38clojurebottrue
22:38casioncan't even type, thinking is probably not my forte right now
22:38chouser:-)
22:38casionI had no idea that would be true :|
22:39casionback to the book I guess
22:41zeromoduluswhy are single segment namespaces discouraged in clojure? e.g. hello-world.core preferred over hello-world.
22:44xeqibecause when they are compiled into a java class they end up in the default package
22:44xeqiwhich is discouraged cause it causes problems.. with importing ? I don't remember the specific
22:44uvtcclojurebot should have an answer for that one.
22:45uvtc~single-segment-namespaces
22:45clojurebotI don't understand.
22:45uvtc~namespaces
22:45clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
22:45uvtc(funny: "without a period in it", and it leaves off the period at the end of the sentence. :) )
22:47amalloyzeromodulus: hello.world is better than either of those. not single-segment, and doesn't introduce a meaningless .core suffix
22:48chouserYeah, I've never been a fan of library .core namespaces
22:48chouserI think something at the top level to disambiguate is wise. zeromdoules.hello-world
22:50gfrederickscore.core.core.core
22:56uvtcWhat is the terminology for that core.clj file that hello-world.core refers to? "the core module of the hello-world library"?
23:00gfredericks(ns core.core (:require [core.core.core :as core])) (defn core [core] core)
23:08RaynesI've never been a fan of the weird domain crap java people do.
23:08uvtcSeems like "core" is a good name choice for libs that contain more than one ... module. As good a name to standardize on as any. Maybe "main".
23:08Raynescom.mysite.freewebs.geocities.lol.im.putting.there.here.cuz.i.can.JavaFactory
23:09gfredericksRaynes: if it didn't produce so much FS depth would it be less annoying?
23:09RaynesNo.
23:09chouserI prefer using the top level to disambiguate, and the inner level to name what it's actually for.
23:10RaynesI don't know what I'd use for 'core' in half of my libraries.
23:10gfredericksuvtc: in my head "main" means "the first thing that runs" in some context or another
23:10Raynesconch.usethistoshellout
23:10gfredericksRaynes: fs.core could be a core namespace
23:10uvtcHm. So, maybe use project-name.core for libs, and project-name.main for apps? ...
23:10Raynesfs.filesystemstuffisinhere
23:11chouserstll don't like it
23:11gfredericksuvtc: that sounds totally reasonable. I'm not a core hater.
23:11chouseruvtc.project-name
23:11RaynesBlugh.
23:11RaynesAnd when the project changes hands?
23:11uvtcchouser: but I may not maintain project-name forever.
23:11RaynesKeep the namespace and be a liar?
23:12RylandAlmanzaAnyone have experience writing android applications in clojure?
23:12uvtcimmortality!
23:12chouserwho cares?
23:12chousersure
23:12RaynesI care.
23:12chouserthe point is to not trample on fs
23:12RaynesI'd be maintaining miki.fs right now using your naming scheme.
23:12chouseryou and I both make a namespace fs, and now nobody can use them in the same JVM
23:13chouserthat matters a lot more than whose name is on the front
23:13RaynesWell, don't name a project fs since there already is one. *shrug*
23:13gfrederickschouser: I agree with you. does this make us conservatives?
23:13chouserso better yet come up with an actual clever/unique name
23:13RaynesMaybe we should use UUIDs as namespace prefixes then.
23:13RaynesBut they could clash at some point.
23:14chousergfredericks: heh. according to the definition Yegge provided, or the one he actually uses?
23:14chouserRaynes: if you prefer.
23:14gfredericksprovided
23:14uvtcThe Perl community has a neat way of dealing with it. One person uses Bicycle. Another separate lib uses Bicycle::Seat. Someone else, Bicycle::Tires, and still another Bicycle::Seat::MassiveSprings.
23:15Rayneschouser: Sorry if I sound like an asshole. I just don't get the big deal. We've been using this for years and I've yet to see any significant problems. Maybe people will start naming all their libraries fs in the future. *shrug*
23:15RaynesI should really rename fs, but I'd hate to change the namespace. People hate when I change fs things. :|
23:15gfredericksRaynes: fo.shiz?
23:16chouserRaynes: I'd like people to choose to avoid my libraries because of the state of the code or docs, not because the name conflicts with something else they already have.
23:16RaynesI've never had someone mention having that problem with my libraries.
23:17Raynesfwiw, fs wasn't my choice of name. It was a single segment namespace when I got it.
23:18amalloyRaynes: the clojure community is small. if the java or scala communities were as reckless as we are, there would be conflicts everywhere, and nobody could use clojure because our libs conflict with theirs
23:18RaynesOkay, I'm wrong.
23:19RaynesI don't bother arguing with amalloy.
23:19amalloyooesn't maven central have a policy on this? like, we won't take your jars if you pick a stupid package name?
23:19Rayneschouser will give up and go away. I'd be here all night with amalloy.
23:19amalloyyou wish
23:19RaynesOooh
23:19chouserI'm already gone :-)
23:19FrozenlockSo what's the moral of the story? How do you name a library?
23:20amalloyFrozenlock: right now? recklessly. in the future? we'll probably grow out of it
23:20gfredericks&(format "lib-%04d" (rand-int 10000))
23:20lazybot⇒ "lib-2712"
23:20Frozenlockfrozenlock.library?
23:20amalloyi called one of my first libs amalloy-utils, and people didn't want to use it
23:20FrozenlockI would :)
23:20gfredericksI usually use my domain name, because raynes hates that
23:20uvtcCan I name mine bicycle.seat, and Frozenlock name his more specialized one bicycle.seat.massive-springs, and there will be no problems?
23:20chouserI wouldn't actually recommend using your own name for the top level, but it's better than nothing.
23:20RaynesFrozenlock: com.frozenlock.(UUID/randomUUID).code.doesstuff
23:21uvtc(I mean namespace names, not github project names, nor artifact-id's)
23:21Rayneschouser: What *would* you recommend? Could you nail out something solid? You realize all it takes to get people to change is to change that lein-newnew does by default. It was talked about before but not acted upon.
23:21gfrederickswait no I don't. I only do that for maven group-ids.
23:21Rayneswhat*
23:22amalloyuvtc: technomancy picks literaty characters or references and makes his "core" namespace first.last, and supporting libs first.last.whatever
23:22amalloynot the worst idea ever, but we can't all be so creative
23:22chouserRaynes: you do see a difference in risk between somename.fs and just fs, right? Whether you agree that it's too big a risk or not.
23:23RaynesI see a risk, but I don't care about it at all.
23:23FrozenlockLet's prepend with a bitcoin address. It will almost certainly be unique, and we can tip if we like it.
23:23RaynesBut that doesn't mean I wont listen to what you have to say.
23:23Rayneschouser: Open a new issue about it on lein newnew. Let's talk things over with technomancy and friends and come up with something new.
23:23RaynesYou can't revolutionize without starting the revolution.
23:24chouserI don't care enough to try to start a revolution. Just tossing in my opinion when the topic comes up.
23:25chouserSee you folks later.
23:25RaynesAnd that folks is why we have the foo.core pattern. Ya'll come back now, ya hear.
23:25chouser:-)
23:26gfredericks~core
23:28clojurebotcore is what you put in a namespace when you can't think of a better way to avoid single-segment namespaces.
23:43FrozenlockOk, I want to do this in cljs https://www.circuitlab.com/editor/
23:47zeromodulusooo, just discovered lein repl
23:47zeromodulusn.n
23:49uvtczeromodulus: wait 'til you try the tab-completion...
23:49zeromodulusI did, hehe, that's why I'm happy about it.
23:50FrozenlockIsn't lein repl the most barebone you can get?
23:51amalloyFrozenlock: java -jar clojure.jar
23:52Frozenlockamalloy: I shiver at the idea of trying that
23:52uvtcFrozenlock: I don't think so. lein repl gives you the usual readline keyboard shortcuts, plus tab-completion. It's nice.
23:52FrozenlockOh nice!
23:52eggsbyFrozenlock: what do you use with cljs? I tried it yesterday with just java interop to google closure and it seemed painful, latest versions of cljs-build and domina don't seem to play nice together either :(
23:53eggsbyis everyone doing cljs just using noir and pinot together?
23:53Frozenlockeggsby: I'm still getting started
23:53eggsbyah
23:53FrozenlockThe DOM stuff is a real pain...
23:54FrozenlockAt least I have my repl working in inferior-lisp
23:54FrozenlockBtw, anyone knows if there's an example of a cljs repl working inside the browser?
23:54eggsbyTo be honest I'm surprised there isn't a slick wrapper over google closure interop yet
23:55Frozenlockeggsby: ++
23:55eggsbyFrozenlock: iirc cljs one has that
23:56eggsbyhttp://clojurescriptone.com/ I *think*
23:57FrozenlockI mean with a repl literally on the webpage
23:57uvtcFrozenlock: himera?
23:57uvtchttp://himera.herokuapp.com/index.html
23:58eggsby^
23:58Frozenlock\o/
23:58FrozenlockThanks!
23:58FrozenlockI want to know how they do it without `eval'
23:58eggsbythe source for that is up on github
23:58uvtcfogus wrote a blog post about it.
23:59FrozenlockYes, the read will be interesting :)
23:59FrozenlockR E P L without eval is like... RPL
23:59eggsbylol
23:59eggsbyR C P L ?