#clojure log - Sep 25 2013

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

0:10 `cbp: ~letfn

0:10 clojurebot: letfn is https://gist.github.com/hiredman/1179073

0:17 amalloy: SegFaultAX: he's just reviving a years-old hobby horse of his

0:22 mercwithamouth: clojure has the cleanest regex i've come across o_O

0:33 film42424: Is it better to use loop + recur, or just call your method like normal? I understand theirs like a stack limit or something.. but im just wondering as far as best practices go.

0:34 boogie: Hi everyone. Has core.typed been deployed in production?

0:35 TEttinger: film42424, loop recur is best because tail recursion can blow the stack on the JVM, unlike most scheme implementations

0:35 film42424: that's what I thought.. thanks TEttinger :)

0:35 TEttinger: film42424, however, many tasks can be solved with functions built into clojure

0:36 map, reduce, filter, into, and so on

0:36 loop recur is kinda a last resort to me

0:36 I still use it though

0:37 film42424: TEttinger: So does this seem fine to you? https://github.com/film42/list-em-with-clojure/blob/master/src/list_em/core.clj#L23-26

0:37 TEttinger: no, on large lists that will blow the stack

0:38 although I'm honestly not sure how to write a recur solution there, since it recurs for each item in the seq

0:38 I will fiddle

0:39 film42424: thanks!

0:39 I'm sure it's not the best way.. I'm just trying to evolve from the OOP to functional style.

0:40 ambrosebs: boogie: CircleCI use it http://t.co/nzLeUo9kzX

0:41 boogie: for at least 3 months

0:41 boogie: ambrosebs: Hey! Answers from the source, I love IRC

0:42 ambrosebs: boogie: #typed-clojure might reveal more, but CircleCI is the only one I'm aware of in production.

0:42 boogie: ambrosebs: So, the whole idea of core.typed is that I can strong and statically type parts of my clojure code. Is that a fair statement? Meaning, I know there're things that I'd like to be dinamically but I know of others I really want to make statically typed.

0:42 ambrosebs: boogie: yes. It's like a linter that needs handholding.

0:43 jared314: does anyone know if clojure-contrib/import-static was moved into another project?

0:43 seancorfield: ambrosebs: can you add an optional to suppress the warnings about unannotated code too? :)

0:43 (i know, i should just create a JIRA issue)

0:43 jared314: no, it was not, sorry

0:44 jared314: seancorfield: ok, thanks. I guess I will just use the mighty copy and paste

0:44 ambrosebs: seancorfield: the warn-on-unannotated warnings?

0:45 seancorfield: i know i can just ignore the warnings (after adding the line of code to make them not be errors) but... :)

0:45 akurilin: I noticed that compojure comes with a couple of helpers for helpers for returning files directly to the caller such as files/resources. Is the use case for when you decided to include those static resources in the .jar instead of letting the web server access them directly outside of the ring app?

0:45 brehaut: akurilin: correct

0:45 boogie: ambrosebs: So, if there a way to extend core.typed capabilities? What I am fantasizing about is to be able to have some statically typed guarantees ala OCaml for some pieces of my code (like catching missing cases in match expressions for example). Would that be possible?

0:45 seancorfield: ambrosebs: yeah, i know it sounds like it defeats the object but to really be gradual, you need to have it only check annotated fns and just ignore the rest, at least as an option

0:46 brehaut: akurilin: however, if you configure your webservers proxy pass caching correctly, those resources can then be cached by the server for quick serving, but still allowing you to keep the canonical versions managed within your application

0:46 seancorfield: ideally i'd like to be able to specify arguments to lein type-check for that, tbh

0:47 ambrosebs: seancorfield: agreed.

0:47 boogie: It's probably possible if you set it up carefully.

0:48 boogie: I'm not really sure.

0:48 TEttinger: film42424, just tried running it on my massive subdirectory-laden code folder. it locked up.

0:48 film42424: :(

0:49 So to optimize.. would using a loop + recur be my best bet?

0:49 ambrosebs: boogie: it's not clear how to extend core.typed without changing the implementation yet.

0:50 akurilin: brehaut, that's pretty neat, thanks! If I'm reading what you said correctly, you're recommending setting cache settings on the web server (such as nginx's location block + expires) rather than having the ring app set a cache header?

0:50 brehaut: akurilin: yeah.

0:50 TEttinger: film42424, I actually don't know how the best way would work

0:50 it's an odd case

0:50 film42424: yeah

0:50 boogie: ambrosebs: Interesting. Fascinating stuff.

0:51 brehaut: akurilin: it also means if you use a tool to generate static resources (such as a css generator) that you have a uniform interface

0:51 film42424: I'm gonna focus on making list-dir return a tree first

0:51 TEttinger: personally I would try to return something useful rather than mutate state

0:51 akurilin: brehaut, is the philosophy simply that the web app should not concern itself with the concept of http caching and instead let tools down the chain worry about it?

0:51 TEttinger: heh same idea

0:51 film42424: but srs, thanks TEttinger!!

0:51 TEttinger: np

0:52 anything to avoid working on my projects :P

0:52 akurilin: brehaut, "uniform interface"? Could you clarify?

0:52 brehaut: akurilin: a web app can do the caching when it needs to. however, for something like static resources, the front end web server isprobably better suited to it. nginx for instance is very fast at turning around a static resource, and its certainly faster than having to pass through to an app

0:54 akurilin: well, if all your static-to-the-client resources are served up from inside your app (be it via resources/files or some custom handler that actually computes the resource on demand) then they can be managed uniformly at the front end server: same config would apply to css as (say) scss/css-gen/garden

0:54 akurilin: brehaut, oh yeah, I forgot about file extension regex -based caching settings

0:54 those are really handy

0:56 brehaut, what's actually neat about this is that as far as I can tell there's almost never a need to pre-generate static assets with this approach since you'll at most have to generate them once in the web app and cache them at server level for a long time.

0:56 brehaut: akurilin: yes exactly

0:57 akurilin: its also nice to be able to use webjars.org

0:58 akurilin: ie, say you mistakenly choose to use jquery in your project. you can specify jquery and its version coordinates in your lein project.clj and its automatically managed for you

0:58 akurilin: brehaut, as in, you don't have to save a version in the repository ?

0:58 brehaut: akurilin: correct

0:59 akurilin: btw, hat tip to cemerick for point all this out to me some months ago

1:00 akurilin: brehaut, I guess the only downside is that it's an external dependency, so it's only as good as its uptime

1:00 brehaut: akurilin: agreed. its however not as problematic a dependancy as say web fonts

1:01 akurilin: brehaut, I was going to say.. google web fonts can be completely unpredictable.

1:01 brehaut: and thats probably the most reliable of them

1:01 akurilin: 5 seconds for that font api call Oo

1:01 brehaut: typekit is pretty good but ive had it disappear on some client sites

1:02 akurilin: brehaut, on the previous thread, I imagine that with the caching strategy we discussed you can arbitrarily decide whether you want your js minimized at runtime depending on whether you're in production or not?

1:02 brehaut: akurilin: obviously if you are building a product you should just buckle up and buy licenses for your fonts of choice

1:03 akurilin: indeed

1:03 akurilin: oh man I'm liking this.

1:03 brehaut, are you supposed to pay for google web fonts? I might have missed the license agreement :|

1:04 brehaut: akurilin: no

1:04 TEttinger: fontsquirrel

1:04 brehaut: TEttinger: there are a handful of good fonts on fontsquirrel, but its also a wasteland of poor choices

1:04 TEttinger: fontstruct! make your own font

1:05 it's what I do

1:05 film42424: Somewhat on topic.. Mozilla dropped a new typeface today: http://mozilla.github.io/Fira/

1:05 brehaut: i know im not a capable font designer

1:05 `cbp: film42424: hi, i think this does what you were trying to do? https://www.refheap.com/18975

1:05 brehaut: film42424: yeah fira is very nice

1:06 akurilin: Fontsquirrel saved me a couple of times when I didn't have all of the right font extensions. Chrome on Windows has a delightful habit of failing to do proper antialiasing without the right incantations

1:06 brehaut: akurilin: yeah ive valued fontsquirrells tooling more than its selection

1:07 film42424: `cbp: wow! that's amazing

1:07 `cbp: film42424: you should attempt to make a tree though :P

1:07 film42424: yeah.. but still this is really good.. just need to make sure I can make sense of it

1:08 how clojure handles recur is still new to me

1:09 akurilin: alright I'm going to go back to figuring out how to mix selmer and liberator for a fake static website (complete overkill)

1:09 brehaut, thank you for taking the time to explain all that goodness.

1:09 mind blown.

1:09 brehaut: akurilin: no problem.

1:10 film42424: `cbp: Thanks for this though! I really appreciate it :)

1:10 `cbp: np

1:16 oh man closing nrepl shuts down java on mac? How many goodies have I been missing out by using windows? :P

1:17 no more (System/exit 0) -> autocomplete makes emacs freeze halfway through

1:17 indigo: `cbp: Macs are awesome, vertical integration ftw

1:18 `cbp: I would end up with like 4-6 jvms open after a day's session of clojure despite no emacs open :P

1:18 indigo: Welll

1:18 * indigo uses vim and vim-fireplace

1:19 indigo: It's still a shittier repl than if I used emacs... but I can't bring myself to switch from vim

1:20 Maybe I should try it :P

1:21 `cbp: hah well it just segfaulted

1:22 can't have everything...

1:23 Viesti: hmm, how to get nrepl.el M-. to jump to java sources (java source dependencies in ~/.m2, like IFn.java etc.)?

1:24 indigo: Holy crap, how big is emacs

1:24 s4muel: indigo: the size of a small OS

1:25 `cbp: depends.. I hope you're getting the binary hah

1:25 indigo: I guess it is a small lisp machine

1:28 Kelet: Hi, sorry about this question, but I'm curious: Why use Clojure over say, Scala? It seems like having static typing and a type inference system is nice and a common choice today. I've done some reading and it seems like the metaprogramming capabilities, and REPL(s) for Clojure, being a Lisp-like language, are great. But can anyone give me additional reasons perhaps?

1:29 I only have cursory knowledge of Lisp/Scheme and have never seriously used functional programming, and I wanted to try a language on the JVM since I already use it a fair amount.

1:31 mercwithamouth: what's a good book for data structures....other than the haskell/standard ml book?

1:33 noidi: Kelet, give both a try and pick the one you like best :)

1:33 chord: Haskell > Scala

1:34 Kelet: noidi, Honestly, I tried to give Scala a try, but I ended up writing a bunch of Java-alike code because it was convenient or seemed more efficient. It was also very complex and the build/packaging system was giving me trouble. Figured I would try Clojure but not being experienced in a Lisp-derived language, it's a bit daunting.

1:35 chord: try haskell

1:35 mercwithamouth: Kelet: same...i played with scala half heartedly for 2 years...

1:35 chord: learn haskell and clojure together? not overkill?

1:35 Kelet: chord, I did, but several things put me off of it

1:36 I tried installing gtk2hs from cabal. That did not work. I was advised to download an old version or something. Also, I'm not sure if I'm sold on purely functional. Reactive extensions seem to make things more intuitive, though.

1:36 chord: Kelet: you were too dumb to understand haskell?

1:36 Kelet: Maybe.

1:37 I have a limited amount of time, and I'd like to be able to use imperative programming without juggling monads, I think. Maybe I'm missing something but when trying to use multiple monads at the same time I ran into a fair few problems.

1:37 akurilin: Is format what I should be using for string interpolation?

1:37 chord: so you admit you were to dumb to understand monads

1:37 Kelet: Maybe I'm too stupid to understand monads but I'm not looking to write code that is transparently concurrent or needs lazy evaluation, so I'm fine with using imperative in some places.

1:39 mgaare: chord: are you being serious?

1:41 Kelet: Shrug, suppose I'll just try porting part of my current project to Clojure and see how it fairs, nice to meet the locals then :)

1:42 mgaare: Kelet: what are you working on?

1:43 noidi: Kelet, I think Clojure's a great gateway language for getting into FP

1:43 Kelet: mgaare, A procedural worldbuilding algorithm -- 3d in that there is a z-axis, but intended to be rendered 2 dimensionally.

1:43 mgaare: Kelet: sounds interesting, and not a bad project at all to see some of clojure's strenghts

1:44 noidi: it's opinionated enough to push you out of your imperative comfort zone, but you don't have to learn a load of new concepts before you can do anything with it (my impression of haskell)

1:44 indigo: I always felt that Scala was kinda ugly

1:45 noidi: I'm sure #scala would say that about Clojure :)

1:45 indigo: Probably ;)

1:46 I used to think Lisps were scary until I dived in

1:46 Kelet: I read a lot about the advantages of a static typing system, and type inference systems though, which is mainly why I question Clojure. I know it might be an opinionated and/or kool-aid thing, but dynamic typing seems primarily to reduce the complexity of things like polymorphism but not give much else in terms of advantages

1:46 indigo: Now I'm a SmugLispWeenie ;P

1:46 Kelet: The cool thing about clojure is that you can make it statically typed if you want

1:46 Kelet: I guess you could say I was sold on the concept of static typing being advantageous after working with Lua code for a long time, and spending many hours trying to fix problems related to dynamic typing

1:46 indigo: https://github.com/clojure/core.typed

1:47 Kelet: Do you think I could jump into Clojure while using core.typed and not really 'lose' anything?

1:47 OR should I just do plain Clojure first?

1:47 indigo: I think you should just do plain Clojure

1:47 I suggest starting with Clojure Koans

1:47 Kelet: I remember trying Racket and using Typed Racket some years ago

1:47 indigo: https://github.com/functional-koans/clojure-koans

1:48 Racket is nice as a platform for PL research

1:48 But I feel like people generally get a lot more done with Clojure

1:48 Kelet: Well, throughout my degree program we used Java mainly, so I think I'd feel at home with the JVM as compared with on Racket's custom VM

1:48 Although I'm sure using Java libraries in Clojure doesn't feel too natural.

1:49 Just wrap around them I guess, if one doesn't already exist

1:49 indigo: Well, check out the koans, they have one on java interop

1:49 egghead: java interop feels very nice actually

1:49 to the point where I often demo my java apis to the team using clojure and nrepl :3

1:50 Kelet: I used Processing in Java a while back, as I love making visual things, so it's nice to see there's a Clojure version (Quil)

1:50 I saw Clojure + Quil being used for live music somewhere recently

1:50 indigo: egghead: Lucky. I wish I could use Clojure at work... we're a PHP shop :|

1:51 Kelet: There's also overtone for live music coding

1:51 mgaare: oh, oh that's awful.

1:51 `cbp: indigo: time for clojure in php

1:51 phojure

1:51 indigo: Haha

1:52 Sometimes I feel like writing code in a functional style in PHP

1:52 mgaare: indigo: I tried that and found that the language fights against you in many ways

1:52 indigo: But then I have to stop myself because it's actually more performant to do a foreach rather than an array_map

1:52 `cbp: I work at a php shop too but I circunvent that by making the inhouse apps with clojure

1:54 indigo: Lucky you... we have no in-house apps ;P

1:55 And all the other devs think I'm crazy for using Clojure

1:56 `cbp: At least they know it exists :P

1:56 indigo: Huh, Scala has macros

1:57 :P

1:59 callen: indigo: they're not nice.

1:59 Kelet: In Clojure, would a directory structure like src/renderer/*.clj, src/worldgen/*.clj, src/main.clj .. etc. be reasonable, or is it similar to Java packages with the backwards domains and stuff.

1:59 Seems like many projects I'm looking at have some directory structuring beyond the 'basics' but not quite as verbose as Java

1:59 s4muel: Kelet: The former is just fine

1:59 indigo: callen: No kidding. Scala has C++ syndrome

2:00 Then again I haven't used the language for anything significant; who am I to judge

2:40 ryanf: what's the easiest way to get started with clojurescript? (dependencies-wise)

2:41 clojurescript one looks fine but hasn't been updated in a couple years

2:42 i guess there are fairly recently-updated forks of it?

2:47 muhoo: ryanf: there's https://github.com/magomimmo/modern-cljs

2:47 llasram: ryanf: I'm not sure what you mean? Most recent commit was a few days ago: https://github.com/clojure/clojurescript

2:47 ryanf: "clojurescript one" is the name of a project that is a starter kit for clojurescript

2:47 it looks like it isn't really maintained anymore

2:47 thanks muhoo, will check it out

2:47 llasram: Oh, sorry, hah

2:48 muhoo: ryanf: there's also http://pedestal.io/

2:48 which seems more batteries-included (haven't tried it yet)

2:49 llasram: ryanf: Yeah, apparently Pedastal is the replacement for ClojureScript One

2:49 Pedestal even

2:49 chord: starcraft clone in clojure?

2:49 you guys know you want to help

2:52 muhoo: it's funny, i've abstracted things from writing in crappy languages to writing in great languages like clojure to just thinking about writing instead of writing anything :-/

2:53 llasram: muhoo: Programmer's block?

2:53 muhoo: "oh yeah, i could just do x y z, that'd work, real elegant... hmm what's the latest blog news..."

2:54 llasram: totally. had it for a year now, off and on. i get a customer deadline and bust out of the block long enough to deliver the goods and send the invoice, then i think about my own projects instead of doing them.

2:54 indigo: muhoo: I think you just need something cool to hack on

2:55 muhoo: hmm, going on 2 years, now that i think of it.

2:55 llasram: Or a vacation

2:55 ambrosebs: Kelet: if you're just starting out, core.typed is useful for checking the type of functions at the REPL. (clojure.core.typed/cf +) => [Number -> Number]

2:55 llasram: Stop thinking about code for a month; come back with a fresh mind

2:56 muhoo: llasram: that's a great idea.

3:05 Kelet: Welp - going to spend a few hours messing around with live coding as I like the idea. First lesson learned: namespaces are useful for selectively reevaluating code (i.e., not popping up a new window)

3:08 wunki: is anyone using the "reloaded" template from Stuart Sierra?

3:14 TEttinger: so, I'm using LibGDX (a 2D Java games lib that works on a bunch of platforms) with clojure. it's going great so far, but I'm realizing that I need a way to keep a specific kind of state -- TextureRegions that are costly to lookup in an atlas of textures. Would it be suitable to just keep a {} persistent map and dissoc if I need to save memory?

3:14 (an atom of that map, that is)

3:52 sm0ke: ok this i weird .. i dont find it very convincing of not having optional arguments in functions..although i can have multivariate definitions..but then if voilates dry principle due to repeatition of method body

4:00 chord: you need to stop smoking

4:01 clgv: sm0ke: try https://github.com/guv/clojure.options for better support of optional parameters

4:18 chord: channel is dead

4:18 that means you guys have nothing to do

4:18 so lets work on starcraft clone clojure

4:18 mercwithamouth: has anyone used compojure/angularjs together? ...without hiccup?

4:19 chord: lol

4:19 chord: whats so funny

4:19 mercwithamouth: awesome idea

4:19 chord: you gonna help then?

4:19 mercwithamouth: if i were worth a damn yet as a developer i'd say "f yeah!"

4:19 lol, i'm prepping to write a web app i've wanted to make

4:20 Adeon: would this starcraft clone solve world hunger problems

4:21 vijaykiran: mercwithamouth: yes

4:21 mercwithamouth: vijaykiran: you wouldn't happen to have any examples on github would you?

4:22 vijaykiran: mercwithamouth: nope - but it is a ReST app with Angular FE and Clojure/Compojure BE

4:24 mercwithamouth: vijaykiran: gotcha. i think i'll start my journey after a few more days of getting the basics down with clojure

4:24 chord: why are all the people in this channel noobs at clojure

4:25 wedr: hi there

4:25 vijaykiran: mercwithamouth: good luck :) - should be easy enough.

4:25 Jarda: chord: spend less time trolling here about starcraft clones and spend more time at learning code and you'll be able to write your clone one day

4:25 clgv: chord: well, they are not. but people that ask questions are usually new in using a lib they need for their projects as of now ;)

4:26 chord: Jarda: you will help me with starcraft clone if I learn enough clojure?

4:27 Jarda: chord: yes. I charge $130 per hour

4:28 kevin1024: Hi! What's the best way to turn (a b c d) into [[a b] [c d]]

4:28 chord: Jarda: wtf how do you expect me to pay that

4:29 Jarda: chord: I dunno, if you need someone to do your work you have to be prepared to pay..

4:29 vijaykiran: ,(partition 2 '(1 2 3 4))

4:29 clojurebot: ((1 2) (3 4))

4:29 vijaykiran: kevin1024: ^

4:29 kevin1024: thanks!

4:29 wunki: Jarda: but you will get equity!

4:29 chord: wunki: GOOD IDEA!

4:30 Jarda: wunki: I don't found startups, I make contract job. That way my family actually gets food to the table..

4:30 chord: Jarda: you gotta take risks

4:30 Jarda: chord: I do take risks. But writing a starcraft clone is not one of them, unless you pay me by the hour

4:31 chord: Jarda: so you think these guys are going to fail too? https://artillery.com/

4:31 mercwithamouth: =)

4:32 Jarda: chord: I don't care. I just don't need to take the risk

4:32 chord: Jarda: its not a risk you know the game will succeed

4:32 Jarda: yeah right..

4:33 chord: Jarda: everyone loves starcraft how can a clone fail

4:34 clgv: chord: because it is only a clone. why does the world need the same game two or multiple times?

4:34 wunki: don't forget the fact that you actually need to be able to finish it. SC is not an simple piece of software.

4:35 OtherRaven: clgv: apparently so given the state of the game industry

4:35 chord: ok jesus fine lets do it this way, clgv gets 80% equity in exchange he bears the cost of paying Jarda's paycheck

4:35 sound good?

4:35 * clgv rolls on the floor laughing

4:36 chord: WTF IS SO FUNNY YOU'RE GETTING 80% EQUITY

4:36 mercwithamouth: smh...

4:36 chord: got a graphics artist/team yet?

4:37 clgv: don't tell me that 80% of zero is zero! :O

4:37 chord: mercwithamouth: I've just been assuming that clgv and Jarda can do that

4:37 clgv wow you greedy and want 90% equity?

4:38 mercwithamouth: if you can get a working prototype by Sept 29th i'm in!

4:38 =)

4:38 chord: Jarda are you going to respond to my offer?

4:39 Jarda: chord: yeah as long as I get paid by the hour, billed monthly then why not :D

4:39 francis_wolke: Is there a clojure only IRC channel? EG: #seriousclojure

4:39 chord: clgv: ok so you gonna pay Jarda?

4:39 mercwithamouth: francis_wolke: this is it...tonights a rare night

4:39 llasram: francis_wolke: AFAIK you'll just need to put up with some silliness on occasion :-)

4:40 mercwithamouth: you're better off just asking your question...someone will most likely be able to answer it

4:40 clgv: francis_wolke: it is this one. there is just some distraction right now. feel free to ignore it and ask your questions if any

4:40 chord: these guys are so damn hard to please

4:41 why is there so little enthusiasm about a starcraft clone

4:43 OtherRaven: what exactly is the difference between a starcraft clone and yet another rts?

4:43 and there are a lot of those, even if you only count the decent ones

4:43 chord: OtherRaven: name one decent starcraft clone

4:43 even starcraft 2 sucked shit

4:44 OtherRaven: chord: I can't, I'm not really a starcraft fan. I'm more into supcom and dawn of war.

4:44 clgv: chord: well, a game of that size is a huge complex project - you should better start of with a small project and learn yourself some clojure ;)

4:44 chord: wtf supcom and dawn of war are horrible rts

4:44 OtherRaven: chord: oh, and achron... that one rocks

4:45 chord: we have different definitions of horrible

4:46 chord: clgv: so we run a open source development of the game so that its spread out over a bunch of peopel

4:46 clgv: chord: what will you do?

4:46 chord: clgv: help like everyone else will

4:47 clgv: very specific :P

4:48 mercwithamouth: damn starcraft...

4:48 what i'd like to see/possibly do is create a web framework like 'liftweb' but easier

4:49 a mixture of liftweb, rails(but not nearly as heavy)...

4:49 chord: clgv: you're not married so you can afford to put in time to make starcraft clone

4:50 clgv: roflmao

4:51 OtherRaven: so, like, why are you trying to get people to make a starcraft clone anyway?

4:53 clgv: OtherRaven: to get 20% equity I guess ;)

4:53 llasram: I'm apparently missing some really good stuff by /ignoring that guy

4:54 OtherRaven: tehehe

4:54 chord: OtherRaven: we need a better competitive rts game, you know how the tournaments are mostly starcraft 2 and not supcom and dawn of war cause those suck even more

4:54 but we need something better than starcraft 2

4:54 clgv: chord: the best idea is to get in touch with the blizzard guys directly and tell them about your awesome ideas for starcraft 3

4:55 chord: clgv: blizzard sucks at making games now

4:55 OtherRaven: chord: I can agree with that (at least except for your derision of my two current favorite RTSs, but lets not get into that), but why starcraft?

4:55 chord: blizzard is all about money now, diablo 3, world of warcraft

4:55 they make shit games now

4:56 OtherRaven: we need a remodernized version of starcraft

4:56 OtherRaven: chord: I guess I missed out by not playing starcraft much when I was a kid, 'cause I don't remember it being that great

4:57 chord: but if there's one kind of game the whole open source paradigm works for it's remakes of old favorites

4:58 chord: OtherRaven: EXACTLY we'll have a huge number of virgin losers like clgv who will be willing to help make the clone of the old favorite

4:58 OtherRaven: lol

4:59 clgv: chord: don't judge others by your own situation ;) :P

4:59 OtherRaven: chord: your logic is sound, but your first step should be finding someone with better people skills to do your recruiting for you XD

5:00 chord: OtherRaven: thanks for volunteering

5:00 OtherRaven: your first job is to recruit clgv

5:00 OtherRaven: chord: lol... my people skills are corrupt/missing

5:00 chord: OtherRaven: god damn it no one wants to step up

5:01 * OtherRaven is currently playing with the idea of making a homeworld-esque rts, but not as a FOSS project

5:01 chord: WTF

5:02 why do you like shit games like homeworld

5:02 supcom and dawn of shit

5:02 OtherRaven: homeworld isn't that amazing, but I like the whole 3d space strategy thing

5:06 chord: OtherRaven: why can't you get clgv to agree to help

5:07 OtherRaven: chord: I don't know, because I don't have him locked in my garage?

5:10 chord: here's a thought, though: projects get done when the person who's doing them is passionate about them... you're (apparently) passionate about this, so you should be the one doing it.

5:10 chord: OtherRaven: god damn it stop trying to dump the entire project on me

5:10 mercwithamouth: chord: but it's YOUR project. =)

5:11 chord: mercwithamouth: NO ITS THE PROJECT OF THE COMMUNITY

5:11 OtherRaven: chord: you're the one trying to dump your project on other people

5:13 mercwithamouth: sigh....i'm really trying NOT to buy this book. i had no intentions of learning haskell THIS YEAR http://www.amazon.com/Purely-Functional-Structures-Chris-Okasaki/dp/0521663504/ref=sr_1_1?ie=UTF8&qid=1380098582&sr=8-1&keywords=functional+data+structures

5:13 what about the pearls book? http://www.amazon.com/Pearls-Functional-Algorithm-Design-Richard/dp/0521513383/ref=pd_sim_b_1

5:14 i'm ok with working to convert examples to clojure but the entire book can't be haskell, lol

5:14 sm0ke: sicp

5:15 mercwithamouth: sm0ke: you're right...

5:15 did not think about that...

5:17 also what about the little schemer?

5:23 chord: I hate you all for slacking on the starcraft project

5:25 mercwithamouth: chord: have you gotten the basic tiling engine done yet like you promised?

5:26 chord: mercwithamouth: this game is gonna be 3d not isometric

5:26 OtherRaven: chord: making something awesome that other people want and want to contribute to is a good way to inspire people to help you, nagging them isn't

5:26 chord: mercwathamouth like this https://artillery.com/

5:27 OtherRaven: so you failing college thats why you don't have the time to help?

5:29 OtherRaven: chord: newp, it's just not a project that interests me greatly

5:30 mercwithamouth: what he said...

5:34 chord: so you guys admit you hate starcraft

5:34 how can you think that

5:34 and live with yourself

5:34 OtherRaven: chord: yes, that's it

5:35 wunki: is the `user` namespace automatically imported in every namespace?

5:35 OtherRaven: wunki: I don't think so, but I've never tried to use it that way so I'm not sure... should be easy to test though

5:36 hyPiRion: OtherRaven: pro tip, there's this things called /ignore in IRC. Use it wisely.

5:36 OtherRaven: hyPiRion: indeed, but then my sarcasm muscle would get all weak and flabby :(

5:36 hyPiRion: haha

5:36 mercwithamouth: lol

5:36 wunki: OtherRaven: yeah, I keep getting a cyclic dependency somehow. But I don't import the `user` ns on the other end

5:38 OtherRaven: wunki: when you put it that way... wouldn't 'user' being automatically used in every namespace pretty much always create circular dependencies though? Seems like it couldn't work that way.

5:39 wunki: OtherRaven: I'm trying to use 'reloaded' worflow from Sierra and he uses the `user` ns for development

5:40 OtherRaven: That would mean I couldn't import any other ns in there?

5:41 OtherRaven: wunki: I don't know about the 'reloaded' workflow (I'm pretty new myself), and I don't often use the user namespace, but I do know you can 'use' and 'require' stuff in it.

5:44 wunki: OtherRaven: would believe so. Ok, diving back in :/

5:50 * ucb waves

5:51 * ddellacosta waves back at ucb

5:52 ddellacosta: Can I use proxy in CLJS?

5:53 I guess it's not in cljs.core at least. Hmm

5:53 llasram: ddellacosta: What would `proxy` do in ClojureScript?

5:54 ddellacosta: llasram: yeah, I guess I'm thinking about it the wrong way. I wanted to extend a JS object (goog.ui.Dialog in particular) and reached for proxy out of habit (when dealing with Java). But I suppose I should be using something else.

5:55 llasram: in particular, I want to override one of Dialog's functions.

5:56 llasram: Ah. I've barely touched ClojureScript, so I have nothing too helpful to add. Was just actually curious what it would do :-)

5:56 magnars: In ring, you can't (slurp (:body request)) more than once, since it's an <HttpInput> mutable object. What would be a good way of working around that?

5:56 ddellacosta: llasram: well, it doesn't exist, so there's your answer…haha.

5:57 sm0ke: heelo i am using codox..but it just simply fails with 'Could not generate documentation for x.y' ?

5:57 also i have noticed lein is actually very quite most of the times

5:58 is there a verbose flag for lein?

5:58 ucb: magnars: do you need to always slurp the body or only sometimes?

5:58 magnars: an alternative is a middleware that did the slurping once and assoc'ed the slurped body to the request

5:59 mercwithamouth: oooh somone should redo the little schemer as a clojure book

5:59 magnars: ucb: I have several middleware that use the body, so yeah, might have to create a new middleware that slurps it and creates a resource that can be read more than once

5:59 mercwithamouth: or a clojure style book in the same pattern. i like this... *pulls out credit card*

5:59 ucb: magnars: *nod*

5:59 ddellacosta: magnars: I suggest use params middleware: http://ring-clojure.github.io/ring/ring.middleware.params.html

6:00 magnars: er, sorry, ignore that

6:00 magnars: ddellacosta: yeah, the problem is two middleware that both want to slurp :body

6:00 ddellacosta: magnars: yeah, sorry, I misread. :-(

6:00 magnars: no worries :)

6:01 I'm a little surprised that ring would expose such a horribly mutable piece of state tho. I had hoped the request would be a value.

6:02 llasram: magnars: Except that requests can contain an unbounded amount of request content, so that really isn't practical

6:02 magnars: that makes sense.

6:02 llasram: magnars: If you know that normal requests will have bounded content, you can use middleware which turns the body into some sort of value

6:03 For example, the there's ring standard utility middleware to parse a JSON body and provide the :body as the resulting data structure

6:03 magnars: yeah, that's one of the two conflicting middlewares I'm using

6:03 llasram: ah

6:04 Well... that does seem problematic then :-)

6:04 magnars: yeah, but I think it'll work out fine with a middleware like you suggested :)

6:43 mercwithamouth: is it possible to call/deal with single .clj files with lein...without making projects, like for euler exercises

6:45 llasram: mercwithamouth: Not really. You still need a way to specify dependencies (e.g., Clojure itself), and namespaces need to map to classpath files to load correctly

6:46 OtherRaven: mercwithamouth: when I'm doing exercises I generally just make a project and stick each exercise in it's own .clj

6:47 llasram: For a different approach, when I was doing project Euler problems in Clojure, I created a project with just one namespace and just kept adding code to it for each problem :-)

6:48 That was loooong file by the time I lost interest

6:48 mercwithamouth: llasram: hehhheh then that's what i'll do

6:51 llasram: thats what i've been doing working through the brave clojure examples

6:56 etehtsea: "2009-07-02T10:59:59Z" how can I parse this to date?

6:59 llasram: etehtsea: Use clj-time

6:59 etehtsea: llasram, ok, thanks

6:59 llasram: You can also use the Java standard library stuff, but I'd advise against it

7:02 shoshin: i have a simple question on compojure routes. How do i make a route parameter optional in Compojure. I tried googling the answer but couldn't hit up on a particular way to do it. I even dug into the wiki on GitHub.

7:02 right now i have app/f/:id/:slug/

7:02 and i want the url to render the page even if i hit app/f/:id/

7:03 the :slug here should be an optional parameter.

7:03 thank you!

7:04 mercwithamouth: not related to clojure but does anyone else use ungit?

7:04 i freaking love this tool =P

7:05 shoshin: the solutions i saw so far suggest i use a separate route.

7:06 mercwithamouth: shoshin: saw this one? http://stackoverflow.com/questions/15853103/compojure-optional-url-parameter

7:06 shoshin: mercwithamouth that's the exact question i saw. that requirers me to define a second url

7:07 i want my :slug url to be optional. right now when i hit app/f/:id/ it returns a 404 because in my routes page i defined app/f/:id/:slug/ so the :slug parameter is mandatory.

7:08 sm0ke: is it a good idead to start a background task with (go (server))?

7:08 idea* :P

7:09 i mean a long running task?

7:10 llasram: shoshin: Another route is the way to do it

7:10 It's not like Compojure is charging you by the route or anything :-)

7:45 alfborge: (if-let [x '()] :a :b) => :a, (if-let [x (seq '())] :a :b) => b

7:46 francis_wolke: ,(seq '())

7:46 clojurebot: nil

7:46 alfborge: The context is that I have a function that basically does a (remove nil? ...) which seems to return '(), not (seq '()).

7:47 ,(remove nil? [nil])

7:47 clojurebot: ()

7:47 francis_wolke: (seq '()) is nil

7:49 alfborge: Yes, I see that. I'm just wondering why if-let has this behaviour.

7:50 francis_wolke: It's an aniphoric macro. Thats how it works. I don't understand what you are not understanding :/

7:50 alfborge: francis_wolke: the word aniphoric for one :)

7:51 francis_wolke: its actually anaphoric not aniphoric. I misspelled it.

7:52 alfborge: I read the example for if-let on clojure-docs and failed to notice that the filter was wrapped in a seq. My code used remove and I didn't get why it didn't work.

7:52 augustl: alfborge: it's like if, but the check for truthyness is on the assigned value

7:52 that's about all there is to if-let :)

7:54 francis_wolke: google for anaphoric macro. Wikipedia has a good explanation.

7:54 alfborge: I get it, I was just confused by the fact that '() is a truthy value. My assumptions were incorrect and I further misread the docs.

8:02 augustl: alfborge: yeah I guess it's more about truthiness than if-let :)

8:02 etehtsea: (.getTimezoneOffset (clj-time.coerce/to-sql-time "2008-02-27T23:11:07Z")) I'm parsing UTC-time and getting result with my local timezone. How to fix this?

8:02 -180

8:03 alfborge: augustl: Are there any good clojure user groups in Oslo?

8:03 augustl: nil and false are the only false-y values afaik

8:03 alfborge: there's a FP group that I happen to organize and that happens to not have had any meetings for a long time :) So there's not that much activity.

8:04 etehtsea: do you mean that the toString output of the date is in your local time zone? That's expected

8:05 etehtsea: augustl, I mean that when I'm inserting this datetime to database, I'm getting created_at: "2008-02-28 02:11:07" in the "without timezone" field

8:06 But i want to insert it as is

8:06 augustl: etehtsea: ouch, sounds like the problem isn in your database then? Doesn't it store time zones?

8:18 etehtsea: augustl, seems to be. http://brian.pontarelli.com/2011/08/16/database-handling-for-timezones/ Looks like it really works like this, but I don't get it

9:02 vmarcinko: short question - what does single quote means *after* some function - such as +'

9:04 ambrosebs: vmarcinko: there is no special meaning, it's a convention for naming variations on functions.

9:04 ,(doc +)

9:04 clojurebot: "([] [x] [x y] [x y & more]); Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'"

9:04 ambrosebs: ,(doc +')

9:04 clojurebot: "([] [x] [x y] [x y & more]); Returns the sum of nums. (+) returns 0. Supports arbitrary precision. See also: +"

9:05 vmarcinko: ambrosebs: thanx

9:05 sm0ke: whats the best way for managing runtime configs in clojure?

9:07 vmarcinko: btw, one more architectural question... For any larger apps, do people use/create their own component container? I heard many times that containers are remnants of OOP, but listening to Prismatic team, or Stuart Sierra, they definitely think that using just namespaces and vars don't give clean structure which really can hurt bigger apps?

9:08 i dont assume one needs some heavyweight container framework, but something simple - just for managing public interafces (as sets of related cuntions), lifecycle etc...

9:12 hhenkel: Hi, anyone around who can give me a hint how to use http-kit in a "real life scenario"? My current plan is to have "timed threads" using at-at (https://github.com/overtone/at-at) which fetch data from various data from different urls.

9:13 This data should be passed to different threads, that do a data transition and sent it to another system.

9:19 How would I realise that with http-kit? Async and then send the reference to the transitioning thread?

9:28 TimMc: clojurebot: import-static is https://github.com/baznex/imports

9:28 clojurebot: 'Sea, mhuise.

9:44 bja: are there any known issues with (:key map) style access in cljs 1896?

9:52 mercwithamouth: so. loop...recur. is it 'bad' to use recur? I know next to nothing about tail-call optimization though they made a big deal about it in #scala. recur supposedly lacks it?

9:53 http://clojure.org/special_forms#recur

9:54 mdrogalis: mercwithamouth: recur enables TCO.

9:55 It pretty much converts the recursion to an iterative loop so the stack can't be blown.

9:57 mercwithamouth: mdrogalis: ahh how did i get that completely backwards?!

9:57 "Note that recur is the only non-stack-consuming looping construct in Clojure." i see now....

9:58 AimHere: Well trampoline is another non-stack-consuming construct that can be used for looping

9:59 clgv: `iterate` could be called "looping" as well ;)

10:00 AimHere: doseq and for don't eat the stack either, do they?

10:02 chouser: AimHere: Right. 'doseq' is built on loop/recur, and 'for' isn't really a looping construct.

10:03 mercwithamouth: ahh doseq..thats what i wanted to look up earlier

10:04 chouser: 'reduce' is sometimes a good alternative to loop/recur or doseq

10:06 mercwithamouth: any good? https://github.com/krisajenkins/clojure-cheatsheet

10:06 doomlord_: can't remember .. whats doseq

10:07 chouser: doseq supports for-like syntax for walking through seqs, but is for side-effects and returns nil.

10:08 doomlord_: like a for each i guess,

10:08 vmarcinko: btw, i heard that clojure frown upon data encapsulation - why is that? isn't it a good thing to hide for eg. some atom var that is used only within some function contained in same namespace as the atom ?

10:09 so its preferred not to expose that atom outside of that namespace

10:09 mercwithamouth: reduce can be used...well yeah i guess so. nm =P

10:10 mdrogalis: vmarcinko: Data encapsulation is only valuable when you want to hide types, or restrict who can mutate something. Neither of which are a problem in this space.

10:10 tbaldridge: vmarcinko: it makes it harder to debug. and why hide it? if a user wants to modify the data they can always use reflection or something like that

10:11 chouser: tbaldridge: fancy meeting you here. :-)

10:12 tbaldridge: how would you feel if someone were to characterize the go macro as another implementation of a clojure compiler, one that emits different clojure?

10:13 tbaldridge: chouser: I wouldn't mind that. Except compiler often invokes thoughts of larger codebases. I prefer "mini-compiler" or something like that.

10:13 But yeah, it's a CLJ->CLJ compiler.

10:13 chouser: tbaldridge: fair enough.

10:13 mdrogalis: Couldn't that be said of all macros?

10:14 chouser: mdrogalis: no, most macros consume stuff that isn't (yet) clojure

10:14 vmarcinko: hmmm, im still a bit confused about state hiding...I have seen fre examples of clojure code that some atom vars are just function implementation detail, that state is not passed to function as argument...But that var is still publicly acessible - is this a good thing so one can itnrospect state of that var from outside, is that what you meant?

10:14 mdrogalis: chouser: Ah, that's subtle. Nice.

10:14 ToBeReplaced: mercwithamouth: yes, it's awesome

10:14 tbaldridge: vmarcinko: right, but even better is to pass the data into the functions as arguments. Every time I don't do that I regret it later

10:15 mdrogalis: most macros only transform the current form, the go macro does deep transformation, recursing lower into the form and transforming all the children of the current form.

10:15 chouser: mdrogalis: or if they consume clojure code as a & body or some such, they pass it through unchanged. The 'go' macro does pretty deep analysis of the clojure code you pass it, including macroexpansion and custom code for each special operator. Really gutsy stuff that I've never had the courage to attempt. :-)

10:16 mdrogalis: I tried to look at that macro that does the transformation. Gave up pretty quickly.

10:16 That's a really neat description of it though!

10:20 upwardindex: Is it possible to perform matching of url using more than regexps in compojure? (like what moustache can do)

10:21 silasdavis: How would you rewrite this horribleness: https://gist.github.com/Zariel/4875ba5dc34996e22d0e?

10:21 (nested if-lets)

10:24 mdrogalis: some->> maybe?

10:25 chouser: some-> and cond-> both feel close, but won't actually help, I think.

10:25 hyPiRion: Here's one place where the maybe monad would actually help

10:25 error monad, rather

10:26 ssqq: Interpreter of Clojure is comlemente with Java or C?

10:26 chouser: hyPiRion: I was actually thinking that. state+error or state+maybe monad? But I rarely find those are actually desirable, in the end.

10:26 mdrogalis: hyPiRion: You've awoken tbaldridge, run.

10:27 chouser: silasdavis: if you have more than just this one function using this pattern, it may be worth a custom macro.

10:28 hyPiRion: mdrogalis: what? Monads are okay as long as you don't overuse them and make them all convoluted and stuff

10:29 chouser: but the state monad is infectious in your code. Hard to use in isolated functions without it infecting the rest of your namespace.

10:29 clgv: silasdavis: write a specialized macro

10:31 tbaldridge: Yes...this... http://www.tuicool.com/articles/fQ7Fri Now I just have to figure out how to do this in Clojure

10:32 Kill all the monands!

10:32 silasdavis: hmm some->> is not on clojuredocs

10:32 mdrogalis: silasdavis: It's new. Let me find the changelog for you.

10:33 silasdavis: https://github.com/clojure/clojure/blob/master/changes.md

10:33 Search some some->

10:34 ssqq: Yes, Clojure is implementation with Java and itself.

10:34 Clojure have the version on CLR too.

10:35 silasdavis: thanks

10:35 would be nice if I could make json-error-response falsey

10:36 zerokarmaleft: mdrogalis: http://hueypetersen.com/posts/2013/08/02/the-state-machines-of-core-async/ does a good job of deconstructing the go macro step-by-step

10:37 chouser: silasdavis: I added a comment to your gist.

10:38 ssqq: Google Closure optimizing compiler is implemente with what language?

10:39 chouser: ssqq: Java

10:39 ssqq: chouser: thanks.

10:40 chouser: silasdavis: what do you think. Does that make sense?

10:40 ssqq: chouser: This compiler make clojure code to better Javacript run with V8?

10:41 tbaldridge: ssqq: it makes it run better on any JS VM

10:41 chouser: ssqq: it takes a subset of JavaScript and produces other JavaScript that is much smaller. It doesn't do a whole lot to improve runtime performance, but it gets rid of dead code and does inline some stuff.

10:43 ssqq: thaldridge: It's means that Goole Closure optimizing compiler just do code transfer

10:44 chouser: It's means this tools do the similar job with coffeescript?

10:46 chouser: ssqq: no, I don't think so. CoffeeScript is a different syntax. Google Closure reads JavaScript.

10:47 mdrogalis: zerokarmaleft: Will check it out, thanks :)

10:47 ssqq: chouser: you means this tools only optimize Javascript, which tools transfer Clojure to Javascript?

10:47 scriptor: ssqq: you mean the clojurescript compiler?

10:48 ssqq: scriptor: yes

10:48 scriptor: you can find the source for that here https://github.com/clojure/clojurescript

10:49 it's written in a combination of clojure and clojurescript

10:49 this file (written in clojure) might interest you https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/compiler.clj

10:52 ssqq: scriptor: O, I see, clojurescrpt is different with clojure with different library, but with same core syntax

10:53 scriptor: ssqq: I'm not sure what you mean by 'different library', which library are you talking about?

10:55 silasdavis: can I pass a binding along in a reduce?

10:55 ssqq: scriptor: I found cljs and clj have same syntax.

10:56 scriptor: clojurescrpt is a compiler or a new language?

10:56 scriptor: ssqq: they're meant to be essentially the same language

10:56 with some differences here and there because they run on different platforms

10:57 `cbp: silasdavis: what do you mean?

10:57 scriptor: ssqq: clojurescript is the name of the language, the compiler doesn't have any particular name

10:58 ssqq: scriptor: that means clujurescript run on any JS VM and clojure run on JVM?

10:59 scriptor: yes, the clojurescript compiler takes clojurescript code and compiles it to js, this js can run wherever any other js can run

11:01 ssqq: Thanks scriptor, chouser and <tbaldridge>

11:07 Morgawr: small question.. what's the best way to implement a simple barrier for multiple thread synchronization in Clojure? something like a condition.wait() and then condition.signalAll() in Java

11:07 I was considering having a promise of some sort shared between all threads trying to dereference it and then the last one delivers it

11:07 hence it awakens all the other threads

11:07 would that be correct?

11:12 rboyd_: Morgawr: have you looked into core.async?

11:12 tbaldridge: core.async won't really do what he wants

11:12 asteve: would you say clojure is loosely typed or implied typed?

11:12 java is obviously statically typed

11:13 silasdavis: can I do something like (with-bindings {a 3} a)) that actually works?

11:13 like a let that takes a map

11:13 tbaldridge: asteve: strongly dynamic

11:13 Morgawr: rboyd_: I haven't, I kind of wanted to do this with just the native clojure library without using other libs

11:13 (I'm trying to port a multithreaded piece of code/algorithm from java to clojure and want to see how it performs in comparison and how the result code compares)

11:14 `cbp: silasdavis: you'd have to write a macro yourself and have it defer to let

11:14 GrayArea: @find doctor sleep

11:14 `cbp: silasdavis: vectors in clojure code pretty much always mean bindings

11:14 tbaldridge: Morgawr: perhaps use a cyclicbarrier http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/CyclicBarrier.html

11:15 Morgawr: tbaldridge: seems that the CyclicBarrier thing is only for "fixed" amount of threads

11:15 in my case they can vary

11:15 depending on the path search taken by each thread (it's a multithreaded graph-traversal thing)

11:16 the java implementation uses a shared counter for each node, if the counter is > 0 then each thread that reaches such counter decreases it and then waits until it becomes 0

11:17 in the Clojure one I kind of wanted to use a shared counter with a promise, each thread that reaches the counter derefs the promise and waits until it's delivered, the one thread that lowers the counter to 0 delivers the promise and replaces it with a new one (for future threads)

11:17 (or use a better solution if available)

11:17 mdrogalis: tbaldridge: I saw the commit on core.async two days ago. Did you guys change your stance on it being minimal?

11:18 tbaldridge: mdrogalis: lol, I probably mis-spoke about that awhile back. IIRC Rich's original comments were "lets keep it minimal until we see what people use in practice"

11:18 apparently that time is now past :-)

11:18 mdrogalis: Heh, gotcha.

11:23 asteve: what is the name of the notation of 1.35E10?

11:23 `cbp: scientific? :P

11:23 asteve: well, 1.35*10^10 is scientific, right?

11:23 E10 is ...

11:24 `cbp: wiki tells me it's still scientific http://en.wikipedia.org/wiki/Scientific_notation#Other_bases

11:24 asteve: `cbp: thanks

11:25 tbaldridge: asteve: it's just that the E10 version is easier to parse and easier to print

11:25 see e notation here : http://en.wikipedia.org/wiki/Scientific_notation

12:12 upwardindex: Anyone has an elegant solution to http api that can both accept urlencoded params and json and needs to coerce params to certain types when its url encoded?

12:13 bbloom: upwardindex: yeah. don't do that. down that path lies madness

12:14 sm0ke: upwardindex: what do you mean? can you define multiple routes for that?

12:14 bbloom: pick *one* content-type for your requests, preferably one other than formencoded

12:16 sm0ke: cant you do {:headers {"Content-Type" (if (somecond) (pick-type1) (pick-type2))}} ?

12:16 bbloom: that just doubles your API's test matrix & leads to bugs

12:17 upwardindex: thinking of it, i think the urlencoded stuff is just for trivial manual testing using curl, i guess i can probably go json only

12:18 thank you for those words of wisdom

12:20 sm0ke: so i wanted to ask..is it sane to have a clojure source code as config for you application..by doing an eval at runtime of whole file?

12:21 hyPiRion: no, use edn as config instead

12:21 It's essentially the same thing

12:21 sm0ke: hyPiRion: whats edn?

12:21 samaaron: does anyone know of any nREPL tools for navigating down through to the Java source?

12:22 sm0ke: hyPiRion: is using edn idiomatic way to configure applications at runtime?

12:22 hyPiRion: well, it's better than using eval.

12:23 ,(doc read)

12:23 clojurebot: "([] [stream] [stream eof-error? eof-value] [stream eof-error? eof-value recursive?]); Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current value of *in*. Note that read can execute code (controlled by *read-eval*), and as such should be used only with trusted sources. For data structure interop use clojure.edn/read"

12:23 hyPiRion: read last line

12:23 samaaron: sm0ke: think of EDN as a JSON-like datastructure format

12:24 sm0ke: is EDN's syntax similat to clojure?

12:24 samaaron: sm0ke: it's a subset of Clojure's syntax

12:25 sm0ke: ok gotta have a look at edn thingy

12:26 samaaron: i think drilling down to java code would be tricky

12:26 samaaron: sm0ke: I definitel remember it being possible back in the slime days

12:26 sm0ke: i have realized that clojure functions and definitions keep a metadata about file they exist in and even line numbers

12:29 i guess clojure already provides may things which an ide has to figures out... i mean i have never seen a better integration of any language with vim than clojure

12:33 i am also amazed that when i jump to a clojur source..it directly shows from something-1.0.jar..i clearly remember for java ides you had to provide source jars too? how is that happening?

12:33 technomancy: sm0ke: I'm gonna go ahead and disagree; EDN is fine but there's nothing wrong with eval runtime of clojure source for config

12:34 EDN is a lot less flexible. maybe that's OK if you want to force things to be purely declarative

12:34 logic_prog: what's a good nrepl screencast?

12:34 sm0ke: technomancy: dont take me seriously i was just thinking out loud

12:34 technomancy: or is it really people do?

12:34 something*

12:35 technomancy: sm0ke: people have been using clojure for config long before EDN existed =)

12:35 nDuff: sm0ke: It's typical to put Clojure source directly in your jars. AOT compilation is possible, but its performance penalty comes with forwards-compatibility costs.

12:35 sm0ke: s/performance penalty/performance benefit/

12:35 technomancy: EDN is important for when you don't trust the source, but for config that is not the case

12:35 hyPiRion: Well, it usually boils down to this: Do you have control of the config file? Then you can go and use eval. If you can't trust the source, then go EDN

12:35 aaaand technomancy just beat me to it

12:36 sm0ke: technomancy: did you use it like that in some project? i would like to have a look?

12:36 technomancy: sm0ke: it was basically this: https://github.com/sonian/carica

12:37 wait a minute... carica uses edn now??

12:37 lazybot: technomancy: Uh, no. Why would you even ask?

12:37 sm0ke: thanks

12:37 haha

12:37 technomancy: well... back in my day

12:38 `cbp: oh snap

12:38 technomancy: things were different

12:38 sm0ke: nDuff: does lein publish packages source with jars?

12:38 hyPiRion: sm0ke: yes, by default

12:38 sm0ke: aha thats why its so easy to jump to clojure code

12:39 java packaging sucks big times...and thats why you cant drill down to java code without setting your hairs on fire

12:47 does clojure have a decompile function?

12:49 nDuff: sm0ke: Java disassembly tools work just as well on bytecode generated by Clojure as they do on bytecode generated by javac. Decompilation, OTOH -- no, nobody's bothered to write tools for that; it's hard, and there's very little reason to try.

12:51 TimMc: nDuff: I feel like you could write a decompiler-generator that learned by compiling lots of known sources.

12:51 technomancy: oh man that would be slick

12:51 TimMc: It wouldn't be able to handled obfuscated stuff, but whatever.

12:51 * nDuff imagines something "learning" common macros

12:53 hyPiRion: I'd give the decompiler-generator a lot of Swearjure to learn from.

12:53 TimMc: Yes, yes you would. :-D

12:53 hyPiRion: now you have a java bytecode to Swearjure generator!

12:54 technomancy: TimMc: that would be a fantastic conference talk

12:55 rasmusto: what's easier to read, bytecode or swearjure?

12:55 hiredman: bytecode

12:55 rasmusto: :)

12:56 nDuff: Hmm.

12:56 * nDuff ponders taking a shot at getting approval to release his "Clojure for Atlassian" and "nREPL for Atlassian" plugins.

12:56 hyPiRion: bytecode

12:56 nDuff: (JIRA development is one helluva lot more fun with a REPL involved).

13:08 clgv: since I had to research this myself for while here a shortcut for everyone else: "Luyten" is a pretty good java decompiler GUI

13:09 I switched to it after I saw the homepage of JD-GUI vanishing

13:17 avishai: how can i pass a java class as an argument and then instanciate it?

13:17 e.g. (. ~some-class arg1)

13:18 marco4: (SomeClass. arg1)

13:18 TimMc: nDuff: Oh hey, did you actually get OSGi and Clojure working together?

13:18 technomancy: avishai: I think clojure.lang.Reflector/invokeConstructor

13:19 TimMc: technomancy: I would attend the shit out of that talk.

13:19 nDuff: TimMc: Back when I was working on it last year, yes. Well, working together _enough_.

13:20 TimMc: ...it's been sitting in production for the year since then without getting any attention, until I tried to package Clojure 1.5.1 yesterday and found it triggering a bug with security implications (!) in Maven.

13:20 TimMc: Cool.

13:20 technomancy: ,(let [s String] (clojure.lang.Reflector/invokeConstructor s (into-array []))) ; avishai

13:20 TimMc: Oh, yeah?

13:20 clojurebot: ""

13:22 * nDuff is waiting to hear back from Sonatype's security team. Stems from bloody idiotic code trying to use a shell where Runtime.exec(String[], String[], File) would do.

13:22 avishai: technomancy, invokeConstructor is a java method accepting object[] ?

13:22 nDuff: (and not understanding shell quoting rules correctly, but that's more secondary).

13:23 TimMc: nDuff: Ugh.

13:23 technomancy: avishai: yup

13:23 avishai: ugly. 10x

13:23 technomancy: avishai: you could use eval too

13:24 but it's interop; interop is ugly because java is ugly

13:25 (def instantiate (comp eval (partial list 'new)))

13:26 avishai: is there a macro like time which returns/stores execution time instead of printing it?

13:27 bja: avishai: I don't think so, but it looks like you could pretty easily do that

13:27 the macaro for time is short

13:28 avishai: yeh

13:28 `^_^v: i barely know any clojure but can you rebind *out* and then parse it out

13:28 avishai: just looked at it

13:28 10x

13:29 * nDuff scowls (a bit) at "10x". Is skipping three letters worth increasing cognitive load for the 600+ people reading what you type in this channel?

13:31 technomancy: I have no idea what it means, but what is life without little mysteries popping up everywhere

13:31 `cbp: i guess it means thanks?

13:31 mdeboard: lol

13:31 technomancy: oh

13:32 bja: I thought it was intended for a different window. how do you get thanks out of 10x?

13:32 `cbp: tenx kinda sounds like thanks :P

13:57 sm0ke: why has development of avout stagnated? are there simpler ways to manage distributed states in clojure? i mean avout has to be useful right

13:58 bbloom: my guess: most apps need very limited coordinated state & often need a few features specific to distribution of coordinated state (such as emphemeral keys) that the clojure state model doesn't provide natively

14:00 sm0ke: bbloom: yes agreed, even scalable architecture are often sessionless..but 1 out of 10 people trying to make something scalable would want that

14:01 *nned*

14:01 need*

14:01 nDuff: sm0ke: avout isn't complete enough to be usable right now. In particular, it doesn't have sane exception handling.

14:01 sm0ke: that's enough of a showstopper to send folks who might otherwise use it elsewhere, unless they want to get involved in its development.

14:04 sm0ke: its shocking that only erlang got it right.

14:04 akka in scala is something similar to erlang model..but they keep pushing the clustering to next releases

14:06 nDuff: ...huh? Avout isn't (and isn't intended to be) an alternative to Akka, or Erlang's model.

14:06 sm0ke: yea it only manages states i know

14:06 munderwo: Hi all. I'm building a REST api using compojure. Im getting a org.eclipse.jetty.server.HttpInput java object(?) as the parameter into a POST handler. I'd like to be able to get the body into a clojure map (as the body is just json) and i've got the wrap-json-body middleware working, but I haven't been able to work out how by searching the inter webs? any hints?

14:07 sm0ke: oh i had this thought.. what if core.async provides what erlang does with its actors

14:08 i mean can we have a channel being read on some other machine?

14:09 nDuff: Nothing stops you from plumbing channels together across a MQ or similar bus.

14:09 sm0ke: or more generally a channel which can be wrutten from any machine

14:09 written on*

14:09 * nDuff shrugs.

14:10 sm0ke: nDuff: a MQ is a unecessay overhead and also spof

14:10 nDuff: The interesting problems I follow tend to have aspects where cache locality, data locality, &c. matters.

14:10 sm0ke: Depends on your MQ, of course.

14:17 glosoli: I was doing some tasks at 4clojure and there was a need to implement alternative to range, hmm and I found one interesting solution by some user #(take (- %2 %) (iterate inc %)) kinda curious if anyone could elaborate explaining if such things take a lot of resources I still seem to be struggling when it gets to understanding lazy seqs (any resources would be appreciated)

14:20 mdrogalis: glosoli: iterate is lazy

14:20 It's just computing one element at a time.

14:21 glosoli: mdrogalis: so even though I did iterate for some infinite number, it did not do any actual computation unless I tried to use nth element ?

14:22 mdrogalis: glosoli: Yes.

14:23 rasmusto: ,(source iterate)

14:23 clojurebot: Source not found\n

14:24 rasmusto: ,(source clojure.core/iterate)

14:24 clojurebot: Source not found\n

14:26 glosoli: mdrogalis: thanks sir :)

14:31 mdrogalis: Sure

14:42 bosie: completely offtopic but how would i add a gplus or website to prismatic? (i ask here because it was discussed yesterday in here)

14:45 clgv: $source iterate

14:45 lazybot: iterate is http://is.gd/KaO3bo

14:45 rasmusto: clgv: ty

14:46 pjstadig: ~source iterate

14:46 rasmusto: for future reference

14:53 bbloom: hyPiRion: good article

14:54 suggestion: replace "The only difference is that each node in the tree either has a reference to at most two subnodes (except for the leaf nodes)"

14:54 hyPiRion: bbloom: ty

14:54 bbloom: with: "The only difference is that interior nodes in the tree either have a reference to at most two subnodes"

14:54 rasmusto: hyPiRion: I enjoyed the read too :)

14:54 bbloom: s/either//

14:54 Jarda: btw, my first clojure related blog entry - http://narhinen.net/2013/09/25/Sessions-with-compojure.html

14:54 bbloom: my point is that interior nodes = all nodes minus leaf nodes

14:55 hyPiRion: bbloom: yeah, I'll add it in. Thanks

14:55 rasmusto: :D

15:11 nkoza: there is some library for core.async to channelize network sockets? so you can do alt! over channels and sockets

15:23 hyPiRion: bbloom: updated

15:24 bbloom: ::thumbsup::

15:24 hyPiRion: Also added in a "influenced by" comment in the beginning, because HN like to nitpick on such things.

15:30 callen: Sigh, I finally post to /r/clojure, and James makes weird comments.

15:31 this is why I don't post to /r/clojure.

15:32 scriptor: what did you post

15:34 callen: http://www.reddit.com/r/Clojure/comments/1n1n0p/circlecistefon_asset_pipeline_for_clojure_closely/

15:44 papachan: weird floating point here https://twitter.com/joshgiesbrecht/status/382927201387036672

15:46 hiredman: papachan: that is how floating point works

15:47 papachan: find another language will floating point math and it will give you same answer

15:48 gfredericks: how do I type hint a 2d int array?

15:49 hiredman: ^"[[I"

15:50 the jvm doesn't technically have 2d arrays, it has arrays of arrays

16:03 dobry-den: Ruby has Rakefiles. JS has Jakefiles. What would Clojure's Makefile be called?

16:03 Jarda: Clokefile

16:04 hyPiRion: project.clj-files

16:04 Bracki: I want to get Foo/BAR but only have Foo and :BAR, what do I need to do?

16:04 Apage43: JS has Jakefiles?

16:04 dobry-den: Apage43: Noe*

16:04 node*

16:04 Apage43: that's not part of node proper

16:05 bbloom: also, it seems Gruntfiles have kinda won in node.js land

16:05 dobry-den: Cloakfile is cute

16:05 Apage43: I get that impression

16:05 llasram: Is there an existing library providing nice printable/readable forms for byte arrays and ByteBuffers?

16:06 dobry-den: Sure, I was just trying to draw a parallel to seed the mind with ideas

16:06 hiredman: unless you know your bytes are always going to be small, pushing them back and forth through the reader is going to suck

16:07 https://github.com/hiredman/bytes

16:07 llasram: hiredman: I'm mostly interested in having a nicer printed form while debugging byte-oriented code

16:07 Apage43: I saw that

16:07 and went to star it

16:07 and already had

16:07 llasram: So base64 isn't quite what I need, alas

16:08 Easily enough done -- just wanted to avoid re-inventing the wheel :-)

16:08 dobry-den: I saw some solution for that a while back

16:08 Apage43: but also yeah, like llasram, sometimes what I want is for eyeballing. Something like spaced-out hex

16:09 I half-assed some things last time I needed that

16:10 dobry-den: oh, i was thinking of https://github.com/ztellman/gloss

16:10 nvm

16:11 llasram: Ah, yeah

16:12 dobry-den: when i work with bytes i just map int across them

16:13 Apage43: now I feel like writing this

16:14 llasram: Let's all write our own versions! :-D

16:20 Bracki: How do import a single function from clojure.string?

16:21 manutter: (refer '[clojure.string :only [whatever]])

16:22 Bracki: inside ns?

16:22 manutter: Inside ns do (ns …. (:refer [clojure.string :only [foo]]) …)

16:23 slightly different punctuation, but same general idea

16:23 mdrogalis: tbaldridge: Think you could do a blog post on deep macros sometime? My interest is piqued.

16:24 llasram: manutter, Bracki: The more typical way would be (:require [clojure.string :refer [whatever]])

16:24 callen: mdrogalis: ever read Let Over Lambda?

16:24 mdrogalis: callen: I haven't. Good place to learn about them?

16:24 tbaldridge: mdrogalis: yeah, I'm considering doing that soon.

16:25 mdrogalis: Fogus's article hurts my brain.

16:25 manutter: O right, I mixed up refer/require again, sorry

16:26 and threw in the evil "use" syntax as well (*facepalm*)

16:26 need more coffee

16:26 callen: mdrogalis: LoL is the primary book Common Lispers get deep into macros with. I don't think it's necessarily to the nth degree tbaldridge achieved.

16:26 mdrogalis: slightly more shallow, but still interesting, macro patterns can be found in Korma too. Somewhat simpler, nicer API oriented stuff there. :)

16:27 mdrogalis: Good to know. I'll make time for it :)

16:28 callen: I'm trying hard not to let my CL heritage bleed through here :P

16:28 hfaafb: out of curiosity, is there any way to look at the entire tree of a persistent data structure?

16:30 callen: hfaafb: look at the Java implementations in core and see if you can tear apart the underlying classes.

16:30 I'm not aware of any such thing in core.

16:31 technomancy: https://github.com/cobyism/Filefile

16:32 dobry-den: I don't know, but if you figure it out send a pull request to ^

16:32 Apage43: llasram: hexdump printing/reading https://www.refheap.com/19002

16:32 mdrogalis: I tried to understand Clojure's Red-Black tree implementation and my eyeballs exploded.

16:33 Apage43: ooh

16:33 there's a bug in here

16:33 mtp: SQUISH IT

16:33 Apage43: silly jvm with your lack of unsigned types

16:35 llasram: Apage43: Cool

16:36 Apage43: License? I'm planning to throw together a dev-oriented lib later

16:36 Apage43: aaand fixed one bug and a cosmetic issue

16:36 llasram: Apage43: I mostly want a string-with-escapes printing

16:36 but hexdump would be a nice option, especially if all together in one place

16:36 Bracki: Can I monkey patch a toString method onto a Java class?

16:37 llasram: Bracki: No monkey-patching methods. The closest you can get is using `proxy` to create an anonymous subclass, but it's not quite the same

16:37 Apage43: llasram: preference? I'll prolly stick on github as MIT shortly

16:37 llasram: Apage43: MIT is perfect

16:38 technomancy: MIT has no patent protection =(

16:38 it's perfect if you live in a country with good software patent laws

16:38 Apage43: Are there patents on hexprinting :/?

16:38 technomancy: yes

16:38 llasram: Ok, Apache2 or EPL are perfect

16:38 callen: just use the right license.

16:38 Bracki: Or maybe how do I get midje tell me what's different?

16:38 technomancy: (for any value of x)

16:39 bbloom: technomancy: heh, yeah, i was about to say "i haven't actually looked, but yes of course"

16:39 technomancy: Bracki: clojure.test has a cool difftest plugin

16:43 Apage43: llasram: https://github.com/apage43/hex

16:45 feel free to lift it wholesale or whatever

16:46 llasram: sweet. gracias

16:48 Bracki: technomancy: hm, not any verboser than midje unfortunately...

16:54 eric_normand: tbaldridge: ping

16:54 tbaldridge: eric_normand: pong

16:55 eric_normand: tbaldridge: hello!

16:56 tbaldridge: I have a core.async question.

16:56 tbaldridge: I'm using it on the JVM

16:56 tbaldridge: what happens when a go block really blocks on IO

16:56 tbaldridge: does it block the thread it's on?

16:57 tbaldridge: eric_normand: yes, and you only have NUMBER_OF_CPUS + 42 threads for gos to run on.

16:57 so a little bit of wiggle room, but not much

16:57 eric_normand: tbaldridge: I see

16:58 tbaldridge: I'm trying to get more parallelism

16:58 tbaldridge: it's mostly IO bound

16:58 tbaldridge: eric_normand: there's nothing wrong with using the thread macro instead of the go macro

16:58 eric_normand: tbaldridge: about 100 web requests

16:58 tbaldridge: I'd like to do them all at once

16:58 tbaldridge: you get a dedicated thread via the thread macro.

16:59 eric_normand: in that case I'd look into using a async HTTP client lib and use put! to send the results to the go blocks

16:59 eric_normand: tbaldridge: hmm

16:59 tbaldridge: I'm wondering about http.async.client

17:00 tbaldridge: eric_normand: yeah! that should work, just have the callback from the web request do (put! c response)

17:00 and have your go use <! to take from c

17:00 This is exactly the use case put! was designed for

17:01 eric_normand: tbaldridge: I'm more worried about http.async.client

17:02 tbaldridge: how so?

17:02 I've used it in some projects, was very happy with it. Except each AsyncHTTPClient only uses a single thread, but that shouldn't hurt you in this case

17:02 I've done > 2000 requests/sec with this lib

17:03 eric_normand: tbaldridge: ok, thanks! I was worried because there was some talk in the docs about executor servics

17:03 tbaldridge: and I was worried it was faking async with threads

17:04 tbaldridge: thanks very much. very helpful. and I am loving core.async!

17:04 tbaldridge: eric_normand: it's pretty async, do too much work inside the callback and bad things will happen. so just put! into a channel and you should be fine. Perhaps even use (chan 1) for max throughput.

17:08 holo: hi

17:11 mercwithamouth: hola

17:17 callen: mercwithamouth: hi

17:17 holo: hi

17:17 holo: hey callen

17:31 gf3: noprompt: Wow, Garden looks amazing! Thank you

17:32 noprompt: gf3: oh. heh, thanks!

17:32 logic_prog: I have defined (defun force-refresh () (interactive) (nrepl-send-string-sync "(clojure.tools.namespace.repl/refresh)")) -- how do I get the result of the refresh (sometimes it contains compiler errors_ to be displayed in a minibuffer?

17:32 noprompt: gf3: 1.0.0 is almost finished. :)

17:33 gf3: noprompt: Incredible, I'm going to use this for everything

17:33 noprompt: Coming from a SASS/Compass world this looks even better

17:33 noprompt: gf3: lol, it's actually kind of a trip.

17:34 gf3: make sure you grab the 1.0.0-SNAPSHOT from the repo though, and look at the ChangeLog. there are a few lies in the README right now that i'm gonna fix today.

17:35 gf3: i'll probably cut 1.0.0 and announce it on the mailing list here pretty soon.

17:35 gf3: thanx for the <3!

17:35 gf3: noprompt: I'm excited

17:35 hhenkel: Hi all, anyone around who could explain alt! from core.async to me? I'm reading the docs over and over again, but I don't get the usage in https://github.com/clojure/core.async/blob/master/examples/ex-async.clj

17:36 tbaldridge: hhenkel: alt! is just alts! + case

17:36 noprompt: gf3: me too. mostly i'm really looking forward to working on making it awesome client-side.

17:37 gf3: noprompt: Client-side?

17:37 hhenkel: tbaldridge: that's what I understand. But why is is ([v] v) in the example?

17:37 noprompt: gf3: yeah. in cljs.

17:37 repl: Hey guys.

17:37 gf3: noprompt: I have a bunch of Compass-like functions I made for cssgen that I can translate to Garden

17:37 noprompt: But why on the client?

17:38 repl: Can somebody explain to me why this does the printing: (def map-println (comp (constantly nil) empty? (partial map println)))

17:38 noprompt: gf3: mostly because i'm interested in seeing what you can do with easy manipulation of the CSSOM.

17:38 repl: But not this: (def map-println (comp (constantly nil) (partial map println)))

17:38 hhenkel: tbaldridge: is it always true and alt is just used to show it is possible to use it?

17:38 noprompt: gf3: instead of just direct style attribute substitutions or stylesheet appends.

17:38 tbaldridge: hhenkel: I'm not sure why they are using alt there....it doesn't really make sense to me.

17:39 noprompt: gf3: being able to hang on to and manipulate individual parts of the stylesheet seems like it could be really interesting.

17:39 gf3: noprompt: Interesting

17:39 repl: I don't understand why I need to put a function like empty? in there to get the printing evaluated

17:40 hhenkel: tbaldridge: So alts would be the better solution then? Do you know of a good example using alt?

17:40 hyPiRion: repl: map is lazy

17:40 `cbp: repl: because map produces a lazy sequence which empty? realizes

17:40 repl: Ah I see, thanks. :-)

17:40 hyPiRion: try out e.g. mapv instead

17:40 repl: OK, will do now.

17:42 noprompt: gf3: that image on the WAT repo cracks me up every time.

17:43 gf3: noprompt: Oh god, I can't even look at it without bursting out laughing

17:43 TEttinger: repl, an alternative is ##((fn [coll] (doseq (map println coll))) [1 2 3])

17:43 lazybot: java.lang.IllegalArgumentException: doseq requires a vector for its binding in clojure.core:1

17:43 TEttinger: gah

17:44 I think I meant doall

17:44 repl: hyPiRion: Yep, works without empty? using mapv, thanks. (doc map) says it returns lazy seq, (doc mapv) normal vector. Didn't notice that before. :-)

17:45 hyPiRion: yeah, doall on a lazy seq works too

17:45 TEttinger: ##((fn [coll] (doall (map println coll)) nil) [1 2 3])

17:45 lazybot: ⇒ 1 2 3 nil

17:45 hyPiRion: ,((comp dorun (partial map println)) [1 2 3])

17:45 clojurebot: 1\n2\n3\n

17:46 TEttinger: what is dorun?

17:46 ,(doc dorun)

17:46 clojurebot: "([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil."

17:46 repl: I see.

17:46 `cbp: like doall but returns nil

17:46 hyPiRion: `cbp: kind of, doesn't retain head

17:46 `cbp: :-)

17:46 hyPiRion: may be an issue for large stuff

17:46 TEttinger: what does that mean?

17:47 I've seen doesn't return the head a few times

17:47 Raynes: Funfact: refheap is just over 19k pastes.

17:49 TEttinger: Raynes: a significant amount of them I assume is my bot on quakenet barfing out quotes. sorry.

17:49 Raynes: TEttinger: Nothing to apologize for.

17:49 Refheap is a text dumpster.

17:49 By all means keep dumping text into it.

17:50 TEttinger: well there's 19005

17:50 repl: hyPiRion, TEttinger: So with dorun I'm able to not use the weird (constantly nil) trick, nice.

17:50 `cbp: TEttinger: it means that the whole seq is kept in memory while it's being realized.

17:51 hyPiRion: what `cbp said. Not retaining head means that elements already processed may be garbage collected

17:51 `cbp: TEttinger: because seqs are kinda like linked lists so keeping the head (first element) keeps everything

17:51 TEttinger: ok, so not retaining the head means it doesn't have to realize the seq to dorun it?

17:52 `cbp: not retaining the head means it doesn't have to keep old values to realize new values

17:52 Apage43: TEttinger: it means the parts its realized already can get GC'd

17:52 if it *did* retain the head none of it could get GC'd til the end

17:53 TEttinger: ah

17:54 Apage43: important for stuff like say, using line-seq on a multi-gigabyte file that you want to lazily filter

17:58 repl: Thanks guys, learned neat stuff today, will join #clojure regularly from tomorrow. Bye.

18:11 akurilin: Is there anything like Sprockets for coffeescript out there by any chance? I think dieter supports coffee right now, but not yet cljs

18:12 finishingmove: how would i insert an item after each existing item in a sequence?

18:13 tbaldridge: ,(doc interpose)

18:13 clojurebot: "([sep coll]); Returns a lazy seq of the elements of coll separated by sep"

18:13 tbaldridge: ,("|"

18:13 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

18:13 tbaldridge: ,("|

18:13 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading string>

18:13 arohner: akurilin: have you seen the new version? https://github.com/circleci/stefon

18:13 doesn't support cljs, but should be easier to update

18:13 tbaldridge: ,("|" [1 2 3 4 5])

18:13 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.IFn>

18:13 finishingmove: so that's kind of like haskell's intersperse?

18:13 good enough i guess

18:13 tbaldridge: nvm I fail at life

18:14 ,(interpose "|" [1 2 3 4 5])

18:14 clojurebot: (1 "|" 2 "|" 3 ...)

18:14 tbaldridge: there we go!

18:16 akurilin: arohner, that's fantastic, thanks for the link.

18:17 arohner, if I'm understanding correctly, active development of dieter stalled a few months ago and so this is basically the continuation?

18:18 arohner: yeah

18:18 and dieter was more circle code than non

18:18 akurilin: I imagine circle uses this very actively in production, right?

18:18 arohner: every day

18:18 akurilin: Excellent!

18:18 arohner: though to be pedantic, we use it to build the production assets

18:18 we don't use it at runtime

18:20 akurilin: arohner, sounds good. I'll probably see if I can get away with runtime + aggressive caching at first, but I can see how CDN is ultimately the destination.

18:22 arohner: akurilin: sure. in development we use it at runtime

18:24 akurilin: arohner, regardling stefon + cljs, are there circle plans to make that happen, or is that something you guys will let folks decide for themselves and send over a pull request?

18:24 arohner: we're not using cljs yet, so we have no plans to make it happen

18:24 though we'd take a pr

18:25 akurilin: arohner, sounds good, makes sense.

18:37 Leonidas: hmm, is there a way to get the information from doc in a structured format?

18:38 rasmusto: you mean more than just a string? stuff like its arity?

18:39 Leonidas: rasmusto: yes, basically what I can get from (meta (var foo)), but not only for functions. (doc) also handles special forms

18:41 rasmusto: Leonidas: oh hm. what special forms are you talking about? I know that quite a few of them are shadowed by macros, and you should be able to pull metadata from them

18:42 Leonidas: rasmusto: well, even a simple if. If I try to retrieve it with (meta (var if)) it obviously fails.

18:42 I looked at the implementation of doc, but the funtions it uses are for the post part private

18:42 *most

18:42 rasmusto: ah I see. I don't know how to get around that

18:44 Leonidas: lazybot: ,(meta (var mod))

18:45 rasmusto: ##(meta (var mod))

18:45 lazybot: ⇒ {:ns #<Namespace clojure.core>, :name mod, :arglists ([num div]), :added "1.0", :static true, :doc "Modulus of num and div. Truncates toward negative infinity.", :line 3161, :file "clojure/core.clj"}

18:45 Leonidas: ah, ##!

18:45 in the query , worked.

18:45 anyway, I'm going to hang around for a bit, maybe someone has an idea, otherwise I'll just ask the ML

18:47 nDuff: Bleh.

19:05 bja: what's the appropriate way to test if something in clojurescript is callable? is it #(= js/Function (type %)) ?

19:08 amalloy: bja: if it's anything like clj-jvm, it'll be ifn? or fn?

19:08 and comparing to js/Function looks like it absolutely must be wrong

19:08 technomancy: there is also instance? on regular coljure

19:09 brehaut: on himera instance? looks like a real function

19:10 bja: fn? apparently asks google

19:10 goog/isFunction

19:11 technomancy: heh; I thought it goes and queries google search

19:11 brehaut: ifn? i think

19:11 hmm no

19:11 technomancy: "Your search for 'is (fn [x] x) a function in clojure' returned no hits."

19:11 brehaut: kinda weird that there is cljs.core.IFn but no ifn? predicate

19:12 bja: amalloy: I just checked http://docs.closure-library.googlecode.com/git/closure_goog_base.js.source.html

19:12 goog.isFunction = function(val) {return goog.typeOf(val) == 'function';};

19:14 looking at their definition of goog.typeOf, I seem to be way way off

19:15 anyway, fn? seems to be the way to go

19:15 brehaut: bja: sort of. it doesnt include things that can act like functions (such as maps)

19:16 bja: err, ifn? exists

19:16 brehaut: maybe himera is just out of date then

19:18 bja: must be very out of date given that ifn? made it in in April of last year

19:19 brehaut: ah its just not in the namespace for whatever reason. cljs.core.ifn? works as expected

19:44 gfredericks: technomancy: reflection is slow because of search engine latency

19:46 noprompt: i love it when i misspell something and then autocomplete it everywhere.

19:46 tonkenizer.

19:46 wtf is a tonkenizer? haha.

19:46 s4muel: Sounds like it makes toy trucks out of string input

19:46 * noprompt probably should bump the font-size up a bit.

19:47 noprompt: s4muel: haha tonka trucks.

19:47 logi_prog: is there a clojure builtin function for xml-escapling? i.e. I wnat &, <, and > to be converted

19:48 * s4muel has definitely worked with large codebases where misspellings are propagated all the way through JSP variables and you have to program to the misspelling. 'origTumbnail' ... i will never forget you

19:48 technomancy: HTTP Referer

19:49 noprompt: cljx is good times. :-)

19:49 :-) <-- see that? that's my good-times face.

19:50 :-( <-- sad-times-face.

19:50 ; _ ; <-- sad-times-face'

19:51 technomancy: ^_^ <- good-times-face

19:51 brehaut: (╯°□°)╯︵ ┻━┻ ← javascript times face

19:51 noprompt: brehaut: rofl.

19:52 s4muel: ┬──┬ ¯\_(ツ) <-- clojure times face

19:52 everyone saw that coming, i know, but still.

19:52 indigo: What's your PHP times face

19:52 s4muel: (ノಠ益ಠ)ノ彡┻━┻

19:53 technomancy: that's when your head explodes; no face left

19:53 sinistersnare: ╭∩╮(-_-)╭∩╮ PHP times face

19:53 indigo: ಥ﹏ಥ this is mine

19:53 s4muel: (inc technomancy)

19:53 lazybot: ⇒ 76

19:53 s4muel: indigo: ...don't you work in a php shop

19:53 indigo: I sure do

19:53 Doesn't mean I like the language ;)

19:54 * gfredericks imagines an old-timey store with boxes full of PHP on the shelves

19:54 s4muel: indigo: man, there's not enough cat pictures in the world to make that better.

19:54 brehaut: gfredericks: lined with double clawed hammers

19:54 indigo: s4muel: It's okay, at least I got upgraded to a Mac

19:55 s4muel: gfredericks: haha. with some old grump 'still hangin on' to PHP 5.5 -- now with classes and ... uhm, yeah classes

19:55 The Perl 6 store is around the corner

19:55 brehaut: well, it will be soon. they're still building it

19:55 s4muel: in a ... cloud of vapor

19:55 LOL yes.

19:55 gfredericks: most of these shops on main street are closing down cuz everybody goes to JavaMart

19:57 * noprompt ponders making a liquid called "Perl 6" for vaporizing.

19:57 hyPiRion: gfredericks: the one in the JVM mall?

19:58 s4muel: JVM = Java Valley Mall

19:58 one stop shopping for all your 'it was better all along' needs

19:58 gfredericks: I wonder how much of the java code that runs was written by a computer in some capacity

19:59 brehaut: gfredericks: back when i wrote java, i flipped all my own bits with a very sharp stick

19:59 s4muel: gfredericks: given the lack of preprocessor / macro stuff (that I know of, at least) probably not a lot compared to say, the prodigious work done by m4/C preproc macros and C++ templates

20:00 gfredericks: its the definition of arcane

20:00 s/its/it's/

20:00 brehaut: s4muel: instead of a preprocer, java has eclipse

20:01 s4muel: brehaut: true, the question is probably 'i wonder how much java code was written by repeatedly hitting tab'

20:01 brehaut: a lot: theres still the refactorings menu

20:02 not to mention, programs that mash strings together to feed into other programs is a long programmer tradition

20:02 regardless of language support

20:02 we cant all use tcl afterall

20:02 noprompt: oh cool github does syntax highlighting for cljx now.

20:02 brehaut: what is cljx?

20:03 noprompt: brehaut: https://github.com/lynaghk/cljx

20:04 brehaut: huh

20:04 HUH

20:04 hyPiRion: Oh, so it's #+ and #- all over again. Welcome back to CL I guess

20:09 logi_prog: this is a dumbass question

20:09 but I'm gettig weird resuts:

20:10 how do I take a channel and create a list of all the elements pushed onto the channel (after the channel terminates)

20:10 I'm currelyting creating an atom, then inside of the go block running swap! + conj

20:10 but at the end, despite printing out the intermediate results, I get nil

20:10 oh shit, because the I get it now

20:11 go blocks are running in a separatate thread

20:18 chord: ok did anyone start the starcraft clone project while i was gone

20:20 IS ANYONE LISTENING TO ME

20:22 technomancy: lazybot: dunno; you think anyone cares??

20:22 lazybot: technomancy: What are you, crazy? Of course not!

20:28 * noprompt commits the selfless act of removing :author meta from his open source clojure project.

20:29 noprompt: commit message: I don't like :author meta.

20:32 here's a cool name for an SQL library "where-wolf" someone please use it.

20:32 so a sql query walk in to a bar...

20:33 :-/

20:33 chord: noprompt go make www.github.com/starcraft-clojure

20:33 brehaut: im trying to think of a really good implementation of starcraft. cant quite remember who makes it

20:33 oh yeah

20:33 blizzard

20:34 chord: brehaut: starcraft 2 sucks shit

20:34 so thats not true

20:34 noprompt: ,(let [shit-head? #(= "chord" %)] (shit-head? "chord"))

20:34 clojurebot: true

20:35 chord: noprompt you think you're funny?

20:35 noprompt: chord: i think i'm the funniest person that ever lived, in fact.

20:36 sinistersnare: chord: the last couple times ive been on this chan, youve been annoyingly spamming people

20:36 noprompt: clojurebot: am i the funniest person that ever lived?

20:36 clojurebot: Titim gan éirí ort.

20:37 brehaut: that bot is far too eloquent for irc

20:37 chord: sinistersnare: its not spamming, clojure starcraft is an idea not a spam

20:37 brehaut: it's even got little flicks on its vowels.

20:37 * noprompt is looking for his magic 8-ball.

20:37 sinistersnare: then make the damn thing and shut up, no one wants to do your dirty work, then you take the credit

20:37 no one likes you here

20:37 brehaut: noprompt: lazybot

20:38 noprompt: lazybot: am i the funniest person that ever lived?

20:38 ; _ ;

20:38 brehaut: lazybot: are you messing with noprompt???

20:38 lazybot: brehaut: Oh, absolutely.

20:39 noprompt: isn't there a way to tell it to remember something? i feel like this is a fact worthy of being recorded.

20:39 brehaut: oh right, yeah clojurebot can be taught facts

20:39 although mostly everyone forgets the syntax and teachs it weird syntax errors

20:40 noprompt: clojurebot: fact noprompt is the funniest person that ever lived.

20:40 clojurebot: c'est bon!

20:40 brehaut: which then get fed through the inferencer to produce garbled responses at alater time

20:40 noprompt: :-/

20:40 brehaut: i have a note on my wall somewhere but it appears to have gotten lost

20:41 so you are problably left with reading the fnparse rules

20:43 chord: if I write the first line of code for starcraft clojure will you guys help after that

20:43 noprompt: clojurebot: remember noprompt is the funniest person that ever lived.

20:43 clojurebot: Ik begrijp

20:43 brehaut: all evidence suggests no

20:43 callen: ,(println "welcome to our intellectual property theft game!")

20:43 clojurebot: welcome to our intellectual property theft game!\n

20:43 noprompt: ah, fuck it.

20:43 callen: noprompt: are you doing Clojure Cup?

20:43 noprompt: callen: i dunno, but just came up with best name for an SQL library ever.

20:44 callen: noprompt: what?

20:44 noprompt: callen: where-wolf.

20:44 callen: LOl

20:44 noprompt: isn't that loller?

20:44 callen: that's brilliant.

20:44 noprompt: want to join a Clojure Cup team making a client-side analytics service? Saves all data, query later?

20:44 noprompt: callen: that sounds legit.

20:45 rasmusto: where-worm

20:45 noprompt: callen: the website is also pretty awesome.

20:45 callen: noprompt: it's me and a really talented frontend guy. http://clojurecup.com/apps.html "Simonides" is my team.

20:46 chord: callen i will join in return you help with starcraft clojure

20:47 callen: noprompt: making this because I've always wanted an analytics data dashboard/aggregator that I could host myself and hack on.

20:48 noprompt: callen: did that even work?

20:49 Kelet: After doing about 13 of the Clojure Koan lessons I'm starting to see why people like Lisps :O

20:49 great learning resource for those of us coming from Java and such I think

20:51 indigo: Kelet: Yep, lisps are sexy

20:52 Especially Clojure which actually has decent looking data structures

20:52 chord: prove it to me with starcraft clojure

20:52 Kelet: I never really messed with them and was kind of (intimidated (by (this (odd (syntax)))) but a competent editor makes it a breeze.

20:53 And I kind of like that it feels more natural to place things 'as i want' rather than how the language dictates in many cases

20:54 indigo: chord: #ruby, #python, #haskell... ain't nobody got time for you

20:54 Kelet: Which editor are you using

20:54 chord: indigo: but you don't know why they banned me

20:55 Kelet: indigo, A mix of Vim and Light Table depending on where I am. I've set up my project in a way where it does well with Light Table functionality. Although I know Vim (and especially Emacs) can do the same (and likely more)

20:55 sinistersnare: yeah, hes definitely trolling, i recommend that everyone do a /ignore chord

20:55 mtp: i recommend that the chanops ban *!*@*

20:56 the troll problem will sort itself out forthwith

20:56 sinistersnare: but that would ban me i think :(

20:56 indigo: Haha, good one mtp

20:56 Kelet: Well, I should say, my project is being set up in a way that allows re-evaluation of code to easily tweak the project while it's running which is awesome.

20:56 sinistersnare: i should stop using web based irc's

20:56 indigo: chord: I can kinda see why http://ircbrowse.net/browse/haskell?q=chord

20:56 Kelet: Did you check out vim-fireplace

20:56 Kelet: indigo, Nope, but I will now

20:57 indigo: It's nice, you can have a pseudo-REPL in vim

20:57 Although callen will probably kill me for recommending vim ;)

20:57 chord: indigo: they banned me for no good reason

20:58 Kelet: Haha, I've used Vim for a while, I've tried Emacs but always run into little issues. With programmable text editors, I don't think choice is too big of an issue anymore.

20:58 rasmusto: Kelet: fireplace is good, nrepl.el is good

20:58 everything is good and right

20:58 Kelet: But I imagine Emacs is more popular around here, due to it using a Lisp so extensively

21:00 noonian: light table is written mostly in clojurescript I believe

21:01 timvisher: what am i misunderstanding about compojure defroutes here?

21:01 brehaut: Kelet: i would say that emacs is more popular because of – historical, not so much any more – better integration with clojure at runtime than other environments, than for having a lisp under the hood

21:01 timvisher: https://github.com/timvisher/bible-plan/blob/austin/src/clj/whitespace-server.clj#L28-L29

21:01 https://github.com/timvisher/bible-plan/blob/austin/src/clj/whitespace-server.clj#L18-L20

21:01 Kelet: Yeah, it's definitely an interesting concept, and it runs pretty well for me although I can't figure out how to reevaluate all of the code rather than just one line, one selection, or one file.

21:01 (in Light Table, that is)

21:02 brehaut: timvisher: whats not working?

21:02 timvisher: I'm attempting to have the `resources` function serve out of `resources/public/whitespace` on the one hand, and `resources/public` on the other

21:02 resources/public works fine as it's the default

21:02 but the `:root` directive doesn't seem to do anything

21:02 but inspecting the code would lead me to believe that it should

21:03 i can put anything into the `:root` option, even things that don't exist, and it just continues to serve them out of `resources/public`

21:03 brehaut: timvisher: oh, this is a resources issue rather than routes. resources arguments always confounds me

21:03 timvisher: brehaut: heh

21:03 btw, if cemerick is around, i finally understand how austin can work with a static site

21:04 brehaut: i suspect he's still getting his types handed to him at ICFP :P

21:04 timvisher: i think you were even trying to tell me this before but that fact that I can dynamically alter html via enlive means that i can simply have a jetty server as my dev server that dynamically appends brepl stuffus

21:04 pretty ingenious, and exactly how the austin sample site works

21:04 sorry for all my confusion earlier. :)

21:05 mtp: i'm confused by your apology

21:05 timvisher: brehaut: nice

21:05 mtp: how so?

21:05 mtp: :)

21:05 i'm being goofy, don't mind me.

21:05 timvisher: lol. ok

21:11 cespare: anyone here a korma expert?

21:11 amalloy: ~anyone

21:11 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

21:13 cespare: If i want to do 'select foo.* from foo, bar where ...', how do I do the foo.* part in korma?

21:13 noprompt: cespare: expert?

21:13 mtp: that doesn't sound like an expert question

21:13 cespare: sigh, yes, let's focus on that part

21:14 (fields :foo.*) doesn't work

21:14 noprompt: cespare: i recommend using something else. there was something on the ML that looked really good...

21:15 cespare: i haven't tried this but it looks very promising https://bitbucket.org/czan/clojure-sql

21:15 cespare: noprompt: except at work we've got a ton of code which all uses korma. But thanks for the help.

21:15 noprompt: cespare: oh nm then.

21:18 cespare: i think i ran in to something like that before. you can always use `exec-raw` until you figure out the correct dance moves.

21:19 Raynes: cespare: You'll have to excuse us. It's just that asking specifically for a Korma expert makes it entirely impossible for a remotely modest person to speak up and assist you.

21:20 noonian: cespare: I think you can use 'raw', look at the very last example on this page: http://sqlkorma.com/docs

21:21 (fields (raw "foo.*"))

21:21 cespare: haha, after asking around for 20 minutes I got the answer here and from a coworker at the same time

21:21 thanks noonian

21:21 (answer == acceptable workarounds)

21:21 noonian: hehe, np

21:22 timvisher: i am the confused… https://github.com/timvisher/bible-plan/blob/austin/src/clj/whitespace-server.clj#L22-L30

21:23 noprompt: holy cow! documentation. whoa trippy.

21:23 timvisher: there were at least 2 issues. 1. caching wasn't disabled so i thought my changes to the routes weren't taking effect.

21:23 2. resources doesn't seem to work as advertised

21:23 but i can't see why

21:33 wow. so the issue was that `resources` options are a map

21:33 not a set of key value pairs as in some other libraries

21:33 not sure why that took me so long to see. :

21:34 s/:/:\

21:34 this is all i needed to do: https://github.com/timvisher/bible-plan/blob/austin/src/clj/whitespace-server.clj#L22-L24

21:34 (^_^)b

21:36 so building this project takes 45 minutes. :(

21:36 i guess i shouldn't complain too much but man does that suck.

21:36 noonian: timvisher: try (resources "/" {:root "public/whitespace"}), the resources fn is destructured like [path & [options]] and treats options as a map

21:36 oh, too late

21:36 timvisher: noonian: thanks though. :)

21:37 i was literally staring at that code going: why doesn't the (:root options "public") for return hat it should?

21:38 i was conflating it, I think, with defns that do `[& {:keys [root}]`

21:38 noonian: hehe, yeah i don't think i've seen many function parameter lists destructured that way

21:41 brehaut: (inc noonian)

21:41 lazybot: ⇒ 3

21:41 brehaut: good catch

21:42 noonian: thanks

22:19 _scape: getting: IllegalArgumentException: Value out of range for byte: 128 with this http://pastebin.com/8Y7Npp4p while it worked for [0 1 2] is it because I have numbers above 128? Does not seem to make sense

22:21 gfredericks: ,(byte 130)

22:21 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for byte: 130>

22:21 gfredericks: ,(byte -20)

22:21 clojurebot: -20

22:21 gfredericks: _scape: ^ they're signed; so 127 is the upper limit

22:21 ,Byte/MAX_VALUE

22:21 clojurebot: 127

22:21 _scape: ok, that makes sense now

22:21 amalloy: &(unchecked-byte 130)

22:21 lazybot: ⇒ -126

22:22 gfredericks: &(unchecked-byte 2944833)

22:22 lazybot: ⇒ 65

22:22 _scape: what's going on there?

22:22 gfredericks: &(mod 2944833 128)

22:22 lazybot: ⇒ 65

22:23 gfredericks: it's just taking the bottom 8 bits and making a byte out of them

22:23 or something

22:23 hammer: trying to follow this tutorial, http://clojure-doc.org/articles/tutorials/emacs.html, but when i try to run tests with C-c C-, I get "C-c , is undefined"

22:23 I have clojure-mode loaded, I'm able to do C-c C-k and some other repl interactions

22:24 (wasn't sure if this or #emacs was a better place)

22:25 _scape: unchecked-byte seemed to help, I'm passing this off to a bytebuffer for opengl, so it's a bit beyond me in regards to bytes. followed an example that simply used byte likely because it was a triangle example with a size of 3 :)

22:25 Cua: hammer: seems like a problem wiht emacs unable to register your control sequence

22:27 jimrthy_: Cua: I don't think that was hammer's control sequence. According to that tutorial, it should run the unit tests

22:28 Cua: jimrthy_: "C-c , is undefined" -> It should have been "C-c C-,"

22:29 jimrthy_: I meant that I don't think hammer put it together. It looks more like a "Add these pieces to emacs.d, then these shortcuts work" sort of tutorial

22:30 sinistersnare: what does :classifier do in project.clj (leiningen)?

22:30 the sample doesnt really say

22:30 Cua: jimrthy_: okay

22:32 jimrthy_: This is just a gut instinct, but that page almost looks obsolete. It seems to be mostly about the lisp starter kit

22:32 _scape: sinistersnare: https://github.com/rogerallen/hello_lwjgl/blob/master/project.clj

22:33 example usage

22:33 sinistersnare: ive seen usage, but does it do anything? or is it just for reading?

22:34 jimrthy_: hammer: I'm *totally* not an expert here, but I'd take that page with a grain of salt. If I'm not mistaken, the author's deprecated a big chunk of it

22:37 * Cua tried, have no problem with it

22:38 Cua: look at the status line, what are the current modes of emacs?

23:03 geoffeg: Can i destructure the return values of a fn? ([lat lon] get-geo-data) thinks i'm trying to call [lat lon])

23:06 noonian: ,(let [[lat lon] ((fn [] [1 2]))] [lat lon])

23:06 clojurebot: [1 2]

23:07 noonian: you can only destructure in let, fn, and binding forms, but yes you can destructure funtion return values

23:08 geoffeg: thanks!

23:13 benmoss: does anyone know why there's not an official clojurescript on clojars?

23:14 brehaut: benmoss: all the official clojure and contrib libs are deployed to maven central

23:14 benmoss: gotcha

23:15 brehaut: you would need to add that repo to your project.clj config

23:15 maven central is more Serious than clojars; clojars is a bit of a wild west

23:15 benmoss: so Clojars is the de facto standard repo for Clojure?

23:15 brehaut: yeah

23:15 benmoss: like its built into lein

23:15 brehaut: the clojure community in general prefers clojars

23:15 benmoss: but maven is serious business

23:15 brehaut: but clojure the project prefers central

23:15 benmoss: *maven central

23:16 gotcha

23:18 hm, central seems to be built in too, i didn't have to add anything other than the dependency itself

23:20 brehaut: oh it might only be the snapshot repo that needs to be added specifically

23:22 benmoss: what are snapshots exactly? just like HEAD of a git repository?

23:23 brehaut: a package with -SNAPSHOT in the version

23:23 you can have multiple different snapshots for the same version though

23:23 so its unpredictable

23:23 benmoss: whats it supposed to signify?

23:24 that your 0.3.3-SNAPSHOT may be different than someone else's?

23:24 brehaut: that its just snapshot in time of development

23:24 "im working toward 0.3.3 but its not done yet, but its different to 0.3.2"

23:24 benmoss: gotcha

23:24 clojurebot: contains? checks whether an indexed collection (set, map, vector) contains an object as a key. to search a sequence for a particular object, use the `some` function, which accepts a predicate. if you want to only match a certain object, you can use a set as the predicate: for example, (some #{5} (range)) finds the first occurrence of 5

23:27 holo: i deployed a libray i just developed to clojars using lein-clojars and when i run some test (a test that works in the library itself) inside an app the test fails with a java.lang.NullPointerException. the rest of the stacktrace is pretty useless. any idea about an obvious reason behind this?

23:28 brehaut: holo: without code and a stacktrace someone, nobody is going to have a hope of helping you

23:28 ~help

23:28 clojurebot: http://www.khanacademy.org/

23:28 brehaut: lol

23:28 ~help

23:28 clojurebot: Nobody can help with "X doesn't work". Please provide context: what you did, what you hoped would happen, and what happened instead. A stack trace is especially helpful, if applicable.

23:29 sinistersnare: hello #clojure ! I spent the past couple minutes writing up a small article on using LibGDX with clojure. Its now on the official wiki page on Github of LibGDX. I would like to say that im only a Clojure fan and beginner, so I would love for some of you to look at the code and writing of the article, and maybe give me some critisicm

23:29 https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-Clojure

23:29 is the page

23:30 holo: brehaut, sure i can even host in github, which i was going to do anyways. i just didn't want to host the source before i could test it in some app

23:31 Apage43: you can even toss the just the snippet that crashed in a gist or on refheap

23:31 brehaut: holo: minimal relevant source and a stacktrace on gist or refheap would be a good start. i doubt many people are going to want to spelunke your entire codebase

23:31 Apage43: if you'd prefer

23:33 sinistersnare: actually, i have to sleep, but the wiki can be edited publicly, and ill probably ask for criticism again tomorrow. thank you guys!

23:34 holo: brehaut, Apage43, the library provides something like 250 successful tests. the simple test i ran in the app (one that is also present in the library) is the one that doesn't work. how can a snippet of source be of any help, i thought. i'll provide a snippet

23:35 brehaut: holo: well its a question of scope. without a snippet your code could be literally anything computable

23:35 thats quite a large domain to be winnowing

23:35 Apage43: typically you would include the functions of yours that are present in the stack trace

23:37 in general, provide what you yourself would be looking at to figure out the problem

23:43 holo: i'm going to upload to github.. the deploy to clojars may not be working, but that's another story. later when i have this ready i come here again

23:44 but not today :) i'm sleepy.. thanks for the insights

Logging service provided by n01se.net