#clojure log - Sep 08 2013

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:00 callen: akurilin: and yes it has been solved.

0:01 akurilin: callen, I think one feature I was looking for was looking at a map of parameters and building a query from that. So for example, if :limit is nil, omit that part of the query altogether instead of having me manually write a (when)

0:01 callen: devn: disillusioned eh?

0:02 akurilin: if you want to build queries from maps, use the fn* counterparts to the macros in Korma.

0:02 akurilin: you don't, strictly speaking, have to use the macros at all.

0:02 ArthurZ: Took a look at Korma, it's an ORM

0:02 callen: internally Korma queries are just maps.

0:02 ArthurZ: it's not an ORM.

0:03 it's a SQL abstraction library.

0:03 there are no objects or object state involved as far as what people typically use an ORM for.

0:03 ArthurZ: Then what ORM is?

0:04 Entity Framework like but still

0:04 akurilin: ArthurZ, amusingly, about two years ago I made the same statement at a clojure meetup, and people politely corrected me.

0:04 callen: ArthurZ: not really @ Entity Framework. you're misunderstanding the wording used.

0:04 ArthurZ: Does Korma allow DDL?

0:05 callen: ArthurZ: you don't really have a frame of reference for understanding what it is, so it's best not to conjecture based on one or two pages of skimmed documentation.

0:05 but suffice it to say, it's for interacting with SQL databases in terms of SQL.

0:05 akurilin: callen, OK let me look for those. If I could solve the boilerplate and DRY problem in my DAL, my life would be significantly more pleasant.

0:06 ArthurZ: Aha, yes, if it is using SQL it is not the ORM

0:06 callen: akurilin: just try to be a wee bit patient, the * fns weren't originally intended for "human consumption" - that having been said, I find them more pleasant than using c.j.j

0:06 because again...it's just maps.

0:07 akurilin: callen, korma has no row and column "callbacks" does it? I have the habit to transform underscores into dashes once the data is back in Clojure and clojure.jdbc handles that case pretty well.

0:08 (same with casting known column names to something else like joda time)

0:08 gws: akurilin: i think korma has prepare / transform

0:08 ArthurZ: A closer look reveals Korma is akin LINQ

0:09 callen: 'ish. not quite as explicitly monadic but there's still a contextualization.

0:09 akurilin: gws, fair enough, that seems to do the trick

0:11 ddellacosta: so, I'm a bit confused by nrepl.el. When I startup up a repl via jack-in, it won't pick up on namespaces from the project in the current directory? Is there a way to set it up to do that, or is the proper way to start up a separate repl in the project dir and connect to that?

0:12 akurilin: Hm since you guys are trying to convert me back to korma, how's support for db-specific data types? I remember arrays being not supported outside of gfredericks' fork of korma, but I'm not using those anymore. What about simpler custom types like IP addresses and UUIDs?

0:12 ddellacosta: the latter works well enough, but I don't see why I can't access namespaces in the cwd by default. Hrm.

0:13 callen: ddellacosta: I'd recommend doing it the "proper" way

0:13 SegFaultAX: This song has been stuck in my head for like 20 hours straight...

0:14 ddellacosta: callen: which is...?

0:14 callen: SegFaultAX: http://www.youtube.com/watch?v=urNyg1ftMIU cure what ails ya

0:14 ddellacosta: lein repl in terminal, connect to the port explicitly with M-x nrepl

0:14 ddellacosta: callen: okay, thanks

0:14 callen: ddellacosta: the reason for doing that isn't just do things work - other tooling needs it too.

0:14 like...grench.

0:15 ddellacosta: callen: ah, okay--thanks for the explanation.

0:15 callen: IMHO, they should just remove n-j-i

0:16 * callen goes back to merging Korma PRs, Klishin style.

0:19 sontek: All the cool kids are using cassandra + cassaforte now

0:20 callen: cassandra is cool. managing a cluster of cassandra instances isn't incredibly awesome though.

0:21 ArthurZ: I still can't figure what would be the reluable limit on the number of rows to ask from Cassandra

0:22 Callen: a Cassandra instance lives on each node

0:22 ddellacosta: argh, how do I fix the ugly-ass characters in emacs w/nrepl...

0:22 callen: ArthurZ: my name is callen btw.

0:22 ddellacosta: what...characters? ANSI?

0:23 ArthurZ: But there are many questions about Cassandra how to say scale down, e.g removing nodes

0:23 ddellacosta: callen: yeah, I must be doing something dumb somewhere,either in my terminal config or something, I always get lost in the configurations…I've got urxvt on mac os x

0:24 like, formatting characters look like so: ^[[36m

0:24 callen: ddellacosta: that's ANSI. Where are they coming from?

0:24 ddellacosta: callen: well, I only see it in the *nrepl* buffer

0:24 ArthurZ: Dud I misspell your name Callen: ? Sorry if so, otherwise it is very nice to meet you, I am Arturo

0:24 callen: ddellacosta: can I get a screenshot? do you know who is printing the ANSI chars?

0:24 ArthurZ: it's callen, not Callen.

0:25 ddellacosta: ANSI huh...

0:25 callen: um, yeah, one sec

0:25 callen: ddellacosta: ANSI color codes are how blackwater does its thing.

0:25 ddellacosta: callen: ah, gotcha

0:25 callen: but usually your stdout stuff that isn't part of your REPL session will go to the terminal lein repl, where ansi color codes should work, not in the nrepl

0:25 UNLESS - you manually printed something with ANSI chars in the repl.

0:25 which would be strange.

0:26 ArthurZ: Sorry callen: the 1st letter gets capitalized automayically on my Galaxy

0:26 callen: that's unfortunate.

0:27 ddellacosta: callen: http://imgur.com/zEOZKVL

0:27 sontek: ArthurZ: Removing nodes from a cluster is pretty well documented, its pretty easy to scale it down

0:27 ArthurZ: callen: I didn't know lower case letter in a nane makes a difference

0:28 callen: ddellacosta: are you a midje user?

0:28 ddellacosta: callen: on this project, I am.

0:28 callen: ddellacosta: that's unfortunate.

0:28 ddellacosta: callen: I thought we had this conversation--there are things about midje I like, and things about clojure.test I like, and neither one is ideal

0:28 callen: ddellacosta: find out how its printing ANSI chars and if they're smart (midje? dodgy proposition) they will have a var you can override and set to false for shutting off ANSI characters.

0:29 ArthurZ: sontek: the documentation exists but lags behind

0:29 callen: ddellacosta: I was asking because I wanted to make certain you weren't directly responsible for the ANSI chars.

0:29 ddellacosta: I know you use midje sometimes.

0:29 ddellacosta: callen: ah, gotcha. :-/

0:30 * ddellacosta takes a deep breath as he slowly approaches midje codebase

0:30 callen: ddellacosta: if it ends up not being possible, let me know and I'll write an evil-evil-evil hack to override their bs, gratis and fueled by hate.

0:31 actually I should add a convenience fn for that in blackwater.

0:31 or in clansi itself. hrm.

0:31 ArthurZ: Me

0:31 ddellacosta: callen: I found the relevant code. It's in a directory called "emission," which seems appropriate somehow

0:32 callen: anyways, it's this: https://github.com/ibdknox/colorize

0:32 callen: ddellacosta: an unfortunate decision, it's unmaintained and there's no way to disable the ANSI characters from what I can tell.

0:32 Standard midje though.

0:33 ddellacosta: callen: ah, well, looks like I may be able to configure it within midje

0:33 callen: good, but the library itself (colorize) should have the ability to disable itself.

0:34 ddellacosta: callen: yeah. :-(

0:35 callen: in any case, thanks for pointing me in the right direction. As usual. ;-)

0:37 argh, never mind, it's hard coded into autotest. ARGH

0:37 callen: ddellacosta: I like you too much to enjoy your misery. this is so conflicting.

0:38 ddellacosta: callen: hahaha, it's okay, I won't begrudge you a bit of smug smirking. ;-)

0:39 callen: tea and smuggery. today-was-a-good-day.

0:40 ddellacosta: callen: https://github.com/clojure-emacs/nrepl.el/pull/275

0:41 well, my attempt to shift over to nrepl was thwarted for today. Luckily I can use it in my day job.

0:43 dissipate_: racket has an object system? the heresy!

0:43 callen: not really heresy. Racket is an laboratory.

0:44 ddellacosta: I just went to test marick's example midje project and it breaks on load. lol.

0:44 ddellacosta: callen: d'oh

0:44 callen: CBA to proceed.

0:44 ddellacosta: callen: I forgive you

0:44 callen: I have better things to do as well

0:45 * ddellacosta investigates porting entire test suite over to clojure.test + prism

0:47 callen: ddellacosta: just fyi, but prism isn't perfect. I've managed to break it once in 2 weeks of testing, but I think I was doing something evil/not-safe.

0:47 that having been said, given how much simpler clojure.test + prism is, any fixes would be fairly straightforward.

0:47 I've been doing a lot of (refresh) (run-tests) lately too.

0:48 Sierra's (refresh) style works well for me.

0:48 ddellacosta: callen: I think the main point is, do I want to spend time getting midje working how I want it, or do I want to use clojure.test and add the features here and there that I need. I'm really used to clojure.test, the codebase is relatively easy to understand, and I can just start adding some features here and there as I need

0:49 callen: and adding a few small libraries on top of clojure.test would be much more Clojure-esque methinks

0:49 callen: ddellacosta: that was more or less my attitude after trying midje and watching it evolve (into a monster)

0:49 ddellacosta: callen: it's too bad--there really are a lot of great things in midje. I am not going to unequivocally bash it. But it really does feel like it grew too fast.

0:50 callen: ddellacosta: well, I'm not delusional. I know people have *reasons* for using it.

0:50 ddellacosta: callen: I like the => syntax too, that is nice in a lot of cases. Ideally I could use that along with (is …), then I would be super happy.

0:50 callen: ddellacosta: I just lean more conservative in terms of using tools I can understand, modify, and expect to not eat my children.

0:51 ddellacosta: could just implement the => thing.

0:51 ddellacosta: but on the clojure.test side, the way fixtures work is superior imho.

0:51 * callen adds to to-do list

0:51 ddellacosta: callen: exactly what I'm thinking

0:51 * ddellacosta does too

0:52 * ddellacosta as well as a nice way to dynamically filter clojure.test tests

0:53 seancorfield: ddellacosta: fwiw, i use expectations and the colorization it uses is compatible with nrepl.el and emacs...

0:53 callen: ddellacosta: well, there's always leiningen test selectors. I could write a library to run the tests using similar logic as Lein test selectors.

0:53 ddellacosta: seancorfield: good to know. Will give it a shot--been meaning to actually.

0:53 callen: I want to be able to filter in the repl as I move through a testing flow, so to speak. That's one thing that midje has that I really like.

0:53 seancorfield: we switched everything from clojure.test to expectations after seeing it at clojure/west 2012... we love it! :)

0:54 ddellacosta: seancorfield: oh, nice--good to know.

0:54 seancorfield: expectations has the idea of 'focus', if i recall correctly

0:54 seangrov`: Been using clojure.test and cemerick's cljs.test, like both quite a bit

0:54 ddellacosta: seancorfield: will definitely give it a shot. focus = filter basically?

0:54 seancorfield: yeah

0:54 ddellacosta: seangrov`: yeah, use cljs.test a lot too, there isn't much else out there, although I guess prismatic has something pretty much the same

0:55 callen: I think Prismatic's goal is to just fork the entire universe and have their own cloister.

0:55 ;)

0:55 seancorfield: ddellacosta: see Focused Testing on this page http://jayfields.com/expectations/odds-ends.html

0:55 seangrov`: callen: There are few companies I think could pull that off - prismatic seems to be one of them

0:56 ddellacosta: callen: I have to say, speaking of prismatic/forking the universe I'm starting to feel more and more frustrated with domina, and wishing I'd started using dommy a while back. I think I've heard someone else on here saying that too...

0:56 * ddellacosta avoids looking at seangrov`

0:57 ddellacosta: seancorfield: those docs are great, thanks!

0:57 callen: ddellacosta: last commit in domina - 6 months, last commit in dommy - 6 days.

0:57 ddellacosta: callen: exactly my point

0:57 callen: (I need to write that library comparison helper)

0:57 Raynes even wrote a nifty github helper library.

1:10 Raynes: Oh look, callen. You're my greatest marketing person.

1:11 callen: Raynes: I market other peoples' fine (soft)wares too.

1:11 Raynes: but you're speshul. *_*

1:14 seabre: I'm just starting out with clojurescript. So would you guys recommend dommy over domina?

1:15 dissipate_: how can i represent an irrational number as an infinite stream in clojure?

1:19 er, sorry, infinite sequence

1:20 callen: seabre: yes but if it breaks, you can't sue us.

1:20 seabre: lol

1:20 akurilin: callen, oh man, with blackwater I can now catch db calls slipping through my with-redefs

1:21 I always forget to stup a call here and there

1:23 Squeaky clean now.

1:28 callen: akurilin: good :)

1:35 ddellacosta_: seabre: dommy, give it a shot, and you can also check out the goog.* stuff that is baked in: http://docs.closure-library.googlecode.com/git/namespace_goog_dom.html

1:36 seabre: cool ok

1:36 I'm playing with core.async in cljs right now

1:36 It's pretty neat

1:43 sdegutis: By the way, this was my idea from earlier:

1:44 https://github.com/sdegutis/clojuredocs/wiki

1:44 \cc callen

1:46 *Don't* edit it yet. I'll probably need to re-seed it which will wipe out any changes.

1:48 seabre: sdegutis: That's neat

1:48 akurilin: callen, first issue for you my friend :P

1:48 callen, I got the honor for #1

1:49 sorry that it's purely cosmetic :(

1:52 seancorfield: sdegutis: why don't you contribute to other people's projects instead of constantly creating your own which you seem to abandon quickly?

1:53 sdegutis: seancorfield: Okay, that's fair, if you're *only* looking at my testing lib.

1:53 seancorfield: and this new documentation site

1:54 after all, we have http://clojure.org/cheatsheet which is well-maintained

1:54 sdegutis: seancorfield: Which one? clojuretip.herokuapp.com? That's not abandoned, it's done.

1:54 seancorfield: I can't agree with that when the highest Clojure it uses is 1.3

1:54 seancorfield: and we have http://clojure-doc.org which is open to evreyone to contribute

1:54 sdegutis: Oh sorry, totally misrea.

1:54 d

1:54 * sdegutis puts on glasses

1:55 seancorfield: sdegutis: that cheatsheet covers new in 1.5 stuff too

1:55 sdegutis: seancorfield: There's legitimate answers to each of these, give me a second to write them down.

1:56 seancorfield: First of all the cheatsheet is totally different. It isn't comprehensive, it just covers the most commonly used functions/vars. This site's goal is more like clojuredocs.org where it aims to cover *every* built-in namespace and var within.

1:56 dissipate_: seancorfield, speaking of 1.5, do you know if the book 'Clojure Programming' is 100% compatible with 1.5?

1:56 sdegutis: seancorfield: And clojure-doc.org is not API-oriented but topic-oriented which is a very different goal.

1:56 seancorfield: dissipate_: Clojure Programming was written for 1.5

1:58 dissipate_: seancorfield, my version says it was written for 1.4

1:59 sdegutis: seancorfield: Anyway I'm sorry I made that mistake with the testing lib. It was a mistake. I intentionally haven't said anything about it since, so it can die a quiet stillbirth.

2:01 seancorfield: And to be fair, if you look at *all* of my other projects on github.com/sdegutis, they're all actively maintained and some are even used by people :)

2:01 (With the exception of the testing lib of course.)

2:01 seancorfield`: darn, laptop battery died

2:02 sdegutis: Heh. I've found http://logs.lazybot.org/irc.freenode.net/%23clojure comes in handy when that happens :)

2:04 dissipate_: sdegutis, what have you contributed to clojure contrib?

2:04 seancorfield`: dissipate_: yes, you're right, it does refer to Clojure 1.4... I'm a bit surprised... I was sure Chas et al said it was developed for 1.5...

2:04 sdegutis: dissipate_: I don't think that exists anymore.

2:05 dissipate_: sdegutis, what have you contributed to clojars?

2:06 sdegutis: dissipate_: Nothing of importance yet. Why?

2:06 dissipate_: seancorfield`, well, i guess i'll find out. :D

2:06 sdegutis, was just curious

2:08 seancorfield`: dissipate_: at least the big backward compatibility breaks were between 1.2 and 1.3 so it's been pretty stable since :)

2:08 sdegutis: clojure contrib exists as a series of well-maintained libraries

2:08 sdegutis: seancorfield`: Right :)

2:08 dissipate_: sdegutis, i found this stuff: https://clojars.org/sdegutis

2:09 sdegutis: dissipate_: yeah that's my testing lib in its various forms.

2:09 dissipate_: we should pretend that page doesn't exist

2:09 dissipate_: hehehe

2:09 seancorfield`: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

2:10 dissipate_: seancorfield`, i see.

2:10 seancorfield`: lots of libraries there that are well-maintained parts of clojure contrib as well as a lot of new ones

2:10 sdegutis: Okay, I *think* it's feature-complete and stylish. https://github.com/sdegutis/clojuredocs/wiki

2:11 Those are the main two things needed, on account of how re-seeding is impossible after someone starts editing, and how re-styling is impossible without reseeding.

2:12 The URLs are admittedly not pretty though. https://github.com/sdegutis/clojuredocs/wiki/clojure.core-set%5BDash%5Dagent%5BDash%5Dsend%5BDash%5Doff%5BDash%5Dexecutor!

2:14 seancorfield: if you can make a replacement for http://clojuredocs.org work as a well-maintained, easy to use web site, the community will be grateful

2:15 these days i use http://clojureatlas.com but i do wish Chas would update it with 1.5.1 content...

2:15 ddellacosta_: agreed. I wish clojuredocs.org was updated. I still use it constantly.

2:16 sdegutis: seancorfield, ddellacosta_: That's why I think this github-wiki solution is perfect.

2:16 ddellacosta_: one thing I love about clojuredocs.org is the Quick Ref, which organizes things by topic: http://clojuredocs.org/quickref/Clojure%20Core

2:17 sdegutis: It's editable by anyone who has a github account. It's not bad looking. It's updated to use Clojure 1.5.1

2:17 And anyone can add examples and edit the see-also list.

2:17 ddellacosta_: Ah, neat. I wonder how hard it would be to port that to this github version.

2:17 ddellacosta_: sdegutis: I think you have some good points. But I would suggest that you post an email on the mailing list asking what folks thing, what they would be interested in contributing to, etc.

2:18 sdegutis: that way you can gauge interest and also get some folks to start contributing right away.

2:18 sdegutis: Hmm.

2:18 ddellacosta_: sdegutis: I think there is a natural reaction from some of us when we hear of "one more docs site" regardless of how good an idea it is….so, just saying. Again, I really don't want you to feel like I'm shutting you down, as I think I did last time.

2:19 seancorfield: one of the big benefits of clojuredocs is that it is searchable and it includes contrib libraries

2:19 ddellacosta_: sdegutis: It's more that, I think your solution is probably excellent--already it's nice to have the wiki with all the functions there updated for 1.5.1

2:19 sdegutis: ddellacosta_: That time you had legit points. :)

2:19 ddellacosta_: This time, this is an awesome thing and I think everyone will be happy.

2:19 ddellacosta_: sdegutis: right--so get some feedback on the mailing list.

2:20 seancorfield: any docs site that has a chance of being taken seriously has to include the active contrib modules as well and have a good search feature

2:20 ddellacosta_: sdegutis: for example, as nice as what you've got there already, you are going to have a hard time pulling me away from clojuredocs.org without being much closer to feature-parity

2:20 * ddellacosta_ agrees with seancorfield

2:21 sdegutis: seancorfield: Not only does this have the ability for adding new things to it but I think it'll be easy to extract my initial-seed-fn into something that general lib authors can use to add their own lib to this. It is just a public git repo after all :)

2:22 ddellacosta_: sdegutis: again, please, take this as positive criticism--I'd like to see your effort succeed if it has a chance to replace clojuredocs.org and be a *well-maintained* alternative. I agree the wiki started by Klishin et. al. has different goals too

2:22 sdegutis: Thanks for your feedback.

2:22 seabre: sdegutis: How would you handle newer versions of clojure?

2:23 sdegutis: seabre: Namespacing the files is probably sufficient. In fact I should do that right now.

2:23 seancorfield: well, once you've solved the problem of how to re-gen docs from source as it is updated without blowing away any existing edits, i'll happily run your functions to add java.jdbc ...

2:23 sdegutis: seabre: That way it can handle multiple versions of the same fn

2:23 seancorfield: Hmm interesting, that gives me an idea.

2:33 andyfingerhut: sdegutis: If you are still around, I was curious about a few odd bits of text in your some of your clojuredocs wiki pages. For example, look near the middle of this page: https://github.com/sdegutis/clojuredocs/wiki/clojure.core-read

2:33 sdegutis: andyfingerhut: what should I see?

2:33 andyfingerhut: Do you see a very long line beginning with user=> (read-string ... ?

2:34 sdegutis: andyfingerhut: Yes.

2:34 andyfingerhut: Compare to the much shorter corresponding line on this page: http://clojuredocs.org/clojure_core/clojure.core/read

2:34 Looks like some kind of strange character encoding munging going on.

2:35 sdegutis: Whoa. Yeah. Never heard of c5059c899760cdd632303de7cdd40fdcc9280712quot; before

2:36 andyfingerhut: Probably has something to do with the backspace in the original, perhaps. How did you get the text from the clojuredocs.org site?

2:36 sdegutis: andyfingerhut: https://github.com/dakrone/clojuredocs-client

2:36 In the REPL right now looking for it..

2:39 andyfingerhut: Hmm, weird. The file looks normal, it just has escaped quotes. Maybe github-wiki is assuming they're a reference to something and getting tricky..

2:41 andyfingerhut: I haven't looked through all of the pages. I just got (un)lucky and read that page to spot-check if you had taken examples from clojuredocs site, which you obviously have. Looks like your doc strings and source code come from Clojure 1.5.1?

2:41 sdegutis: andyfingerhut: Yep, 1.5.1

2:41 andyfingerhut: Nice

2:41 sdegutis: andyfingerhut: And yeah I used clojuredocs.org's API to extract examples and see-alsos. I omitted the comments because I've never seen them actually used.

2:42 andyfingerhut: I guess as a wiki there is no way to enforce the "structure" of each page remain the same over time as people edit it?

2:42 sdegutis: Looks like github-wiki is rendering it weirdly when you escape strings within strings within code-blocks.

2:43 andyfingerhut: no, but I'm going to put a stern warning on the front page that if people break the structure, it's really rude.

2:43 andyfingerhut: especially because if the structure remains in-tact, then I can easily do seamless updates of just the doc/source sections for 1.6 while leaving the examples/see-alsos intact.

2:45 andyfingerhut: Ha. I found a fix, by making sure that escaped quotes within strings have 2 slashes instead of one. Except I'm nervous that using a regex for this will replace \" in comments and stuff where it shouldn't.

2:46 andyfingerhut: callen: Sorry, I think my IRC client doesn't handle private messages well, and I can't figure out how to send them

2:46 callen: andyfingerhut: join #callen

2:49 andyfingerhut: Translating escapes between two different markup formats can be tricky.

3:00 fkey: hmmmm

3:00 its late, but i might of found another bug in cljs

3:00 1 sec

3:00 &((fn toList [x] (if (list? [x]) x (list x))) '(1))

3:00 lazybot: ⇒ ((1))

3:00 fkey: what am i doing wrong?

3:01 i am expecting (1)

3:01 ooo

3:02 (if (list? [x])) could be doing it ..duuur

3:02 sorry

3:05 sdegutis: ,(replace "\\\"" #"\\\"" "\\\\\"")

3:05 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$replace>

3:05 sdegutis: ,(clojure.string/replace "\\\"" #"\\\"" "\\\\\"")

3:05 clojurebot: "\\\""

3:05 sdegutis: wat

3:07 andyfingerhut: Backslash escaping rules in Clojure are different for strings and regexs, IIRC. It ain't fun. You are trying to replace all occurrences of a backslash followed by a quote in some string, with two backslashes followed by a quote?

3:09 sdegutis: Heh.

3:09 Yeah, I think so.

3:09 andyfingerhut: Sounds right.

3:11 andyfingerhut: Since what you are searching for is a constant string, you can leave off the # and not uses regexes at all in that case.

3:11 That at least gets you to one less set of rules for how to parse strings.

3:12 sdegutis: andyfingerhut: I wonder if it could be a case of recursive find/replace happening, since the thing-to-find is a substring of the thing-to-replace-with.

3:12 ,(clojure.string/replace "\\\"" "\\\"" "\\\\\"")

3:12 clojurebot: "\\\\\""

3:12 sdegutis: That fixes it :)

3:12 Thanks andyfingerhut.

3:13 andyfingerhut: sdegutis: You are welcome. I did some mucking about with clojure.string/replace implementation for Clojure 1.5.1, and I still don't know exactly what is going on in your example yet. May be a bug.

3:15 sdegutis: andyfingerhut: Well at least it isn't as ugly anymore: https://github.com/sdegutis/clojuredocs/wiki/clojure.core-read

3:15 andyfingerhut: Actually I don't think regexes *should* work recursively, but that's the only explanation I can think of.

3:16 andyfingerhut: clojure.string/replace is definitely implemented so that when it finds a match, it does not look for another match within the replacement, but only starts looking for another match after the end of the previous match.

3:16 sdegutis: Right, ok.

3:18 andyfingerhut: OK, I understand the behavior now. Check doc string for clojure.string/replace. When the thing to be matched is a regex, then the replacement string has special treatment for backslashes.

3:19 Special treatment *on top of* the usual Clojure special treatment of backslashes.

3:19 This would have done what you wanted, too: (str/replace "\\\"" #"\\\"" (str/re-quote-replacement "\\\\\""))

3:20 But if you don't need a regex, simplify your life and don't use one :)

3:21 sdegutis: Oooh. So weird.

3:21 Heh I should have read the docs. How ironic.

3:21 andyfingerhut: I wrote those docs, and I forgot that detail :)

3:21 sdegutis: Heh :)

3:26 fkey: huh

3:26 &(type (concat '(a) '(b))

3:26 lazybot: java.lang.RuntimeException: EOF while reading, starting at line 1

3:26 fkey: &(type (concat '(a) '(b)))

3:26 lazybot: ⇒ clojure.lang.LazySeq

3:26 sdegutis: fkey: You coming from Common Lisp?

3:27 fkey: sdegutis: i'm from all over the place <_<

3:27 sdegutis: fkey: Right, but concat and '(...) and list? are very Common Lisp and Scheme

3:28 fkey: ah, well yeah my 1st expierence with common lisp, and did a little scheme to

3:28 sdegutis: Ah.

3:29 andyfingerhut: fkey: anything in particular surprise you about the result you saw?

3:29 sdegutis: fkey: Now you've got lazy sequences. They're great. It means you can map over infinite sequences and only take some.

3:29 fkey: i had some code and been bashing my head because found out (list? ) is failing

3:29 i mean..makes sense

3:29 sdegutis: fkey: like ##(take 3 (map clojure.string/upper-case (repeat "hi")))

3:29 lazybot: ⇒ ("HI" "HI" "HI")

3:30 fkey: just wasn't expecting that heh

3:30 dyreshark: fkey: try seq?

3:30 &(seq? (concat '(a) '(b)))

3:30 lazybot: ⇒ true

3:30 fkey: dyreshark: yep, just tried it and that worked. curious about vectors now

3:31 i thought vectors where sequences too

3:31 &(type? [])

3:31 lazybot: java.lang.RuntimeException: Unable to resolve symbol: type? in this context

3:31 fkey: &(type [])

3:31 lazybot: ⇒ clojure.lang.PersistentVector

3:32 fkey: well being itterable i think is done by a interface or something..i forgot what richey said in his talks

3:32 andyfingerhut: You can make a sequence from a vector with seq, or a vector from a sequence with vec, but they are not the same thing, even though (= [1 2 3] (seq [1 2 3])) is true

3:33 clear as mud? :)

3:33 fkey: ah theres seq? and sequential? heh

3:33 dyreshark: fkey: sequential?

3:33 you beat me to it

3:33 :p

3:34 fkey: &(seq? '())

3:34 lazybot: ⇒ true

3:34 fkey: ok

3:34 i think i'm in business ... heh

3:35 b-e-a-utiiiiful

3:35 as a fun clojure project i created a flowcharting program

3:35 so you can type what the flowchart should be

3:36 ie, (do "step" (if "thisIsTrue" (do "true1" "true2") (do "false1" "false2")))

3:36 etc

3:36 thanks to seq? it's not throwing errors anymore and the graph is working! hurray!

3:36 just got to implement lines for the while loop

3:36 so it loops back on the right side

3:36 erm left

3:37 going to release the project once i clean it up and threw it up on a website..will be nice when i have to explain a idea to someone at work you know? hah

3:38 andyfingerhut: Have you seen graphviz / dot?

3:38 fkey: naww

3:39 im using html5 with canvas element

3:39 didn't want people to have to download extra software and stuff

3:39 andyfingerhut: I don't know for sure how well it would be able to draw flowcharts, but it does have lots of nice features for graph drawing.

3:39 fkey: nice

3:40 andyfingerhut: I wouldn't want to stop you working on a fun project, though :)

3:41 fkey: of course not! trying to learn clojure anyway

3:41 sheldonh: i don't understand what i read from (doc if-let) and (doc when-let) -- they both talk about if/when "test is true", but the signatures don't indicate that one supplies a test expression?

3:42 fkey: freaking before i discovered cljs/read-string i wrote a simple parser <_< . i did it in a very stupid manner to

3:44 but this flowcharting thing will be great

3:44 simple syntax to show logic flow

3:45 and to change node type, you just have to pre-fix the string , ie "!some node" will make it a input node. if it uses the built-in control loops, it automatically makes it a dimaond

3:45 will have a few other node types to

3:45 andyfingerhut: sheldonh: Doc strings might not be the clearest on those. A few examples are on clojuredocs.org here http://clojuredocs.org/clojure_core/clojure.core/if-let and here http://clojuredocs.org/clojure_core/clojure.core/when-let

3:47 gws: fkey: for inspiration there's also yuml.me activity diagrams http://yuml.me/diagram/scruffy/activity/draw

3:51 sheldonh: andyfingerhut: ahhh. so for if-let, you get the else expression when the binding is logically false

3:52 andyfingerhut: sheldonh: yep

3:53 sheldonh: andyfingerhut: and when-let is the for form of if-let

3:54 andyfingerhut: sheldonh: Not sure what you mean by the "for form of if-let". It is like when is to if, in that the body of a when can have multiple expressions, but it doesn't do anything if the condition is logical false.

3:59 sheldonh: andyfingerhut: ah. nothing to do with looping. (when [...] (x)) is (if [...] (do x))

3:59 andyfingerhut: sheldonh: yes

4:02 sheldonh: andyfingerhut: okay great. that's been needling me for days. thanks!

4:07 so now... looking at (source reductions), i don't understand how it works without blowing stack on large input collections. it doesn't use (recur)

4:08 andyfingerhut: sheldonh: via the magic of lazy-seq

4:08 amalloy: sheldonh: the same way most lazy sequence functions work: it immediately returns a lazy-sequence, and then the caller's stack frame does the recursion for you by calling the lazy seq

4:09 poorly worded: "...by asking for the next item in the sequence"

7:46 siscia: anybody here ?

7:46 I have a problem deploying a war with lein-ring, but I really don't have any clue of what is going wrong...

7:47 other than a NullPointer exception...

7:50 squidz: siscia: probably can't help you, but you should probably pastebin some more info if you want help

7:51 siscia: squidz: yes, you are right... but it is so cryptical that...

7:51 https://www.refheap.com/18442

7:53 last time I have resolve the same problem removing some unnecessary require from the files, but I checked and there are not unnecessary import/require anymore

8:27 squidz: dnolen: I saw that you improved the compilation process for clojurescript. Any idea when that will be in the maven repository?

9:22 PudgePacket: Hey guys, just quick one, Bait vs Lure ?!

9:35 siscia: I have a problem deploying a war with lein-ring, but I really don't have any clue of what is going wrong...

9:35 other than a NullPointer exception...

9:35 https://www.refheap.com/18442

9:36 somebody have some ideas ???

9:38 lein javac, compile and check don't show any problems (other than some reflection warning, and another warning due to a library I am using...)

11:09 cjfrisz: is the samples/repl browser-connected repl example in the clojurescript github repo still supposed to work, or has it been orphaned?

11:10 (I've never done a browser-connected repl and am having trouble getting _anything_ to work)

11:10 paulswilliamsesq: Hi all - any vim-fireplace users happy to answer hopefully a simple question regarding loading and the REPL?

11:10 ambrosebs: paulswilliamsesq: shoot

11:11 paulswilliamsesq: ambrosebs: cheers - I'm up and running with fireplace, having it reload code happily. cqp also works a treat allowing me to evaluate things ok.

11:12 ambrosebs: however, following https://github.com/clojuredocs/guides/blob/master/articles/tutorials/vim_fireplace.md, when I got back into the lein repl, I can't access the parse function that I defined with the core.clj file.

11:13 ambrosebs: the guide suggests that as you're using the same repl, then reloading will occur on the repl command line and from within vim

11:13 ambrosebs: paulswilliamsesq: did you switch namespaces in lein repl?

11:14 paulswilliamsesq: ambrosebs: yep using (ns command-line-args.core)

11:15 ambrosebs: paulswilliamsesq: you're definitely connected to the right REPL?

11:16 paulswilliamsesq: er, only through running lein repl from the same directory as vim was fired up for?

11:16 ambrosebs: any way to check explicity?

11:16 ambrosebs: ok. That doesn't always work for me.

11:16 Yes, :Connect

11:17 and tab through for the argument and insert the correct port.

11:19 paulswilliamsesq: ambrosebs: right, that seems to be issue.

11:19 ambrosebs: paulswilliamsesq: I always put this in my project.clj :profiles {:dev {:repl-options {:port 64394}}}

11:20 paulswilliamsesq: ambrosebs: so what's the cause? and do you increment the port for each project?

11:20 ambrosebs: paulswilliamsesq: no idea, yes.

11:21 paulswilliamsesq: I've been using fireplace since the beginning, but I've never bothered to investigate.

11:24 paulswilliamsesq: ambrosebs: right, cheers for help. I gonna investigate this now. target/repl-port was updated correctly. wonder whether I started vim too early or similar.

11:24 ambrosebs: paulswilliamsesq: nice.

11:25 xeqi: cjfrisz: I'm not sure about a raw cljs repl using only clojurescript tools, but lein cljsbuild, piggieback, and austin have all worked for me to get a cljs repl up

11:26 cjfrisz: xeqi: do you have resources? I couldn't grok what steps I was missing on the clojurescript github wiki

11:27 xeqi: cjfrisz: https://github.com/emezeske/lein-cljsbuild/blob/0.3.2/doc/REPL.md for cljsbuild

11:27 https://github.com/cemerick/piggieback#browser-repl and https://github.com/cemerick/austin#browser-connected-repls for the others

11:28 cjfrisz: xeqi: thank you muchly

11:28 xeqi: at this point I'm using austin for my projects, but thanks with an emacs/nrepl for the project, start server, start cljs repl type workflow

11:29 *but thats for an emacs/nrepl ....

11:49 bluebat: ,(+ 1 1)

11:49 clojurebot: 2

11:50 philipp`: Hi, I am currently going through the exercises at 4clojure, I was wondering why the following doesn't work:

11:50 ,(conj {:a 1} '(:b 2))

11:50 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry>

11:51 philipp`: conj can add vectors to maps, why not lists?

11:52 hyPiRion: No, conj can add map entries to maps

11:52 ,(conj {:a 1} [:b 2 3])

11:52 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Vector arg to map conj must be a pair>

11:52 hyPiRion: ,(conj {:a 1} [:b 2])

11:52 clojurebot: {:b 2, :a 1}

11:53 hyPiRion: Why that is, well. *shrugs*

11:54 philipp`: Hm, okay. I don't see any reason why lists couldn't be used as paird as well.

11:54 hyPiRion: well, they are returnes as "vectors" when read out

11:54 ,(find {:a 1} :a)

11:54 clojurebot: [:a 1]

11:58 gfredericks: ,(vector? (first {:a 1}))

11:58 clojurebot: true

11:59 hyPiRion: ,(class (first {:a 1}))

11:59 clojurebot: clojure.lang.MapEntry

11:59 cjfrisz: Whenever I try to connect a repl to my browser, I get a slew of "WARNING: Symbol [x] is not a protocol at line [n] [some cljs file in my project]" where [x] is a basic interface (e.g. IHash, ILookup, etc.)

11:59 Why is this happening?

12:01 Here's a full set of the warnings if my description is unclear: https://gist.github.com/cjfrisz/352ab3670a72d49c24c5

12:12 borkdude: Raynes do you still use Textual? I am trying to build the latest from github using Xcode 4.6.3 but I get some errors about .xib files.

12:14 bbloom: borkdude: I didn't realize it was available freely on github. 5 bucks seemed like a no brainer in the app store to me

12:14 borkdude: bbloom it's not about the 5 bucks, it's about not being able to stand to build something ;)

12:15 can't stand not building something

12:17 can't stand not being able to build something I mean

12:17 fsiler: I sympathize, borkdude

12:25 borkdude: hmm, what's up with emacs for osx showing the toolbar when you go full screen

12:26 ambrosebs: cjfrisz: turns out I was AOT compiling Clojurescript which completely broke Typed CLJS.

12:26 Should be better.

12:26 cjfrisz: ambrosebs: oooooh, now I can back to my gradual-typing branch

12:26 ambrosebs: cjfrisz: I updated one of the tickets you opened.

12:26 cjfrisz: ambrosebs: Awesome, I'll check it out

12:27 Now if I can just get a damn cljs repl working, I can get on with the stuff I really need to do today

12:27 ambrosebs: that's for experts.

12:27 :)

12:28 serycjon: Hi, do you have any recommendations for beginning with clojure? Good books, tutorials, whatever? I'm functional programming newbie. Thanks

12:28 bbloom: cjfrisz: try cemerick's stuff

12:28 cjfrisz: bbloom: you mean piggieback?

12:28 borkdude: serycjon what about clojurebook.org

12:28 .com

12:28 bbloom: cjfrisz: and this: https://github.com/cemerick/austin

12:29 borkdude: serycjon start with that one and read The Joy of Clojure alongside or after it and start doing it

12:29 cjfrisz: bbloom: Ah, was still juggling cljsbuild instructions with piggieback. Looks like I needed to skip ahead and look at this too.

12:29 borkdude: serycjon excellent learning experience: 4clojure.org

12:30 bbloom: cjfrisz: cljs' browser repl situation is somewhat nightmareish still

12:30 cjfrisz: cemerick is slowly saving the day w/ his projects & now contributing to lein-cljsbuild

12:31 chas is one of those rare devs who seems to eat slog work and shit usefulness

12:31 serycjon: borkdude thank you very much! I will try it immediatelly :)

12:33 cjfrisz: bbloom: that is a commendable quality

12:33 bbloom: should piggieback and austin go in my project.clj, or are they ideally in a global dev profile?

12:33 (I'm still a noob with respect to lein best practices)

12:34 bbloom: cjfrisz: i don't have any long running cljs projects & every time i start a new small project, everything is totally new/different, so project.clj is fine :-P

12:35 cjfrisz: treat it like you treat any refactoring task! put it in one project.clj, and if you need it again, put it in two and make a mental note. when you put it in THREE, then factor it out :-)

12:35 cjfrisz: bbloom: true

12:36 I feel like I need to take a weekend to track down all the stupid things I do in my Clojure dev environment and fix them

12:36 borkdude: serycjon there is an old (now removed) SO thread here about the differences about the existing clojure books: http://michielborkent.nl/comparingclojurebooks.html

12:43 seangrov`: $lastseen stuartsierra

12:43 lazybot isn't around, I guess

12:43 gfredericks: $seen stuartsierra

12:43 seangrov`: Also, I got the command wrong

12:44 gfredericks: &'wat

12:44 ah well

12:52 hyPiRion: lazybot died

12:52 long live lazybot

12:53 bbloom: i'm curious… you think rich, back in his C++ days, overloaded the pointer dereferencing operator like IDeref? :-)

13:05 jstew: identify sootroom

13:06 silasdavis: why does (zipmap (repeat :poll) [12 3 4]) give a different result to (zipmap (repeat :poll) [12 3 4])

13:07 or even

13:07 `(zipmap 3 (repeat :poll) [12 3 4])

13:07 '(zipmap 3 (repeat :poll) [12 3 4])

13:07 ,(zipmap 3 (repeat :poll) [12 3 4])

13:07 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (3) passed to: core$zipmap>

13:07 hyPiRion: uh

13:07 ,(zipmap (repeat :poll) [12 3 4])

13:07 clojurebot: {:poll 4}

13:08 hyPiRion: Not sure why you'd have the exact same key three times though.

13:11 grav: any folks played with core.async in clojure (not cljs)?

13:11 i'm having trouble running the examples (or anything for that matter)

13:16 silas_: ,(zipmap (repeat 3 :poll) [12 3 4])

13:16 clojurebot: {:poll 4}

13:17 silas_: ,(zipmap [1 2 3] (repeat 3 :poll))

13:17 clojurebot: {3 :poll, 2 :poll, 1 :poll}

13:19 silas_: why do I not get "doing" printed every second in: (take 5 (repeatedly #(do (Thread/sleep 1000) (println "doing") :foo))) ?

13:21 bbloom: silas_: you probably get about 30 of them b4 it stops, right?

13:22 silas_: no it waits the full 5 seconds then prints everything

13:23 ,(take 5 (repeatedly #(do (Thread/sleep 1000) (println "doing") :foo)))

13:23 clojurebot: (doing\ndoing\n:foo doing\n:foo doing\n:foo doing\n:foo :foo)

13:23 bbloom: silas_: ah, either way, the answer is chunking.

13:25 silas_: it's fetching 30ish items all at once

13:29 silas_: bbloom, I've tried it with 200 items, I still only get everything back at once

13:30 bbloom: silas_: try using doseq

13:30 llasram: This might just be I/O buffering

13:30 bbloom: (doseq [x …] (prn x))

13:30 silas_: it will take some REPL behavior out of the equation

13:31 silas_: bbloom, thanks that was it

13:35 bbloom: (defn seq?? [x] (or (seq? x) (nil? x)))

13:35 :-)

13:35 next up: seq?!?!?

13:36 gfredericks: (def seq?!?!? (comp seq? rest reverse rseq seq))

13:37 bbloom: lol.

13:38 mtp: wut

13:45 gfredericks: if we are afraid to do things like this the language will never improve

13:45 bbloom: like what?

13:46 gfredericks: (def seq?!?!? ...)

13:47 bbloom: how does this improve the language?

13:51 gfredericks: I really need to stop this IRC deadpan thing

13:52 bbloom: gfredericks: see, here i thought you were advocating for making interobangs legal identifier characters

13:53 (defn seq‽ [x] (or (seq? x) (nil? x)))

13:53 cjfrisz: bbloom: do I need google closure related dependencies explicitly listed in my project.clj to get browser-connected repl stuff to work?

13:53 waf: until clojure resembles APL it will never surpass java and c# in the enterprise

13:53 bbloom: cjfrisz: i don't think so

13:53 cjfrisz: I just got one working that used cljsc directly, but I would rather use lein cljsbuild, and I notice that there are some goog files missing in my out directory

13:54 bbloom: cjfrisz: i always use a master branch checkout of cljs though, so i usually have a closure jar from the bootstrap script

13:54 cjfrisz: That is, I got cemerick's example in the piggieback readme, but it seems like a no-go for my project thus far

13:55 bbloom: cjfrisz: you're really asking the wrong guy. i just hack on the compiler. i have wasted many many hours on the damn browser repl. there is like a weird flaw in my brain where i just can't get it to work

13:55 gfredericks: bbloom: only brehaut would advocate for that

13:55 bbloom: cjfrisz: bug dnolen & cemerick

13:57 cjfrisz: bbloom: will do, thanks

13:59 dissipate_: waf, APL, are you cray?

13:59 actually, clojure does resemble APL

14:00 to me anyways

14:00 waf: dissipate_: :) just playing off of bbloom's interrobang comment. I like using a normal qwerty for development

14:01 dissipate_: waf, are you kidding? if you aren't doing dvorak, you aren't even in the game.

14:02 waf: haha, i'm one of those clojure heathens that uses vim instead of emacs. dvorak would break my brain

14:02 dissipate_: waf, i'm a heathen using light table and eclipse with counter clockwise.

14:03 my setup actually reeketh of the cube farm

14:03 sdegutis: Where's lazybot?

14:04 hyPiRion: dead.

14:05 dissipate_: sdegutis, someone caused it to crash, so it's off to have its bugs fixed and formally proven with coq

14:07 borkdude: what clojure ide can rename/refactor names nowadays? in all namespaces for a given project

14:07 and i don't mean a simple search/replace

14:07 dissipate_: borkdude, eclipse?

14:08 * sdegutis is working on one that does that.

14:08 borkdude: dissipate_ seriously?

14:08 sdegutis: What do you guys think of this? https://github.com/sdegutis/clojuredocs/wiki

14:09 dissipate_: borkdude, https://code.google.com/p/counterclockwise/

14:09 borkdude: dissipate_ I'm looking at the release notes, but where can I find this feature, or isn't it described somewhere? https://code.google.com/p/counterclockwise/wiki/ReleaseNotes#Version_0.13.0_SNAPSHOT

14:10 dissipate_: sdegutis, are you kidding me? i don't see the section for special forms

14:10 borkdude: dissipate_ I have used ccw but I didn't know it could do it

14:10 llasram: borkdude: I don't believe any current Clojure environment can do that

14:10 sdegutis: dissipate_: Why would I be kidding you?

14:11 dissipate_: sdegutis, i would have thought that there would be a highly visible section for the special forms

14:12 sdegutis: dissipate_: Oh. I don't yet know how to generate those docs from within Clojure. Ideas?

14:13 dissipate_: sdegutis, are the special forms in there anywhere?

14:14 sdegutis, not from within clojure, but you can use an HTML user agent to download and parse this page: http://clojure.org/special_forms, then reformat the elements for your page.

14:14 sdegutis: dissipate_: Not yet. I'm generating the entire wiki from within a Clojure function. It basically gets all vars within a given namespace and prints docs for them.

14:14 dissipate_: I wonder if it would be easier to use clojruedocs.org's API, granted I'd have to give it a list of special forms first

14:14 http://api.clojuredocs.org/

14:15 borkdude: http://dev.clojure.org/display/community/Project+Ideas#ProjectIdeas-RefactoringfeatureforCCWotherIDEs

14:15 dissipate_: sdegutis, does that API have the special forms?

14:16 sdegutis: http://api.clojuredocs.org/examples/clojure.core/do

14:17 dissipate_: sdegutis, hmm. why does it say 'do' is in clojure core?

14:17 sdegutis, the word 'core' doesn't show up on this page at all: http://clojure.org/special_forms

14:18 sdegutis, something is off. how can a special form be defined in a namespace?

14:19 sdegutis, if it was in clojure.core then in theory your page would have already had it

14:20 sdegutis, what am i missing?

14:20 jave: is there a "lint" or "checdoc" like thing for Clojure?

14:23 I have some clojure code of questionable quality here: https://github.com/jave/btc-coffee

14:25 sdegutis: ,(zipmap [1 2 3] (repeat inc 10))

14:25 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.core$inc cannot be cast to java.lang.Number>

14:25 sdegutis: ,(zipmap [1 2 3] (iterate inc 10))

14:25 clojurebot: {3 12, 2 11, 1 10}

14:25 sdegutis: Neat.

14:25 clojurebot: Gabh mo leithscéal?

14:25 sdegutis: ,(map list [1 2 3] (iterate inc 10))

14:25 clojurebot: ((1 10) (2 11) (3 12))

14:25 llasram: jave: There was a tool which suggested more idiomatic ways of expressing forms found in your code, but I can't seem to remember its name...

14:26 jave: llasram: cool, ping me if you remember it

14:27 borkdude: maybe kibit

14:27 jave: ah ok thanks

14:28 borkdude: but it remember vaguely there was some effort in a newer project, don't know for sure

14:28 it -> I

14:28 sdegutis: Just found a Clojure snippet that crashes github's markdown parser.

14:29 llasram: Yeah, that was it!

14:29 There's also https://github.com/jonase/eastwood

14:29 I've never used either myself

14:29 cjfrisz: bbloom: I seem to have figured it out

14:29 sdegutis: ,[\| (\| \s \t \a \c \k) (\h \a \y)]

14:29 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>

14:29 sdegutis: ,'[\| (\| \s \t \a \c \k) (\h \a \y)]

14:29 clojurebot: [\| (\| \s \t \a \c ...) (\h \a \y)]

14:31 bbloom: cjfrisz: you're clearly smarter than me then :-P

14:32 cjfrisz: bbloom: or at least damned determined and willing to spend hours fiddling and pattern matching on things I don't really understand

14:32 bbloom: cjfrisz: yeah, but i've done that like 5 times & haven't gotten any faster at it :-P

14:32 dissipate_: jave, if there was a tool that could automate code quality detection for clojure, we wouldn't be using it.

14:33 max1: is anyone aware of a way to do this[1] with leiningen? [1] http://maven.apache.org/plugins/maven-shade-plugin/examples/resource-transformers.html#AppendingTransformer

14:33 sdegutis: LOL, this crashes github's wiki page: ##(println "```clojure\n\\k\n\n```")

14:34 dissipate_: cjfrisz, cargo cult pattern matching?

14:34 cjfrisz: dissipate_: only the cultiest!

14:35 dissipate_: cjfrisz, you know there is a tool that gives you the RE for a given text?

14:36 cjfrisz: dissipate_: yes, I went through a dark period where I was intimately familiar with emacs's regex builder

14:36 I was a brasher man then...

14:40 callen: Korma PRs are slowly disappearing :)

14:40 bbloom: oh man, exciting: I just did (->> blah (map (juxt :id (juxt :foo :bar))) (into {}))

14:40 that's some glorious higher order function magic right there: double juxt!

14:41 callen: bbloom: have you done any Haskell?

14:42 bbloom: callen: not for anything real

14:42 callen: mostly just read it when i have to & occasionally compile & tweak various projects to learn about them

14:43 callen: bbloom: I've found it really difficult to call much of any Clojure code I've seen "higher order" with respect to fn composition after doing Haskell.

14:43 bbloom: callen: just let me revel in the glory of a nested juxt

14:43 callen: okay.

14:44 dissipate_: callen, bbloom said i was a troll when i mentioned that haskell can be used for systems programming

14:44 seems to be a touchy subject for him

14:44 callen: dissipate_: I wouldn't ever ever attempt to use Haskell for systems programming.

14:44 bbloom: dissipate_: no, i said you were a troll when you transitioned from ignoring good advice to giving bad advice

14:44 callen: I wouldn't use a virtual machine based Clojure for systems programming either.

14:45 dissipate_: callen, why not?

14:45 callen: dissipate_: systems programming means you need at least a measure of control over memory alloc.

14:45 this is why Rust gives you ways to avoid gc.

14:45 dissipate_: callen, haskell has excellent multi-threading support

14:45 hyPiRion: define systems programming first, guys.

14:45 bbloom: (inc hyPiRion)

14:46 hyPiRion: you'd get karma if lazybot was here. i'll owe you one

14:46 callen: dissipate_: irrelevant

14:46 hyPiRion: haha

14:46 dissipate_: callen, would you use go for systems programming?

14:46 callen: dissipate_: no, it's not a systems language.

14:46 Golang is an applications language.

14:46 general purpose.

14:47 dissipate_: callen, http://golang.org/doc/faq#What_is_the_purpose_of_the_project

14:47 callen: dissipate_: they had to change the tag-line of Golang from systems language to general purpose language because they misused the terminology.

14:48 dissipate_: please stop with this conversation, it's clear you've never done any systems programming.

14:48 * callen goes back to his tea and PRs

14:48 dissipate_: callen, i have, in C

14:49 callen: dissipate_: fiddling with some single-file C programs does not a systems programmer make. I'm not really known for being a nice person, this is me cutting it off at the limits of my patience.

14:52 fkey: is there any "thread" form that inserts the given x into the 2nd position of every form?

14:53 callen: fkey: you should fix the arity rather than do that but if you must, try as->

14:53 fkey: ex, for (-> x .do .something) , .do and .something would receive x

14:53 callen: thanks, i am in clojurescript land

14:53 metellus: (-> x .do .something) is equivalent to (.something (.do x))

14:54 sheldonh: fkey: smells like a map or a juxt?

14:54 metellus: if you want (.do x) (.something x) you might want (doto x .do .something)

14:54 coventry2: e

14:54 bbloom: (doc doto)

14:54 clojurebot: "([x & forms]); Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x. (doto (new java.util.HashMap) (.put \"a\" 1) (.put \"b\" 2))"

14:54 fkey: metellus: thanks, i think thats what i want

14:54 bbloom: (doc ..)

14:54 clojurebot: "([x form] [x form & more]); form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance: (.. System (getProperties) (get \"os.name\")) expands to: (. (. System (getProperties)) (get \"os.name\")) but is easier to write, read, and understand."

14:55 callen: (doc as->)

14:55 clojurebot: "([expr name & forms]); Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form, returning the result of the last form."

14:57 borkdude: kst

14:57 sorry, typo…

14:57 is there a way to see what theme is loaded in emacs currently?

14:58 callen: borkdude: the #emacs channel has a lot of very helpful people in it :)

14:58 borkdude: callen yes, but I'm afraid of them

15:03 sdegutis: dissipate_: Added special forms.

15:03 https://github.com/sdegutis/clojuredocs/wiki

15:07 dissipate_: sdegutis, no dot '.' special form?

15:08 sdegutis: dissipate_: oh yeah, trying now.

15:09 Okay it's adding, but it'll be as empty as http://clojuredocs.org/clojure_core/clojure.core/_dot is

15:10 dissipate_: https://github.com/sdegutis/clojuredocs/wiki/special-forms-.

15:10 borkdude: hah, probably I had no color theme loaded (just moved me .emacs.d folder)

15:13 dissipate_: sdegutis, you can screen scrape from here: http://clojure.org/java_interop#dot

15:20 sdegutis: dissipate_: Hmm

15:21 seangrov`: dnolen: Is 509-protocol-warn merged into master now?

15:21 Want to experiment with the incremental/auto builds

15:24 coventry2: symbolhound really sucks, at least for clojure. Anyone found an alternative which lets you search for strings with non-alphanumerics?

15:25 sdegutis: dissipate_: wanna help with that part?

15:27 bbloom: seangrov`: do `git fetch --all`

15:27 seangrov`: then: `git branch --all --merged master | grep origin/509-protocol-warn`

15:27 seangrov`: and you can double check yourself with --no-merged

15:27 :-)

15:29 seangrov`: bbloom: Thank you, I feel I've failed to pick up a lot of basic stuff whenever you mention these things

15:29 I'll make a note of this in my bbloom.org

15:30 bbloom: seangrov`: i'm honored to have a whole org mode file

15:30 dissipate_: sdegutis, i could, but it wouldn't be in clojure.

15:31 sdegutis: dissipate_: why not?

15:31 callen: bbloom: solid. :)

15:31 dissipate_: sdegutis, my main languages are perl and python. for screen scraping, i use Mojolicious

15:32 sdegutis: dissipate_: what better way to learn Clojure ;)

15:32 seangrov`: bbloom: Well, after some help with templating, git rebasing, code patches, etc. I realized you were just cluttering my other "notes" file

15:32 callen: scraping HTML isn't screen scraping unless you're rendering the page with webkit.

15:32 mattmoss: I went to bbloom.org and got nothing. lol

15:32 callen: mattmoss: org-mode

15:32 mattmoss: Ya, I gets it now. :)

15:32 dissipate_: sdegutis, true. but by the time i finished, you would probably already be done.

15:33 callen: mattmoss: not everybody knows what org-mode is.

15:33 dissipate_: sdegutis, how long are you willing to wait for this?

15:33 mattmoss: callen: I use it a bit myself... need to go deeper, tho.

15:33 I don't do *everything* in emacs yet. Working on it...

15:34 sdegutis: dissipate_: few more seconds

15:34 callen: mattmoss: (inc knowledge) once a day :)

15:34 dissipate_: sdegutis, hehehe

15:34 sdegutis, i don't even know what the best user agent library is in Java

15:35 bbloom: callen: i do that, but it just returns the same number every day. i really need a knowledge atom

15:35 mattmoss: lol

15:35 sdegutis: callen: what do you think of this wiki?

15:35 re https://github.com/sdegutis/clojuredocs/wiki

15:36 mattmoss: (swap! bbloom inc :knowledge)

15:36 bbloom: mattmoss: arity error.

15:36 magomimmo: did anyone use fixture with clojurescript.test?

15:37 bbloom: mattmoss: (swap! bbloom update-in [:knowledge] inc)

15:37 mattmoss: doh

15:37 That's what I meant.

15:37 callen: sdegutis: don't seek my approval, you won't get it.

15:37 hyPiRion: (swap! bblom update-in [:knowledge] (fnil inc 1)) ; In case he has no knowledge from before

15:37 dissipate_: sdegutis, Please see http://clojure.org/special_forms#. ? it's not even hyperlinked

15:38 hyPiRion: (Not likely, but you can never be too sure)

15:38 seangrov`: (fnil inc 0) I think you'll find

15:40 bbloom: seangrov`: shh don't tell him. i want new instances of bbloom to get an unfair advantage

15:46 seangrov`: Interesting, working off of the 509-protocol-warn branch, every other incremental build fails

15:47 lein cljsbuild auto dev; builds ok - change 1 file, save, build fails - change same (or another) file, save, build passes

15:48 I'll see if I can track it down

15:48 sdegutis: callen: why not?

15:49 callen: you're a fan of wikis, right?

15:50 callen: I care about a specific problem, not littering github with wiki implementations.

15:53 sdegutis: callen: oh, I see. You're just not seeing that this solves a specific problem.

15:53 callen: Clojuredocs.org has Clojure 1.3 docs at the latest, this version has Clojure 1.5.1 docs. See the specific problem that was solved?

15:53 callen: sdegutis: I understand everything you're up to exactly because you're only doing this because of your misbegotten understanding of something I mentioned.

15:53 sdegutis: it is you that are confused, not me.

15:54 sdegutis: callen: wait, you think I did this github wiki project for you or because of something you said?

15:54 callen: I saw you start on it immediately after I mentioned clojuredocs was out of date.

15:54 The causality was very obvious.

15:54 I mentioned one facet, of one component, of a much larger problems and you sprinted off, abandoned yet another project, and are up to another random thing you'll just end up abandoning.

15:56 sdegutis: callen: Wow. Not only am I insulted by that, but it actually shows just how self-centered you are. If you'd paid attention to anyone besides yourself, you'd seen that I've been frustrated with clojuredocs.org being out of date for a few months now and have been thinking of a good solution.

15:56 callen: It has nothing to do with you or what you said. Sorry to inform you that the world doesn't revolve around you and the shit you say in IRC.

15:56 callen: sdegutis: I asked to be disincluded from whatever it is you're up to. Stop insulting me in public. I've been graceful enough not to air your dirty laundry in public, don't make me regret that.

15:57 sdegutis: callen: I have a right to defend myself in public from all the arrogant insult you hurl my way in public.

15:57 callen: And I fail to see how I "abandoned another project" in doing this wiki. What project?

15:57 callen: I've also been polite enough that whenever I have a grievance with you, I tried to pull it into privmsg rather than attempt to embarrass you in a public channel, but you persist in bugging me in public.

15:57 sdegutis: callen: asking for your opinion on something I thought you would like is hardly "bugging" you.

15:58 callen: sdegutis: you should assume by default that unless you have just cured cancer or you have something you need from me, you shouldn't talk to me.

15:58 sdegutis: And you did NOT pull *any* of this into a priv-msg at all. You started shit-talking me right away in #clojure, before I even knew you felt this way.

15:58 callen: Oh I see. It's just part of who you are.

15:58 arrdem: callen, sdegutis, kindly take this somewhere else. #clojure is not the place.

15:58 sdegutis: *plonk*

15:58 arrdem: seriously.

15:59 sdegutis: arrdem: Sorry, you're right. I'm done with callen.

15:59 bbloom: sdegutis: good call.

15:59 callen: arrdem: I whole-heartedly agree, but I couldn't let what he was saying stand un-responded to.

15:59 bbloom: callen: yes, yes you can

15:59 arrdem: callen: yes you can

15:59 sdegutis: arrdem, bbloom: although to be fair, I do believe I had a right to defend myself in the same venue that he insulted and attacked me.

15:59 bbloom: sdegutis: ignore him, he enjoys being a dick

15:59 callen: I don't.

15:59 bbloom: callen: coulda fooled me

16:00 muhoo: ,gentlemen

16:00 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: gentlemen in this context, compiling:(NO_SOURCE_PATH:0:0)>

16:00 callen: bbloom: not enjoying being a dick, doesn't mean I am going to suffer the wanton abuse of somebody like him.

16:00 muhoo: ~gentlemen

16:00 sritchie: bbloom: stop feeding, dude

16:00 clojurebot: You can't fight in here. This is the war room.

16:00 bbloom: sritchie: you're right

16:00 arrdem: (inc muhoo)

16:01 callen: bbloom: I take advice and correction from people like TimMc, happily.

16:01 arrdem: sadly lazybot is remiss in its duties.

16:02 arrdem: callen: Q_Q no karma today then

16:02 dissipate_: sdegutis, callen tried to brow beat me as well right off the bat. :(

16:02 seangrov`: I like muhoo's original line

16:02 ,gentlemen

16:02 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: gentlemen in this context, compiling:(NO_SOURCE_PATH:0:0)>

16:02 sdegutis: Does it make sense to just show docs for the latest Clojure version in this wiki?

16:03 I don't know how common it is to have a project that *can't* upgrade Clojure versions. We updated from 1.3 straight to 1.5.1 with no problems.

16:04 * arrdem has only seen issues arrising from the loss of clojure.contrib.*

16:04 dissipate_: <bbloom> sdegutis: ignore him, he enjoys being a dick yet you teamed up with him to browbeat me

16:04 callen: the loss of contrib caused much gnashing of teeth.

16:04 grandy: question: is it possible to write a clojure program that uses seesaw and serial port access w/o worrying about threading at all?

16:04 sdegutis: dissipate_: let's drop it

16:05 amalloy: sdegutis: upgrading to 1.3 was the hard one. everything after that has been basically fine

16:05 sdegutis: amalloy: sounds like Clojure is getting more stable all the time

16:06 bbloom: dissipate_: my apologies for my tone at that time. I won't apologize for giving you good advice though: seriously, go read On Lisp

16:06 sdegutis: In that case, I think it makes sense to just support "the latest Clojure". If anyone wants a similar thing for Clojure 1.5 or Clojure 1.4, they can run my wiki-seed Clojure script in a new git repo and upload it to another github wiki, right?

16:06 callen: On Lisp is great.

16:07 sdegutis: And as long as the structure of each wiki stays the same, I can update the script to only replace the Doc section of each page with the new docs. Although new/removed pages will be a bit trickier.

16:09 dissipate_: bbloom, i will. thanks for pointing me to it.

16:10 seangrov`: On Lisp, I need to revisit it

16:10 Thinking about making my way through Lisp In Small Pieces again, I didn't actually translate any of it to code last time

16:11 sdegutis: I've found that Lisp books focus a lot on macros and a recursive style, including On Lisp.

16:11 Maybe I'm mistaken.

16:15 asolove: Any cljs users here? I would like some workflow advice.

16:16 seangrov`: anyone?

16:16 clojurebot: Just 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 ..."

16:16 callen: On Lisp and Let over Lambda probably represent a particular style of Lisp book.

16:16 seangrov`: Let Over Lambda blew my mind

16:16 * arrdem still doesn't grock LoL

16:16 callen: grok*

16:16 sdegutis: seangrov`: in what regard?

16:17 callen: seangrov`: I never did Lisp in Small Pieces. Any good?

16:17 dissipate_: seangrov`, what about 'structure and interpretation of computer programs'?

16:17 seangrov`: sdegutis: Reader macros

16:17 callen: SICP is a beginners book that does a lot to seed the foundations of FP.

16:17 sdegutis: seangrov`: Oh.

16:17 seangrov`: dissipate_: Yeah, SICP is kind of a great place to start. I didn't appreciate it the first time I read through it, because I was angry about learning scheme

16:18 callen: seangrov`: I think that's most peoples' experience of it if they didn't know upfront what the value was.

16:18 hyPiRion: callen: LiSP is good if you want to implement a lisp. It talks deeply about the internals and what choices you have, etc.

16:18 callen: especially if it was something where they were obligated to learn it.

16:18 seangrov`: callen: Yeah, LiSP helps elimate the, "Lisp programmers know the value of everything and the cost of nothing" stuff

16:18 callen: ahhhh. Very good.

16:19 a weird alternative might perhaps be the tutorial where you implement a Scheme on Haskell. Only negative thing is it encourages the uni-typed fallacy.

16:19 seangrov`: I've never done that, but like I mentioned, I'd like to experiment more with Haskell

16:20 sdegutis: seangrov`: I'm still angry about having learned Scheme. It makes me want to like it so much and then falls short.

16:20 Although I hear Racket doesn't fall short.

16:20 hyPiRion: sdegutis: You're free to stay in Clojureland :)

16:20 sdegutis: That too :)

16:20 callen: seangrov`: the problem with learning Haskell is that I'm not sure there's one good way to learn Haskell. Peoples' epiphanies in HS will come out of nowhere and for seemingly unpredictable reasons.

16:21 coventry2: tools.trace interacts confusingly with exploring lazy sequences at the repl. "How the hell did the symbol TRACE: end up in my output??"

16:21 sdegutis: Clojure is the "simple Lisp" I've been waiting for.

16:22 It's not that it's simple (nothing really is), just that it's simple in the ways I need it to be.

16:22 callen: I've told hacker news users where clojurians hang out on IRC. Please forgive me.

16:22 Brand0: lol

16:24 seangrov`: callen: What's your hn username?

16:26 callen: seangrov`: coolsunglasses

16:27 sdegutis: ,(hash-combine 100 "a")

16:27 clojurebot: -1640524969

16:28 sheldonh: a lot of people ask "Learn You A Haskell or Real World Haskell". i think the best answer is both. they both drop you pretty hard to points, at which point it helps enormously to flip over to the other book until you get stuck there

16:28 callen: I don't doubt that some people might get value out of RWH, but I found it rather sparse in terms of information value and enlightenment. Enormously disappointing.

16:29 I'd probably tell a new person to do LYAH and then a series of small projects like the Scheme-in-Haskell. maybe learn Parsec along the way.

16:30 sheldonh: just make sure your new person has a fallback plan when chapter 3 on types and typeclasses leaves them for dust :)

16:30 callen: sheldonh: is that where LYAH loses people?

16:31 sheldonh: callen: some. it's a pretty shocking introduction to typeclasses, i thought

16:31 dissipate_: sheldonh, haskell is a language born and bred in academia, but is supposed to be used in the 'real world'. not sure how that shakes out.

16:32 sheldonh: dissipate_: it's well worth taking a look at, even if only for the algebraic types

16:32 callen: I found the type system enlightening, but not the GADT part.

16:33 the monads, the advanced type system, and function composition patterns are why I'd recommend learning Haskell to somebody.

16:33 dissipate_: sheldonh, and monads? i've heard they are a big turn off.

16:36 sheldonh: dissipate_: well i suppose it depends on what you're already into. it blew my mind, and i suspect made my introduction to clojure a lot more enjoyable

16:36 callen: when i whined about LYAH, the concensus seemed to be "yeah, if you're new to functional programming, neither of those books is going to do it for you. flip flop and be patient"

16:37 dissipate_: well either i totally didn't get monads, or there's nothing to them

16:38 dissipate_: i'll let you know when i get to side effects in clojure ;)

16:38 callen: you probably used monads in Clojure and didn't know it.

16:38 learning monads is about reifying something that's already happening. it's not alien.

16:38 dissipate_: i want to learn haskell some day. but right now i barely have time to lean clojure!

16:38 xeqi: core.async's go macro is implemented as a monad iirc

16:38 dissipate_: actually, i'd rather learn clojure and macros really well before delving into haskell.

16:38 bbloom: xeqi: yeah, tim used a state monad

16:38 callen: which is a continuation monad.

16:38 eventually you tug at the string enough for the sweater to unravel. then it stops being mysterious.

16:38 bbloom: but all effects are delimited continuations :-P

16:38 dissipate_: i've also read in several places that you can have memory blow up with haskell's default lazy evaluation

16:38 callen: space leaks don't matter if you're just learning.

16:38 I just use them as a blunt instrument excuse for not bothering to use Haskell outside of pedagogy.

16:38 bbloom: dissipate_: also, it's a dual leak. see this comment:

16:38 http://lambda-the-ultimate.org/node/2273#comment-40156

16:38 callen: bbloom: I agree with the response though, it's a whole program problem.

16:38 bbloom: i'm a big fan of non-strict evaluation, but i don't believe in *implicitly* non-strict execution

16:39 callen: true

16:39 callen: that was my real objection to Haskell. I didn't have a choice in having to force strictness in awkward ways whenever I wanted to avoid laziness.

16:40 bbloom: callen: yeah, haskell has strictness annotations, which is a really weird notion b/c it means that things are now transparently strict in usage

16:40 dissipate_: bbloom, and how do you detect those leaks and fix them before they worm their way into a large software system?

16:41 bbloom: dissipate_: *shrug* i don't write much haskell. but it's not like strict GC-ed languages aren't without their space leak problems

16:41 callen: write perfect code or wait for your program to blow up, then sift through the entrails to find the source of the space leak.

16:41 bbloom: dissipate_: and even in clojure people "hold on to their head" without need often

16:41 callen: unless some sort of static analysis tool for finding them has come out.

16:41 dissipate_: bbloom, that's very true. i've had my fair share of using 'weaken' in perl.

16:42 callen: I'd be very very surprised if that was the case though.

16:42 best you could is a glorified lint really.

16:42 bbloom: dissipate_: profiling tools are useful. hurray JVM ecosystem

16:42 sheldonh: callen: having looked at the C that haskell produces, static analysis would be hilarious

16:43 callen: sheldonh: static analysis is part of the point of Haskell.

16:43 you analyze the Haskell, not compiler output.

16:43 * sheldonh screws up his face trying to see how that would help with space leaks...

16:43 coventry2: Are there any obvious reasons why using (intern) to copy everything from (ns-publics 'clojure.core) into another ns would not result in a fully functional copy of core? This is for testing some debugging-instrumentation code. I would also want to do it for all of clojure.core's tests.

16:44 sheldonh: callen: it's not that i don't believe it. i just can't imagine it :)

16:46 sontek: How do you guys handle authentication in your apps right now? Are you using something like cemerick/friend?

16:47 callen: sontek: I don't recommend the use of friend unless you're tackling something very complicated that is close to commending the use of a state machine.

16:47 writing simple auth fns that return true/false and a middleware isn't difficult.

16:48 sheldonh: +1

16:48 sontek: Was wondering if people had a specific library they used for handling sessions/cookies

16:48 for the authentication

16:48 callen: sontek: I use lib-noir stuff for encrypted cookies.

16:49 I simply read the state of the session (in the middleware) to grab a user-id and fetch the user state and inject it into the request.

16:49 from there, you just check for the existence of the user and what roles they have to decide on a per route basis if you want to pass/fail access.

16:50 sontek: callen: sounds good

16:50 callen: sontek: github.com/bitemyapp/neubite/ for a deployed example.

16:50 ignore the mongodb. I was feeling especially nihilistic when I wrote that app.

16:51 sheldonh: :)

16:52 callen: ooh, my klout score has almost caught up to Hickey's. fun. I wonder how many more times I can make fun of MongoDB for being terrible on Twitter to catch the rest of the way up.

16:52 sheldonh: callen: it's only terrible on Twitter? *badadush*

16:59 sontek: whats your twitter? I need to follow clojure people now that I'm abandoning the python community

17:00 callen: sontek: bitemyapp - but, you should follow the people I follow, not me.

17:00 my github is the same.

17:01 jballanc: hmm...anyone have tips on updating a field of a js object in cljs?

17:01 doing (set! (.-myField myObj) new-val) all over the place just seems ugly

17:01 seangrov`: jballanc: Is this for interop?

17:01 jballanc: initially yes

17:02 I'm doing a straight port first, then later "clojure-izing" it

17:02 seangrov`: Well, there is aset

17:02 coventry2: jballanc: then you're doomed to lots of in-place modifications.

17:02 jballanc: seangrov`: does aset work on fields?

17:03 seangrov`: But like coventry mentions, really it's ugly for a reason

17:03 akurilin: callen, ping. Was your recommendation to turn off ansi colors in the log output to avoid crapping up the log file with extra characters? I actually kind of like that it's extra readable with tail -f, but I guess that's the only place that works.

17:03 seangrov`: When "clojurizing" it, you don't want to be settings any fields if you can get away with it

17:03 jballanc: seangrov`: that's the plan

17:03 callen: akurilin: oh good, I looked for you in here and you weren't :)

17:03 jballanc: ok, it's as I suspected then...thanks!

17:04 callen: akurilin: it's up to you re: ansi coloring. I just wanted people to have the option.

17:04 akurilin: do you want me to remove newlines or not?

17:04 seangrov`: jballanc: You can also use doto to clean it up a bit

17:04 e.g. (doto obj (aset "field" "value") (aset "another-field" "another-value"))

17:05 jballanc: hmm...that might help

17:05 callen: akurilin: but yes, removing ANSI colors - I had clean logs in mind. it's up to you whether that matters or not.

17:05 sheldonh: akurilin: as long as you can grep past the colors... :-)

17:05 callen: some people don't want to manually filter ANSI codes out of their logs.

17:06 akurilin: callen, I'm trying to figure out what to do with that SQL query string across multiple lines situation. From what I can tell Rails dumps the query out in one single line

17:06 so you might consider normalizing whitespace to 1 space at most

17:06 callen: single line is a simple implementation for me.

17:06 akurilin: and replace newlines with one space

17:07 callen: That's doable.

17:07 akurilin: cool

17:07 Again, it might be just me and my way of doing things, so if there's a significantly better way I can just switch to that :)

17:07 sheldonh: what are you going to do with newlines in quoted strings?

17:07 callen: akurilin: no, it's fine. Thanks for filing the issue.

17:08 sheldonh: too bad so sad.

17:08 sheldonh: query logging is the devil's work, anyway :)

17:08 callen: sheldonh: what makes you say that?

17:10 akurilin: callen, I just now ran a sample insert in Rails and got the following output: http://pastebin.com/JzuRpZzN . It looks like they track the beginning/end of transactions and the individual SQL queries inside

17:10 as in, they tell you how long each one takes

17:10 sheldonh: callen: ugh, it's fraught. it starts with "oh, so we'll have to rule out syslog as a transport", meanders past secure data disclosure and ends up with exasperating stuff like "but if we aren't faithfully logging quoted strings, why bother logging them at all?"

17:10 Raynes: wat

17:10 Am I seeing people talk about rails in #clojure?

17:10 * callen waves arms and hands vigorously at Raynes

17:11 callen: Raynes: don't worry about it. it's about blackwater.

17:11 akurilin: I don't really operate at that level of abstraction in blackwater. all I know is queries and runtimes.

17:11 akurilin: callen, also the other thing we don't have right now in blackwater are the values of the params.

17:11 callen, oh I see, so would that be not feasible at this point?

17:11 callen: uhhhh...maybe? it's something I'd rather wait to see if people really need.

17:12 values in params could potentially be useful for diagnosing index behavior, but not a high priority yet.

17:12 I'm kinda waiting to expand blackwater until I can talk to seancorfield.

17:12 akurilin: callen, fair enough.

17:12 callen: akurilin: the reason I want to talk to corfield is that I strongly suspect I am not wrapping the right parts of c.j.j

17:13 akurilin: callen, I'm actually curious, does sql allow you to run an explain and still get the resultset back?

17:13 callen: I could be wrong, but that's why I need to talk to him.

17:13 akurilin: not simultaneously that I'm aware of. You can run the explain separately.

17:13 you don't really want blackwater to explain your queries do you?

17:13 akurilin: oh you'd have to run stuff twice, I get it

17:13 callen: query planner output is voluminous.

17:14 akurilin: callen, I think the only use case would be to have this super-verbose mode for index debugging, but you could do this by hand anyway from the repl if you wanted to.

17:14 and it's probably not even the best place to do it

17:14 * callen shakes head slowly

17:15 callen: you're right, not the best place. neat idea though.

17:15 akurilin: Honestly just seeing those ms values is a good indication of something gone wrong :)

17:15 callen: precisely.

17:15 it's like I said in the README, blackwater is the canary in the coal mine. human intervention beyond that.

17:15 I'd consider something like, "warn me if my query is relying on unindexed fields", but that's already getting kind of invasive.

17:16 and the ms value should tip you off anyway.

17:19 akurilin: thank you for caring about the silly little library :)

17:20 akurilin: callen, my pleasure, gotta start giving back somewhere, might as well be there.

17:21 I might have asked this several times before, but is there any way of determining at runtime what profile I'm running as? For example, I might want to set *use-ansi* to false in production. I could have an external config entry for that, but it'd be easier to just ask if I'm in uberjar profile.

17:24 I guess one way is to add :use-ansi false to :env map in :uberjar profile and default to true if the key is not there.

17:28 sheldonh: oh i see. cons doesn't realize a lazy sequence

17:28 one less hoop to jump through :)

17:30 callen: akurilin: yeah I'd use the env map.

17:34 akurilin: it's uploaded.

17:34 akurilin: 0.0.7, flattens the newlines out and scrunches the whitespace together.

17:34 https://clojars.org/blackwater

17:43 seancorfield: just saw you invoked my name callen ? about blackwater... and c.j.jdbc i gather?

17:46 callen: seancorfield: yeah, I had a bit of a dumb wrt the underlying API in c.j.j, was hoping to steal some of your time to figured out a better approach than what I'm currently doing (whack-a-mole). Nothing big.

17:46 I was planning on just doing so at the next meetup you were at since it's presumably time you've already allocated to the community :)

17:47 sdegutis: I think a key principle behind good Clojure code is YAGNI.

17:49 seancorfield: callen: ah, and i threw a wrench in your plans by not being at the meetups for a while...

17:50 glosoli: hmm is there something default in Clojure Mode for Emacs, to make Enter work as C-j ?

17:50 akurilin: callen, awesome, thank you!! That's pretty darn fast!

17:50 callen, what meetups are you guys going to?

17:50 seancorfield: glosoli: C-h c C-j says that's newline-and-indent for me

17:51 callen: seancorfield: it's your time, not mine, and the meetup I went to was very wonderful. I ended up having some great conversations.

17:51 seancorfield: akurilin: the (San Francisco) Bay Area Clojure Meetup

17:51 callen: akurilin: I went to the SF one on the 5th

17:51 I'm RSVP'd for the next few.

17:51 seancorfield: I've been running that meetup for about two years, while Amit was too wrapped up in Runa

17:51 but now he has more time so I'm taking a break for a while

17:51 callen: understandably.

17:51 akurilin: seancorfield, cool, been to it a couple of times a while ago, didn't know any of the names at the time.

17:52 callen: akurilin: 'ho damn, you're in the Yay?

17:52 seancorfield: I may attend the San Mateo ones if the topics are interesting enough, but SF is a bit of a PITA to get to really for me

17:52 akurilin: callen, yeah, I'm in the Twitter building about 7 days a week :)

17:52 callen, you in the area?

17:53 callen: akurilin: ah man, we should get lunch or something.

17:53 akurilin: yeah, I live in Ingleside and work in SOMA.

17:53 seangrov`: seancorfield: Would be interested in talking there, either about the cljs source map work or getting "real keywords" into cljs

17:53 Should I email Amit?

17:53 seancorfield: I live in the East Bay - and work from home :)

17:53 Yeah, seangrov' that would be the best

17:54 you have his contact details?

17:54 seangrov`: Yeah, looks like it

17:54 akurilin: callen, sure, any time. I'm also going to have to find some time to make it to the meetups as well, been a while.

17:54 seancorfield: you can always contact the meetup organizers...

17:55 callen: seangrov`: I'd love to hear about either of those subjects.

17:55 akurilin: yeah, the only time I'd gone to the meetups before was to teach Emacs+Clojure, ended up having them clone my dotfiles repo. lol.

17:55 seangrov`: callen: I don't think I have anythign super insightful to say, but maybe a 10-15 minutes overview of what it involved. Would be cool to get others working on the cljs compiler as well.

17:55 callen: I hope nobody's still using that install still.

17:55 akurilin: callen, that's one way of "teaching" :)

17:56 callen: akurilin: I was showing them how to use it, rather than how to install it :P

17:56 sdegutis: This is getting confusing

17:56 callen: seangrov`: making cljs less scary is good.

18:04 seancorfield: seangrov`: i saw david had released some incremental compilation improvements just recently?

18:05 seangrov`: seancorfield: Yeah, I've pulled them down but seen the same improvements

18:05 dissipate_: has anyone downloaded the book 'on lisp' onto the amazon kindle ereader?

18:06 callen: seancorfield: David was VERY excited when he got it working.

18:06 seangrov`: woops, I've *not* seen the same improvements

18:07 callen: seangrov`: understanding that you've got a bunch of production code strewn about, is it possible you might have a contrasting code sample that doesn't benefit as much as the stuff Nolen was working with?

18:07 akurilin: What is the deal with having two vars with the same name, one with a * after it? As in, my-function and my-function*. Is this a common pattern for defining a macro and a function it calls internally?

18:07 callen: akurilin: yep.

18:07 akurilin: the recommended pattern is to make the function do most of the work, then just sugar it with the non-* macro.

18:08 akurilin: Korma follows this pattern.

18:08 bbloom: akurilin: some of us feel that the * naming is a bit of an anachronism though

18:08 seancorfield: figured that's what you meant... i haven't tried it yet... and i'm not familiar enough with cljs to really know what's up... but it sounded like good progress :)

18:08 bbloom: akurilin: i prefer a -fn suffix for the functions that back my macros

18:08 seangrov`: callen: Definitely could be. I also trigger some bad compilations on every-other compile when using auto. But now I know enough that I can talk a bit with dnolen and possibly track down the issue myself

18:08 bbloom: akurilin: a * suffix basically is an admission that i couldn't come up with a better name

18:08 callen: seancorfield: it at least sets a nice precedent for not tossing out as much stuff from compile to compile.

18:09 bbloom: I like the macro fn* naming convention.

18:09 and would prefer to be able to clearly and unambiguously identify macro and function counterparts.

18:09 seancorfield: akurilin: i also do that with an internal implementation for an interface, such as when instrumenting code for New Relic

18:09 seangrov`: seancorfield: Yeah, there aren't many reasons left not to do most development in cljs at this point

18:09 callen: note that the syntax was sufficiently clear that akurilin guessed what was going on.

18:09 seangrov`: Getting started is still rough, but I'm not clean on how to fix that quite yet

18:10 callen: getting started meaning getting lein-cljsbuild to work, or understanding how to organize things?

18:10 seangrov`: callen: More like time-to-repl-working

18:10 akurilin: callen, I was using clojure.jdbc's db-transaction as example, and it's pretty obvious from that example since the former is a two-liner, and the latter is a giant blob of logic.

18:11 seangrov`: You need a host html page setup, etc.

18:11 callen: seangrov`: have you tried Austin?

18:11 seangrov`: Not yet, looking forward to it though

18:11 callen: I've seen some new people gravitate towards that.

18:11 bbloom: callen: the problem is that * is used in lots of places besides just macro/function divide

18:12 akurilin: bbloom, that's fair, I'll keep it in mind

18:12 bbloom, that's also true. Whenever I see * my gut reaction is "this is some magical part of Clojure I haven't used yet likely"

18:12 bbloom: akurilin: heh, but it's also on list*

18:13 akurilin: it literally means "like that thing without the star, only a little different"

18:13 callen: * is an indication that you're looking at an underlying primitive of some sort.

18:13 dissipate_: if i were to implement the public suffix algorithm in clojure, would that be worthy of clojars? http://publicsuffix.org/list/

18:13 callen: I don't think it's really that unclear, but that might be the CL brain damage talking.

18:13 akurilin: is *foo* a convention for per-thread bindings?

18:13 bbloom: callen: does list* underly list?

18:13 callen: dissipate_: you can deploy whatever you want to clojars.

18:13 bbloom: akurilin: yes

18:14 akurilin: Ok the next person to overload * with some other meaning gets the hat of shame.

18:14 dissipate_: callen, would this be useful?

18:14 callen: I think having universal warning signals like * and ! are useful and I don't find the patterns unclear.

18:14 bbloom: callen: * is useful, but it's also vague

18:14 callen: by the time you need to care, you already know what it means.

18:15 akurilin: bbloom, that latter scenario you listed does sound a bit silly, although I do struggle every time with finding good meaningful function names that fit under 10 characters.

18:15 callen: it's not like monads in Haskell where you're forced to care but nothing makes sense.

18:15 akurilin: It's really challenging.

18:15 lgs32a: hello

18:15 callen: lgs32a: hi

18:15 bbloom: akurilin: naming things is very difficult :-)

18:15 lgs32a: is anybody experienced with debugging future

18:15 callen: bbloom: I hear datomic solved the other hard problem.

18:15 lgs32a: futues

18:15 futures

18:15 sheldonh: off-by-one errors? ;)

18:15 lgs32a: its a problem

18:16 dissipate_: god damnit, someone already did it

18:16 lgs32a: because i have a future that throws java.util.concurrent.ExecutionException when i deref it

18:16 and then i only see the exception

18:16 "Don't know how to create ISeq from: clojure.lang.Keyword"

18:16 but not the right stacktrace

18:16 because it must have catched the exception

18:16 akurilin: bbloom, one of the few things I liked about objective c and its addFooTo:(something *)bla with:(something *)bar, even though many times is was just garish.

18:16 lgs32a: re-thrown

18:16 callen: lgs32a: find out where it's trying to seq over a keyword.

18:17 lgs32a: haha

18:17 i am doing for 30m now

18:17 seancorfield: lgs32a: i general develop & test without future calls and only add them in once i'm sure the underlying code does the right thing

18:17 bbloom: akurilin: that's why half my functions just take a damn map as their only (or close to only) argument

18:17 lgs32a: its ridicolus, the bug does not exist

18:17 callen: lgs32a: corfield's advice is solid.

18:17 lgs32a: so to speak

18:17 i know

18:17 but this is already high level code

18:17 on top of a 4k+ lines code-base

18:17 akurilin: bbloom, I'm with you on that one. Positional parameters stop being fun after 1 parameter :) Also makes mocking of those functions a nightmare.

18:18 lgs32a: a handler fn for two async channels that maintains local state in a future

18:18 akurilin: I want a couple of hours of my life back trying to hunt down an incorrect with-redefs

18:18 seancorfield: and your unit tests don't show any problems? (he asked, leadingly...)

18:18 callen: lol ^^

18:18 lgs32a: now

18:18 the error is certainly not thrown from low-level of my code

18:18 that is all well-tested

18:18 it must be directly in the function where the ref is used

18:18 callen: lgs32a: that reduces the surface area you need for check for a keyword being Seq'd over.

18:19 dnolen: seangrov`: note the improvements only apply if you use :optimizations :none, we can't make Closure any faster.

18:19 lgs32a: ya

18:19 i know

18:19 dnolen: seangrov`: :whitespace is also significantly faster

18:19 callen: dnolen: handy for local dev though, right?

18:19 lgs32a: it would be too nice if the concurrent exception would print the stack-trace

18:19 bbloom: what's the preferred representation for 3x3 affline transformation matrixes these days?

18:19 dnolen: callen: exactly which is the important thing

18:19 bbloom: (in clojure, i mean)

18:19 lgs32a: can i print the stack-trace of the second last exception?

18:19 somehow?

18:19 callen: bbloom: representation for outer API or for inner work?

18:20 dnolen: seangrov`: did you actually encounter issues w/ my changes? I was going to merge to master

18:20 bbloom: callen: preferably with a nice data literal representation

18:20 callen: bbloom: Have you looked at mikera's core.matrix?

18:21 bbloom: callen: yeah, looking at it now, but it seems to be aimed at arbitrarily sized matrices

18:21 callen: i want something tuned for 2D transforms

18:21 hfaafb: is the order of arguments in cons and conj supposed to represent the operation itself?

18:21 callen: bbloom: 3x3 eh? clj-tuple?

18:22 hfaafb: alternatively is there a reasoning to argument orders that are unique to lisp/clojure?

18:47 justin_smith: any tips for using jni / native code from clojure? no matter where I put the .so, I can't get System/loadLibrary or System/load to work

18:47 I am trying to use lib_jcsound from the libcsound-java project (debian)

18:50 (System/getProperty "java.library.path") shows a path that contains the .so I want to load

18:52 grav: grav

18:53 Rich_Morin: Any suggestions on economical hotels near the conj?

18:53 sontek: Joy of Clojure (Fogus) vs Clojure Programming (Emerick), any tips?

18:53 justin_smith: both are good, if you can only get one get the Emerick one

18:53 callen: sontek: they serve different purposes at different times.

18:54 hyPiRion: sontek: yes

18:54 (Yes to both)

18:56 sontek: Clojure Programming is on kindle, so I'm leaning towards it, but thats not a very scientific reason

18:57 callen: sontek: you typically read Joy of Clojure after you already understand the basics of Clojure.

18:58 clj_newb_2345: when are ~/.emacs and ~/.emacs.d/init.el called? does ~/.emacs need to call ~/.emacs.d/init.el ?

18:59 callen: init.el gets called automatically. a .emacs is not obligatory.

18:59 justin_smith: clj_newb_2345: it will use the first one it finds

19:00 .emacs, .imacs.el, .emacs.d/init.el all in ~

19:00 http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html

19:00 s/.imacs.el/.emacs.el

19:01 clj_newb_2345: noted, thanks

19:03 justin_smith: I have this native code library for java, it is installed, I have no idea how to load it in clojure

19:03 I don't understand the error I am getting

19:05 callen: justin_smith: can you start with a refheap?

19:05 justin_smith: yeah, I actually finally got the lib loaded, now I cannot access the contents

19:05 one sec

19:06 callen: justin_smith: what were you doing wrong?

19:07 justin_smith: I was using System/load to specify the full path of the artifact, but not including the .so as part of the name

19:07 better would be to find it in the path, that is still unresolved

19:10 https://www.refheap.com/18452 here I have the code that worked for loading the .so, and the contents of the related jar

19:10 how do I go about loading that jar in order to use the code in the jni lib? or is it possible to see what was in the jni lib and access it without the jar?

19:11 clj_newb_2345: M-x customize face <RET> cursor <RET> -- I change the "black" to "green", it shows up as green on my screen. I hit "set for current session" and "Save for future session". Then, I go back to my buffer -- still black, when I do Mx customize-face <ret> cursor <ret> -- cursor is still set as black, not green. Wtf is going on?

19:13 justin_smith: clj_newb_2345: #emacs is more likely to be helpful with that I think

19:17 muhoo: heh, this guy's attitude about java is about the same as mine: http://code.nomad-labs.com/2011/12/09/mother-fk-the-scheduledexecutorservice/

19:18 (yes i got bit by this while trying to use at-at)

19:19 arityfn: Whats a popular framework for web development?

19:21 seancorfield: Clojure is much more about composing libraries than full frameworks.

19:22 callen: arityfn: it's not a framework, but http://www.luminusweb.net/ does a good job of teaching best practices and shows you nice libraries.

19:23 arityfn: callen: ill check it, thanks.

19:23 ou9

19:23 seancorfield: arityfn: if you really do want a framework, I ported one of the most popular CFML frameworks to Clojure a while back :) https://github.com/framework-one/fw1-clj

19:24 built on Ring + Enlive / Selmer with its own routing code

19:24 brehaut: arityfn: dont put off actually learning ring either

19:25 (not that there is much to learn, but it is the foundation of everything else)

19:25 seancorfield: yeah, pretty much everthing is based on Ring :)

19:27 callen: brehaut: Luminus is just Ring.

19:27 brehaut: callen: yes i realise that

19:27 callen: but sometimes people dont like looking below eg compojure

19:28 callen: brehaut: we try to use the middleware to sidestep that problem. The middleware forces you confront the nature of it directly without doing something tedious.

19:29 justin_smith: any tips for using reflection or other such tricks to figure out how to use a jar? I used mvn to install it to my local repo, and have added it as a dep in my project.clj - but none of the classes I am asking for are being found

19:30 I unpacked the jar and asking for the classes defined in there is also failing

19:32 for example - jar file has csnd/csnd/Soundfile.class but (import '(csnd.csnd Soundfile)) fails

19:32 as does (import '(csnd Soundfile))

19:32 (ClassNotFoundException)

19:37 tomjack: are there more than two possible answers to that question?

19:37 1) typo, 2) jar not on classpath

19:37 justin_smith: it is in my project.clj, which is not throwing an error

19:37 or could an error in my project.clj deps be silently failing?

19:38 tomjack: I have to ask, though I bet you know, you did kill your jvm and restart?

19:38 (after adding the dep)

19:38 justin_smith: I found a blogpost about using the api - am I correct that "import csnd.Csound;" translates to (import '(csnd Csound)) in a repl?

19:38 tomjack: I would not be surprised if there are other answers, but would also bet they are relatively rare compared to those two :)

19:38 justin_smith: yes, I killed the repl, ran lein deps, and ran lein repl again

19:39 tomjack: that looks right t ome

19:39 but that would be csnd/Csound.java, not csnd/csnd/Csound.java ?

19:39 er .class

19:39 justin_smith: yeah, I tried both variations

19:39 the dir naming structure threw me off a bit

19:40 tomjack: and the jar you're looking at is the one that is reported by `lein classpath`?

19:40 justin_smith: I'll check

19:44 OK, starting from scratch here, the right jar (the one I mvn installed manually) is being found, the so is loading successfuly

19:45 now I am getting a NoClassDefFoundError

19:45 would that be caused by doing the mvn install wrong?

19:45 "The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found."

19:45 that is weird

19:46 tomjack: hmm

19:46 oh

19:47 justin_smith: I'll do another refheap paste

19:47 tomjack: the only time I have seen that is when there was some initialization trouble for the class and then you try to load it again

19:47 so hopefully you should see some other exception first, before the NoClassDefFoundError, in a fresh repl?

19:47 justin_smith: https://www.refheap.com/18453 transcript of lein classpath and a fresh repl

19:48 tomjack: ah I see

19:48 "(wrong name: csnd/Csound)"

19:48 the jar is busted?

19:48 justin_smith: maybe

19:48 I could ask the debian maintainer what is up

19:48 maybe recreate the jar taking the top level library out?

19:48 tomjack: yeah

19:48 justin_smith: *top level directory

19:49 tomjack: bet it will work

19:49 justin_smith: I'll try

19:49 thanks very much for the help

19:54 a jar is just a zip with a magic directory structure and META_INF dir right?

19:54 dnolen: real Keywords landed in ClojureScript master

19:55 justin_smith: with the new jar (taking out the extra csnd folder) I am back to just ClassNotFoundException)

19:55 dnolen: kickss

19:55 *kickass

19:55 tomjack: bizarre, dunno

19:56 hmm, I see JNI?

19:56 that raises my probabality for explanations I don't understand :)

19:56 justin_smith: heh

19:56 the jni seems to be doing the right thing

19:56 but yeah, it is kind of unknown to me too :)

19:57 Bronsa: dnolen: did you already check how much does this reduce code-size with advanced-optimizations?

19:57 justin_smith: yeah, with the distro's jar, I get the NoClassDefFoundError, (wrong name), with the version taking the top level dir out I just get ClassNotFoundException

19:58 dnolen: Bronsa: I don't really expect it to have much of an effect.

20:02 ClojureScriopt 0.0-1877 going out

20:08 shaungilchrist: after much rumination I think I have decided the reason clojure/scirpt makes me so happy is that it keeps you out of "the loathe zone" e.g. where regardless of best practice you are just not happy with the resulting codebase. With clojure there is always a way to make it better/cleaner/more abstracted in a good way. that is all.

20:08 justin_smith: here here

20:08 if only I could figure out this jni weirdness

20:09 lynaghk: dnolen: any thoughts on the cljs middleware proposal?

20:09 dnolen: lynaghk: looks awesome to me

20:09 lynaghk: dnolen: I was a bit surprised at how easily it was to actually implement on top of the existing codebase

20:09 dnolen: lynaghk: so you actually have this and it already works?

20:09 lynaghk: dnolen: the biggest gap right now is handling :foreign-libs and other JavaScript/Closure fanciness.

20:10 dnolen: lynaghk: yeah that's what I would assume, I still don't really understand closure.clj fully and there are things about it that just don't make sense.

20:10 callen: shaungilchrist: thank you for having a name that doesn't begin with "sean"

20:10 lynaghk: dnolen: there's an implementation in the repo, yeah. I haven't used it a ton yet, but I'll put together my own lein-cljsbuild-like thing and kick the tires for a while

20:11 dnolen: yeah. there's all of this stuff in there around trying to order the dependencies for Closure.

20:11 dnolen: lynaghk: which isn't consistent

20:11 lynaghk: dnolen: My gut feeling is that we should just let Closure handle all of that nonsense

20:11 dnolen: lynaghk: if that's possible sure, though I'm not sure that it is.

20:12 lynaghk: dnolen: there are some promising looking bits in the Closure Javadocs

20:12 dnolen: lynaghk: I think the main flaw currently is that "compiled" ClojureScript is treated as any old JS file, which make the dependency order change under incremental compilation

20:12 lynaghk: huh cool, more than happy to punt that work if we can.

20:13 lynaghk: it's easy to order the cljs-generated files since we have requires info already: https://github.com/lynaghk/clojurescript-compiler-proposal/blob/master/src/com/keminglabs/cljs_proposal/condense.clj#L52

20:13 dnolen: lynaghk: radical!

20:13 lynaghk: however, if possible I'd like to get rid of that and use Closure's "manageClosureDependencies" option. I tried for 10 minutes but my Java-fu was not strong enough to get real output

20:14 but, yeah. Closure is already parsing the JS. Clients should not have to regex through their JS for goog.provides shit.

20:14 dnolen: lynaghk: spelunking in Closure source is not my idea of fun - it took forever to figure out what the hell I was supposed to do to enable source maps

20:15 lynaghk: dnolen: yeah, no joke. My plan was (and still is) to just make noise about what I have and hope some Javadoc-fiend figures it out = )

20:15 dnolen: lynaghk: anything that simplifies closure.clj gets a thumbs up from me, however we'll probably want to leave closure.clj alone

20:15 lynaghk: I suspect folks like Relevance also have a lot of custom stuff built on the internals

20:16 lynaghk: or at least give people significant heads up about breaking closure.clj.

20:16 lynaghk: dnolen: I'd want to get 'em on the phone and ask about what they are and aren't using

20:16 dnolen: lynaghk: this sounds like a really good plan

20:16 lynaghk: I'm be happy to join in on that

20:16 lynaghk: if possible I'd like for the ClosureScript source code to actually look good.

20:16 dnolen: I'd be

20:17 SegFaultAX: Versioning is usually a good way to do that.

20:17 lynaghk: practice what we preach, you know. Separate concerns, isolate side effects, don't crawl the file system from every function =P

20:17 dnolen: you know who the right person to talk to there would be? stuart sierra or brenton ashworth?

20:18 dnolen: lynaghk: I think we should ask Alex Miller if he can arrange it, I'm sure Stuart & Brenton will want to be in on this

20:18 lynaghk: ah! I just had the same thought

20:18 I'll shoot him an email

20:18 the closure stuff is mostly plumbing, so I don't think it'll be too hard to come up with a plan.

20:19 Do you have a sense for what we should/shouldn't expose w.r.t the AST?

20:19 dnolen: a ton of cool stuff will come out of exposing the AST: https://github.com/lynaghk/clojurescript-compiler-proposal/blob/master/src/com/keminglabs/cljs_proposal/middleware.clj#L50

20:19 dnolen: lynaghk: I'd say expose nothing until an AST can be agree upon

20:19 lynaghk: dnolen: just not sure if the format is stable/documented anywhere

20:19 dnolen: agreed

20:20 lynaghk: it'll be important to get Rich, Ambrose's feedback on the AST, Bronsa probably has some thoughts, etc

20:22 lynaghk: is your solution for moving away from namespaces atom to implement memoization everywhere?

20:22 lynaghk: dnolen: is that the motivation, you mean?

20:23 dnolen: lynaghk: I just mean if you're looking into that, how are you going invalidate cache around tooling/reflection services?

20:23 caches

20:23 lynaghk: I'd like to minimize the amount of mutable state inside the compiler. Right now it looks like a lot of magic twiddling happens based on the order forms are flying through the analyzer

20:24 dnolen: lynaghk: yes I understand the goal, but how are you going to address the above ^

20:24 lynaghk: That said, rearchitecting the compiler is above my pay grade

20:24 right now, not going to. There may be caveats like "you can't actually analyze different namespaces in parallel"

20:26 my gut feeling is that we'll be able to memoize cljs analysis (aside from redefinitions of JVM macros)

20:26 dnolen: lynaghk: ok, so then I think whatever you come up w/ needs to address the reality that analysis side effects the namespaces atom

20:26 lynaghk: you can't push that under the rug in any design

20:27 lynaghk: dnolen: let me check and see where the namespace atom is actually used

20:29 dnolen: uh, yeah. I have no idea what is going on

20:29 dnolen: lynaghk: def is the primary offender

20:30 lynaghk: everything else just uses to to figure what has and hasn't been declared, what has and hasn't been analyzed

20:30 lynaghk: parse 'def in analyzer.clj

20:31 lynaghk: dnolen: does the analysis of a namespace depend on the contents of other namespaces?

20:31 especially since one cannot define macros within ClojureScript namespaces

20:31 dnolen: lynaghk: yes, parse 'ns will analyze all dependencies

20:32 lynaghk: we can't properly analyze a namespace without understand what's coming from required namespaces

20:33 lynaghk: dnolen: what's an example?

20:33 dnolen: lynaghk: example of what?

20:33 lynaghk: dnolen: of where knowing nothing about other namespaces inhibits full analysis of a namespace

20:34 dnolen: lynaghk: nearly everything around function invocation - optimizing and warning

20:35 lynaghk: I get that you wouldn't be able to emit warnings about, e.g, "foo/bar: no var bar in namespace foo"

20:35 dnolen: lynaghk: if we don't analyze a depended namespace you have to go through generic function dispatch, .call - this means no arity checking, touching arguments object, etc

20:35 lynaghk: (at analysis time, anyway; once you had all namespaces in hand it seems like you'd be able to do that)

20:35 dnolen: how difficult would it be to split that into two passes?

20:37 dnolen: lynaghk: like analyze an entire namespace w/o using that information, and then analyze everything again?

20:38 lynaghk: dnolen: yeah. split analysis into many smaller passes instead of a monolithic side effecting fn

20:38 akurilin: callen, when I want to change the value of sql-color in blackwater, do I just intern a new value over it, or is there a better way? This works, but might be not the most idiomatic.

20:38 lynaghk: dnolen: http://www.cs.indiana.edu/~dyb/pubs/nano-jfp.pdf

20:39 dnolen: lynaghk: yes, I know that, but that doesn't really address what I just said

20:39 lynaghk: the proposal to split cljs compiler into a set of sequential middlewares is basically the same thing.

20:39 callen: akurilin: go with that for now.

20:39 dnolen: lynaghk: you're going to analyze an entire namespace and none of if will be correct because you don't have dependency information

20:39 lynaghk: dnolen: sorry, maybe I misunderstood. (Also, I'm not saying that splitting up the analyzer right now will be a walk in the park)

20:39 callen: akurilin: can make a feature request on github if you like.

20:39 akurilin: callen, cool. I think something like timbre uses atoms for its config settings.

20:40 callen, I can't think of a super compelling reason to want more than that at this point, since it works just fine.

20:40 callen: akurilin: I've got config patterns in my other libraries. I know how to handle it, I just need to know what people want to be able to configure.

20:41 lynaghk: dnolen: sure, plenty of it will be correct. There will just be lots of loose ends about "foo/bar, whatever this is" that gets filled in later on a second pass

20:42 dnolen: alternatively, it could be done on a single pass where the dependent namespaces are explicitly passed in

20:42 dnolen: lynaghk: in theory I like this idea - but I think we're going into the weeds which what I was suggesting earlier

20:42 lynaghk: and the namespaces are all sorted before analysis

20:43 dnolen: lynaghk: which is why I said earlier, enhancements should simply accept the side-effecting nature the namespaces atom

20:43 lynaghk: so using clojure.core/memoize is out of reach right now

20:43 dnolen: lynaghk: to not accept it means a considerable amount of reworking which is unrealistic in any reasonable amount of time.

20:43 lynaghk: and we should have another cache invalidation scheme?

20:44 dnolen: yeah, I hear you---since I'm not doing the rearchitecting myself I can't exactly force the issue =P

20:46 dnolen: lynaghk: I think you can get 90% of benefit of your pipeline concept even w/ namespaces atom

20:46 lynaghk: another thing to consider is what the tensions are here w/ Clojure philosophy that compilation unit is a function, not a module (aka namespace)

20:48 lynaghk: dnolen: yeah, but given how many things hook into *cljs-ns* I thought that namespace-level would be the best I could do.

20:48 dnolen: lynaghk: I just mean wanting to be able to get at namespace in a functional way is somewhat at odds with the way the ClojureScript compiler is constructed

20:50 lynaghk: dnolen: you and I should probably Skype about this sometime before reaching out to Relevance

20:50 figure out what we actually want

20:51 dnolen: lynaghk: yes - it's worth digging into the CLJS internals a bit to see how things are to understand the path towards where you want it to be.

20:51 lynaghk: more than happy to answer any questions you may have of course.

20:52 lynaghk: dnolen: oh, I've been digging around quite a bit lately. Where I want it to be (a more functional compiler) is too far for a near-term plan.

20:53 So I'm content to do per-namespace stuff. Your point about analysis depending on the actual analyzed contents of dependencies is news to me, though---I'll look into that a bit more

20:54 It sounds like the original design (just emit stuff and let Google's compiler clean up and optimize) has evolved into CLJS itself doing more and more compiler-y optimization things

20:54 dnolen: lynaghk: http://github.com/clojure/clojurescript/blob/r1877/src/clj/cljs/analyzer.clj#L633

20:55 lynaghk: emiting invoke's is a total monster http://github.com/clojure/clojurescript/blob/r1877/src/clj/cljs/compiler.clj#L581

20:55 lynaghk: but it uses the information collected during dependency analysis

20:56 lynaghk: dnolen: I wonder if you could do the core.memoize approach if you just passed in the namespaces atom too

20:56 dnolen: lynaghk: all pretty gnarly stuff, but it's also why ClojureScript is pretty zippy

20:56 lynaghk: that's a good idea

20:57 lynaghk: dnolen: memoization for most userland projects is pretty negligable compared to not re-analyzing cljs.core on every build, though

20:57 = )

20:57 dnolen: lynaghk: and then tooling services could simply accept it

20:57 the namespaces map

20:58 lynaghk: dnolen: yep.

20:59 coventry`: Is there a clojure.test macro for "This runs without errors"? At the moment I'm using (is (eval [result])).

20:59 lynaghk: dnolen: fun fact: my interest in redesigning the CLJS compiler interface came out of me designing a build tool.

20:59 endless summer yaks.

21:00 dnolen: lynaghk: heh yes on avoiding reanalysis of core.cljs. changing the compiler to be more disciplined about namespace atom interaction sounds like a good way forward w/o need to rearchitect

21:00 lynaghk: dnolen: I'll keep an eye on that as I start using my proposal redesign. Thanks for the advice!

21:01 benkay_: ,(+ 1 2)

21:01 clojurebot: 3

21:01 coventry`: (Or more generally (is [(f)]). In my case, I am eval'ing something.)

21:08 ambrosebs: coventry`: IIRC thrown?

21:10 justin_smith: coventry`: if what you want is to know it runs without an error (is (do (f-that-may-throw-error) true))

21:10 coventry`: ambrosebs: No, that's to assert that an exception has been thrown. I want to assert that none have been thrown, and make no other claims about the result.

21:10 ambrosebs: coventry`: (not (thrown? ..))

21:10 coventry`: justin_smith: Thanks. I think wrapping the call in a vector is a more concise way of doing that.

21:10 justin_smith: any errors that were not expected by a thrown block are reported

21:10 coventry`: ambrosebs: Oh, you can do that? Great.

21:10 ambrosebs: coventry`: ah i see

21:11 justin_smith: coventry`: but less explicit

21:11 ambrosebs: sorry, just work up

21:11 *woke

21:11 justin_smith: but (not (thrown? ...)) actually reads as the thing you are checking for, which is nice

21:12 with (do (f) true) or [(f)] it is only implied by the language semantics

21:13 coventry`: ambrosebs: Thanks, that works great.

21:13 ambrosebs: coventry`: oh I was right. haha

21:13 ;)

21:13 justin_smith: also, if all you care is that it is not an error, you can just have the call inside a deftest form, no need to even have a call to is, an error will be reported if it occurs

21:17 benkay_: ,(+ 1 2)

21:17 clojurebot: 3

21:19 sinistersnare: ,(* 2 4 6 21 5 7 2134)

21:19 clojurebot: 75287520

21:20 sinistersnare: test

21:20 balls

21:21 justin_smith: ,(*(*)(*))

21:21 clojurebot: 1

21:37 coventry`: I have a repl in which the following form results in the error No method of interface: <namespace>.t. I'm curious about what's going under the hood. I did do a (defprotocol t) earlier in the file.

21:37 ,(fn* ([b c] b (a (inc c))) ([] (a 1)))

21:37 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: a in this context, compiling:(NO_SOURCE_PATH:0:0)>

21:51 clj_newb_2345: anyone her eusing http-kit in production apps?

21:56 justin_smith: clj_newb_2345: nope, I've been happy with ring (for server), clj-http (for synchronous client calls), and http.async.client (for async client)

21:56 clj_newb_2345: how about web sockets?

21:56 justin_smith: no experience with that, sadly

21:56 clj_newb_2345: my alternative is studying netty

21:57 justin_smith: though I have a friend who recommends aleph

21:58 aleph may not perform as well (not sure of that?) but it has a nice functional design

21:58 https://github.com/ztellman/aleph

21:58 jimrthy: I'm using http-kit in something resembling production

21:59 I'm not doing anything fancy or taxing, but it's working a lot better than pretty much anything else on that server.

22:01 ToBeReplaced: so, i'm not a web developer... today i learned that common practice is to load javascript from 10 different social media sites ... wtf?

22:02 does someone have a quick link to show me how to accomplish all the "share" stuff with just html? i'm missing details for some of them

22:03 sinistersnare: ToBeReplaced: why are you asking this in #clojure?

22:03 ToBeReplaced: sinistersnare: just where i usually hang / get quality information -- i can take it elsewhere

22:04 clj_newb_2345: it's reasonable

22:04 sinistersnare: i mean i dont really care, i just think that it might be off topic enough that its not the best place

22:04 clj_newb_2345: for all the login with fb; login with linked in; login with twitter; pin it on pinterest crpa

22:04 SegFaultAX: ToBeReplaced: What do you mean to accomplish all the share stuff with just HTML?

22:04 That's not even a sensical question.

22:04 clj_newb_2345: but yeah, I agree with sinistersnare -- it is off topic for #clojure -- maybe #startups?

22:04 sdegutis: Hey guys.

22:05 SegFaultAX: clj_newb_2345: We're very often not on topic here, I don't think it matters that much.

22:05 sinistersnare: why startups? i think thats for like beginning businesses... maybe #html

22:05 also, #startups is empty...

22:05 sdegutis: Since there's a different set of faces in here than earlier, what do you think of this? https://github.com/sdegutis/clojuredocs/wiki

22:05 sinistersnare: lol jk that was #startups? not #startups

22:05 clj_newb_2345: not always being on topic does not imply we should encourage off topic

22:06 ToBeReplaced: SegFaultAX: ex. create an href to share a URL on facebook instead of using their JS button (legal, and shown here: http://www.sharelinkgenerator.com/ )

22:07 SegFaultAX: sdegutis: 2 things: First, I would group all the ear muffs together in their own category. Second, I would put all the functions/macros that start with a non-alpha numeric into one category. There aren't enough + to warrant its own category, for example.

22:07 ToBeReplaced: Why?

22:07 sdegutis: SegFaultAX: Oh good idea.

22:08 ToBeReplaced: SegFaultAX: load times (solvable), security (not solvable), customizability within their branding laws (solvable)

22:10 SegFaultAX: ToBeReplaced: You said it yourself though, the HTML is just an href. That's not what makes a sharing button though. There is also a bunch of styling and potentially functionality.

22:10 sdegutis: SegFaultAX: Fixed.

22:10 sinistersnare: sdegutis: the titles dont seem to like '-'

22:10 for example the '->' macro

22:11 ToBeReplaced: SegFaultAX: here is what i was looking for: http://thetechstuff.com/how-to/3086/embed-social-buttons-without-javascript-facebook-twitter-google-plus-pinterest-linkedin-digg-stumbleupon-reddit-tumblr

22:11 sdegutis: sinistersnare: That's one downfall of it being a wiki. But it's not a technical limitation, as the page for defn- and defn have two different URLs. It just means the titles on the page itself are sometimes wrong. Not sure how to fix it though.

22:12 sinistersnare: just letting you know, as it was misleading when i first saw it

22:12 sdegutis: I think one way is, if the page begins or ends with a hyphen, it could be replaced with &dash; or something.

22:12 Problem with that is you can't easily find the page by retyping that part of the URL.

22:12 sinistersnare: yep

22:13 SegFaultAX: ToBeReplaced: If you want to cram all your HTML, CSS, and JS together, go for it. I wouldn't recommend it.

22:14 ToBeReplaced: SegFaultAX: there's no JS involved at all... just <a href="blah" target="_blank">

22:14 clj_newb_2345: alright

22:14 SegFaultAX: ToBeReplaced: Did you read all the way through?

22:14 clj_newb_2345: aloha is a nice netty/clojure binding

22:15 SegFaultAX: ToBeReplaced: That article suggest putting everything in-line is all. Less than ideal for sure.

22:16 ToBeReplaced: eh, what's so bad about that?

22:16 the intent is right with the implementation

22:16 SegFaultAX: ToBeReplaced: Same as always, mixing orthogonal concerns. Content, styling, and functionality.

22:19 Really annoys me sometimes that vectors don't have a built-in way to dissoc/remove items.

22:20 justin_smith: SegFaultAX: maybe you want a datatype that can do that without replacing every item before the removal point

22:21 ddellacosta: SegFaultAX: what's wrong with remove?

22:21 SegFaultAX: ddellacosta: Remove doesn't do what you think it does.

22:21 ddellacosta: It's the dual of filter.

22:21 justin_smith: ddellacosta: that does not work by index, which is what I think he wants

22:22 ddellacosta: SegFaultAX: What I think it does is remove the item that you identify with a predicate. It seems to do this…?

22:22 justin_smith: ah, okay.

22:23 SegFaultAX: just curious what you expected it to do; is justin_smith correct?

22:23 SegFaultAX: justin_smith: Sure, but it annoys me that I usually end up writing something like (vec (concat (subvec v 0 i) (subvec v (inc i))))

22:24 technomancy: if you could do that, they wouldn't be vectors

22:24 (that is, they wouldn't be fast at what they currently do)

22:24 SegFaultAX: technomancy: it could use exactly that implementation for all I care.

22:24 justin_smith: yeah, exactly - the way clojure does things is there is an easy shortcut if there is a CPU friendly algorithm, it helps avoid bloated slow code

22:25 SegFaultAX: I just want to give a vector and an index, and get a vector back.

22:25 technomancy: SegFaultAX: that's just asking for memory leaks

22:25 do not want

22:25 xeqi: doesn't subvec hold a reference to the original vector?

22:26 gfredericks: yep

22:26 xeqi: I ended up using https://github.com/wagjo/data-cljs 's finger trees when I wanted removal by index in a recent cljs app

22:27 gfredericks: SegFaultAX: maybe use that new vectors lib?

22:27 SegFaultAX: Then some other mechanism is fine.

22:27 But not being able to remove items from vectors (or rather not having that functionality built in somehow) is sometimes annoying.

22:28 gfredericks: Link?

22:29 gfredericks: SegFaultAX: https://github.com/clojure/core.rrb-vector

22:31 SegFaultAX: gfredericks: Neat! Source is nuts, though.

22:33 ddellacosta: xeqi: that is pretty cool (data-cljs)

22:35 devn: Did anyone notice that Clojure is now in the list of "popular languages" on GitHub?

22:35 * devn high fives all of you

22:35 arrdem: w00t

22:35 * arrdem breaks out the beer

22:36 * sinistersnare cant drink :(

22:36 devn: can you break dance? like, are you physically able to breakdance, however good you might be?

22:36 sinistersnare: yes i am!

22:36 * devn break dances

22:36 sinistersnare: im no good though

22:36 gfredericks: SegFaultAX: huh. yes it is nuts.

22:36 * sinistersnare also breakdances

22:36 * arrdem can't dance for anything

22:37 sinistersnare: did anyone else notice that the /topic hasnt changed in 2 years? :p

22:37 devn: o|< o\< o|< o/<

22:37 sinistersnare: """Topic set by chouser at Wednesday, July 20, 2011, 20:57:2 """

22:37 devn: sinistersnare: this is why technomancy is an op nowadays

22:37 im not sure what should change about it, though

22:37 sinistersnare: no reason, i just think its interesting how it hasnt :D

22:38 SegFaultAX: Could add refheap as the official paste.

22:39 In the /topic that is.

22:39 ddellacosta: what is topic meant to do?

22:39 SegFaultAX: agreed

22:39 justin_smith: #emacs changes their topic to various inside-joke type references that kind of relate to emacs. Then again that channel is 95% off topic.

22:39 SegFaultAX: ddellacosta: Set a topic for the channel. :)

22:39 sinistersnare: refheap is nice

22:39 you should also add that sinistersnare is awesome, but its ok if you dont

22:39 ddellacosta: SegFaultAX: sorry, I mean, what is the point of having a topic? Like, what is the etiquette with regards to topic in IRC?

22:40 sinistersnare: its just a general intro message to the channel

22:40 SegFaultAX: ddellacosta: These days it's usually just useful links and tips for new users like "here's our website/docs, here's how to access the channel bot, don't say "lol", etc."

22:40 ddellacosta: SegFaultAX: gotcha, thanks. Seems like what I thought but don't know much about the history of it.

22:41 justin_smith: refheap is nice, I like the command line integration of sprunge though (for example I have a script that takes the current paste item from the clipboard, sends it to sprunge, and puts the url to access the sprunge paste into the clipboard paste buffer)

22:41 sinistersnare: i hate #python 's |no lol|

22:41 SegFaultAX: ddellacosta: Back in the day, topics were used as sort of an MOTD as well.

22:41 arrdem: sinistersnare: eh #python is so big that no lol is a significant volume reducer

22:42 SegFaultAX: ddellacosta: These days most chanops don't care enough to update topics regularly. Ours is a good example. :)

22:42 ddellacosta: SegFaultAX: haha, gotcha

22:42 sinistersnare: i guess, but sometimes things get off topic, and my childish brain says, lol <rest of statement>, and i get yelled at via /query by a bot

22:42 justin_smith: kind of like hardly anyone bothers having a .plan anymore

22:42 ddellacosta: when I think of .plan, I always think of John Carmack

22:42 arrdem: my local 2600 meet's chan uses the topic to note the next meeting date, but other than that most of the chans I'm in have static topics

22:42 * arrdem sets out to learn of .plan

22:43 SegFaultAX: arrdem: There are still 2600 meetups?

22:43 justin_smith: I think .plan was killed by all the exploits of fingerd

22:43 * SegFaultAX is jelly

22:43 arrdem: SegFaultAX: there's #atx2600...

22:43 sinistersnare: yeah what is a .plan or a 2600? /17-yearold

22:43 arrdem: SegFaultAX: no idea if they still exist elsewhere tho

22:43 SegFaultAX: sinistersnare: 2600 is a very old hacker periodical.

22:43 ddellacosta: arrdem: http://www.catb.org/jargon/html/P/plan-file.html

22:44 arrdem: sinistersnare: http://en.wikipedia.org/wiki/Finger_protocol

22:44 justin_smith: back when peope ran fingerd without getting rooted, .plan was like a more usable facebook

22:44 arrdem: sinistersnare: ^ -2

22:44 sinistersnare: cool

22:44 justin_smith: what is joe up to? finger joe@joes-server.org

22:44 mtp: you can run fingerd without getting rooted

22:44 sinistersnare: ""the .plan file in a user's home directory is displayed when the user is fingered""

22:44 mtp: because we've learned a bit about how not to write fingerds

22:44 SegFaultAX: #bash is a good place to find greybeards that probably know.

22:44 justin_smith: mtp: people stopped using it, because exploits were frequent, is how I remember it

22:44 ddellacosta: justin_smith: ah, those innocent days

22:44 SegFaultAX: Or #perl.

22:44 justin_smith: maybe now there is a safer version

22:44 but the momentum is gone

22:45 mtp: yeah

22:45 arrdem: having <nick>.com seems to be the current equivalent at least for #clojure..

22:46 SegFaultAX: Gotta own your handle.

22:46 justin_smith: yeah, finger/.plan was before you could assume everyone had / used a web browser

22:47 SegFaultAX: Random thought... Now is actually a really good time for there to be a resurgence in "root this box" type wargames.

22:47 arrdem: SegFaultAX: lol metasploit

22:47 SegFaultAX: Now that things like docker exist, it would be cheap and easy to do it securely.

22:47 * arrdem realizes that metasploit is meta exploit and ponders

22:47 SegFaultAX: And you could create a new container per player, so everyone gets a clean environment to hack.

22:48 sinistersnare: this stuff sounds fun!

22:49 SegFaultAX: sinistersnare: Hacking wargames used to be somewhat popular. I don't know if they are now. I would guess probably not.

22:49 arrdem: SegFaultAX: ooh nice idea! some ppl in my area do in person CTFs pretty regularly but dragging docker in could be run

22:49 sinistersnare: i remember a website 'hackthissite.com' or something

22:49 justin_smith: on a much smaller / less real world scale, a clojure version of core wars, where everyone gets their own thread / repl in the same vm could be interesting - I assume certain operations that manipulate threads would need to be nerfed out though

22:49 sinistersnare: so i can see that :p

22:49 SegFaultAX: justin_smith: I've often though of doing something like that in Erlang.

22:49 arrdem: justin_smith: I don't know how you'd do core wars for clojure tho... taking over other threads isn't something you can really do in clojure

22:50 SegFaultAX: justin_smith: Everyone gets n processes.

22:50 arrdem: justin_smith: but it'd be totally fun

22:50 justin_smith: hmm

22:50 well you could also try to starve / crash threads via bugs

22:50 last thread running in the core dump wins!

22:50 arrdem: lol

22:51 justin_smith: for utility, knowing how to fuck with concurrent code is a good step to avoiding doing it accidentaly

22:51 SegFaultAX: Now that you mention it though, it would be cool if someone implemented one of theses types of games entirely out of persistent data structures

22:51 And there was an API that allowed any agent to query the state of the game at any point since it started.

22:52 justin_smith: instant replay built in

22:52 heh

22:52 SegFaultAX: That too.

22:53 justin_smith: the competition would get owned by people with elisp nrepl triggers

22:53 (my prediction)

22:53 arrdem: so... what happens if you alter-var-root on a recursive fn?

22:53 justin_smith: you win

22:53 arrdem: right

22:53 SegFaultAX: Sandbox.

22:53 arrdem: so you use the ns tools to enumerate all the def'd symbols

22:54 SegFaultAX: nah. just eval everyone's code in a single ns!

22:54 allow for cross thread IO by f*cking with symbol defs!

22:54 justin_smith: this is starting to sound kind of fun

22:54 arrdem: kinda like the old redcode bomber... just enumerate symbols and nill em out!

22:55 justin_smith: there could also be a less real-time version, like the original core wars - more like pokeman where it is all about putting the right fighter in the ring

22:55 SegFaultAX: arrdem: Since you typed f*cking: http://www.youtube.com/watch?v=dF1NUposXVQ

22:55 arrdem: lol george carlin. seen it.

22:56 SegFaultAX: do we have an official cursing policy? I try not to and this is largely a polite channel...

22:56 mod today's blowup

22:56 SegFaultAX: arrdem: George Carlin... really?

22:56 sinistersnare: i mean, were all adults here (except for me i guess, i meant mentally..) so why not?

22:56 * arrdem derped

22:56 sinistersnare: as long as its not cursing people out

22:57 SegFaultAX: arrdem: But you miss the point. Saying f*ck vs. fuck makes aboslutely no difference. Your intent is the same, and that's all that matters.

22:57 arrdem: eeeh... but the counter argument is that it doesn't add anything to the discourse. it's just an emphisis modifier.

22:57 sinistersnare: oops. ^

22:58 SegFaultAX: yep. which is why I don't usually. my apologies.

22:58 sinistersnare: oh idk if there is, whatevs

22:58 :p

22:59 SegFaultAX: arrdem: I'm not offended. I'm just saying, if you're going to use a word, use the damn word. Don't rely on my string interpolation.

22:59 sinistersnare: lol

22:59 damn, i guess that was a useless phrase :/

22:59 arrdem: devn: why'd you just go star 37 things in two minutes?

23:00 justin_smith: sinistersnare: l*l

23:00 * arrdem contemplates a string interpolation plugin for lazybot

23:00 sinistersnare: justin_smith: no l*l allowed

23:00 justin_smith: no, no, l*l is the way around the |no lol| rule

23:00 arrdem: sinistersnare: you just banned l, ll, lll, llllll.... but not lol

23:00 sinistersnare: if lazybot sees fu*k, then it just sends out, "i think you meant FUCK"

23:01 SegFaultAX: Unless the rule is no #"l.l"

23:01 sinistersnare: arrdem: oh balls...

23:01 * arrdem does the nerd victory dance

23:01 justin_smith: depends if this is regex interpolation of globs, or sh style

23:01 SegFaultAX: justin_smith: That's why I used . and not *

23:02 arrdem: any oppinions on Nightcode? I glanced at it, but as with LightTable I went back to doing work in emacs without trying.

23:03 sinistersnare: arrdem: i like it!

23:03 justin_smith: I have heard some funny things about behaviors of automatic sanitizers; I bet you could make automatic offensive term interpolators do funny things as well

23:03 sinistersnare: but i dont really do enough clojure (no free time/ im no good at it) to do much

23:03 arrdem: cat /usr/share/badwords

23:03 justin_smith: "buttociated"

23:03 SegFaultAX: sinistersnare: If you're not careful, I could see some real problems.

23:03 f.*ck: "blah blah blah firetruck" I THINK YOU MEANT FUCK!

23:04 sinistersnare: LOL

23:04 the best bug possible

23:04 arrdem: okay, so we lock the bathroom doors and no-one leaves #clojure until the bots can pass the turing test. string interpolation problem solved.

23:04 brehaut: justin_smith: "buttbutton"

23:04 err "buttbuttin"

23:04 justin_smith: heh, yeah

23:05 arrdem: that or cljs targets C whichever comes first

23:05 devn: arrdem: how did you know that?!

23:05 arrdem: oh right, it's public

23:06 arrdem: i'm likely going to be contributing to the changelog and am making a list of projects and people who have been active recently

23:06 SegFaultAX: TIL arrdem is a wizard.

23:06 arrdem: devn: just lurking in that black van across the street three doors down watching the packet stream nbd

23:06 SegFaultAX: nah I'm only in the top 32% of clojure users. yall outrank me still.

23:07 devn: you'll be there quick enough

23:07 brehaut: arrdem: clojurebot already spans three VPSs and is enterprise ready. its also possibly sentient just extremely eccentric

23:08 Brand0: hmmmmm

23:09 arrdem: brehaut: as long as it isn't buying its own VPSs and spinning up new instances I'm not convinced that it's alive.

23:10 brehaut: hard to say

23:10 gfredericks: maybe it just finds those activities boring

23:11 SegFaultAX: Maybe it's too busy designing deep thought.

23:11 arrdem: if lazybot developed a HDL DSL for Clojure I for one would not be mad.

23:17 grandy: i have a fairly dumb question about clojure and threading, anyone care to humor me? It's about serial-port ...

23:18 arrdem: ~anyone

23:18 clojurebot: anyone is anybody

23:18 arrdem: -_____-

23:18 Raynes: grandy: Question.

23:18 brehaut: thanks clojurebot

23:18 arrdem: Raynes: thank you.

23:19 grandy: ok so using serial-port/on-byte seems to work w/o me having to set up a separate thread ... not sure if it would be blocking if run outside of a repl or if it just works this way in clojure

23:20 see i told you it was dumb

23:21 OneFourSeven: Hey guys. I was wondering if it's possible to expose another library's functions in my library. Like if I wanted to build a monolithic framework and wanted to expose Hiccup for templating.

23:21 arrdem: OneFourSeven: is it possible, yes. should you do it? no.

23:22 grandy: except in very strange circumstances if it works in the repl it should "just work"

23:22 brehaut: OneFourSeven: the first problem is you want to build a monolithic framework

23:22 OneFourSeven: arrdem: How do you suggest I approach building a web framework?

23:22 brehaut: OneFourSeven: you dont

23:22 technomancy: OneFourSeven: use Compojure for a month. if you still want to build a web framework, we can talk.

23:23 arrdem: OneFourSeven: the last major framework, noir, was abandoned for not really having a purpose.

23:23 brehaut: OneFourSeven: monolithic frameworks are antithical to the idioms preffered by the clojure community

23:23 grandy: arrdem: ok that's great.

23:23 OneFourSeven: Yeah that's what I figured :|

23:23 But I feel like whenever I start a new app with compojure I keep rebuilding a lot of stuff

23:23 brehaut: OneFourSeven: have you looked at Luminus

23:25 arrdem: M-x google-this ftw!

23:25 s4muel: OneFourSeven: if you're doing a lot of prototyping you should make a lein-template with your usually-used libs, a default logging setup, etc.

23:26 arrdem: mongodb interface code... man that stuff is boilerplate

23:27 xeqi: technomancy: I want to build a web framework

23:27 arrdem: brehaut: curse you now I'm adding all these cleanups of of my blag to the todo list

23:27 brehaut: arrdem: lol

23:28 OneFourSeven: Thanks s4muel. I'll look into that.

23:30 arrdem: what's the profile.clj option to automagically (require) in libs?

23:32 technomancy: arrdem: for the repl or in general?

23:32 arrdem: technomancy: if repl covers an nrepl then general is to be avoided.

23:33 technomancy: arrdem: you can put a require for in :repl-options {:init (require 'foo)}

23:34 arrdem: technomancy: awesome thanks.

23:35 technomancy: np

23:35 grandy: is there a way to get nrepl to re-eval an entire buffer?

23:35 arrdem: herp derp rtfm. https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L286

23:35 coventry`: I'm trying to clone clojure.core into a separate namespace, by parsing and eval'ing its forms (https://www.refheap.com/18466). All goes well until I hit (load "core_proxy"). That fails with the complaint "Could not locate core_proxy__init.class or core_proxy.clj on classpath". Why does this work in core.clj, but not in my constructed context?

23:35 s4muel: grandy: emacs? C-c C-k

23:35 grandy: s4muel: perfect

23:36 technomancy: coventry`: maybe load checks relative paths?

23:37 coventry`: technomancy: Yep, that's what it is...

23:37 (doc load)

23:37 clojurebot: "([& paths]); Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise."

23:39 coventry`: Thanks. I guess i have to change the namespace's root-directory somehow.

23:40 technomancy: I would special-case load instead

23:41 it's a weird edge case

23:41 unless you only intend to perform this operation on clojure.core

23:43 coventry`: Good idea. Not sure whether I'm going to be applying this tool to entire files. I'm just cloning all of core as a robust test case for it at the moment.

23:45 calebmpeterson: ,(+ 1 2)

23:45 clojurebot: 3

23:46 calebmpeterson: ,(filter even? (range 0 20))

23:46 clojurebot: (0 2 4 6 8 ...)

23:47 amalloy: calebmpeterson: you can /msg the bots if you just want a repl to play with

23:57 justin_smith: regarding OneFourSeven's question about exposing another library - what does expose even mean in this context? is there anything that would normally be hidden in the first place?

23:57 or maybe he meant provide

23:58 arrdem: justin_smith: no. if I build an app atop B and B depends on C, I can use C freely

23:58 justin_smith: but it's good practice to use C explicitly rather than rely on the dependancy

Logging service provided by n01se.net