#clojure logs

2012-08-21

00:03saurikjkkramer: yes, I know how to bypass the error for my specific case with this one specific version of clojure. what I am trying to find out is why clojure's defrecord has this behavior, as it means that new versions of clojure might cause scripts that use defrecord to break solely due to "a new function was added to clojure.core"
00:04jkkramersaurik: it's not specific to defrecord, it's just how vars work. you'd get the same effect use def or defn
00:05saurikno, you get a warning.
00:05saurikuser=> (def test 4)
00:05saurikWARNING: test already refers to: #'clojure.core/test in namespace: user, being replaced by: #'user/test
00:05saurik#'user/test
00:05saurikuser=> test
00:05saurik4
00:06jkkramerthat looks like the same warning you pasted from defrecord
00:06saurikno, defrecord had an error
00:06saurik02:42:42 < saurik> (defrecord test []) -> "ClassCastException clojure.lang.Var cannot be cast to java.lang.Class clojure.lang.Namespace.referenceClass (Namespace.java:129)" ...
00:06jkkramerah, missed that
00:06saurikit might be that there is a different way of using defrecord that avoids this problem, hence my comment in that same paragraph "am I doing something wrong?"
00:10jkkramerfwiw, the convention is to use capitalized names for records, which would help reduce the chances of conflict. but fundamentally, there's not much you can do except test your code against new versions
00:10jkkramerif you are keen on receiving a warning instead of an error, you could dig into defrecord's internals and see if a patch is feasible
00:10seawordIs it acceptable to forgo the hyphenated naming convention of clojure when working with hash maps submitted from a form in the browser? E.g., my html form fields have names like "first_name" and "last_name" so when I receive the hash map of form params I'll be accessing them like: (:first_name form).
00:11seawordAs opposed to the convention of (:first-name form)
00:22amalloyseaword: yes, it's probably best to just use the conventions for whatever protocol you're using. two things, though: (1) you *will* forget and wonder why (:first-name x) is nil, and (2) i think HTML is ambivalent re: - vs _, and in fact favors -. i'd mostly suggest using _ for unenlightened things like ruby or js, which can't express names with hyphens
00:24amalloysaurik: to expand on jkkramer's point: (defrecord blah) creates a java class named blah, so it's recommended to use java naming idioms for records. eg, Test instead of test for that reason
00:24amalloywhich, happily, avoids conflicting with anything in clojure.core
00:35cemerickanyone have advice for someone whose browser-repl is thoroughly unrepsonsive?
00:35cemerickcopy/pasting the code / interactions from https://github.com/clojure/clojurescript/wiki/The-REPL-and-Evaluation-Environments yields no joy, unfortunately.
00:47amalloycemerick: solution: learn to derive joy from simply following instructions on the internet
00:48cemericktl;dr: I wasn't able to get it working at all, but boy, it sure was fun to try!
00:51wmealing_heh
00:52cemerickI got it, thanks to xeqi. You can't load the HTML that opens the browser repl connection from disk.
00:52xeqihurray!
00:52tomojI ran into https://gist.github.com/3d6d4b1ca0a777dfa27b on calling cemerick.piggieback/cljs-repl
00:53cemerickI see that's discussed further on down the page, but…oh well.
00:53tomojguessing that's cus I'm using edge clojure
00:53tomojer, clojurescript
00:53cemericktomoj: you probably don't have piggieback set up at the right level in your nREPL stack. What does your project.clj look like?
00:55tomojhttps://gist.github.com/913cfd6840a205b1acfd
00:56cemerickxeqi: thanks again. browser-repl instructions going into the piggieback readme now. :-D
00:56xeqicemerick: bug report - :cljs/quit doesn't change the prompt back
00:56cemericktomoj: hrm, that should work…
00:57cemericktomoj: do a `lein deps :tree`; what version of nREPL do you have?
00:58muhoocemerick: i've had the same problem with browser repl in piggieback
00:58cemerickxeqi: Yeah, I had that working, and busted it again somehow. Could you file an issue?
00:58cemerickmuhoo: which one?
00:58muhoototally unresponsive
00:58cemerickmuhoo: are you loading the html page from disk or from localhost:9000?
00:59muhoothe html page was loaded through noir
00:59muhoothe repl was connecting to localhost:9000
00:59tomojcemerick: 0.2.0-beta8 https://gist.github.com/78ce693affc9cd330249
01:00cemericktomoj: bump up to [org.clojure/tools.nrepl "0.2.0-SNAPSHOT"], and give that a roll (you may need to add the OSS snapshots repo to your project.clj)
01:01cemerickmuhoo: I'll bet the static resources the browser repl needs aren't getting served up properly. Check the :static-dir arg for cljs.repl.browser/repl-env
01:02cemerickI had that issue too, as I'm currently still compiling dummy cljs files in my clone of the cljs project.
01:02muhoogood point, will check. thanks.
01:03cemerickso I needed :static-dir ["/Users/chas/dev/clojure/cljs/" "/Users/chas/dev/clojure/cljs/out/"], but you'll need to figure out what the right paths are for how things are set up in your noir app.
01:03michaelr525good morning
01:04tomojcemerick: same error https://gist.github.com/64bb750b903629b210eb
01:04michaelr525anyone knows how to make pprint work when called from a program which is running from 'lein run'?'
01:04tomojis it feasible that nrepl.el should be able to e.g. C-c C-k a cljs file and load up the dependencies?
01:05tomojI had ignored nrepl almost completely, not having noticed nrepl.el until just a while ago
01:06cemericktomoj: how are you starting your REPL?
01:06eduardhow to store byte array to file?
01:06tomojcemerick: lein2 repl, then (cemerick.piggieback/cljs-repl)
01:07cemerickhrm
01:07cemericktomoj: which version of lein?
01:07tomoj2.0.0-preview7
01:09technomancymichaelr525: we were just discussing allowing that earlier
01:09technomancymichaelr525: your best bet for now is probably configleaf
01:09xeqitomoj: the :nrepl-handler requires preview8 I think
01:10michaelr525technomancy: config leaf?!
01:10cemericktomoj: ah-ha; you need lein master or -preview8; the piggieback middleware isn't being applied at all
01:10technomancyconfig leaf!
01:10tomojthanks
01:10michaelr525technomancy: i thought of maybe doing (println (with-out-str (pprint)))
01:10michaelr525technomancy: because println does work
01:10muhooconfig leaf?
01:10tomojmissed that in the readme..
01:11tomojwould be surprised but delighted if nrepl.el+cljs with piggieback was already mostly functional
01:11technomancymichaelr525: oh, sorry; I thought you meant the leiningen pprint plugin
01:11technomancymichaelr525: you want (:require [clojure.pprint :refer [pprint]]) in the ns macro
01:12xeqicemerick: after your readme updates I'll check and file a bug on the prompt
01:13cemericktomoj: Note that the nREPL config bits in lein are changing somewhat (much simpler/shorter) post-preview8. But, yes, it's all coming together I think. :-)
01:13cemerickxeqi: They'll likely need to wait until late tomorrow; the piggieback stuff depends on getting all of the nREPL/reply/lein backlog pushed through, which isn't gonna happen tonight.
01:14cemerickBut yeah, thanks. :-D
01:14michaelr525technomancy: hmm.. i use (use [clojure.pprint] :only [pprint]) today and it doesn't print anything, maybe because of leiningen 1.7?
01:15technomancymichaelr525: no, the version of leiningen is irrelevant
01:15tomojholy crap it works
01:15tomojhad to switch into clojure-mode to get C-c C-k though, hmm
01:15technomancymichaelr525: (:use [clojure.pprint :only [pprint]]) would be better
01:15technomancytomoj: nrepl.el master has a number of important fixes
01:15technomancysupposedly a release is coming soon?
01:16tomojwhen I installed from elpa I was thinking it the back of my head "I'm going to go get master anyway.."
01:16technomancyhaha
01:16technomancywelcome to the bleeding edge
01:16michaelr525technomancy: yeah, that's what i'm doing here
01:17tomojjust amazing to type some clojure in emacs and see js source...
01:18xeqitomoj: it is, though I mis M-.
01:19tomojI saw it in the nrepl.el readme and hoped..
01:19tomojbut yesterday I was using cljsbuild auto and google chrome's console..
01:20xeqiI think its a matter of implementing the right nrepl ops for the cljs repl
01:23muhoocemerick: :static-dir didn't fix it. firebug shows it is in fact pulling up the static resources though
01:23cemerickmuhoo: there should be a bunch…?
01:23muhoohttps://www.refheap.com/paste/4519
01:24cemericki.e. if there's just one, then something's borked
01:24cemerickI can't say I know what that is. :-)
01:24muhoo http://bace.s3.amazonaws.com/replinteraction.jpg
01:25muhooi can try :-) it looks like nrepl is never sending anything to the browser
01:25cemerickI'm guessing that's not working? I have 71 requests upon opening the browser-repl connection.
01:25xeqimuhoo: sometimes it ignores the first input line for me after starting the browser repl
01:25cemerickBut then, I'm a total noob here.
01:26muhooyeah, this is all bleeding edge it seems
01:26cemerickquite
01:26cemerickxeqi: what's M-.?
01:28muhooi did some research tho. when working, the interation between cljsrepl and browser is this: https://www.refheap.com/paste/4013
01:28xeqicemerick: nrepl.el's jump-to
01:28xeqilooks like I was wrong on the nrepl op guess
01:29xeqihttps://github.com/kingtim/nrepl.el/blob/master/nrepl.el#L311
01:29xeqithough I remember seeing something funny about them with one of the commands
01:29cemerickSome introspection middleware is definitely in demand.
01:30technomancythe server side impl of jump-to is trivial
01:30muhoocemerick: did you make any progress on the problem of how to insert something into the middle of a middleware chain?
01:30cemerickDabbing together sexps everywhere is no way to live.
01:30muhooit seems like a hard problem, maybe even an achilles heel of the composable function handler approach to middlewares in general
01:30cemerickmuhoo: Yup, done and implemented on nREPL master. Will be landing in lein master tomorrow-ish.
01:30technomancythe most annoying stuff to piece together server-side in nrepl.el is reload
01:31cemerickmuhoo: it is, by no means, a bulletproof impl. But, it works well enough, and properly shifts the configuration burden onto middleware authors instead of onto users.
01:32muhoofantastic, thanks for that.
01:33technomancys/server-side/clojure-side from the client/
01:33cemerickCan anyone replicate this? https://gist.github.com/3317393 Clean cljs clone, FWIW.
01:46tomojcemerick: replicated
01:46cemerickoh, excellent
01:47xeqicemerick: I also get it when running ./script/repl from cljs master
01:47cemerickI get it through piggieback too.
01:49cemericktomoj, xeqi: http://dev.clojure.org/jira/browse/CLJS-358
01:49tomojworking on trying browser repl now
01:50xeqiah, I can replicate though piggieback
01:50xeqiI must of misunderstood when you asked the other day
01:51BahmanHi all!
01:52cemerickIt's also curious that you can only be using either Rhino or browser-repl at the same time.
01:56cemericks/the same/one
01:59cemerickthanks again xeqi; saved my sanity back there. :-)
02:01xeqinp, thanks for making the plumbing so the browser repl can work from nrepl.el
02:01tomojhmm
02:01xeqiah, he quit
02:01tomojhow?
02:01clojurebotwith style and grace
02:02tomojI start a browser repl env on 3000, get a repl prompt, and the browser is talking to localhost:3000, but when I type something in the repl there is always no output
02:02tomojand no response from the browser
02:04xeqitomoj: oh, I thought you had it working earlier
02:04tomojonly with rhino
02:05xeqiah
02:05xeqiare you serving the html from a server, or trying to browse it from the filesystem?
02:05tomojlocal apache
02:06tomojon localhost, repl env on localhost:3000
02:06xeqik, try a second input line in the repl, it seems to ignore the first one for me
02:06tomojno luck
02:06tomojI noticed I have :whitespace in the browser-side, default :simple for the repl env
02:07xeqithe cljs (repl/connect ..) has the right port in it?
02:08tomojyeah
02:09xeqioh,, looks like the readme was updated on a branch - https://github.com/cemerick/piggieback/tree/0.0.2#browser-repl
02:10tomojwhat is this out/goog/base.js?
02:11xeqithats an output from using the cljs compiler directly
02:11xeqilein-cljsbuild does it differently
02:11tomojah
02:12xeqibut the importatn part is the cljs-repl startup command
02:12xeqiusing that but with 3000 for the port?
02:13tomojI'm using https://gist.github.com/3412542
02:14xeqihmm.. thats basically what I was using
02:16xeqifirebug will show me a connection waiting for a response when the browser is connected
02:16tomojI see that too
02:18tomojhmm, it works with straight `lein2 repl`
02:18tomojjust in emacs nothing gets sent to the browser
02:19muhooheh, he just added the browser-env stuff now. nice.
02:20xeqihmm, at least thats a good start
02:20xeqiI'm using nrepl.el from elpa in case it makes a difference
02:20tomojoh, me too, I forgot to go grab master
02:22xeqiare you sending a form to eval before or after connecting the browser?
02:22tomojafter
02:24xeqi`lein repl :headless` + M-x nrepl or M-x nrepl-jack-in ?
02:24tomojno :headless, M-x nrepl
02:24tomojM-x nrepl-jack-in seemed to hang for me
02:27xeqido you have a stacktrace from lein? sometimes I get one
02:27xeqiwhen I don't have everything connected right
02:27tomojnope
02:29tomojwell, something made it work
02:29xeqiheh
02:29tomojeither :headless, upgrading piggieback to the latest on 0.0.2 branch
02:29tomoj..or master nrepl.el
02:29tomojthanks for the help
02:31tomojhmm, except now I get no output from println
02:32xeqiI think it was the :headless, I get a non-responsive repl without it
02:42xeqitomoj: I see it sending it to the browser, but not showing up in console.log :/
02:42xeqinot sure what happens to printlns
02:42tomojI think clojure.repl.browser tries to make it go to the repl (not console.log)
02:43tomojtrying to figure out a *print-fn* for console.log now
02:43tomojsince whatever clojure.repl.browser is trying doesn't work for me right now..
02:45xeqiI see a mailing list entry from a couple weeks ago mentioning nrepl.el just swallows stdout
02:48xeqiyou're right on the browser sending it back, I had my post params vs responses confused
02:48xeqiwhich means I need to sleep, but glad its mostly working
03:29tomojhmm, as soon as I (in-ns 'foo), nrepl.el stops working
04:43kralnamaste
05:03muhooheh, no the cljs repl has it backwards really. POST responses are NEW commands coming from the repl. POSTs are the browser responding back
05:04muhoothe POST hangs, waiting for the repl to give a new command. when it does, the browser execs the js that was sent, and sends the reply as a new POST
05:04muhooand that one then hangs, waiting. it's goofy, and websockets would be a lot nicer
05:10Raynesmuhoo: Stop writing clojurescript.
05:10RaynesWrite more Clojure.
05:23muhoowhy?
05:23clojurebotwhy is Why
05:24muhoo,logging
05:24clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: logging in this context, compiling:(NO_SOURCE_PATH:0)>
05:24muhoologging?
05:24muhoofubar?
05:24clgv~logging
05:24clojurebotExcuse me?
05:24clgvclojurebot: logging?
05:24clojurebotCool story bro.
05:24clgvhe has no clue ;)
05:25muhooRaynes: the project i've got will likely not involve clojure, but *may* involve cljs, if i can get it working and sell the idea
05:47nz-so if I have understood correctly nrepl+nrepl.el is roughly equivalent to slime+clojure-swank (or slime+ritz)
05:50taliosnz- - kiwi?
05:50nz-talios: ?
05:50taliosnz- - thats my understanding on nrepl yes. only better.
05:51taliosjust wondering if the nick is also indicative of you living here in NZ :)
05:51nz-almost exactly opposite side of the globe ;)
05:52taliosoh well - I won't try pimp you with a job then :)
05:52nz-ok
05:52taliosman its hard to find good java people, even harder finding any with a functional bent
05:53taliosneed to convince brehaut into moving up :)
05:54nz-a few years ago I might have moved ;)
05:54taliosRight, now where did I put that time machine
05:56magopiantalios: you live in NZ? and you have job openings? :D
05:57taliosmagopian - you make it sound strange. looking for OSGi/REST/Clojure(or functional) peoples
05:58magopiantalios: i make it sound strange? in what way? sorry if that's the case, english is not my mother language ;)
05:58magopian(well, in fact, it's my mother's mother language, but not mine, does that make any sense? :)
05:59magopiantalios: what company do you work for?
06:00taliosmagopian - http://smxemail.com - hosted email/anti-spam/cloud-pass
06:00taliosalthou its more meta-paas
06:01magopianhow nice is it to work there?
06:01nz-they published new nrepl-el just now, and M-x package-install nrepl doesn't work
06:02magopianand do you know if it's possible to work remotely?
06:02talioslow key, mostly relaxed, fairly casual environment, small company (20ish employees )
06:02magopianlow key? what does that mean?
06:02talioscasual/relaxed
06:02magopianok ;)
06:03taliosI wish we were more open to remote working, management don't really seem keen on it tho
06:03nz-ah, i need to do M-x package-refresh-contents first
06:03magopianmmmm
06:04magopiantalios: do you have job descriptions? or anything else that could help me see if my profile could fit?
06:05magopiani'm just a clojure noob, started playing with it (with 4clojure mostly) a few weeks ago, so if you're looking for experienced devs, i'll have to pass ;)
06:05magopianexperienced _clojure_ devs (i'm experienced in other languages, mainly python)
06:05taliosmagopian - just found the job add - http://www.seek.co.nz/Job/java-developer-architect-global-audience/in/auckland-auckland-central/22929764
06:06borkdudegoat moaning
06:07the-kennyI'm currently flashed by nrepl.el. It's so awesome.
06:07talios'lo borkdude
06:07magopiantalios: mmm i'm not the good profile :/
06:10magopiantalios: thanks anyway for the links !
06:11magopian(i'd love to live in NZ one day... or at least visit it !)
06:18nz-nrepl looks good
06:18nz-and time to make it work has been a couple of magnitudes faster that with swank-clojure
06:23the-kennynz-: Yeah, it's about time for a good alternative to Slime
06:31nz-now i just should learn to use repl when coding
06:40nz-how to jump from stack trace to code in nrepl?
06:40nz-in nrepl.el that is
06:52the-kennyI don't think you can (yet)
06:54azkesz,'hi
06:54clojurebothi
07:14clj_newb_2384is anyone here famiilar with lamina.core ?
07:14clj_newb_2384I dont' have a particular question; but I'm curious about the ideas behind it
07:18llasramclj_newb_2384: ztellman has given a presentation on lamina: http://www.infoq.com/presentations/Event-Driven-Programming-in-Clojure
07:18clj_newb_2384llasram: ha!, I'm actually watching that right now
07:19llasramWell, that's what I've got :-)
07:19clj_newb_2384the deadlock example is pretty cute
07:19clj_newb_2384(that a finite thread pool + data dependency + alignment of the stars = deadlock)
07:19clj_newb_2384are you familiar with lamina.core?
07:19clj_newb_2384i've come across it while studying aleph (the websocket server)
07:20llasramNot much. I saw the version of this talk he gave at Strange Loop, and dug into lamina a bit while using aleph for a toy async implementation of the 9P protocol
07:22llasramIt does have a lot of cool idea in it though. Definitely expresses a lot of thought on how to do async
07:25clj_newb_23849P as in plan 9?
07:27llasramYeah -- Plan 9's IPC protocol. I use wmii, which uses Plan 9 IPC to let arbitrary external programs control it
07:30clj_newb_2384wtf
07:30clj_newb_2384lamina channels are _transactional_
07:30clj_newb_2384that's amazing
07:30tsdhI have some defrecord or deftype Foo implementing some IFoo protocol. Now, I do (def x (->Foo)) at the REPL. When I recompile the namespace declaring the defrecord/deftype, I cannot call any protocol method on my x instance anymore. Is that a case of "don't do that"?
07:31llasramtsdh: It's less of a "don't do that" than "a known limitation." But yeah, the only real solution is "don't do that"
07:32llasramWhenever you re-compile a protocol definition, you re-bind the var to a new value defining the protocol, and everything gets sad
07:32tsdhllasram: I guessed that.
07:33llasramOk, cool
07:33tsdhllasram: Well, no problem for normal runtime, but a pain in the ass for experimenting at the repl...
07:34tsdhllasram: So probably it's a good habit to place protocols and records in their own namespaces.
07:35llasramThat's one solution. I've found that it isn't too bad in practice, because I usually have one of two kinds of protocols: (a) ones in their own namespace, where I rarely need to revisit & recompile the file, or (b) ones where every reference to the protocol is in the same namespace, so all references get recompiled too whenever I re-define the protocol
07:38tsdhllasram: Well, (b) basically applies to the problematic protocol here, except that there's this one record instance at the REPL. ;-)
07:39tsdhBut no problem, I'll simply place the protocols and records into an own namespace.
07:39clj_newb_2384llasram: is it possible to get the slides of the talk?
07:40clj_newb_2384(re lamina.core)
07:43llasramThe StrangeLoop 2011 slides are all up in a github repo, yes! https://github.com/strangeloop/2011-slides/blob/0780f9c766832b8da682e226d04bb4649475e40a/Tellman-EventDrivenProgrammingInClojure.pdf?raw=true
08:05FrozenlockI have a weird need here.... is it possible to use a clojure repl from a machine you connect to using ssh? Swank maybe too much... but using the lein repl perhaps?
08:06llasramssh to the box, then run lein repl... ? :-)
08:09Frozenlockllasram: that simple? I'm almost scared...
08:09llasramWell, that was kind of joke :-). I'm not 100% certain of your meaning
08:09FrozenlockNo no, that makes sense...
08:10llasramYou can obv just run `lein repl` in an SSH session, but you can also use SSH port-fowarding to forward connectinos to a swank server or headless nrepl session over SSH
08:10FrozenlockHowever lein will not be installed on the machine, can I use it to download a project dependencies without installing it?
08:11FrozenlockOh that would be marvelous! I need to read more about SSH and learn how to do that :)
08:11FrozenlockThanks for pointing this out!
08:11llasramAh, so this is where it gets more interesting. So is the machine running a Clojure application, and you want to be able to get a REPL in the context of the deployed application?
08:12ejacksonFrozenlock: I do this as llasram suggests, but I embed a swank server into my app
08:13ejacksonthis works even if you deploy to tomcat or whatever
08:13FrozenlockOf course!
08:13FrozenlockThen uberjar and send the jar to the remote machine to run it!
08:13ejacksonor uberwar even
08:14llasramFor web apps, you might also want to check out https://github.com/cemerick/drawbridge . I haven't used it myself yet, but looks quite interesting
08:14ejacksonseriously cool
08:18clj_newb_2384I like the remote repl more than uberwar
08:18clj_newb_2384since uberwar takes cime to ceate whereas repl is isntant
08:19ejacksonclj_newb_2384: depends on process. I have CI that builds and deploys the uberwar backstage.
08:20ejacksonbut yeah, for fiddling about, lein ring server-headless is fast
08:21freiksenetis there any reason why trees that form a base of clojure data structures branch at 32?
08:21freiksenetexcept for java int size
08:26gfredericksfreiksenet: java int size is unrelated
08:26gfredericks32 is 5 bits wide, not 32 bits
08:27gfredericksassuming you agree it should be a power of 2, then presumably you'd want whatever width is optimal for performance. For some unimportant low-level reason, 32 must be.
08:27freiksenetgfredericks: sure, and 6 bits are 64 for example.
08:28gfredericksthere was a talk at the last conj that I think mentioned cache lines
08:28freiksenetok, I see
08:29hugodnz-: which version of ritz was giving you problems with load-file?
08:37nz-hugod: 0.3.2
08:37nz-hugod: error was MalformedURLException: no protocol
08:38hugodnz-: was the source file in a jar?
08:39nz-no, it was open in my emacs buffer
08:39nz-then again, it seemed to work sometimes
08:39hugod(files in a jar can be open in your emacs buffers)
08:40nz-i believe it was a normal file on the disk
08:40magopianfinally found the time to watch http://www.infoq.com/presentations/Value-Values
08:40magopianawesome ;)
08:43hugodnz-: btw, if you're interested in helping with debugger support for nrepl, the 0.4.0-SNAPSHOT lein-ritz plugin gives you a `lein ritz-nrepl :headless` command to start an nrepl server with debugger support, though you'll need the nrepl-ritz emacs package from melpa
08:44nz-hugod: so i did following steps: goto some clojure file in emacs, lein ritz, M-x slime-connect, M-x inferior-list, in clojure buffer C-c C-l
08:45nz-no protocol: /home/jsyrjala/projects/ruuvitracker/ruuvitracker_server/src/ruuvi_server/parse.clj [Thrown java.net.MalformedURLException]
08:46hugodnz-: ok, thanks, I'll try and repro here - I've never used inferior-lisp
08:47nz-hugod: so how do you use slime then?
08:47hugodnz-: `M-x slime-connect` brings up a repl
08:47Bronsais clojure.org down?
08:48Fossinot for me
08:49nz-hugod: slime-connect doesn't open anything for me
08:50ejacksonhugod: I'm glad I'm not the only curmudgeon around :)
08:50hugodnz-: that's strange - do you have any emacs config for slime?
08:50nz-hugod: (require 'slime)
08:50nz-just that
08:50nz-in .emacs
08:51hugodejackson: hey, emacs has so many configuration possibilities, it's easy to mess up
08:52ejacksonhugod: i'm with you. I got it working now leave it the hell alone !
08:52nz-hugod: thing with debugger is that i am new to this repl thing, and besides i practically never use debugger even with java code
08:52hugodnz-: try adding something like (add-hook 'slime-load-hook 'my-slime-setup)(defun my-slime-setup () (slime-setup '(slime-repl)))
08:54hugodnz-: ritz' main purpose is to add the debugger
08:55nz-ok, there is a sprinner mouse cursor
08:55hugodejackson: yeah, I periodically attack my .emacs files and it usually takes a while to straighten them out again
08:57nz-user=> clojure.lang.ArityException: Wrong number of args (1) passed to: ritz$breakpoint-kill
08:58nz-hugod: that is from lein ritz process
08:58qerubWhat to people use to conditionally apply functions to possibly-nil values? I often use (defn try [f x] (if (not (nil? x)) (f x) x)), but I guess that is not idiomatic.
08:59ejacksonqerub: check out fnil
08:59nz-,(doc fnil)
08:59clojurebot"([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."
08:59hugodnz-> that was while trying to remove a breakpoint from the filters listed in M-x slime-selector f?
09:00ejacksonqerub: the other thing I do is use -?> and -?>> from core.incubator. Different, but also nil handling
09:00nz-hugod: I just executed slime-connect, then was long pause (where I didn't do anything), then the exception
09:01nz-,((fnil identity 42) nil)
09:01clojurebot42
09:01nz-,((fnil identity 42) 99)
09:01clojurebot99
09:01qerubejackson: fnil is a good replacement if there's a good default value one can substitute nil with, but there isn't always.
09:02qerubejackson: Yeah, those are fine. Too bad they aren't in core…
09:02nz-,((fnil identity 42) 99 "f2")
09:02clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core$identity>
09:02gfredericksqerub: yeah I don't think fnil is what you were asking about
09:03ejacksongfredericks: is there a direct translation ?
09:03qerubSay in Haskell, I'd use fmap.
09:03gfredericksthere might be something in flatland/useful
09:03gfredericksand it's certainly easy enough to define your own, at least for the single arity case
09:04hugodnz-: there is no call to breakpoint-kill in ritz - the only way it can be invoked is in slime through the selector screen - so I am at a loss as to how you could have got that exception
09:07nz-maybe I have version mismatch or something
09:15qerubejackson, gfredericks: Thanks for the pointers to core.incubator and flatland/useful.
09:16gfredericksflatland/useful is the usefullest thing I never use
09:16beffbernardAnyone know how to get the hostname from within noir/compojure? I'm trying to build a link that is in the contents of an email I'm sending
09:17ejacksoni'd never come across it, thanks.
09:17michaelr`beffbernard: you can get it from the headers
09:18michaelr`beffbernard: (GET "/" {{host "host"} :headers})
09:18beffbernardmichaelr: ok
09:18michaelr`^^^ compojure syntax, i'm not sure about noir
09:22_nmmnhttp://agile.dzone.com/news/one-night-clojure-makes-scala ehehe
09:28beffbernardmichaelr: ((:headers (req/ring-request)) "host") in noir
09:28beffbernardoops.. ((:headers (ring.requestring-request)) "host")
09:28beffbernardoops again.. ((:headers (ring.request/ring-request)) "host")
09:28ozzloyrun it in a repl first
09:29beffbernardFFS.. ((:headers (noir.request/ring-request)) "host")
09:30michaelr`beffbernard: should be easier using some destructuring form in the route definition, no?
09:31beffbernardmichaelr: It wasn't available
09:31beffbernardUnless I used middleware
09:32beffbernard(defpage "/someendpoint" {:as params} (println params)) didn't include any header info
09:32michaelr`hmm
09:34duck11231what if you try (defpage "/someendpoint" params ...) don't know if that changes anything, but that's how I get the full request with compojure
09:35jsabeaudry,(Float. "0.2")
09:35clojurebot0.2
09:35duck11231If it's just normal destructuring, it probably wouldn't change anything, though
09:35jsabeaudry,(map Float. ["0.2" "0.4"])
09:35clojurebot#<CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: Float., compiling:(NO_SOURCE_PATH:0)>
09:35jsabeaudryWhy can't I do the second one?
09:37pauls_jsabeaudry: Isn't the first one a cast and the second an attempt at mapping a function?
09:37joegallojsabeaudry: Float. is not a normal clojure function. You could (map #(Float. %) ...) though.
09:37jsabeaudrypauls_, I thought the first one is a call to the constructor
09:38jsabeaudryjoegallo, Alright, I guess I'll do that, thanks for the pointer
09:39pauls_jsabeaudry: I would've thought so as well, but it's the only reason I can think of that it's not working, although joegallo has the best explanation so far
09:39jsabeaudryProbably there is some black magic involved regarding "functions" ending with "."
09:40jsabeaudryI'll blame the nasty java leaking through
09:41duck11231also that dot form is a macro of sorts, IIRC
09:42bitwalkerAh yeah that's it, the dot is a special form
09:45joegallo,(macroexpand-1 '(.getLong (Float. 1)))
09:46clojurebot(. (Float. 1) getLong)
09:46joegallo,(macroexpand '(Float. 1))
09:46clojurebot(new Float 1)
09:46clgv,(macroexpand-1 '(Float. 1))
09:46clojurebot(new Float 1)
09:46joegalloyup
09:46clgvlol^^
09:46jsabeaudryahhhh! the mystery is solved!
09:53clgv,(read-string "(Float. 1)")
09:53clojurebot(Float. 1)
09:54clgvok it's really a macro-like special form. could have been reader magic as well ;)
09:54jsabeaudry,(let [Popo. (fn [] (println "a"))] (Popo.))
09:55clojurebot#<CompilerException java.lang.IllegalArgumentException: Unable to resolve classname: Popo, compiling:(NO_SOURCE_PATH:0)>
09:55hyPiRion,(macroexpand-1 '(new Float 1))
09:55clojurebot(new Float 1)
09:55jsabeaudry,(let [Popo, (fn [] (println "a"))] (Popo,))
09:55clojurebota
09:55hyPiRion,((partial new Float) 1)
09:55clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: new in this context, compiling:(NO_SOURCE_PATH:0)>
09:55hyPiRionhurr.
09:55clgvnew is a special form
09:56clgv,(doc new)
09:56clojurebotI don't understand.
09:56clgv&(doc new)
09:56lazybot⇒ "Special: new; The args, if any, are evaluated from left to right, and\n passed to the constructor of the class named by Classname. The\n constructed object is returned."
09:58hyPiRion,(#(new Float %) 1)
09:58clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching ctor found for class java.lang.Float>
09:58hyPiRionCertainly is restrictive.
09:59gfredericks,(.floatValue 1)
09:59clojurebot1.0
09:59hyPiRion,(#(new Float %) 1.0)
09:59clojurebot1.0
09:59hyPiRionFigures.
10:01chouserIt is, but there the restriction isn't arbitrary. In order to generate efficient JVM bytecode, these things have to be known at the time the 'new' or '.' form is compiled
10:03clgv,(#(new Float ^Integer %) 1)
10:03clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: No matching ctor found for class java.lang.Float>
10:04clgv,(#(new Float ^String %) "1")
10:04clojurebot1.0
10:04hyPiRionclgv: There's no constructor for integers.
10:04clgvjust checked that ;)
10:14robermannAnyone here using CCW + Eclipse and doing "File->new->project-> Leiningen->Leiningen project" successfully?
10:14robermann(Eclipse "Juno")
10:22mytrilerobermann: I don't use Eclipse, but I've just created a lein project without a probelm
10:24robermannmytrile: in my setup Eclipse creates an empty "project"/directory - that is, without any "src"-like subfolders
10:25mytrilerobermann: I have Eclipse IDE for Java Developers and installed CCW through the market place
10:25robermannme too :) Are you using lein 2?
10:26clgvrobermann: CCW only uses lein2
10:28robermannI have a "Leiningen 2.0.0-preview8 on Java 1.7.0 Java HotSpot(TM) 64-Bit Server VM" version
10:28clgvIt worked some weeks ago with 0.9.0
10:30robermannDo you know if the CCW plugin calls the "lein" command in a subprocess? Because doing by command line "lein new myprj" works correctly.
10:30clgvrobermann: I think it uses lein as library
10:34clgvrobermann: though laurent mentioned something that it will look for the most recent installed leiningen. I dont know if it is already implemented like that
10:34robermannclgv: ok thanks
10:36achengwas Raynes kidding about LightTable failing to save files? or is this an issue that is hard-coded to affect only Raynes?
11:06duck11231Changelog: Detect when users is Raynes, disable saving. Raynes writes enough code as it is.
11:09nz-is there way to force fetching dependencies while lein repl? something like (fetch-deps [clojure/core.cache "0.0.2") (use 'clojure/core.cache') ... do stuff with core.cache
11:10clgvnz-: pomegranate can do something like that
11:11nz-clgv: thanks
11:20achengwell, i just tried LightTable. connected to an existing project that was managed with leiningen. was only able to see my project.clj file.
11:31clj_newb_2389298iis tehre somethign like "incanter in action" "the joy of incanter" or "programming incanter" ?
11:31clj_newb_2389298I so despearte need such a book I'd even be willing to pay for it rather than google for a pdf
11:32clgvclj_newb_2389298: nope. what do you struggle with?
11:32clj_newb_2389298clgv: nothing relaly, I just want a intense tutorial to pick up everything there is to know about incanter
11:32clj_newb_2389298rather than learn it bit by bit
11:33clgvthere are some blog entries on http://data-sorcery.org/ and clojuredocs is pretty useful as well
11:34clgvclj_newb_2389298: http://data-sorcery.org/contents/
11:35achengoh my LightTable issue might be a duplicate of #86 from solussd
11:35solussdacheng: yay! duplication!
11:35clj_newb_2389298http://incanter.org/docs/incanter-cheat-sheet.pdf
11:35clgvsolussd: I thought thats called reproducable ;)
11:35clj_newb_2389298is this all there is to incanter?
11:36solussdclgv: yay! the duplicatable issue is reproducable!
11:36clgvclj_newb_2389298: unlikely since that cheatsheet is from 2009
11:36solussdit means I'm not [necessarily] crazy
11:36achengyou have a point. i should file a ticket and then we can call it a duplicate
11:36clgvsolussd: where are those tickets listed?
11:37solussdlighttable github page
11:37solussdhttps://github.com/Kodowa/Light-Table-Playground/issues?state=open
11:40achengs/reproducable/reproducible
11:41achengi've added a comment to your ticket to say it's real
11:42clgvoh its on github now ^^
11:45achengXSD XML validation... should i just use javax.xml.validation or is there a clojure way?
11:48garjolagood morning
11:49garjolaI am migrating a project from lein1 to lein2 and I don't know how to update the line containing ":hooks [leiningen.hooks.classpath]". Any idea?
11:49duck11231acheng: I doubt there is anything in clojure that's going to compete with the native java version
11:51achengduck11231: makes sense. sheer number of iterations and usage
11:51achengduck11231: OTOH there's plenty of clojure improvements in other domains
11:54achenggarjola: isn't there a tool that takes an old project.clj and produces a new one for lein2?
11:55garjolaacheng: yes, lein precate. I have use that, but there is still one bit missing.
11:55garjolaI used to use (robert.hooke/add-hook #'leiningen.classpath/get-classpath
11:55garjola (fn [get-classpath project]
11:55garjola (conj (get-classpath project)
11:55garjola my-class-path)))
11:56garjolato set the classpath with a hook in project.clj
11:56achenggarjola: i have :profiles {:dev {:dependencies [[robert/hooke "1.1.2"]]}}
11:56achenggarjola: is that related?
11:58garjolaacheng: I have the same here, but I if I keep the line :hooks [leiningen.hooks.classpath] and run lein deps I get Error: cannot resolve leiningen.hooks.classpath hook
11:59garjolaand that did work with lein1
11:59achenggarjola: is that line necessary? i remember dropping something when i migrated.
12:00garjolaacheng: I need it since in leiningen/hooks/classpath.clj I have the definition of the classpath I need
12:01garjolaI guess lein2 uses hooks differently, but I don't understand what happens
12:01achenggarjola: i have the same file so i can point to sqljdbc4.jar...
12:02achenggarjola: and i have no :hooks in my project.clj
12:02garjolaacheng: and how is this file found by leiningen?
12:02achenggarjola: granted, i do have exceptions when i start connecting to my DBs but it still works. :-P
12:03achenggarjola: i wonder if it is even used. i have an entry in :dependencies for [com.microsoft.sqlserver/sqljdbc4 "4.0"] ...
12:04garjolaacheng: I guess that it is not used, but in my case I need to add some local jars to the classpath
12:08achenggarjola: can you "deploy" them locally to your repository as a resource that can be named under :dependencies ?
12:08garjolaI have just seen that there's a #leiningen channel. I am going to ask there. Thanks acheng!
12:35gtrakwhat the heck does this mean? Class clojure.core$bean$fn__5177$fn__5178 can not access a member of class org.apache.hadoop.fs.RawLocalFileSystem$RawLocalFileStatus with modifiers "public"
12:35BronsaMMM
12:36BronsaI can't get rid of a reflection warning even type-hinting
12:36Bronsahttp://sprunge.us/QIFL what am I doing wrong?
12:36nDuffgtrak: ...so, I have a ticket and patch for that, if it is what I'm thinking...
12:37nDuffgtrak: See http://dev.clojure.org/jira/browse/CLJ-978
12:37gtrakhmm, looks like it's an inner class that extends a public class
12:37nDuff*nod*.
12:38nDuffSee the patch; you can easily enough just make your own my-bean that has it applied.
12:39nDuff(could you vote for it by the way? I'd _hope_, at least, that JIRA votes have some kind of effect in prioritizing fixes to actually be reviewed and merged)
12:39gtrakvoted :-)
12:39chouserBronsa: do you mean .poll ?
12:40Bronsachouser: i just noticed
12:40Bronsadamn.
12:40Bronsathanks :)
12:40chouser:-)
12:42gtraknDuff: this is why I ask things
12:44chouserrawlocalfilestatus does not appear to be public
12:46gtrakits superclass is indeed public, FileStatus
12:47chouserah, and the class it extends is public, so calling the parent class's method would work?
12:48gtrakyea
12:50TimMcI believe this is one of those things that Checkstyle yells about: Classes whose instances are available at a higher visibility level via an API.
12:54gtrakif only java had default copy constructors...
12:54gtrakI could just slice it and bean that
12:56nDuffchouser: Exactly -- that's what the patch I have attached to the ticket _does_ in the case.
12:56nDuffTimMc: ...and it's a very valid complaint (forces an unreasonably slow codepath), but at the same time, bean _is_ mostly intended to allow inspection of objects from 3rd-party code, and 3rd-party code not behaving well is something of a fact of life.
12:57chousernDuff: and proxy depends on this to work correctly in some cases?
12:57nDuffchouser: ...well, proxy would need it to work correctly in those cases, yes; as gtrak discovered, it presently just fails.
12:57nDuffchouser: ...notably, the same approach is taken by the introspection API in Apache Commons
12:57gtrakis there a simpler way to generate the getter calls from keywords?
12:58gtrakI feel like I've seen such a macro somewhere
13:06technomancyyay, nrepl.el release
13:11SegFaultAX|work2Good morning.
13:20gtraknDuff: that bean patch works for me
13:20gtrak(inc nDuff)
13:20lazybot⇒ 2
13:20gtrak(dec java)
13:20lazybot⇒ -1
13:22emezeskeWhoa, I can cast judgement on programming languages? Awesome.
13:22emezeske(dec java)
13:22lazybot⇒ -2
13:22emezeske(inc clojure)
13:22lazybot⇒ 6
13:23S11001001(dec java)
13:23lazybot⇒ -3
13:24scriptor(inc php)
13:24lazybot⇒ 1
13:24_nmmn(dec java)
13:24lazybot⇒ -4
13:24SegFaultAX|work2(inc python)
13:24lazybot⇒ 1
13:25_nmmn(inc erlang)
13:25lazybot⇒ 1
13:25S11001001(dec lazybot)
13:25lazybot⇒ 5
13:25SegFaultAX|work2(inc haskell)
13:25lazybot⇒ 1
13:25mattmoss(inc befunge)
13:25lazybot⇒ 1
13:26SegFaultAX|work2(inc brainfuck)
13:26lazybot⇒ 1
13:26SegFaultAX|work2Wait, huh? :)
13:26mattmosslol
13:28emezeske(dec php)
13:28lazybot⇒ 0
13:28scriptorheh
13:28emezeskescriptor: inc php? you madman!
13:28SegFaultAX|work2You monster.
13:29mattmossFiend!
13:29_fogus_php
13:30_fogus_,php
13:30clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: php in this context, compiling:(NO_SOURCE_PATH:0)>
13:30_fogus_how do I see php's score?
13:30hyPiRion$karma php
13:30lazybotphp has karma 0.
13:30_fogus_thanks
13:30mattmoss$karma clojure
13:30lazybotclojure has karma 6.
13:30hyPiRion(inc clojure)
13:30lazybot⇒ 7
13:30hyPiRion,'(inc clojure)
13:30vpetro$karma python
13:30lazybotpython has karma 1.
13:30mattmossSomehow, I expected it to be higher.
13:30clojurebot(inc clojure)
13:30lazybot⇒ 8
13:31_fogus_$karma scala
13:31lazybotscala has karma 0.
13:31vpetro$karma haskell
13:31lazybothaskell has karma 1.
13:31_fogus_$karma _fogus_
13:31lazybot_fogus_ has karma 0.
13:31mattmossWay to make bots have a conversation.
13:31mkyou can also message the bots privately
13:32hyPiRionmattmoss: lazybot have the ⇒ symbol, killing trampolines ;(
13:32mattmossWell, it's a one-way conversation. <insert sexist joke here>
13:32robermannclgv and others interested: FYI the issue with CCW and Eclipse Juno seems to be a bug. I followed up this: http://code.google.com/p/counterclockwise/issues/detail?id=396&amp;sort=-id
13:41muhoo(inc nrepl.el)
13:41lazybot⇒ 1
14:14brad`quit
14:22chousertechnomancy: Having trouble using a dep via checkouts that has a data_readers.clj in it.
14:23chouserI think the .jar and the symlink are both on the classpath, so clojure sees the data_readers.clj twice, complains about a conflict, and refuses to start.
14:23technomancychouser: yeah, that's a known bug in clojure
14:23chouseroh
14:23technomancyhttp://dev.clojure.org/jira/browse/CLJ-1034
14:23chousersure 'nuf
14:23technomancy"conflict"
14:23_fogus_chouser: what dep is causing the issue?
14:24chouser_fogus_: internal
14:24_fogus_k
14:24chouserwould it be silly for lein checkouts to remove the jar from the classpath?
14:25chouseroh, I bet it doesn't know which symlink goes with which jar
14:25technomancyyeah, it would be pretty complicated to work around from leiningen itself; would obviously rather see it fixed in Clojure =)
14:25_fogus_This must be what caused my experiments with core.contracts literals to explode Hudson
14:26firesofmayHey Can anyone tell me how would I run my tests written in clj-webdriver run in parallel?
14:26technomancygiven that the patch is already there
14:31hcumberdaleHi there ;)
14:33naeghi
14:35devinusi'm getting this stacktrace with the latest lein-ring
14:41gtrakwhy does the repl sometimes say 'Evaluation Aborted' and hide the exception? I've managed to work around it with this: (defmacro unhide-exception [& body] `(try (do ~@body) (catch Exception e# e#))). If I rethrow it, it'll also hide the exception.
14:43gfredericksgtrak: you can at least access the hidden exception with *e
14:44gtrakah, you're right
14:44gtrakhard to remember
14:44gtrakwhat's the difference though between things slime decides to show or not?
14:46metajackgtrak: i run into the same problem all the time. it seems that slime just gets into a wonky state. usually once it happens, it happens until i restart the repl
15:12achengi have a sqlkorma question at refheap.com/paste/4528
15:19achengah nevermind
15:21acheng(specified foreign key with :fk in case anyone wonders what my mistake was)
15:21RaynesAs a general rule, you don't figure it out yourself until you've asked a bunch of people and gotten no answer for 10 minutes.
15:21acheng(or rather what the fix was)
15:25achengRaynes: so the best way to help someone become awesome at figuring stuff out is to totally ignore them
15:25RaynesIn my experience. :P
15:25RaynesThat said, I don't follow my own rules. I would have answered you had I known anything about korma.
15:26m0smithor perhaps the effort of forming a problem into a question gets one thinking in the right direction
15:26achengi have something new to figure out. i probably will fail until i make it public.
15:26RaynesThus is life.
15:27m0smithany seesaw people about?
15:28achengm0smith: seesaw user
15:28achengm0smith: oh wait. i want you to be awesome too
15:28m0smithacheng: I am trying to understand the CSS-ish selectors
15:29m0smithQuestion that leads to awesomeness: Can I use a vector as an :id and still be able to select it using 'select'
15:29m0smith?
15:30jamesdoigare zookeeper or avout considered good ways to coordinate configuration over multiple instances of applications ?
15:30mattmossComment on this, plz. https://gist.github.com/3418356
15:31mattmossI may be doing stupid, non-functional things because I think in C++.
15:31achengm0smith: dunno. you could try it
15:32emezeskejamesdoig: Small amounts of config data is definitely one of the normal use cases for zookeeper.
15:32xeqidoes the new nrepl.el release tab complete namespaced functions?
15:33m0smithacheng: I will
15:33achengm0smith: sorry. i shouldn't have assumed you were not already awesome. you very well could be.
15:33m0smithAwesome is as awesome does -- Forest Gump
15:35nz-xeqi: yes
15:36xeqiblah, I get an exception
15:37xeqiwell, let me check a different project to make sure its not an nrepl-middleware issue
15:37nz-din't notice the namespaced part
15:38m0smithmattmoss: what are you trying to do? looks like some sort of pooling
15:38xeqihmm, works there.. must be a piggieback/nrepl-middleware issue
15:39xeqinz-: thanks for letting me know it was suppose to work :)
15:40mattmossm0smith: it is (or should be) a simple integer generator... for unique ids... will return a number in [0, limit] that hasn't already been used
15:40nz-well at least this works (require '(foo [bar :as bar])); ba<tab-complete>/my<tab-complete>
15:40emezeskemattmoss: You seem to already know that that code is not in a functional style -- what are you looking for?
15:40emezeskemattmoss: Suggestions on how to make it more functional?
15:41mattmossemezeske: Yeah... I feel like I'm over-"engineering" the problem.
15:42emezeskemattmoss: My general suggestion would be to write a pure function that takes as an argument the current pool state, and returns a new pool state
15:42emezeskemattmoss: Then to implement request-handle using that pure function.
15:42nz-xeqi: tab completing for example (java.util.ArrayList.) works, but you must each part of the name complete separately
15:43xeqinz-: thanks
15:44mattmossemezeske: I'll give that a shot... thanks for idea.
15:45emezeskemattmoss: Sure thing. That tends to be a common pattern for mutability in clojure -- pure functions for the logic, wrapped by functions that perform mutation.
15:48carlosgaldinocan someone explain to me why on the function `brother` it needs to add `fresh` or `all` so the function will behave as expected doing a logical AND between `sibling` and `male`
15:48carlosgaldinohere: https://gist.github.com/3219448
15:52SegFaultAX|work2carlosgaldino: More importantly, are you working with the lineage in Game of Thrones? :)
15:52xeqicarlosgaldino: defn returns the value of the last form. without fresh or all it would just be the last goal
15:52muhoohas anyone looked into replacing the janky xhr/xpc based cljs browser communication with websockets? it looks like google closure supports it
15:54carlosgaldinoxeqi: that was something that I thought but I wanted to be sure that core.logic didn't add any magic. that's cool
15:54carlosgaldinoSegFaultAX|work2: it was because of this: http://www.reddit.com/r/dailyprogrammer/comments/v3afh/6152012_challenge_65_intermediate/
15:54clojurebothttp://clojure.org is timeless.
15:54SegFaultAX|work2carlosgaldino: Yea, I tracked that down. Awesome!
15:55carlosgaldinoSegFaultAX|work2: but that's not my code. I'm trying to learn clojure and thought that would be good to start solving this problem of GoT
15:55naegwhat is the right way to call a function e.g. 4 times?
15:55dnolencarlosgaldino: xeqi is correct. core.logic doesn't redefine defn. There are some good reasons for a defg tho and that might come sometime in the future.
15:55xeqicarlosgaldino: yeah, defn comes from clojure; but core.logic does define defne/defna and such that act diffently
15:57xeqi(doc dotimes)
15:57clojurebot"([bindings & body]); bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1."
15:57carlosgaldinodnolen: xeqi awesome! thanks
15:58carlosgaldinodnolen: although I'm just a beginner in the clojure world, I think the defg would be nice to have.
15:58chouserdnolen: resist the urge as long as possible.
15:58chouser...is my opinion. :-)
15:59dnolencarlosgaldino: needs some thought, implicit defn + all is not a good enough reason.
15:59dnolenchouser: definitely :)
15:59dnolencarlosgaldino: being to able to properly visualize core.logic search trees is more compelling. When that gets sorted out we might see defg.
16:00mattmossemezeske: Improved version, methinks. https://gist.github.com/3418356
16:00chouserfunctions are the interfaces between components, and as long as I see "(defn foo [a b c] ...)' I know a lot about that interface. If I see "(my/defn foo [a b c] ...)" that could be anything, and I have to go learn about how "my" is *implemented* before even understanding how to *call* the thing.
16:00xeqioof, is there a flag to pass too `mvn install` so clojure will build with openjdk?
16:01Bronsa_is calling `hash` always the same as calling `.hashCode`?
16:02carlosgaldinodnolen: oh, ok. I get it. yeah, lots of implicit stuff going on is usually bad. I come from ruby/rails and lots of people have trouble with this kind of stuff
16:02Raynes$cd hash
16:02lazybotclojure.core/hash-set: http://clojuredocs.org/v/1538
16:02lazybotclojure.core/hash: http://clojuredocs.org/v/1824
16:02lazybotclojure.core/hash-combine: http://clojuredocs.org/v/1969
16:02scriptorBronsa_: it calls this: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Util.java#L113
16:02scriptor(hash) that is
16:02RaynesSo yes.
16:02Bronsa_mmm
16:02RaynesIt is the same as calling hashCode except that it handles nil.
16:03scriptorbrowsing the source is pretty easy for when you have implementation questions
16:03Bronsa_then why https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/ASeq.java#L63-83
16:03dnolenchouser: yep. it probably won't be defg - we already have defne, people are getting familiar with that.
16:03zerokarmaleftcarlosgaldino: yea, i wrote that gist back when i had the only read the first couple chapters of TRS and Bratko's book
16:03Bronsa_what's the point of hasheq then?
16:05carlosgaldinozerokarmaleft: do you say this about both comments I left on it?
16:06carlosgaldinozerokarmaleft: but it's good. I never wrote anything on clojure and started with that problem because I saw your solution.
16:07zerokarmaleftcarlosgaldino: that should work
16:07emezeskemattmoss: That's definitely cleaner!
16:08emezeskemattmoss: A minor nit is that I would probably pass @pool to unique-handle instead of pool
16:09mattmossemezeske: Ya, good call.
16:10zerokarmaleftcarlosgaldino: heh, yea i see i created some logical variables for some of those relations for no reason
16:10mattmossemezeske: Thanks for the comments!
16:14zerokarmaleftwow, github blew up
16:14scriptorit did?
16:15Bronsa_uea
16:15emezeskemattmoss: No prob.
16:15Bronsa_yeah*
16:15scriptorhuh, loading fine for me...
16:15scriptorbut I saw the status blog
16:16algernonthe header on the status blog is nicely blinking red and green.
16:18scriptorah, it's back
16:19achengflowers for algernon
16:21RaynesYour observational skills amaze me.
16:23achengkorma question: if i use "has-one", and then do a query using "with" any duplicate column names get suffixed with "_2" ... the docs say to use "has-many" insetad and the children will come along in a collection. except when i make that single change, my collection comes back empty. why?
16:26achengRaynes: i'm getting ignored. but i don't think i'm getting any more awesome.
16:28mmitchellis there a clojure.core function for inverting a map?
16:28Bronsa_maps are not ordered
16:28mmitchellBronsa_: I mean a transformation like: {:id 1} => {1 :id}
16:28dnolen_acheng: http://groups.google.com/group/sqlkorma
16:29gfredericks,((fn invert-map [m] (zipmap (vals m) (keys m))) {:id 1 :foo 398})
16:29clojurebot{1 :id, 398 :foo}
16:29trptcolin,(doc clojure.set/map-invert)
16:29clojurebotTitim gan ?ir? ort.
16:29dnolen_mmitchell: clojure.set/map-invert
16:29achengdnolen_: thanks
16:29mmitchellthere we go
16:29mmitchellthanks
16:30gfrederickswhy on earth is that in clojure.set?
16:33dnolen_gfredericks: because it's used by clojure.set/join?
16:34technomancyexposing something like that for general use strikes me as non-clojurey given how hard clojure tries to keep you from doing things that will cause you O(n) grief
16:35trptcolineven beyond algorithmic complexity, what are the guarantees when you invert something like {:a 1 :b 2 :c 1}
16:36gfredericksit'll be dependent on the map seq ordering
16:36gfredericksi.e. you don't want to depend on it
16:36trptcolinwell yeah :)
16:36gfredericksI agree it's a bit weird that it exists
16:38ozzloyanyone in here going to this: http://www.meetup.com/ClojureDC/events/76541552/ ?
16:38Cr8I've on occasion actually wanted that, but more often than not I want to actually so something sane when I've got {:a 1 :b 2 :c 1}
16:38Cr8*do
16:40aperiodicif you didn't want to depend on consistent ordering for the keys & vals fns, you could do (into {} (for [[k v] m] [v k]))
16:41Cr8that clobbers dupicate keys though
16:41xeqiI hate version ranges :/
16:42aperiodicoh, good call
16:44Cr8,(apply (partial merge-with into) (map (fn [[k v]] {v #{k}}) {:a 1 :b 2 :c 1}))
16:44clojurebot{2 #{:b}, 1 #{:a :c}}
16:44Cr8probably a better way to do that.
16:45Cr8but it is at least reversible
16:46hiredman,(group-by val {:a 1 :b 2 :c 2})
16:46clojurebot{1 [[:a 1]], 2 [[:c 2] [:b 2]]}
16:47Cr8there we go
16:56naegsomeone using IntelliJ IDEA with the clojure plugin?
16:57zaargyeveryone uses emacs. hth.
16:57naegI don't like emacs :S and I don't really like eclipse either
16:58naeg(even though I never tried it out with clojure)
16:58scriptorhow long did you try emacs for?
16:59naegcouple of months, because I had to
16:59naeg(VIM guy)
16:59djanatynIs penumbra the best library for making 2D games in clojure right now?
16:59brainproxyprotip: never send enilve some html that has a <legend> tag nested inside a <form> tag, but not also inside a <fieldset> tag ... weird things happen
16:59djanatynI've never used OpenGL before; I'm used to SDL and SDL wrappers like pygame.
16:59scriptornaeg: tried vimclojure?
17:00djanatynAre there any libraries more like SDL?
17:00dnolen_djanatyn: could probably be useful for making games, but mostly focuses on wrapping LWJGL.
17:00naegscriptor: not yet, still looking around. by now considering vimclojure, eclipse + ccw and intellij with clojure plugin
17:01brainproxynaeg: did you look into prelude for emacs? it helped make my experience and transition smoother
17:02brainproxydnolen_: looking forward to the core.logic unsession
17:02brainproxy:)
17:02naegto be honest, I don't even want to get used to using emacs :/
17:02naegbeat me to it, I'll consider emacs too
17:03dnolen_brainproxy: yeah! should be fun. hopefully will make core.logic seem considerably less "magical"
17:03scriptornaeg: I'm a vim guy too, but emacs hasn't been too hard to learn
17:04naegscriptor: I'm not scared of learning it, I rather fear that I won't like it
17:05brainproxynaeg: i'm another convert from vim/macvim to emacs
17:05brainproxyit wasn't easy at first, I wondered if I would end up hating it
17:05scriptorheh, I still use both
17:06naegcurrently I'm trying out stuff with the new light table playground
17:06naegthat's OK for me while learning, ocassionally doing something "bigger" like conways
17:56technomancyprotip: you want vary-meta, not with-meta.
17:58dnolen_technomancy: sounds like kibit rule worth adding
18:14technomancyI'm boycotting kibit until they fix the when bug =\
18:15RaynesI need to integrate kibit with the refheaps.
18:15RaynesKiller feature, anybody?
18:15emezesketechnomancy: Is the "when bug" the "use when instead of if for single clause" thing?
18:15technomancyemezeske: yeah: https://github.com/jonase/kibit/issues/2
18:16emezesketechnomancy: :)
18:16emezeskeO_o rather
18:18Raynestechnomancy: I don't think I understand your fascination with single branch ifs.
18:19RaynesIt's silly to associate ifs with return values when you can just as easily need to perform side effects in if branches as well.
18:19technomancyobviously if is the more general form
18:19technomancyit can be used either functionally or side-effectily.
18:19technomancywhen, on the other hand, is more specific
18:20casionRaynes: isn't this about encouraging idiomatic code though?
18:20casionusing 'when' would be more explicit in some cases
18:20RaynesI don't think what he is against is unidiomatic.
18:21technomancyI'm not against using if for side-effects, I'm against using when for return values.
18:21technomancybecause when is a more specific construct than if
18:21RaynesI realize.
18:21technomancyI'm also against using and for side-effects
18:21RaynesBut I don't think you have a good argument.
18:21technomancythe parallel isn't between when and if, it's between when and and
18:22technomancymaybe people get confused because cond is a still more general form, and cond *is* about the number of branches
18:25technomancyanyway, this isn't even specific to clojure; it's a lisp tradition that goes years back.
18:25technomancyand having clojure code that's less concerned than CL about separating side-effects vs return values is just wrong.
18:37SegFaultAX|work2Is cond usually defined in terms of if or vice versa? Does it matter?
18:37amalloyi don't think it matters
18:37technomancyI think in the original lisp cond was the special form, but in Clojure it's if.
18:37Bronsaafaik cond is defined in terms of if
18:38SegFaultAX|work2It /seems/ like it'd be easier to implement if in terms of cond.
18:38SegFaultAX|work2Since cond is much more general.
18:39hyPiRionCond is like if, 
18:39saurikSegFaultAX|work2: its just nested ifs, so to the extent to which "easier" matters, it isn't that hard either way: (cond a b c d :else e) (if a b (if c d e))
18:40SegFaultAX|work2saurik: Right. I'm just wondering which is traditionally implemented as a special form. As technomancy said earlier, in Clojure it's `if`
18:40hyPiRion^^ what I live by.
18:40SegFaultAX|work2saurik: But you're right (and that's my point): once you have one form the other is trivial.
18:40sauriksure, I was just responding to the "/seems/ like it'd be easier to implement" comment.
18:41SegFaultAX|work2saurik: Well, the if version requires nesting of forms. The cond form doesn't.
18:41SegFaultAX|work2Which is why I said it seemed simpler.
18:41SegFaultAX|work2In the end it doesn't matter. Just a general query. :)
18:42hyPiRionWell, really, they are both equivalent.
18:43SegFaultAX|work2In CL, cond is the special form, no?
18:44hyPiRionSegFaultAX|work2: True
18:44SegFaultAX|work2Does the Scheme standard dictate that detail?
18:44jballancanyone available to help troubleshoot an issue with some reducers?
18:44hyPiRionBut it doesn't really matter - you can create one given the other via macros.
18:44amalloy~anyone
18:44clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
18:45jballanc:)
18:45jballancI just figured reducers were obscure enough at this point it might help to pre-ask
18:46saurikSegFaultAX|work2: in clisp if is a special form and cond is a macro
18:46jballancso I have a simple scrabble solver that brute-forces its way through the dictionary
18:46jballanchere's the core: https://github.com/jballanc/scrabbler/blob/master/src/scrabbler/bruteforce.clj
18:46hyPiRionjballanc: Just fire off the problem :)
18:46saurik[29]> (macroexpand '(cond (true 0)))
18:46saurik(IF TRUE 0 NIL) ;
18:47hyPiRion,(macroexpand-1 '(cond (true 0)))
18:47clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: cond requires an even number of forms>
18:47jballancbut if I change line #23 to "fold" instead of "reduce", I keep getting a PersistentHashMap cannot be cast to IFn error
18:47saurikhyPiRion: clojure has different cond syntax
18:47hyPiRion,(macroexpand-1 '(cond true 0))
18:47clojurebot(if true 0 (clojure.core/cond))
18:48jballancthe backtrace points to here: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj#L48
18:49jballancbut I can't figure out how my map got inside the call to fjinvoke
18:50jballancthe backtrace: https://gist.github.com/3420099
18:56jballancoh wait...is this a bug? https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/PersistentHashMap.java#L197
18:56jballancwait...nevermind...root is not a map
19:10jballancoh wait...ok, I think I see it
19:10jballancso, it seems you can't "fold" inside of a function that's going to be "folded"
19:10jballancthis line: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core/reducers.clj#L47
19:11jballanc^ that *should* evaluate to false when I do my initial fold...but since I'm folding inside of a fold, I'm inside of the outer fold's ForkJoinPool
19:11jballancand it evaluates to true instead
19:11jballanchmm...
19:22arohner_is there a built in fn that returns (defn ??? [f seq] [(filter f seq) (filter (not f) seq)])?
19:22technomancyarohner_: (juxt filter remove)
19:22amalloy(juxt filter remove)
19:22arohner_oh, very nice
19:22technomancyamalloy: too slow bro
19:23emezesketechnomancy vs amalloy quick draw duel
19:23technomancyemezeske: it's the dvorak
19:23amalloy,(println "(dec amalloy)")
19:23clojurebot(dec amalloy)
19:23lazybot⇒ 26
19:23emezesketechnomancy: hahaha
19:24amalloytechnomancy: i was struggling with whether to mention contrib/separate, or the version in useful
19:24emezeskeamalloy: seppuku, huh?
19:25technomancyindecision; it gets you every time
19:25amalloyclojurebot: separate is (juxt filter remove)
19:25clojurebotAck. Ack.
19:25amalloyshortcut for next time this gets asked!
19:25technomancyamalloy: but as you know, juxt is supposedly a terrible thing for teaching OOP programmers
19:25amalloyis it?
19:26technomancyhttps://mobile.twitter.com/marick/status/234456740031254528
19:26technomancywho knew, right?
19:26amalloyi stopped following marick a while ago: too much noise
19:29jballanclooks like I need to find a printer...and international postage
19:29emezeskeI've had people tell me I'm a jerk for suggesting juxt to newbs before
19:30amalloy~juxt
19:30clojurebotjuxt is a little hard to grok but it's the best thing ever
19:30emezeskeApparently everyone assumes newcomers are incapable of learning?
19:30amalloyobviously. otherwise they'd already know everything
19:30emezeskewhoa
19:30emezeskeI just saw a tear in spacetime for a second
19:31hyPiRion~separate
19:31clojurebotseparate is in clojure.contrib.seq-utils, but just use (juxt filter remove) instead
19:31technomancy~botsnack
19:31clojurebotThanks! Can I have chocolate next time
19:31hyPiRionsweet.
19:31hyPiRion~chocolate
19:31clojurebotCool story bro.
19:31amalloyoh haha, i think i taught him that one too. now i feel silly for teaching him the new one
19:32amalloyclojurebot: forget separate |is| (juxt filter remove)
19:32clojurebotI forgot that separate is (juxt filter remove)
19:32hyPiRionhah
19:32hyPiRion~separate
19:32clojurebotseparate is in clojure.contrib.seq-utils, but just use (juxt filter remove) instead
19:32hyPiRionwell, clojurebot is an elephant apparently.
19:34jballancanyone know if it's possible to join clojure-dev without signing a contributor agreement?
19:34emezeskejballanc: Don't think so.
19:34SegFaultAX|work2How can I write this better?
19:34SegFaultAX|work2,((fn [& rest] (->> rest (apply map vector) (apply concat) (apply hash-map))) [:a :b :c] [1 2 3])
19:35clojurebot{:a 1, :c 3, :b 2}
19:35hyPiRionjballanc: I think the CA is rather okay to write
19:35jballancnot worried about writing it
19:35hyPiRion,(zipmap [:a :b :c] [1 2 3])
19:35clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ?? in this context, compiling:(NO_SOURCE_PATH:0)>
19:35SegFaultAX|work2hyPiRion: Can't use zipmap
19:35SegFaultAX|work2hyPiRion: (4clojure)
19:36jballancworried about the 2 weeks the post would take to get from me to NC
19:36hyPiRionAh.
19:36SegFaultAX|work2Should have specified that in my initial problem statement.
19:36muhoothis is a subliminal message. cljs browser repl over websockets. this has been a subliminal message.
19:37jballancno chance of an electronic CA submission?
19:37hyPiRion(->> (interleave [:a :b :c] [1 2 3])) (partition 2) (into {}))
19:37hyPiRion,(->> (interleave [:a :b :c] [1 2 3])) (partition 2) (into {}))
19:37clojurebot#<ExecutionException java.util.concurrent.ExecutionException: clojure.lang.ArityException: Wrong number of args (1) passed to: core$--GT>
19:37technomancyjballanc: it's been suggested before, but apparently to deaf ears
19:37hyPiRionh
19:37jballanc:(
19:37technomancyscala's CA is submitted via github oauth
19:38hyPiRionOh.
19:38BronsaMy CA took 1 month to get to NC
19:38emezeskeFor my most recent job, ALL of my paperwork was electronic, NDA, employment agreement, everything
19:38emezeskeYou'd think that the CA could be too :(
19:38technomancymuhoo: how about a cljs repl over regular sockets?
19:39technomancymuhoo: trying to get a repl in gjs was a complete mess
19:39jballancwell, between finding a printer and time for the post, I think at this point I'd be better off hand delivering it at the Conj
19:39technomancyjballanc: clojure isn't exactly well-known for being welcoming to potential contributors, unfortunately
19:41hyPiRiontechnomancy: Is there anything else, apart from the CA, that hinders new people from contributing?
19:43technomancyhyPiRion: sure, the refusal to accept pull requests, the insistence that everything go through jira, and the fact that it takes ages for submitted patches to get attention.
19:44technomancyeven among regular contributors the workflows and policies around jira aren't understood.
19:44hyPiRionHm.
19:45saurik,(apply hash-map (interleave [:a :b :c] [1 2 3]))
19:45clojurebot{:a 1, :c 3, :b 2}
19:46saurik,((comp (partial apply hash-map) interleave) [:a :b :c] [1 2 3])
19:46clojurebot{:a 1, :c 3, :b 2}
19:48saurikSegFaultAX|work2: ^ (in case you otherwise might miss it when you get back)
19:49SegFaultAX|work2saurik: Actually that's pretty close to what I came up with in the end.
19:49SegFaultAX|work2saurik: I ended up replacing [& rest] with [keys vals], then interleave + apply hash-map.
19:49SegFaultAX|work2saurik: I just didn't consider at first that it doesn't make sense to supply more than 2 seqs to this function.
19:55amalloy&(into {} (map vector [:a :b :c] [1 2 3])) ;; another option
19:55lazybot⇒ {:a 1, :b 2, :c 3}
19:56hyPiRion,(= (map vector [:a :b :c] [1 2 3]) (partition 2 (interleave [:a :b :c ] [1 2 3])))
19:56clojurebottrue
19:56hyPiRion,(into {} (partition 2 (interleave [:a :b :c ] [1 2 3])))
19:56clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry>
19:56hyPiRionhurr.
19:56saurik,(= '(1) [1])
19:56clojurebottrue
19:56saurikhyPiRion: into {} needs to take a vector, partition returns a list
19:56hyPiRionDo the entries have to be vectors?
19:57SegFaultAX|work2What about this group-by alternative? https://www.refheap.com/paste/4536
19:57hyPiRionso ##(into {} (list 1 2)) will fail.
19:57lazybotjava.lang.RuntimeException: Unable to resolve symbol:   in this context
19:57amalloyhyPiRion: yes; you can conj a vector-pair onto a map, but not a list-pair
19:57hyPiRionso ##(into {} (list 1 2)) will fail.
19:57lazybotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long
19:58amalloysaurik: into {} takes any kind of seq; the values *within* the seq need to be vectors
19:58amalloy&(into {} (map vec (partition 2 (interleave [:a :b :c ] [1 2 3]))))
19:58lazybot⇒ {:a 1, :b 2, :c 3}
19:58muhootechnomancy: i was thinking of the communication berween
19:58Bronsawhy does it have to be a vector?
19:58hyPiRion,(into {} (list (list 1 2)))
19:58clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.Map$Entry>
19:58amalloythis is because of some grossness in clojure's implementation of conj
19:58muhoothe compiler/repl and the browser
19:58sauriksorry, correct. I realized that after I said it, but didn't believe it would be important until I saw how hyPiRion interpreted it
19:59kennethhey, can you make a macro that will expand `hello` to `(println "hello world")` for example?
19:59muhootechnomancy: websockets vs. xhr posts
19:59technomancymuhoo: yeah, I was just surprised how difficult it was to get a basic repl going even in an environment that wasn't subject to all the crazy sandboxing that a browser has to deal with
20:00technomancyespecially vs how easy a socket-repl is to implement in Clojure
20:00technomancyall the existing tooling I could find assumes a browser
20:00technomancyanyway, it looked hard, so I wandered off
20:01muhooit's something i could do in a couple weeks or months work, buht probably you, cemerick, and emezeske could do in like a day
20:02technomancynah; I'm in way over my head when it comes to JS runtimes
20:02muhoothe js isn't the hard part, just the messy part
20:02technomancywell, learning a new runtime is always hard
20:02emezeskemuhoo: Haha, I can't speak for cemerick, but I think you are vastly overestimating my abilities :)
20:03technomancymuch harder than learning a new language
20:03saurikkenneth: the closest you can get to a symbol macro is something like with-symbol-macros (which you then have to wrap around your code, as it relies on manually doing a code walk) https://github.com/clojure/tools.macro/
20:05kennethsaurik: hmm… i see, that won't do for my intended use case (adding tools to the repl that don't require parens)
20:06kennethsaurik: btw, are you the same saurik that hacks iPhone?
20:06saurikyes
20:06kennethcool stuff!
20:07muhooi distinguish "hard" from "complicated". some things are not taxing of reasoning and thinking, only of memory and patience to understand the brokenness. other things are just cognitively hard to grasp.
20:11kennethmuhoo: doing twenty pull ups is not complicated, but pretty hard :)
20:17xeqitechnomancy: have you seen piggieback? or are you meaning more like cli calling V8/node/whatever?
20:18technomancyxeqi: I was trying to embed it in gjs, the JS engine used by gnome3
20:18technomancypiggieback is specific to the browser repl, right?
20:18technomancycurrently anyway?
20:18xeqiit had the rhino engine first
20:18xeqibut the browser repl pretty much dropped in
20:18technomancyoh, huh
20:19technomancywell I also lost interest due to realizing that I didn't really want much out of gnome3 that xmonad didn't already provide =)
20:19xeqibut I'm not sure how much it would help for ne wruntimes like that
20:19xeqihaha
20:19xeqiI've been interested in the lein-gnome thing, but have the same problem
20:20technomancyyeah, I want to run a dynamic clojurescript-powered desktop, it's just so much work compared to xmonad where everything is already perfect =)
20:20xeqignome2 + xmonad works well as a local maximum, and I don't feel like making a large jump
20:43gfredericksclojurescript isn't very dynamic
20:49xeqigfredericks: ?
20:53gfredericksxeqi: I just thought technomancy's comment was interesting since cljs isn't dynamic
20:53xeqiwhat do you mean by "dynamic"?
20:54gfrederickswell you should probably have eval for one
20:55eggsbyguys how do I use clojurescript to build a decently simple web app without using noir and a boatload of js interop?
20:55gfrederickseffort?
20:55xeqiah, as in running without the jvm based compiler portion
20:56gfredericksxeqi: right
20:56eggsbygfredericks: I played with clojurescript this weekend, all the pinot stuff seemed to only work if you used it with noir, the only other option was to use the google closure calls via js interop, is there a way I'm missing?
20:56xeqieggsby: have you seen jayq?
20:56emezeskeeggsby: jayq
20:57emezeskeeggsby: But in general, even if you use something like jayq or domina or enfocus or something, expect to do some interop
20:58eggsbywhat is "(def $interface ($ :#interface))
20:58eggsbydoing
20:58eggsbyspecifically the :#interface bit
20:59gfredericksI expect that's like $("#interface") in JS
20:59gfredericks:#interface is just a keyword
20:59eggsbyaaaah got confused, thought it was some sort of type hint style thing... derp
20:59eggsby:)
21:01eggsbyI'll try jayq, thanks xeqi gfredericks
21:02aperiodiceggsby: have you checked out C2? the todoMVC demo is pretty nice: https://github.com/lynaghk/c2-demos/tree/master/todoMVC
21:03eggsbyI've read about c2 aperiodic but I haven't used it... the idea of just tying data structures to the dom is nice
21:03aperiodiceggsby: yeah, it's quite pleasant to not have to be mucking about with the DOM yourself
21:09eggsbydang I didn't even realize that cljs supported atoms... thanks for this demo aperiodic
21:34Kowboyclj-http or http.async.client?
21:43frioi haven't used http.async.client, but ive found clj-http unfailingly excellent
22:28Rayneshttp://langref.org/clojure/unsolved Is it just me, or this website completely blown to crap when you scroll down?
22:30francisits not just you
22:30llasramLooks like poor escaping practices + spam fun times to me
22:30alpheusI would like to use java.nio.file.Files, which I think only comes with Java SE 7u6. Should that work OK with Clojure 1.4?
22:31francisHas anyone gotten up and running with lein2 lately and run into an EOF error?
22:31RaynesIIRC, Clojure is tested against Java 7.
22:31Raynes(along with several other java versions)
22:33alpheusMy need for java.nio.file.Files is creating "hard" links on a Unix filesystem. Is there another way of doing this that I've missed?
22:34francisduh, nevermind - don't have java installed
22:36samfloresHi, folks. Noob question: is there a way to preload my project so clojure.test doesn't suffer the jvm start up time in every single run?
22:38brehautlein interactive ?
22:38brehautint for short
22:38brehautwell, lein int
22:39samfloresis it a plugin?
22:39brehautno
22:39brehautwait, you are using lein right?
22:40samfloresyep :) I'm just stating to learn Clojure and I'm running tests with lein test
22:40xeqilein interactive is lein1 only
22:40brehautoh
22:40brehautmy bad
22:40samfloresoh, that's why I can't find it
22:41xeqiunfortunatly there isn't anything that will quicken `lein test`
22:41samfloresthat's sad
22:41xeqithere are some thoughts on having a background jvm, possibly with jark, but no action that way yet
22:41xeqiI use a repl when wanting to run them quickly
22:43wmealing_samflores: check out midje lazytest for some awesome
22:45xeqiusing preview8 and lein-cljsbuild together I'm getting https://www.refheap.com/paste/4540
22:46samfloreswmealing_: I'll take a look. thanks
22:56emezeskexeqi: I think the latest Leiningen 2 preview changed something backwards-incompatibly
22:56xeqiyeah, I figured it was gonna require a cljsbuild update
22:56emezeskexeqi: There's already an issue open; I need to test it against the latest Leiningen 2 preview and bring it up to date
23:17xeqiis there a good app for clojurescript demos?
23:17xeqi* to use for
23:29dhmxeqi: take a look at http://clojurescriptone.com/
23:33xeqiheh, I suppose I should have expected that
23:43cjfriszDid the way records are imported change in the latest 1.5.0 alpha?
23:44cjfriszI suddenly had code break when I did it the old way
23:45cjfriszAs in, I required the namespace and then imported the record types
23:45cjfriszNow I can't compile unless I take the require out and just do the import directly
23:57grizlo42why can't i load the json api in my repl?
23:57grizlo42FileNotFoundException Could not locate clojure/data/json__init.class or clojure/data/json.clj on classpath: clojure.lang.RT.load (RT.java:432)
23:58xeqihow are you starting your repl?
23:59grizlo42java -cp ~/applications/clojure-1.4.0/clojure-1.4.0.jar clojure.main
23:59xeqiclojure.data.json is a seperate jar