#clojure log - Nov 19 2013

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

0:03 abaranosky: do any of you all have your emacs setup to click through to Java? I want to at least be able to make tags for clojure.core if I Can

0:03 coventry: abaranosky: Do you mean getting etags to work with java files? I did that.

0:04 abaranosky: coventry: yeah. Do you have any sample code I could look at?

0:04 coventry: hi, are you the gentleman I met at the conference, Alex Coventry?

0:05 coventry: abaranosky: Yes.

0:06 Hello again. :-)

0:07 technomancy: amalloy: interesting. I wonder if it was considered to support both behaviours.

0:07 sharing-subs vs copy-subs

0:10 coventry: abaranosky: There's not much code to it. "find . -name \*.java | etags -" creates the TAGS file, then (setq) tags-table-list to point to the directory containing the TAGS, or just specify it on the first call to find-tag.

0:11 abaranosky: Or did you mean getting M-. to DTRT with java in .clj files? That I haven't done.

0:11 hiredman: technomancy: it would be difficult to get both from the same class

0:12 without wasting fields

0:12 abaranosky: coventry: so to create tags you need access to the .java files right? So if all I have are jars I'd need to open them and build a TAGS file from that?

0:12 hiredman: and String is final

0:13 technomancy: hiredman: ah right; one of the reasons cited was to save space per string

0:13 abaranosky: coventry: yeah... Ideally I can access any java code that some .clj file is using

0:14 coventry: abaranosky: Yes, I was working with the clojure source code at the time. Getting nrepl to use reflection to find the source code for java objects by reflection would be cool.

0:14 technomancy: coventry: you'd need a plugin to fetch :classifier "source" versions and put them on the classpath too

0:16 hiredman: technomancy: that analysis brought to you by my ergodox

0:16 technomancy: hiredman: how's your wpm?

0:16 hiredman: midteens

0:17 technomancy: hiredman: have you considered that now is probably the best time in your life to learn dvorak

0:17 * technomancy flees

0:17 bitemyapp: technomancy: in case you cared, the PlayStation 4 is now the best controller to get for emulators.

0:17 technomancy: works out of the box on Linux with every emulator I've tried so far.

0:17 Out. of. the. box. No drivers, no installs, no config.

0:17 Just goes/

0:17 amalloy: technomancy: dvorak is so old-hat. the cool kids are using colemak now (future readers, please fill in with latest fad)

0:18 Raynes: amalloy: Workman.

0:18 Noob.

0:18 amalloy: yeah yeah. not so excited about workman

0:18 technomancy: bitemyapp: is it hard to get good emulator controllers?

0:18 bitemyapp: Buying a PS4 controller is the most brilliant thing I've done all month.

0:18 technomancy: I got a $20 in college that worked perfectly

0:18 bitemyapp: technomancy: that have a good d-pad and "just work" out of the box on Linux? yes, it's damn near impossible.

0:18 amalloy: well, neither about colemak or dvorak

0:18 hiredman: working with this reduced key layout so I have an extra third shift layer

0:18 bitemyapp: technomancy: no no, I'm picky about d-pads. Most vanilla PC gamepads have *terrible* d-pads.

0:18 Raynes: technomancy: I like the Logitech f10.

0:19 f310

0:19 technomancy: bitemyapp: I don't even remember what it was; the first one I tried was great

0:19 Raynes: Works out of the box on every machine I've ever used.

0:20 bitemyapp: Logitech controllers don't have good d-pads though.

0:20 VFe: The trials and tribulations of fighting gamers...my life for a d-pad that works.

0:20 Raynes: bitemyapp: My favorite controller is the xbox 360 controller, but I sure bet the PS4 controller is better.

0:21 bitemyapp: VFe: hear hear! The PS4 controller d-pad is great so far :)

0:21 VFe: yeah, DS4 is first time I've considered switching from PS2 for fighting games.

0:21 bitemyapp: Raynes: the 360 controller is okay, I've used it happily before, but the PS4 is better.

0:22 I only found out the PS4 controller supported DirectInput by pure luck, a friend mentioned buying the controller for emulators on Facebook.

0:22 I immediately left the house and got one just now.

0:22 Raynes: bitemyapp: It also supports xinput presumably, right?

0:22 bitemyapp: naw, that's Microsoft specific.

0:23 doesn't need to anyway, DirectInput works everywhere.

0:23 Raynes: Not exactly.

0:23 bitemyapp: well, it's *more* Microsoft specific that is.

0:23 technomancy: maybe they're like laptop keyboards and they just mysteriously stopped making good ones a few years ago

0:23 hiredman: working with dvorak would be hopeless, at least this way only control keys are different

0:23 bitemyapp: technomancy: well kind of, the only company still making good d-pads since the PS2 has been Sony.

0:24 Raynes: Some games are designed specifically for xbox 360 controllers (and thus xinput), so having a controller that can emulate that helps.

0:24 bitemyapp: technomancy: but the PS3 controller was a huge pain to get working on a PC, they rectified this with the PS4.

0:24 Raynes: My logitech f310 can.

0:24 bitemyapp: Raynes: I see, I don't think I play any games like that.

0:25 Raynes: bitemyapp: Try to play Trine with anything short of a 360 controller.

0:25 Your life is going to be really, really bad.

0:25 bitemyapp: I did play it, with a keyboard and mouse.

0:25 quite happily :P

0:25 amalloy: yeah, trine is better with a keyboard and mouse

0:25 Raynes: Lies.

0:25 Trine rocked hard with my 360 controller.

0:25 amalloy: We should play through Trine 2 together.

0:26 Bro.

0:26 bitemyapp: Trine 2 was hilarious for me and a friend to play through

0:26 Raynes: I played through it alone.

0:26 bitemyapp: probably the hardest I'd laughed in years and years

0:26 Raynes: But my mother was watching at the time.

0:26 bitemyapp: now that I have a real controller, I should beat Ninja Gaiden II

0:27 Raynes: My mother never once played Amnesia, but it's her favorite game.

0:27 technomancy: that's one of the few programs I actually sorta wanted to run on my computer but couldn't due to it being too old

0:27 Raynes: She took deep satisfaction in watching me urinate on myself every 34 seconds.

0:27 hiredman: technomancy: I have yet to get a dedicated parenthesis key working

0:27 technomancy: hiredman: still hacking the layout configurator?

0:27 amalloy: no doubt flashbacks to your time as a five-year-old, Raynes

0:27 VFe: Looked it up, DS4 doesn't use input, but it's apparently a very easy(as in, file swap) software mod to make it detect as a 360 controller in windows.

0:27 doesn't use xinput*

0:28 Raynes: VFe: Well, then it is the best controller ever then

0:28 Hands down.

0:28 bitemyapp: You win, my sir.

0:28 bitemyapp: Raynes: I actually beat the first Ninja Gaiden for NES if you can believe it. I've always wanted to beat 2 and 3.

0:29 VFe: DS4?

0:29 VFe: DualShock4

0:29 bitemyapp: I'm pretty sure beating NG for the NES puts me somewhere in the elite echelon of "people that beat Nintendo-hard games"

0:30 hiredman: technomancy: there is a dedicated paren key in the extended numeric keypad stuff, but nothing seems to recognize it

0:31 bitemyapp: ohhhh yeeeaahhh. this controller is *buttery* smooth for Ninja Gaiden/

0:31 hiredman: or maybe I need to re-solder something

0:36 Raynes: bitemyapp: We can certainly agree that the Ouya controllers suck. :P

0:37 They're lightweight and feel cheap, and don't work half the time because of https://support.ouya.tv/entries/24496858-Controller-Lag

0:37 marcopolo2: I'm trying to write an nth equivalent in core.logic, is there anyway I can use a number as an index, or do I have to use a list to represent the number?

0:37 Raynes: It's really sad, actually, They put out a console with atrocious controller lag that they did not catch.

0:37 bitemyapp: Raynes: wow, there's a bullet dodged. That would be a deal-breaker for me.

0:37 Raynes: inputs have to be perfect for me to be happy.

0:37 Raynes: bitemyapp: I've got one with 4 controllers sitting in front of me that I can't even play.

0:37 It has to be perfect for anyone.

0:38 Not just you. Any noticeable controller lag is too much for certain (in fact, most) games

0:38 bitemyapp: that's terrible :(

0:38 even a frame or two of lag would make games like Ninja Gaiden unplayable

0:38 and I know this...because I've tried to play NG with lag.

0:39 bloody impossible.

0:39 Raynes: bitemyapp: Ever play the Devil May Cry series?

0:39 benkay: night

0:39 Raynes: benkay: Goodnight sir.

0:39 benkay: sorry wrong chan :)

0:39 Raynes: It's okay.

0:39 We wish you a goodnight, my friend.

0:39 :)

0:40 bitemyapp: Raynes: never played any of the DMCs

0:40 Raynes: My favorite series of games right there.

0:40 Maybe. Bioshock is up there too.

0:41 technomancy: Raynes: ever played System Shock 2?

0:41 bitemyapp: technomancy: he doesn't need the nightmares.

0:41 technomancy: muahaha

0:42 bitemyapp: I think anybody that like Bioshock would probably like SS2 if they can get over how idiosyncratic the game is.

0:42 Raynes: technomancy: I tried to play the first system shock and realized I wasn't cut out for games that came out less than a year after I was born.

0:42 bitemyapp: Raynes: not cut out how?

0:42 technomancy: Raynes: the second one is totally different

0:42 Raynes: I can't work dos games.

0:42 I just can't.

0:42 My fingers can't handle the controls.

0:42 technomancy: it wasn't even originally developed as a sequel; they decided that half way through

0:42 bitemyapp: Raynes: yeah SS2 is way more modern.

0:43 Raynes: technomancy: Noted, I will definitely play it then.

0:43 technomancy: I want to play the first one though

0:43 I got my start in stuff like Marathon and Descent, so not having a mouse isn't crippling like it is for kids these days

0:44 Raynes: I try to play retro games when I can, it's just that they're usually console games.

0:44 bitemyapp: technomancy: yeah I grew up with Doom, Duke Nukem 3d, ROTT, Descent, etc...

0:45 technomancy: marathon 2 is still my favourite, just for the atmosphere coming from the copious amounts of text-driven (and character-driven) plot

0:45 bitemyapp: so I can handle a game that doesn't have a mouse even if I really cut my teeth on mouse-controlled FPSes like Unreal, Unreal Tournament '99, etc.

0:45 joshnz: Descent 2 co-op FTW! That was awesome.

0:47 bitemyapp: Raynes: okay case in point for Ninja Gaiden 2, the game is already a difficult 2d action platformer and the *second* level already has crazy wind physics throwing me around making it harder to make the jumps *while* getting attacked on all sides.

0:47 this is aweeessssoooome

0:49 logic_prog: can I :require :refer macros the same way I :require :refer functions?

0:49 technomancy: ~tias

0:50 clojurebot: tias is try it and see

0:52 bitemyapp: technomancy: I like that.

0:52 I like it a lot.

0:52 I need to use that :)

0:52 logic_prog: wait

0:52 bitemyapp: ddellacosta: how are you doing?

0:52 logic_prog: what is this special trick that I missed

0:52 technomancy: bitemyapp: 50% of the clojurebot factoids I invoke come from #emacs

0:52 bitemyapp: technomancy: good theft.

0:52 ddellacosta: bitemyapp: fair. Feeling kinda under-the-weather. Yourself?

0:52 bitemyapp: logic_prog: the ~tias macro.

0:53 technomancy: ~botstack

0:53 clojurebot: /me puts lazybot on his head and gropes blindly for a third bot to complete the stack.

0:53 technomancy: ^ case in point

0:53 bitemyapp: ddellacosta: found out the new PS4 controller, unlike the PS3, works on PC. Bought one tonight and am using it play old NES games.

0:53 logic_prog: what is the tias macro?

0:53 bitemyapp: ~tias

0:53 clojurebot: tias is try it and see

0:53 technomancy: Dude, the preferred nomenclature is factoid.

0:53 ddellacosta: bitemyapp: :-O

0:54 bitemyapp: ddellacosta: it's fantastic, works perfectly on Linux. Also, tackled an annoying problem at work today, so pleased with that.

0:54 technomancy: </butchered-lebowski>

0:54 bitemyapp: today's work was 100% open source, feel really good about that.

0:54 * ddellacosta goes to look up PS4 controller to see if it works with Mac OS X

0:54 bitemyapp: ddellacosta: any emulator on Mac OS X should work, I can't speak to specific games. I can try it and let you know.

0:54 I have a Mac with steam installed that I can try it on.

0:55 ddellacosta: bitemyapp: yeah, Steam is exactly why I want to play games on my Mac

0:55 technomancy: also in #emacs they have a ,apropos-dude command for looking up lebowski quotes when you only remember a word or two

0:55 bitemyapp: ddellacosta: I'll give it a whirl and let you know.

0:55 ddellacosta: although, considering the amount of time I have available...BWAHAHAHAA

0:55 technomancy: extra convenient!

0:55 bitemyapp: technomancy: *snorts* that's great :)

0:55 ddellacosta: bitemyapp: k, thanks. Will be interested to know.

0:56 logic_prog: ~tias

0:56 clojurebot: Try it and see! You'll get results faster than asking someone in #clojure to evaluate it for you, and you'll get that warm, fuzzy feeling of self-reliance.

0:58 ddellacosta: bitemyapp: what work problem, btw?

0:58 bitemyapp: ddellacosta: I made datomic migrations incremental/lazy: https://github.com/bitemyapp/brambling/

0:58 you can see my fear, pain, and hate in the commit log.

0:58 ddellacosta: nice!

0:59 bitemyapp: https://github.com/bitemyapp/brambling/commit/21012fb91e24c59aa75a23350a83d0aa0f2f4aa1 dat type error.

0:59 gotta love it.

1:00 * bitemyapp gags violently

1:00 bitemyapp: ddellacosta: next step, differential migrations!

1:00 ddellacosta: Some favorite music of mine when I'm feeling sick or down: http://www.youtube.com/watch?v=SFY0hYEqQQw

1:01 ddellacosta: what is a differential migration?

1:01 bitemyapp: ddellacosta: well when your database isn't mutability based, you can continually replicate transactions.

1:01 so I just do a diff of origin and dest and ship the transactions over :)

1:01 ddellacosta: bitemyapp: morphine! It's been a while. Used to dig these folks. Tragedy about the main guy passing away so young.

1:01 bitemyapp: ddellacosta: god, I know right?

1:02 Morphine <3

1:02 ddellacosta: yeah. :-(

1:02 bitemyapp: 210mb update? seriously Steam?

1:02 oh, must be for SteamOS

1:02 I forgot that existed

1:03 ddellacosta: wowsers

1:06 bitemyapp: hrm, weird. Steam is faster on my slower Linux machine than on my faster Mac.

1:07 technomancy: leiningen 2.3.4 is out

1:07 will do a proper announcement tomorrow

1:07 bitemyapp: yisss early adopter

1:08 technomancy: http://j.mp/leinnews

1:08 nothing terribly exciting

1:13 bitemyapp: Raynes: XInput + PS4 controller: http://www.hardcoreware.net/how-to-ps4-controller-windows/

1:14 sm0ke: any vim users interested in integrating kibit to fireplace?

1:15 bitemyapp: sm0ke: in Emacs-land, that would be a vanilla plugin to be used with flycheck.

1:15 sm0ke: does vim have a flycheck equivalent?

1:15 Raynes: Nope.

1:15 bitemyapp: lolwut.

1:15 Raynes: Not nope to bitemyapp. Nope to sm0ke. :p

1:16 sm0ke: whats flycheck?

1:17 ddellacosta: Raynes, a thank you while you are here for conch: thank you.

1:17 sm0ke: whats the big deal in integration? its just a "lein kibit filepath" away

1:18 Raynes: ddellacosta: Happy you like it!

1:18 ddellacosta: Raynes: been super useful for a side project.

1:20 bitemyapp: sm0ke: well then go for it, nobody's stopping you :P

1:21 sm0ke: emacs users think highly of themselves i see

1:30 looks like flycheck is similar to syntastic in vim

1:39 bitemyapp: Raynes: http://www.youtube.com/watch?v=zUtnwcv-quE

1:40 sm0ke: hmm weird lein kibit doesnt give me anything

1:40 Raynes: sm0ke: Your code must really rock!

1:40 sm0ke: my code cannot be awesome

1:40 i am serious

1:41 Raynes: bitemyapp: Why am I listening to this?

1:43 sm0ke: finally something

1:43 in a different project

1:43 wow my code is awesome!


1:43 marcopolo2: (inc sm0ke )

1:43 lazybot: ⇒ 1

1:43 bitemyapp: Raynes: 90s!

1:44 sm0ke: fuck yeah


1:44 sm0ke: sorry gor carried away

1:44 andyf: bitemyapp: 1790s or 1690s?

2:19 abaranosky: bitemyapp: hey what's the deal with the type theory meetup?

2:19 what do they usually talk about at those?

2:21 bitemyapp: abaranosky: category theory, type theory, practical application (how to make their toys work in Haskell)

2:21 abaranosky: this particular meetup I called out because 1. I'm going to it 2. It's explicitly for noobies.

2:21 abaranosky: if you look at the description for the meetup, you'll see that they're beginning some introductory material and linked some homework.

2:22 abaranosky: bitemyapp: cool. I'll take a look at the link

2:23 bitemyapp: abaranosky: I know not everyone shares this opinion, but I'm of the thought that the category and type theory the Haskellers are working on are the "next step" for anybody comfortable with the basics of higher order functional programming

2:25 abaranosky: bitemyapp: I've worked in Scala and have done *1* 100 line program in Haskell... so my views are colored by those experiences

2:26 bitemyapp: abaranosky: it doesn't really matter, this is the foundational material for anything you'd want to do in any functional language.

2:26 abaranosky: bitemyapp: I don't know the tradeoffs of using a purely functional system in production

2:26 bitemyapp: none of that matters in this case.

2:26 it's just that Clojure doesn't lend itself as well to scaling up the abstractions the way a typed FP language does.

2:26 minor cultural difference.

2:27 akurilin: bitemyapp, sounds like an interesting meetup

2:27 what time is it? meetup.com won't load for me

2:28 bitemyapp: akurilin: it'd be great if you came too.

2:28 I should bug seangrove about it as well.

2:28 abaranosky: akurilin: I thought that was just my terrible internt conenction :\

2:29 akurilin: abaranosky, they're probably doing "seamless" updating :P

2:29 hope it's not a thursday

2:29 or you guys better film it

2:29 not even kidding.

2:29 bitemyapp: akurilin: I think it's Thursday.

2:30 because I'm pretty sure it's set for the 21st.

2:31 lgs32a: coventry: I am hardly trying to get troncle working

2:31 bitemyapp: meetup.com isn't loading for me either, lame.

2:32 lgs32a: hardly as in not at all?

2:32 lgs32a: bitemyapp: excuse my english. i wanted to say it's not easy.

2:33 bitemyapp: lgs32a: not that I'm terribly familiar with Troncle beyond being an admirer, early-stage libraries often aren't meant for consumption by people not comfortable hacking around.

2:33 lgs32a: coventry: when i run troncle-trace-region nothing happens.

2:34 coventry: if i try to select a region like in your example i get "sexp ends prematurley"

2:35 coventry: but aside from that no error message is available in no buffer

2:35 bitemyapp: lgs32a: when you say "nothing happens", you're trying to run the code after setting the trace right?

2:35 lgs32a: bitemyapp: well i do it as described in the readme

2:37 coventry: lgs32a: I was just pushing changes to the repo, so it might have been in a skewed state when you downloaded it. Looks like I'll have to stop doing that.

2:37 lgs32a: coventry: nevermind i saw that and i don't expect anything to work at such an early stage

2:37 coventry: lgs32a: Before you run troncle-trace-region, have you run troncle-set-exec-var or tronce.traces/st?

2:37 lgs32a: coventry: but i thought before i go down the hard road to debug without any error message, i'd ask you

2:38 coventry: yes, with c-c t E

2:38 bitemyapp: coventry: in case you're wondering what I wanted troncle for, I use Emacs macros for local dev, but for tracing code in production, troncle will/would be nice for dumping executing state to a log.

2:38 coventry: lgs32a: Can you put up an example where you get the "sexp ends prematurley"?

2:38 lgs32a: well i have defined this silly fn:

2:39 (defn test-fn

2:39 [val]

2:39 (let [v (* 3 val)

2:39 x (inc val)]

2:39 [v x]))

2:39 coventry: if for example i select the let-clause, i get the err-msg

2:39 coventry: forward-sexp: Scan error: "Containing expression ends prematurely", 16668, 16669

2:39 coventry: let-form i wanted to say

2:40 coventry: selecting the whole fn doesnt give me any error msg

2:42 coventry: lgs32a: Hmm, it's working for me. The logic for choosing the top-level forms to send back for recompilation is one of the last things I changed, so it may well be skew.

2:43 lgs32a: coventry: hmm. i don't have your patch from 7minutes ago. i will try that now. is the elisp from install-package troncle still up-to-date?

2:43 coventry: lgs32a: I'm selecting from the paren just before the let to the one just after [v x].

2:43 lgs32a: No, you should re-eval the version in the repo.

2:44 lgs32a: coventry: i will, ty. regarding the selection from the let-form i did the same.

2:44 coventry: lgs32a: This is a problem with marmalade, actually, it will be hard to get people to update to the latest version, and it's going to change quickly. I can see the reason for melpa, now.

2:45 bitemyapp: Thanks for the feedback.

2:47 bitemyapp: coventry: I keep an embedded nRepl server in our staging and production Clojure instances and tunnel in to do maintenance and debugging periodically.

2:47 so the notion is that I'd use troncle to slap a trace on something problematic, trigger the behavior or wait for it to trigger, then turn the trace back off.

2:47 lgs32a: coventry: maybe we should write something that determines in runtime whether the elisp is up to date and comlains if it isn't?

2:48 coventry: lgs32a: Thanks, that is a great idea. I will do that.

2:48 bitemyapp: hot-spot detailed logging :)

2:48 coventry: do you support or plan to support conditional trace logging?

2:48 coventry: where one can run a conditional against the arguments and return a boolean?

2:48 lgs32a: coventry: i'd like to do that if that is not on your priority list #1

2:49 coventry: bitemyapp: Yes, that is next on the list, actually. Still not sure about the design, but it's definitely needed.

2:49 lgs32a: That would be awesome, thank you.

2:49 bitemyapp: abaranosky: http://www.meetup.com/SF-Types-Theorems-and-Programming-Languages/events/149329292/ 7 pm Thursday

2:49 pmde: hi. can anyone tell me how to do a "field is null" where clause using korma?

2:50 bitemyapp: coventry: that one feature would make it complete and perfectly awesome for my use-case.

2:50 coventry: because then the trace log output would be even more precise.

2:50 less soup to wade through.

2:50 wish I could do stuff like this in Haskell :)

2:51 coventry: bitemyapp: Yes, configuration of the trace output destination is important anyway because you can easily hang emacs by dumping too much to the nrepl buffer.

2:52 bitemyapp: Haskell actually has way better tracing facilities. I think the library which really impressed me was hat.

2:53 bitemyapp: coventry: hum, hat is really good, but I was actually thinking of my ability to tunnel a REPL into a production instance.

2:54 coventry: bitemyapp: Oh, I see. Yeah, that is very nice.

2:54 bitemyapp: BTW, please don't use it in production without checking with me first. I would want to make sure the specific tracing instrumentation you'll be using is general enough first by testing it on a large codebase.

2:55 bitemyapp: coventry: haha, I won't.

2:55 I'm brave, but I'll wait for a "stable" stamp to get slapped on it.

2:55 I'll alter-var-root my own tracing facilities if they're direly needed.

2:55 or hotpatch a couple log lines

2:56 abaranosky: bitemyapp: alter-var-:(

2:56 I'm going to alter-var-root my alter-var-root to that ^^^

2:57 bitemyapp: abaranosky: I use AOP pretty often, comes with the CL heritage. I don't mind it much.

2:57 coventry: Anyway, I'm off to bed. I really appreciate the you guys' interest in this. lgs32a: Please file an issue if it still doesn't work.

2:58 bitemyapp: abaranosky: I don't do it in typical production code as a first order pattern, I only use it when I have to. Like in blackwater.

2:58 And you're not supposed to deploy blackwater to production.

2:58 Not really.

2:58 Unless you really are too lazy to do your own query logging.

3:39 Raynes: juuuuust now got to level 3.

3:39 * ucb waves

3:39 ucb: bitemyapp: good song

3:40 * bitemyapp waves back

3:40 bitemyapp: ucb: Morphine is great :)

3:40 ucb: got a PS4 controller today, best controller for emulators I've ever used. Works perfectly on Linux.

3:40 having a ball with some classic NES Ninja Gaiden 2 :)

3:40 going to bed...now though.

3:40 ucb: nice

3:40 g'night

3:40 bitemyapp: don't even own the console, just got the controller ^_^

3:40 ucb: g'night!

3:41 ucb: heh

3:45 Raynes: bitemyapp: https://www.youtube.com/watch?v=llBEfIfBOvk

3:48 andyf: Is there some compiler flag that makes def/defn issue a warning if the same var is def'd more than once? Or some modified version of def/defn that do such a thing?

3:49 Maybe defonce is close to what I want.

4:07 nonuby: i was going to ask this as a clojure style guide question, https://www.refheap.com/21047 but there's probably more problematic issues to enlighten me.. thoughts?

4:08 i guess >! should be >!! since it wont be run in go block

4:17 broquaint: Given you're blocking on the result of the insert what does the async buy there?

4:22 nonuby: broquaint, go point, i guess i dont to deref then, but will be realized if i dont deref.. goes back to docs

4:22 go point --> good point

4:23 cYmen_: amalloy: How does 4clojure generate those "you can now move on to X" suggestions? Have these been added manually?

4:33 amalloy: cYmen_: no, iirc it's the lowest-numbered unsolved problem of the lowest difficulty remaining

4:34 cYmen_: amalloy: I expected something like that but it doesn't seem that way.

4:34 amalloy: it might also just be wrong

4:34 cYmen_: amalloy: Maybe I missed something or have my list sorted weirdly?

4:35 amalloy: the list is sorted not by problem number, but by number of times solved

4:35 (on the theory that most-solved problems are easiest)

4:35 we should use that sorting for recommendations too, but nobody ever bothered

4:36 cYmen_: ah...so basically conflicting notions of easiness

4:36 thanks for clearing that up

4:36 was bugging me not to know :)

4:37 amalloy: I take it back I still don't think it's right. :)

4:38 amalloy: haha

4:38 cYmen_: It just suggested a hard problem but I am still working through the elementaries. :)

4:42 amalloy: I'll try to fix it later. Need to get started with some real projects anyway.

4:44 amalloy: might not even do the difficulty filtering, i dunno

4:49 Jens_D: Hi

5:24 `rand`: I'm having trouble with cider 0.3.1 in emacs 24; I'm sure it's my inexperiece. I created a leiningen project to play with macros, so I have (ns macros.core) with a few functions and simple macros. When I load the namespace with C-c M-n, all of clojure.core is inaccessible. I can fix it by adding (:use (clojure.core)), but I thought clojure.core was automatically required?

5:39 amalloy: `rand`: C-c M-n doesn't load the namespace, it just puts the repl into the already-existing namespace. C-c C-k compiles the current file, so you'll want to do that first

5:44 `rand`: amalloy: ah, ty. So I can remove the use clause from my ns definition if I compile with C- C-k?

5:44 amalloy: i wouldn't expect that :use to make a difference either way, really. surprised you've determined it does

5:46 `rand`: it's probably my setup.

5:59 ucb: bitemyapp: http://www.youtube.com/watch?v=fq1gb50iobU

8:08 bordatoue: could any give me a hint on how to create a lazy vector

8:09 could anyone give me a hint on how to create a lazy vector

8:09 tbaldridge: bordatoue: there isn't a way to do it with built in Clojure constructs. You can create a lazy seq however and turn int into a vector with vec

8:09 ,(vec (range 3))

8:09 clojurebot: [0 1 2]

8:10 bordatoue: tbaldridge: can you write someting tlike (take 1 (vec(range)))

8:11 tbaldridge: bordatoue: no, since the call to vec will run out of memory. Lazy + indexing (what vectors are) doesn't really work well.

8:12 bordatoue: tbaldridge: programically is it possible to create lazy vectors

8:12 hyPiRion: yes, but you have to define it yourself

8:13 tbaldridge: bordatoue: sure, anything is possible.

8:14 bordatoue: is there any othere construct in clojure that will introduce delay in trival of an element from the list, apart from lazy seq

8:17 solussd: core.async question- how do you check if a channel is open?

8:28 tbaldridge: solussd: currently the only way is to take from the channel and see if you get nil. We can provide a predicate for this, and I'm going to try to get this added to the api, but I need to talk with Rich about it first.

8:51 CookedGryphon: bordatoue: have you looked at delay?

8:52 just wrap every element of the vector in (delay) and then deref it

8:52 it'll only evaluate when it's read

8:52 for the first time, then cache

8:53 tbaldridge: CookedGryphon: I don't think that's what he's looking for. He wants lazy created vectors. At least thats what I would think when I heard "lazy vector"

8:54 CookedGryphon: i was going off introduce delay in an element from the list

8:55 bordatoue: CookedGryphon: concept of using a delayed stream is equivalent to a lazy-seq isn't it

8:57 Can anyone explain how is lazy-seq implemented and how is it different from delay and force

8:58 tbaldridge: bordatoue: one can think of a lazy seq as a cons list, where the "rest" is defined as a delay and force.

8:59 CookedGryphon: bordatoue: well lazy seq you assume each element depends in some way on the previous elements and they are calculated in order

8:59 tbaldridge: the contents of the cells aren't defined in the delay, the entire tail of the cons cell is defined in the delay

8:59 hence the problem with this

8:59 ,(range)

8:59 clojurebot: (0 1 2 3 4 ...)

8:59 tbaldridge: ,(vec (range))

8:59 clojurebot: #<OutOfMemoryError java.lang.OutOfMemoryError: Java heap space>

9:00 bordatoue: tbaldridge: thanks for the explanation

9:00 CookedGryphon: vectors tend to be used for random access, so a vector of delays would be a different thing, allowing you to reference things later in the list without having to evaluate everything leading up to it

9:00 but i don't think i quite know what problem you're actually trying to solve so that may be entirely irrelevant

9:02 bordatoue: CookedGryphon: I am not trying to solve any problem, I just wanted to understand if it was possible to have an implemenation of lazy-seq using delay and force

9:05 vpak: Hi, can anyone help me? I'm writing unit tests for my first clojure program and need to find out a way to verify the number of invocations of mock function. What is the feasible way to do it? Thanks in advance

9:05 tbaldridge: vpak: pass the mock function in as an argument to the thing you are testing, then have that function call (swap! some-atom inc)

9:07 vpak: tbaldridge: thanks for the advice... I thought about such variant, but it looks a bit clumsy. May be there are more elegant ways?

9:07 tbaldridge: vpak: clumsy, how so?

9:08 vpak: tbaldridge: the preferred variant would be something like it is done in mockito "vefiry(mock, never()).method(args)"

9:09 otherwise I need to declare another atom, do this in (let ...) form, which means more levels of parentheses nesting

9:10 tbaldridge: vpak: if you are worried about reducing the number of lets in your code...I'm not sure you are approaching the problem the right way.

9:11 another option, is to have the function you are testing return something that can be tested. The fact that you want to count the number of calls to a function, implies it is performing some sort of side-effect. Perhaps making the tested function pure may simplify testing.

9:12 have one function that does the calculations, and one that performs side effects, and test them individually.

9:12 vpak: tbaldridge: yes, mocked function saves some entities to repository

9:13 we do not use the result that it returns, so I can't check returned value

9:15 tbaldridge: vpak: that's what I'm saying, refactor your code and test the processing of the function by testing the data returned. No mock is needed.

9:15 if you don't mix processing with side-effects, things are much simpler to test.

9:31 CookedGryphon: vpak: you can do what you want in midje, but i agree with tbaldridge that your life will be easier if you test pure functions in the main

9:32 vpak: with midje you can do (fact (thing 1 2) => :whatever (provided (db-call "stuff") => :whatever :times 1))

9:35 tbaldridge: CookedGryphon: some would argue if that should be done, even if it can be done :-P

9:44 myguidingstar: Hi all, will the value hold by atom `foo` in this code be garbage collected right after it is executed? (let [foo (atom 0)] (do-something ...))

9:44 mikerod: What is a good way to build a map of map entries, where many of the entries will conflict on keys, so you just want to conj them together into a list when that happens. Example:

9:44 ,(into {} [[:a 1] [:b 2] [:a 3] [:a 5]])

9:44 clojurebot: {:a 5, :b 2}

9:44 mikerod: => no good, that just overwrites key collisions

9:45 ,(apply merge-with concat (map (fn [[k v]] {k [v]}) [[:a 1] [:b 2] [:a 3] [:a 5]]))

9:45 clojurebot: {:b [2], :a (1 3 5)}

9:45 mikerod: sort of works... a little weird

9:45 also, stack overflows if it is too big I have learned

9:46 ,(apply merge-with concat (for [i (range 4000)] {:a [i]}))

9:46 clojurebot: #<StackOverflowError java.lang.StackOverflowError>

9:46 mikerod: :)

9:46 clgv: mikerod: what is the exact problem description? how should you output look like ideally?

9:46 mikerod: (comp doall concat) works there I suppose...

9:47 keys -> vectors is fine

9:47 so when there is a collision, I'd like to conjoin

9:47 conj

9:47 but, initially there is no value

9:47 so, this can be done with reduce

9:48 I'm just wondering if there is a "higher level" way to do it

9:49 BobSchack: myguidingstar: so long as you don't have any thing holding onto to it I believe that is the case

9:49 myguidingstar: BobSchack, thanks

9:50 mikerod: ,(reduce (fn [m [k v]] (update-in m [k] (fn [e] (if (seq e) (conj e v) [v])))) {} (for [i (range 10)] [:a i]))

9:50 clojurebot: {:a [0 1 2 3 4 ...]}

9:50 BobSchack: np

9:50 mikerod: That is the most straight-forward way I know to do it

9:50 gfredericks: mikerod: btw, I think s/concat/into/ solves the stack problem

9:51 mikerod: and maybe your update function could be replaced with (fnil conj [])

9:51 or just conj if you don't mind it being a list

9:52 ,(type (conj nil 42))

9:52 clojurebot: clojure.lang.PersistentList

9:52 mikerod: ,(reduce (fn [m [k v]] (update-in m [k] conj {} (for [i (range 10)] [:a i]))

9:52 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading>

9:53 mikerod: ,(reduce (fn [m [k v]] (update-in m [k] conj v)) {} (for [i (range 10)] [:a i]))

9:53 clojurebot: {:a (9 8 7 6 5 ...)}

9:54 mikerod: ,(reduce (fn [m [k v]] (update-in m [k] (fnil conj []) v)) {} (for [i (range 10)] [:a i]))

9:54 clojurebot: {:a [0 1 2 3 4 ...]}

9:54 mikerod: gfredericks: pretty good, I haven't thought of that

9:55 and s/concat/into/ does solve the stack issue. Good point. I guess I like the reduce approach more since it seems more straight-forward instead of making a bunch of mini-maps to merge (if I didn't have maps to start with).

9:55 gfredericks: yeah definitely

9:55 concat vs into is good to know about though

9:56 the concat issue is one of the main gotchas with lazy seqs

9:56 mikerod: that is good to know. I had to think about it a minute. I've never used into in that way before.

9:56 yeah, the lazy seq problem bit me once now with concat. it was fairly difficult to track down.

10:00 prio: Trying to recreate a flapjax example in cljs using core.async and was wondering if anyone had any suggestions on how I could do it better? https://gist.github.com/prio/7546572. Atm I am using alt! and two similar but different recur calls as I want it to unblock if a value is out on either channel.

10:05 nDuff: coventry: ...well, the most immediate use case is figuring out when a code change will break an interface anyone else (among our >100 active projects) depends on.

10:06 coventry2: Ah, I get it. Very cool.

10:06 gfredericks: Is there a jira bug for the concat stack overflow problem? I'd like to see how people have tried to solve it.

10:08 danneu: prio: i think your recurs only looks redundant because you shadow x and y.

10:09 prio: even [x'] and [y'] would be more clear

10:11 prio: danneu: Ok, thanks. I guess there is no function that returns the latest value from an updated channel and the last from every other channel then?

10:11 danneu: prio: well, your go-loop binding already acts as a ratchet for the last value of other channels

10:12 clgv: coventry2: the stackoverflows when using `concat` are due to stacking one lazyseq on another repeatedly until there are as much to overflow the stack

10:12 danneu: so passing unchanged x and y back into recur is pretty clear there unless i'm missing the mark

10:12 clgv: coventry2: usually, do not use `concat` recursively.

10:12 danneu: prio: or are you saying the code doesn't actually do what you're trying to do?

10:13 prio: danneu: No code works fine, just wondering if there was a better way to do it

10:13 coventry2: clgv: There's no obvious recursion in mikerod's example, though.

10:14 clgv: coventry2: ah right, in this case it is sequential stacking concats

10:14 danneu: prio: dunno but that `start` function is pretty clear to me, especially if you changed it to (recur x' y) and (recur x y')

10:14 gfredericks: coventry2: yeah I agree with clgv that there's not an obvious problem; the only thing I could imagine doing is having lazy seqs keep track of how nested they are and do some auto-realization if they get too nested; which sounds sketchy

10:15 prio: danneu: Ok, thanks, good to get another opinion on it.

10:16 gfredericks: coventry2: usually when this comes up people are using laziness when they don't need it

10:17 coventry2: OK. Interesting.

10:18 gfredericks: I'm starting to realize the `this` arg is often useful with records

10:18 for doing updates via assoc/update-in instead of calling the constructor directly

10:18 danneu: i often find myself bike-shedding my own code. -- i have no clue how to refactor some of the truly hard to read clusterfuck, but i'll spend an hour playing with ways to compress the only function i'll understand in 3 days

10:19 take those 5 tokens down to 3

10:19 a maverick

10:34 prio: danneu: Yeah, know what you mean :)

10:35 seangrove: bitemyapp: What's the meetup?

10:35 Nevermind, found it

10:36 Oh, it's at Mixrank? How interesting. Scott is a wizardly fellow, wonder if they've changed their stack in the past few years.

10:41 silasdavis: I am logging with Timbre. Should I be wrapping a logging statement and the function body in a (do ...) block or is it ok just to put (debug "blah") before the rest of the function?

10:42 justin_smith: the body of a function is an implicit do, if that is what you mean

10:43 ,((fn [] 1 2 3 4))

10:43 clojurebot: 4

10:43 seangrove: Which is sometimes annoying.

10:44 Would be nice to get a warning, "WARNING: forms 1, 2, 3 in ((fn [] 1 2 3 4)) are dead code"

10:45 danneu: seangrove: then i couldnt pretend `def` actually has a docstring arg in peace

10:45 justin_smith: but it does have a docstring arg

10:45 def does not have an implicit do

10:45 danneu: it does?

10:45 oh wait, def is not what i meant

10:46 defmethod or something

10:46 coventry2: seangrove: Sounds hard in general. You would basically need a way to detect pure functions whose results aren't used.

10:46 justin_smith: danneu: http://sprunge.us/SMfC?clojure

10:47 seangrove: coventry2: Maybe - if primitives/uninvoked-functions, in a list like that passed in a fully macro-expanded form, you could tell it won't be used, right?

10:48 danneu: justin_smith: i pretend defmethods have docstrings tho

10:48 after the params

10:48 justin_smith: ahh

10:49 coventry2: seangrove: You could definitely detect unused primitives that way

10:49 danneu: got no time for ^{:doc _}

10:49 justin_smith: sounds like a feature request for lein kibit

10:56 gfredericks: danneu: that wouldn't work anyways

11:03 noncom: what is the best way to check if a vector is a map entry?

11:04 like ,(vector? [:a 1])

11:04 ,(vector? [:a 1])

11:04 clojurebot: true

11:04 noncom: ,(map-entry? [:a 1])

11:04 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: map-entry? in this context, compiling:(NO_SOURCE_PATH:0:0)>

11:07 noncom: ,(mapv #(= (type %) clojure.lang.MapEntry) {:a 1})

11:07 clojurebot: [true]

11:07 danneu: gfredericks: haha yeah, youre right

11:07 noncom: is the only way i can think og

11:08 danneu: gfredericks: so we're left to comments to document defmethods

11:08 noncom: or

11:08 ,(mapv #(instance? clojure.lang.MapEntry %) {:a 1})

11:08 clojurebot: [true]

11:19 poppingtonic: ,(mapv #(instance? clojure.lang.MapEntry %) [:a 1])

11:19 clojurebot: [false false]

11:21 clgv: I want to implement a REST service where the calculations might consume some considerable amount of time. It needs to be able to maintain around 4000 such calls. the weberver should not run out of threads that accept those requests. is this possible with ring?

11:21 to simplify the description: the REST service is synchronous whereas the calculation the requests trigger are asynchronous

11:22 swarthy: If any of the Caribou guys are on now I would love help with this issue I'm having: https://github.com/Kodowa/Light-Table-Playground/issues/907

11:26 justin_smith: hey swarthy I'm a caribou guy

11:26 also we have #antler and try to hang out there (hopefully eventually we will acquire #caribou)

11:27 gfredericks: danneu: it's not really clear what the effect of docstrings on defmethods would be; how would they be accessible? where would you see them?

11:28 justin_smith: swarthy: is the issue that we are requiring too old a version of fs?

11:28 indirectly I am sure

11:28 swarthy: justin_smith: that is what Chris Granger implies in his response

11:28 justin_smith: I don't even know what fs is, I think it is an indirect dependency

11:29 for a workaround you could use an :exclude clause in your project.clj to force the right version to come in

11:29 I find the lein-pedantic plugin is very helpful for this sort of thing

11:29 swarthy: It is a filesystem utility. Caribou.core states that it uses me.raynes/fs, but he had an old version called simply 'fs'

11:29 justin_smith: I will look into lein-pedantic

11:30 justin_smith: ahh, now I see that, yeah, me.raynes/fs

11:30 swarthy: here is the old one on clojars

11:30 justin_smith: if there is a newer version of fs that does not break our code we should definitely upgrade

11:30 swarthy: https://clojars.org/fs

11:31 i think you have the new one

11:31 but i'm getting that old one instead

11:31 somehow

11:31 justin_smith: ahh

11:31 so it is not our fault, and here I was ready to be helpful :)

11:31 lein pedantic will tell you where that version conflict is

11:32 along with a bunch of other annoying version conflicts you don't care about, likely

11:32 also, it may be easier to just explicitly depend on [me.raynes/fs "1.4.5"]

11:32 then do a clean

11:33 I think lein should do the right thing in that case?

11:35 swarthy: but isn't caribou.core doing that explicit declaration already? when I do 'lein deps :tree' I don't even see 'fs' in the list, but I do see the me.raynes/fs there.

11:36 sjl-: anyone know if there's a way to use korma with postgres UUID columns? right now I get https://www.refheap.com/21054 when I try to insert

11:37 justin_smith: swarthy: I think something else is pulled in first that is getting a different version

11:38 that is where explicit deps or :exclusions can help

11:38 worst case: some dep is :aot compiled with the wrong version

11:38 iyouni: ! fast

11:39 !

11:41 solussd: anyone using core.async production?

11:41 i mean, what could possibly go wrong, right? :)

11:42 justin_smith: we have it in clojure and clojurescript code in prod, it's less janky than some of our other deps :)

11:43 marcopolo2: solussd: I am!

11:43 solussd: excellent!

11:43 ToBeReplaced: i've had the clojure version in production for a few months, but no stream ops

11:43 seangrove: We use it in our cljs production code

11:43 marcopolo2: solussd: using it with my servant library for webworkers https://github.com/marcopolo/servant

11:44 which is being used to parrallelize encryption at cryptic.io

11:44 solussd: oh cool, a webworker lib. *adding to my toolbox

11:45 marcopolo2: I talked to a couple people at the conj on how we are using clojure at my startup, Cryptic. We just launched our kickstarter campaign today, let me know what you guys think! http://kck.st/I1hFCHon ion

11:45 ~//kk

11:45 clojurebot: excusez-moi

11:45 justin_smith: I'm using it for an async task pool that resizes images as requested by the template in parallel with template rendering (so response to the client doesn't need to wait on the resize process to finish). This is experimental in a client site now, but should show up in a future version of lichen.

11:51 mikerod: ,(read-string "^{:m true} (assoc {} :a 1)")

11:51 clojurebot: (assoc {} :a 1)

11:53 mikerod: why do I not see this coming back as (with-meta (assoc {} :a 1) {:m true})?

11:53 I thought this was a reader macro

11:54 trptcolin: ,(meta (read-string "^{:m true} (assoc {} :a 1)"))

11:54 clojurebot: {:m true}

11:54 clgv: I plan a `ring` application where approx 4000 request will be made that block for 6-20 seconds. will that work?

11:54 mikerod: ,(read-string "@a")

11:54 clojurebot: (clojure.core/deref a)

11:55 mikerod: I expected to see it just return code

11:55 like @ => deref

11:55 ,(read-string "#'a")

11:55 clojurebot: (var a)

11:55 mikerod: ,(read-string "^:m a")

11:55 clojurebot: a

11:55 clgv: mikerod: reader literals are expanded by read-string

11:56 mikerod: ^:m is not a reader literal then?

11:56 I thougth it was short hand for `with-meta`

11:56 guess I misinterpret

11:56 clgv: mikerod: yeah, it is a with-meta at macro expansion time

11:57 so the code gets the meta

11:58 gfredericks: mikerod: reader macros don't always just expand to something else

11:58 mikerod: so do the values of the metadata map have to be able to be determined at macroexpansion time?

11:58 gfredericks: yes

11:58 in fact they're not eval'd at all I don't think

11:59 ,(-> "^{:foo (I am not eval'd)} {}" read-string meta)

11:59 clojurebot: {:foo (I am not eval'd)}

11:59 mikerod: I don't think I've ever read that before on the topic

11:59 interesting

12:02 stompyj: Anyone here have experience building a REST Api server in clojure, who's brain I could pick for a couple mins?

12:04 gfredericks: stompyj: probably a lot of people

12:05 ~anyone

12:05 clojurebot: anyone is anybody

12:05 gfredericks: ~anybody

12:05 clojurebot: anybody is anyone

12:05 gfredericks: aaargh

12:05 clgv: clojurebot: muhahaha you played him! botsnack

12:05 clojurebot: Pardon?

12:05 stompyj: hahahahahahahahaha

12:11 I'm curious if people have experience with either using compojure/ring + liberator vs using something heavier like luminus and then adding in liberator

12:12 hiredman: I would be surprised if liberator is used a lot currently

12:13 clgv: stompyj: isnt luminus just a big meta dependency to pull in compojure, ring and other libs?

12:13 hiredman: I would guess most apis are just ring and compojure

12:13 stompyj: clgv: pretty much. Half the libs I wouldn't need at all (templating for example), but other things like auth I would need.

12:14 Meh, I should just do ring/compojure/liberator

12:14 clgv: stompyj: then just start with the dependencies you know you need

12:14 gfredericks: if my root namespace is "public" that would mean that compojure would (by default) serve my source code (via the resources route) amirite?

12:15 stompyj: yeah, I'm focused more on speed of dev then anything else

12:15 thanks clgv

12:17 zachallaun: cemerick: Finally gave Austin a fair shot. Great work! Finally a clojurescript repl I can actually recommend to people.

12:18 divyansr: Any one aware of issue (I am not sure it's issue) why :pre in function definition is not working in lein. I am using version 2.3.2 and clojure version is 1.5?

12:18 cemerick: zachallaun: hey, thanks, glad it worked out for you. More ease to come. :-)

12:19 hiredman: divyansr: most likely you have it in the wrong place, it goes right after the argument vector

12:20 gfredericks: yes indeed; compojure servers your source code if your namespaces are public.* :)

12:20 this will be more of a problem once somebody buys and popularizes the ".public" TLD

12:21 stompyj: One other question. Are there any good auth libraries for web services? Is friend still the leader?

12:21 hiredman: gfredericks: good thing there is already a work around

12:21 divyansr: I think I have in right place. I typed same thing in clojure REPL it's working but not in lein repl , https://www.refheap.com/21058

12:21 hiredman: gfredericks: "configure the software"

12:21 divyansr: you do not

12:21 the docstring is in the wrong place too

12:22 gfredericks: hiredman: that didn't stop people from getting upset about *read-eval* :P

12:22 hiredman: as I said the pre/post goes right after the arg vector

12:22 * gfredericks runs away really fast

12:22 hiredman: and the docstring goes right after the name

12:23 gfredericks: *shrug* people

12:23 ToBeReplaced: stompyj: someone just released a new one for pedestal -- check the mailing list

12:24 clgv: stompyj: I am using `friend` for authentication in a server ui

12:24 gfredericks: do java web frameworks make the same assumption?

12:24 stompyj: clgv: how have you found it?

12:24 gfredericks: or does the war spec separate static files from the classpath?

12:25 clgv: stompyj: after understanding how ring handlers work and finding the right place in the handler chain it works like a charm

12:25 stompyj: but I only use the form login workflow

12:28 stompyj: clgv: ok cool, I'll look into it! thanks! What other libs are you using for your server?

12:29 Also, lots of clojure libs have German names

12:29 interesting

12:29 gfredericks: "clojure" itself is german for "perl"

12:29 dee5: Hey, could anyone explaint the difference between emacs' clojure-mode, cider, and nrepl packages?

12:30 stompyj: hahahahahahahahahahahah

12:30 clgv: gfredericks: that's wrong :P

12:30 stompyj: gfredericks: that would be amazng

12:30 dee5: I don't know, but I know rom the "state of clojure" thing that most people are using cider

12:30 gfredericks: dee5: cider is the new name of nrepl.el

12:31 technomancy: dee5: clojure-mode is for static functionality; indentation and syntax highlighting etc

12:32 dee5: awesome, my understanding is that nrepl is outdated, and cider and clojure-mode can be used together

12:32 thanks everyone

12:32 technomancy: dee5: it's not outdated; it still works fine

12:33 dee5: I didn't mean it in a negative way. I just assumed that cider would have a superset of functionality

12:33 stompyj: whats the port of emacs people use on os x?

12:33 technomancy: dee5: it has a few more features but less stability

12:33 stompyj: emacsformacosx.com

12:34 stompyj: LOL

12:34 awesome

12:34 dee5: technomancy: would you recommend one over the other?

12:35 technomancy: dee5: I'm still using nrepl.el myself; haven't seen a reason to upgrade yet

12:37 dee5: technomancy: Thanks! Good to know!

12:39 technomancy: bitemyapp: https://mobile.twitter.com/ericnormand/status/402851111066796032 o_O

12:40 solussd: core-async question: how can you check if a channel is open (e.g., if I wanted to use a channel being closed as a stopping condition)

12:42 seangrove: technomancy: Similarly confused. Accidental nils and the havoc they wreak cause my jaws to clench.

12:42 stompyj: Other other very stupid question. If I do a "lein new <template>" command, is there the opposite of that? meaning, a command to delete those same files?

12:42 dnolen: wowzers https://github.com/aamedina/cljs.core.logic

12:42 clojurebot: excusez-moi

12:42 hiredman: ]\

12:43 llasram: stompyj: Like, rm -rf ?

12:44 stompyj: llasram: well, yes, that's the "use extreme force" way to do it, I was wondering if there was a gentler solution. :)

12:46 justin_smith: move the directory that the template created into the trash bin?

12:48 stompyj: cool, so manual pruning is the answer

12:48 justin_smith: I think. I don't know of any lein template defining it inverse

12:48 so maybe lein new should just return an error if it finds the directory already existing

12:49 to prevent the one failure case where you fill a pre-existing directory with a bunch of stuff from a template

12:49 stompyj: yeah, that's fine, I didn't see it in the docs, and wondered if it was a hidden option or something

12:49 trptcolin: it already does, i'm pretty sure

12:49 "Could not create directory /tmp/foobar. Maybe it already exists?"

13:01 upwardindex: What could cause (get @a 0) and (get-in @a [0]) to behave differently in cljs?

13:07 noncom: is there a way to specify exclusions to :refer :all ?

13:07 dnolen: upwardindex: gist please

13:07 joegallo: noncom: i don't think so

13:08 llasram: noncom: No, but if you add an explicit `:refer` form then you can specify `:exclude` for it

13:08 noncom: what you mean "explicit"?

13:10 llasram: noncom: Like (ns example.ns (:require ...) (:refer ...))

13:10 &(doc refer)

13:10 lazybot: ⇒ "([ns-sym & filters]); refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symbols :only list-of-symbols :rename map-of-fromsymbol-tosymbol For each public interned var in the namespace named by the symbol, a... https://www.refheap.com/21060

13:10 noncom: i see!

13:12 coventry2: marcopolo2: Your kickstarter link 404s for me.

13:14 BobSchack: coventry2: I think this is the link http://www.kickstarter.com/projects/cryptic-io/cryptic-encrypted-online-storage

13:14 podviaznikov: stompyj: have you seen https://github.com/clojure-liberator/liberator?

13:19 coventry2: BobSchack: Thanks.

13:19 BobSchack: NP

13:29 upwardindex: dnolen: here is the gist: https://gist.github.com/jsab/7550088

13:33 danneu: registered at oracle and this is their country selector: http://i.imgur.com/d8Avbtp.png

13:35 dnolen: upwardindex: get on JS objects isn't going to work

13:37 upwardindex: dnolen: In this case, get seems to work, get-in is the one that does not

13:39 dnolen: upwardindex: get doesn't work on JS objects plain and simple, it does work on JS arrays to maintain parity with CLJ

13:40 upwardindex: dnolen: ok, i just saw one of your answers on SO, I guess in this case I should use aget?

13:40 dnolen: upwardindex: or you can extend-type object to ILookup

13:54 seangrove: bitemyapp: Did the ps4 controller work with the osx emulators?

14:04 ToBeReplaced: anyone have a general-purpose routing recommendation? i'm looking to dispatch messages coming off of a channel to different functions depending on the content

14:05 i'd like it if the routing information was data as well

14:07 pbostrom: ToBeReplaced: multimethod?

14:11 marcopolo2: coventry2: darn

14:11 how about this: http://kck.st/I1hFCH

14:14 coventry: marcopolo2: Thanks.

14:16 ToBeReplaced: pbostrom: yeah. :). silly me

14:22 stompyj: podviaznikov: yeah, this is what I'm going to be using

14:26 gfredericks: TIL you can use get with arrays

14:47 TimMc: huh

14:47 &(get (into-array (range 10 20)) 3)

14:47 lazybot: ⇒ 13

15:05 stompyj: &(get (into-array (range 10 20)) 3)

15:05 lazybot: ⇒ 13

15:06 stompyj: &(take 1 '(1 2 3 4))

15:06 lazybot: ⇒ (1)

15:06 stompyj: innnnteresting

15:28 oli`: (+ 1 1)

15:28 clojurebot: 2

15:31 gfredericks: ,(* 2 3 7)

15:31 clojurebot: 42

15:33 sritchie: cemerick: around?

15:34 cemerick: sritchie: off for a run shortly, but shoot :-)

15:34 sritchie: I'm doing a json auth workflow,

15:34 slightly different than the one floating around the internet;

15:34 and finding that if I return redirect false, I'm not getting any Set-Cookie goodness in the response

15:34 cemerick: sritchie: gist, pls?

15:35 sritchie: sure, one sec

15:36 https://gist.github.com/sritchie/7552129

15:38 cemerick: actually, even setting redirect-on-auth false for the interactive login form gets the cookie

15:38 cemerick: sritchie: oh, you mean twiddling :redirect-on-auth? to false produces no cookie?

15:38 sritchie: must be something about the way I'm returning the auth map..

15:39 cemerick: in the json workflow, yes

15:39 in the interactive-form-workflow, on change

15:39 no change*

15:39 let me stare at it again...

15:40 cemerick: friend authentication routing as a function of route, request type and content-type can get pretty messy

15:40 cemerick: would love to see some best practices

15:41 cemerick: sritchie: I think you may be inventing them :-P Not a lot of requirements for / experience with content-neg on auth floating around.

15:41 sritchie: gotcha

15:41 doing a JSON version for an iOS app now

15:42 cemerick: sritchie: OK, pretty certain that's a bug. Can you file a ticket?

15:42 seangrove: Ok, I think I might have some ideas for sane cljs ui templating

15:43 sritchie: cemerick: sure, will do

15:43 seangrove: Really, we can copy some of the ideas from html/xaml, and just extend the hiccup format with standard controls. [:dropdown [:menu-button "One"]], etc.

15:43 sritchie: making sure I have it all understood, though...

15:44 seangrove: And then libraries can provide implementations of transformations for the :dropdown, :menu-button, etc. primitives and compound objects

15:44 cemerick: sritchie: the basic problem is that setting that false will end up never touching the :session, thus no cookie. You're needing a 200 response to keep e.g. XHR from failing on an initial login req?

15:44 sritchie: yeah, I just don't want to redirect on the JSON api version of these routes

15:44 so hitting unauthorized gives you a 401

15:44 cemerick: sure

15:45 seangrove: Assuming some subset of widgets are common across all libraries, it allows abstracting some of the frameworks (bootstrap, clojure ui, etc.), but still providing specialized transforms for specific libraries

15:45 cemerick: sritchie: def. a bug, should be a quick fix. I'll look at it tonight. Still open the ticket though so I remember. :-)

15:45 sritchie: okay, thanks man

15:46 seangrove: Then, UI's are declarative data structures. At least to get started.

15:46 I suppose then the challenge is behavior and mutability. But I'll come to that later. Liking this initial idea.

15:49 Would love to hear thoughts from people experienced with xaml and (especially) IB

15:49 I don't think there's a huge overlap in here, sadly

15:50 ibdknox: seangrove: you're basically talking about web components, take a look at polymer

15:51 seangrove: ibdknox: I suppose I am, actually.

15:51 Good point, thanks.

15:57 tbaldridge: seangrove: I've worked longer than I would have liked with XAML. I agree the declarative portions of it are awesome. Doing it without mutability is the hard part. The whole databinding part of it is a major pain in large projects.

15:58 seangrove: tbaldridge: Just thinking about at least getting the ui as a clojure data structure and transforming it like any other data structure.

15:58 I haven't worked with xaml almost at all though, just heard that it had some good idaes

15:59 tomc: Would anyone mind helping me out with some leiningen troubles?

16:00 tbaldridge: yeah, it's pretty sweet. One of the core ideas though is that you can do stuff like bind a list box to a mutable list. Add something to the list and it magically appears on the screen. Declarative UI, FTW! However now you have mutability in your ui, and its easy to have race conditions and the like.

16:01 seangrove: YMMV however, I was dealing with a very complex set of rules.

16:02 seangrove: keep an eye on pedestal as well, I've seen some people do stuff like this with pedestal. Also, QT's declarative language does stuff a lot like this.

16:02 seangrove: tbaldridge: I'm thinking a lower-level, declarative ui layout with composable widgets, and generic, extensible behavior with callback+channel apis

16:02 But yeah, the elephant in the room is always how you make mutability explicit and handled

16:03 Not super interested in data-binding as much as channels-based api, something data-binding could be built on top of

16:05 hyPiRion: tomc: just ask them, if someone knows it they usually reply if they are on

16:05 seangrove: I'll admit it's pretty fuzzy and hand-wavey though. I'm just hating all this client-side ui work, and pretty eager to move it all up a layer or two

16:09 tomc: Thanks hypirion. I'm having problems with cljx, and not sure where to look for a solution. If I try to run lein cljx once to 'compile' my cljx files to clj + cljs, I get a compilation error - FileNotFound. It appears as though lein is trying to compile my clj before cljx has had a chance to write the file. Is that the way lein works? Compile the project, then run the current task?

16:09 handojin: anybody know why you can't add nil values to a datomic database?

16:10 tbaldridge: handojin: because then you couldn't tell if an attribute exists or not. and also because its that way by design

16:10 marcopolo2: dnolen: ping

16:12 handojin: hmmm - not sure i understand

16:13 the attribute exists (e.g. user/age)

16:13 TimMc: tbaldridge: "because its that way by design" ...

16:13 handojin: but the value is unknown (null/nil)

16:13 hyPiRion: tomc: no, that shouldn't be the case if I know right. Unfortunately I don't know how cljx works, but I would attempt to look at the documentation (if it's good enough)

16:14 tomc: maybe this may help you? https://github.com/emezeske/lein-cljsbuild/tree/1.0.0/example-projects/simple

16:16 tbaldridge: handojin: the problem is basically that datomic treats these as the same {:some/attr nil} {}

16:17 handojin: it's a design decision, if you want an attribute as nil, just don't save the attribute in the first place. In datomic, all attributes (except :db/id) are optional. So if a value is nil, just don't assert the attribute

16:17 tomc: hypirion: thanks for the example. I actually had a working project.clj, but then I ran lein clean, and then my trouble began. My hacky solution was to remove references to the cljx namespace, compile, then add those references back in... good enough for now.

16:17 dnolen: marcopolo2: pong

16:17 bitemyap1: tbaldridge: I agree with that decision by the by, I explained it to my coworkers recently.

16:18 tbaldridge: I don't think having a distinct "attribute exists but is nil" state between "attribute is not asserted" and "attribute is asserted and has this value" is a good thing.

16:18 it eliminates ambiguity and keeps people from doing something insanely stupid in terms of embedding some kind of implicit intermediate state to their data model.

16:18 tomc: hey @piranha, are you the same piranha behind pump?

16:18 hyPiRion: tomc: whoops, sorry. I realized that that one was cljsbuild, not cljx. Anyway, good to know that you found a workaround. If the problem persists, I would suggest creating an issue at github

16:20 tbaldridge: bitemyap1: agreed, if I saw Clojure code that made a difference between (nil? (:foo {})) and (contains? :foo {}), I'd call it a major code smell.

16:20 handojin: @tbaldridge ok - more or less Chris Date's position re: null in dbs then?

16:20 tomc: hypirion: I was actually seeing the issue w/ cljsbuild as well, which leads me to suspect its a lein issue. I don't necessarily think its an issue in the 'bug' sense, just something must be wonky with my setup. I'll ask for help from the lein folks if the problem persists. Thanks for the help.

16:21 hyPiRion: tomc: if you ask the question in #leiningen and is on IRC for some time, I may have time to look at it

16:21 bitemyap1: tbaldridge: ditto. I've seen people do stuff like that in Python and I took a flamethrower to that code.

16:21 hyPiRion: not right now though, but later today

16:22 tomc: hypirion: great, i'll do that.

16:22 tbaldridge: handojin: I'm not familiar with Chris Date. But from what I just read via google, I'd probably agree.

16:22 hyPiRion: tomc: you could also ask on the Leiningen mailing list

16:24 handojin: so the appropriate way of dealing with a large dataset containing null values would be to filter them out (or replace them with some sensible value) prior to transacting?

16:25 marcopolo2: dnolen: I know that kid @taoeffect, he goes to my school. He's pretty annoying, I'll make sure to slap him for you :P

16:25 dnolen: marcopolo2: haha :)

16:25 marcopolo2: his point about externs is actually a good one

16:25 http://dev.clojure.org/jira/browse/CLJS-686

16:25 for anyone who wants to contribute to some low hanging fruit

16:25 marcopolo2: dnolen: well that's surprising...

16:25 technomancy: I think he's one of the guys who posted a "let's do a paren-free clojure syntax" proposal a few years ago

16:26 dnolen: technomancy: same guy

16:26 marcopolo2: really?

16:26 wow

16:26 mybuddymichael: Does anyone know if the address at http://clojure.org/contributing is still valid?

16:26 marcopolo2: Now I'll have to beat him up ;)

16:26 dnolen: mybuddymichael: it is

16:26 s_kilk: hi all, i've just come across a strange issue with the selmer library while running a compojure app on fedora. everything works ok, except for one <img> tag being completely missing from the rendered page. it's simply not present in the output html. works fine on ubuntu though. anyone heard of an issue like this before?

16:26 mybuddymichael: dnolen: Great, thanks.

16:27 justin_smith: s_kilk: that sounds weird - if you make an uberjar on one, does it keep the same behavior when you run it with java -jar on the other?

16:28 bitemyap1: s_kilk: version of Selmer?

16:28 s_kilk: ah, will try an uberjar. also just spotted that i was using selmer 1.4 , will also try updating to 1.5

16:28 bitemyap1: s_kilk: there is no Selmer 1.4 or 1.5

16:28 s_kilk: the current version is 0.5.2

16:28 s_kilk: sorry, 0.4 and 0.5 :)

16:29 bitemyap1: s_kilk: upgrade first, *then* try the uberjar.

16:29 s_kilk: will try it with 0.5.2

16:29 bitemyap1: why do people always leave? weirdos.

16:30 TimMc: Short-timers, man.

16:31 It's even worse in low-traffic channels; "Anyone here?" and then 30 seconds later they're gone.

16:33 bitemyap1: TimMc: anti-cancer of IRC.

16:36 TimMc: Nah, they're teachable.

16:37 A lot of these folks are perfectly intelligent and reasonable, they just don't understand the communcication model of IRC.

16:38 bitemyap1: TimMc: oh, I didn't mean in a permanent sense.

16:38 TimMc: I think people in general have a really hard time with asynchronous communication models. Email was nice in part because it forced people to accept the async.

16:41 shane_k: hi all, I've upgraded to selmer 0.5.2 and still have the problem with the missing img tag. also tried building an uberjar and it has the same problem.

16:41 bitemyap1: shane_k: time to paste examples. use refheap.

16:42 justin_smith: shane_k: my suggestion was to see if, since server a and serve b have different behaviors, if an uberjar built on a changes behavior when run on b

16:43 shane_k: well the specific problem is in this file here : https://github.com/ShaneKilkelly/warbl/blob/master/src/warbl/views/templates/profile.html , the img tag on line 6 is simply not present in the output. i've tried just putting in any old url in there and that works ok. the exact same project also works fine on ubuntu linux.

16:43 justin, good call on building on one server and testing on another. will give that a try.

16:43 it's a dual-boot laptop with ubuntu and fedora, so it's a bit awkward going back and forth :)

16:44 justin_smith: ahh

16:44 are they using the same directory and just different jvms?

16:44 do they share the same ~/.m2 directory?

16:45 TimMc: bitemyap1: http://clojure-log.n01se.net/date/2011-03-24.html#15:34

16:45 shane_k: it's the same project checked out from git. i had been developing on ubuntu, then today i got the urge to try out fedora, and hit this problem. no, the two partitions don't share any common resources. they're two separate disks

16:45 and i tried blowing away the .m2 directory too

16:45 justin_smith: how about lein clean?

16:46 shane_k: will give it a go

16:46 justin_smith: sometimes it caches compiled stuff inapropriately

16:47 akurilin: Is there an interpolated alternative to pprint/println ? I'm wondering if everybody just does manual concatenation with str or if people use something like cl-format pretty actively.

16:48 shane_k: nope, still nothing. it seems to be only image tags which have some value interpolation involved which are affected. i can hard-link to an image and it works ok. any attempt to dynamically insert a src value fails to render the img tag at all.

16:48 llasram: akurilin: printf / format ?

16:50 handojin: i've decided to just suck up learning cl-format - more efficient in the long run

16:50 akurilin: llasram, cool, so these are basically wrappers around java's system.out functions with same name?

16:50 llasram: Let's ask the bots!

16:50 ,(source printf)

16:50 clojurebot: Source not found\n

16:50 llasram: haha

16:50 &(source printf)

16:50 lazybot: java.lang.RuntimeException: Unable to resolve symbol: source in this context

16:50 llasram: Welp

16:50 gfredericks: akurilin: not quite, they go through *out*

16:50 llasram: Some other time then

16:51 gfredericks: ,(str "foo" (with-out-str (println :bar))) ;; which enables this and other stuff

16:51 clojurebot: "foo:bar\n"

16:51 justin_smith: printf calls String/format and sends it to print

16:51 hyPiRion: $source printf

16:51 lazybot: printf is http://is.gd/YWGnui

16:51 llasram: Ah

16:51 gfredericks: ,(->> :bar println with-out-str (str "foo"))

16:51 clojurebot: "foo:bar\n"

16:52 akurilin: ok cool, so printf seems pretty good for the job

16:52 there are just so many ways of printing something :)

16:53 Actually, printf for the generic interpolated string. pprint for nicely formatted data structures. What else should I be really comfy with?

16:53 rasmusto: akurilin: this is a bit more niche, but I like print-table

16:54 bitemyap1: my twitter account is currently proof that I am not the grumpiest person on the planet

16:54 that honour belongs to Mr. Zed Shaw

16:54 TimMc: +1

16:56 hyPiRion: akurilin: learning clojure.pprint/cl-format is worth it, imo.

16:56 technomancy: you never know when you'll need to output roman numerals =)

16:56 akurilin: hyPiRion, I figured that was what true believers used :P

16:56 hyPiRion: ,(require '[clojure.pprint :refer [cl-format]])

16:56 bitemyapp: I haven't missed it much.

16:56 clojurebot: nil

16:57 rasmusto: technomancy: is that where those 4clojure problems come from? :o

16:57 technomancy: heh

16:57 hiredman: I seem to have forgotten to include underscore in this keyboard layout

16:57 hyPiRion: ,(cl-format nil "~{~@R~^, ~}" (range 2 30 3)) ; most useful thing in the world

16:57 clojurebot: "II, V, VIII, XI, XIV, XVII, XX, XXIII, XXVI, XXIX"

16:58 technomancy: hiredman: that should save your from writing ruby

16:58 ok, so

16:58 the clojure compiler not even bothering to *check* to see if your ns not found error was due to a dashes vs underscore problem

16:59 horrible disregard for time spent by humans or egregious slap in the face?

16:59 guns: why not both?

16:59 hiredman: or rich just trying to get a feature done, and no one ever opening a ticket afterwards?

16:59 technomancy: guns good point

16:59 poppingtonic: I'm getting the feeling that the creation of closures is related to currying in some sense...

16:59 TimMc: Hah, open a ticket for that?

17:00 He'd slap that down as a waste of time in 2 seconds flat.

17:00 technomancy: hiredman: I'll open a pull request

17:00 hyPiRion: technomancy: print it on a paper and mail it with you CA

17:00 your*

17:00 rasmusto: pprint*

17:01 hiredman: TimMc: there is one way to know for sure

17:01 technomancy: hyPiRion: I've already sent mine in, so I'll let you take it

17:01 hyPiRion: technomancy: but I've also sent my in

17:01 jballanc: technomancy: I, for one, would have been saved at least 4-5 hours of my life if that check happened

17:02 hiredman: jballanc: has some one opened a ticket in the clojure jira for you?

17:02 jballanc: tbh, I never really considered it ticket-able

17:03 I guess I just figured "well, it's still not as bad as Java's abuse of the FS"

17:03 hiredman: jballanc: would you like me to open a ticket?

17:03 jballanc: sure :)

17:03 hiredman: if not too bad, I am doing it anyway

17:03 jballanc: I can vote at least

17:03 (still need to send in my CA...one of these days)

17:05 technomancy: the crazy thing is iirc openjdk+oracle work fine with dashes; it's just technically not in the spec

17:07 jballanc: Does Rack not have an equivalent of Rack's config.ru or WSGI's wsgi.py file?

17:07 hiredman: http://dev.clojure.org/jira/browse/CLJ-1297

17:07 handojin: http://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node200.html

17:07 jballanc: s/Rack/Ring/

17:07 handojin: see table 28-8

17:07 hiredman: priority "Major" as always

17:09 gfredericks: hiredman: as somebody who hasn't read the entire IRC discussion, I can't tell from the ticket what the use case is here. Is it (require 'foo.bar_baz) for ns foo.bar-baz?

17:09 technomancy: gfredericks: it's for creating foo/bar-baz.clj files

17:09 gfredericks: ah right

17:09 technomancy: human failing to work around stupid limitations in the JVM

17:09 gfredericks: surely that would have been my second guess

17:09 the "in filenames" part of the ticket title is a bit ambiguous I guess

17:10 technomancy: I really wish the disconnect was between .clj files and .class files instead of between the ns name and the .clj file name =\

17:10 just feels like the line was drawn at the wrong point

17:10 jballanc: hiredman: voted :)

17:10 technomancy: probably too late to do anything about it though

17:11 jballanc: technomancy: but honestly, how often does ns loading happen in the running of a production app?

17:11 what would be the *real* cost of just checking for both underscore and dash versions?

17:11 :-/

17:12 technomancy: yeap

17:12 TimMc: (inc hiredman)

17:12 lazybot: ⇒ 27

17:13 bitemyapp: https://github.com/edn-format/edn#symbols seems to forget things like < and >

17:14 gfredericks: bitemyapp: yeah I asked about that the other day; I convinced myself it was intentional

17:14 bitemyapp: gfredericks: impossible, you need < and > for use in Datomic with edn queries

17:14 gfredericks: I noticed it because the haskell edn parser won't take those chars

17:14 bitemyapp: that's an interesting point

17:14 bitemyapp: we're adding it to the Python parser and PR'ing

17:18 gfredericks: does the edn spec have its own jira?

17:19 if it's not code are there still licensing concerns?

17:19 * gfredericks assumes anything is possible with lawyers

17:19 bitemyapp: it needs PR'd

17:19 I found an example of usage of < on the Datomic main tutorial page

17:20 so it's clearly an oversight

17:20 guns: Another ambiguity is "alphanumeric" characters in symbols; LispReader basically accepts anything,

17:20 Java identifiers can be any Unicode character

17:20 but I've been told that Clojure symbols are ASCII only

17:20 hiredman: told by who?

17:20 guns: meikel brandmeyer

17:20 hiredman: feh

17:21 so, like, some guy on the internet said it

17:21 guns: he says Rich said this in this chat room years ago

17:21 but he certainly isn't enforcing it

17:21 technomancy: well there's a big difference between the "spec" vs what happens in practice

17:22 TimMc: Especially when there isn't a spec.

17:22 bitemyapp: ,(let [да-аскии-онли 1] (println да-аскии-онли))

17:22 clojurebot: 1\n

17:22 technomancy: yeah, would be surprised if it suddenly started throwing on those

17:22 bitemyapp: totes ascii only bro.

17:22 gfredericks: and that recent ML discussion about what-it-was suggests the spec eventually loosens

17:22 numeric keywords

17:22 technomancy: gfredericks: yeah, better to commit to a narrower scope and broaden it later than the other way around

17:24 indigo: bitemyapp: Lol, love your symbol name

17:24 hiredman: my #clojure log which starts in december of 08 has no relevant hits grepping for rich and alpha

17:25 which is not to say he didn't say that, but it start to look unlikely

17:25 technomancy: hiredman: well, plenty of synonyms he could have used

17:25 bitemyapp: like...ASCII

17:25 hiredman: oh, of course, I used the wrong nick

17:25 rhickey

17:25 technomancy: hiredman: it's been so long =)

17:26 I like how chouser's log has his words in red

17:26 bitemyapp: technomancy: LOL

17:27 guns: hiredman: https://groups.google.com/forum/#!msg/vimclojure/OWSZWioTU6E/gE2z7HKXBoAJ

17:27 indigo: And His words shall be highlighted in red

17:27 guns: I guess he didn't mention the chat room

17:31 hiredman: https://gist.github.com/hiredman/7553770/raw/cbcb9b394d02d823d64391bcf4c47cd532603afa/gistfile1.txt

17:32 guns: again, "alphanumeric" :)

17:33 hiredman: http://clojure-log.n01se.net/date/2009-01-11.html#08:50a

17:34 guns: again, but not even clojure.core follows what he says there

17:34 technomancy: clojure.core: above the law

17:34 just like Batman

17:34 bitemyapp: indigo: glad you liked it.

17:34 hiredman: > and < abound in common usage

17:35 pjstadig: also the snowmen ☃

17:35 guns: it's true; for my part, I will continue to happily use τ, λ, Σ, etc in private code

17:36 justin_smith: the real trouble is zalgo identifiers, so you can't even tell what line number they are on

17:37 technomancy: you'll never take my page breaks away

17:37 whitespace be whitespace, mon

17:38 guns: bah emacs

17:38 jk

17:38 rasmusto: heh

17:38 technomancy: page breaks love you no matter your editor

17:39 guns: do you write GNU info pages for your unix programs, technomancy?

17:40 bitemyapp: I really like GNU info pages.

17:40 man pages are fine too.

17:40 technomancy: guns: haha; I don't got that far

17:40 guns: :) just curious

17:40 technomancy: but texinfo is nicer than troff for authorship

17:41 I am generally in favour of hyperlinks, as it is

17:41 bitemyapp: technomancy: who isn't?

17:41 technomancy: bitemyapp: people who hate info?\

17:42 bitemyapp: they are silly people and not to be taken seriously.

17:42 technomancy: yeah, I prefer `foo --help` for quick non-hyperlinked reference

17:44 guns: When people ask me about the last novel I've read, I tell them the bash man page.

17:45 jjido: don't they look at you with pity at this point?

17:45 guns: Confusion; I do feel pitiful however

17:45 technomancy: hehe

17:46 jballanc: oh god...I once had to write a full, very detailed man page by hand

17:46 technomancy: I like the twist ending in `man sh`

17:46 jballanc: ...sometimes I still get flashbacks

17:46 technomancy: it's actually dash!!!

17:46 ^ spoiler alert; sorry

17:46 jjido: :-)

17:47 hyPiRion: twist ending? That's the first word in the man page

17:47 pjstadig: technomancy: ugh

17:47 i used to have to install oracle on linux

17:47 and that was a problem

17:48 because the oracle install script used bash features even though it started with #!/bin/sh

17:48 which of course actually used dash

17:48 technomancy: pjstadig: my condolances

17:48 pjstadig: which wasn't bash

17:48 rasmusto: I did `man /bin/bash`, there's actually useful info in there :P

17:48 jjido: pjstadig: to my recollection even Solaris didn't use bash for /bin/sh

17:49 heiz: Hello! I'm new with clojure sequences. I need to iterate over bit vector in lexical order. I mean I need to generate seq like [[0], [1], [0 0], [0 1], [1 0], [1 1], [0 0 0], .... How can I do it with clojure?

17:52 jjido: heiz haz gone

18:03 Raynes: technomancy: https://gs1.wac.edgecastcdn.net/8019B6/data.tumblr.com/17896d446b18eaab9fd4c07d1b0e1ea8/tumblr_mtj3oz164M1rephako1_500.jpg

18:04 technomancy: Raynes: augh

18:13 rasmusto: Raynes: a travesty

18:15 oh whoa, how do I deal with passing anonymous functions into a memoized function? Will they just miss the cache?

18:17 hiredman: unless you pass in the same one

18:17 rasmusto: hiredman: I tried passing in the same one and it took a while :s

18:17 Let me drop in a side-effect and make sure

18:17 hiredman: rasmusto: same as in the same instance?

18:18 not the same as in, alpha equiv, or whatever

18:18 rasmusto: hiredman: same instance afaik

18:18 hiredman: literally the same object in memeory, fns have pointer equality

18:18 rasmusto: yeah, same pointer

18:20 hiredman: I can eval the symbol for my function and its the same thing every time

18:20 and I pass in that symbol to my memoized function

18:20 and it'll print side-effects each time (miss the cache)

18:21 hiredman: hard say, because functions don't have symbols

18:21 did you have a gist?

18:21 rasmusto: hiredman: let me scrub one up really quickly

18:25 hiredman: https://www.refheap.com/21066

18:25 amalloy: &(let [f #(inc %), m (memoize #(println (% 1)))] (m f) (m f))

18:25 lazybot: ⇒ 2 nil

18:25 rasmusto: I figured out my mistake, I had an anonymous function (as a separate arg)

18:27 amalloy: gotcha, my "f" was being created each time, so the pointer disappeared (obviously)

18:27 podviaznikov: stompyj: I also feel that it is good way to go. I never used it by I'm planning to use it. Do you have some particular questions about REST API development?

18:28 amalloy: right, rasmusto, that's what hiredman was warning you about

18:29 rasmusto: amalloy, hiredman: thanks :). I ran my self in a few circles before I saw that my function took two functions as arguments

18:30 so are functions only comparable by their pointers?

18:32 amalloy: yes

18:33 hiredman: unless you want to write a core.logic program using noms to compare the source

18:33 rasmusto: is that a JVM-specific thing?

18:33 hiredman: I was thinking of something along those lines

18:33 it'd have to do a reduction/normalization on the function

18:33 (source that is)

18:33 hiredman: rasmusto: what equivilance is there for functions that isn't horrible?

18:34 the answer is none, so they get reference equality

18:34 rasmusto: hiredman: well, in my specific case I had functions that compared two numbers, so I could reason about it

18:34 hiredman: point taken though :)

18:34 mtp: hiredman, we can just simulate both functions in separate sandboxes, and tell if one halts!!

18:34 (heavy sarcasm implied)

18:35 amalloy: rasmusto: what, by running each of them on all existing numbers, and seeing if they return the same thing every time? that's probably going to put a dent in your memoization speedup

18:35 rasmusto: amalloy: well, what if I limited the domain?

18:36 (just bouncing ideas around)

18:36 hiredman: amalloy: obviouslly you precompute a table

18:36 store it in s3

18:36 amalloy: rasmusto: i think if you're limiting the domain to anything small enough that comparing for equality is plausible, you should replace the functions with maps

18:36 rasmusto: here's one of the mission-critical functions that I used #(< % 3)

18:36 technomancy: hiredman: just because clojure doesn't attempt to compute function equivalence doesn't mean it can't be done in many cases

18:36 rasmusto: amalloy: maps in s3?

18:36 amalloy: like, f is just {[0 0] true, [1 0] false, ...}

18:37 hiredman: https://github.com/clojure/core.logic/wiki/core.logic.nominal

18:37 amalloy: hiredman: now he's taking your crazy ideas seriously, what have you done

18:37 rasmusto: ah yeah, this was a good presentation at the minikanren conf :)

18:37 dnolen: haha

18:40 hiredman: rasmusto: oh yeah?

18:40 rasmusto: was that the conf attached to clojure/west

18:41 rasmusto: hiredman: yeah, it was a few hours one evening of it

18:41 (and was originally a twitter joke)

18:41 hiredman: I didn't see a video covering the nominal stuff on infoq for it

18:42 rasmusto: hiredman: I'm not sure if any of it was filmed

18:42 hiredman: well, I seem some stuff like, uh, whatever that haskell minikanren

18:43 http://www.infoq.com/presentations/molog

18:43 rasmusto: cool, I'll check it out :)

18:44 hiredman: https://github.com/namin/minikanren-confo

18:44 hiredman: Ah

18:44 thanks

18:45 rasmusto: pulled the link from the minikanren.org clojure/west section

18:46 glosoli: Are there some other micro alternatives to compojure ?

18:47 technomancy: glosoli: there's moustache (not the templating lib), but it doesn't really offer anything that's not in compojure

18:48 benedikt: lein-droid fails at building my project when i add [clj-http "0.7.7"] to the dependencies-map in project.clj. The error is Compiling cheshire.jsonp: Exception in thread "main" java.lang.ClassNotFoundException: javax.json.Json, compiling:(jsonp.clj:1:1)"

18:48 building a vanilla lein projet with clj-http works fine

18:49 glosoli: technomancy ah not worth checking probably then

18:51 benedikt: http://stackoverflow.com/questions/11346180/servlet-java-lang-classnotfoundexception-org-json-simple-parser-parseexception # i found this, added the jar to a dir in the project and the dir in the external-classes-paths in project.clj

18:53 hiredman: benedikt: most likely the android runtime is missing that class, while it is included in a real jdk

19:06 benedikt: hiredman: is there anything i can do about it?

19:07 hiredman: benedikt: dunno, I am just guessing

19:09 I am guessing that the error is because in the translation process from jvm bytecode to dalvik bytecode the class goes missing

19:09 benedikt: i figured the same thing and found the jar for it, references with external-classes-path but no luck

19:09 i might have the wrong jar though

19:17 scott__: can anyone kindly recommend an example github repo that is essentially a 'wrapper' around a 3rd party Java library? fairly new to clojure; looking for references to learn from...

19:21 newblue: scott__: if you count Swing as a 3rd party library then https://github.com/daveray/seesaw

19:23 scott__: @newblue: thanks. I have a 'simple' java library (few files; 3 classes) I'd like to wrap

19:24 looking for good examples as to how to go about htat

19:25 seesaw looks a bit overkill as a 'learning reference' but I'll figure it out..

19:26 Raynes: scott__: https://github.com/Raynes/cegdown

19:26 Doesn't get a whole lot similar than cegdown.

19:29 scott__: thanks Raynes. perfect.

19:31 amalloy: scott__: why bother wrapping it? like, three classes is really fine to Just Use from clojure

19:32 obviously it depends a bit on how unpleasant the API is

19:33 bitemyapp: ucb: http://anautumnforcrippledchildren.bandcamp.com/album/try-not-to-destroy-everything-you-love

19:35 dbsr: hey all, i have never used windows before to run python scripts, now i am and im getting a lot of zerio lenght field name errors

19:35 ucb: bitemyapp: enqueued for tomorrow

19:35 dbsr: eg, i need to use '{1}'.format('foo')

19:35 instead of {}

19:35 is this windows? or an old python version

19:35 rasmusto: dbsr: check out #python :)

19:35 dbsr: ow

19:35 my bad

19:35 thought it was :d

19:35 scott__: amalloy: been playing with calling classes directly via Interop; partly its an exercise for me to learn to use idiomatic clojure.

19:36 bitemyapp: ucb: <3

19:36 scott__: partly the API has interfaces to implement ... just 'learning' the best way to implement, really.

20:15 lgs32a: coventry: have you had a chance to review my pull request?

20:54 SegFaultAX: bitemyapp: Somehow, I think you'll really appreciate this: http://www.youtube.com/watch?v=ScgFIKXKFkc

21:10 bitemyapp: SegFaultAX: I need to get out of California.

21:11 SegFaultAX: we could make things machine make it for us the community the city the san francisco put them in the stores they have slaves made in china but on the west coast new west coast we believe small business owners every fruit and vegetable trees

21:11 because it's free

21:13 Raynes: bitemyapp: Did you suddenly just become a markov chain?

21:13 bitemyapp: Raynes: watch the video.

21:18 SegFaultAX: Raynes: Seriously, watch it. You're close by.

21:26 bitemyapp: SegFaultAX: type theory meetup Thursday, you down?

21:27 SegFaultAX: intended to be introductory material, I think they're starting with untyped lambda calculus.

21:28 `cbp: I think Brambling has incremental migrations. I'm poking at config stuff in Selmer. What's new with you?

21:29 `cbp: bitemyapp: learning haskell, racket, figuring out how to implement heckle. Also got my copy of the little schemer after 2 months wait :-O

21:29 bitemyapp: `cbp: Haskell <3

21:29 oh I have something for you

21:30 `cbp: o.o

21:30 bitemyapp: `cbp: http://blog.ezyang.com/category/haskell/ http://blog.ezyang.com/2012/08/applicative-functors/ http://blog.ezyang.com/2011/08/8-ways-to-report-errors-in-haskell-revisited/ http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors/

21:31 reading material!

21:31 `cbp: yay

21:31 bitemyapp: `cbp: DotA2 after I finish mangling Selmer with a rake?

21:31 `cbp: bitemyapp: ok

21:32 lgs32a: is coventry asleep?

21:41 hiredman: /win 22

21:59 Apage43: ...

21:59 wow

22:00 S11001001: μ

22:01 lenage: λ

22:01 Apage43: ¬

22:01 bitemyapp: Apage43: what?

22:01 Apage43: video above =P

22:02 lenage: video?

22:02 Apage43: i .. am just going to go.. make a thing. maybe put it in a store.

22:16 fewer things seem like terrible ideas now that I'm over my stomachache, time to get stuff done

22:18 bitemyapp: `cbp: log into Steam plz.

22:58 coventry: lgs32a: I was away from the internet for a while. Will probably be sleeping soon though. (Last night was an outlier.)

23:01 lgs32a: I've looked at one of your commits. Will have it sorted out by tomorrow.

23:31 m0smith: Hi all: Looking for some wisdom regarding the Clojure compiler

23:32 Specifically, is there a wait to "listen" for classes it emits?

23:32 dnolen: m0smith: not directly no, you'd probably have to fork it and modify it to do something like that

23:34 m0smith: too bad. I am trying to get a list of classes without using javaagent

23:36 Different subject: I am using emacs and cider. Has anyone gotten a debugger working?

23:39 technomancy: there have been reports of successful ritz usage

23:39 with nrepl.el

23:39 justin_smith: m0smith: schmetterling is a standalone that connects to your clojure process, and gives you a repl and shows source at each level of the stack trace, and shows source for each level of the stack trace

23:40 runs in a browser

23:40 I saw all these features today, I'll double check that they have been pushed (it's a caribou project)

23:41 https://github.com/prismofeverything/schmetterling

23:41 download, lein ring server, go to the page it pops up and enter the dt-socket port for a clojure process, make a stacktrace

23:41 it will just work

23:42 hell, it will even debug java code

23:42 less likely to show locals though :)

23:42 m0smith: Thanks. I will give it a try. How is it better than jswat?

23:42 justin_smith: clojure code runs in the context of the stack frame

23:43 though I don't really know jswat, I don't think jswat is a clojure oriented tool

23:43 I would be surprised if it gave you a clojure repl

23:44 but hey, if jswat is better let me know, and I will use it instead

23:44 m0smith: :)

23:48 justin_smith: https://groups.google.com/forum/#!topic/clojure/R7JzcYRFAfg

23:48 this makes me think the main difference is likely maturity (jswat more mature) and tool assumptions (schmetterling assumes you are interacting with clojure)

23:49 m0smith: I have used jswat with clojure but found it a bit cumbersome

23:49 justin_smith: also I think it may be harder to run code in the context of a selected stack frame in jswat

23:49 m0smith: maybe I am just spoiled

23:49 justin_smith: heh, what debugger are you used to?

23:49 m0smith: I use eclipse a lot

23:49 it is nice to debug in the editor

23:49 not with clojure

23:49 just java

23:49 justin_smith: maybe the better question would have been: what was missing from jswat that made it clunky

23:50 seangrove: I thought it was js-wat

23:50 Maybe a gary bernhardt thing

23:50 m0smith: having to switch between the debugger and the editor, which implies keep two sets of configuratioins

23:50 justin_smith: seangrove: which is an amusing little presentation :)

23:50 technomancy: there can be occasions where you need a debugger in clojure, but if you're lucky and end up working primarily with well-factored referentially-transparent code a debugger doesn't help at all

23:51 don't go looking for it unless you're stuck on a really hairy problem involving badly-factored code and nasty stateful objects

23:51 justin_smith: m0smith: we avoided editor integration, because we don't want to force all our coworkers to use emacs, and we don't want to support 4 different frontends

23:51 seangrove: technomancy: Not at all? I haven't had occasion to need a debugger much, but I would think it's probably generally a nice thing.

23:51 m0smith: Working mostly with my own code which is none of those things (apparently)

23:51 technomancy: seangrove: if you need one, things have gone terribly wrong

23:51 (which does happen at times and can be unavoidable)

23:52 seangrove: technomancy: Maybe. I think it's an interesting assertion. Not personally sure though. Certainly would like to think so.

23:53 danielglauser: +1 to what technomancy said

23:53 technomancy: well it's like using a weapon in self-defense. makes you feel better, but you hope you never have to do it.

23:55 danielglauser: I'ved work on a large Clojure codebase for the past nine months. It has its issues. I have rarely felt the need for a debugger.

23:55 m0smith: Which probably begs the question: How do you keep track of complex data structures

23:55 ?

23:55 technomancy: I used cdt once to debug something

23:55 turns out it was a bug in clojure

23:55 danielglauser: I'ved -> I've. English is hard.

23:56 technomancy: danielglauser: English is hard; let's go lojban?

23:56 bitemyapp: technomancy: Klingon, IMO

23:56 danielglauser: technomancy: Nice http://en.wikipedia.org/wiki/Lojban

23:57 bitemyapp: because I want to spit on people when I talk.

23:57 m0smith: justin_smith: https://groups.google.com/forum/#!topic/clojure/R7JzcYRFAfg

23:57 technomancy: bitemyapp: I've heard linguists consider Klingon to be the PHP of conlangs

23:57 m0smith: no

23:57 justin_smith: ClassNotFoundException: com.sun.jdi.Bootstrap

23:58 danielglauser: m0smith: the most "complex" data structures in the app are nested maps. Usually not that many levels deep.

23:58 justin_smith: m0smith: ugh, I'll pass the bug report along

23:58 m0smith: Ubuntu

23:58 thanks

23:58 danielglauser: m0smith: instead of maintaining abstractions on the data structures most of the structure is in functions

23:59 m0smith: I am parsing GEDCOM files which are arbitrarily complex so I am having a hard time keeping the daa straight (hence the debugger)

Logging service provided by n01se.net