#clojure log - Nov 02 2013

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

0:06 biggbear: ,(defn <? [x y this then] (if (< x y) this then))

0:06 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

0:07 biggbear: ,(defn fun [x y] (<? x y :ordered (fun y x)))

0:07 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

0:08 biggbear: this last function is throwing StackoverFlowExeption when evaluating (fun 2 1)

0:11 swarthy: biggbear: I'm not sure-- still new to clojure but maybe look at using loop/recur instead of calling fun within fun

0:11 ,(defn fun [x y] (<? x y :ordered (recur y x)))

0:11 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

0:12 hiredman: biggbear: clojure is strictly evaluated

0:12 before calling <? all the arguments are evaluated

0:12 which is another call to fun, which is another call to fun, which is another call to fun, etc, etc

0:13 of course the stack overflowed

0:14 biggbear: hiredman then this is where macro comes?

0:14 hiredman: no

0:14 this where you read sicp and learn about using recursion

0:15 biggbear: ok great.

0:15 swarthy: i don't know the <? function, but you need an exit condition or you recurse forever

0:15 hiredman: ~sicp

0:15 clojurebot: sicp is http://www.codepoetics.com/wiki/index.php?title=Topics:SICP_in_other_languages:Clojure:Chapter_1

0:15 hiredman: feh

0:15 ~sicp

0:15 clojurebot: sicp is http://web.mit.edu/alexmv/6.001/sicp.pdf

0:15 biggbear: sicp ok

0:15 xuser: The Little Schemer is great for learning recursion

0:16 biggbear: thanks swarthy :) very appreciated

0:17 muhoo: wow, lein-cljsbuild hates lein-pedantic. a lot.

0:22 long, but that was a fun 10 minutes of trying to get cljs working, i guess i'll wait a few more months https://www.refheap.com/20394

0:24 swarthy: muhoo: have you read David Nolens newest article on getting CLJS up and running?

0:25 http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/

0:25 not sure if it will help you or not

0:25 but there it is

0:27 muhoo: swarthy: that is what failed, yes.

0:27 i was using his lein plugin to generate that project. lein-pedantic hates it very much

0:29 and i'm still stuck on the old lein-pedantic because new lein doesn't appear to have the feature of suggesting what dependencies to use to resolve the conflict yet.

0:29 swarthy: lein deps :tree ?

0:30 is this relevant: http://swannodette.github.io/2013/10/27/the-essence-of-clojurescript/

0:30 https://groups.google.com/forum/#!topic/clojure/9cA5hvFJTkw

0:30 sorry wront paste

0:31 wrong*, meant that google link

0:37 muhoo: naw it's a problem with lein, and it looks like 2.3.3 finally incorporates lein-pedantic, so i can migrate.

0:37 and, cljsbuild now works. nice.

0:39 though there is fun stuff like https://www.refheap.com/20395 ... a conflict deep inside a plugin

0:39 internally inconsistent within the plugin, hmm, might try to patch that

0:40 interesting, clojurecript includes clojure/data.json instead of cheshire

0:40 i thought cheshire was a lot faster/better

0:42 amalloy: muhoo: cheshire isn't a contrib lib

0:42 muhoo: what do you mean by contrib?

0:43 ooh cool, "lein assoc :pedantic? :warn check" gets pretty damn close to old lein-pedantic

0:43 technomancy: lein-assoc?

0:44 oh, apparently I wrote that

0:44 muhoo: haha

0:44 technomancy: lein update-in is built-in and more flexible FWIW

0:44 jared314: did you write lein repl too?

0:44 muhoo: this was kind of not so meaninful tho https://www.refheap.com/20399

0:45 technomancy: thanks, will use that now.

0:45 technomancy: jared314: the server side; the client side is by trptcolin

0:45 well, arguably cemerick wrotce the server side

0:45 anyway, I wrote a bit of it

0:46 jared314: because i'm trying to dynamically add nrepl middleware from a lein plugin

0:46 muhoo: technomancy: how would one update-in at the root level of the project?

0:46 i.e. to add :pedantic? :warn ?

0:46 technomancy: muhoo: update-in : :pedantic? :warn

0:46 the top level is special-cased as :

0:46 muhoo: : , thanks

0:46 technomancy: which is kinda weird but whatevs

0:46 muhoo: should be in docstring, maybe?

0:47 cause lein help update-in didn't mention it afaict

0:47 technomancy: it is =)

0:47 muhoo: ah, there it is, thanks.

0:47 technomancy: I guess the wording is a bit awkward

0:48 muhoo: might just need more examples maybe

0:48 technomancy: sure

0:48 muhoo: btw, above goes java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to clojure.lang.Symbol

0:49 lein update-in : :pedantic? :warn check

0:49 technomancy: right; you have to indicate the end of the updat-ein with --

0:50 muhoo: and assic os needed, great. so this works:

0:50 lein update-in : assoc :pedantic? :warn -- check

0:51 * muhoo updates his .emacs to add that to a keybinding

0:51 technomancy: or a shell alias?

0:52 muhoo: technomancy: https://www.refheap.com/20400

0:52 technomancy: oh nice; do you get hyperlinked line numbers for that?

0:52 muhoo: i do, and it didnt' work for a while but seems to now

0:53 hyperlinked line numbers started working a few days ago and i'm not sure what changed

0:53 technomancy: I feel like that should be part of clojure-mode but it isn't

0:54 muhoo: the problem was clj-stacktrace mangling the line numbers, IIRC

0:55 couple people were talking about it last week

0:55 technomancy: oh yeah ,the regex is probably expecting boring vanilla ones

0:55 we should get a regex in clojure-mode that does both

0:55 muhoo: whre is clojure-complete coming from?

0:56 i get this a lot : https://www.refheap.com/20401

0:56 technomancy: one of them is coming from lein's :base profile

0:56 no idea about the other

0:56 muhoo: and it's not too clear from the :tree where it is

0:57 anyway, thanks for getting at least some of pedantic's features into mainstream lein

0:57 technomancy: by the time :tree gets it the profiles have already been merged unfortunately

0:57 muhoo: oh. so maybe it's coming from my profiles.clj then

0:57 technomancy: likely the :user profile, yeah

0:59 muhoo: thanks again, that makes sense. i'll bisect it and see what comes up. there's a lot of crap in my :user

0:59 technomancy: np

0:59 muhoo: i.e. https://www.refheap.com/20402

1:01 technomancy: huh; I don't expect any of those have it, but who knows

1:01 life is full of surprises

1:03 ddellacosta: muhoo: I see that a lot. I looked into it once and it was some CLJS lib (piggieback?) so maybe that's a clue...ken-cljs-2/lein-template perhaps? (https://github.com/kenrestivo/ken-cljs-2/blob/master/src/leiningen/new/ken_cljs_2/project.clj)

1:03 lots going on there

1:09 jared314: the nrepl middleware project entry for lein repl can be a list of vars or symbols right?

1:15 nm the source says yes

1:15 muhoo: ddellacosta: all my wacky custom crap, yeah

1:17 ddellacosta: i was attempting to roll my own framework

1:23 jared314: is there any way to confirm an nrepl middleware is loaded in the lein repl?

1:47 when leiningen does a project/merge-profiles does it use any of the existing keys in the map?

1:50 dobry-den: damn, lamina/aleph are sick

1:51 i was pretty much rolling my own hilariously bad lamina on top of core.async

2:28 amalloy: dobry-den: isn't core.async already a lamina-alike?

2:41 dobry-den: amalloy: i thought so, then i gave lamina a shot since it worked with gloss (and aleph on top of lamina and gloss)

2:42 lamina is higher level and async

2:42 than*

2:42 or it has a lot more things already built for you rather

2:43 amalloy: mmmmmm, i'd say that lamina covers a lot more levels. it has low-level scheduling stuff, on top of which it builds things that are similar to core.async; but zach has put a lot more time into it and still more things are built on top of that

2:43 dobry-den: yeah exactly

2:44 now i'm using aleph and it cleaned up a comical amount of code for me

2:47 amalloy: <3 ztellman

3:20 ddellacosta: hmm, having trouble getting lein ring to pick up resource changes. I've set auto-reload? to be true, and added "resources" explicitly to the reload-paths vector in the :ring section in my project.clj. Running it like: lein ring server-headless. Anything I'm forgetting?

3:21 ....although, I thought resources was in the classpath already, so I shouldn't even need to configure the reload-paths arg...?

3:27 bitemyapp: ddellacosta: what sort of resources?

3:27 ddellacosta: bitemyapp: html in this case.

3:27 bitemyapp: using stefon for other stuff.

3:27 bitemyapp: ddellacosta: templates or static?

3:28 ddellacosta: bitemyapp: templates.

3:28 bitemyapp: ddellacosta: what kind of templates? what library?

3:28 ddellacosta: bitemyapp: hmm, good point--I wonder if static stuff is fine

3:28 bitemyapp: enlive pre-processing of html, using deftemplate.

3:28 bitemyapp: ddellacosta: not to ask the obvious, but are you caching or memoizing?

3:28 ddellacosta: bitemyapp: right, I wonder if enlive is caching it regardless of lein settings...excellent use of the Socratic method sir. :-)

3:29 bitemyapp: ddellacosta: https://groups.google.com/forum/#!topic/enlive-clj/L9A7nlHhu-k

3:29 ddellacosta: all signs point to...yes

3:29 ddellacosta: bitemyapp: yep.

3:29 bitemyapp: ddellacosta: the solution is in that thread.

3:29 ddellacosta: I'm going to start charging for googling peoples' problems someday.

3:29 and on that day, I will be a rich, rich man.

3:30 ddellacosta: bitemyapp: you are a mensch.

3:30 bitemyapp: Google query that got us this answer: enlive deftemplate caching

3:30 ddellacosta: I want to be a rich mensch. :P

3:30 ddellacosta: bitemyapp: yeah, my main problem was I was completely sidetracked by thinking this was a lein issue.

3:30 bitemyapp: this is why we bring second-brain in.

3:30 ddellacosta: ddellacosta: yep. Again, thank you, thank you.

3:30 bitemyapp: also it tickles me silly that the Chinese for computer is "electric brain"

3:30 ddellacosta: oh it's no problem. you know that.

3:30 I just like beign Mr. Fix-It.

3:31 ddellacosta: bitemyapp: I owe you yet another beer/tea for when we are finally hanging in person. ;-)

3:31 bitemyapp: being*

3:31 ddellacosta: bitemyapp: is it really? that's awesome (re: Chinese word for computer)

3:31 bitemyapp: the Japanese is boring; it's just the English word with a Japanese pronunciation (like most computing terminology in Japanese)

3:32 bitemyapp: ddellacosta: slap a kana on it and pronounce it with mouth-marbles is the Japanese way.

3:32 abaranosky: what's poppin

3:32 bitemyapp: abaranosky: talking about Chinese and Japanese words.

3:33 bumping into obnoxious enlive behavior.

3:33 abaranosky: Wo shi meiguo ren.

3:33 bitemyapp: ddellacosta: I like that the Chinese make some words like that (not all) "their own" by forming Old-English style word kennings.

3:33 abaranosky: indeed you are.

3:33 ddellacosta: that is indeed cool. I love that kind of stuff.

3:33 what does that mean, abaranosky ?

3:34 bitemyapp: makes Chinese vocab a lot of fun.

3:34 ddellacosta: "I am an American"

3:34 ddellacosta: that's Chinese huh?

3:34 ah, haha

3:34 abaranosky: Mandarin

3:34 ddellacosta: ah

3:34 one of these days, I will study Mandarin...

3:34 bitemyapp: ddellacosta: which might actually mean "Please rip me off" in pragmatic terms.

3:34 ddellacosta: first is Spanish though...

3:34 bitemyapp: haha

3:34 bitemyapp: ddellacosta: why Spanish?

3:34 abaranosky: Wo bu shi zhonguo ren!

3:35 Ni shi meiguo ma?

3:35 ddellacosta: bitemyapp: because I'm the only one in my immediate family that doesn't speak, and my brother-in-law is Argentinean

3:35 abaranosky: :)

3:35 ddellacosta: wait, does that first one mean something to do with not being Chinese?

3:35 also, Spanish is hella useful

3:36 bitemyapp: ddellacosta: yep, I'm not chinese.

3:36 ddellacosta: I just wrote hella in the Clojure channel, someone hit me

3:36 abaranosky: I impressed my girlfriend by asking the Chinese waiter, who was having a harder time understanding that I wanted some rice, by saying "fan"... hehe.. I'm pretty advanced :P

3:36 ddellacosta: nice, somehow I figured that out...

3:36 bitemyapp: ddellacosta: *I* say hella because I live in the bay area - what's your excuse?

3:36 abaranosky: how much Mandarin *do* you know?

3:36 ddellacosta: bitemyapp: I hang out with people from the west coast sometimes

3:36 abaranosky: that's about it :P

3:36 ddellacosta: abaranosky: that's cool. I wish I had even that much Chinese. You can get a lot of mileage out of a little.

3:36 bitemyapp: ddellacosta: second one is, "you from the US?" I think.

3:37 abaranosky: wish is a four letter word

3:37 ddellacosta: ah, gotcha

3:37 heh, so 'tis

3:37 abaranosky: "Are you American?" I believe

3:37 bitemyapp: idioms in Chinese being what they are and all that.

3:37 I'm actually monolingual. My English is quite good, but I wish I wasn't mono.

3:38 I just remember bits of pieces of previous dabblings.

3:38 ddellacosta: bitemyapp: yeah, I mean, it's a common thing with us Americans.

3:38 bitemyapp: but it's tough if you don't have the environment to force you to speak every day.

3:38 bitemyapp: Looks like round-trip tickets from SFO to Tokyo (Narita?) are ~$1k

3:39 Going to mark that down as a plus for living on the West coast.

3:39 ddellacosta: I have a secret dream of dating somebody multi-lingual so I can have an excuse to bust out of being mono.

3:40 ddellacosta: bitemyapp: yeah, it's not a bad cost from the west coast. Come on out. ;-)

3:40 bitemyapp: ddellacosta: I'm due for a vacation, I've only taken one in 7 years.

3:40 abaranosky: bitemyapp: my girlfriend is a Portuguese speaker....

3:40 ddellacosta: bitemyapp: re: dating a speaker of a foreign language, I can say it definitely works wonders.

3:40 bitemyapp: abaranosky: brazilian or portuguese?

3:40 abaranosky: but she never wanted to speak with me... I used to want to speak it with her, and learn etc

3:40 Azorean Portuguese

3:40 ddellacosta: abaranosky: are you learning Portuguese? That's a cool language. I like how it sounds.

3:41 abaranosky: no, she neer wanted to speak it, and then I gave up caring :)

3:41 bitemyapp: Nuts.

3:41 abaranosky: I think she thinks she's not that good at it or something

3:41 ddellacosta: abaranosky: it's really tough to get over the initial hurdle of speaking if you can't handle a normal conversation (dunno if you can or not, just saying). My wife basically had to go away and study English separately before we could use it in daily life.

3:41 clojurebot: It's greek to me.

3:41 bitemyapp: lol @ clojurebot.

3:41 abaranosky: nice ^^

3:42 ddellacosta: yah, perfect, haha

3:42 abaranosky: ah, well, that sounds like a different problem...

3:42 bitemyapp: ddellacosta: wow, that's intense. I knew Japanese people were often bad at English, but I didn't know it was that bad.

3:42 ddellacosta: one of the hardest parts of learning to speak Japanese (to my mind, anyway) is that if you don't have daily exposure the enunciation patterns are very obvious or familiar to an English speaker.

3:42 ddellacosta: bitemyapp: I mean, they learn a ton of vocabulary--so she will often know how to say random stuff like "particulate matter" and whatnot. But having a conversation is way different.

3:43 bitemyapp: the words "roll" in a way American English speakers don't do often (IMO)

3:43 ddellacosta: ...particulate matter? lolwut

3:43 ddellacosta: bitemyapp: yeah--the biggest difference there is that it's a lot "flatter" intonation-wise.

3:43 yeah, right? haha

3:43 bitemyapp: yeah, the flatness. Precisely.

3:43 ddellacosta: but it is easy at first if you just try to pronounce things with a monotone.

3:43 you can begin to add accents once you are more comfortable

3:44 bitemyapp: I'm also paranoid about suffering from that effect where if you as a guy, learn Japanese from a woman, you can end up sounding a bit girlish apparently?

3:44 ddellacosta: bitemyapp: ...sadly, yes. It's kind of unavoidable. I have tried hard to weed that out but I still say things in a feminine way at times, apparently.

3:45 bitemyapp: I mean, I don't actually care *that* much, since I'm not particularly bothered by these kinds of gender issues

3:45 I think it probably bugs my wife more than me

3:45 bitemyapp: Oh sure, but it could put you on the wrong foot in an awkward situation.

3:45 ddellacosta: bitemyapp: yah, I mean, I'm a foreigner so I'm already on the wrong foot. ;-)

3:45 I get cut a *lot* of slack.

3:46 sritchie_: seangrove: did you ever figure out your AOT issue?

3:46 abaranosky: just make fun of yourself a lot, and laugh at yourself... they'll just consider you a crazy American :D

3:46 ddellacosta: abaranosky: yep. :-)

3:47 abaranosky: better yet, say intentionally ridiculous things

3:48 bitemyapp: "I have a huge cat in my pants"

3:48 abaranosky: and see if anyone says anythign... or if they try to be polite... (rofl)

3:48 sritchie_: about the AOT issue...

3:48 bitemyapp: I wonder if it's because tools.reader is AOT

3:48 bitemyapp: "I travel through time via tuna"

3:48 sritchie_: https://github.com/clojure/tools.reader/blob/master/project.clj

3:48 against a future version of clj

3:48 abaranosky: so a guys walks into the bar... and he has an AOT issue

3:48 bitemyapp: sritchie_: wrong person ^_^

3:48 sritchie_: whoops, meant Bronsa

3:48 autocomplete fail

3:48 bitemyapp: unless you want to shanghai me into working on compilers :P

3:49 I don't advise it. I make a big mess.

3:49 sritchie_: Ijust need seangrove's solution :)

3:53 ddellacosta: bitemyapp: If I'd just read the enlive docs: https://github.com/cgrand/enlive#auto-reloading-112

3:53 bitemyapp: ddellacosta: I won't say it happens to the best of us, because it actually happens to all of us.

3:53 ddellacosta: bitemyapp: ha

3:53 RTFM strikes again

3:54 granted, it's completely unclear how to use this

3:54 abaranosky: I still think keywords are overrated

3:54 do we relaly need three ways to make stringy things?

3:54 bitemyapp: yes

3:54 devn: just caight that out of context

3:54 caught*

3:54 but what are you talking about overrated?

3:54 abaranosky: I said it mostly out of context :D

3:54 bitemyapp: it's an older conversation. I think having strings, symbols, and keywords be distinct things is great.

3:55 devn: bitemyapp: it does cause some problems

3:55 bitemyapp: abaranosky is a goddamn heathen and doesn't appreciate the Lispy awesomeness and should go write TCL as penance until he understands his sins.

3:55 abaranosky: :P

3:55 bitemyapp: TCL is directly relevant to why I think having keywords and symbols is awesome.

3:55 psychotic language for psychotic nihilists.

3:55 devn: it annoys me that clojure.walk has stringify-keys but not stringify-symbols

3:55 abaranosky: I am spending an hour converting some stuff to use strings, because the annoying hoopa I have to go through to deserialize the keywords

3:56 devn: i wish that would get fixed

3:56 bitemyapp: devn: this is why everybody has util namespaces and libraries.

3:56 abaranosky: I mean... I can't complain

3:56 devn: that sounds like a punchline

3:56 abaranosky: Clojure's annoyances are tiny in comparison to literally every other lang

3:57 but I'll complain anyway

3:57 bitemyapp: Has anybody bothered to do a write-up comparing stream fusion and reducers?

3:57 devn: in fact, that is a sort of punchline, more of a tag -- Dom Irrera in the Big Lebowski

3:58 bitemyapp: oh dear sweet god: https://github.com/aamedina/core.reducers.async

3:58 too bad he didn't do anything

3:59 oh well, at least he linked the stream fusion paper.

3:59 this is going to end in me reading Wadler and Oleg. I need sleep tonight.

4:02 abaranosky: so has anyone dug into the core.async implementation?

4:03 bitemyapp: depending on what you're trying to get out of it, you might want tbaldridge's videos that he did on deep code-walking macros and the Go macro itself.

4:03 abaranosky: I saw a talk about core.async at the last Clojrue meetup in San Mateo, but it was about how to use it, not how it is implemented... so I got interested in reading the source more

4:03 bitemyapp: yes, I watched them

4:03 that's some of the more educational Clojure material I've read in a while.

4:04 bitemyapp: I find the high level patterns more interesting because core.async is actually pretty spare and low-level relatively speaking (intentionally)

4:05 abaranosky: you mean the patterns of how to compose core.async?

4:05 bitemyapp: yes but I'm specifically thinking of things like pipe and conduit from Haskell-land.

4:05 more familiar might be Lamina.

4:06 abaranosky: I've got plenty to learn there

4:06 bitemyapp: abaranosky: point being to enable very declarative but still composable and powerful ways of expressing async dataflow.

4:08 abaranosky: I guess I've never worked on a projected that really needed async dataflows

4:08 it's hard for me to make the usecase feel concrete

4:09 bitemyapp: abaranosky: what is interesting about core.async to you?

4:09 are you using it as a way to understand Clojure better?

4:10 abaranosky: bitemyapp: understanding how it works so I can write better code

4:10 btu also, understanding good use acase for it

4:10 *but also understanding good usecases for it

4:11 I already learned some techniques to help me improve my print-foo library :)

4:14 pretty interesting to see a legit use case for a state monad approach in Clojure too

4:15 bitemyapp: 'specially if you need rollback.

4:15 that's half of what Haskellers use it for.

4:17 abaranosky: bitemyapp: were you saying you like Haskell for deploying machines?

4:17 We're investigating alternatives to Chef at work... any thoughts?

4:17 bitemyapp: abaranosky: not precisely. I use Haskell the same way Facebook uses Pytohn.

4:17 and probably similar to how technomancy uses OCaml.

4:18 actual remote orchestration, provisioning, and deployment are done with Python for now because it's "easy", but I've been considering working on some automation tooling to replace that with Haskell.

4:18 More typically, I use Haskell where I need little deployable executables/scripts that are more sophisticated than I'd like to do use an actual scripting language for, but can't be run as a daemon or service with Clojure.

4:19 fast starting binaries, Lisp, concurrency - pick two.

4:19 FSB + concurrency -> Haskell, FSB + Lisp -> Common Lisp (ick), Lisp + Concurrency -> Clojure

4:20 actually, I'm being a little unfair WRT concurrency and Common Lisp, but there's definitely no STM which is kinda my bare-minimum these days.

4:20 abaranosky: so uh, as far as Chef goes, I use Fabric + Cuisine + Cuisine-PostgreSQL + Cuisine-Sweet

4:20 Cuisine is explicitly designed to provide idempotent semantics for your scripts in Fabric like Chef.

4:20 abaranosky: I think Fabric is something being considered

4:20 bitemyapp: except Fabric is more straight-forward than Chef and a fair bit simpler.

4:21 abaranosky: Also Rex, a Perl Fabric

4:21 I really dislike Chef

4:21 bitemyapp: I'm considering finding or building a Fabric + Cuisine'ish library for Haskell.

4:21 I hate Chef and Puppet both.

4:21 Ansible, Salt, and Fabric are the most plausible choices and Fabric is the one I know best and am the most productive in.

4:22 abaranosky: Something more straightforward the Chef is all I really care enough to vote for, since I am not heaivly involved in that part of the tech sphere

4:23 I'm much more heaivly focused on doing Clojure backend services, so whatever they find that is nice and clean, and keeps people happy, then I'm all for it

4:23 bitemyapp: the real problem with most libraries like this, and is partly why Chef and Puppet are designed the way they are, is that ssh clients are a massive...MASSIVE pain in the ass.

4:23 Fabric has all the ssh related bugs and issues nailed down and if I attempted a migration of that part of my work to Haskell I'd probably end up in ssh-hell

4:24 abaranosky: Fabric is much more straight-forward than Chef - just make certain you use Cuisine and the third-party Cuisine stuff :)

4:24 abaranosky: Cuisine... are those like recipes?

4:24 bitemyapp: abaranosky: I can share examples from my work stuff if you want to see idiomatic and non-trivial Fabric scripts

4:24 Cuisine is a library built on top of fabric. It might be easier if I just show code.

4:24 abaranosky: yes... I can forward them on to other cguys at work

4:24 bitemyapp: incidentally, my fabric scripts that I wrote recently are for deploying a Clojure app server and Datomic

4:25 so it at least has some overlap with what you're up to.

4:25 fortunately I work at a company that is very permissive WRT non-core intellectual property ;)

4:27 abaranosky: bitemyapp: that's cool

4:27 bitemyapp: have you heard of Rex? Supposedly Fabric is a Python Rex, or vice versa

4:27 bitemyapp: nope. I've done a very good job of avoiding Perl.

4:28 I started out doing dev-ops and stuff in that realm with Ruby

4:28 then Python, now a mix of Python and Haskell.

4:28 abaranosky: yeah.. not sure what they see in the Perl, over Python... but I'm sure they *do* see something useful about it, because they're very good engineers

4:28 bitemyapp: eh fuck it. I'm just going to open source these as fabric recipes and do the sanitization process entailed.

4:29 abaranosky: you'll have a github link from me by the end of the weekend ;)

4:29 I got my migration toolkit for Datomic working, I'll have to open source that next week.

4:30 abaranosky: how much have yo been using Datomic?

4:30 bitemyapp: abaranosky: it's been my whole world the last month or two.

4:30 so it has joined my "has used in anger" bucket

4:30 with "used in anger" being figurative and literal.

4:31 I was both solving a problem and vanguarding technical options for a future project.

4:31 how I managed to squeeze some Clojure and Datomic into my 99% Python company that quickly is a mystery to all.

4:31 borkdude: bitemyapp what does your migration toolkit do exactly?

4:31 bitemyapp: borkdude: not a whole lot right now, lets you pass a mapper fn for translating the datoms.

4:32 borkdude: I can't really answer your question in detail unless you hint at how much you know about Datomic.

4:33 borkdude: bitemyapp I have built one that writes a schema version number into datomic and scans a directory for edn files for updates and applies them according to the current schema version, along with the possibility of applying functions to them

4:33 bitemyapp: ...edn files?

4:33 I'm not sure why edn files would be involved.

4:33 borkdude: bitemyapp they contain the datoms that will update the schema

4:34 bitemyapp: you're talking about something else

4:34 I have that too

4:34 when I say migrations, I mean changes to existing defined attributes.

4:34 what you're talking about is a 5 line gen-schema fn in my @work project, I'm talking about 200 lines of pain and fear.

4:34 borkdude: I mean both schema and attributes

4:35 bitemyapp: borkdude: you translate the data from the origin database to the new one?

4:35 borkdude: so you can change an attribute from long to string and translate the data accordingly?

4:35 I'm not seeing how you can do that with edn files.

4:35 unless you're inlining functions somehow.

4:36 borkdude: bitemyapp you can do anything inside the function you can define for a migration step

4:36 bitemyapp: it might be easier if I just see the code to understand exactly what you're talkin about

4:36 borkdude: is this on github?

4:36 borkdude: bitemyapp so, print nonsense, or transform data from attribute to attritbute, whatever you want

4:38 bitemyapp it's not on github, part of a commercial project, but it's only 84 lines

4:38 bitemyapp well, it is on github, but in a private repo :-) I was just wondering if your migrations did anything I might have overlooked

4:38 bitemyapp: lovely, but if you're not going to open source it, then this is a pointless conversation.

4:39 borkdude: when you're migrating the database, are you translating from an origin to a destination database?

4:39 `cbp: howdy

4:39 `cbp: bitemyapp: hi

4:39 borkdude: bitemyapp let me post an example of how you can define migrations, maybe that would be helpful

4:40 bitemyapp: it's entirely possible that the current 146 (actual code) + 90 (tests) lines will get collapsed when I go to do cleanup and open source it.

4:41 `cbp: wat

4:41 bitemyapp: but there's an element of irreducible complexity because in the end, you have to reduce over the entire transaction log and track identity across datoms - generating new tempids and then assoc'ing when they get transacted incrementally.

4:41 borkdude: bitemyapp https://www.refheap.com/20404

4:41 bitemyapp: `cbp: migration toolkit for Datomic.

4:42 `cbp: oh

4:42 bitemyapp: `cbp: I work on a lot of database stuff. I think this is detrimental to my sanity. This is from stuff I did at work.

4:42 borkdude: not even close.

4:42 borkdude: this is the 5 line gen-schema fn I referred to.

4:42 borkdude: you cannot change existing attributes in the schema in Datomic without translating the data.

4:42 `cbp: you paste to refheap then change it to text mode !!

4:43 bitemyapp: borkdude: you have to reduce over the entire transaction log and dump/load the whole database history.

4:43 `cbp: sry im tired :P

4:43 borkdude: bitemyapp you can do that in the post-processing-function you can apply along

4:43 bitemyapp: that's not a post-processing fn then, it's a migration fn.

4:43 is it getting called on each datom, each tx, or each entity?

4:44 lol @ `cbp

4:44 borkdude: bitemyapp it is just a function that is called after transacting the datoms from the corresponding edn file

4:45 bitemyapp so you can for example translate data from one attribute to another

4:45 bitemyapp: this cannot solve the problem I am talking about.

4:45 you can't do that.

4:45 you can't change an existing attribute in the schema.

4:45 attributes, once installed with a given definition, are permanent.

4:45 you have to translate the entire database.

4:45 borkdude: bitemyapp that's not what I'm saying

4:46 bitemyapp: you can't transact datoms into a schema they don't match

4:46 borkdude: bitemyapp the datoms in the edn files only contain updates to the schema, no other data

4:47 bitemyapp: that's the gen-schema fn I am talking about.

4:47 you're not solving the same problem I was

4:47 you may not understand that at present, but I can guarantee you it's different.

4:47 borkdude: bitemyapp ok, never mind then

4:47 bitemyapp: I am translating the entire database from origin -> destination

4:47 so that I can make changes to the schema and translate the data to match the new schema.

4:48 because Datomic supports literally nothing like this, so you have to do it yourself.

4:48 mercwithamouth: i'm just fooling around making a very basic CRUD system... new programmer...very new to lisp...can someone point me in the right direction as far as how to seed all of my 'names' into my create-record function? https://www.refheap.com/20405

4:48 bitemyapp: which is fine, you'd have to do this with anything that has "history", but all the same, I needed the toolkit so I could write migration functions.

4:48 mercwithamouth: point in right direction..as in mention a method to use without solving this problem for me =P

4:49 bitemyapp: mercwithamouth: most "CRUD" apps let the database solve these kinds of problems for them.

4:49 like auto-incrementing primary keys.

4:49 mercwithamouth: bitemyapp: well i know..i just want to feed in each value from my names vector one at a time

4:50 i'm just doing this to get familiar with clojure

4:50 i don't expect it to be more than 40-50 lines

4:50 bitemyapp: I'm a believer in practical-minded projects, but okay.

4:50 mercwithamouth: feed what? I'm not sure what you're asking for.

4:50 you want to have a mutable collection?

4:50 or do you want to try to do this in pure code?

4:51 mercwithamouth: see my names vector with "J" "Roboto" etc? I want create a function that feeds each one in to created record

4:51 bitemyapp: I think you'd be better served with immutable data.

4:51 mercwithamouth: yeah just pure code...most likely won't even save this =)

4:51 bitemyapp: mercwithamouth: quit with the word feed, be more descriptive.

4:51 `cbp: what does feed mean

4:51 bitemyapp: see, he's confused too.

4:51 mercwithamouth: iterate through? map in?

4:51 bitemyapp: to accomplish...what?

4:51 you say record, but I don't know what you're expecting on the other end of the rainbow.

4:52 do you just want a map like {:username "blah" :id 2} ?

4:52 mercwithamouth: make a record with "J" as the name and an id = 1 then Roboto, id 2

4:52 well yeah...in the end it would create a map with all of my names and a key

4:53 bitemyapp: mercwithamouth: example is forthcoming, uno momento.

4:53 abaranosky: have you guys seen the Demonic library?

4:54 Amit and Siva wrote it and were using it on their old startup's code

4:54 ... with Datomic

4:54 bitemyapp: abaranosky: seen it, yes.

4:56 mercwithamouth: https://www.refheap.com/20406

4:57 biggbear: ({:x :not-nil :y nil} :y) => nil ... How do we know there is actually :y with value nil?

4:57 bitemyapp: user> (create-records-for-names [] names)

4:57 [{:id 1, :name "J"} {:id 2, :name "Roboto"} {:id 3, :name "Isis"} {:id 4, :name "Paul"} {:id 5, :name "Leaf"} {:id 6, :name "Astro"} {:id 7, :name "Yoda"}]

4:57 biggbear: you don't, and if you don't want to run into that, don't assoc nil into maps.

4:57 bad mojo.

4:57 BAD mojo.

4:57 biggbear: but if you really cared...

4:57 ,(contains? {:y nil} :y)

4:57 clojurebot: true

4:58 bitemyapp: but don't do that. *scowls*

4:58 mercwithamouth: satisfactory?

4:58 biggbear: good bitemyapp :)

4:58 mercwithamouth: bitemyapp: negative...BUT i've almost got it

4:59 bitemyapp: mercwithamouth: ...er...what I posted on refheap isn't what you wanted?

4:59 it's a chainable "database" you can put stuff into and take stuff out of. foundations of CRUD.

4:59 you could even model it as a map of maps, keyed by primary key.

5:00 mercwithamouth: oops..forgive me. 5am here =P

5:00 `cbp: ,(map #(zipmap [:name :id] %) (partition 2 (interleave ["J" "Roboto" "Isis" "Paul" "Leaf" "Astro" "Yoda"] (range))))

5:00 clojurebot: ({:id 0, :name "J"} {:id 1, :name "Roboto"} {:id 2, :name "Isis"} {:id 3, :name "Paul"} {:id 4, :name "Leaf"} ...)

5:00 bitemyapp: then auto-incrementing primary keys could be implemented more safely

5:00 `cbp: I was trying to come up with something realistic, that's just cheating :P

5:00 reduce is at least generalizable to adding stuff to the database, haha.

5:01 mercwithamouth: yeah that's exactly what i want. i wouldn't have thought of that =P

5:01 bitemyapp: `cbp: clever use of zipmap.

5:01 `cbp: ty

5:01 mercwithamouth: i'm glad i asked...i decided to do this tonight to force myself to pick up on at least one new method without copying from a book, thank

5:02 bitemyapp: mercwithamouth: a better implementation than the vector based one in the refheap would look like {0 {:name "blah"} 1 {:name "woot"}}

5:02 mercwithamouth: you should translate the vector based one I wrote to something that produces primary-keyed maps like I just showed an example of!

5:02 mercwithamouth: `cbp: your example as well. i've used zip in ruby...wouldn't have thought to do that either

5:02 bitemyapp: mercwithamouth: that would be a good exercise, I think.

5:02 making it work differently.

5:03 mercwithamouth: alright, that'll be next

5:03 bitemyapp: `cbp: people like to talk about how rarely they use juxt, but I use zipmap even less.

5:03 `cbp: really

5:03 bitemyapp: I feel like I should use it more often. maybe time to go pattern hunting? :P

5:03 `cbp: I mean i know i see it rarely but i use it all the time hah

5:04 bitemyapp: mercwithamouth: after you get the primary-keyed maps version working, make a more correct create-id function.

5:04 mercwithamouth: if you have records 1, 2, and 3, but record 2 gets deleted, the next primary key should be 4, not 3. That creates a collision and will overwrite data.

5:04 mercwithamouth: this should give you some fun material to play with :)

5:04 if you need a hint, (but no code!) ping me on here.

5:05 mercwithamouth: bitemyapp: yeah i have a few empty functions in my editor for that part

5:05 bitemyapp: `cbp: hell or highwater, we're releasing something this weekend.

5:05 mercwithamouth: will do

5:05 `cbp: awesome

5:05 music to my ears

5:05 bitemyapp: `cbp: fearful to my liver and arteries.

5:05 `cbp: :-(

5:06 bitemyapp: `cbp: I like to eat junky chinese food when I hack on nights and weekends. If I start tumbling down a rabbit-hole, I start drinking scotch while coding :P

5:07 `cbp: junky chinese food might be more healthy than what i have sometimes

5:07 bitemyapp: `cbp: junky mexican food? we have a lot of that in San Francisco.

5:07 fortunately, regular exercise and my shifting to drinking tea while coding is helping me to not kill myself.

5:07 borkdude: order some vegetarian chop suey, it might be the healthiest chinese order option

5:08 bitemyapp: bleh. I like meat.

5:08 `cbp: 3 large pizza for about $14.50 -> suddenly arm cramps all weekend

5:09 bitemyapp: that's pretty hilarious, but why does your arm cramp?

5:09 borkdude: artery blockages? ;)

5:09 bitemyapp: I actually take better care of myself than my joking about congestive heart failure would indicate.

5:09 borkdude: scary.

5:09 `cbp: probably

5:09 bitemyapp: you can get crepes in SF slathered in nutella and strawberries.

5:09 `cbp: also that is really cheap pizza.

5:10 `cbp: $14.50 is one medium pizza in SF>

5:10 larges are $16-20

5:10 `cbp: one bottle of Mexican coke is $2

5:11 alright, I'm headed to bed so I'm not totally useless tomorrow. Goodnight all :)

5:11 `cbp: its from struggling low higiene joints here

5:11 3 for the price of one

5:11 gn

5:15 heh took me too long to find it http://www.smbc-comics.com/?id=3090#comic

6:10 gtsiftsis: hey, what is the standard way of documennt clojure code? I mean in ruby we have rdoc or yardoc, is there something similar in clojure?

6:18 basit: what is the recommended way of installing clojure on mac ?

6:18 or where can i read about it?

6:18 john2x: leiningen

6:18 basit: ok

6:19 i'll take a look

6:19 thanx

6:20 does it not have a mac like installer? there only seems to be a script

6:54 cYmen: basit: it has no gui scripts is all you're going to get

7:14 Glenjamin: hi guys, what's recommended as a good entry tutorial for already good programmers?

7:14 Morgawr: I love the O'Reilly book

7:15 it's really great but it's not really a "tutorial"

7:15 http://www.clojurebook.com/

7:22 Glenjamin: cheers

7:45 makkalot: hi, i want to fork a repo which uses leiningen, i want to make some changes and use my version instead, what is the preferred way to do that ?

7:45 ohcibi: hi i'm using midje for testing but it wont report succesful/unsuccesful tests at the end of each run (i.e. it always says 0 tests run, 0 tests passed, etc.) only if a tests fails I see something... is there a way to integrate midje properly with leiningen?

7:46 makkalot: ohcibi, https://github.com/marick/lein-midje

7:48 ohcibi: makkalot: thanks

7:53 cYmen: I'm trying to calculate primes but having trouble making it fast. This is what I currently have: http://pastebin.com/pZgncZVV Any suggestions?

8:00 Not sure how idiomatic that is and how unidiomatic I should get making it faster....

8:08 david118: how do I stop an error message for casting java.lang.string to clojure.lang.ifn?

8:09 phalphalak: Fore debugging purposes I often use something like (defn id-prn [v] (prn v) v) to test for interim results. Am I reinventing the wheel here or is there no core function that does this already?

8:09 Bronsa: david118: it means you're trying to use a string as a function ##("foo")

8:09 lazybot: java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn

8:10 phalphalak: david118: do you want to catch the error instead of preventing it from happening?

8:12 david118: not sure. it's a simple function...

8:13 i'm trying to use a method in a sequence of conditionals that call (myfn "param1", "param2", "param3", "param4") ...

8:13 phalphalak: david118: as Bronsa mentioned it's usually an indication that you provide a string instead of a function.

8:14 david118: however for all the conditionals param1,2,3 are all the same so I want to make a function to wrap than and just pass in param4

8:15 I thought I could just (defn myfn1 [arg] (myfn "param1, "param2", "param3", arg))

8:18 cYmen: david118: but?

8:18 david118: .. I get the cast error on the param when I try to call (myfn1 "param4")

8:19 phalphalak: david118: do you have a code example you could share? (using refheap, pastebin or the like)

8:19 david118: it says "param4" : cannot convert string to ifn

8:19 phalphalak: david118: seems param4 is a string that is being called as a function

8:20 david118: maybe myfn1 is at fault?

8:21 cYmen: david118: are those commas really there?

8:22 and the " don't seem to match up either

8:22 terom: commas are whitespace

8:24 cYmen: terom: huh...interesting choice

8:24 david118: yes. the commas are there. I'm trying to abstract it into the minimal example atm

8:25 (the commas are there and work before I make the change)

8:26 terom: cYmen: sometimes they are useful, for example in maps you can separate things like {:a 1, :b 2} etc for readability

8:28 there are also some clever uses for commas for example within threading macros

8:31 phalphalak: terom: you mean as a visual marker for the insertion point?

8:32 terom: phalphalak: yes. http://blog.fogus.me/2009/09/04/understanding-the-clojure-macro/

8:33 phalphalak: terom: interesting. Thank you for pointing this out

8:35 cYmen: filterscc

8:35 sorry, typo

8:35 If I want a mutable array, do I have to use Java for that?

8:36 terom: cYmen: you can access Java arrays from Clojure. The question is why would you want one?

8:43 cYmen: terom: http://pastebin.com/pZgncZVV trying to do a prime sieve

8:46 terom: cYmen: have you seen this: http://clj-me.blogspot.fi/2009/07/everybody-loves-sieve-of-eratosthenes.html

8:51 cYmen: no...

8:52 Well, I'll definitely read it now. There's some stuff in it I have no idea what it does.

8:52 But the timings don't seem to be much better than my solution.

8:52 Then again that was with a 4-years-ago computer..

10:40 ddellacosta: huh, how do I debug a compile error with lein uberjar? I can run the app fine otherwise, but when making jar/uberjar, I get a nullpointerexception

10:45 noidi: ddellacosta, you can `export DEBUG=1` to make Leiningen print debugging information

10:45 ddellacosta: noidi: that's helpful--thanks!

10:52 john2x: I'm getting "Unable to resolve symbol" when trying `lein test :only foo.bar/quux`. quux is defined and referred, but it's newly added. Doesn't `lein test` automatically resolve the namespace?

10:53 sandbags: anyone here using the ClojureScript library Enfocus?

11:01 bja: I really wish I could post the shit code and engineering from a "community leader" in public to shame them

11:06 john2x: do I need to do something else so `lein test` can find the newly defined symbol?

11:20 llasram: john2x: Running `lein test` spins up a new JVM, so "newly defined" doesn't really matter. As long as the code is in the file

11:22 john2x: yeah, that's what I thought. this is weird. probably just need some sleep.

11:25 hmm even removing an existing symbol and then running its tests, `lein test` doesn't complain.

11:27 zilti: I want to call a method of which I don't know the name until run-time... What's the best way to do it? Unfortunately eval a quoted form doesn't work, I get "RuntimeException: Can't embed object in code, maybe print-dup not defined:" then.

11:28 A Java method, of course

11:32 llasram: john2x: It sounds like you're not editing what you think you're editing

11:33 zilti: You can use the Java reflection APIs, but `eval` should also work. What are you trying to do at a higher level?

11:34 zilti: llasram: Basically I want the equivalent of (eval `(. ~javaObject ~(clojure-expression-resulting-in-a-symbol) ~argument))

11:34 llasram: Oh, clojure.lang.Reflector/invokeInstanceMethod seems to do the trick

11:35 llasram: I meant a higher level than that :-) Like, why do you not know the java method until runtime?

11:35 zilti: llasram: I'm writing a JavaFX library, and want the possibility to provide the arguments to a new JavaFX node as a map so it's declarative.

11:38 llasram: I see. For a different approach, you could write a macro which did a translation once from the declarative identifiers to functions invoking the associated method. That would probably be simpler to write, and more performant. Then at runtime, you would just do map lookups to map from declarative form to functions

11:38 andrewmcveigh: Is there a clojure reader implementation that doesn't throw away ;; comments?

11:39 _scape: so lwjgl creates a special thread that works on opengl commands, and calling these functions outside of the specific opengl contextual thread fails-- which makes it slightly difficult to do repl work with a running instance. I thought about using an atom and setting it with quoted functions to run and then evaling them during the loop in the opengl thread, but this feels very backwards. is there a better to communicate with the opengl th

11:39 with repl?

11:39 zilti: llasram: I'm not sure I fully understand what you mean

11:40 llasram: andrewmcveigh: I think you can do that w/ sjacket, but I'm not sure how mature it is https://github.com/cgrand/sjacket

11:41 zilti: I assume you have keywords like `:some-property` which you wan to translate to method calls like `.setSomeProperty`. Yes/no/maybe?

11:41 zilti: llasram: exactly.

11:41 andrewmcveigh: llasram: great, thanks :) ... doesn't need to be that stable/mature, just messing around atm.

11:42 Ah, this is what cgrand was talking about in his EuroClojure talk last year... I think?

11:43 llasram: zilti: Ok. So you can have a macro which reflects on the Java type with the .setSomeProperty method, and produces the forms for defining a map of `{:some-property (fn [o v] (.setSomeProperty o v))}`

11:43 This is an internal macro you call once to define the map

11:43 Then the actual runtime code just looks up functions in that map

11:44 zilti: llasram: So like a "startup macro" that generates all those possible method calls and stores them in a map?

11:44 llasram: Exactly

11:44 That way you only do all the reflection once, and runtime errors (typos, whatever) are just map-lookup errors, and not weird runtime eval/reflection exceptions

11:45 zilti: llasram: Sounds interesting and quite... challenging. I'll try that. Thanks!

11:47 llasram: np; good luck!

11:47 squidz: does anybody know a way to search a clojure/clojurescript project with emacs?

11:49 llasram: squidz: `find-grep` is built-in. And I use `ag` (tool and emacs extension) myself

11:49 squidz: llasram: never heard of ag

11:50 llasram: from what I see it allows you to serach a source controlled project?

11:50 llasram: Yeah. It's like `ack`, but re-written in C and with (IMHO) saner defaults

11:51 squidz: ah okay. Thanks for the tip, I'll try it out

12:03 llasram: thanks for the tip, ag.el works like a charm. Nice and fast

12:04 llasram: np

12:05 `cbp: (inc llasram)

12:05 lazybot: ⇒ 11

12:05 xuser: (dec llasram)

12:05 lazybot: ⇒ 10

12:05 xuser: (inc llasram)

12:05 lazybot: ⇒ 11

12:05 xuser: ;)

12:05 llasram: heh

12:05 squidz: (inc llasram)

12:05 lazybot: ⇒ 12

12:20 the-anome: hi

12:41 joegallo: the-anome: hi!

12:50 cYmen: hm...seems project euler is not ideal for learning clojure :)

12:52 xuser: cYmen: try 4clojure.com

12:54 Morgawr: cYmen: I learned clojure with project euler, it was fun :P

12:54 but if I go back now and re-read my solutions (I only got like the first 100 problems) they were so ugly and un-clojurey

12:55 cYmen: Yeah, that is to be expected.

12:56 But for actually learning the style and idioms of a language is there any good way other than reading code?

12:58 Morgawr: cYmen: https://github.com/bbatsov/clojure-style-guide this is nice if you just want to know common idioms and style

12:58 else, just read code, write code, play around and hang out in this channel to learn neat data transform tricks :P

12:59 cYmen: I wish people would just hire clojure coders.

12:59 Easily the fastest way to learn something is doing it 8 hours a day. :)

12:59 AimHere: The way it works is that clojure coders end up getting managerial jobs or owning companies, then demanding more clojure

13:00 Morgawr: we can only hope :P

13:00 cYmen: Sounds good, do that then call me!

13:08 llambda: what's the best way to serve up clojure data structures via ring/jetty? for example, i have a function that returns a map and a binary response would be appropriate for the time being

13:12 sritchie: llambda: check this out: https://github.com/tailrecursion/ring-edn

13:13 llambda: sritchie: thanks

13:24 the-anome: hi, may I ask for an example on applying two simple functions to a list of numbers using the sequence monad (sequence-m)? for instance, adding one and then multiplying by two? Thanks in advance!

13:25 (this monad thing is really arcane magic :) )

13:38 dobry-den: llambda: yeah, edn is pretty much the clojure version of json

13:38 any time i build an api that someone else needs to use, i make sure to output edn to expose them a few bytes at a time to the language of the gods

13:39 before their lang's edn lib turns it back into json

13:39 llambda: dobry-den: lol

13:40 they don't know what they're missing!

13:41 dobry-den: personally i was sold when i found out i didn't have to type commas. [1 2 3] sign me up

13:46 seangrove: dnolen: The cljs-warning-handlers change is a bit bigger than I expected, still working on it

14:04 silasdavis: is there a function or an idiom to use when you want something like update-in

14:06 but that will also traverse sequences as if you used (partial map #(update-in % [<rest of keys>] f))

14:08 so it might be used like (update-in m [[:people] [:name :languages] [:origin]] f)

14:08 where there is an implied map between the partitions during the update

14:11 akurilin: So I'm usinjg clj-pdf to generate a doc

14:11 Am I correctly understanding that in PDF you use tables for alignment?

14:12 As opposed to html-style floating etc

14:19 (I guess there's an actual align, which is a start)

14:21 muhoo: wow, this is some crazy async lamina stuff, but what does it DO? https://github.com/flatland/telemetry

14:23 a message queue server, maybe? it's mysterious.

14:37 dobry-den: cute website http://flatland.org/

14:39 i thought flatland was 1 gansta til i now see it's like 5 ganstas

14:44 Has anyone been interested in implementing ecdsa & secp256k1 in Clojure?

14:48 silasdavis: I think I managed to specify :jvm-opts in .lein/profiles.clj at some point

14:49 I've tried adding it under :user but it doesn't seem to be working

14:49 anyone know what I need to do?

14:51 dobry-den: silasdavis: i don't know, but can't you also specify them in an env variable in the meantime?

14:52 shai_: I'm having difficulty getting the repl to work

14:52 I just installed jdk on ubuntu

14:53 I am able to get the ClojureScript:cljs.user> prompt

14:55 I want to use clojurescript to get something running on the browser

14:57 dobry-den: shai_: https://github.com/magomimmo/modern-cljs

14:57 walks ya through it

14:58 scroll down and youll see tutorials

14:59 shai_: https://github.com/clojure/clojurescript/wiki/Quick-Start

14:59 noonian: shai_: last time i tried the cljs-kickoff leiningen template it worked out of the box :p

14:59 shai_: how different is the link you gave with the link I just pasted?

14:59 I can't even type in the 4 lines of code without getting an error

15:00 dobry-den: shai_: the link i gave you is an annotated walkthrough that works

15:00 shai_: dobry-den

15:00 thanks

15:02 dobry-den: shai_: the clojurescript wiki link is showing you how to use the compiler directly. the link i gave you shows you how to use the popular cljs-build plugin to do that kind of stuff for you

15:02 and it shows you what an actual workflow might look like

15:04 i personally made a 'cljs-sandbox' project with the basics hooked up so that i dont have to remember how to hook everything up when i just want to cough up some 5-min cljs to play with an idea i had

15:05 noonian also points out a template (lein new cljs-kickoff my-app) that'll spit out some boilerplate for you if you think you missed something

15:06 noonian: as far as a repl, the link from the cljsbuild page for different ways of using the cljs repl helped me get to the point where you can type (js/alert "foo") in the repl and see an alert on the screen

15:07 dobry-den: yeah, the modern-cljs tut also sets it up with some verbiage for slow ppl like me

15:09 but the last time i worked with a cljs repl (months ago), it had some issues for me. iirc it wouldn't like me scroll back through history or something

15:09 instead it would print ^D when i arrowed-up

15:10 noonian: yeah, rlwrap is awesome for stuff like that

15:10 would run with rlwrap lein trampoline cljsbuild repl-listen

15:10 dobry-den: noonian: thanks. never knew about rlwrap

15:10 yeah that would solve it

15:11 noonian: yeah its great for any repl that doesn't have niceties like history

15:12 zilti: llasram: It worked, but it takes 350ms...

15:13 llasram: I'll probably go for a "memoize" approach to it instead of generating them all at once

15:27 seangrove: hrm, how strange

15:27 Can you not quote an ns form?

15:27 ,(quote (ns cljs.analyzer-tests (:use [example.new])))

15:27 clojurebot: (ns cljs.analyzer-tests (:use [example.new]))

15:27 seangrove: ,(do (quote (ns cljs.analyzer-tests (:use [example.new]))) *ns*)

15:27 clojurebot: #<Namespace sandbox>

15:28 seangrove: Quoting the ns form seems to reset the nrepl to some default namespace

15:28 llasram: zilti: Something take 350ms for a one-time set-up operation is bad?

15:29 zilti: llasram: It increases the startup time until the program is ready. 350ms isn't critical for me, but probably for others using the lib. Anyway, I'm using clojure.core/memoize now, it was a small change.

15:30 llasram: Fair enough

15:30 zilti: I was surprised how easy memoization is in Clojure

15:35 akurilin: I'm derping out, I shouldn't have to ask this.. Is there a way to merge a nested vector "upwards"? As in, with [[a b] [[c d] [e f]]] , can I get [[a b] [c d] [e f]] if my code looks like [[a b] (foo)] ??

15:35 lazybot: akurilin: What are you, crazy? Of course not!

15:45 muhoo: lol lazybot

15:45 llasram: nice

15:46 akurilin: You'd need to do (concat [[a b]] (foo))

15:46 (where `(foo)` returns `[[c d] [e f]]`)

15:46 Or `into`, etc

15:47 muhoo: cojs, maybe, too

15:47 cons

15:49 dobry-den: a naive solution is to `flatten` and then `partition`.

15:49 llasram: You spoke the name of the forbidden function!

15:49 ~guards

15:49 clojurebot: SEIZE HIM!

15:49 akurilin: llasram, got it, thanks. Was somehow hoping to apply from within into the surrounding vec :)

15:50 Not really a "thing" apparently :)

15:50 llasram: akurilin: There is unquote-splice in syntax-quoted forms, but it isn't usually used to just build up normal data structures

15:51 ,(let [x [[:c :d] [:e :f]]] `[[:a :b] ~@x])

15:51 clojurebot: [[:a :b] [:c :d] [:e :f]]

15:52 dobry-den: "what you don't implement with `juxt` is not worth implementing at all" - rich hickey

15:52 llasram: Are we inventing rhickey quotes?

15:55 muhoo: citation needed

15:55 i can't imagine him being that dogmatic about anything except immutability

15:55 akurilin: llasram, that's a helpful example, thank you. It's pretty neat that you can even do that in the first place

15:56 llasram: akurilin: now that I'm thinking about it, bbloom does have this library: https://github.com/brandonbloom/backtick

15:56 which extends syntax-quote to be a general useful data structure template mechanism

15:57 muhoo: wow i thimk there are as many clojure web frameworks as there are clojure web developers

15:57 llasram: muhoo: What did you just come across?

15:57 akurilin: llasram, is this for working with things like hiccup?

15:58 I don't do much hiccup myself, but it sounds like having to run concat all the time might break you out of the visual flow of things being nested

15:59 cYmen: man...lazyness is so weird :)

16:00 I keep messing stuff up with debug prints. :)

16:00 llasram: akurilin: Kind of. The way built-in syntax-quote works is optimized for generating data structures which represent Clojure code. backtick generalizes that so you can use the same facilities to generate data structures which represent other things

16:01 akurilin: One example could be something like hiccup, although hiccup actually has it's own work around -- any lazy seqs are spliced into their containing sequence

16:04 akurilin: llasram, got it!

16:05 shai_: i feel stupid. All these plugins and github forks have me kind of stressed out

16:05 bitemyapp: shai_: hum?

16:05 shai_: I downloaded leingen and now I need to download lein-cljsbuild

16:05 grrrr

16:05 bitemyapp: lol.

16:05 shai_: you haven't run into any actual problems yet, it's going to be okay :)

16:06 shai_: but how come these aren't provided from the people at clojure.com? Do we have to depend on these developers to maintain their plugins?

16:07 llasram: Ultimately we all die alone, shai_

16:07 shai_: llasram, so were helpless

16:07 clojure is a hyped language for the moment, but once support dies, it dies

16:07 llasram: Nah, because at least with this software, it's all open source :-)

16:08 If you're in a position where you want to pay for support, Clojure may not be the language for you at the moment

16:08 shai_: I wonder if im better off just learning common lisp or scheme?

16:08 fuck paying for support

16:08 llasram: Ok. Then what's the problem?

16:08 The code is there, the community is active

16:08 Everything's good

16:08 shai_: yeah, im tripping

16:09 tbaldridge: if you don't want to pay for support, don't. Otherwise do and talk to Cognitect

16:09 there's no forcing anyone either way

16:11 shai_: I guess I just need to become proficient enough to write plugins and libraries when needed to help myself and the community

16:11 I hope clojure stays alive and healthy as the years go on

16:11 tbaldridge: what language doesn't require that?

16:11 jared314: shai_: are you looking for a long-term language, or something you can sell to a management?

16:12 shai_: no your right, my frustration just comes from jumping around language to language. I still havn't found my niche

16:12 I just want to grow up with a solid language.

16:12 jared314: there is no solid language

16:12 shai_: I've read hackers and painters and Paul Graham sold me on lisp

16:12 and then i've been using javascript for my internship and #javascript recommened clojurescript which excited me

16:13 tbaldridge: being a polyglot isn't bad. I've forgotten how many languages I know.

16:13 jared314: my first car was a old ford truck, then it was a jeep, and now a vw

16:14 i still drive the same

16:14 bitemyapp: shai_: just learn.

16:14 shai_: you are all right, thanks for the truth :)

16:14 bitemyapp: shai_: there are no final languages, you should rejoice in this.

16:14 cYmen: tbaldridge: I tend to remember which languages I knew but not the languages. :)

16:14 muhoo: llasram: hoplon

16:14 shai_: yeah, always cool stuff to learn and projects to work on

16:14 bitemyapp: tbaldridge: Cognitect offers straight up, "how do I Clo-jurr?" support?

16:16 muhoo: cYmen: i started using clojure.tools.trace and my printf factor reduced significantly

16:16 tbaldridge: bitemyapp: money talks, right? :-P

16:16 llasram: I assumed it'd be more: "My business is on fire because of this bug in `clojure.core/map`. Fix it for me, Cognitect."

16:16 bitemyapp: tbaldridge: I guess, it just tickles me.

16:16 llasram: muhoo: Huh. The Lisp Curse, I guess

16:17 tbaldridge: I mean, we are a consulting company, so we've worked with companies in the past that say "we need help ramping up our people on Clojure".

16:17 bitemyapp: tbaldridge: I shanghai'd a coworker into learning Clojure and Datomic on the @work project and he was able to pick everything up on his own just fine (Python guy). Paying support for that would baffle me.

16:17 But, whatever spreads the Clo-mpire I guess.

16:17 cYmen: muhoo: looks interesting, thanks

16:17 tbaldridge: bitemyapp: I'm not saying I'd pay for something like that, but if you want to pay me to teach Clojure...heck-yes!

16:17 shai_: wait im not understanding now lein-cljsbuild works, do i grab it from github and place it in my projects /src directory?

16:18 bitemyapp: shai_: no. it's a Leiningen plugin.

16:18 shai_: things that start with "lein-*" are generally Leiningen plugins.

16:18 shai_: ok

16:18 bitemyapp: shai_: you put Leiningen plugins in the :plugins vector of your project.clj just like the :dependencies.

16:18 nobody say a fucking word about profiles.

16:19 llasram: shai_: I think someone already linked you, but seriously, do try starting here: https://github.com/magomimmo/modern-cljs/blob/master/doc/tutorial-01.md

16:19 shai_: bitemyapp, so I don't have to download anything, just add that one line of code in project.clj

16:19 bitemyapp: right.

16:19 shai_: dnolen has graciously put an example CLJS project online where you can look at the project.clj https://github.com/swannodette/mies

16:19 oh woops, that's the template.

16:19 shai_: just follow the "Usage" instructions and then look at the project.clj

16:19 shai_: bitemyapp, right, thanks again

16:20 bitemyapp: https://github.com/swannodette/mies/blob/master/src/leiningen/new/mies/project.clj

16:21 gf3: jealous of kitty *_*

16:22 muhoo: llasram: it's not just lisp, it's linux too.

16:22 llasram: In what sense?

16:23 muhoo: when i was working as a musician, i used linux as my instrument and studio. people would say "oh, do you use ableton?" and i'd say, no i use two dozen synths, sequencers, plugins, etc, and my own custom code, all glued together with python and bash, and they'd look at me ike "uh, yeah, but what program do you use?"

16:24 bitemyapp: lmao.

16:24 llasram: nice

16:24 muhoo: so composability isn't just a lisp thing, it's kind of a unix thing too.

16:25 llasram: Well, as long as they're actually composable

16:25 muhoo: so now people say "oh you write web apps in clojure? what framework do you use?"

16:25 and i say, uh, i have a project.clj that's 300 lines long...

16:25 and they say "right, but what framework do you use?"

16:26 so the facepalm has remained constant

16:26 bitemyapp: muhoo: I've talked to people that didn't seem to understand the value of not having to throw out your car just because the alternator needed swapped.

16:27 cYmen: Somehow I don't find that question odd. I mean if you write a webapp in 300 lines you have to have support libraries. :)

16:27 muhoo: cYmen: i meant the project.clj, which is the list of, and configuration for, libraries

16:28 that doesn't include the actual code (which is often very short because the libraries and language are so good)

16:28 cYmen: So you use a lot of libraries but not "one" framework?

16:29 mtp: a framework is made up of....

16:29 DRUMROLL PLEASE

16:29 l i b r a r i e s

16:29 cYmen: MONKEYPOOP!

16:29 oh libraries...i was gonna say libraries

16:29 jared314: rainbows?

16:29 i thought it was rainbows

16:30 `cbp: gems

16:30 mtp: project.clj *is* the framework

16:30 jared314: so lein is your framework?

16:30 cYmen: hrhr

16:30 mtp: what

16:30 no

16:30 muhoo: dog is my copilot

16:30 mtp: the framework is nothing more or less than the libraries you use

16:30 but the name-of-the-thing is not the thing

16:30 llasram: A framework is a library become obsessed with its own abstractions

16:30 mtp: there

16:31 cYmen: haha

16:31 muhoo: that's good

16:31 mtp: obsession is usually bad

16:31 cYmen: indeed

16:31 muhoo: ~framework

16:31 clojurebot: excusez-moi

16:31 muhoo: ~framework is a library obsessed with its own abstractions

16:31 clojurebot: Ok.

16:31 muhoo: ~framework

16:31 clojurebot: framework is a library obsessed with its own abstractions

16:31 mtp: :)

16:33 llasram: One day I will actually read clojurebot's source, and learn how to use it

16:33 jared314: i've looked at it

16:33 muhoo: lazybot seems pretty readable. not sure about clojurebot

16:34 cYmen: ~lazybot

16:34 clojurebot: lazybot is echo ~lazybot

16:34 muhoo: ~clojurebot

16:34 clojurebot: "More human than human" is our motto.

16:35 jared314: can you def functions in the clojurebot sandbox

16:35 ?

16:35 muhoo: ,(def foo "bar")

16:35 clojurebot: #<Exception java.lang.Exception: SANBOX DENIED>

16:36 muhoo: NO SANDBOX! DENIED!

16:36 all i wanted to do was play stairway to heaven :-(

16:36 hey, wait.... "sanbox"

16:36 is that a box with a storage area network in it?

16:37 jared314: i think it's a part of a storage area network

16:37 like a router

16:37 muhoo: it's a typo, obviously. i'm being a smartass

16:38 jared314: no no, i think it is something more

16:39 there is no way something that sophisticated would make a simple mistake like that

16:40 shai_: I'm getting an error when trying to cljsbuild

16:40 http://pastebin.com/8FUrRg4X

16:40 jared314: check your project.clj formatting

16:40 it has a syntax error

16:41 shai_: http://pastebin.com/gMZkuj9E

16:42 jared314: you don't have enough } ] ) at the end

16:43 it looks like a missing } at the end

16:43 shai_: jared314, yeah that was it. thanks!

16:51 success! However, looking at the .js script file that clojure compiled, it seems like a lot of code for a simple hello world statement

16:51 isn't that like really slow for the browser?

16:51 jared314: what optimizations have you turned on?

16:51 shai_: whitespace

16:51 and pretty code

16:52 jared314: have you tried advanced?

16:52 shai_: nope

16:52 :optimizations :whitespace :advanced?

16:52 tbaldridge: shai_: when you do advanced and gzip it, most apps I've worked on are < 40KB. That's about the size of jquery. For an entire app

16:52 shai_: hmm

16:54 tbaldridge: advanced compilation turns on the Google Closure optimizing compiler that removes tons of code.

16:54 shai_: if i want multiple optimizations would it be :optimizations :whitespace advanced

16:54 jared314: i don't think you need whitespace with advanced

16:54 tbaldridge: just advanced

16:55 shai_: k

16:55 tbaldridge: but you won't be able to read that code at all, so only use it at the end

16:55 shai_: and then lein cljsbuild once everytime i change something right?

16:55 jared314: or auto

16:55 shai_: cool

16:56 jared314: but do a clean build every so often

16:56 shai_: ok

16:56 jared314: sometimes it keeps stuff around

16:57 shai_: time to hack the repl!

17:18 astoddard: I am trying to do some clojure evangelism to a Netbeans user. What is the current recommended Netbeans tooling for Clojure?

17:20 jared314: i think enclojure died

17:21 bitemyapp: astoddard: closest equivalent is CCW + Eclipse, otherwise, Emacs.

17:21 astoddard: So enclojure was THE netbeans plugin and it is no longer active?

17:21 _scape: CCW is standalone(ish) now

17:22 jared314: i've heard la clojure is getting better

17:22 but i don't use intellij

17:22 astoddard: I'm an Emacs user myself. But the guy I'm trying to gently push towards Clojure is Netbeans all the way.

17:24 bitemyapp: astoddard: that's regrettable (for them)

17:25 jared314: astoddard: you can't save them all

17:26 seangrove: bitemyapp: Meh, the tooling for clojure (emacs included) is pretty woeful

17:26 I think LightTable has the potential to do a lot more...

17:26 bitemyapp: sometimes, da. Being hung up on a particular IDE like Netbeans is pretty limiting though.

17:27 It's hard for me to complain about tooling with Leiningen though.

17:27 If you've done Python, you'll know what I mean.

17:27 seangrove: Maybe Cider? I'd like to see things like slamhound, pedantic, etc. working in realtime with every keystroke highlighting unused vars, imports, type errors, etc.

17:27 bitemyapp: Cider is just nrepl.el

17:27 seangrove: bitemyapp: Oh yes, there's a solid foundation, but thinking about extending it up and into editors

17:27 tbaldridge: LightTable has yet to prove it can actually be anything more than a half decent text editor with a cute repl

17:28 bitemyapp: I'm not part of the YC mafia, so I'm skeptical as well.

17:28 seangrove: tbaldridge: I agree, but curious to see how the plugins work when it comes out

17:28 tbaldridge: sadly, every time I use LightTable it seems that they removed something. These days you open it up and it's just a blank screen with some text. Where's the ui?

17:29 I think LT is suffering a bit from feature creep and wanting to "save the world".

17:29 jared314: i thought that was the point of a good text editor?

17:29 _scape: i ended up dropping LT

17:29 bitemyapp: the instarepl thingy is nifty, I could actually use the continuous/instant feedback, but everything else is o_o

17:29 _scape: using sublime text 2 with an nrepl plugin i found on git, works well enough

17:29 seangrove: tbaldridge: Well, I've only used it for a few minutes, but I assume extending it to handle things like intelligently highlighting unused imports, marking impure functions, type errors, etc. is probably easier than emacs

17:30 tbaldridge: has anyone done that yet? If not it's all vaporware.

17:30 seangrove: tbaldridge: In the java world, yes

17:30 tbaldridge: in LT?

17:30 jared314: that will depends on when they actually release the plugin api

17:30 bitemyapp: that's really common in the Java and .NET world.

17:30 seangrove: tbaldridge: No, jetbeans or eclipse, or whatever they use

17:30 bitemyapp: netbeans*

17:30 seangrove: From what I understand, haven't used it myself, just watched it

17:31 Clojure has definitely done a better job of keeping the smarts in libraries rather than the editor, compared to CL & smalltalk

17:32 I'm just eager to see some of those things come together and have emacs (and friends) make use of them

17:33 tbaldridge: but can you do stuff like prove pure functions in clojure? Is reduce pure?

17:33 seangrove: tbaldridge: I don't know, just a fantasy of mine, but certainly the other stuff is lower-hanging fruit

17:34 bitemyapp: I'm secretly hoping ambrose learns the joy of monads so that we can start annotating impure functions with the IO Monad.

17:34 : ann println [Any * -> IO ()]

17:36 astoddard: I was hoping to push a Netbeans clojure plugin as a "gateway drug". Seems like I need a different tack. Emacs or vim are unlikely a good sell to my "mark". I wonder if a straight jump to LightTable is viable.

17:37 jared314: he will be complaining about the lack of Netbeans

17:37 shai__: So far I am only able to see my simple.html file that is hosted on 0.0.0.0:8000 via pythons httpserver, however I'm having difficulty with the repl

17:38 I created the connect.cljs file and specified http://0.0.0.0:9000/repl as the location

17:38 when I navigate there, I get an alert box saying no 'xpc' param provided to child iframe

17:39 I have a cljs prompt: ClojureScript:cljs.user> (js/alert "hi")

17:39 after I execute, I don't see anything on the browser, and the cursor in my terminal sort of stays there, doesn't give any indication of success

17:40 noonian: shai__: how did you start your cljs repl?

17:40 shai__: lein trampoline cljsbuild repl-listen

17:41 noonian: and in your cljs code do you have a line that tries to connect to the listening repl?

17:41 shai__: http://pastebin.com/T2jtkJu0

17:41 noonian ^^

17:42 noonian: one thing i do to make sure i am connected is, after i start a fresh repl i'll type a simple expression like "(+ 2 2)" that should not return until the repl is connected

17:43 then you visit your web page and if the repl returns 4 you know you are successfully connected

17:44 _scape: anyone programming with lwjgl? wondering how to simply work with repl and the gl context thread in lwjgl

17:44 dobry-den: If you have (defn dup [stack] (cons (peek stack) stack)), how come (dup (dup (list 1 2))) doesn't work? ("Cons can't be converted to IPersistentStack")

17:44 zilti: I have this line in my code (defmethod construct-node 'javafx.scene.Scene [clazz args] (run-now (clojure.lang.Reflector/invokeConstructor (resolve clazz) (to-array [(:root args)]))))

17:45 It works perfectly fine when used from the REPL, but when called from inside the code with exactly the same arguments, I get a ClassCastException claiming "clojure.lang.Symbol can't be cast to"

17:46 shai__: noonian, yeah my repl isn't returning anything, and i visted my website...

17:46 dobry-den: ,(let [stack (list 1 2 3)] (cons (peek stack) stack))

17:46 clojurebot: (1 1 2 3)

17:48 dobry-den: ,(let [stack (list 1 2 3), dup (fn [s] (cons (peek s) s))] (dup (dup stack)))

17:48 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to clojure.lang.IPersistentStack>

17:51 dobry-den: Oh yeah, conj works for lists

17:51 cons is something special. mahbad

17:51 I think this is the first time i've ever deliberately used a list

17:52 llasram: I needed to recently, and it's oddly difficult

17:52 ,(class (list* [1 2 3]))

17:52 clojurebot: clojure.lang.PersistentVector$ChunkedSeq

17:52 llasram: ,(class (list* 0 [1 2 3]))

17:52 clojurebot: clojure.lang.Cons

17:52 llasram: ,(class (apply list 0 [1 2 3]))

17:52 clojurebot: clojure.lang.PersistentList

17:53 llasram: ,(class (conj (list 0) 1))

17:53 clojurebot: clojure.lang.PersistentList

17:53 llasram: ,(instance? clojure.lang.Counted (list 0))

17:53 clojurebot: true

17:53 llasram: ^^ makes it worth it

18:01 jared314: is there a way to expose a namespace from a lien plugin in the lein repl?

18:02 bitemyapp: llasram: makse what worth it?

18:03 zilti: How for ***** can it be that a function acts entirely differently depending on where it is called from when the arguments are *exactly* the same?

18:04 akurilin: Ok I'm going to ask this here, I don't where else. Is there a way to "force" a certain set of PDF contents to all fit on one single page? As in, I want to repeat the same template once per page, but the content can change possibly to the point where it spills over to the next page.

18:04 (using clj-pdf)

18:05 seangrove: zilti: Certainly possible

18:05 That whole "pure" thing :P

18:05 zilti: seangrove: How do you mean? The function is pure

18:06 seangrove: zilti: What's the source?

18:06 technomancy: jared314: no, lein enforces isolation between itself and the project

18:07 jared314: technomancy: so :injections and :init are the only way?

18:07 seangrove: lynaghk: Given your experience with angular and core.async, would you do anything differently now if you were making a clojure(script) app that had to work well on mobile as well?

18:07 zilti: seangrove: https://www.refheap.com/20414#L-246

18:09 seangrove: zilti: No idea, never worked with that api

18:10 It's resolving the constructor at runtime though, so presumably if the class def has changed, then that method changes

18:11 llasram: bitemyapp: Oh, that PersistentList is Counted, so `count` is O(1)

18:11 zilti: seangrove: I trigger the call of construct-node both times manually - once directly by calling it (that way it works) and once via the "fx" macro (fails with ClassCastException)

18:15 llasram: zilti: Your fx macro doesn't have any syntax-quoted forms. AFAICT, the body will directly run during macro-expansion

18:15 zilti: llasram: That is, when I call it. And I call it from the REPL.

18:18 srruby: I want to have my json output pretty printed in a manner that produces valid json. json/pprint doesn't seem to work. I'm able to pretty print in node using JSON.stringify.

18:25 _scape: anyone programming with lwjgl? wondering how to simply work with repl and the gl context thread in lwjgl

18:27 bbloom: _scape: i've played with it a bit

18:27 i made a separate namespace for the "window", so that i could reload the file i was working on a bunch w/o having to worry about disturbing the context thread

18:28 _scape: interesting

18:28 i'll definitely try that

18:28 bbloom: then you just "send" a function to the window

18:28 & it runs it on it's thread

18:28 lazybot: java.lang.RuntimeException: Unable to resolve symbol: it in this context

18:29 _scape: do you have any code on git i could peruse?

18:29 how would you send the window thread your code? that's where i am struggling, I want to be able to do some interactive work with it via repl

18:30 shai__: what could be a possible reason for lein cljsbuild auto to stay stuck at Compiling ClojureScript?

18:30 seangrove: shai__: No changes to the source?

18:32 shai__: seangrove, that would make a lot of sense

18:33 bbloom: _scape: i'm running ` $ find . -depth 2 -name 'project.clj' | xargs grep lwgl` hold on :-)

18:33 _scape: hah no

18:33 np

18:36 bbloom: _scape: this code does way too many random unrelated things to be useful to learn from :-P

18:36 _scape: but mainly what i did was simply (.start (Thread. run))

18:36 and run simply did @render each frame

18:37 _scape: was render an atom or a thread?

18:44 bbloom: as in? (def render (.start (Thread. run)))

18:46 * devn writes a clojure program to order jimmy john's from the command line

18:46 devn: hard problems.

18:46 tbaldrid_: devn: I've heard they are so freaky fast they may get it to you before you release the enter button

18:46 devn: haha

18:47 i can't be bothered to fill out forms!

18:48 _scape: lol devn

18:48 that rocks

18:48 devn: more than anything it's going to be fun to write the functions for selecting toppings

18:49 (with-toppings [...] (sandwich :bread :wheat ...)) or something

18:50 it needs to be macro-laden and over-engineered

18:50 maybe use core.logic to declaratively generate sandwiches

18:50 _scape: lol

18:53 bbloom: _scape: nah, i had (comment (.start (Thread. run))) for testing

18:54 what you can also do is something like this:

18:54 (.start (Thread #(run #'render)))

18:54 then when you redefine render, it updates dynamically

18:55 _scape: interesting, ok thanks

18:57 noonian: has anyone experimented with using precompiled clojurescript + node.js for shell scripting?

19:23 Morgawr: defn- binds a function locally inside the namespace, right? if I try to call that function from outside that namespace it won't exist at all?

19:25 hiredman: no

19:26 don't use defn-

19:26 private is silly, don't do it

19:27 unsymbol: agreed

19:33 Morgawr: hiredman: why is it silly?

19:36 hiredman: Morgawr: make things private only makes it harder for possible downstream consumers of your code to reuse it as they like

19:36 seangrove: s/like/need

19:36 hiredman: oh? would this code be perfect for you if you could just access it? oh you can't because I said it was private? too bad

19:37 private is a self inflicted wound

19:37 Morgawr: hiredman: I don't agree, generally yes but if I am storing some global data that I need to use only internally in my namespace (and I don't *want* anybody to tamper with it), I see no reason why I'd want it to be public

19:38 hiredman: Morgawr: right, that is your point of view, what about the point of view of the consumer of your code?

19:39 is code more reusable and customizable if everything is open and accessable, or everything is closed and hidden?

19:39 Morgawr: the library/code is open source if they want to tamper with my code, this specific data is not required outside of my namespace though and accessing it from outside it is also a design problem in itself so the user should not use it

19:40 I don't really see the roblem

19:40 problem*

19:40 I'm not talking about hiding some important function or anything

19:40 hiredman: forcing people to fork and do their own release is silly

19:40 Morgawr: I'm not saying that, I'm just saying that there is no way somebody would even need this in the first place

19:41 hiredman: Morgawr: so why make it private?

19:41 if there is no possible reason for someone to use it, then leaving it public they still won't use it

19:41 private is silly, qed

19:41 mtp: if there is no possible reason for someone to use it, WHY ARE YOU WRITING IT

19:42 Morgawr: because a user accessing it (even by accident or because they don't properly understand the function interface to my library) is an error that I want to avoid

19:42 mtp: because I use it internally

19:43 mtp: Morgawr‘ maybe your internals should have a better interface

19:43 hiredman: Morgawr: I'll worry about errors in my program, you worry about errors in your library

19:43 Morgawr: :|

19:43 hiredman: (which isn't even true, I'll end up worry about errors in the whole thing regardless)

19:45 metellus: private is good because it lets you define your api and be able to mess with the internals all you want

19:45 consumers shouldn't know about the implementation

19:45 hiredman: metellus: no, that is what versioning lets you do

19:45 Morgawr: versioning AND having a clear public interface

19:45 hiredman: no

19:45 bitemyapp: fuck ^:private. Wall-hack 'til the end.

19:45 hiredman: private doesn't make a clear public interface

19:46 Morgawr: with versioning you know when you are breaking the external interface, having internals and private stuff means you can change that WITHOUT breaking the interface (see: difference between minor and major versioning)

19:46 hiredman: Morgawr: internal is not the same as private

19:46 Morgawr: define: internal

19:47 mtp: private is bad because it is meaningless

19:47 hiredman: most clojure code exists as a collection of namespaces, clojure's "private" is namespace level, if you have internal things that you want to use from another namespace, they cannot be clojure private

19:47 mtp: that access control is rarely *actually* useful for anything besides obfuscation

19:47 bitemyapp: internal is namespace private, private is class/instance private.

19:47 protected is inherited class/instance private

19:47 Morgawr: okay, I want something internal that *cannot* be accessed from outside the namespace, why is that bad? :|

19:47 hiredman: so if you have a large code base clojure's private is already pointless

19:48 mtp: Morgawr‘ why do you want it inacessible

19:48 bitemyapp: private can goooooo toooooo hellllllll

19:48 hiredman: Morgawr: because it limits reusibility

19:48 mtp: if nobody else needs it, why write it

19:48 you seem to think you need it, but are you the only person who uses your code??

19:48 lazybot: mtp: Uh, no. Why would you even ask?

19:48 Morgawr: mtp: because users modifying it (if it's an atom for example) outside of the namespace can break everything and I don't want it to be mistaken as something a user of my library can (or should) access in the first place

19:49 it's like asking why we'd want stuff that is read-only anywhere

19:49 danlarkin: private is easy for people to "get" so it's popular to use before you realize its ramifications for those downstream (aka cursing a library author for making private the one function you need to use)

19:49 mtp: Morgawr‘ then it sounds like your design is fragile

19:49 Morgawr: there is an obvious reason why somebody would want a read-only data

19:49 bitemyapp: Morgawr: then make it immutable, doofus.

19:49 mtp: Morgawr‘ apples and oranges

19:49 Morgawr: bitemyapp: but it needs to be mutable inside my namespace but not accessible from outside it

19:50 bitemyapp: Morgawr: you're writing bad code. `rm -rf` and try again.

19:50 zalzane: lmao

19:50 Morgawr: yeah no ;)

19:50 mtp: then it sounds like your design is poorly abstracted

19:50 bitemyapp: ^^ this.

19:50 Morgawr: I mean, I am most likely writing bad code but this is a generic question

19:50 bitemyapp: it's a bullshit question

19:50 mtp: either case, it sounds like a generic DESIGN problem

19:50 bitemyapp: you're setting up a bullshit non-necessity to cover for deeper problems.

19:50 mtp: so change your DESIGN

19:50 danlarkin: nothing needs to be "protected"

19:50 Morgawr: okay, let's go back to my question

19:50 bitemyapp: Unfuck your design and watch your problems fall away.

19:50 mtp: no, let's not

19:50 Morgawr: 00:23 < Morgawr> defn- binds a function locally inside the namespace, right? if I try to call that function from outside that namespace it won't exist at all?

19:51 bitemyapp: Morgawr: why don't we stop with the x-y bullshit and you tell us what you're actually trying to accomplish?

19:51 Morgawr: I just asked a question about defn-

19:51 and the only response I got was "don't use it"

19:51 hiredman: Morgawr: there is a step in the clojure compiler's var resoution that checks the private flag

19:51 mtp: it is a bad question, reasoned from badly thought-out premises

19:51 Morgawr: which is not the answer to the question I asked

19:51 mtp: <mtp> it is a bad question, reasoned from badly thought-out premises

19:51 Morgawr: mtp: please leave, kthx

19:51 mtp: need i go on

19:51 hiredman: Morgawr: if you do manually var resolution the flag doesn't get checked

19:51 mtp: no

19:51 please liset

19:51 listen

19:52 danlarkin: yall need to chill out

19:52 mtp: you are asking for help, and telling us that /we are wrong/

19:52 hiredman: Morgawr: defn- still creates a globally interned var, it just has a private flag on it

19:52 Morgawr: hiredman: what's manual var resolution?

19:52 mtp: no, I'm not asking for help, I'm asking for a clarification on the clojure internals, stop trying to answer a question I did not ask

19:52 bitemyapp: well if you don't know what that is, you probably shouldn't be trying to do shit like this.

19:52 Morgawr: bitemyapp: I've seen it used and I wanted to know how it actually worked

19:52 jeez

19:52 mtp: Morgawr‘ stop asking questions you don't understand

19:53 Morgawr: next you'll be telling me to not use anything I do not know about

19:53 mtp: yep

19:53 bitemyapp: I want you to stop trying to write C# in Clojure.

19:53 Morgawr: dude what

19:53 are you drunk?

19:53 mtp: maybe you should understand what you are trying to do before you do it

19:53 bitemyapp: not for at least 48 hours.

19:53 Morgawr: :P

19:54 mtp: "how it actually works" is irrelevant to the problem you are trying to solve

19:54 bitemyapp: ~xy

19:54 clojurebot: xy is http://mywiki.wooledge.org/XyProblem

19:54 Morgawr: mtp: the problem I am trying to solve is to understand how defn- works

19:54 mtp: Morgawr‘ no, it isn't

19:54 bitemyapp: Morgawr: http://mywiki.wooledge.org/XyProblem

19:54 ~botsnack

19:54 mtp: you keep insisting that it is

19:54 Morgawr: I don't get why you all jumped the ship and flamed me for asking a simple question

19:54 clojurebot: Thanks, but I prefer chocolate

19:54 bitemyapp: Morgawr: the question betrayed the whiff of evil. We're going to scourge you now.

19:54 mtp: Morgawr‘ because it isn't as simple as you want it to be

19:54 Morgawr: :|

19:55 I

19:55 just

19:55 asked

19:55 how defn- works

19:55 mtp: <mtp> "how it actually works" is irrelevant to the problem you are trying to solve

19:55 Morgawr: I DON'T HAVE A PROBLEM TO SOLVE

19:55 jesus christ

19:55 mtp: <mtp> "how defn- actually works" is irrelevant to the problem you are trying to solve with deft-

19:55 bitemyapp: I should write a script that automatically forks Clojure libraries and pushes the same libraries up to my own repo but with all defn- removed.

19:55 mtp: then maybe you should come up with a problem then

19:55 bitemyapp: s/defn-/defn/g # FREEDOOOOOOOOMMMMM

19:55 Morgawr: mtp: the problem is that I am stuck chatting with trolls like you

19:56 zalzane: wow the nerd drama is hot in here

19:56 danlarkin: can't you guys calm down? this isn't helpful to anyone

19:56 mtp: instead of trying to solve nonexistent problems in the guise of 'learning'

19:56 danlentz0: Has anyone tried to lein repel

19:57 Morgawr: danlarkin: yes, sorry, I will calm down

19:57 danlentz0: Lein REPL :connect to a heroku template configured dyne recent

19:58 I am getting the message "port is required"

19:59 This is a stock lein new heroku fooapp

20:00 And having followed the getting started docs

20:01 jared314: are you passing a port in your Procfile?

20:01 danlentz0: Has something changed in the way lein REPL :connect http://user:pass@host.com/REPL works?

20:02 Jared314 no

20:02 Now where did it say to do that?

20:03 jared314: danlentz0: well, you shouldn't need too because the template looks in the env var for the port

20:03 but i was just asking

20:04 Morgawr: so, now I know that to rile up this channel I need to mention private functions and defn- :P it's great

20:04 danlentz0: What env var?

20:04 Morgawr: sorry for causing a flame war though, really

20:04 it wasn't my intention

20:04 danlentz0: PORT if not set seems to default to 5000

20:05 jared314: private functions!

20:05 i hate private functions

20:05 am I to late for the flame war?

20:05 Morgawr: yes

20:05 brand0: I thought nREPL defaults to a random port

20:06 bitemyapp: jared314: you're right on time, grab your stick and start beating Morgawr

20:07 danlentz0: brand0: So where am I supposed to provide that port

20:07 * Morgawr doesn't want to get beaten :(

20:07 danlentz0: In Procfile?

20:07 brand0: you can change it in your profile.clj if you're using lein

20:08 under defproject add :repl-options {:port 50000}

20:08 for example

20:08 danlentz0: That would be like :repl-options {:port 1234}

20:08 ?

20:08 brand0: yep

20:09 danlentz0: Sorry i was typing while you wre

20:09 Ok thats perfect.

20:09 Someone should add that tidbit to the readme

20:09 brand0: it's handy

20:10 which readme?

20:10 danlentz0: The lein heroku template

20:12 brand0: I had to dig for that option, I found it on a mailing list somewhere

20:13 danlentz0: Btw I've been pretty dazzled by the clojure heroku experience. So far. I've been really down on heroku for a long time b/c it really seemed to me like a total PITA but the clojure heroku experience is remarkably pleasant

20:13 brand0: actually, it's in the sample.project.clj now that I look for it

20:16 danlentz0: Leinegan has truly been one of the most significant assets clojure could have ever asked for

20:18 I'm not sure if you can totally appreciate it w/o spending some time in common-lisp for example where everyone individually does all that stuff by hand.

20:19 And there is no agreement between any two given developers on best practice

20:19 brand0: yeah, I resisted lein at first

20:19 but it's invaluable

20:19 danlentz0: are you using the heroku free instance?

20:20 danlentz0: brand0: Yup

20:20 danlentz.herokuapp.com

20:20 And the free PostgreSQL

20:20 bitemyapp: Leiningen is happy-time.

20:20 brand0: woah it took forever to load lol

20:21 there we go

20:21 danlentz0: It's only a little weird it's not written in clojure tho

20:23 It was a tragic mistake that the slime devs were so unfriendly to user community contributions and in particular outright obstructionist toward clojure

20:24 But in the end clojure will be better off because of it, since it was possible to build nREPL in a much better thought out manner

20:26 The emacs/clojure experience is not yet as nice as the CL/ slime but when it does get there it will be built on a considerably more solid foundation

20:27 Although the CIDER renaming did hack me off a bit recently

20:29 jared314: i had not heard about the CIDER renaming

20:29 danlentz0: But hopefully that will be the final project/splitting/renaming/refactoring for a while

20:30 I just declared emacs bankruptcy and started over.

20:30 Couldn't deal with emacs-live etc. guess I am already too set in my emacs ways

20:31 Cider is a pretty crappy name choice also

20:32 benkay: i'm dreading the day i declare bankruptcy from emacs-live

20:32 danlentz0: Try googling cider see how long you have to scroll before you find the emacs clojure link

20:32 bitemyapp: benkay: github.com/bitemyapp/dotfiles

20:32 benkay: time to cowboy up.

20:33 danlentz0: I was like totally offline for 2 days.

20:34 It turns out without a basic set of core customizations

20:34 benkay: bitemyapp: that's a lot of dot

20:35 danlentz0: I can't even find my ass with emacs

20:35 jared314: isn't cider already the name of multiple different IDEs

20:35 danlentz0: It's like totally unusable by default

20:35 Shh. It's a terrible choice but let's not rename any more this week

20:36 Pretend you like it and move on.

20:37 bitemyapp: benkay: working Emacs + nrepl stack. Vanilla, no weird Emacs Live bullshit.

20:37 danlentz0: Lest I am cast back to the uncustomized emacs hinterlands in exile

20:37 jasonjckn: any one ever use jarjar with clojure

20:38 bitemyapp: lein jarjar binks?

20:38 jasonjckn: uh yes?

20:38 danlentz0: Prelude is also rediculous IMO

20:38 jasonjckn: there's a lein plugin?

20:38 looking..

20:39 danlentz0: I mean -- disabling the freaking ARROW keys for gods sake?

20:39 Could see at that point we would probably not be getting along

20:39 jasonjckn: bitemyapp: what did you mean by binks?

20:40 bitemyapp: I don't see a lein plugin

20:40 bitemyapp: I was being a smart-ass, sorry.

20:40 jasonjckn: ok i got the reference

20:40 bitemyapp: jasonjckn: do you want an uberjar or what?

20:40 danlentz0: If I want to fuck up my settings that bad I'm perfectly capable of fucking them up myself

20:40 jasonjckn: I want jarjar

20:41 https://code.google.com/p/jarjar/

20:41 bitemyapp: jasonjckn: dude, no.

20:41 jasonjckn: just use lein uberjar.

20:42 jared314: jasonjckn: uberjar does that

20:43 shai__: Do i have to compile my .cljs everytime I make a small change?

20:43 bitemyapp: shai__: lein cljsbuild auto

20:43 shai__: bitemyapp, sometimes it stays stuck at Compiling ClojureScript

20:44 benkay: i have a project stalled out right now because clojurescript won't compile unless i blow away the resultant js files

20:44 (just noising up everyone's signal over here...)

20:44 shai__: it takes unncessarily long for a small change, such as updating the string set to (write js/document " ")

20:44 benkay: (i have zero intent to dig into this until after vacation)

20:45 jared314: wasn't there a cljsbuild bug about that

20:45 jtoy: is there a xpath /html parser for clojure? I dont see one

20:45 jared314: someone was saying to use the SNAPSHOT version

20:45 danlentz0: ClojureScript is ok to use on heroku right?

20:45 jtoy: like nokogiri in ruby

20:47 shai__: How come I updated my .cljs and without even compiling, the changes are reflected in the browser?

20:47 when i refresh

20:47 jared314: danlentz0: with results on node.js or the compiler?

20:47 seangrove: shai__: presumably you have cljsbuild running auto?

20:47 shai__: seangrove, ohhhhhh so I only have to run it once?

20:47 seangrove: shai__: more or less, yes

20:47 shai__: and after that, if I try to run it again it will be frozen

20:47 because its already running

20:47 ahhhhhhhhhhhhhhhhhhhhhh

20:48 seangrove: When you save a cljs file, you should see output from you cljsbuild

20:48 danlentz0: jared314: I will need to think thing through further

20:48 shai__: nowwww, i have seen a light

20:49 danlentz0: I was thinking that cljs would be able to build when I git push, just like it works with the clj

20:49 jared314: jtoy: I normally use enlive for that

20:50 danlentz0: Not intending for running JS server side

20:50 shai__: seangrove, how do I turn cljsbuild auto off

20:50 seangrove: shai__: just use cljsbuild once <profile name> if you only want to run it once

20:51 jared314: danlentz0: so a precompile asset type of thing?

20:51 shai__: cool

20:52 noonian: you can use ctrl+c to stop the auto process

20:52 seangrove: $seen ambrosebs

20:52 lazybot: ambrosebs was last seen quitting 1 hour and 25 minutes ago.

20:53 jared314: benkay: have you tried using lein-cljsbuild 1.0.0-SNAPSHOT?

20:53 danlentz0: Y that's all if been thinking of doing but you never know sometimes the task is modest at the start right up until the point at which I become carried away

20:54 shai__: noonian thanks

20:55 danlentz0: The discussion going on over in #lisp?

20:55 what do you guys think of clojure?

20:55 ;)

20:55 shai__: dalentz0, what about it

20:56 how much different is clojure from common lisp

20:56 danlentz0: shai__: i mean that was it--- "what do you guys think of clojure?"

20:56 shai__: danlentz, that was my question

20:56 im a lost soul trying to navigate my way

20:57 danlentz0: shai__: Common-Lisp is shakespeare and clojure is Hemmingway.

20:57 shai__: perfect analogy

20:57 thanks, that makes me pretty excited!

20:58 danlentz0: Minor in english lit finally pays off 20 years later...

20:58 jared314: danlentz0: i think you need a custom heroku buildpack for the precompile

20:58 danlentz0: http://kolov-it.com/clojurescript-on-heroku-extra-build-step-on-deployment/

20:58 shai__: danlentz0 :)

20:59 danlentz0: Y i made that same metaphor to some common lispers yersterday and they seemed pleased by it too

20:59 shai__: and similar to how we studied shakespeare as well as hemmingway in high school, we can work with both CL and CLJ to re-inforce each other

21:00 and provide a broader understanding

21:01 danlentz0: And its absurd to say that shakespeare should be discarded because we have hemmingway.

21:01 Or the reverse

21:02 shai__: danlentz0, exactly

21:03 so clojure offers all the libraries that java offers?

21:03 Can I get through college working with clojure instead of java?

21:03 danlentz0: They are both brilliant, and we are very fortunate to have both

21:03 shai__: we're talking about java and clojure now right?

21:04 we're able to write a program in half java and half clojure?

21:04 benkay: bitemyapp: there's gold in them thar dotfiles. the .lein/profiles.clj in particular

21:05 danlentz0: You will have instructors whose whims you will be forced to appease regardless so just expect it to be like that

21:05 Arbitrary

21:06 Some will have grudges against anything but {}

21:06 shai__: hmmm. I've heard functional programmers are generally more capable

21:06 danlentz0: () will be considered outcast, unclean

21:07 shai__: i don't know how accurate that is, but so I've heard

21:07 is that just another political subjective debate?

21:07 jared314: shai__: subjective debate

21:07 shai__: its so confusing though

21:07 benkay: so many factors

21:07 starting with the parens

21:07 I AMS HOW PAREN LISP SUX

21:08 jared314: since I am not a paid to teach, I only care to inform the already curious

21:08 shai__: i like the ( ) in lisp, its simple

21:08 danlentz0: Umm i would draw the analogy that the generalization youre making is essentially racism

21:08 I mean its the same sort of reasoning

21:08 shai__: the ( ) programmers being more capable?

21:09 danlentz0: Making broad generalizations like that about matters that are so intangible

21:10 shai__: hmmm

21:10 danlentz0: There are dumb java devs and there are brilliant ones.

21:11 Everybody gets to pick their own brush. Judge the painting not the easel

21:11 dobry-den: I don't think the benefits of functional programming are all that subjective.

21:11 danlentz0: There are wonderful benefuts

21:11 That does not imply all non-functional programmers are idiots

21:12 shai__: maybe not that their idiots, but they are sketching with a number 2 pencil and not a beautiful pen?

21:12 danlentz0: There are also cases where FP is not the most afvantageous approach.

21:13 shai__: true

21:13 dobry-den: the a-ha moment for me was realizing that mutability should be an optimization, not a default

21:13 jared314: it has always been an optimization

21:14 dobry-den: and always default

21:14 jared314: because computers couldn't handle the immutable approach

21:14 danlentz0: Well in the end nobody cares what brand of pen was used to write the great literature. It only matters what words the author chose to write

21:15 shai__: danlentz0, true

21:16 danlentz0: Sometimes, neither is best and something nondeterministic apprach such as Prolog is the best way

21:17 shai__: i guess it takes time and experience to understand multiple paradigms and what suits a certain problem better

21:17 thats the real skill, to have fluid intelligence and be able to adapt

21:17 danlentz0: Sometimes what would work best is to sit down and peek/poke binary data directly to memory

21:17 shai__: lol

21:17 clojurebot: Cool story bro.

21:17 shai__: lol

21:17 danlentz0: And you say, my god! Ive become a Turingnmachine!

21:18 shai__: is clojurebot a real person

21:18 jared314: no

21:18 shai__: what triggered his response

21:18 danlentz0: He cant vote but I think there are 12 states where he can legally get married

21:19 shai__: clojurebot, I demand that you speak to me

21:19 danlentz0: Clojurebot: seduce lazybot:

21:19 clojurebot: Huh?

21:19 danlentz0: lazybot: Seduce clojurebot

21:19 shai__: clojurebot, who created you

21:19 clojurebot: Excuse me?

21:19 shai__: you heard me very well

21:20 *read

21:20 danlentz0: The bots are not feeling the saturday night vibe

21:21 lazybot: Identity danlentz

21:21 lazybot: danlentz identity

21:21 shai__: they need some repl pebbles

21:22 danlentz0: No idea I don't speak bot

21:30 shai__: i can only run lein if I type .sh afterwards like lein.sh

21:30 how can I fix this?

21:31 seangrove: Put it in your PATH, remove the .sh extension

21:31 Make sure it's chmod'd +x

21:35 bbloom: then type `man bash` and start reading :-)

21:35 ^^ a good investment of your time

21:35 shai__: bbloom, i suppose. So much to learn, fun, yet frustrating

21:36 bbloom: man man

21:36 then from there, man bash

21:37 shai__: k, and then I'll try man bbloom :)

21:37 bbloom: ~ $ apropos bbloom

21:37 clojurebot: Titim gan éirí ort.

21:37 bbloom: bbloom: nothing appropriate

21:37 shai__: lol

21:37 ,(+ 3 3)

21:38 clojurebot: 6

21:38 shai__: thanks clojurebot

21:50 bja: anyone know of a way to convince crate to not escape something during (html)?

21:50 something like &raquo;

21:55 seangrove: Surely I must be crazy with this implementation of format-currency: https://www.refheap.com/20421

21:55 This is in clojurescript without any external dependencies, but there must be something infinitely more clear

21:56 bbloom: having recently done some i18n work... *cringe*

21:56 http://numeraljs.com/ maybe ?

21:56 actually wait no

21:56 surely gclosure has something for this

21:57 seangrove: bbloom: Good point, let me look that up

21:57 bbloom: Yup, thank you for that

21:57 bbloom: yeah, goog/i18n directory

21:58 now, how to find a simple fucking function in that java-ish mess of an API w/ worse than javadoc custom nonsense

21:58 seangrove: Nah, I'm a ninja at the closure docs at this point

21:59 One year of staring at them frustrated...

21:59 bbloom: i usually just grep around w/ vim

22:01 ugh. you create a MUTABLE NumberFormat object

22:02 oddly, the first arg to NubmerFOrmat is a number|string, not a enum

22:03 bja: seanaway: I'd be tempted to use goog.i18n.NumberFormat

22:03 bbloom: b/c they define the enum as a "static field" of sorts on the NubmerFormat class

22:03 so the constructor can't take an enum value from there

22:03 bja: err, late to the party

22:04 is there something hiccup-like in cljs that lets me say [:p "foo" (unknown-function-here "&trade;")] and get a paragraph with foo&trade; in it?

22:05 bbloom: er, clarifying what i said: the constructor *does* take an enum value from there, but the type system can't use that type to annotate the constructor

22:08 seangrove: I can't even get it to require the goog.i18n namespace properly

22:08 bja: nvm

22:09 crate does it via (html [:p "foo" (raw "&copy;")])

22:09 seangrove: bja: I'd recommend dommy over crate

22:09 bja: for some reason, I don't think that was working 10 minutes ago

22:09 bbloom: seangrove: what happens?

22:09 bja: seangrove: I'm using dommy at $dayjob, but had crate loaded in my repl

22:10 and frankly, I'm just using it as a hiccup renderer

22:10 I'm not certain that dommy or crate beat each other at rendering hiccup into dom elements. I'm willing to be shown that I'm wrong there though.

22:12 seangrove: if I'm already using jayq to do my dom manipulation, is there a particular reason to prefer a particular hiccup implementation?

22:12 seangrove: bbloom: Oh, nothing, just me being confused by some auto-cljsbuild stuff

22:13 bja: I've just been very impressed with dommy, both from a templating and dom manipulation standpoint

22:13 But if you're happy with crate, then go for it, of course

22:14 bja: seangrove: I like dommy a lot. I'm also absolutely sick of fighting misc 3rd party js that assumes I have jquery loaded up

22:14 seangrove: bja: Yeah, I just avoid jquery altogether at this point

22:14 bbloom: jquery is great at the same scale that CSS is great

22:15 for adding a little bit of behavior (style, in the case of css) in an aspect-oriented cross-cutting way for an otherwise static/simple *document*

22:15 at application scale, both are a nightmare

22:15 bja: seangrove: I wish that was an option for me. With the size of my team, building my own random UI controls has been a dream that we just don't have time for. Finding stuff that is both functionally complete (or close) and not depending on jquery has been challenging.

22:16 it's possible I just don't know where to look though

22:16 seangrove: bja: Interesting. closure.ui is pretty complete, but I agree it was an incredible nightmare getting up to speed with it

22:16 I mean, hard to communicate how much it hurt to get things built in it originally

22:17 bja: by size of my team, I mean we're growing a 3rd developer, and our combined js experience is along the lines of "init jquery plugins to make Django/Rails/Wordpress look prettier"

22:18 seangrove: bja: And you're using cljs?

22:18 bja: sean, 0 frontend people. cljs seemed easier since we're already in clj

22:18 with our app, there's actually very little browser-specific stuff

22:18 seangrove: Sounds like a recipe for disaster :P

22:18 bja: it's worked out okay

22:19 seangrove: cljs isn't so amazing that you can get away from js yet.

22:19 bja: it's pretty close for us

22:19 seangrove: That's awesome, especially if you haven't done much js before. I wouldn't have thought it would work out well.

22:20 I wonder if you're an exceptional case, or if the cljs env is just more complete than I realized

22:20 bja: it helps that our app probably ports to Android or Swing with 20% code change (the dommy stuff)

22:20 bbloom: i guess w/ source maps now, you can probably avoid js pretty well

22:20 just need to know enough for interop

22:20 bja: I read output cljs at an 8th grade level

22:20 well, output js from cljs

22:20 bbloom: i've seen some 8th graders rocking some js :-P

22:21 seangrove: bbloom: I don't think the source map tooling is at a practical level yet

22:21 bja: it took us a bit longer in some places where others might have not been hung up

22:21 seangrove: Until it's tied together with cljs-build and compojure as middleware so it "just works", that is

22:21 bja: we didn't know that jquery binds clicks to like everything on your page for instance

22:21 so when we imported our first jquery-using visualization stuff randomly stopped working

22:22 bbloom: you might be talking about event delegation. you can usually just give a lower level selector to prevent capture

22:22 http://davidwalsh.name/event-delegate

22:25 bja: at the end of the day, we work mostly with App, Pages, Panes, Widgets, and a couple services called Query and AuthN. You basically only need to know you're in a browser when it comes time to render html or listen to events

22:25 bbloom: so only when it really sucks, got it :-P

22:25 bja: that said, I really enjoy writing go loops

22:28 I wish I had a resource on staff who really wanted to write stylsheets

22:38 muhoo: i think they're called "designers".

22:38 and aren't too hard to find

22:40 seangrove: hah, muhoo, glad to see you have a sense of humor

Logging service provided by n01se.net