#clojure log - Aug 08 2013

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

0:07 sinistersnare: Exception in thread "main" java.io.FileNotFoundException: Could not locate cljdx/myscreen__init.class or cljdx/myscreen.clj on classpath: , does anyone have experience with this? if it helps, this class is using a proxy

0:07 and im not sure what to do

0:14 futile: I have an itch to do something cool now.

0:15 sinistersnare: you should help me :=\

0:15 futile: The success of Zephyros has made my confidence return that I can actually do cool, smart things.

0:15 With what, O person?

0:16 sinistersnare: A FileNotFoundException with not finding something in classpath

0:17 futile: I'm afraid I have no idea how to help you.

0:17 sinistersnare: its ok :p

0:18 jack_rabbit: sinistersnare, Are you using leiningen?

0:18 sinistersnare: yes

0:18 it is happening on a .clj file with a proxy

0:19 idk if thats is

0:19 it

0:19 Exception in thread "main" java.io.FileNotFoundException: Could not locate cljdx/myscreen__init.class or cljdx/myscreen.clj on classpath: ,

0:19 jack_rabbit: sinistersnare, I don't know if it's a bug or not, but I've had this problem before. Try using both an import and a use in your namespace declaration. The order *is* important, though I don't remember which should come first.

0:19 The namespace that's referencing the class, that is.

0:20 coventry: Never mind, my question was stupid.

0:21 sinistersnare: sorry, what did you say?

0:21 right before i left

0:21 jack_rabbit: <jack_rabbit> sinistersnare, I don't know if it's a bug or not, but I've had this problem before. Try using both an import and a use in your namespace declaration. The order *is* important, though I don't remember which should come first.

0:21 <jack_rabbit> The namespace that's referencing the class, that is.

0:22 futile: Does writing an efficient syntax highlighter for Clojure code sound hard?

0:23 wastrel: hi

0:23 i have vim clojure syntax thing

0:23 futile: It seems easy to me right now, but maybe I'm ignoring something important.

0:23 sinistersnare: idk, but you should do something for nightcode! https://github.com/oakes/Nightcode

0:23 a new clojure IDE

0:23 futile: sinistersnare: did you write it?

0:23 sinistersnare: nope

0:23 but im gonna try to write a libgdx-clojure template for it!

0:23 technomancy: futile: improve lein's support for native deps

0:23 sinistersnare: oh yeah

0:24 make it easy to use clojure for beginners*

0:24 futile: sinistersnare: it's using rsyntaxtextarea which I have my doubts about

0:24 sinistersnare: thats a good one

0:24 something lightweight

0:24 futile: sinistersnare: it's already easy to use Clojure for beginners

0:24 sinistersnare: i have no idea what that means! but ok

0:24 futile: technomancy: gaw?

0:24 sinistersnare: when i started clojure, i wasnt sure what to do :p

0:25 jack_rabbit: futile, a syntax highlighter shouldn't be too complicated, thanks to Lisp's syntax.

0:25 futile: sinistersnare: I think the solution to that is just to advertise "lein repl" more

0:25 jack_rabbit: that's what I'm thinking too.

0:25 technomancy: futile: nobody on the lein team uses native deps, so the support is kind of crappy and undocumented

0:25 sinistersnare: jack_rabbit: https://www.refheap.com/17378 this is my clojure file

0:25 technomancy: it's a ~common complaint

0:25 futile: technomancy: s/on the lein team //

0:25 sinistersnare: all i use is import

0:25 should i use 'use'?

0:26 how do yall denote functions?

0:26 futile: technomancy: hmm

0:26 technomancy: futile: dude sinistersnare totally uses native deps

0:26 sinistersnare: (use)?

0:26 im confused

0:26 what

0:26 futile: technomancy: it sounds like it involves understanding anything about Java, which I don't

0:26 sinistersnare: no i figured it out :D

0:26 technomancy: futile: actually the opposite

0:26 sinistersnare: im using a maven repo from libgdx now :D

0:26 futile: Oh. Then what's "native deps" mean?

0:26 sinistersnare: well i dont know what native deps are

0:26 so its ok

0:26 technomancy: futile: like .so files and such

0:26 jack_rabbit: sinistersnare, where is the error occuring?

0:27 futile: technomancy: !!

0:27 technomancy: you mean using C libraries?

0:27 technomancy: yeah

0:27 jack_rabbit: futile, That's what a native dep is...

0:27 futile: That sounds both fun and impossible.

0:27 jack_rabbit: futile, as in "native code"

0:27 futile: jack_rabbit: I see that *now*

0:27 sinistersnare: jack_rabbit: 1,1

0:27 jack_rabbit: sinistersnare, in that file?

0:27 technomancy: futile: that or improving clojuresphere

0:28 futile: technomancy: does JVM even allow using C libs at all?

0:28 sinistersnare: what do you mean?

0:28 technomancy: on the lein survey "difficulty finding dependencies" ranked highly under pain points

0:28 jack_rabbit: futile, yes, of course.

0:28 futile: jack_rabbit: oh.

0:28 technomancy: futile: sure; you can do FFI via JNI

0:28 futile: I just.. assumed not.

0:28 technomancy: like minecraft

0:28 futile: !

0:29 jack_rabbit: technomancy, leiningen seems to be unable to find dependencies sometimes when maven can.

0:29 futile: I wonder if he would lose any performance by porting to Clojure

0:29 (the Java parts)

0:29 technomancy: futile: that's what sinistersnare is doing with libgdx

0:29 jack_rabbit: futile, Probably not.

0:29 sinistersnare: technomancy, wait, what am i doing with libgdx?

0:29 technomancy: jack_rabbit: native parts specifically?

0:29 sinistersnare: using it? right? I dunno; I was just skimming at that point.

0:29 futile: oh boy

0:29 sinistersnare: the dependency thing? i got it working, im using their maven repos on their site

0:29 oh im using it (!!)

0:30 futile: okay, I think this conversation got way out of hand

0:30 technomancy: sinistersnare: but it has parts written in C, right?

0:30 futile: everybody jut calm down

0:30 jack_rabbit: technomancy, No, not native parts. I'll retract that statement if we're specifically talking about native stuff.

0:30 futile: *just

0:30 sinistersnare: technomancy: libgdx uses JNI very much for math stuff and memory stuff

0:30 technomancy: jack_rabbit: still curious =)

0:30 sinistersnare: Opengl stuff

0:30 futile: People only work on things they would use on a daily basis, right?

0:30 That's the only motivation for working on anything (that and money)

0:31 jack_rabbit: technomancy, Just that thing I mentioned to sinistersnare a moment ago, where you need both a :use and an :import statement in the namespace of :gen-class'd clojure files.

0:31 technomancy: futile: that's the only sustainable motivation, sure

0:31 jack_rabbit: technomancy, Otherwise it *sometimes* doesn't seem to be able to find certain classes.

0:31 I also want to submit a patch to clojure.

0:32 futile: Well I'm very dissatisfied with all text editors for Clojure code, and I use it every day for my job. So assuming I don't get fired or quit any time soon, that sounds like a good project.

0:32 jack_rabbit: futile, Just use emacs.

0:32 futile: Granted, there have been at least 2 or 3 mentioned in the mailing list recently.

0:32 jack_rabbit: futile, native lisp syntax highlighting.

0:32 futile: jack_rabbit: I am, and it hurts, a lot. But let's not have a flame war.

0:32 jack_rabbit: futile, *native*

0:32 technomancy: jack_rabbit: you're talking about gen-classed stuff within the same project?

0:32 jack_rabbit: futile, You don't like emacs?

0:32 technomancy, yes.

0:32 sinistersnare: im confused, jack_rabbit im not using :use statements

0:32 clojurebot: technomancy is <jweiss> oh man this sucks, why didn't anyone warn me about protocols

0:32 futile: jack_rabbit: please don't do this. We could be great friends.

0:33 jack_rabbit: futile, :)

0:33 technomancy: clojurebot: we warned you man. we warned you about stairs.

0:33 clojurebot: I'm no man, and she's no lady!

0:33 johnmn3: friends are overrated

0:33 jack_rabbit: sinistersnare, I'm still not sure in what file your code is erroring. I don't see main anywhere in your pasted file.

0:33 Oh, clojurebot.

0:34 sinistersnare: ill post the entire thing

0:34 futile: So, I'm pretty psyched, you guys helped me get 475 stars on my project.

0:34 jack_rabbit: clojurebot: say something useful.

0:34 clojurebot: Something weird that I noticed: & (use '[clojure.contrib.json :as json]) & &| (json/pprint-json nil) |&

0:34 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

0:34 futile: I'm feeling like a useful member of society that contributes back!

0:34 sinistersnare: futile: help out Nightcode, it could use some cool stuff! i would contribute if i knew anything

0:34 futile: What's a relative sane modern GUI lib for Java?

0:35 sinistersnare: it has a very different feature-set than I want.

0:35 sinistersnare: they all do.

0:35 sinistersnare: futile: i can see that

0:35 its ok :p

0:35 i was jesting mostly

0:35 jack_rabbit: sinistersnare, You aren't importing your cljdx.drop namespace.

0:35 sinistersnare: do i need to?

0:35 technomancy: futile: I haven't used it, but seesaw is the only one I've heard good things about

0:35 futile: sinistersnare: it's a legitimate suggestion

0:35 jack_rabbit: sinistersnare, yes.

0:35 futile: technomancy: thx

0:35 sinistersnare: so just (:use cljdx.drop) ?

0:35 futile: woo https://github.com/daveray/seesaw

0:35 jack_rabbit: sinistersnare, that'll work.

0:35 sinistersnare: great

0:35 nope

0:36 :(

0:36 futile: i nevar reelizd it was a closure lb

0:36 *lub

0:36 sinistersnare: lib*

0:36 futile: *lub

0:36 Heet: *lob

0:36 futile: oh man it even has a hello world!

0:36 *leb

0:36 jack_rabbit: *flub

0:36 futile: hey anyone using mac?

0:36 jack_rabbit: lil

0:36 sinistersnare: futile: https://gist.github.com/daveray/1441520

0:37 futile: thx sinistersnare

0:37 who are you?

0:37 sinistersnare: your maker

0:37 some kid whos trying to learn to program

0:37 jack_rabbit: Well lisp is a great start.

0:37 sinistersnare: well...

0:37 jack_rabbit: You're ahead of all those unix fools using their crazy archaic C.

0:37 sinistersnare: i know java/python

0:37 but ive been programming for < 1 year

0:37 and im loving it

0:38 jack_rabbit: Good.

0:38 sinistersnare: so im just devouring everything

0:38 * technomancy backs away

0:38 sinistersnare: i watched technomancy's talk at conj

0:38 technomancy: (don't want to get devoured is all)

0:38 jack_rabbit: sinistersnare, Try learning assembly. That'll twist your face off.

0:38 sinistersnare: i would go this year (im a few miles away) but its so expensive for a ticket

0:38 i tried to learn assembly!

0:38 i know a tad bit of C too

0:38 jack_rabbit: Try again!

0:38 sinistersnare: C++ scares me

0:38 Heet: assembly's not bad

0:38 jack_rabbit: sinistersnare, C++ should scare everyone.

0:39 sinistersnare: but first i want to fix this damned FileNotFoundException!

0:39 technomancy: sinistersnare: in the past they've had special sponsored student tickets to the conj; wouldn't hurt to ask

0:39 sinistersnare: that :use didnt work

0:39 jack_rabbit: Same error?

0:39 sinistersnare: oh that would be so cool

0:39 yes

0:39 nothing has changed !

0:39 jack_rabbit: did you try a lein clean?

0:39 sinistersnare: yes

0:39 wait

0:39 yes

0:39 jack_rabbit: hmm. hang on. Let me look at that code again.

0:40 sinistersnare: technomancy: ill see if i can email someone, and if they need my highschool CS teacher to email or something, she likes me, im top of the class :D

0:40 well

0:40 was, school hasnt started up again

0:40 jack_rabbit: sinistersnare, I'm confused. Why are you using both :gen-class and using a (gen-class ...) form in your drop.clj file?

0:40 sinistersnare: i have no idea!

0:40 it was a bunch of iHaveNoIdeaWhatImDoing.jpeg

0:41 jack_rabbit: sinistersnare, I'm also not sure that (cljdx.drop) is valid syntax.

0:41 sinistersnare: the clojure book that i just bought hasnt gotten that far!

0:41 wait

0:41 technomancy: sinistersnare: gen-class is a bit weird; might be best to find an existing working example to adapt.

0:41 I always forget how it works

0:41 sinistersnare: ok, ill look for something

0:41 a guy here a couple hours ago said the same :p

0:41 technomancy: (also make sure you can't use reify or proxy because if you can those are awy more convenient)

0:42 jack_rabbit: sinistersnare, Either way, you don't need one in the ns macro and as a form in your clj file.

0:42 sinistersnare: oh wait

0:42 i fixed that

0:42 jack_rabbit: technomancy, They don't really do subclasses, though, right?

0:42 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

0:42 jack_rabbit: technomancy, I was under the impression that if you wanted a *true* subclass, you had to use gen-class.

0:43 technomancy: jack_rabbit: depends on whether you need a whole class or just an instance.

0:43 jack_rabbit: sinistersnare, I'm not sure if dots are valid class names.

0:43 sinistersnare: well, i hear that i shouldnt use proxy, but use reify; but i havent found much on how to use it

0:43 jack_rabbit: *valid in class names*

0:43 sinistersnare, Each has its own use.

0:44 sinistersnare: i looked at the gen-class documentation, it said fully qualified name

0:44 technomancy: sinistersnare: there are still cases you can use proxy where reify doesn't work by design; something about inheriting from concrete classes or something

0:44 reify is preferred if you can use it, but sometimes you can't

0:44 sinistersnare: yes, thats what ive heard. but what i need to subclass is an abstract class

0:44 technomancy: reify might work for that

0:44 sinistersnare: ok, now i just need to read on how to use it :p i have like 15 tabs open

0:45 jack_rabbit: Reify doesn't work on classes. Only interfaces and protocols.

0:45 technomancy: huh

0:46 jack_rabbit: I try to avoid the Java stuff when I can, though.

0:46 I only know that because the project I work on uses so much Java.

0:46 sinistersnare: yeah, im thinking i should write a wrapper for libgdx; like how seesaw works

0:46 jack_rabbit: sinistersnare, good idea.

0:46 sinistersnare, makes your code look a lot cleaner, too.

0:46 sinistersnare: i would be so happy if i did, ive seen some people try; but they have since stopped developing it.

0:46 jack_rabbit: sinistersnare, fork it.

0:47 sinistersnare: im interning in my CS class instead of taking the next look; so i will have some time

0:47 we do java, so ill just install the clojure.jar and work there

0:47 jack_rabbit: :)

0:47 sinistersnare: :D

0:47 jack_rabbit: Java is way easier to program in clojure.

0:47 Or Scala.

0:48 sinistersnare: never tried scala, but ive heard good things

0:48 jack_rabbit: I don't know very much of it, but it's a pretty cool language.

0:48 sinistersnare: jack_rabbit: fork the wrappers that have tried?

0:49 jack_rabbit: sinistersnare, unless you want to start from scratch.

0:49 sinistersnare: idk, right now i just want to get this working though :p

0:50 jack_rabbit: sinistersnare, Well the (cljdx.drop) form isn't valid, I don't think.

0:50 wastrel: i installed openjdk on my debian

0:50 sinistersnare: in the clojure documentation for gen-class it says to use the fully qualified name

0:50 which im pretty sure it means package too

0:50 jack_rabbit: sinistersnare, That's fine. I'm talking about the form in core.clj.

0:50 sinistersnare: oh

0:50 lemme see

0:50 jack_rabbit: (LwjglApplication. (cljdx.drop) "Hello, Clojure!" 800 480 true))

0:51 If you're trying to instantiate the class, you need a dot after the name.

0:51 sinistersnare: OH

0:51 damnit

0:51 still doesnt work

0:51 futile: scala seems way over complicated

0:51 jack_rabbit: I don't have the first clue as to why you don't get a syntax error, though.

0:52 sinistersnare: im just building

0:52 johnmn3: How would one get at the bytes in a #<[object Blob]> in clojurescript?

0:52 sinistersnare: idk if that matters

0:52 jack_rabbit: sinistersnare, Try not a fully qualified name.

0:52 sinistersnare: ok

0:53 nope :(

0:53 jack_rabbit: sinistersnare, I mean in the core.clj file.

0:53 sinistersnare: yep

0:53 just doing (drop.)

0:53 jack_rabbit: sinistersnare, also, import the cljdx.drop namespace. I didn't see that in your last paste.

0:53 sinistersnare: did that too

0:54 jack_rabbit: hmm...

0:54 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

0:54 jack_rabbit: sinistersnare, I still don't see it in there.

0:54 sinistersnare: oh the import?

0:54 i tried it and it didnt work

0:55 let me try again for good measure

0:55 nope

0:55 jack_rabbit: both import and use?

0:56 sinistersnare: can i :import a clojure file?

0:56 jack_rabbit: sinistersnare, No. You're importing the class that's been generated.

0:56 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

0:56 thats what it is now

0:57 jack_rabbit: And if leiningen tries to compile core.clj before it compiles your drop.clj into a class, lein will error.

0:57 sinistersnare: hmm

0:57 can i tell it which order to do it in?

0:57 jack_rabbit: Try one way, then the other.

0:57 I don't remember which works.

0:57 sinistersnare: weird

0:57 so i switched the position of :aot and :main in project.clj

0:57 and now

0:57 technomancy: usually if load order matters it means you're missing a :require somewhere

0:57 wastrel: i installed openjdk then i installed linengngen

0:57 sinistersnare: its giving me a :aot [cljdx.drop cljdx.gamescreen])

0:58 jack_rabbit: sinistersnare, what does that mean?

0:58 technomancy: sinistersnare: order of top-level keys in project.clj doesn't matter

0:58 sinistersnare: wait

0:58 copied wrong thing

0:58 error loading /home/sinistersnare/clj/cljdx/project.clj

0:58 jack_rabbit: :C

0:59 Is your project.clj valid?

0:59 And is that where it's supposed to be?

0:59 sinistersnare: oh its because im stupid

0:59 TEttinger: (:require (cljdx [myscreen :as myscreen])) seems like an odd syntax

0:59 sinistersnare: the paren

1:00 that was copied from a previous thing i found on github

1:00 this is just a test that has taken many hours more

1:00 than i expected

1:00 jack_rabbit: that'll happen.

1:00 TEttinger: that was the case with libgdx for me too

1:00 at least the dep wrangling

1:01 jack_rabbit: deps have always been a pain for me in clojure. Other than that it's a pretty cool lisp.

1:01 sinistersnare: but this is some weird FileNotFoundException

1:01 how do those come up?

1:02 cant find something on classpath...hmmm

1:02 so it must be something with me dealing with lein

1:03 maybe TEttinger is right where it cant find cljdx.myscreen

1:03 maybe

1:03 ahungry: hey guys, whats the doc search call on the repl again?

1:03 sinistersnare: lemme see

1:03 (doc java.lang.String)

1:03 clojurebot: Gabh mo leithscéal?

1:03 sinistersnare: but you need to do (use 'clojure.repl) first

1:03 ahungry: sinistersnare: the apropos one where you can search it out

1:03 like, (find-doc or something?

1:03 sinistersnare: oh no idea D:

1:03 ahungry: if I want to find regex for instance, but (doc regex) no matches

1:04 sinistersnare: nope didnt fix

1:04 TEttinger: sinistersnare, did you gist upload your project.clj?

1:04 sinistersnare: well

1:04 coventry: Is there a man page for cljs? I'm looking for a way to tell it to catch errors which clojure would normally catch at compilation time like the transposed colon in [tutorial-client.post-processing: as post].

1:04 sinistersnare: i fixed it

1:05 it was the require statement

1:05 pointed to the damned wrong file

1:05 FileNotFoundException could never have been more right

1:05 TEttinger: ah I see it

1:05 jack_rabbit: :)

1:05 ahungry: hm ok seems to be (find-doc actually

1:05 http://clojuredocs.org/clojure_core/clojure.repl/find-doc

1:05 sinistersnare: but i fixed like 3 other bugs, so its ok

1:05 jack_rabbit: sinistersnare, kudos!

1:05 sinistersnare: well...

1:05 lib names inside prefix lists must not contain periods

1:06 futile: Does it make sense to port Clojure to C?

1:06 technomancy: futile: no

1:06 SegFaultAX: So, how do people generally feel about liberator?

1:06 futile: Why not?

1:06 Is it because you love Java so much so why don't you marry it?

1:07 TEttinger: liberator?

1:07 SegFaultAX: futile: Because that defeats a lot of the purpose of Clojure. It's specifically designed to be a hosted language.

1:07 futile: (That question may need some mental rewording.)

1:07 sinistersnare: futile: why?

1:07 technomancy: futile: yes, that's exactly it

1:07 ahungry: What does this mean though? CompilerException java.lang.RuntimeException: Unable to resolve symbol: find-doc in this context, compiling:(NO_SOURCE_PATH:1:\

1:07 1)

1:07 using the nrepl.el program in emacs

1:07 technomancy: my secret is out O_O

1:07 futile: technomancy: okay seriously though?

1:07 ahungry: using clj directly on cli it works

1:07 TEttinger: ahungry, did you (use 'clojure.repl)

1:07 technomancy: futile: you need... like... a runtime.

1:07 SegFaultAX: ahungry: I'm guessing because it can't resolve that symbol in whatever ns you're working in.

1:08 futile: technomancy: ... why isn't C's runtime good enough?

1:08 Oh, no GC

1:08 Well it has that one GC lib..

1:08 TEttinger: futile, also horrible strings

1:08 futile: It has that one string lib..

1:08 jack_rabbit: futile, It has nothing to do with that.

1:08 ahungry: thanks guys

1:08 futile: WHOA dont search "c strings"

1:09 or at least be very careful

1:09 sinistersnare: best google search of the day

1:09 technomancy: futile: you can't have seamless interop with libs that don't use that runtime, strings, and collections though

1:09 *use that GC

1:09 futile: Oh, seamless interop. Ruby and Python didn't need it.

1:09 They got pretty popular without it.

1:09 TEttinger: no one interops with ruby and C unless desperate

1:09 jack_rabbit: futile, If you "port" clojure to C, you end up with some weird modernized Common Lisp.

1:10 futile: jack_rabbit: citation needed

1:10 SegFaultAX: Greenspun's tenth and all that.

1:10 jack_rabbit: futile, There are already plenty of native lisps.

1:10 futile: jack_rabbit: each Lisp is as different semantically as Ruby and Python are

1:10 jack_rabbit: futile, Clojure derives a lot of its strength from its Java interop.

1:10 futile: jack_rabbit: and often syntactically also

1:10 jack_rabbit: futile, that's just not true.

1:10 TEttinger: a significant chunk of what makes clojure good is easy access to java

1:10 futile: jack_rabbit: then you're living a lie

1:11 jack_rabbit: futile, lisp is what you make it. There are simple macros available to make it behave like Clojure.

1:11 Common Lisp, that is.

1:11 TEttinger: if I had segfaults and unseen array overflow in clojure, I wouldn't use it

1:11 futile: jack_rabbit: no, macros are not a magic bullet that work like that.

1:11 jack_rabbit: futile, I think you misunderstand me, then.

1:11 futile: possibly

1:11 SegFaultAX: jack_rabbit: Well, sure ok. You /could/ make any old lisp act like clojure. But a lot of Clojure's semtantics were informed by the runtime on which it's built.

1:12 jack_rabbit: SegFaultAX, Sure, but that's invisible to the user.

1:12 TEttinger: yeah, doing something like pmap in C would be... agh

1:12 jack_rabbit: There's no reason you couldn't build a clojure -> native compiler.

1:12 futile: You'd have to build whole new datatypes in Scheme to get it to work much like Clojure.

1:12 jack_rabbit: There's just also no reason TO do that.

1:12 TEttinger: it would probably require large libs to use threads

1:13 technomancy: futile: it would be hard to make it work on a platform that lacked interfaces

1:13 racket kinda has them though

1:13 jack_rabbit: futile, I believe that. I don't know much about scheme. I was speaking specifically about Common Lisp.

1:13 TEttinger: you could probably do something like interfaces with C++ though, right?

1:13 technomancy: racket is cheating though; it's specifically designed to write new languages =)

1:14 jack_rabbit: technomancy, Isn't that what all lisp is designed for? DSL's?

1:14 SegFaultAX: jack_rabbit: The point is to invent a proper native clojure implementation, you'd have to re-invent a non-trivial portion of the JVM.

1:14 jack_rabbit: SegFaultAX, yes. I agree.

1:15 SegFaultAX: In other words, Clojure cannot live independently of the platform on which it was intended to live.

1:15 jack_rabbit: SegFaultAX, I believe I made exactly that point earlier, when I said that Clojure's strength derives from its closeness to Java and the JVM.

1:15 SegFaultAX: Lest you re-invent a bespoke platform to host it.

1:15 technomancy: jack_rabbit: I don't know if I'd say "domain-specific"; that's pretty limiting

1:15 jack_rabbit: technomancy, True.

1:15 futile: technomancy: interfaces can be done in C, I did it once when I wrote my (inefficient) Lisp interpreter.

1:16 Kinda wish I never deleted that. But only kinda.

1:16 technomancy: futile: the whole point of interfaces is that everyone in the ecosystem can agree on them though

1:16 futile: uhh

1:16 wat

1:17 technomancy: well from an interop perspective

1:17 otherwise you're constantly converting between types for every interop call you make

1:19 jack_rabbit: Interfaces aren't too hard in C.

1:19 SegFaultAX: Depends on what you call an interface I suppose.

1:19 jack_rabbit: There's a good Object Oriented C pdf floating on the internet somewhere.

1:20 SegFaultAX: Heh "interfaces aren't too hard in C... provided you already have a working object system"

1:20 jack_rabbit: SegFaultAX, Nah.

1:20 You just have to write a few V-tables.

1:20 *if you want to do it __right__ *

1:21 SegFaultAX: That's not really the interesting part of interfaces, though.

1:21 The interesting part is being able to asert that some thing conforms to some known API.

1:21 Usually that assertion comes at compile time, but it doesn't have to.

1:22 jack_rabbit: That's why we have compile time errors, yes.

1:22 SegFaultAX: So v-tables are entirely irrelevant.

1:23 jack_rabbit: I was just flexing. :)

1:23 futile: interfaces in C are easy to do so long as you never ever ever change their structure.

1:23 ever.

1:23 sinistersnare: hi again... i hate to ask another question, but this is about scoping in clojure. im getting an error that it cant resolve a symbol, but its defined in a let form of a function that i call; can i use those variables from the first function? https://gist.github.com/sinistersnare/44e3e50bcec04237c700

1:23 jack_rabbit: futile, yes.

1:23 SegFaultAX: sinistersnare: Never feel bad about asking questions.

1:24 sinistersnare: ive just been here a while

1:24 and i need to sleep really soon

1:24 but im determined to get this thing working

1:24 the code is in gamescreen.clj

1:24 jack_rabbit: Especially when the main thread is so far off topic...

1:24 sinistersnare: :D

1:24 it was interesting to glimpse at it, and wonder what you guys were talking about a little

1:24 futile: jack_rabbit: but without need that "OOP in C" pdf. i mean just using structs and casting

1:24 sinistersnare: but i understood a good portion

1:25 i dont really see much use for OOP in C, i like that its nice and clean

1:25 jack_rabbit: sinistersnare, I don't see your gamescreen.clj.

1:25 sinistersnare: under the huge ass error?

1:25 jack_rabbit: Oh wait...

1:25 :P

1:25 sinistersnare: yep

1:25 :D

1:25 jack_rabbit: I just needed to scroll.

1:26 sinistersnare, you haven't defined font.

1:26 sinistersnare: its in the let form in (allocate) (i dont know how to point out that something is a function)

1:26 jack_rabbit: font is only a valid symbol within the let form in your allocate function.

1:26 sinistersnare: yes

1:26 TEttinger: you use let to give the name font a value, but only until the end of the ) that matches (let

1:26 SegFaultAX: sinistersnare: But it isn't in scope where you're using it.

1:26 sinistersnare: yes

1:26 thats my main problem

1:26 but

1:26 maybe

1:26 wait hold on

1:26 im stupid wait

1:26 john2x: font needs to be in the screen fn as well

1:28 TEttinger: ,(let [font (java.awt.Font.)] (.derive font 8.0))

1:28 clojurebot: #<CompilerException java.lang.ExceptionInInitializerError, compiling:(NO_SOURCE_PATH:0:0)>

1:28 jack_rabbit: lul

1:28 TEttinger: ,(let [font (java.awt.Font. java.awt.Font/MONOSPACED java.awt.Font/PLAIN 14.0)] (.deriveFont font 8.0))

1:28 clojurebot: #<CompilerException java.lang.NoClassDefFoundError: Could not initialize class java.awt.Font, compiling:(NO_SOURCE_PATH:0:0)>

1:29 TEttinger: I can guess why...

1:29 xpe: Any ideas for my SO question: Serializing sorted maps in Clojure: http://stackoverflow.com/questions/18118290/serializing-sorted-maps-in-clojure-edn

1:29 jack_rabbit: ,(let [font (java.awt.BitmapFont.)] (.derive font 8.0))

1:29 clojurebot: #<CompilerException java.lang.ClassNotFoundException: java.awt.BitmapFont, compiling:(NO_SOURCE_PATH:0:0)>

1:29 sinistersnare: font is a libgdx class :D

1:29 jack_rabbit: ahh.

1:29 :)

1:29 sinistersnare: :D

1:29 TEttinger: sinistersnare, it's an AWT class too, I use it in swing

1:30 sinistersnare: yeah

1:30 Libgdx has some of their own stuff, like Color

1:30 jack_rabbit: Well clojurebot can't seem to find it.

1:30 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

1:30 the gamescreen.clj there doesnt work either

1:30 i thought the scoping would be ok

1:30 TEttinger: sinistersnare, nope

1:30 you stuck a ) after ]

1:30 that ends the let

1:30 jack_rabbit: sinistersnare, You're trying to program imperatively.

1:31 sinistersnare: damnit!

1:31 jack_rabbit: sinistersnare, Your code using 'font' needs to be within the scope of the let form.

1:31 noonian: xpe: could you just use seq to turn it into a vector of key value pairs and serialize and deserialize that?

1:31 sinistersnare: well, thats because its mostly just libgdx stuck in clojure

1:31 i thought i did define it

1:31 xpe: noonian: I could, but I'd much rather keep the data structure intact

1:31 jack_rabbit: sinistersnare, Only within the let form.

1:31 TEttinger: move the ) after the ] in "(let [batch (SpriteBatch.) font (BitmapFont.)])" to the end of the function

1:31 sinistersnare: (let [batch (SpriteBatch.) font (BitmapFont.)])

1:32 jack_rabbit: sinistersnare, Do you understand what let does?

1:32 sinistersnare: it defines local vars

1:32 jack_rabbit: sinistersnare, Sort of.

1:32 sinistersnare: so it needs to wrap the entire function?

1:32 xpe: noonian: there are workarounds, where an app "knows" to expect a sorted-map, but that is missing the point, I think

1:32 jack_rabbit: sinistersnare, It binds symbols to storage within its form.

1:32 sinistersnare: ok...

1:32 seems legit

1:32 jack_rabbit: sinistersnare, so 'font' only has meaning within the let form.

1:32 john2x: outside the let, the symbols don't exist

1:32 SegFaultAX: noonian: That solution loses the semtantic meaning of a map, though.

1:33 sinistersnare: ok

1:33 jack_rabbit: sinistersnare, you understand what a form is, yes?

1:33 sinistersnare: yes!

1:33 jack_rabbit: good.

1:33 sinistersnare: ive read a little bit of my clojure book

1:33 so do i put it at the end?

1:33 SegFaultAX: xpe: I don't think there is a general solution for this. It's going to be specific to your a) serialization format, b) consumer

1:33 xpe: SegFaultAX: right. do you know of ways to "verbose" output a sorted set?

1:33 jack_rabbit: put what at the end?

1:33 sinistersnare: the ]) in the let form

1:33 jack_rabbit: No.

1:33 sinistersnare: where then?

1:33 jack_rabbit: The ] encompases the symbols you're binding.

1:33 sinistersnare: ok

1:34 SegFaultAX: xpe: That isn't really a thing. There isn't a literal form for that data structure in Clojure.

1:34 sinistersnare: just the paren then?

1:34 ohhhhhhh

1:34 jack_rabbit: the ending ) encompases the scope you're using those symbols in.

1:34 john2x: sinistersnare: i think you'll have issues with (resize [w h]) as well.

1:34 xpe: SegFaultAX: I'm thinking a custom reader literal could help. then I'd need to write a serializer too

1:34 jack_rabbit: sinistersnare, Yes, Just the ).

1:34 sinistersnare: john2x: why?

1:34 SegFaultAX: xpe: And your consumers almost certainly don't have that data structure built in if they're non-Clojure (eg Ruby or Python)

1:34 sinistersnare: it still cant resolve font

1:35 SegFaultAX: xpe: Sure, a custom serializer wouldn't be too hard.

1:35 jack_rabbit: sinistersnare, show your code.

1:35 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700 gotcha

1:35 just updated

1:35 TEttinger: everything between "(let [batch (SpriteBatch.) font (BitmapFont.)]" and the ) that matches the let can see font and batch. nothing else can. if the ) is right after the ], nothing can see it except for other things in the let []

1:35 SegFaultAX: xpe: You can use the same literal form as a normal hash with a tag.

1:35 sinistersnare: TEttinger: ok cool

1:35 xpe: SegFaultAX: correct. If I control the consumer, I'm good. I could also fall back to JSON, make sure the ordering doesn't get messed up, and reread always as a sorted map, too

1:36 SegFaultAX: xpe: Why does ordering actually matter for your map, by the way?

1:36 xpe: SegFaultAX: I'm thinking through a B-tree

1:36 TEttinger: let can be tricky at first, but you'll get used to seeing 2 closing braces for a defn and an immediately following let at the end of a function definition

1:36 jack_rabbit: sinistersnare, I think you have an extra paren before the do.

1:36 john2x: sinistersnare: w and h aren't in the (let) as well it seems. maybe they need to be fn arguments?

1:36 TEttinger: since let is so commonly used

1:36 SegFaultAX: xpe: Then a map literal is almost certainly not what you want anyway.

1:36 sinistersnare: TEttinger: yeah, im still gethering my legs

1:36 jack_rabbit: ((do (.dispose font)

1:36 (.dispose batch))))

1:36 futile: I love talking to people smarter than me :)

1:37 xpe: SegFaultAX: it is, actually, but it would take a while to explain

1:37 jack_rabbit: futile, me too!

1:37 sinistersnare: john2x: those are most likely gonna be unused, so ill see

1:37 SegFaultAX: xpe: No common format can encode this natively.

1:37 xpe: Except XML

1:37 sinistersnare: my parens matcher says that it works jack_rabbit but ill look over it

1:37 jack_rabbit: You might have matched it, but that doesn't make it valid.

1:37 xpe: SegFaultAX: thanks, I've gotten good insight here.

1:37 SegFaultAX: xpe: I'd be interested to check out your solution!

1:38 TEttinger: ,(vec (sorted-map {3 "a: 5 "b" 1 "c"}))

1:38 clojurebot: #<RuntimeException java.lang.RuntimeException: EOF while reading string>

1:38 SegFaultAX: xpe: Maybe you should write an edn-utils library that adds serializations for common complex data types.

1:38 :)

1:38 TEttinger: ,(vec (sorted-map {3 "a" 5 "b" 1 "c"}))

1:38 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: {1 "c", 3 "a", 5 "b"}>

1:38 * jack_rabbit eyes jackdempsey

1:38 xpe: SegFaultAX: that would be nice

1:39 * jackdempsey slowly backs away

1:39 TEttinger: ,[(vec (sorted-map 3 "a" 5 "b" 1 "c")) (into (sorted-map) (vec (sorted-map 3 "a" 5 "b" 1 "c")))]

1:39 clojurebot: [[[1 "c"] [3 "a"] [5 "b"]] {1 "c", 3 "a", 5 "b"}]

1:39 * sinistersnare hides

1:39 futile: oh my

1:39 xpe: TEttinger: yes, you *could* do that, but it loses the semantics

1:39 futile: what big s-exps you have

1:39 jack_rabbit: You just watch yourself, jackdempsey...

1:40 futile, lol.

1:40 sinistersnare: im confused

1:40 SegFaultAX: TEttinger: Well if you're doing that far, then just encode a pair of: the map, the order of the keys as a vector

1:40 jack_rabbit: about what?

1:40 TEttinger: xpe, yeah, true

1:40 futile: we will not have this discussion

1:40 sinistersnare: i have no idea

1:40 thats my point

1:40 jack_rabbit: sinistersnare, lol.

1:40 SegFaultAX: [{:a 1 :b 2}, [:b :a]]

1:40 jack_rabbit: sinistersnare, Are you using an nrepl?

1:40 sinistersnare: nope

1:41 SegFaultAX: TEttinger: No need to repeat the kv pairs for both.

1:41 sinistersnare: its compiled

1:41 i think you need to with :gen-class

1:41 do you need to with reify?

1:41 jack_rabbit: sinistersnare, the REPL is one of the greatest tools for developing lisp. Use it.

1:41 TEttinger: SegFaultAX, no I was just showing how to turn it into a vector and how to turn the vector back into a sorted-map

1:41 sinistersnare: ok, but, im not sure how to use it in the context...

1:41 SegFaultAX: TEttinger: That's not the hard part.

1:41 TEttinger: you lose type info, but metadata could do it

1:41 jack_rabbit: sinistersnare, Fire up a REPL, and try defining and using your functions.

1:42 futile: Would Clojure be a good language to implement a professional-grade programming language compiler in?

1:42 jack_rabbit: sinistersnare, Once your functions work in the repl, you can be sure your errors are with namespaces and junk like that.

1:42 sinistersnare: well, idk

1:42 xpe: SegFaultAX: this is cool example I can adapt: https://github.com/flatland/ordered/blob/develop/src/data_readers.clj

1:42 sinistersnare: these functions dont seem to be designed for a repl

1:42 john2x: sinistersnare: or, if you use vim, install vim-fireplace :)

1:42 futile: I had the impression it would be too slow or inefficient, but I don't know what gave me that idea.

1:42 jack_rabbit: sinistersnare, True, so try some repl-friendly analogues.

1:43 sinistersnare, but ultimately, they should all work within the repl.

1:43 TEttinger: futile, I'm not familiar with the state of parsing libs in clojure, but the language features an embedded DSL would have would be great

1:43 futile: There's one parsing library in Clojure that might be perfect. I forget what it's called but it's gotten great reviews.

1:44 Instaparse.

1:44 jack_rabbit: futile, I have a feeling the speed of your compiler would be due to the methods of optimization you use, not the language it's written in.

1:44 SegFaultAX: Or just ANTLR

1:44 futile: NOOOO

1:44 never

1:44 jack_rabbit: futile, gcc is incredibly slow compared to many other *simpler* compilers.

1:54 zRecursive: clang seems faster than gcc ...

1:55 futile: so it's settled

1:55 I'm going to write a Clojure-like language using Clojure as the compiler, emitting LLVM bitcode.

1:55 sinistersnare: oh so youre gonna do clojure-llvm

1:56 futile: ffffff

1:56 Foxboron: cllojvre?

1:56 futile: does that exist?

1:56 sinistersnare: lol jk i dont know if it exists :p

1:56 but i think that there is a jvm bytecode -> llvm bitcode

1:56 so you can just do clojure -> jvm -> llvm bit

1:56 Foxboron: https://github.com/jasonjckn/llvm-clojure-bindings

1:56 sorta

1:56 sinistersnare: no need for a compiler

1:57 im still confused :( i tried using the repl, but im lost.

1:57 Foxboron: Related: http://www.infoq.com/presentations/Clojure-LLVM

1:57 sinistersnare: actually

1:57 i fixed the scoping issue

1:57 jack_rabbit: sinistersnare, maybe try something simpler until you get the hang of lisp?

1:57 sinistersnare: well

1:57 i feel like

1:57 jack_rabbit: sinistersnare, What you're doing is pretty complicated.

1:58 sinistersnare: i never got into libgdx until i wrote my game

1:58 i need to push through, im sorry im asking so many questions :(

1:58 i fixed that one

1:58 jack_rabbit: sinistersnare, It's cool. You're not bothering anyone.

1:58 sinistersnare: now im getting a ClassNotFoundException while compiling cljdx.drop

1:58 jack_rabbit: sinistersnare, paste?

1:58 futile: sinistersnare: ban yourself from IRC, I've found that I learn way more and way faster when I remove the social aspect from it

1:59 Foxboron: futile: depends

1:59 sinistersnare: ill paste

1:59 Foxboron: futile: it is more a person too person thing

1:59 futile: sinistersnare: when I force myself off IRC, i have nothing left to do but figure out the problems by reading and trying things, which always works

1:59 sinistersnare: :p i should do the same with reddit then futile

1:59 futile: yes.

1:59 sinistersnare: well i fixde the scoping issue after stopping myself for a few minutes

1:59 Foxboron: futile: ever tried rubberduck debugging?

2:00 sinistersnare: its great!

2:00 i linked to it here today

2:00 https://gist.github.com/sinistersnare/44e3e50bcec04237c700

2:00 i think i may need to update this

2:00 futile: Foxboron: yes, it helps. but it also helps when it's a real rubberduck and not a person

2:00 zRecursive: ,(reduce conj #{} (for [i (range 10) j (range 10)] [i j]))

2:00 clojurebot: #{[2 1] [3 2] [4 3] [5 4] [6 5] ...}

2:00 jack_rabbit: sinistersnare, still the font thing?

2:00 futile: i often write an email to a friend and leave the TO field blank the whole time, until its ready to send. by that time ive already figured it out

2:01 Foxboron: futile: i find it easier to talk to a person. Several times i have tried explaining a problem too a friend, then i realize the error without him even getting too respond

2:01 sinistersnare: nope

2:01 fixed that

2:01 futile: Foxboron: ive had that happen to me a lot. its quite irritating.

2:01 Foxboron: haha, i think it is funny.

2:01 futile: :|

2:01 Foxboron: But i am not a really a talky person in the first place

2:01 futile: depends on how valuable you think your time is compared to his

2:01 TEttinger: two ( before do

2:01 sinistersnare: https://gist.github.com/sinistersnare/44e3e50bcec04237c700

2:02 i got that

2:02 yep

2:02 futile: i try to think of my time as less valuable, which helps me to really force myself to NOT bother him.

2:02 and it always works.

2:02 Foxboron: futile: depends what setting i guess. I usually sit in a bar with other people just talking about code

2:02 futile: ok

2:03 jack_rabbit: sinistersnare, Weird. I'm again lost with the gen-class. gen-class is your problem. All I can do is suggest you read the gen-class docs again.

2:03 zRecursive: ,(bit-shift-left 2 38)

2:03 clojurebot: 549755813888

2:03 sinistersnare: i read it mostly; ill again

2:05 TEttinger: gen-class and proxy might relate to each other in unexpected ways

2:06 sinistersnare: how so?

2:07 TEttinger: https://kotka.de/blog/2010/02/gen-class_how_it_works_and_how_to_use_it.html I think you might just need a simpler gen-class declaration

2:07 sinistersnare: can reify be used to generate a subclass of an abstract class?

2:07 TEttinger: If you have two generated classes where one depends on the other, you should add also a require in the defining namespace. This resolves order issues for AOT compilation.

2:08 sinistersnare: i have an abstract class subclass, and an interface

2:08 implementation

2:09 wait

2:09 TEttinger: http://www.deepbluelambda.org/programming/clojure/generate-your-class-and-proxy-it-too might help? I am not familiar with proxy

2:10 sinistersnare: i dont think i NEED to subclass it, but i do need to implement

2:10 jack_rabbit: sinistersnare, I'm not sure if reify can do that, but proxy can.

2:10 sinistersnare: so deftype can implement dynamically

2:10 not needing to AOT

2:10 but thats not really a problem of mine

2:11 so only proxy can extend too

2:11 TEttinger: try removing :name cljdx.drop from :gen-class

2:12 that's the line the error is on

2:13 jack_rabbit: Come to think of it, I've never EVER had to use gen-class in that way. I guess that's why I'm so unfamiliar with it's syntax.

2:13 sinistersnare: hmm

2:13 jack_rabbit: its*

2:13 sinistersnare: that fixed, time for another error

2:13 lemme try to fix this

2:13 more namespace problems

2:13 futile: Wow. Seesaw is comparable to Cocoa.

2:13 I could dig this.

2:13 sinistersnare: :use and :require and shit

2:13 futile: whoa whoa whao, everybody just calm down

2:13 TEttinger: futile, seesaw's great

2:13 sinistersnare: i like seesaw

2:14 futile: sinistersnare: can i recommend that maybe you take a little break from IRC?

2:14 maybe take a walk?

2:14 sinistersnare: i need to go to sleep

2:14 jack_rabbit: I tried seesaw for a bit, then I gave up.

2:14 TEttinger: https://www.youtube.com/watch?v=K7jG10UFN90

2:14 jack_rabbit: But I don't like programming GUIs.

2:15 futile: TEttinger: make anything with it?

2:15 TEttinger: my current project

2:15 futile: jack_rabbit: you use Mac?

2:15 TEttinger: a few other small things

2:15 futile: TEttinger: sweet

2:15 jack_rabbit: futile, only when I have to.

2:16 futile: jack_rabbit: oh ok. well then you wont need Zephyros

2:16 jack_rabbit: Objective-C is pretty cool.

2:16 futile: jack_rabbit: yeah i wrote zeph in it

2:16 jack_rabbit: what is that?

2:16 futile: its no clojure, but not horrible either

2:16 jack_rabbit: scriptable window mover-arounder-and-resizer-etc for mac, https://github.com/sdegutis/zephyros

2:16 jack_rabbit: So it's a lisp implementation?

2:16 Oh.

2:16 I see.

2:17 futile: the "not horrible" comment was about objc

2:17 sinistersnare: lol

2:18 futile: hmm JTextArea, neat

2:18 jack_rabbit: futile, LOL. I love the README.md.

2:18 futile: thx

2:18 true story btw

2:18 jack_rabbit: lol

2:18 futile: i heard about it from a friend

2:18 of a friend

2:20 welp, JTextArea looks not great for syntax highlighting

2:21 sinistersnare: nightcode uses seesaw for its gui stuff, and has syntax highlighting; not trying to plug this time, but you can look at how they do it

2:21 futile: i did. didnt i say earlier?

2:22 he uses rsyntaxtextarea

2:22 which i think is possibly overkill

2:22 sinistersnare: ohoh

2:22 sorry

2:22 futile: no prob

2:22 sinistersnare: didnt really realize that

2:23 futile: you should take a nap

2:23 its late

2:23 and youve had a long day

2:23 sinistersnare: i do

2:23 i need to be up in a few hours

2:23 but i was so determined

2:23 futile: maybe a nice warm glass of milk

2:23 sinistersnare: to fix the damned thing

2:23 futile: sinistersnare: there's always tomorrow

2:23 when you have a fresh mind

2:23 sinistersnare: :( it is tomorrow

2:23 futile: i mean friday

2:23 sinistersnare: lol

2:23 futile: ie tomorrow

2:24 sinistersnare: crap its thursday already

2:24 futile: good night

2:24 SegFaultAX: I've never understood the appeal of warm milk by itself. Mixed with coffee or chocolate, sure. But by itself it's just so... warm and milky.

2:24 sinistersnare: chocolateeeee

2:24 futile: SegFaultAX: warm milk with honey is just like breast milk, hence the comfort

2:25 SegFaultAX: futile: Don't drink much breast milk these days.

2:25 futile: me neither. but thats what my wife says.

2:25 SegFaultAX: Thanks for the protip though. ;)

2:25 Has she done extensive research?

2:25 For science...

2:25 futile: she took some college

2:25 like, for nursing stuff

2:26 like, a nurse.

2:26 SegFaultAX: Haha

2:26 futile: but not a nurse.

2:26 SegFaultAX: She went to college to learn how to nurse!?

2:26 What school was this and how do I apply?

2:26 callen: SegFaultAX: http://michaelochurch.wordpress.com/2013/08/07/why-clojure-will-win/

2:26 sinistersnare: these conversations go weird places

2:26 callen: sinistersnare: it's pretty specific to futile.

2:27 sinistersnare: lol

2:27 futile: good night sinistersnare

2:27 SegFaultAX: sinistersnare: Breastmilk is relatively tame compared to where it usually goes after you log.

2:27 sinistersnare: :( ok fine

2:27 i have to go then

2:27 SegFaultAX: We're waiting for you to leave, though.

2:27 sinistersnare: adios yall

2:28 futile: what a nice young man.

2:28 i hope he comes back tomorrow well rested

2:29 zRecursive: Can clojure do scripting things as bash ,etc. ? i feel it is difficult thing as its slow startup time

2:29 noonian: zRecursive: yeah, I use lein-exec: https://github.com/kumarshantanu/lein-exec

2:29 jkj: i quess there should be a service of some sort to make scripting fast

2:29 callen: zRecursive: doable and inadvisable unless it's complicated and you want to reuse clojure libs.

2:29 noonian: its slow but does work :P

2:29 callen: jkj: that's called Drip.

2:30 zRecursive: thx

2:30 futile: zRecursive: it can but its not well suited for it as you noticed. lein exec makes it a little easier but im not convinced its great for it

2:30 SegFaultAX: Just use something specifically designed for scripting.

2:31 futile: i use ruby for scripts

2:31 SegFaultAX: I've found the mix of Clojure + Ansible to be positively refreshing.

2:31 futile: ansible?

2:31 SegFaultAX: futile: Less shit chef.

2:31 tomjack: is core.typed's (ann x t) pretty much the only sensible way to do type annotations? :(

2:31 futile: oh nice

2:31 tomjack: I wish I could do ^t x

2:32 callen: Ansible has a nice complexity scale up from "shoot things at lists of servers" to, "I need to distribute instructions to multiple clusters efficiently"

2:32 tomjack: `x :- t` is next on my list but it seems unlispy and tricky to desugar, plus weird if your code actually deals with the keyword :-

2:32 futile: im sold based onthis readme

2:32 we use chef + boucher at work

2:32 sinistersnare: sorry again


2:32 goodnight

2:32 SegFaultAX: callen: Good article so far. I agree with many of his sentiments.

2:33 futile: boucher = https://github.com/8thlight/boucher

2:33 callen: SegFaultAX: you'll note that he says exactly what I was saying about static type systems constraining the solution space :P

2:33 SegFaultAX: he conveyed it more succinctly, but that's precisely what I'd been trying to tell you before.

2:34 futile: lately im wanting to switch back to RoR :(

2:34 noonian: i think it might be provable even

2:34 callen: futile: why?

2:34 noonian: what?

2:35 noonian: that static systems constrain expressible programs to those that are decidable by the type system?

2:35 noonian: yes

2:35 callen: noonian: that the type system is decidable and allows some things and disallows others is kinda the point of any decidability proof

2:35 noonian: ,:P

2:35 clojurebot: :P

2:35 callen: Haskell '98 being the keenest example

2:35 but nobody uses the decidable type system from Haskell '98, because it's too...drum roll please...

2:35 restrictive.

2:36 so they play, "pimp my compiler" instead of writing code.

2:36 futile: oh wow, this is great: https://gist.github.com/daveray/1441520

2:36 thanks whoever linked me to that

2:36 limechat doesnt support Cmd-F so its hard to find out who it was

2:36 SegFaultAX: callen: I never disagreed with that. I only said that it's by choice, and that it's possible to side-step the side system by unifying all types to Uni (as in the case of most dynamically typed languages) if you want to.

2:37 Which is trivially true.

2:37 s/side system/type system/

2:37 callen: SegFaultAX: it's not in Haskell '98

2:38 SegFaultAX: if the type system is actually complete and decidable, you can't side-step it without changing the compiler (implementation)

2:38 noonian: my experiences with haskell and sml cancell each other out, destructive interference

2:38 jack_rabbit: lol

2:39 SegFaultAX: callen: If Haskell's type system was both sound /and/ complete, that might be ture.

2:39 True, even.

2:39 callen: Haskell '98, yes, and that's my point.

2:40 I was talking about types, not Java.

2:40 you kept banging on about MAKE EVERYTHING OBJECT TYPE LEL

2:40 futile: Whoa. Seesaw may be my new favorites.

2:40 Cocoa used to be my favorites.

2:40 SegFaultAX: callen: Okay.

2:40 xpe: SegFaultAX: solved: http://stackoverflow.com/a/18119161/109618

2:40 futile: This is like Cocoa. Maybe not as native, sure. But screw that, I get to use Clojure!

2:41 jack_rabbit: native is overrated.

2:41 callen: jack_rabbit: until you need it, sure.

2:41 jack_rabbit: And that's coming from someone who likes writing assembly.

2:41 callen, true.

2:42 tomjack: which type systems have undecidable checking?

2:42 clojurebot: that's cool

2:43 jack_rabbit: shut up, clojurebot.

2:43 SegFaultAX: tomjack: Type systems that support n-rank polymorphism > 2

2:43 jack_rabbit: (It's okay to be unreasonably mean to bots)

2:43 SegFaultAX: Which I don't think Haskell does without some switches, IIRC.

2:44 jack_rabbit: You shouldn't have to if you write your typeclasses properly.

2:44 :)

2:44 SegFaultAX: jack_rabbit: Uh. What?

2:45 callen: I've bumped into the limits of the Haskell compiler before, it wasn't a happy place.

2:45 extending Clojure is a dream by comparison.

2:45 jack_rabbit: No doubt.

2:46 SegFaultAX: Without an extensive background in type theory (which I don't have), I imagine it's near impossible.

2:47 callen: there's a non-trivial list of prereqs for comprehending type theory too.

2:47 SegFaultAX: I've looked at a very, very small amount of GHC's implementation and understood virtually nothing at all.

2:47 callen: I figured out thunks. That made sense. lol.

2:47 still don't like 100% lazy languages anyway.

2:47 I'm with Okasaki - want both.

2:47 tomjack: "Most Haskell compilers allow arbitrary-rank polymorphism as an extension, but this makes type inference undecidable."

2:48 SegFaultAX: Well there's your answer.

2:48 callen: "most haskell compilers" I see we're pretending something other than GHC exists beyond Haskell '98

2:48 jack_rabbit: lol

2:49 type inference is overrated.

2:49 callen: I agreed with that until I tried out Scala

2:49 tomjack: ("Type checking is decidable, however..")

2:50 callen: Scala taught me the pain of a half-assed static type system.

2:50 SegFaultAX: You should try Java some time.

2:50 callen: the only static type system I'm likely to take seriously short of Hindley-Milner is core.typed.

2:50 SegFaultAX: I'm told it's useless/horrible. I prefer to poke at bytecode from Clojure and otherwise keep my dick clean.

2:50 jack_rabbit: You should try C some time.

2:50 callen: speaking of, I need to write that proxy thing.

2:51 jack_rabbit: "that proxy thing"

2:52 tomjack: java gives me just enough to make me try to use the types, and then I fail miserably :(

2:52 SegFaultAX: liberator seems so awesome in theory but damn defresource gets ugly and fast.

2:53 jack_rabbit: tomjack, is there a way to use Java without using types?

2:53 xpe: jack_rabbit: Clojure

2:54 haha

2:54 callen: jack_rabbit: you know Clojure right?

2:54 tomjack: I mean to.. express interesting things with the types

2:54 callen: tomjack: trying to make the type system do something useful? Good luck.

2:55 SegFaultAX: callen: WRT the previous discussion, I think you fundamentally don't understand my argument if you think I was "talking about Java". It's unfortunate considering how much time we've wasted in aggregate on the subject.

2:56 callen: SegFaultAX: the kind of uni-typed implementation you referred to wasn't about the type system and was an artifact of the Object abuse the Java ecosystem engages in.

2:56 jack_rabbit: xpe, callen, Clojure is definitely not Java.

2:56 It just runs on the JVM.

2:56 SegFaultAX: callen: It has nothing at all to do with Java.

2:56 jack_rabbit: SegFaultAX, indeed.

2:56 xpe: what is happening right now?

2:56 SegFaultAX: jack_rabbit: You're missing a significant amount of context.

2:57 callen: in the abstract yes, but that you think it somehow has something to do with the type system is an artifact of your experience.

2:57 SegFaultAX: jack_rabbit: 5+ hours worth of discussion.

2:57 * xpe is stuck in the twilight zone

2:57 callen: at *LEAST* 5 hours.

2:57 haha, dead horse. Liquified :)

2:57 jack_rabbit: indeed.

2:57 callen: SegFaultAX: apologies. Congrats btw. :)

2:59 futile: Okay, a Clojure text editor it is.

2:59 In seesaw.

2:59 SegFaultAX: For?

2:59 clojurebot: for is not a loop

2:59 callen: SegFaultAX: to make an apple pie from scratch, futile has to first create the universe.

3:00 SegFaultAX: callen: That was to you. Congrats for?

3:00 My engagement?

3:00 TEttinger: futile: make it handle multimarkdown and you can sell it to compete with the load of commercial non-cross-playform multimarkdown editors

3:00 callen: SegFaultAX: yes, your engagement.

3:00 futile: TEttinger: uhhh

3:00 SegFaultAX: Thanks.

3:00 callen: SegFaultAX: I wasn't going to name it in public unless you did so first.

3:01 SegFaultAX: pass my congrats to the lucky lady. :)

3:02 futile: TEttinger: wat?

3:02 SegFaultAX: callen: I'll let Chelsea know.

3:03 callen: danke

3:04 TEttinger: futile, multimarkdown is a superset of markdown, there's a bunch of mac-only specialized editors for it and most are commercial

3:04 futile: TEttinger: oh. well i dont use markdown as much as i use clojure, so..

3:04 :)

3:04 TEttinger: if your text editor could also render MMD to HTML and used swing, it would work everywhere

3:04 futile: TEttinger: who are you?

3:05 TEttinger: eh?

3:05 SegFaultAX: callen: Anyway, the conversation was never about type systems for the same of discussing type systems. The original thesis was that dynamic type systems are a subset of statically typed systems, and that can be trivially a practically proven.

3:05 futile: TEttinger: oh sorry thats a weird question to ask

3:05 i have a knack for asking weird questions by accident

3:05 your name sounds familiar

3:05 callen: SegFaultAX: we just got done discussing how the opposite is true. I don't know how you can believe that.

3:05 TEttinger: futile, I've been here before

3:06 also on some channels on quakenet for game dev

3:06 futile: oh maybe the mailing list

3:07 SegFaultAX: callen: Is it the volume of code to do it that's the issue?

3:08 callen: Name a feature for example that couldn't be implemented in a static type system, provided I unify all the run time types to a tagged union.

3:08 callen: SegFaultAX: no, it's just a misapprehension of type systems to use turing completeness to implement a different system outside of that type system.

3:08 SegFaultAX: callen: Ah right. So the issue is the fact that I essentially have to bypass the static type system (as above)?

3:09 callen: bypassing it means precisely that we're talking about a different, independent type system

3:09 you've left one world and joined another.

3:09 the implications of that are unbounded and could mean anything.

3:10 SegFaultAX: callen: I see your point, although it isn't clear that the distinction is always hugely valid, especially if the type systems can freely interoperate.

3:10 callen: it's totally valid and if you assert differently you will confuse any conversation intended to be about type systems.

3:11 the best example to demonstrate my point I can come up with is a raw brainfuck interpreter implemented in haskell.

3:11 SegFaultAX: callen: It'd still be a valid program in XYZ-static language, I just wouldn't be able to statically verify the correctness of the program.

3:11 callen: the code executed in the brainfucker interpreter has nothing to do with haskell's type system anymore.

3:11 if that doesn't get the point across, then I am at a loss.

3:11 SegFaultAX: Well, BF is untyped so that's a tricky example.

3:11 callen: it really doesn't matter

3:12 as I said, the implications of implementing something else could mean anything

3:12 could be a stronger type system, could be a weaker one, could be an untyped one

3:12 SegFaultAX: But I'm not really talking about type systems, for the 100th time.

3:12 callen: but the behavior of the new system reflects nothing at all upon the previous type system.

3:12 but you are, you're talking about static vs. dyanmic

3:12 SegFaultAX: Not vs.

3:12 callen: static constrains the solution space to what it can understand.

3:12 SegFaultAX: It isn't one vs the other.

3:13 callen: you have a wider solution space for a given problem in a dynamic type system than you do in a static one.

3:13 SegFaultAX: I'm saying that a static type system can trivially implement a dynamic type system. That's it.

3:13 callen: attempts to deal with those constraints end up compromising the static type system more often than not.

3:13 SegFaultAX: I'm not comparing the merits of one to the other or anything.

3:13 callen: that's nothing to do with a type system

3:13 at all

3:13 a static type system can't "implement" anything.

3:13 SegFaultAX: I never was.

3:13 callen: it's an immutable thing

3:13 you're talking about a property of turing completeness.

3:14 that you can implement a *different* language flows from turing completeness

3:14 it has NOTHING to do with the originating type system.

3:15 a type system is a property of a fixed, immutable implementation

3:15 implementing a different language using that language leaves the semantics of that system and you are now talking about a complete different, de novo type system.

3:15 SegFaultAX: I never said otherwise.

3:16 callen: you're conflating type systems with programming.

3:16 futile: https://github.com/seliopou/typo

3:16 callen: static type systems have a more constrained mathematical space of expressible "things" than dynamic type systems.

3:16 that's...the whole point of them.

3:17 if the type system didn't constrain the expressible programs to what it understood it would be useless.

3:17 SegFaultAX: Hmm, perhaps my original arguments wasn't well phrased.

3:18 Maybe: "there isn't a clear boudnary between static and dynamic languages"

3:19 callen: but there is.

3:19 well

3:19 now we're talking about languages, and we're potentially including undecidable type systems.

3:19 turing complete type systems happen to be undecidable.

3:20 using them to prove static languages somehow "cover" a dynamic expression space is equally senseless and besides the point of type systems.

3:20 which really just gets back to what I said about turing completeness.

3:21 SegFaultAX: Turing completeness makes it hard to visualize the real separation between these paradigms.

3:21 callen: doesn't have to be, Haskell 98's type system makes the matter very clear.

3:22 maintains a strict separation between "turing complete programming language" and "type system allows a set of expressible programs, and is a subset of those expressible by an untyped language"

3:22 you do yourself a disservice by muddling your understanding of the concepts at hand with frankly poorly thought out implementations.

3:22 tomjack: what is the equivalence relation on programs

3:23 futile: wat

3:23 SegFaultAX: I only use the implementations as examples.

3:25 futile: I... I think I can do this!

3:25 tomjack: bisimilarity or something?

3:25 futile: The last time I tried, it was 4 years ago and I was just learning programming and the languages I had weren't very good. But now I'm qualified do this

3:25 !

3:25 callen: tomjack: bisimilarity isn't strict enough.

3:25 tomjack: you'd have to match and constraint semantics to the intersecting set realistically

3:26 this is something you'd do by vague gestures outside of Coq and Agda.

3:26 it's doable in a very rough and homespun sense though.

3:26 constrain*

3:26 well

3:26 maybe bisimilarity would be enough.

3:27 tomjack: bisimilarity across partial programs for all possible inputs with patching non-total behavior I think might be sufficient.

3:27 tomjack: I don't get it at all

3:28 callen: matching*

3:29 tomjack: the problem is that bisimilarity would still just be talking about input and output.

3:29 tomjack: yeah

3:29 I don't see what else to talk about

3:29 callen: tomjack: the point of saying that static type systems are more constrained is to say that given a bisimilar program, you can skin the cat in more ways with a dynamic lang than a static one.

3:30 tomjack: presumably there are infinitely many ways in either language

3:30 mpenet: TimMc: Do you think the query validation issue is really a big deal? I am thinking about this, and what it would take to make it more safe. Also comparing to other libs like this (honeysql for instance), lack of safety is quite common in this area, not that is should be the default.

3:30 tomjack: ?

3:31 or do you quotient something out to make it not infinite

3:31 callen: it's not infinite

3:32 it's provably finite in both cases.

3:32 that's how you can say static is a subset.

3:33 tomjack: so like (... (fn [x] ((fn [x] ((fn [x] x) x)) x)) ...) counts as just (fn [x] x)

3:33 callen: doesn't.

3:33 I mean they're bisimilar

3:33 but they're different "expressions" of the same thing

3:35 tomjack: I'm not following - I can trivially construct countably infinitely many such expressions of identity. but you say both "provably finite" and "doesn't"

3:35 SegFaultAX: Countably infinitely?

3:36 :)

3:36 tomjack: yes?

3:36 clojurebot: yes isn't is

3:37 callen: tomjack: a static type system can reject a program.

3:37 SegFaultAX: callen: I'm still struggling with your argument. The more I learn the more it seems invalid, but I'm not sure how to formulate why.

3:37 tomjack: seems to me a program which doesn't typecheck isn't a program at all

3:37 callen: SegFaultAX: tomjack and I are talking about something else.

3:38 SegFaultAX: callen: I know. I'm referring to our previous discussion.

3:38 callen: SegFaultAX: you have a fundamental misapprehension of the subject matter.

3:38 I don't know else to explain n > n -1 in new terms.

3:39 SegFaultAX: callen: Perhaps I do, and I'm ok with that. I didn't study type theory in school as its own discipline so all of those I'm learning myself.

3:40 All of this, even.

3:43 tomjack: when I first saw something about a static type system constraining the set of expressible programs, it seemed to make sense to me, but now it just seems like gibberish :(

3:45 maybe it's just semantic satiation

3:45 SegFaultAX: My argument is essentially that to build a dynamic type system, I can trivially start with a static type system and discard a lot of stuff (which is relatively simple by comparison). Going the other direction, there is a positively overwhelming amount of stuff I'd need to implement to get even a basic static type system going from a dynamic one.

3:45 That's an oversimplification of my original argument, but that's about the gist of it.

3:46 In other words, from Static -> Dynamic, I just throw away a bunch of the stuff that makes static awesome. Dynamic -> Static is purely additive and significantly more work.

3:46 They are equivalent due to turing completeness, however.

3:47 Which is why I said that dynamic languages are essentially a subset of static languages. And that fact seems trivially obvious *to me*

3:47 clgv: SegFaultAX: for adding an optional type system to a dynamic language have a look at core.typed ;)

3:47 SegFaultAX: clgv: We're not talking about specific implementations.

3:48 clgv: SegFaultAX: well you might find general ideas in there...

3:48 SegFaultAX: clgv: Still not talking about implementation details.

3:49 clgv: We're discussing static :> dynamic

3:49 * clgv notes down that general ideas are implementation details and quits the discussion

3:50 callen: SegFaultAX: static constrains the solution space in ways dynamic does that. That means a set of expressible programs in a given static type system will countably less than the set of expressible programs in the dynamic type system.

3:50 in ways dynamic does not*

3:50 SegFaultAX: callen: Sure, because that's useful to a programmer. But I can also discard those static checks if I choose to. I'm tired of saying this over and over.

3:51 tomjack: countably less?

3:51 Raynes: defprotocol Countably)

3:51 SegFaultAX: Raynes: Ahoy!

3:51 Raynes: Arrrrr matey.

3:52 tomjack: i.e. there are uncountably many expressible programs in a dynamic language? O_o

3:52 callen: tomjack: no

3:52 SegFaultAX: tomjack: Not quite.

3:52 tomjack: oh, silly me

3:52 SegFaultAX: tomjack: But that there are necessarily fewer in static languages than dynamic (according to callen)

3:52 tomjack: I forgot a subset can have the same cardinality as its superset

3:53 SegFaultAX: In this case it's a strict subset if the static system is sound.

3:53 tomjack: "fewer" seems confusing then

3:53 SegFaultAX: Well it is fewer if we're talking about a sound type system like eg Haskell's.

3:54 tomjack: "fewer" means there is an injection but no surjection, right?

3:56 Raynes: danielszmulewicz: How I feel about the ClojureScript formula you're adding to Homebrew and their acceptance of it: http://www.youtube.com/watch?v=XvqgU7DPxhs

3:56 tomjack: I mean if there are countably many ways to write identity in clojure, and countably many in haskell, whence "fewer"? where is my misunderstanding?

3:57 probably identity is a bad example :)

3:57 SegFaultAX: tomjack: Haskell rejects all formulations that are not sound.

3:58 tomjack: so the idea is something like we set up a bijection between syntactically (but not necessarily semantically) valid haskell programs and clojure programs, and then the typechecker knocks out some on the haskell side?

3:59 it would seem to still be an open question whether there is a bijection between what's left

4:00 SegFaultAX: tomjack: How can there by any dispute?

4:01 callen: SegFaultAX: Java's type system rejects things too.

4:01 Raynes: I'm just gonna go watch American Psycho in the fetal position now.

4:01 callen: things that would fly in a dynamic type system.

4:01 Raynes: you might want your 'chi' to be in a better state before watching it :P

4:01 tomjack: SegFaultAX: hilbert's hotel?

4:03 SegFaultAX: callen: Yes? Ok?

4:03 callen: okay, here's a thought experiment

4:03 add an arbitrary limitation. like a byte limit to the programs

4:03 so that we're not talking about an infinite set

4:04 within a given kb of code, a static type system will reject programs that would've flown in a dynamic type system (that being the POINT of a static type system)

4:04 making the possible expressible programs within that type system constrained relative to the dynamic type system.

4:05 tomjack: without infinities, I'm back to just being baffled by the implicit equivalence relation between static and dynamic programs :(

4:06 callen: tomjack: but at least the things we have to think about is more focused.

4:06 lets shift to something even more focused, a contrivance.

4:06 SegFaultAX: Terrible thought experiment, but I get your point.

4:07 callen: lets imagine expressible programs A, B, and C in a given type system. We have two otherwise identical variants of the type system, one that is static and one that is dynamic.

4:07 A is a valid program and passes the type checker, B is a valid program and doesn't pass the type checker, C is an invalid program and doesn't pass the type checker.

4:08 SegFaultAX: Type systems don't implement things, remember?

4:08 callen: A, B, and C are all potentially valid within the constraints of the type system.

4:08 SegFaultAX: I said contrived and I'm still talking about expressible semantics within the confines of the type system.

4:08 SegFaultAX: A sound type system I guess.

4:08 callen: I qualified what I was about to say with "contrivance" before I'd said a word about it.

4:09 you can add program D for an unsound type system if you like. you get my point.

4:09 SegFaultAX: We could just as easily go to the other end of the spectrum and built a complete type system.

4:09 klrr: polymorphism.... what is clojure's protocols? are they similar to haskells' type classes?

4:10 SegFaultAX: klrr: Protocols have been likened to dynamic type classes, but I wouldn't really think of them that way in general.

4:10 callen: the trade-off of a static type system is that you sacrifice some potentially valid expression space in order to constrain your type-check-okay expression space to things that are valid within the type system


4:10 producing programs that are correct

4:10 but not necessarily.

4:10 type systems are expressly about validity within that system

4:10 but these are the practical tradeoffs and implications thereof.

4:10 SegFaultAX: Unless the system is complete, and allows all valid programs.

4:10 Even if they can't be type checked.

4:11 callen: uhm, that's not possible.

4:11 SegFaultAX: Not possible or not practical?

4:11 callen: that's getting into Godel territory.

4:11 SegFaultAX: It most definitely is possible.

4:11 klrr: okey, are protocols uniqe to clojure compared to other lisps like scheme, cl and hy?

4:12 callen: a sound type system cannot express all valid expressible programs.

4:12 SegFaultAX: But a complete one can, by definition.

4:12 Dynamic systems are neither complete nor sound (at compile time)

4:13 klrr: haskells type system is turing complete

4:13 Raynes: Thanks.

4:13 SegFaultAX: Haha

4:14 callen: klrr: haskell 98 is not, it requires extensions to be turing complete.

4:14 tomjack: I have trouble separating the point behind the program-size limitation out from seemingly irrelevant concerns like "you have to waste space on type annotations"

4:14 I think I kind of vaguely begin to see it though

4:14 klrr: Raynes: are you that famous dude who got money to go to some clojure conf ? =o

4:14 SegFaultAX: tomjack: It was a horrible experiment.

4:14 klrr: okey

4:14 callen: tomjack: I'm really just happy that I'm making progress with you.

4:14 SegFaultAX: honestly it's a trivial point to make if you've done haskell before.

4:14 Raynes: The fact that you know who I am confirms that, klrr. :p

4:14 callen: SegFaultAX: another good way to illustrate the point is a static type system that enforces total programming.

4:15 * Raynes dons sunglasses, for he is famous.

4:15 * callen carries Raynes litter around so that he can be loved by the unwashed masses

4:15 klrr: if you guys are interested in type systems you should check out agda btw :) it got really cool type wystem

4:15 Raynes: I like the Coq.

4:15 callen: klrr: I mentioned Coq and Agda earlier while explaining something.

4:15 tomjack: in that case it makes perfect sense to me to say that there are programs which aren't expressible

4:16 klrr: okey, alsa clojures optional static typing does it provide extra safety or only better performance?

4:16 SegFaultAX: tomjack: The type system is merely a tool. You can choose to not participate in it if you don't need it.

4:16 callen: yes but when you do that, you're not creating things that reflect upon that type system.

4:16 which goes back to what I said about participation within type systems

4:17 Raynes: Clojure doesn't have optional static typing.

4:17 callen: and brainfuck interpreters in haskell 98

4:17 Raynes: You might be confused with Racket.

4:17 Ember-: there's work on typed clojure

4:17 Raynes: Or perhaps heard about Typed Clojure, which is a third party and generally incomplete project.

4:17 Ember-: I think I heard it had been accepted as part of core development some time back?

4:17 Raynes: A contrib project.

4:17 Ember-: humm, I might remember wrong

4:17 SegFaultAX: callen: I don't get how that's a counter argument when my argument all along has been "you can choose not to use the type system"

4:18 twem2: core.typed?

4:18 clojurebot: core is what you put in a namespace when you can't think of a better way to avoid single-segment namespaces.

4:18 SegFaultAX: By unifying blah blah

4:18 Ember-: twem2: that one

4:18 callen: because you were acting as if the sentiment somehow disproved what I was saying about static being a subset of dynamic in expression space.

4:18 SegFaultAX: It's almost like a re-affirmation.

4:18 tomjack: does seem kind of confusing that a bunch of contrib projects have "core" in the name..

4:19 callen: I was the one, in these long conversations, that originally reified and made the point about type system participation in order to explain what I was trying to tell you.

4:19 and spent hours doing so

4:19 but school's out bitches. learn type systems on your own time. I'm back to fucking with JVM bytecode.

4:19 klrr: i wanna learn clojure after ive become better at haskell :)

4:19 callen: klrr: learn both, be a better person.

4:20 SegFaultAX: callen: School was never in. You're not an authority on this topic, so please don't pretend to be.

4:20 klrr: do i need to learn java first?

4:20 callen: klrr: no

4:20 I don't know shit about Java.

4:20 tomjack: well, I was here to learn :) thanks

4:21 klrr: i already know the basic haskell, currently learning about FRP, arrows, lenses and pipes

4:21 SegFaultAX: klrr: Mostly irrelevant in Clojure.

4:22 klrr: does FRP exist in cljoure, are there any non-leaking, aignal is first class citizen imolementations?

4:22 signal*

4:22 tomjack: no.

4:23 SegFaultAX: klrr: Does it exist in Clojure is a strange question. Most languages aren't specifically designed with FRP in mind.

4:23 callen: http://www.youtube.com/watch?v=RwXn6bBx5KI

4:23 klrr: there's none? then i have to port elerea to clojure when im learninh clojure :P

4:24 callen: c2 is actually a decent resource on this subject, although dated in some places.

4:24 tomjack: I haven't seen any FRP attempts which are F

4:25 much less any other potentially desirable attributes

4:25 klrr: i dont get why it wouldnt be possivle in clojure? also i only know one öanguage thtat is built with FRP in mind

4:25 piranha: tomjack: javelin?

4:25 callen: javelin is unfortunately named.

4:25 since there was already a JavelinJS

4:25 piranha: yeah

4:25 tomjack: javelin is just RP, by my (and I suspect klrr's) definition

4:25 fredyr: RxJava perhaps also?

4:26 piranha: tomjack: why not F?

4:26 tomjack: uhh

4:26 klrr: ive only read three papers on FRP and there is like hundred so im no expert :P

4:27 tomjack: I think the readme for javelin sets it out pretty well

4:27 klrr: link?

4:27 clojurebot: unlink: and constantly is just a function that takes any arguments and returns whatever argument is given

4:27 Raynes: klrr: Are you intoxicated by chance?

4:27 piranha: klrr: https://github.com/tailrecursion/javelin

4:27 klrr: whats that?

4:27 tomjack: "Cells are similar to Clojure atoms: they contain values, they can be dereferenced with deref or the @ reader macro, and their contents are mutated using the swap! and reset! core functions."

4:27 if that doesn't mean "not F" I don't know what "F" means

4:28 klrr: Raynes: wot

4:29 Raynes: klrr: You're typoing in unpredictable and strange ways that are usually indicative of a drunk person.

4:29 klrr: ok, javalin seems a bit like original FRAN, the latest FRP impl. is much better IMO, leakless firs classs signal impl.

4:29 im using my phone

4:29 thats why

4:29 Raynes: Oh, that'll do it.

4:29 Sorry for accusing you of being drunk. <3

4:30 klrr: im not allowed to get drunk yet xD

4:30 tomjack: I never looked at FRAN but I'm pretty sure it deserved the F

4:30 klrr: F?

4:30 Raynes: klrr: Never stopped me.

4:31 klrr: milk is fine for me

4:31 tomjack: "functional" - I don't think conal would have called it that if it wasn't that

4:31 klrr: ok

4:32 Raynes: klrr: I assume 'not allowed to get drunk yet' means under the age of 21, and the fact that you're admitting it indicates under the age of 18. How old are you, sir?

4:32 klrr: well, elerea is best atm IMO, although ive ported many combinators from Elm to hasnell to make it more useful

4:32 im not saying my age its personal info

4:33 Raynes: 14, got it.

4:33 tomjack: I see in the elerea paper "maintain referential transparency"

4:33 hadn't seen elerea before, but that is enough to make me want to investigate more

4:33 Foxboron: good morning klrr

4:33 klrr: morning

4:33 tomjack: the idea that FRP is about spreadsheets or behaviors are "managed references" completely baffles me

4:34 Foxboron: Raynes: klrr is in the same boat as you. Learning haskell before he is 16.

4:34 Raynes: Who knows. That's personal info. ;)

4:34 Foxboron: :3

4:34 Raynes: not according to yer blog.

4:34 clojurebot: make a note of http://scienceblogs.com/goodmath/2006/11/the_c_is_efficient_language_fa.php it is yet another article about picking c or c++ for performance being naive

4:34 callen: klrr: the best advice you'll ever get is "just code"

4:35 klrr: so uh...just code.

4:35 Raynes: Foxboron: I meant the assumption that he is learnign Haskell before 16.

4:35 I'm making wild assumptions about his age.

4:35 klrr: tomjack: fran papaer explains it kinda badly imo, i look at elm langs explaination

4:35 Foxboron: Raynes: i know him :3 One of your blog posts inspired him actually ^^

4:35 (inb4 klrr gets mad at me <3)

4:36 Raynes: Ah, excellent.

4:36 klrr: nope

4:36 Raynes: In all seriousness.

4:36 callen: Foxboron: klrr do either of you have a github?

4:36 tomjack: hmm

4:36 klrr: not mad :P only at myself for that stupid pong game but ill rwerite the bad stuff today

4:36 tomjack: newtype Stream a = S (IO a)

4:36 ????

4:37 klrr: i removed my stuff from fithub anyway

4:37 Foxboron: callen: Yes. Same as my nick :)

4:37 klrr: might come up a pong game soon though:P

4:37 Raynes: klrr: I apologize for being silly. It takes my breath away that I could ever have contributed to the inspiration of someone else with the things I've done. You're a rockstar already.

4:38 Foxboron: Raynes: He is a veryvery bright kid. But he will attempt to deny that :)

4:39 klrr: Foxboron showed your blog to me after ive started learn haskell since a fuy tehnix knew a website with slides and learninh clojure is mostly since foxboron knows it and rick hickey presentations is cool

4:39 callen: Foxboron: you get to vote. Do I implement Rack::attack for Ring/Clojure or do I implement proxy+ with annotation support?

4:39 Raynes: I want your vote too.

4:39 klrr: although your blog postvwas little insiring i got to admit

4:40 Foxboron: callen: Uhhhhh. I am not profficient enough in Clojure to say that

4:40 Raynes: callen: The former because I can use it.

4:40 callen: Write it and then add it to refheap's API for example purposes and… testing… and stuff.

4:40 callen: Raynes: you'll like what I have in mind for this.

4:40 Raynes: I just want you to do free work for me.

4:41 callen: Raynes: I'm just racking up github points bro.

4:41 Raynes: I hear I can use them to get...things.

4:41 Raynes: Like global mutable state!

4:41 ~rimshot

4:41 clojurebot: Badum, *tish*

4:41 callen: do ho ho

4:42 Raynes: probably won't need process-scope global mutable state.

4:42 ...maybe.

4:42 Raynes: Foxboron: Badass that he is learning Haskell. I think it's a good choice. If I had to do it all over again I'd still start with Haskell because it made far more sense than any object oriented language I used.

4:42 callen: probably.

4:42 Foxboron: I learned Haskell long long after I'd learned many other programming languages. I don't use it anymore but it's always there in the back of my head informing my thoughts and providing structure.

4:42 even though I don't actually have a use for most static type systems, Haskell's included.

4:43 Raynes: I'm going to go actually watch American Psycho now, since it's 1:30AM.

4:43 Foxboron: Raynes: Found him in #programmers frustrated to not being able to learn anything. So i invited him over too a IRC with some programming friends to give him inspiration, help and mentoring ^^

4:43 callen: I didn't know #programmers was a thing.

4:43 Raynes: Foxboron: You're a scholar and a gentleman.

4:43 Foxboron: callen: i do not know haskell :P Got other people with those skills :3

4:43 Raynes: Foxboron: We shall discuss this further at a later instant.

4:43 callen: I originally came here years and years and years ago because a lot of EFnet ##C people moved over.

4:44 Foxboron: Raynes: I have just moved into an apartment and going to catch breakfast anyway. Kebab on the menu.

4:45 callen: now I'm hungry.

4:46 Foxboron: callen: got an apartment in the middle of the town. First time in my life that a kebab store is closer then the groccerystore o.o

4:47 callen: nice.

4:47 I'm making plans to move to SF.

4:47 Foxboron: callen: well, i live in Norway :3

4:48 callen: every Norwegian person I've met in the US has been sad to return home.

4:48 I think it's the weather.

4:48 Foxboron: I live in Bergen. Most rainy town in Norway

4:49 I'd like to visit SF tho. Would be awsome.

4:50 callen: making the most of a visit to SF requires planning though.

4:50 Foxboron: pft

4:50 gko_: But isn't Norway the happiest country?

4:50 Foxboron: Improvising.

4:50 gko_: http://www.forbes.com/pictures/mef45ejmi/01-norway/

4:50 Foxboron: gko_, happiest? I don't know. Wealthiest? Sure.

4:51 gko_: How much is a coffee in your place?

4:51 Foxboron: I don't drink coffee

4:51 Yeah. Forbed believe GDP == Happiness

4:51 forbes*

4:51 callen: GDP actually == oil in Norway's case

4:52 Foxboron: Our only export is Oil and wepons

4:52 and fish

4:52 but that is a minor export considering the other two

5:37 noidi: cemerick, thanks a lot for austin, it works very well!

5:37 it seems to be much more robust than the original browser repl

5:39 cemerick: noidi: thanks for the contributions :-)

5:39 But, yeah, that's the point :-)

5:40 There's a number of other corners that can be further cleaned up to simplify the thing and make its failure conditions less common / mysterious

5:41 noidi: I should write a little blog post about how to use Austin with Counterclockwise. CCW doesn't start its REPL via Leiningen so the middleware approach doesn't work there.

5:42 I worked around it by setting up a cljs-repl profile, which sets up Austin in its user.clj: https://www.refheap.com/17379

5:43 I then start an NREPL with the Austin middleware using `lein with-profile +cljs-repl repl :headless :port 9998`

5:43 cemerick: noidi: well, you must end up using the piggieback middleware at some point?

5:44 noidi: (I have the alias `cljs-repl` for that in my project.clj)

5:44 clgv: noidi: I think laurent wants to devote some love to the leiningen integration next (i.e. after the current tasks are finished)

5:45 malesch: cemerick: as I just see you online, can I ask a short question regarding friend and oauth2 integration (ddellacosta/friend-oauth2)?

5:45 noidi: so my workflow is: (1) run `lein cljs-repl` in the shell (2) choose Connect to REPL -> localhost:9998 in CCW, (3) run `(cljs-repl)` in the CCW REPL window that opens up

5:45 noncom: i need to have objects with some mutable fields... what is the best way for that in Clojure? I suppose a defrecord with atom fields would be idiomatic?

5:46 noidi: and of course (4) reload the browser window :)

5:46 cemerick: malesch: shoot

5:47 noidi: part of that must be your external HTTP server, though...you *are* running leiningen, so if everything was integrated, the profile wouldn't get you much.

5:47 malesch: cemerick: making my first friend/oauth steps...google recommends oauth2 token validation. friend-oauth seems not to support this. if not in the workflow directly where can this be done? I thought of the credential-fn but I think I cannot specifically override this in the friend-oauth workflow.

5:48 cemerick: malesch: you'll have to ask ddellacosta when he gets in; I know ~nothing about oauth :-)

5:48 callen: malesch: I've implemented OAuth2 providers and clients in multiple languages.

5:48 but not with Friend.

5:48 noidi: cemerick, the only reason I run my HTTP server in a separate process, is that all the fancy CCW features like autocompletion only work for a REPL started from CCW

5:49 and as Austin only works in a REPL started from Leiningen, I need to use separate REPLs for the server and the CLJS RPEL :/

5:49 cemerick: noidi: not so :-) Just add the ccw server-side utils dep to your project.clj: https://clojars.org/ccw/ccw.server

5:49 or, user profile, more likely

5:50 malesch: cemerick: thanks will catch him :)

5:50 callen: is token validation only an issue with google or done with all providers?

5:51 noidi: cemerick, wow, thanks so much! wish I had known about this sooner!

5:51 cemerick: noidi: I started work on austin while using CCW, so the separate REPLs aren't necessary. Just clone your first (Clojure) session, then turn the clone into your cljs repl.

5:51 noidi: oh, all that sweet middleware I can finally use :')

5:52 what do you mean by cloning?

5:52 callen: malesch: Google's implementation is relatively vanilla. Are you referring to the access_token or something else?

5:52 malesch: publicly accessible OAuth2 APIs are generally tripod-only authorization.

5:52 I've used tripod authorization and "known entity" authentication that doesn't use the tripod.

5:53 malesch: the RFC for OAuth2 is pretty readable and provides a good sense of "base state" for how most OAuth2 APIs end up looking. The problem is that it's a framework and not a protocol and the provider is free to fuck you over in whatever manner amuses them most above and beyond the RFC.

5:55 some providers behave themselves. Any I've implemented and used have been very close to the RFC.

5:55 malesch: callen: thanks :) will check it

5:56 callen: malesch: http://tools.ietf.org/html/rfc6749

5:57 malesch: callen: gracias!

5:57 cemerick: noidi: all proper nREPL clients should allow you to clone (take a copy of) an open session. An easy way to get a new environment open to the nREPL server without creating a new connection, and retaining any dynamic var state that you had set up in the original session.

5:57 noidi: there's a button for it in the ccw nREPL window

5:59 noidi: cemerick, this is so cool. I feel like Clojure tooling leaped 2 years forward in a couple of seconds.

5:59 now my only question is: why is ccw.server such a well-kept secret?! :)

6:00 I have to bug Laurent to mention it somewhere in the docs

6:03 dark_element: cemerick, I figured out how to print out browser connection state in repl. All I have to do is create a custom cljs repl. https://www.refheap.com/17381

6:04 cemerick: dark_element: cool! You're now more of an expert in the cljs repl client side than I am :-)

6:06 dark_element: cemerick, you are too kind good sir. I just added one line to connect fn.

6:07 cemerick, interestingly even though i get "Browser connected" in repl. There are states where repl still prints exceptions.

6:08 cemerick, I am guessing it's the timeout duration where repl server still is expecting connection from closed browser window.

6:15 cemerick: dark_element: do you have a stack trace or similar?

6:16 dark_element: cemerick, wait i'll try to generate it again.

6:19 supersym: dark_element: sweet

6:32 dark_element: cemerick, comments show context (repl/browser/terminal) https://www.refheap.com/17382

6:32 cemerick: wow

6:33 dark_element: ok, so the second evaluation is being sent prior to the browser re-connecting?

6:33 or. finishing reconnecting?

6:34 dark_element: the threaddeath error on interrupt is expected (see end of this section: https://github.com/cemerick/piggieback#rhino-clojurescript-environment-default)

6:34 dark_element: cemerick second evaluation is sent after "Browser connected." is printed again which is sent from the js on that page.

6:35 cemerick, ahh almost forgot about that.

6:36 cemerick: dark_element: the second evaluation happens on line 9, but "Browser connected." appears on line 67?

6:37 the error shouldn't occur (that's what the queue is for), but I just want to make sure I understand the sequence of actions

6:37 dark_element: cemerick ohh i ma sorry i was referring to the third one line #68

6:37 am*

6:39 cemerick I am ok with evaluation on #9 failing since that browser window does not exist anymore. But evaluation on line #68 should run on the newly opened browser window right?

6:40 cemerick: dark_element: all the evaluations should succeed; pending evaluations go into a queue, and should be picked up by the next browser(s) that connect

6:45 dark_element: cemerick, Is this handled by piggieback or cljs.browser.repl?

6:45 noidi: cemerick, is it OK to reuse a repl-env after :cljs/quit?

6:45 I get a NullPointerException from Austin when I try to do that

6:46 in my user.clj I create a repl-env, swap! it into browser-repl-env, and store it in a defonce

6:46 when I first do a (cljs-repl repl-env), it works fine

6:46 but if I :cljs/quit and re-open the REPL with (cljs-repl repl-env) I get a NullPointerException

6:47 cemerick: noidi: nope, :cljs/quit drops the session

6:47 dark_element: nREPL, actually

6:47 each evaluation on a session goes into a queue

6:48 noidi: cemerick, OK, thanks

6:49 cemerick: dark_element: the promise created in `open-exchange` in austin then blocks a cljs evaluation until the browser channel connects https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L110

6:51 noidi: cemerick, to me the use of `def` suggests that an env is something meant to be reused https://github.com/cemerick/austin/blame/master/browser-connected-repl-sample/README.md#L35

6:51 maybe change that to a `let` around the `cljs-repl` call?

6:51 dark_element: cemerick, I was not using austin for the stacktrace i sent earlier.

6:52 cemerick: dark_element: oh, ok; well, I can't really help with classic browser-REPL stuff :-)

6:52 dark_element: cemerick, I was using piggieback :)

6:54 cemerick, I thought this was handled at piggieback and austin is just routing repl connections to different repl servers.

6:54 cemerick: dark_element: sure, but the connection (or lack thereof) stuff is related to the browser-repl implementation

6:55 dark_element: piggieback just patches over the parts of ClojureScript that assume it's running in a terminal. It delegates evaluation entirely to the REPL environment you're using.

6:56 dark_element: cemerick all right let go back to austin again then.

6:57 cemerick: noidi: you're right that other REPL envs *can* be reused. That can probably be classified as a bug, though I'll have to figure out some other way to expire the corresponding sessions.

6:57 a finalizer on the record type, maybe

7:07 Anderkent: $findfn ({:a 1} {:b 2} {:c 3}) {:a 1 :b 2 :c 3}

7:07 lazybot: []

7:07 Anderkent: $findfn {:a 1} {:b 2} {:c 3} {:a 1 :b 2 :c 3}

7:08 lazybot: [clojure.set/union clojure.core/conj clojure.core/merge]

7:25 ciphergoth: If I wanted to implement something like a task queue with an atom, AFAICT there's no easy way to do it, because it's hard to implement atomically popping a task from the queue

7:26 since swap just returns the new value; it's not easy for my function to return both the popped task and the new queue

7:28 Should I just implement the enhanced swap I need with compare-and-set! and a loop?

7:28 Or use a ref?

7:29 Or have a "most recently popped task" field in the atom that I can read from the return value from swap?

7:29 danielszmulewicz: cemerick: Is it possible to use piggyback and cljsbuild together? Any chance to see an example config (project.clj)?

7:40 noidi: ciphergoth, you could use a PersistentQueue ( http://stackoverflow.com/a/2495105/13340 ) in a ref, then in a single transaction `peek` the next task and then update the queue with `pop`

8:00 ciphergoth: noidi: that would work if what I was implementing was exactly a task queue, but unfortunately it's a slightly more complex data structure

8:00 noidi: I was just looking for a simple example of a concurrent data structure that needs a simultaneous-update-and-return-value operation

8:39 ronen_: hi guys. can anyone please help me with emacs? I am trying to follow the tutorial on the clojure-doc site, but I can't figure out how to run the tests

8:40 they say I should run C-c C-

8:40 which emacs says in unknown

8:40 jcsims: C-c C-,

8:40 is that what you're running?

8:41 ronen_: rr i didn't notice the comma

8:41 thank you!

8:41 jcsims: sure

8:42 ronen_: would you happen to know what it means if it says ClassNotFoundException: clojure.test.mode ?

8:43 jcsims: not off the top of my head - you compiled the test file with C-c C-k?

8:44 noidi: ciphergoth, can't you follow PersistentQueue's example and have the analogues of separate peek/pop operations? one to get the task and another to calculate the next version of your data structure.

8:44 ronen_: I did

8:46 weird, it's working now after restarting emacs

8:47 jcsims: it just sounds like that namespace wasn't loaded somehow ronen_ - maybe a missed save, or compile?

8:47 I'm still not that familiar with clojure yet, so others could probably shed some insight on why that might crop up

8:52 xeqi: ronen_: I've gotten that a few times, but not sure what causes it

8:52 doing M-x clojure-test-mode in the file twice fixes it though

8:53 ronen_: thanks:)

8:59 jcidaho: Hi. I knocked up some elisp to switch to the right nrepl buffer based on the current buffer. So if I have 2 nrepls open for project x and project y, if I open a project x file and run the function (key mapped of course) then I land on the right nrepl buffer. Wondering if any nrepl guys in here, to see if worth adding to nrepl.el or not

9:03 deg: Anyone have a tool or trick to keep the version number in my README.md consistent with the latest version I deploy to clojars?

9:04 yazirian: jcidaho: you might want to post to the mailing list about it -- there's a link to it in the README. At least then you aren't waiting for someone to show up :)

9:05 jcsims: or possibly submit a pull request to start a conversation about it as well?

9:05 TimMc: mpenet: I'm only mildly concerned about query validation in Cassaforte.

9:06 jcidaho: yazirian: jsims: will do. I've got an issue wiring it into nrepl.el I was hoping to ask someone about. I can't seem to get my defun registered in nrepl.el - 'Symbol's function definition is void.

9:07 TimMc: mpenet: The only thing that really bothers me is that a nil session given to a multi.cql query can cause a syntactic reinterpretation -- and that has happened multiple times during our switch from Hector.

9:07 jcidaho: feels like a newbie elisp issue, but I'll go through the resources you mention

9:10 mpenet: TimMc: Right, understandable. To be honnest that's one of the reason I kept these things separated in my own c* cql client

9:11 TimMc: "ease of use" or shorter api can mean headaches in some cases, and in the end I am not sure it's that helpful to the user. Then I guess it's a matter of personnal choice/taste

9:12 TimMc: How did you keep them separated?

9:12 jamii: This confuses me:

9:12 (var-get my-var)

9:12 ;; nil

9:12 (eval my-var)

9:12 ;; #<Var: --unnamed-->

9:12 (eval `(fn [] ~my-var))

9:12 ;; NullPointerException

9:13 mpenet: TimMc: you never pass session to a query fn

9:13 you can pass a query in string, bound statement form, or map (hayt query) form to execute, but that's it

9:13 TimMc: https://github.com/mpenet/alia or maybe I missunderstood what you meant

9:15 TimMc: jamii: Please don't paste more than 1 or 2 lines to the channel -- use a pastebin such as http://refheap.com or http://gist.github.com instead.

9:15 mpenet: well, there is no protection against a nil session either, but that would infer that there is a dynamic var for it, and think the query value is nil

9:15 jamii: TimMc: sorry :S

9:15 mpenet: causing an obvious error

9:15 TimMc: btw how did you end up with a nil session in the first place?

9:16 TimMc: mpenet: It's in an atom that gets initialized by a startup function, and I was doing repl development. :-)

9:16 mpenet: ah!

9:17 dnolen: jamii: you're trying to embed an object directly into the syntax, that only works in a couple of cases, I can never remember which.

9:19 jamii: dnolen: It works for functions. I'm trying to embed a reference to a function so that the lookup happens at runtime, like using (#'foo ...)

9:19 dnolen: jamii: yes it doesn't really work in general, and even for functions I think it's a hack mostly for some internal reasons

9:20 jamii: dnolen: I'm just confused as to why vars evaluate to themselves normally but are resolved when inside other code

9:20 In fact, even (eval [my-var]) gives a NullPointerException

9:20 But (eval my-var) works fine. Maybe I need to go read through the compiler...

9:21 dnolen: jamii: in anycase, I don't really have an answer to your question beyond I just wouldn't do that.

9:21 jamii: dnolen: :D

9:21 ambrosebs: is the cljs ast specified somewhere?

9:22 dnolen: ambrosebs: no, though bbloom and I have talked about how useful that would be.

9:22 ambrosebs: in particular it would be nice to make the analyzer implement multiple passes - like a core AST that gets enriched by other passes so that there's enough information for the compiler.

9:23 ambrosebs: dnolen: yes I remember this convo

9:24 dnolen: I'm working on hygienic transformation on CLJS ASTs. Almost pulled my hair out trying to work out the AST nodes.

9:24 dnolen: thankfully I'm almost done.

9:24 tbaldridge: ambrosebs: dnolen: and at some point, please drop that AST down to a SSA level. Transversing blocks of insts is waaay easier than walking a tree.

9:25 at least those are the concepts I'm working with atm

9:26 plus, blocks of instructions can then be queried by core.logic or datalog with minimal effort.

9:26 ambrosebs: dnolen: any tools to get js* nodes into a nice AST of javascript operations?

9:27 dnolen: ambrosebs: nope that was another bbloom idea

9:27 ambrosebs: it would be helpful to write down your notes somewhere if you have a chance for future spelunkers

9:27 ambrosebs: dnolen: ok, I guess I'll have to do it.

9:28 tbaldridge: but why do we need a schema definition, it's just data :-P

9:28 ambrosebs: dnolen: I think I'll go through the analyzer properly and make a core.typed out of the AST

9:28 dnolen: ..another time :P

9:30 dnolen: ambrosebs: if you write up your basic notes, I can fill in the details - of particular interest would be anything you considered to be weird or confusing corners

9:30 also we should get Bronsa to contribute notes

9:31 ambrosebs: jonasen: do you happen to have notes on the CLJS AST?

9:31 dnolen: tbaldridge: AST -> SSA sounds like analyzer pass? :)

9:32 jamii: Hmmm, all of these work fine (do (def x nil) (eval #'x) (eval [#'x]) (eval `[~#'x]))

9:32 ambrosebs: dnolen: is there anything other than the compiler that uses the CLJS analyzer?

9:32 tbaldridge: dnolen: sure. I just wonder if many "optimizations" could be better done at a SSA level.

9:32 ambrosebs: core.async uses it

9:32 ambrosebs: tbaldridge: thx

9:33 tbaldridge: but mostly just to expand macros, so you shouldn't have to worry about too much there.

9:33 ambrosebs: ok

9:33 I meant more the AST itself.

9:33 dnolen: tbaldridge: probably though we do very few optimizations currently in the compiler - nearly everything important happens in function invoke emission.

9:34 ambrosebs: there are the various CLJS based Clojure compiler projects but it's not clear how closely they follow CLJS

9:35 ambrosebs: dnolen: haha not more ASTs!

9:35 dnolen: ambrosebs: but I don't think that should hold us back, the current AST representation is definitely not something to depend on.

9:35 * maleghast tips hat to all in the room...

9:35 ambrosebs: dnolen: no, just a minor headache. I'll get back to it.

9:35 maleghast: Hello all

9:36 Anyone got any good ideas for "pretty" urls in a site driven by Compojure..?

9:36 dnolen: tbaldridge: definitely curious about core.logic over SSA, doing tree based stuff is never fun.

9:37 maleghast: I want to get away from /page/52020403367093c9c830481e (as an example) and would rather it were /contact

9:38 (Internally I still need the URL to equate to "fetch page with id 52020403367093c9c830481e", preferably without simply creating a hard-coded relationship between /contact and the page method and the id I want)

9:38 hugod: is it normal for cljsbuild build auto to use half a core cpu when idling?

9:39 dnolen: hugod: no

9:39 hugod: mm, wonder what's causing it then

9:41 hyPiRion: maleghast: hm, how do get the string/id "52020403367093c9c830481e" to begin with?

9:47 TimMc: maleghast: I think you'd want to treat "contact" as the page ID.

9:47 ambrosebs: dnolen: how do I get the binding name of the Exception bound in a catch from an AST node?

9:47 TimMc: So perhaps /page/contact is really /page/$id

9:48 (or whatever the compojure syntax is)

9:48 maleghast: hyPiRion: It's the _id from the Mongo Record

9:48 dnolen: ambrosebs: pretty sure it the :name field of a try* AST node

9:48 ambrosebs: dnolen: got it thx

9:48 maleghast: TimMc: That might well be a good point, thanks

9:49 TimMc: In fact, that solves it completely for me - I don't know why I didn't think of it before - thanks!

9:50 TimMc: It's how WordPress treats page slugs.

9:50 hyPiRion: TimMc: it's /page/:id afaik

9:50 maleghast: hyPiRion: Yes, it is :-)

9:54 TimMc: maleghast: If you don't want the /page prefix, you may be able to define a /:catchall route at the end and display the relevant page if it exists in the database.

9:54 maleghast: TimMc: That's what I am doing - right now...

9:54 TimMc: your answer made me think, and made me feel a bit silly that I had not seen it for myself.

9:55 TimMc: :-)

9:55 maleghast: TimMc: :-) Appreciate the application of the cluebat ;-)

9:55 hyPiRion: maleghast: that happens to everyone :) I do it all the time.

9:55 hugod: reducing clsbuild's polling to 1s from 100ms gets me down to 10% cpu usage

9:56 ambrosebs: dnolen: is the "catch" local binding name gensym'd somewhere?

9:56 maleghast: hyPiRion: I always reckon I get there x10 faster if I involve someone else's mind

9:57 mdrogalis: Depends on where you want to get to. :)

9:57 ambrosebs: dnolen: I can see it does, but I can't see how/where.

9:57 dnolen: ambrosebs: look at try in the core.clj macro file

9:58 hyPiRion: maleghast: For me, it's more about expressing the problem. If I can explain what the problem is, I usually tend to understand where the problem is/find a way to solve the problem.

9:58 dnolen: ambrosebs: in same dir as analyzer.clj

9:58 ambrosebs: dnolen: got it, easy

10:01 dnolen: what is pmasks in deftype?

10:02 dnolen: ambrosebs: an optimization (which may or may not stay), it's the bitmask of protocols that the type implements

10:03 ambrosebs: dnolen: can I get the body of deftype from anywhere?

10:03 dnolen: IIRC is it in a 'do' block with the deftype*?

10:04 dnolen: ah ok. found it.

10:04 I'm going to have to type check a lot of js*...

10:05 maleghast: hyPiRion TimMc - Thanks for your help; totally nailed it. :-)

10:07 dnolen: ambrosebs: perhaps you can avoid that by analyzing the original form? for the most part js* is an inline optimization that is equivalent to a function call.

10:09 ambrosebs: dnolen: I'd need to copy the analyzer for that right?

10:10 dnolen: ambrosebs: ? the original form in the js* AST node

10:10 "is in"

10:11 ambrosebs: dnolen: really? :form just gives me (js* "(~{} + ~{})" 1 2) for (+ 1 2)

10:12 noncom: are all numbers in clojure boxed?

10:13 nDuff: noncom: not in modern releases, no.

10:13 tbaldridge: noncom: no, but you have to type hint fns

10:14 dnolen: ambrosebs: oh hm

10:14 noncom: ok, i'm doing speed-sensitive calculations for many splines at once and i get a serious performance drop... i will try to optimise with type hints

10:15 nDuff: noncom: enable *warn-on-reflection* to determine where you need them.

10:15 tbaldridge: noncom: also, remember that stuff like map, reduce, etc, are doing allocations to create collections. That can impact performance as well.

10:16 noncom: yeah... but i want to try to port a java spline calculation algo to clojure... so now trying to get same performance

10:16 and i use map and reduce to be idiomatic then

10:17 tbaldridge: noncom: in that case you might want to look at reducers, http://clojure.org/reducers

10:21 noncom: nDuff: hmmm, with warn-on-reflection it found some places, but in 3rd party libs, not in any of my code... so type hints will not do then right?

10:22 tbaldridge: i might be havng like 1000 simultaneous real-time spline calculations, and reducers are said to be based on fork/join so will they work for such a case?

10:22 nDuff: noncom: Depends on the details.

10:22 noncom: or is the best option to fall back to java?

10:23 nDuff: i'll try to type-hint anyway and see what it comes with

10:23 nDuff: noncom: ...re: reducers, yes, I'd certainly expect them to work.

10:24 tbaldridge: noncom: they should be fine, if you store them in a vector they should reduce in large chunks.

10:24 noncom: gonna try then

10:24 Odinodin: Can anyone recommend a validation library for a Ring-app ? (looking at validateur and bouncer atm)

10:24 noncom: how do i type hint a [] of floats?

10:25 tbaldridge: noncom: ^floats

10:25 noncom: i have point coordinates stored like [1.0 2.0 3.0]

10:25 ok

10:25 nDuff: tbaldridge: isn't ^floats an array, not a vector?

10:25 tbaldridge: noncom: there are plural overrides for most primitives in Clojure, so you can say ^object or ^objects, ^byte ^bytes, etc.

10:26 well yeah, if he was typehinting I thought he'd use arrays.

10:26 noncom: oh i see

10:26 so i better use arrays

10:26 nDuff: noncom: yes.

10:26 ambrosebs: dnolen: do the fields of a deftype magically get scoped in a extend-type?

10:26 tbaldridge: actually you can also use vector-of

10:26 http://clojuredocs.org/clojure_core/1.2.0/clojure.core/vector-of

10:26 generates a vector that can only hold :primitive

10:27 noncom: tat would be better, i do not want to handle arrays, since [] syntax is much more concsise

10:27 dnolen: ambrosebs: re: js* wonder if we can special case that to preserve original form ...

10:28 tbaldridge: noncom: I'd start with type hinting the scalar args of your functions, that will probably be the best performance impact right there.

10:28 that and turn on reflection warnings

10:28 dnolen: ambrosebs: if you look at detype/record macros you can see we carry the fields forward

10:29 ambrosebs: dnolen: do I have any hope of picking that up from the macroexpansion?

10:29 noncom: ok

10:30 dnolen: ambrosebs: I'd probably be OK w/ taking a patch for this, perhaps this can be done via meta

10:31 noncom: oh... ^float is not an option.. only ^double is... so i will have to make double->float conversions all over the place to interface with the java lib... hmm

10:31 dnolen: ambrosebs: we attach field metadata to deftype implementation methods, if you look at parse fn* in analyzer.clj you can see we look at meta to get the fields

10:43 silasdavis: what would be the best way to load some data from a file into a data structure to persist in memory across requests when using ring/compojure?

11:05 Fretsejaz: Hello

11:08 tylere: Is there an elegant way, given an integer, to get a seq of the digits of the number?

11:08 arrdem: ,(apply list (pr-str 9001))

11:08 clojurebot: (\9 \0 \0 \1)

11:09 * arrdem ponders

11:09 tylere: Yea, I need (9 0 0 1) not (\9 \0 \0 \1) though

11:09 My first attempt was along those lines

11:11 hyPiRion: ,(loop [m 9001 acc ()] (if (zero? m) acc (recur (quot m 10) (conj acc (rem m 10)))))

11:11 clojurebot: (9 0 0 1)

11:11 gtrak: negatives?

11:11 ,(loop [m -9001 acc ()] (if (zero? m) acc (recur (quot m 10) (conj acc (rem m 10)))))

11:11 clojurebot: (-9 0 0 -1)

11:12 gtrak: ,(apply list (pr-str -9001))

11:12 hyPiRion: gtrak: Math/abs then

11:12 clojurebot: (\- \9 \0 \0 \1)

11:12 tylere: (map (comp read-string str) (seq (str num))) works

11:12 but that makes me vaguely ill

11:13 hyPiRion: you'd only want the digits of the number, so the prepended minus isn't needed.

11:13 arrdem: hum... how to force integer division?

11:13 gtrak: int cast both the args?

11:13 chwals: is there some way to forcibly delete stuff in paredit? i have a mess of unbalanced paren's and square brackets i can't get rid of

11:15 gtrak: chwals: mark and C-w

11:16 chwals: thanks

11:21 Fretsejaz: Does anyone here use Clojure professionally?

11:22 mgaare: yes

11:22 egghead: :)

11:23 binski: Yes, ClojureCLR

11:23 nDuff: Fretsejaz: Depends on the context, somewhat.

11:23 * nDuff has Clojure code in production, but his employer isn't welcoming more of it until more we have more developers who know the language on-staff.

11:24 tylere: nDuff: You aren't in NC by any chance are you?

11:25 nDuff: tylere: Not at all; austin.tx.us

11:25 tylere: heh, a little out of my range then

11:25 arrdem: nDuff: w00t atx

11:25 noncom: Fretsejaz: I'm trying to...

11:26 actually, pretty successful, although there is much to learn and always a need for help and advice from the community

11:26 i know that some "serious" companies use clojure as well... line banks, media and stuff.. although i can give no detail on this

11:27 Fretsejaz: Neat, I'm in a .net shop and have been starting to learn Clojure. I doubt they'd be too open to having clojure code in production though

11:27 noncom: (nth) is pretty slow, what are alternatives to using it when i need to pick an element from a big collection and i have the index of the element that i need?

11:29 Fretsejaz: i heard that one of the typical ways of clojure getting into production is like "can i use this tiny library to significantly improve concurrency/threading/data-processing (or smth else)" ?

11:29 mgaare: noncom: what kind of collection? if it's a vector then it should be very fast

11:30 gtrak: Fretsejaz, noncom: testing too

11:31 'the grinder' now supports clojure

11:31 noncom: yeah, actualy just about anything (except for the frontend maybe)

11:31 gtrak: and you could make a case for unit/integration tests with few implications on the real codebase

11:31 jtoy: i have a weird error I have never seen before, I have my app_config loaded with this: https://www.refheap.com/ , when i do lein repl it works and I see data, when I run from cron liek so it doesnt work: 'cd ~/project && lein trampoline run -m jtoy.jobs/run'

11:31 Fretsejaz: Biggest issue would be getting people to read it. Engineers around here don't seem too keen on adding new languages

11:32 jtoy: this was working for me bfore, all I did was move the app_config definition to its own ns

11:32 why would this work with lein repl but not lein trampoline?

11:32 noncom: mgaare: vector, yes.. takes around 0.081157 msecs.. i think it can't get any faster..

11:33 Fretsejas: you can try introducing it s

11:33 *slowly

11:33 for example, try first using it as a scripting language

11:33 for small tasks

11:34 Fretsejaz: Noncom: I'd have to learn it more, I'm a total novice at the moment. Thinking of doing Project Euler with it

11:34 noncom: yeah, probably euler is cool. don't forget to also have some "real" personal project with it

11:34 boosts learning well

11:34 gtrak: I would use it where I'd use python/perl in the past. I was doing a large refactoring of a code-base and I needed to keep track of operations, classpaths, file hashes, and generate reports. I tried doing it in python, but I started throwing up after an hour.

11:35 tylere: I'd recommend Rosalind over Euler: http://rosalind.info/problems/locations/

11:35 jtoy: when I say doesnt work, I mean the app_config comes up as nil causing my app to die

11:35 tylere: Real problems grounded in actual science rather than a bunch of problems that often are basically "find the trick in the math"

11:35 Fretsejaz: Well I want to make my own SQL formater since I'm dissatisfied with the ones I've found.

11:35 tylere: rather than being actual implementation challenges

11:35 gtrak: Fretsejaz: actually, another dev wrote a verification script in perl, I ported it over to clojure for my work. He writes clojure now :-).

11:36 noncom: jtoy: the refheap link is not for a codepiece..

11:36 gtrak: since I didn't know perl.

11:36 i learned enough to port the script over.

11:37 Fretsejaz: Tylere: I've wanted to do project Euler for a while as a personal goal, but this looks interesting as well! Why not both.

11:38 gtrak: Fretsejaz: he was a much more senior and grouchy dev than me, and seeing his code translated might have shown some value.

11:39 jtoy: noncom: yeah, oops, https://www.refheap.com/17396 , its not the code though, it seems like a lein issue,

11:39 Fretsejaz: gtrak: We don't automate much around here, though that's being turned around. It's... an odd situation small/mid sized company

11:39 noncom: ,(first nil)

11:39 clojurebot: nil

11:40 gtrak: the script for that task was a one-time thing, it was easier to do it that way than use a spreadsheet

11:40 noncom: jtoy: so your with-open returns nill

11:40 gtrak: running svn commands, organizing everything, and generating hiccup html in one script I think was pretty cool.

11:40 jtoy: noncom: how would I debug this? I see it working in lein repl where I can test it, in lein trampolie i see it print nil

11:40 Fretsejaz: gotcha, well I'd still have to learn clojure, I'm just starting

11:41 noncom: jtoy: well, personally my stile is to println everything so that i know where it dies and what are the values there. also there might be a fie-reading exception, so a try-catch could do

11:41 jtoy: and this was working before, the only change i made was move the app_config function to its ow namespace

11:42 noncom: jtoy: first see if it actually sees the file

11:42 "creds.json"

11:43 jtoy: or check the (count) of read lines if the file is accessible... just do it step-by-step...

11:43 checking the things as they go

11:43 and eventually you'll step on it

11:43 bbloom: tbaldridge: datalog over ssa blocks sounds like a cool idea :-)

11:44 tbaldridge: it is: https://github.com/halgari/mjolnir/blob/master/src/mjolnir/ssa_rules.clj :-)

11:44 SSA level type inference in Datomic datalog ^^

11:45 bbloom: awesome.

11:45 jtoy: noncom: thx #<IllegalStateException java.lang.IllegalStateException: Attempting to call unbound fn: #'cheshire.core/parse-string>

11:46 noncom: jtoy: yep, we're all like descended on the planet where alien bugs are abundant, so we're like in the movie, the star descent or whatever it was called, great movie

11:47 jtoy: what?

11:47 clojurebot: what is exceptions

11:47 noncom: ah, nevermind :) just my imagination

11:47 jtoy: im still not sure why it works in lein repl and not in lein trampoline though

11:48 noncom: jtoy: can't help, never used trampoline.. but likely there is some difference in ns handling...

11:48 gtrak: Fretsejaz: adoption can work top-down or bottom-up :-) bottom-up is more likely to actually work, but takes persistence.

11:49 Fretsejaz: gtrak: True, but I am also not planning on staying too long =\

11:50 bbloom: tbaldridge: how has your experience been with the ssa/datalog combo? experimental at this point? or like one of those obviously mind blowing good ideas? or what?

11:50 Fretsejaz: been here 2.5 years, and will be here for maybe another year or two, but then I'm moving out of state, don't like the area

11:51 gtrak: yea.. stuff like that is on the order of years, but maybe you can convince one or two guys to look at it.

11:51 Fretsejaz: maybe, we'll see. I'll have to actually know what I'm doing with it first! I'm one of the younger engineers

11:52 tbaldridge: bbloom: mostly good. Datomic is mostly designed for queries that are run multiple times. Once the JIT kicks in the performance is good. Until then the performance was okay-ish. That would be my concern for using it in a real compiler. I'ts not uncommon to see a 100x slowdown until the jit warms up the query

11:52 bbloom: tbaldridge: is that just an artifact of datomic's datalog engine? in theory a different storage engine with a different indexing model may prefer a different query strategy for the same queries. no?

11:53 tbaldridge: So a compiler that watches a directory would do pretty well, but I'm not convinced a commandline based compiler wouldn't suffer performance issues.

11:53 This is all in-memory DB

11:53 bbloom: ok

11:53 tbaldridge: i've got this theory that a dramatic slowdown for a compiler is A-OK if you can reasonably do extremely incremental builds with confidence

11:53 tbaldridge: the first hit of a query requires the datalog engine to create a query plan. After that the query is hashed and cached, and the plan is reused later on

11:54 bbloom: interesting

11:54 noncom: Fretsejaz: sometimes old engineers may take changes very steadely.. just be ready and know your goal

11:54 bbloom: tbaldridge: i mean when you think about it, generally only very small changes occur at a time

11:54 tbaldridge: bbloom: it would be cool to try a compiler where each module is cached in some sort of database, so only new modules need to be inferred

11:54 bbloom: right

11:54 bbloom: tbaldridge: and if you have truly controlled inputs/environment, you can share partially compiled data too

11:54 noncom: but if they're no movers, then at least you know you have your benifit

11:55 mgaare: Fretsejaz: my advice is to forget about your current organization. In the year that you stay there, contribute to clojure open source projects or start one of your own. Then you can use that to get a job somewhere that already accepts clojure.

11:55 bbloom: tbaldridge: i started doing an attribute grammar system w/ memoization, dependency tracking, etc, but got only far enough to say "yeah, this will probably work, but i don't need it right now"

11:55 tbaldridge: bbloom: but yeah, the idea of using logic programming to write optimization/inference passes is mind blowing

11:55 Fretsejaz: nomcom, gtrack: Thank you for the advice. once I get more knowledgeable about the language I might start trying using more at work.

11:56 tbaldridge: bbloom: have you looked into Ometa2 at all?

11:56 bbloom: didn't realize there was a #2

11:56 i'm not a PEG believer though :-)

11:56 Fretsejaz: mgaare: I'm embarrassed to say this, but I've actually never contributed to open source (still a new engineer, technically don't have my degree yet)

11:56 bbloom: tbaldridge: is there a major difference/discovery since v1?

11:56 tbaldridge: yeah, I understand that. But the idea of expressing a compiler as parser->output->parser->output is powerful. That's where some of my experimentation is these days

11:57 bbloom: tbaldridge: yeah, i'm a huuuge believer in that approach

11:57 tbaldridge: bbloom: no, it's mostly a condensing of the spec.

11:57 bbloom: explicit staging & multi-level translations == good idea

11:57 ToxicFrog: Fretsejaz: it's only a matter of time until you feel a patch coming on :)

11:57 mgaare: Fretsejaz: One thing that's true about every person who's ever contributed to open source, even the famous people who are leaders of prominent projects, is that at one point they were not open source contributors ;)

11:58 tbaldridge: bbloom: I mean, there's a reason Ocaml is known for writing good compilers, the pattern matching is top-notch

11:58 Fretsejaz: My plan is to move to Seattle to be honest. I'm currently in Florida and don't like it here, but in state tuition is hard to beat

11:58 bbloom: tbaldridge: yup. there is also MetaOCaml from Oleg et al

11:59 which ensures type correctness of the code generator AND the generated code

11:59 futile: Using instaparse sounds like the perfect way to build up a partial AST that's perfect for doing syntax highlighting.

11:59 Right?

11:59 tbaldridge: bbloom: nice

11:59 bbloom: tbaldridge: but i agree with Rich about pattern matching: I don't like the ordered choice aspect

11:59 tbaldridge: i prefer what generalized CFG grammar systems do (like instaparse) where they return ambiguous results like a logic engine would

12:00 tbaldridge: was just talking about this yesterday w/ kovas :-)

12:00 tbaldridge: bbloom: right, it's a trade-off, Ometa makes the choice of simplifying the semantics of the pattern matching by always trying patterns in-order.

12:00 bbloom: just like you do case analysis when the compiler says "hey, you didn't handle all of the enum values" you can do "ambiguity analysis" where the compiler says "when you compose these two sets of structures, you have ambiguity"

12:01 tbaldridge: interesting

12:01 bbloom: tbaldridge: my problem with the "simplifying" approach is that you still have to worry about things like left recursion & exploding parse tables and other things that you can't really hide

12:02 tbaldridge: bbloom: from what I was reading in the Ometa docs, I thought they solved that via in-order parsing. Did I miss something?

12:03 bbloom: tbaldridge: yeah, that's precisely what they do. they punt on the ambiguity problem by subsetting CFGs to be PEGs

12:03 but the same thing applies in many situations

12:03 like the multimethod shape intersection example: is it [:rectangle :circle] or is it [:circle :rectangle] ?

12:04 in theory there are a few resolutions: lexical order, code order, logic variables, explicit preferences, random or otherwise non-deterministic choice, etc

12:05 tbaldridge: I see

12:07 bbloom: parsing and predicate dispatch have *a lot* in common

12:07 hell, parsing has a lot in common with a lot of things! hence the wide applicability of ometa for the viewpoints work

12:07 tbaldridge: right

12:09 egghead: hmm

12:09 unbound buffers are kind of strange

12:09 tbaldridge: egghead: unbound buffers are evil

12:10 egghead: I'm just trying to wrap my head around the semantics of >! in unbound vs buffered

12:10 the way you can >!! into an buffered chan and it works like put!

12:10 but >!! into an unbound chan and it works like a sort of rendevouz

12:11 I thought >!/>!! <!/<!! always had a sort of 'receipt' guarantee

12:12 and put! and take! were the async/no guarantee versions

12:13 for instance I thought it was true that: (do (>!! ANY-CHAN :message) (assume-produced-message-was-consumed))

12:16 but it seems that's only true for channels with unbound buffers?

12:17 and in a buffered chan there is no difference there between using >!! and put! ?

12:18 bbloom: egghead: no, put! will schedule a callback

12:18 it's an async send

12:18 the queue of callbacks to run is effectively an unbounded queue

12:18 unbounded buffer, i mean

12:18 technically it's bounded, but it's a global bound, not per channel

12:19 egghead: so there is no 'ack' besides what the consomer produces over another channel?

12:19 s/consomer/consumer

12:20 xeqi: is there a way to profile clojurescript?

12:21 dnolen: xeqi: browser profilers are pretty good, I suggest compiling w/ whitespace optimizations w/ :static-fns true

12:21 xeqi: this will probably get easier for testing advanced compiled code when we get accurate source maps

12:21 s/testing/profiling

12:22 egghead: interesting, the 'rendevouz' only exists in unbound buffers

12:23 bbloom: given you don't use a callback to put! and just say (put! in-buffered-chan :message) what is the practical difference for the user between that and >!

12:24 xeqi: dnolen: ah yes, this works much better then when I forgot to turn off :advanced

12:24 thanks

12:24 egghead: even though the internal mechnism might be different, for a user of core.async the semantics are the same, aren't they?

12:25 dnolen: egghead: not the same, put! is async, and >! will block

12:25 egghead: even in CLJS

12:26 egghead: dnolen: (let [c (chan 10)] (go (>! c :message) (println "Message sent but not received)))

12:26 dnolen: (let [c (chan)] (go (>! c :message) (println "Message received by consumer")))

12:27 against the buffered it doesn't block, but against the unbound buffer it does block

12:27 dnolen: egghead: still not the same, if the buffer is filled it will block

12:27 egghead: or 'park' as it were

12:27 dnolen: with the standard buffer

12:28 egghead: is (chan) the same as (chan 0) ?

12:28 dnolen: egghead: the semantics of >! is rendevous regardless of the size of the buffer, put! will never block

12:29 egghead: but rendevouz with the buffer instead of a consumer

12:29 ddellacosta: I'm confused, you can use swap! with dynamic vars? I thought set! was the way to change their value, and swap!/reset! were for atoms?

12:29 egghead: right?

12:29 clojurebot: Equal Rights for Functional Objects is Baker's paper on equality and why it's impossible to define sensible equality in the presence of mutable data structures: http://www.pipeline.com/~hbaker1/ObjectIdentity.html

12:29 egghead: with no buffer/unbound buffer you rendevouz with the process receiving the message and with a buffer you rendevouz with the buffer

12:30 dnolen: egghead: don't mix up what >! <! means w/ the utility of picking a buffering strategy

12:30 ddellacosta: ping Raynes

12:30 egghead: ddellacosta: I don't think you're supposed to change dynamic vars, just rebind them :p

12:31 ~dynamically bind~ them

12:31 clojurebot: https://www.refheap.com/

12:31 ddellacosta: egghead: yeah, I mean, I'm read the source for lib-noir's session now and I'm really confused

12:31 reading

12:31 egghead: dnolen: is it correct to think of the rendevouz as happening with the buffer?

12:32 dnolen: egghead: I wouldn't think of it that way

12:32 ddellacosta: oh, I see, it's binding it *to* an atom. wacky.

12:33 dnolen: egghead: but bbloom or tbaldridge may have better explanations

12:33 egghead: what is the rendevouz in the scenario where >! "appears" async because it gets picked up by the buffer

12:34 dnolen: egghead: what I'm trying to say is you often write >! chan, and you absolutely have no idea what buffer strategy chan is using

12:34 noncom: what is the current state of clojure.reducers library?

12:34 complete?

12:36 dnolen: noncom: could probably fleshed out more, but the essentials are there for it to be useful

12:38 egghead: dnolen: so I probably shouldn't be using writes as part of control flow since there is no guarantee a consumer received the message? :p

12:39 dnolen: egghead: I think your mental model just needs some adjusting, if you can move past >! something happened, what doesn't really matter

12:39 egghead: for instance, the way it is common to have a read-loop/recur, it seems like itd be very dangerous to invert that and have a write-loop/recur

12:40 dnolen: egghead: I don't know why you assume that

12:40 egghead: dnolen: the dangerous assumption would be that the written message was received by somebody somewhere

12:40 but with a read you know you received the message

12:41 >! seems more like 'make this available for use some time between now and never'

12:42 bbloom: egghead: you just need to think about it as a simplification of a distributed system

12:43 egghead: in a truly distributed system, you need acks and what not to ensure your message got there

12:43 there are time outs & retries and lots of stuff b/c your network is unreliable

12:43 if you have an unbuffered channel, then the message was reliably received. if you have a buffered channel or put! or you (go (>! …)) (which is basically equiv to async put!) then your message might just get dropped on the floor if nobody is reading from that channel's buffer

12:44 b/c you have a local system, not a distributed one, you can control what processes talk to what channels, and so you have control over the promises the runtime makes to you

12:44 if you're writing library code that accepts random channels from whoever, then you need to treat that channel like a dumb pipe

12:44 egghead: but it seems safer to assume that >! *does* drop the message on the floor unless you created the channel in your local process

12:45 for all you know you could be writing to a channel with a full dropping buffer

12:45 bbloom: if it's an internal function and you give it the buffer yourself, then you know lots of things you can't know in general purpose library code

12:46 that's part of the interface of your code

12:46 it's no different than saying "i want a map" vs "i want a map with these keys in it"

12:46 egghead: right, so I guess it's kind of a la carte

12:47 bbloom: that's sort of the best feature of local CSP: you get this sliding scale of guarantees that you can't get w/ truly distributed models, like erlang's "cast"

12:47 egghead: I think my mistake is thinking of the rendevouz bit as ack

12:47 bbloom: egghead: yeah, it's not an ack, it's more like the "yield" keyword in ruby or python

12:48 in fact, the state machines that core.async creates are a special (lexical, not dynamic extent) case of yield, which is a stylized use of full on continuations. so saying send/receive is more or less equiv to yield is actually provably true for more complete implementations

12:49 egghead: hmm

12:50 timvisher: cemerick ping

12:50 egghead: I think like tbaldridge has said over and over I shouldn't use unbound buffers

12:50 cemerick: timvisher: pong

12:50 egghead: since all you gain is uncertainty about the channels behavior

12:50 timvisher: j0. thanks for getting back to me about the use case.

12:50 bbloom: egghead: yes. do not use unbounded buffers :-)

12:50 timvisher: did you happen to see my messages earlier?

12:50 egghead: well, at least now I finally understand *why*

12:50 thanks bbloom :)

12:50 cemerick: timvisher: here, today? No.

12:50 timvisher: yesterday.

12:50 cemerick: timvisher: ah, no

12:51 timvisher: the basic use case is that i have a plain old html file

12:51 cemerick: feel free to point to a log

12:51 timvisher: so templating in a dynamic port doesn't really work for me

12:51 bbloom: egghead: generally, you should use UNBUFFERED unless you have a reasonable idea of how large to set the buffer

12:52 cemerick: timvisher: your app is public, right?

12:52 mdrogalis: It feels wrong to have more than one Leiningen project per Git repo. Does anyone have strong reasons for one way or the other?

12:52 tbaldridge: egghead: and if you need non-blocking put, then consider sliding/dropping buffers

12:52 timvisher: i understand that for most people they're going to be serving through ring or summat so they can put in the call to the script markup function (forget what it's called atm) but for me the regeneration of the index.html file would get tedious unless i put some tooling around it (which wouldn't be impossible)

12:52 technomancy: mdrogalis: lein's own repo has three projects in it =)

12:52 timvisher: yep, it's public

12:52 cemerick: timvisher: link?

12:53 mdrogalis: technomancy: Heh, I guess yeah. Something about it still feels funny.

12:53 I think I just never liked that set up for projects, regardless of platform

12:53 timvisher: /msg NickServ SETPASS timvisher fsnphweitxed <password>


12:53 dernit!

12:53 https://github.com/timvisher/bible-plan

12:53 there we go! ;)

12:53 cemerick: thanks

12:53 maharj: oops :)

12:53 futile: oh hi tim, saw you on the M.L.

12:53 cemerick: classic

12:53 timvisher: :)

12:53 bbloom: tbaldridge: ignoring obvious cases like semaphore simulation. any advice on choosing buffer sizes? for my fipp branch, i found that approximately the internal max buffer size for the measure/print coroutines was about right

12:54 timvisher: hi futile, on what subject?

12:54 bbloom: tbaldridge: turns out that's == to max-width of your terminal :-)

12:54 egghead: bbloom: what is the difference between an unbuffered channel and a channel with an unbound buffer

12:54 futile: timvisher: are you the one who had a christian email signature?

12:54 egghead: (chan) vs (chan (buffer)) ?

12:54 timvisher: futile: in general that'd be me ^_^

12:54 on most tech mailing lists for that matter lol

12:54 futile: timvisher: neat. glad to see another christian programmer around.

12:54 tbaldridge: bbloom: no, I don't I normally consider the use cases of the channel and do number of gos/threads as the buffer size

12:55 bbloom: egghead: the buffer function has an arity of 1. (buffer) is invalid

12:55 timvisher: futile: awesome! great to see one too ;)

12:55 egghead: welp

12:55 (chan 0) seems to behave just like (chan)

12:56 timvisher: cemerick: so far this is working out perfectly for me with a stable port: https://github.com/timvisher/bible-plan/blob/master/src/cljs/piggieback_browser.cljs

12:56 futile: timvisher: still waiting to see another catholic programmer, but i dont think that day will ever come

12:56 timvisher: lol

12:56 futile: :)

12:56 bbloom: egghead: that would be my expectation, however, i suspect that (chan 0) is an uninteresting edge case

12:56 timvisher: can't help you there but if I meet one I'll be sure to send them your way!

12:56 bbloom: (chan 0) is basically just slower (chan) :-P

12:56 cemerick: timvisher, futile: you guys are hardly alone; there's a fairly silent population

12:56 bbloom: "allocate me a buffer object that i won't use please"

12:57 futile: timvisher: thx :)

12:57 cemerick: timvisher: right, and that's using the classic browser-REPL

12:57 timvisher: cemerick: to be sure. it just tends to be hard to get them to come out of the woodwork

12:57 cemerick: yep.

12:57 futile: cemerick: well if i dont know they are, they're as good as not to me, for all intents and purposes.

12:57 :P

12:57 (i mean socially speaking)

12:58 timvisher: so i had austin set up briefly but when i got to the point where i realized that i would have to update the port everytime i started the browser repl that's what turned me off

12:58 cemerick: timvisher: so, you were trying to have austin's HTTP server serve the static HTML, as the classic browser-REPL did?

12:58 timvisher: the helper function is actually quite nice and in a dynamic site it'd be a no-brainer, but i already had the brower-repl mostly working and austin introduced another layer of complexity with the need for templating

12:58 atyz: does anyone know why rings response created doesn't return a body?

12:59 tbaldridge: egghead: yeah, (chan 0) should never be used

12:59 timvisher: hmm. now i'm wishing i'd committed where i'd gotten to.

12:59 futile: I'm going back and forth between writing a compiler in C or Clojure. What do you guys think?

12:59 TimMc: futile: Do you know if the current pope has weighed in on emacs vs. vim? :-P

12:59 justin_smith: atyz: for what request and handler?

12:59 atyz: https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/util/response.clj

12:59 futile: TimMc: I think he's holding out for something more modern

13:00 bbloom: TimMc: i heard he uses butterflies

13:00 futile: TimMc: you know how we're all about modernity

13:00 bbloom: oh man i like your joke better

13:00 atyz: justin_smith: the created function

13:00 TimMc: haha

13:00 futile: lets go with bbloom's joke, its pretty relevant

13:00 cemerick: timvisher: as background, you can set Austin's server's port number, and fix the session id that is used. See https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L28 and :session-id option of https://github.com/cemerick/austin/blob/master/src/clj/cemerick/austin.clj#L356

13:00 TimMc: (Not to be confused with tpope, who is pretty clearly a vim user.)

13:01 tbaldridge: futile: depends on the language

13:01 futile: tbaldridge: let's say it's a lot like Clojure ;)

13:01 justin_smith: atyz: well, specs seem to say its response SHOULD include a list of resource characteristics and locations and MUST create the resource

13:02 so technically I guess it is OK? isn't this something you would probably augment with a handler middleware anyway?

13:02 timvisher: cemerick: i did notice that, but doesn't that negate one of the best things about austin which is it's ability to easily set up multiple browser repls for a project/many projects?

13:02 or am i missing something about that?

13:02 justin_smith: atyz: ie. you supply the code that implements what "creation" actually means and agment the response to add a body as apropriate

13:03 tbaldridge: futile: IMO, compilers in C quickly end up very ugly. I'd either write something in C++ and LLVM if it was simple enough, or stick with clojure.

13:03 futile: the GC, data structures and dynamic typing of Clojure are really nice to have

13:03 atyz: justin_smith: to me this seems just as correct: https://www.refheap.com/17399

13:03 cemerick: timvisher: You can readily create multiple repl-envs with different session-ids.

13:04 justin_smith: atyz: wait, it is putting "Location" in the headers, that is what the specs ask for right?

13:04 or at least it seems to provide what the specs ask for

13:05 atyz: justin_smith: yes. But the way it is currently implemented prevents you from having a body

13:05 cemerick: timvisher: But, you're right that, without templating (or _some_ way of dynamically obtaining the desired repl-env to be connected to), you're always going to be jumping back and forth between the REPL and whatever HTML file you're loading up.

13:05 futile: tbaldridge: Wow. After 5 years of abandoning C++, I have not once seriously considered using C++ for anything until just now.

13:05 justin_smith: can't you have a handler that modifies that map after ring creates it? I don't mess with that part of my app TOO often, but I recall being able to do things like that with ring

13:06 futile: tbaldridge: also are you suggesting I implement those in my language, is that why you bring up the GC, data structures and dynamic typing?

13:06 justin_smith: ie. check for a 201 status, fill in details, add a body tag

13:06 atyz: justin_smith: i could totally do that. I'm wondering if there was a reason ring *prevented* me from giving a 201 a body

13:06 As I didn't see anything in the http specs saying it shouldn't have a body

13:06 timvisher: ah. interesting. ok, i'll try to dig into it again. knee jerk it didn't seem like it was configurable in that way. i think i saw the comment in the Changelog section of the README that talks about :port not being supported anymore and just assumed that i couldn't get a stable port and session-id

13:06 tbaldridge: futile: no, I'm just saying that if I were going to write a LISP compiler, the first thing I would need to do is write a reader. Would you want to write that in C or Clojure

13:07 justin_smith: atyz: that part I don't know, and probably there is not a nice answer for

13:07 futile: tbaldridge: ooh I see. Yeah I don't know.

13:07 justin_smith: maybe it's a bug?

13:07 futile: tbaldridge: I like Clojure's data structures but I also like the simplicity of C not having a JVM.

13:07 tbaldridge: Clojure would be my first choice, but it all depends on what your target platform is. LLVM's C++ support is amazing It's C++, but it's super well designed c++

13:07 atyz: I don't know, I had to write some middleware for it.So I'm probably going to patch it and see what he says

13:07 At worst he will give me the reason why it shouldn't return a body

13:08 I was just asking to make sure I wasn't missing something

13:08 justin_smith: we could both be missing something :) sorry I couldn't help more

13:10 timvisher: you know that time when you were eating a sammich and you realized that you forgot the hummus. worthless.

13:13 cemerick: timvisher: the problem with :port was that it was on the repl-env fn, when there needs to be a 1:N relationship between HTTP server : REPL environments

13:14 timvisher: If you do make it work, I'd love to have a mini-writeup in the Austin README of the setup needed for those working with static HTML pages, etc. :-)

13:14 timvisher: and, if you don't make it work, let me know, and we'll figure it out

13:14 timvisher: sure thing. :)

13:14 and really, thank you so much for your work on all this. piggieback is lightyears ahead of where i started with this stuff

13:15 and austin seems like it would be another big step forward

13:15 so i'm very excited :)

13:15 noncom: i have just got some result on speed tests that surprised me

13:16 if i call an fn from a different ns, passing to it something from a different ns, it takes +0.1ms to complete!

13:17 is this an expected penalty for name resolution?

13:17 tbaldridge: noncom: are you sure the JIT is warmed up?

13:17 noncom: well, i run like 20 tests, until indications settle on something

13:17 llasram: noncom: I heavily recommend using https://github.com/hugoduncan/criterium especially for timing differences that small

13:17 tbaldridge: can you give us a copy/paste of the code in question?

13:17 technomancy: noncom: unless you use resolve, resolution happens at compile time

13:18 or eval or something batty

13:18 kmicu: batty!

13:18 noncom: probably that's because i'm doing tests from the repl then?

13:19 tbaldridge: also, lein screws with the JIT quite a bit....

13:19 llasram: noncom: Without the code and more context, it's pretty difficult for anyone to say :-)

13:19 noncom: just a sec, i'm preparing

13:20 tbaldridge: noncom: if you add something like this to your project.clj file, it'll stop lien from disabling a ton of optimizations: :jvm-opts ^:replace []

13:20 at the cost of extra compilation time

13:22 arrdem: how would you guys structure a message handler system that has to deal with restarting messages?

13:24 I'm trying to come up with a structure which would let handlers "catch" the current message (stop propigation of the current one and send a new messsage) without having a global state of registered handlers.

13:25 noncom: here: https://www.refheap.com/17401

13:25 please notice the commentaries below the actual code

13:28 there is math stuff on calculating splines, I think you can disregard the equations since they don't seem to play the role..

13:28 stuartsierra: noncom: Timing single function calls on the JVM is almost meaningless.

13:30 noncom: stuartsierra: well, it is very real that the increase of +0.10ms in this case accumulates into a huge lag with 10000 splines. and the repeatability of the measurement assures it is not meaningless

13:30 maybe fighting it is meaningless though.... thus i'm asking if i missed something

13:31 tbaldridge: you're going to notice a better perf boost by worrying about the following

13:31 a) turn catmull-rom into a protocol/deftype

13:31 b) typehint point so that the values are unboxed

13:32 c) don't use reduce, as it performs at least one allocation per step

13:32 those three should make a pretty big difference

13:33 stuartsierra: And run a profiler.

13:33 noncom: wow, interesting. so i will try this. however, could you explain more on "typehint point" - where exactly do i place typehints?

13:34 stuartsierra: please suggest a good $$$-free one for clojure.. on Java I used to use VisualVM, but it is not so good for Clojure

13:35 tbaldridge: noncom: looking at it now, it doesn't matter for most of the args, so perhaps don't worry about that. Do the other two things, then profile and look out for boxing

13:36 stuartsierra: noncom: VisualVM works fine.

13:36 You get used to interpreting the stacks.

13:36 sritchie: anyone here using core.typed?

13:37 I was just curious about support for type parameters, like a List[T]

13:37 noncom: thank you, i have recorded your instructions, i have to go now, gonna try out some time later today and see what comes with it!

13:41 jweiss: if I want to write :^blue (my-macro "arg1") and have it return a value with the metadata {:blue true} can i capture that? i am guessing in the &form param?

13:43 nevermind, easy enoough to try at the repl. works

13:44 hacky perhaps, but easier to write than (with-meta (my-macro "arg1" {:blue true}))

13:44 oops (with-meta (my-macro "arg1") {:blue true})

13:45 futile: jweiss: not that much easier, and perhaps not clearer.

13:47 jweiss: futile: yeah, but in my case i feel the ease wins because of the number of times we'll have to write this construct

13:47 dnolen: sritchie: might want to ask on the core.typed lisp too, but I'm pretty sure you can do that.

13:47 futile: jweiss: sounds like maybe a list is in order

13:47 or vector

13:47 sritchie: dnolen: I just tracked down the (Seqable a) example

13:47 which is exactly what I want

13:47 dnolen: s/lisp/mailing list

13:47 sritchie: dnolen: lisp on the brain

13:49 jweiss: futile: yeah, actually that probably is better. could probably just make a fn take a 2nd arg (a keyword) and add {kw true} as meta

13:49 since in my use case there will be at most one flag in the meta

13:49 fowlslegs: I'm having problems passing a function as a string to the reader macro.

13:49 ,(re-seq #"<" "(fn [x y] (< (count x) (count y))")

13:49 clojurebot: ("<")

13:50 fowlslegs: ,(#(re-seq #"<" "%") (fn [x y] (< (count x) (count y))))

13:50 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox$eval57$fn>

13:50 fowlslegs: Would anyone be so kind as to show me what I'm doing wrong?

13:50 jweiss: fowlslegs: there's just a regex reader macro there

13:50 not sure what you are trying to do

13:51 TimMc: What you're trying to do is probably impossible, at least in the proximate step. What is your larger goal?

13:52 fowlslegs: Trying to make a reader macro form that takes an anonymous fxn as it's argument and evaluates whether it contains a symbol or not.

13:52 TimMc: s/proximate step/proximal sense/

13:52 jweiss: you mean an anonymous function form?

13:53 fowlslegs: jweiss: I suppose.

13:53 TimMc: It's for a 4clojure.com problem, but I want to avoid direct help or other suggestions of how to solve it.

13:54 jweiss: ,(read-string "#(foo %)")

13:54 clojurebot: (fn* [p1__91#] (foo p1__91#))

13:54 jweiss: fowlslegs: so you can see that by the time that string comes back from the reader it's (fn* ...)

13:55 then given that assumption you can look for symbols after the first item

13:55 or i suppose after the 2nd item

13:56 fowlslegs: ,(read-string '#(+ % %2))

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

13:56 fowlslegs: ,(read-string "'#(+ % %2)")

13:56 clojurebot: (quote (fn* [p1__150# p2__151#] (+ p1__150# p2__151#)))

13:56 jweiss: fowlslegs: you don't need to quote since you're only reading, not eval'ing

13:57 quote just protects data from eval, not read

13:59 fowlslegs: So when I have a form like (#(read-string %) (fn [x y] (+ x y))) will the fn form always be evaluated no matter what I put before or after the % symbol?

14:04 technomancy: fowlslegs: yeah

14:04 jweiss: fowlslegs: yes. read-string takes a string

14:05 but even if you pass in a form, if it's going to a function it gets evaluated before the fucntion is called. so it'll be a function object, not the list form

14:05 the only way to get at the original form is if you're passing it to a macro.

14:06 fowlslegs: if you're trying to just find out if a list contains a symbol, that will not involve any macros at all

14:06 reader or otherwise.

14:07 TimMc: fowlslegs: Which 4clojure problem is this, out of curiosity?

14:07 I won't spoil it.

14:08 fowlslegs: 166

14:09 jweiss: How can I do it instead?

14:09 TimMc: Well, I think it's safe to say you shouldn't be mucking about with the reader or eval for this one.

14:10 jweiss: ,(some symbol? (flatten [1 2 3 '(foo "hello" (bar 1))]))

14:10 clojurebot: true

14:10 jweiss: that's if you don't care where the symbol is.

14:17 fowlslegs: Arg I really don't like this problem.

14:21 bbloom: fowlslegs: you definitely don't need read-string or need to analyze symbols to do that problem maybe you should try another approach

14:21 TimMc: fowlslegs: It's a math problem, not a data structures problem.

14:22 timvisher: cemerick: looks like i'm no go again. 0.1.0's start-server is wildly different than 0.1.1-SNAPSHOT's and doesn't seem to support any sort of configuration.

14:22 Of course i could just go ahead and install 0.1.1-SNAPSHOT locally

14:22 meh, i'll give that a shot

14:25 cemerick: timvisher: it's available in clojars

14:25 sorry, should have pointed out that it was on master only :-/

14:28 fowlslegs: Got it.

14:28 Qerub: (keyword 'foo) => :foo, but (symbol :foo) => ClassCastException. Anyone else thinks it would be nice if the second one also worked?

14:29 fowlslegs: I misread the last test.

14:29 justin_smith: Qerub: ,(-> :foo name symbol)

14:30 fowlslegs: Basically thought that I would have to see whether the fxn was using the < or greater than operand because the logic of the last example was reversed, but then I realized it was a "logical double-negative"... whatever that means.

14:31 TimMc: Yep. :-)

14:31 fowlslegs: Nothing really, but I lack the vocabularly to accurate describe the source of my misunderstanding.

14:31 accurately*

14:33 timvisher: cemerick: lol. no problem. i should've checked clojars as well anyway. :)

14:33 so where exactly is the root of the server it's starting up?

14:34 cemerick: here's what i'm going with so far https://github.com/timvisher/bible-plan/blob/austin/src/clj/austin.clj

14:35 trying to not muck around with system variables and such

14:35 that appears to be working ok except that i can't visit the index.html file in a browser anymore.

14:35 it does give me a nice stable repl url though

14:36 cemerick: timvisher: hey, not bad!

14:36 timvisher: it or something like it could be a nice addition to cemerick.austin.repls

14:37 timvisher: what happens when you open the file directly? The browser-REPL won't work, but the page should still load...?

14:37 timvisher: yep

14:37 complete with water slide

14:37 :)

14:37 cemerick: water slide?

14:38 timvisher: sorry. emperor's new groove quote

14:38 :)

14:38 great movie by the way lol

14:38 but then again i have kids

14:38 cemerick: missed that one :-)

14:39 bbloom: cemerick: it is a great movie. even if you don't have kids :-P

14:40 timvisher: definitely spades best role :)

14:40 tomjack: hmm https://github.com/relevance/edn-ruby#metadata

14:41 timvisher: so how can i get the index.html page to be served up? i was assuming that's what the :static-dir key was supposed to do

14:41 bbloom: personally, i'm partial to that guy who plays Putty on Seinfeld

14:41 tomjack: metadata is not in the edn spec

14:42 Raynes: callen: I thought they merged your pull request?

14:42 https://github.com/mxcl/homebrew/pull/21733#issuecomment-22340993

14:43 futile: Got a Clojure challenge for anyone interested:

14:43 Write idiomatic code that does two things. Given an input string, give a list of all lines ending in \n, with the \n included. If the last line does not end with \n, give that separately. Perform some user-defined action on each line from the first step, omitting any final line not ending with \n.

14:44 shaungilchrist: tomjack: yeah I am curious about metadata being added to the spec as well

14:44 Raynes: futile: 'give that separately'

14:44 tomjack: guess it's tricky because of all the platforms which must be supported

14:44 Raynes: Don't know what that means in this context.

14:45 callen: Raynes: yeah I did too.

14:45 tomjack: but collections as values is already pretty tricky :)

14:45 shaungilchrist: I imagine it could be treated like comments or discard for platforms that do not care

14:45 Raynes: callen: I'm officially sick of homebrew.

14:45 :\

14:45 callen: Raynes: yeah me too.

14:46 technomancy: switch to nix you guys

14:46 futile: Raynes: not as part of the list

14:46 technomancy: but i like being able to plug into projectors and have it work

14:46 oh wait, no i dont

14:46 callen: Raynes: they've broken my spirit.

14:46 timvisher: technomancy: cause apt is better? :)

14:46 Raynes: futile: Still not telling me what you want.

14:47 futile: technomancy: but i like being able to watch Department of Eagles on Youtube

14:47 technomancy: futile: not nixos silly

14:47 Raynes: Do you want [[stuff] last-line]?

14:47 futile: Raynes: https://gist.github.com/sdegutis/6187110

14:47 Here's two simple test cases for the challenge: https://gist.github.com/sdegutis/6187110

14:47 technomancy: the whole "X can't hotplug dispalys" stereotype is like five years out of date anyway

14:48 Raynes: This isn't much of a challenge

14:48 technomancy: but nix is supposedly cross-platform

14:48 futile: Raynes: it's not supposed to be super hard

14:48 Raynes: it's supposed to let you show off the language in its most idiomaticness

14:48 or however that would be Enlished up

14:48 Englished

14:48 Raynes: Performing side effects. Heh.

14:48 futile: Raynes: the only side effect here is "print foo"

14:48 etc

14:49 technomancy: what's nix

14:49 the package manager?

14:49 technomancy: yeah

14:49 futile: a really nerdy smart colleague of mine liked it a lot a year ago

14:49 .... i havent heard from him since

14:50 * futile is trying to imply that nix killed him

14:50 technomancy: he's probably transcended human form

14:50 turned into a being of pure thought

14:50 futile: technomancy: seriously though you'll love this: http://www.youtube.com/watch?v=8mt6xzhha58

14:50 technomancy: too busy contemplating the mysteries of the universe to communicate with lowly flesh-forms

14:51 Raynes: callen: You should play Left 4 Dead 2 with me sometime.

14:51 futile: technomancy: well all we have to do to get him back is revert to the previous sha. its immutable after all right?

14:51 justin_smith: xrandr+dwm is more predictable from anything my osx mountain-lion has ever done with external displays

14:51 s/from/than

14:51 technomancy: futile: makes sense to me


14:52 justin_smith: xrandr --output DP-2 --auto --left-of LVDS-0 # gives me an external display on the third display port

14:52 futile: no takers?

14:53 noonian: Raynes: I think version 1.4.4 of me.raynes.fs might be missing a dependency. 1.4.0 works for me, but with 1.4.4 I get this: "ClassNotFoundException java.nio.file.Files java.net.URLClassLoader$1.run (URLClassLoader.java:202)"

14:53 callen: Raynes: maybe.

14:54 Raynes: I've been playing Last of Us multiplayer lately.

14:54 Raynes: noonian: Requires Java 7.

14:54 noonian: Raynes: ahhhh

14:54 Raynes: noonian: We fucked up and did a breaking change release without incrementing the major version. Sorry. :(

14:54 noonian: I've heard installing Java 7 on osx is more trouble than its worth :(

14:54 Raynes: Really?

14:54 I have it by default...

14:54 nickmbailey: wasn't bad at all

14:55 have to download it from oracle but it was easy after that

14:55 Raynes: noonian: http://www.java.com/en/download/index.jsp

14:56 mattmoss: Installing Java 7 on OSX is trivial. Getting things to run with Java 7 on OSX is a pain.

14:56 noonian: lol

14:56 Raynes: mattmoss: Like what?

14:56 :\

14:56 noonian: yeah thanks, I can't just go ahead an do it because I'd break the code for my coworkers who don't have Java 7

14:56 Raynes: noonian: 1.4.5

14:57 noonian: IIRC, we released that to selectively do the imports/function defines that require java 7 only if java 7 is installed.

14:57 mattmoss: Raynes: Well, at least for me, most things dealing with graphics, esp. OpenGL, is borked, because (IIRC) how you access gfx context was changed in a breaking manner.

14:57 noonian: Raynes: nice! that works for me, thanks

14:57 callen: Raynes: I'm smashing him in the dick.

14:58 I'm just pissed now.

14:58 Raynes: noonian: But keep in mind that when I release 2.0.0 (which will be the next version), we'll be deprecating Java 6 support because there is too much good stuff in nio.

14:58 callen: This is probably the last time I will attempt a contribution to homebrew.

14:58 mattmoss: Eg. Minecraft would not run for longest time until lwglw (or whatever the f it's called) had to be fixed.

14:58 Raynes: callen: Please be careful.

14:58 callen: One wrong thing could make this go right off the rails.

14:58 Trust me, I'm angry too.

14:58 callen: Raynes: it was subtle and had a good tone.

14:58 mattmoss: Not that minecraft is the pinnacle of Java development...

14:58 callen: Raynes: look for yourself.

14:59 technomancy: Raynes: is this about the clojurescript thing?

14:59 callen: technomancy: no

14:59 technomancy: this is about nuking the broken Clojure formula on homebrew.

14:59 technomancy: I'd REALLY like it if you spoke up for what we're doing on the thread.

14:59 technomancy: https://github.com/mxcl/homebrew/pull/21733#issuecomment-22340993

14:59 noonian: Raynes: thanks for the warning, I'll start investing in preparing to move everyone to 7

14:59 callen: I put in a blacklist to tell the user to use Leiningen instead.

15:00 Raynes: noonian: Cool. I believe mattmoss about the things he mentioned, but it is generally really painless. I've never had a single stray problem with java 7 (haven't done gfx stuff).

15:01 technomancy: callen: I'll poke my head in

15:01 timvisher: cemerick: sorry. got no more time for this atm. when i load up the index.html file from a localhost server austin claims that a session with that id doesn't exist. i'll try to dig into it more later. still, looks promising, if a bit hacky. thanks for your help!

15:01 noonian: yeah, I haven't had problems trying myself, but googling it a month ago turned up some stuff that convinced me to wait

15:01 timvisher: https://github.com/timvisher/bible-plan/commits/austin

15:01 Raynes: technomancy: Very appreciated it. Not asking you to get involved with the shitstorm, just a little "I support this because x" comment might be helpful to our cause.

15:01 TimMc: callen: I notice http://clojure.org/getting_started wasn't linked.

15:02 Authoritative, and it says "The vast majority of Clojure developers use Leiningen to create and manage Clojure projects."

15:02 Raynes: TimMc: Someone did link it!

15:03 But every time it's about to get merged some random Ruby programmer hops in to say "UHHH I DUNNO GAIS MAY B WE SHOULDN'T"

15:03 I don't mean to be bitter about it, but I'm frustrated.

15:03 kmicu: It's a b... It's a b... It's a small, off-duty Czechoslovakian traffic warden!!

15:03 technomancy: might have been better not to mention the clojurescript one at all

15:04 TimMc: Raynes: I do not see the link.

15:04 callen: technomancy: yep

15:04 Raynes: I'm hunting him down in the machomebrew channel.

15:04 TimMc: I just added it anyway.

15:04 to reiterate the matter.

15:04 Raynes: TimMc: https://github.com/mxcl/homebrew/pull/21733#issuecomment-22307159

15:04 TimMc: good good

15:05 callen: is this what people trying to add/remove packages to Debian go through?

15:05 tomjack: t

15:05 technomancy: callen: Debian has actual release management

15:05 TimMc: Raynes: Not to be obtuse, but that's not a link and I don't know what the "get clojure" page is.

15:06 callen: Raynes: he wants a week. it's 1147 on the 8th of August. I'm going to be right back in this thread in a week

15:06 Raynes: TimMc: He explicitly mentioned that it's from the official Clojure homepage.

15:06 callen: he asked for a cooling off period, I'm giving it to him.

15:06 Raynes: callen: I'm just baffled at what he thinks is going to happen in a week.

15:06 callen: Raynes: it's not like he's going to research anything.

15:07 If he were apt to research anything, we wouldn't have needed to say so much.

15:07 that's also why I'm hunting him down in the homebrew IRC channel.

15:07 Raynes: callen: I feel like despite our best efforts, he thinks that a storm of angry Clojure programmers are going to rush in in defense of this 6 line shell script.

15:07 * technomancy imagines callen setting a reminder in his calendar

15:07 callen: technomancy: I don't need a reminder, hate sharpens the memory.

15:08 nobody that actually writes any Clojure code uses that formula.

15:08 justin_smith: which would explain who knowledgable callen generally is

15:08 Raynes: His latest comment "Unrelated to this PR: perhaps the homepage should not suggest the "Minimal Install"."

15:08 Why are Ruby programmers trying to shit on our lawn? :(

15:08 technomancy: Raynes: "YA THINK"

15:09 callen: justin_smith: help me out, I didn't grok that. :(

15:09 technomancy: justin_smith: haha

15:09 justin_smith: sorry, "callen: I don't need a reminder, hate sharpens the memory." "which would explain how knowledgable callen generally is"

15:09 typo

15:10 remember ages ago when I started cussing about homebrew? I hated homebrew before it was cool

15:10 callen: justin_smith: I saw the sequencing of statements, I don't know if it's intended to be a stateful about my being hateful, ignorant, or both.

15:11 I'm not even reacting to it with vitriol, I'm just confused and curious.

15:11 justin_smith: hateful and wise

15:11 callen: I'm down with being a Zen bastard.

15:11 * callen rasps wooden staff against hand

15:11 Raynes: callen: It looks like he is saying you hate things and hate sharpens the memories and thus you're knowledgeable and smart.

15:11 justin_smith: I figured that was what you were going for

15:11 callen: Raynes: <3

15:11 justin_smith: if you think being in IRC with me is bad, imagine how the third party providers to my company have it.

15:12 I'm putting them through the wringer on OAuth2 right now.

15:12 Raynes: callen: We should perhaps hunt down links to IRC logs where users installed this piece of junk and we had to tell them to use leiningen instead

15:12 callen: Raynes: what's the most complete log of this channel?

15:12 Raynes: Probably mine, but they're not easily searchable.

15:12 We should use n0ise I expect.

15:13 callen: with search

15:13 okay

15:13 Raynes: don't link them to the logs.

15:13 Raynes: we can't use the logs.

15:13 Not really.

15:13 justin_smith: you're just embarrassed by what you said

15:14 callen: justin_smith: well I was ranting about homebrew's maintainers.

15:14 justin_smith: I'm being politically savvy, not embarrassed.

15:14 everything I said about homebrew was true.

15:15 Raynes: callen: http://www.google.com/cse?cx=partner-pub-1237864095616304%3Ae7qm3gycp2b&ie=UTF-8&q=%22install+leiningen%22&sa=Go&siteurl=clojure-log.n01se.net%2F&ref=&ss=4728j746238j38#gsc.tab=0&gsc.q=%22install%20clojure%22 fwiw

15:15 noonian: is homebrew the piece of junk you guys are referring to? or some other piece of software?

15:15 Raynes: noonian: The Clojure formula specifically is a piece of junk.

15:15 noonian: ah

15:15 callen: Raynes: still not a good idea. there could misuse other conversations on there.

15:15 Raynes: I really don't think it's a good idea to bring in more data at this stage.

15:16 they'll just misread the conversations.

15:16 I'd let it lie for a week.

15:16 We've already won, now we just wait.

15:16 mgaare: what is the use case of homebrew instead of just using lein?

15:16 Raynes: callen: FWIW, probably shouldn't say things in a publicly logged channel that you're not willing to let people see.

15:16 callen: and potentially threaten Mike McQuaid's family.

15:16 mgaare: retardation.

15:16 Raynes: mgaare: There isn't one.

15:16 callen: Raynes: I know.

15:16 Raynes: Just stubbornness at this point.

15:16 callen: I stand by what I said, it's just inconvenient for the purposes of that PR

15:16 mgaare: I'm on mac and every time I think to reach for homebrew I get a little shudder of dread

15:17 callen: mgaare: good.

15:17 I use a mac and homebrew, but I'm not apt to be happy about either of those things.

15:17 cemerick: Raynes: man, what's with the packaging crazy lately?

15:17 s/lately/

15:17 technomancy: debian is getting lein2 soon you guys =)

15:17 ystael: callen: not 'apt' to be happy /groan

15:18 cemerick: technomancy: right about the time v3 goes into beta or something? ;-(

15:18 er, ;-)

15:18 callen: ystael: oh good, you noticed. :)

15:18 * ystael stabs himself

15:18 * callen dances an irish jig on ystael's corpse

15:18 technomancy: cemerick: 3.0 is kind of just an idea at this point

15:18 noonian: well, when I started with clojure my first instinct was to see if homebrew had it and install from there

15:19 callen: noonian: we know a lot of people do it. that's why it's important to unfuck the situation.

15:19 cemerick: technomancy: I know, just snarking at the latency

15:19 technomancy: nix has the latest though! =)

15:19 justin_smith: your choices in package management: do something totally fucked up immediately, do the best thing but take for fucking ever to get around with it

15:19 *around to it

15:19 futile: so, no takers?

15:20 technomancy: justin_smith: the great thing is they're not mutually exclusive =)

15:20 futile: re: https://gist.github.com/sdegutis/6187110

15:20 justin_smith: oh yeah, you can get both

15:20 noonian: imo the clojure formula should just install leiningen and make a clojure-no-lein formula or something if you really just want the jar stuck somewhere or however it does it

15:21 technomancy: noonian: no one has ever wanted the latter =)

15:21 Raynes: noonian: The non-lein formula is literally 'unzip and here's a 6 line shell script have fun doing nothing'

15:21 I can write that with my feet on a broken keyboard in 30 seconds.

15:21 Don't need a confusing formula to do it for me.

15:21 mgaare: can you get the brew recipe for clojure to echo something like, "Listen, there's a clojure tool called leiningen that's quite good and, frankly, easier to deal with if you just install it yourself. Are you sure you want to proceed with this?"

15:21 technomancy: mgaare: that's basically what's proposed

15:22 timvisher: Raynes: you are pretty good with your feet though.

15:22 mgaare: technomancy: righto then :D

15:23 noonian: haha

15:24 technomancy: muhoo: fixed your trampoline bug =)

15:26 noncom|2: (reduce) generates an additional collection during its work. this overhead is undesirable for me in the current task. how can i substitute reduce?

15:27 with core.reducers/reduce maybe? or some other technique?

15:27 justin_smith: futile: https://www.refheap.com/17407

15:28 futile: neat solution

15:28 Raynes: war

15:28 justin_smith: not concise, but I hope clear

15:28 futile: looks just like my first one. great minds think alike etc :P

15:28 Raynes: wat

15:28 justin_smith: This doesn't even work.

15:28 Right?

15:28 justin_smith: ?

15:28 why not?

15:29 Raynes: justin_smith: Splitting on \n removes the delimiters.

15:29 futile: justin_smith: also thats not a user-given action, thats hard-coded ;)

15:29 justin_smith: yes

15:29 futile: Raynes: the "ln" in "println" adds them back ;)

15:29 justin_smith: I check the end of the string for newline

15:29 before splitting

15:29 so it works

15:29 Raynes: I see.

15:30 justin_smith: (.endsWith str "\n")

15:30 justin_smith: yes, much nicer

15:30 splitting loses information about ending on a delimiter, I have often had to deal with that

15:31 I should write a "strict-split" that puts a nil at beginning and or end if starting / ending with a delimiter

15:31 now that I think of it

15:31 cemerick: technomancy: nix?

15:32 kmicu: $google nixOS

15:32 lazybot: [About NixOS] http://nixos.org/nixos/

15:32 justin_smith: nil at beginning or end if delimiters are there makes split / join be proper complementary functions

15:33 hiredman: noncom|2: what makes you say it generates an additional collection?

15:35 Raynes: cemerick: You're a gentleman and a scholar.

15:35 cemerick: Raynes: you should tell people, no one believes me

15:35 kmicu: thanks, cute

15:35 Raynes: kmicu: cemerick just called you cute

15:38 cemerick: Raynes: The fellow looking to package cljs is _really_ motivated!

15:38 Raynes: cemerick: Forgot the damned dot.

15:38 dnolen: cemerick: motivated towards what I'm unable to comprehend

15:39 cemerick: dnolen: 'single-shot compilation' appears to be the key phrase

15:39 Raynes: cemerick: Which surprised me, since he hasn't once said "I need it".

15:39 noncom|2: hiderman: i have heard it here before and i may pay to the bottleneck critical section

15:40 cemerick: Raynes: my (rare) previous exposure to processes packaging Java bits is that packagers are rarely users of the things they package.

15:40 hiredman: noncom|2: so you ahve no evidence of it?

15:41 noncom|2: hiderman: true...

15:43 hiredman: noncom|2: if you are not working based on evidence, your "critical section" may or may not be a real bottleneck.

15:43 noncom|2: get a profiler, get empirical

15:43 noncom|2: hiredman: yes, this is very sober

15:44 noonian: noncom|2: pity :P

15:44 noncom|2: noonian: beauty :)

15:51 Raynes: technomancy, TimMc, nDuff: http://identity.mozilla.com/post/57712756801/persona-makes-signing-in-easy-for-gmail-users

15:52 I guess technomancy doesn't care since he boycotted gmail.

15:52 But sane people will be happy about this.

15:54 futile: Well since everyone seems done with the challenges, here was my solution: https://www.refheap.com/16959

15:54 That version admittedly doesn't preserve the newline at the end, but it would be easier to add between lines 5 and 6.

15:55 technomancy: Raynes: at this point the best way to get me to switch would be to steal my laptop and (defalias 'scpaste 'refheap-buffer) without my knowledge

15:55 Raynes: Hahaha

15:55 technomancy: actually my dotfiles are OSS; go submit a pull request instead =)

15:59 TimMc: Raynes: I boycotted gmail some years ago too.

15:59 Raynes: This channel is really full of hipsters.

16:00 TimMc: and I would encourage you to do the same, for that matter. :-P

16:00 technomancy: flee the coming googpocalypse

16:00 maharj: I just found out there's a way to preserve delimiters on str/split with (?= and (?<= Really neat I should say.

16:00 hyPiRion: Raynes: Go make that Elixir mail server I told you to already.

16:00 Raynes: Sure, let me just give up email addresses I've been using for years, the app I use on my phone to read my email, and...

16:01 technomancy: just wait till you won't be able to sign into gmail without using G+

16:01 it won't be long

16:01 glosoli: What does one use for debugging Clojure in Emacs ?

16:01 technomancy: Raynes: don't you have raynes.me?

16:01 llasram: glosoli: println, personally

16:01 Raynes: technomancy: Not my only email address.

16:01 TimMc: Raynes: Good job, bro.

16:01 glosoli: llasram really??

16:01 lazybot: glosoli: What are you, crazy? Of course not!

16:02 technomancy: Raynes: I've been forwarding technomancy@gmail.com to hagelb.org for years

16:02 hyPiRion: technomancy: whaa, you actually have a gmail.com address? maniac

16:02 Raynes: You're all bad people.

16:02 TimMc: Raynes: brainonfire.net used to be backed by gmail, then by lavabit, and now by cotse -- and people who email me don't know the difference.

16:02 technomancy: hyPiRion: from my college days

16:02 glosoli: llasram: I can't git if you are just joking or not :?

16:03 llasram: glosoli: Well, println plus thinking all the way through the problem

16:03 technomancy: hyPiRion: you know, before it was obvious Google was going to turn evil

16:03 glosoli: llasram hmm seems kinda uncomfortable but thanks

16:03 llasram: glosoli: Give it a try some time :-) Otherwise, I'd look at ritz

16:04 glosoli: https://github.com/pallet/ritz

16:04 glosoli: thanks

16:04 hyPiRion: technomancy: I kind of feel like every company will turn evil at some point. I'm a bit pessimistic.

16:04 TimMc: Or they go under, or change their domain name...

16:05 Basically, if you're *actually* concerned about maintaining an online identity, it's pretty important to use services that allow you to attach your own domain name.

16:05 ddellacosta: is there a way to stub a pojo's method using with-redefs?

16:06 llasram: ddellacosta: Nope -- `with-redefs` works on Vars

16:07 ddellacosta: You can `proxy` to create an (anonymous) sub-class, if that could work

16:08 TimMc: The number of times I've written (defn now [] (System/currentTimeMillis)) just so I can write tests...

16:08 ddellacosta: llasram: I tried something like that, but it turns out I'm trying to proxy an Interface, which doesn't (seem to) work. Note: total newb with this kind of Java-interop in Clojure, as of yesterday

16:09 although I'm finding proxy to be a lovely thing in and of itself, very handy

16:09 llasram: ddellacosta: Oh, you need an implementation of an interface, then that's what `reify` is for

16:09 s,you need,if you need,

16:10 ddellacosta: llasram: gotcha, thank you!

16:12 huh, some people on the interwebs are saying that reify is generally preferable to proxy, across the board, if possible to use. Is this the current conventional wisdom?

16:14 stuartsierra: ddellacosta: yes, when implementing interfaces only, `reify` is faster and more interoperable than `proxy`.

16:14 ddellacosta: stuartsierra: thank you!

16:16 callen: ddellacosta: proxy is sometimes necessary if you're doing black magick though.

16:16 tcrayford: like interfacing with a scala library that doesn't use an interface where it should

16:16 :(

16:16 callen: ddellacosta: usually involving interop.

16:16 tcrayford: lol, yep.

16:16 ddellacosta: callen, tcrayford: gotcha…haha

16:17 tcrayford: let's just make this thing an abstract class where all the methods are also abstract. Definitely shouldn't make it an interface, no sir

16:17 callen: most Clojure pain is just dealing with the sins of other communities.

16:18 we're not blameless but it's disproportionate.

16:20 ddellacosta: callen: seems like (one of) Clojure's purpose(s) is in fact to mitigate the pain of dealing with the frustrations of other environments

16:20 whoops, meeting

16:20 nDuff: Raynes: Doesn't work with my AFYD address.

16:21 wastrel: hi speaking of sins, how do i consume a wsdl thingy in clojure

16:21 callen: ddellacosta: yeap. Design priority.

16:21 nDuff: Raynes: ...for gmail.com addresses, great, _but_.

16:21 wastrel: i want to be able to talk to this web service but it provides no documentation beyond a wsdl file, never heard of wsdl before :]

16:21 llasram: tcrayford: a few high-profile projects have switched from interfaces to ABCs pretty deeply: Hadoop and Netty come to mind, but I'm sure there are others

16:21 nDuff: Raynes: ...asked their IRC channel about the state of AFYD support, and apparently it's back-burnered right now.

16:22 tcrayford: llasram: the thing I'm using is github.com/boundary/ordasity. It saves me from doing leader election in the distributed system I'm building.

16:23 llasram: Interesting

16:23 callen: tcrayford: I'm a little puzzled as to why you're not using Zookeeper directly.

16:23 wanted the shake-n-bake clustering I guess?

16:24 tcrayford: ordasity handles a load of distributed logic. It's not single node leader election

16:24 more

16:24 I have these 64 queues that pump into stateful consumers, balance them and allow me to do failover

16:24 * callen nods

16:28 timvisher: i have basic clojure code that works entirely independently of clojurescript. i'd like to be able to store that in plain 'ol clj files under src/clj in https://github.com/timvisher/bible-plan. how do i go about doing that?

16:28 can i reference namespaces from clj but not the other way around?

16:29 obviously assuming that nothing platform specific is happening.

16:33 callen: timvisher: try it

16:34 timvisher: callen: 'try it', he says. 'worst that can happen is it doesn't work', he says. sheesh. it's like i'm an animal or something. :)

16:34 * callen sagely nods head

16:39 dnolen: timvisher: if you want to share code between CLJ & CLJS you will need to use lein cljsbuild crossovers or cljx

16:41 timvisher: dnolen: i have an ns with nothing but a map with keywords, ints, and strings in it.

16:42 i'd need cljx or cljsbuild crossovers for that?

16:42 to be fair, i haven't 'just tried it' yet

16:42 :)

16:42 dnolen: timvisher: it won't work

16:42 timvisher: sweet. that's what i was hoping someone would say

16:42 lol

16:42 saves me the time

16:42 interesting

16:42 dnolen: timvisher: there's no support for sharing code out of the box

16:42 timvisher: any pointers to docs on that?

16:43 dnolen: timvisher: never used code sharing features so I'll defer to someone else who has

16:43 timvisher: for my own info, cljx is specifically for when you have a library that needs to one thing on platform and another thing on another right?

16:43 cemerick: timvisher: cljx docs are pretty decent

16:44 Not just, no. Even if your namespace is 100% portable (and so crossovers work), there's no REPL support.

16:44 timvisher: it's really not that big a deal anyway, it's just that the browser repl is so slow compared to the jvm repl so i'm hoping that i can work on the platform agnostic stuff from jvm clojure and then just import to clojurescript when i need to run it

16:45 cemerick: does anyone see >40% CPU when running cljsbuild auto these days?

16:45 rorschach: common lisper here…how difficult is it to switch over to clojure?

16:45 timvisher: cemerick: i'm way above that on my 11" air

16:45 cemerick: That's crazy, especially since I'm on JDK 7. But even so, scanning the whole directory tree shouldn't cause that.

16:46 timvisher: well, actually i shouldn't have spoken so fast. I'm talking about running a once

16:46 ToxicFrog: rorschach: try it and see? Clojure places a much heavier emphasis on FP and immutability than CL does, and is a lisp-1

16:46 timvisher: presumably auto does less work each time?

16:46 callen: rorschach: I'm an ex-CLer. Just teryi t.

16:47 try*

16:47 technomancy: rorschach: the hardest part is un-learning all your bad habits

16:47 * technomancy came from elisp

16:47 rorschach: haha alright, I'll give it a shot…my current company is interested in utilizing it

16:47 thanks

16:47 callen: technomancy: I thought you came from PLT Scheme?

16:47 you can't be serious about the elisp bit.

16:48 ToxicFrog: (personally I don't like CL or elisp, so moving to clojure was very easy~)

16:48 technomancy: callen: no; I only picked up scheme recently

16:48 (unless you count implementing it)

16:48 callen: I did ruby because I knew I couldn't get work in lisp =P

16:48 but I had way more fun with elisp while I was waiting around for clojure than I did with ruby

16:49 callen: technomancy: I knew about Ruby and was able to guess the 'why' behind it.

16:50 timvisher: cemerick, dnolen: thanks for the info. poor man's solution is to simply `C-c C-l` the file from the jvm repl. wazam, you've got the ns!

16:50 :)

16:50 callen: "raganwald: Engineering TDD: Drive bus into a river. Build bridge. Drive another bus across the river and into tree. Cut down tree. Drive a third bus..."

16:50 fikusz: I prefer clojure the language very over CL, but I'm missing the performance / stability CL has to offer

16:51 the clojure repl takes half a minute to start up on my laptop

16:51 callen: technomancy: the weirdest conversation I ever had was with a Rubyist that had done Smalltalk and didn't believe me that Common Lisp impls had images too.

16:51 fikusz: that's extreme.

16:51 technomancy: callen: hehe

16:51 callen: it shouldn't take anything close to 30s.

16:51 fikusz: callen: I guess it's the jvm

16:51 callen: technomancy: that was around the same time I started assuming 80% of Rubyists were huffing paint.

16:51 fikusz: I mean, it is, but that

16:52 is still way too long.

16:52 fikusz: what sort of machine is it?

16:52 gfredericks: is (= (type :foo) (type "foo")) a known problem in cljs?

16:52 fikusz: callen: it's an older DELL, let me check...

16:52 technomancy: clojurebot: faster lein?

16:52 clojurebot: Cool story bro.

16:52 technomancy: bleh

16:52 hiredman: fikusz: startup time is a not really performance, it is cold start time

16:53 bhauman: rorschach: it's really helpful to have a good book while exploring. http://pragprog.com/book/shcloj2/programming-clojure

16:53 technomancy: clojurebot: faster lein is tricks for helping speed up start time for Leiningen: https://github.com/technomancy/leiningen/wiki/Faster

16:53 clojurebot: 'Sea, mhuise.

16:53 callen: why does Clojurebot speak Irish?

16:53 fikusz: hiredman: ok, but if I use the repl a lot, it starts to eat away my memory as well

16:53 rorschach: is programming clojure or clojure programming better?

16:53 fikusz: hiredman: so I have to restart it, which again takes ~30sec

16:53 hiredman: fikusz: if you set the max heapsize it will never use more than that

16:54 callen: technomancy: you could mention pomegranate in the bit about having to restart when changing dependencies.

16:54 bhauman: rorschach: both books exist

16:54 callen: rorschach: clojure programming (clojurebook.com) is superior.

16:54 bhauman: rorschach: but I like the one I sent to you better

16:54 technomancy: callen: still super unpolished

16:54 callen: I know.

16:54 I strongly disliked programming clojure.

16:55 hiredman: fikusz: if you use lein you can set that using :jvm-opts, -Xmx1g for a 1gig heap

16:55 fikusz: callen: well the machine is a core2 with 4 gigs of ram

16:55 callen: technomancy: can cemerick be convinced to use some of his 100% time to improve it?

16:55 fikusz: wtf dude.

16:55 technomancy: callen: no way to know without trying

16:55 callen: cemerick: pomegranate.

16:55 technomancy: fikusz: I hack on a core2 with 4 gigs of ram

16:56 pbostrom: lein repl can take a while for a big project, 22s on my newish MBP

16:56 timvisher: anyone aware of a libary that can take english blobs and return word counts?

16:56 callen: anything in a list of NLP libraries.

16:57 hyPiRion: timvisher: yeah. It's called frequencies.

16:57 callen: or clojure.string/split " "

16:57 oh you mean per word counts

16:57 hyPiRion: ,(frequencies [:foo :bar :baz :foo :foo :baz])

16:57 clojurebot: {:foo 3, :bar 1, :baz 2}

16:57 fikusz: technomancy: well I have no idea what's causing it, maybe leiningen, maybe something's wrong with my setup

16:57 callen: timvisher: you want an NLP library if you want suffix conflation.

16:57 ToxicFrog: fikusz: my server is an athlon 64 with 1GB of memory. 'lein repl' takes 10 seconds to start up with a cold cache.

16:57 technomancy: fikusz: try the wiki page I linked to above

16:57 timvisher: callen: that sounds so impressive. :)

16:57 ToxicFrog: And 5s with a warm one.

16:58 technomancy: CPU and ram don't have much effect on startup time; it's mostly IO

16:58 fikusz: ToxicFrog: that's still a lot compared to CL I guess

16:58 callen: timvisher: what?

16:58 ToxicFrog: Yeah, I'm more saying that if it's taking 30s on your much more powerful machine that's really suprising and a bit worrying.

16:58 hiredman: it is true that the jvm will not release memory back to the os (once it grows its heap it hangs on to the memory for use in the future) but if you set the max heap to something you are comfortable with it will not grow beyond that

16:58 callen: unless it's got a 5400 RPM spinning rust drive.

16:59 ToxicFrog: (oh yeah, and I'm running raidz on an array in an eSATA enclosure, so io throughput isn't that hot either)

16:59 callen: timvisher: https://github.com/dakrone/clojure-opennlp

16:59 fikusz: callen: I'm not sure what it could be, but I'm using distro defaults and my projects don't use that many libs

17:00 technomancy: fikusz: getting lein from your distro too?

17:00 timvisher: callen: sorry, i mean i've got no idea what nlp and suffix conflation mean

17:00 callen: if I had to guess, it's due to non-SSD

17:00 timvisher: are kick and kicks the same word?

17:00 fikusz: technomancy: no, I got it from git

17:00 timvisher: ahah

17:00 technomancy: ok, cool

17:00 timvisher: callen: no

17:00 technomancy: fikusz: wait, running from a checkout though?

17:00 fikusz: technomancy: I only have the jvm from my distro

17:00 callen: timvisher: then you don't need it.

17:00 timvisher: proceed.

17:00 timvisher: lol

17:00 technomancy: fikusz: running from a release is faster than running from a checkout

17:00 fikusz: technomancy: not from a checkout, it's a release

17:00 technomancy: ok, cool

17:01 timvisher: the " " split is probably good enough

17:01 fikusz: for example I have a small web-scraping project using clj-time and enlive

17:01 timvisher: it doesn't need to be exact anyway

17:01 fikusz: and that's it

17:01 callen: timvisher: http://writequit.org/blog/?p=351

17:01 fikusz: still takes around 20s and it's my smallest project in clojure so far

17:02 bts-: is it possible, or does it make any sense to try, to run lein prep-tasks before loading code from my dev source-paths? i'm running thriftc as a prep task, but I have code that relies on that being done already in dev/user.clj

17:02 timvisher: callen: thanks for the links. looks like good information

17:03 fikusz: I really do love clojure, I'm only saying there is a big gap between it and something like SBCL for example

17:03 hiredman: bts-: assuming dev/ is a source-path, user.clj is being loaded by the clojure runtime when the clojure runtime starts, it is not something lein has any control over

17:04 technomancy: fikusz: yeah, it sucks for small-profile things definitely

17:04 bhauman: timvisher: NLP is natural language processing

17:04 fikusz: technomancy: which could be really important for doing embedded work

17:04 technomancy: fikusz: that's why I'm learning ocaml

17:05 timvisher: bhauman: picked up on that at this point. looks much like much more than what i need.

17:05 futile: How do you guys get anything done when you're chatting in IRC so often?

17:05 timvisher: thanks though!

17:05 hiredman: feh

17:05 people keep saying that

17:05 technomancy: futile: /me glances around nervously

17:05 futile: Teach me your trick so I can do it too.

17:05 hiredman: clojure runs great on my beagle bone

17:05 timvisher: futile: most of these guys have at least 16 hyperthreaded cores in their wetware

17:05 hyPiRion: futile: that's why I don't get anything done!

17:05 hiredman: little arm SOC using oracle's arm jdk

17:05 futile: technomancy: how's leiningen 7 coming along?

17:05 ToxicFrog: futile: oh, it's simple, you just fork() when you get in to work in the morning

17:05 futile: :D

17:05 fikusz: technomancy: but why give up on lisp, when you have small-footprint fast implementations of other lisps available?

17:06 futile: ToxicFrog: awesome

17:06 fikusz: technomancy: like ecl

17:06 hyPiRion: technomancy: you've seen the new OCaml book which is in beta, right?

17:06 technomancy: fikusz: because not having nil is *awesome*

17:06 futile: so I'm dead serious about 2 projects now

17:06 a clojure IDE, and a new language

17:06 fikusz: technomancy: yeah, I like haskell too

17:06 futile: I've wanted to do both of them since I first started learning programming 15 years ago.

17:06 technomancy: fikusz: and the equality situation with other lisps is depressing

17:06 fikusz: technomancy: it's good for robust programs, but it sucks for bottom-up development

17:06 futile: (except at the time it was just "a text editor" not a Clojure IDE)

17:06 technomancy: I care a lot more about referential transparency than I do about macros

17:07 TimMc: callen: Spinning rust drive... you mean one of these? http://farm1.static.flickr.com/43/102689398_c8a42b29e7.jpg

17:07 technomancy: that said my future will probably include a fair bit of racket

17:07 hyPiRion: I loved macros in CL, but somehow I've not used many in Clojure.

17:07 futile: I think doing a Clojure IDE written in Clojure using seesaw would be great, because there are so many tools available in Clojure for analyzing Clojure code.

17:07 fikusz: technomancy: yes, referential transparency is great: but clojure can show us, that you can have the best of both worlds

17:07 hyPiRion: made, not used.

17:08 futile: technomancy: wat!?

17:08 technomancy: why not Clojure?

17:08 bts-: hiredman: hm. I am declaring that "dev/" is a source-path at the lein level though

17:08 technomancy: futile: I'm a parent, so I'm a teacher. Racket is optimized for teaching. you do the math. =)

17:08 fikusz: futile: have you tried running clojure on anything other than a pc? :)

17:09 futile: technomancy: oooh. meh I was gonna teach my son Clojure when he got a little more interested in programming

17:09 hyPiRion: fikusz: like humm, a browser?

17:09 futile: fikusz: i develop my clojure web app on my mac, since i dont have a pc, and run it on linux in ec2

17:09 technomancy: futile: I don't think teachability is something you can bolt on if it's not a core value of the community. not in a way that comes close to what racket has.

17:09 bts-: hiredman: :profiles {:dev {:source-paths ["dev"]}}

17:09 fikusz: hyPiRion: well a browser is technically still on a pc I guess :)

17:09 futile: technomancy: maybe. im not a very good teacher so i wouldnt know

17:10 jballanc: technomancy: ever thought of squeak (for teaching)?

17:10 technomancy: jballanc: a bit. I use Scratch a lot already.

17:10 jballanc: cool

17:10 technomancy: I'm sure it brings along a lot of bad habits though

17:10 fikusz: futile: I didn't mean servers, clojure is perfect for that. I meant small and underpowered devices

17:10 technomancy: very imperative

17:11 hyPiRion: fikusz: sure, if you consider a smartphone a pc I guess. That said, I know Clojure performs poorly on smaller processors

17:11 8080 would cringe if it even thought about it

17:11 technomancy: ironically phones are much more personal than what most people think of as personal computers

17:11 dnolen: fikusz: depending on how underpowered ClojureScript works well

17:11 jballanc: fikusz: any thoughts on Clojure on another, lighter runtime?

17:12 fikusz: also applications like the ones in core-utils, the ones which you constantly and often. even a few-second startup time would make them really annoying and practically useless

17:12 hyPiRion: jballanc: tbaldrige has some ideas, see clojure-metal

17:12 technomancy: jballanc: there's a clojure #lang directive for racket; gets you a lot of the niceties

17:12 callen: timvisher: thank you for pitching in.

17:12 technomancy: 700kb executables, 100ms startup time =)

17:12 fikusz: s/constantly/constantly use/

17:12 hiredman: when people talke about clojrue not being good for "embedded devices" without specificy the profile of the device it drives me crazy

17:12 jballanc: I've been working more with Lua recently, and been eyeing the clojurescript-lua project

17:12 timvisher: is their a basic way to throttle move through a list comprehension?

17:12 callen: ?

17:12 jballanc: wondering what it would take to revive it

17:12 callen: timvisher: the homebrew thread.

17:13 timvisher: that's my shindig.

17:13 hiredman: cellphones these days could run clojure fine if you got a jvm on them (dalvik is a toy)

17:13 * callen is bitemyapp

17:13 timvisher: i.e. i've gat a little over a 1000 requests to an api that i'd like to make 'politely'

17:13 callen: oh no problem. seems like the right thing to do.

17:13 dnolen: jballanc: cljs-lua is effectively dead, no work in a year

17:13 hiredman: my beaglebone which is much less powerful than my cellphone runs clojure fine

17:13 jballanc: dnolen: yeah, unfortunately

17:13 callen: timvisher: https://github.com/ericlavigne/browse-clojure/blob/master/src/browse_clojure/core.clj

17:14 timvisher: throttling http ^^

17:14 dnolen: jballanc: but I don't really see what advantage it would have over running node on said device

17:14 callen: timvisher: could do it with delay too.

17:14 timvisher: callen: figured it'd be that.

17:14 callen: timvisher: sorry if I'm predictable.

17:14 hiredman: which leads me to believe that when people say "clojure doesn't/won't run well on embedded devices" they don't know what they are talking about at all

17:14 which drives me nuts

17:14 timvisher: not the link. the link is very helpful. i menat how much you need to do to grow the solution

17:14 jballanc: dnolen: not sure what the extensibility story is like for node, but for lua it's *amazing*

17:15 timvisher: s/menat/meant

17:15 although now i wish i'd said mentat

17:15 cause that would've been funnier

17:15 dnolen: hiredman: well I heard it didn't run that well on early RPis, maybe improved now

17:15 jballanc: dnolen: luajit ffi + cljs could be very interesting for integrating with existing C libs

17:15 fikusz: jballanc: I would very much like to see Clojure with a minimal runtime, I guess the way interop part designed for Java would be pretty useless then

17:15 callen: dnolen: beetlejuice beetlejuice beetlejuice - https://github.com/mxcl/homebrew/pull/21733

17:16 hiredman: dnolen: because people used bad jvms

17:16 bltavares: hi there everyone. I am trying to start a project using clojurescript and raphael js and I am having troubles with cljs-build and foreign-libs.

17:16 callen: dnolen: mxcl wants your opinion.

17:16 bltavares: would this be the better place to ask for help?

17:16 dnolen: jballanc: ffi is nice

17:16 bltavares: just ask your quesetion

17:16 bltavares: this is the place

17:16 noonian: there are plenty of optimizing scheme compilers that it should be fairly easy to port clojure to, I know someone was compiling clojure to c with gambit but there are native compilers also

17:17 jballanc: fikusz: not necessarily...hence lua/luajit ffi

17:17 obviously it wouldn't be the same

17:17 but you could preserve the spirit of being a hosted language

17:17 bltavares: I have this project.clj https://gist.github.com/bltavares/6188586 and the foreign-lib does not seem to be loaded. The output of the copiled js does not contain the library and google.require fails

17:17 hiredman: dnolen: people would install some random jvm like jam and complain about peformance

17:17 technomancy: hiredman: openjdk is useless on the pi

17:17 fikusz: jballanc: yes, it could be changed (but you couldn't call it clojure anymore I guess). Clojure FFI is pretty much geared towards objects/OOP

17:18 jballanc: technomancy: btw...would you be interested in PRs for skaro? or is it just a playground?

17:19 technomancy: jballanc: happy to take something to streamline what's already there. not too interested in new features or anything.

17:19 hiredman: technomancy: the pi supports hardware fp, and right now the only decent arm jvms are soft float abi, so while people tend to put hardfloat abi distros on pis, if you did soft float you could use a real jvm

17:19 callen: technomancy: what about more language coverage?

17:19 hiredman: and since when is the pi the only embedded device in the world?

17:19 technomancy: hiredman: it's not any better on arduino =P

17:19 callen: technomancy: you don't have Common Lisp :(

17:19 dnolen: bltavares: not sure if a url like that will work, did you try that with a local file?

17:19 noonian: since it became available

17:19 hiredman: phones today are more powerful than the pi

17:19 technomancy: callen: I added a link in the readme

17:19 dnolen: bltavares: also did you look at this http://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html?

17:20 bhauman: if you have a iPhone here is clojure running on an device http://rigsomelight.com/dotsters/

17:20 callen: technomancy: that link is dead yo.

17:20 technomancy: don't link to dyndns stuff :(

17:20 ephemeral as all hell.

17:21 bltavares: dnolen: yep. That is where I got the initial help.

17:21 dnolen: there is this line in that same article "Note that the value for :file can be either a URL or a classpath-relative path to a local file."

17:21 and looking at the code it seems to detect if it is a url before slurping the content

17:21 technomancy: callen: sure; I can add another

17:21 fowlslegs: Are there no native clojure libraries for handling matrices?

17:21 jballanc: technomancy: I was playing with a script to compile/run each example

17:22 hiredman: actually openjdk even has instructions for getting openjdk running on a pi

17:22 https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi

17:22 bltavares: dnolen: but I havent tried locally. I was expecting it to work given this commit https://github.com/clojure/clojurescript/commit/96b38e2c951ef07b397e9d

17:23 dnolen: bltavares: try it locally

17:23 * Raynes crawls on dnolen's face.

17:23 Raynes: <3

17:25 pbostrom: fowlslegs: I was looking into this the other day, core.matrix looks decent: https://github.com/mikera/matrix-api also clatrix: https://github.com/tel/clatrix

17:26 callen: dnolen: I love you.

17:26 bltavares: dnolen: locally it worked!

17:26 \o/

17:26 bhauman: did prismatic ever release flop?

17:26 dnolen: bltavares: cool

17:27 fowlslegs: pbostrom: Thanks I found those. I actually wanted to use it to solve a 4clojure.com problem so I can't load any libraries.

17:27 bltavares: dnolen: the documentation is misleading

17:28 or maybe it is because github redirects the request to a https server

17:28 fowlslegs: pbostrom: Very strange that one has to resort to external libraries.

17:29 gilbertw1: Any reason why lein would ignore a ~/.lein/profiles.clj file?

17:29 dnolen: bltavares: yeah would want confirmation that it's not a https or http agent issue before changing docs.

17:32 pbostrom: fowlslegs: my understanding is that doing operations on a vector of vectors is going to be rather slow for anything non-trivial

17:33 noonian: why?

17:33 clojurebot: noonian: because you can't handle the truth!

17:33 noonian: lol

17:33 fowlslegs: But it would save so much code in this instance.

17:35 pbostrom: this presentation has a pretty good overview with some empirical data: http://skillsmatter.com/podcast/scala/machine-learning-with-clojure

17:37 fowlslegs: I'll check that out

17:37 GOing to meet a friend

17:37 Thank you pbostrom.

17:37 futile: wat

17:37 pbostrom: np

17:38 bltavares: dnolen: I just confirmed that is because of the redirect

17:38 dnolen: bltavares: thx

17:38 bltavares: I brought a simple http server and locally it works

17:39 pbostrom: fowlslegs: that presentation contains some clojure code for matrix mult and dot prodct, it's only a few lines

17:39 bltavares: dnolen: should this be in the documentation of lein-cljsbuild?

17:40 dnolen: bltavares: probably, lein-cljsbuild likely needs a new maintainer, I think emezeske is busy w/ other things these days.

17:40 honey: hello

17:40 i have a programming question.

17:41 dnolen: cemerick: any thoughts about a CLJS tools org? I've been thinking it might be worthwhile to consolidate under a common roof?

17:42 fowlslegs: pbostrom: That will certianly be good to know. For the purpose of my 4clojure.com soln. I only need to be able to isolate columns in a vector of vectors. I'm pretty certain I can do this with interleave or interspose, but if you know of a better way send me a pm as I am heading out right now and will miss it in the general chat. Thanks once again.

17:43 honey: is there anyone here?

17:43 dnolen: honey: yes

17:43 honey: ok thanks.

17:43 i thought i was alone.

17:43 justin_smith: honey: just saying you have a question isn't really how one uses ir

17:44 *irc

17:44 honey: are your chan rules in topic?

17:44 i new here. sorry.

17:44 justin_smith: it's just a convention, you just ask your question

17:44 no big deal

17:44 honey: oh ok.

17:44 gtrak: ~ask

17:44 clojurebot: Huh?

17:44 hyPiRion: ~anyone

17:44 clojurebot: Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."

17:45 justin_smith: so what is your question?

17:45 gtrak: how do you record a thing in clojurebot?

17:45 fowlslegs: pbostrom: And also diagonals, determinants, and frankly quite anything matrix related would be good to know.

17:45 clojurebot: You're sexy.

17:45 clojurebot: Cool story bro.

17:46 hyPiRion: gtrak: clojurebot: foo is<reply>bar, or clojurebot: foo is bar

17:46 first results in "bar", second in "foo is bar"

17:46 gtrak: I will steal the one from ##java

17:46 ~ask is <reply>The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.

17:46 clojurebot: Alles klar

17:47 pbostrom: fowlslegs: I haven't actually done too much matrix stuff in clojure personally; just write all of them yourself, you might learn something :)

17:47 gtrak: ~ask

17:47 clojurebot: The Ask To Ask protocol wastes more bandwidth than any version of the Ask protocol, so just ask your question.

17:47 timvisher: callen: dead simple albeit far less precise solution to the throttling thing: https://gist.github.com/timvisher/6188945

17:51 it's somewhat interesting to think of time as a side-effect.

17:51 futile: someone mention datomic?

17:55 TimMc: Raynes: Oof, speaking of lavabit: The owner just shut it down because (presuambly) the NSA tried to install a backdoor.

17:56 I should find an Icelandic email host or something.

17:57 callen: futile: nope

17:58 hyPiRion: TimMc: even better, they are creating an open source email server with focus on privacy

17:58 callen: timvisher: o_O

17:58 hyPiRion: http://mailpile.is/

17:59 callen: hyPiRion: that's a client, not a server.

17:59 noonian: that lavabit thing makes me sick to my stomach

18:00 hyPiRion: callen: shoot, I was really hoping they were implementing a server

18:00 It looked like it, when they added in the "self-hosted" part.

18:01 TimMc: There's also https://parley.co/ which looks interesting.

18:01 callen: hyPiRion: the client is self-hosted. it's webmail.

18:01 like zimbra.

18:01 which you can go install right now.

18:02 TimMc: I hope they've solved the searchable encrypted email problem which seems to have stymied every client but mutt.

18:03 hyPiRion: callen: but zimbra is a server? I'm confused now.

18:03 TimMc: hyPiRion: SMTP/POP/IMAP client; web server.

18:04 hyPiRion: oh.

18:04 callen: hyPiRion: I know you know what a server, a client, and webmail are.

18:04 TimMc: Think phpmyadmin.

18:05 callen: if it helps, pretend mailpile aka rip-off-dumb-yuppies-through-indie-gogo is alpine for the web.

18:05 wink: you make my head spin you guys

18:05 callen: wink: why?

18:05 wink: callen: the last 20 lines of people saying weird things.

18:05 callen: there's no better way to make money than to feed off white peoples' fears and sell them a product that taps into recent news stories.

18:06 I should've thought of the encrypted webmail thingy.

18:06 and just reskinned an existing webmail client

18:06 ToBeReplaced: man sometimes i write horrible code.... if i have a seq fns [f g h] and I want a seq of [(f) (g) (h)]... is the best option (map #(%) fns)?

18:06 technomancy: thinking of cutting lein 2.3 from current master

18:06 callen: technomancy: what's changed?

18:06 technomancy: anyone got anything else they want to get in?

18:07 buncha ... stuff

18:07 nothing too exciting; lemme see

18:07 hyPiRion: ToBeReplaced: ((apply juxt [f g h])) should work too

18:08 TimMc: ((apply apply juxt fns)), nice

18:08 Err, no. Never mind.

18:08 hyPiRion: TimMc: hah

18:08 ToBeReplaced: hyPiRion: yep looks good thanks

18:09 technomancy: callen: https://github.com/technomancy/leiningen/blob/master/NEWS.md <- just updated

18:09 justin_smith: ,((apply juxt [+ *]))

18:09 clojurebot: [0 1]

18:09 TimMc: &((apply apply apply juxt [[[+ *]]]))

18:09 lazybot: ⇒ [0 1]

18:09 justin_smith: nice

18:11 callen: technomancy: thank you :D

18:12 TimMc: callen: s/white // and agreed -- unless they're doing mega usability studies around encryption.

18:13 hyPiRion: ,(apply apply ((juxt first rest) ((apply juxt [(constantly +) (constantly 2) (constantly 4)]))))

18:13 clojurebot: 6

18:15 callen: TimMc: the demographic is just to highlight people who have the spare time to worry about things that don't affect them and the spare money to spend against their weird interests.

18:15 hyPiRion: weirdo.

18:16 rasmusto: hyPiRion: is this how you write all of your code?

18:16 hyPiRion: rasmusto: no, it's not usually that readable

18:16 rasmusto: hyPiRion: or juxt for fn?

18:16 hyPiRion: $google hello swearjure

18:16 lazybot: [hyPiRion/hello-swearjure · GitHub] https://github.com/hyPiRion/hello-swearjure

18:16 rasmusto: hyPiRion: I was feeling like twisting my brain up, thanks for the link :)

18:17 noonian: ,(doc juxt)

18:17 clojurebot: "([f] [f g] [f g h] [f g h & fs]); Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]"

18:17 hyPiRion: no problem, you'll have problems looking at me seriously ever again

18:18 technomancy: clojurebot: juxt?

18:18 clojurebot: if you think 'complement is great, wait till you see 'juxt

18:18 timvisher: callen: o_0 right back at you?

18:18 technomancy: so true

18:19 callen: technomancy: you know the first Rust compiler was written in OCaml right?

18:19 technomancy: callen: no kidding?

18:19 callen: technomancy: yep, OCaml was how they bootstrapped it.

18:19 technomancy: have you looked at Rust much? It steals a lot from the ML family.

18:20 I know the systems focus can throw some people off, but Rust is a credible pure-functional language with nice escape hatches.

18:20 technomancy: a bit. seemed designed to appeal to people who can stomach C++, if only barely.

18:20 noonian: hadn't even heard of Rust until just now

18:20 callen: technomancy: naw, it has more in common with a concurrent OCaml semantically.

18:20 whee: I find myself using "into" to apply a function to a map's values and get a map with the same keys and the modified values; is there something more idiomatic for this?

18:20 technomancy: at least they have the decency to feel bad about not having a solid repl setup, unlike go

18:20 justin_smith: I got a rust shirt at oscon, I went to the booth and tried to talk to them, the guy only spoke japanese, he handed me a shirt and a pen

18:21 callen: technomancy: the syntax and keywords have changed a lot too.

18:21 justin_smith: and a syntax reference card

18:21 callen: technomancy: Rust has a REPL...

18:21 technomancy: I do wish the Mozillans the best with it though

18:21 justin_smith: the gc is optional

18:21 technomancy: callen: last I heard it was "this is super experimental and might even work; try it out!"

18:21 justin_smith: which is awesome for systems stuff

18:21 callen: justin_smith: yep. wonderful. :)

18:22 technomancy: rusti seems to be at parity with the real rust.

18:22 futile: anyone wanna port clojure to llvm with me?

18:22 hyPiRion: futile: man

18:22 callen: technomancy: I'm pretty sure it works fine.

18:23 hyPiRion: $google clojure-metal

18:23 lazybot: [halgari/clojure-metal · GitHub] https://github.com/halgari/clojure-metal

18:23 technomancy: callen: that's cool. last I checked was a year or so.

18:23 patchwork: Trying to compile cljsc from a clojure repl, getting an error:

18:23 (cljsc/build "resources/cljs/hello.cljs" {:output-to "hello.js"})

18:23 NullPointerException cljs.core/import-macros/fn--4840 (core.clj:42)

18:23 futile: hyPiRion: yay

18:23 patchwork: Just following the quickstart, anyone know how to fix this?

18:24 cljs file is identical to the one in the quickstart

18:24 futile: hyPiRion: also https://github.com/schani/clojurec

18:24 whoa

18:24 hyPiRion: yeah, I know

18:24 patchwork: Actually, subsequent calls give me : "AssertionError Assert failed: Can't recur here"

18:24 hyPiRion: many out there now

18:25 guns: technomancy: What do you think about an envvar for binding clojure.pprint/*print-right-margin* when running slamhound from the command line?

18:25 (and perhaps defaulting to 80)

18:25 futile: welp

18:26 looks like i have no more valid reason to write it myself

18:26 technomancy: guns: that sounds reasonable

18:26 futile: ill have to settle for invalid reasons

18:26 guns: technomancy: what would you like to call it? PRINT_RIGHT_MARGIN

18:26 technomancy: guns: how about SLAMHOUND_MAX_COLUMNS

18:27 guns: technomancy: great. I'll add it to the :refer :all patch

18:27 callen: relative to how well most things work in Rust.

18:27 noonian: whee: do you mean a function that assumes all values have some property (like being a number) and transforms the values some way but leaves the keys alone?

18:27 callen: technomancy: you really should give it another whirl soon.

18:27 justin_smith: also I like the two heaps thing rust has

18:27 callen: the only "unstable" thing that's relevant to users is rust-pkg is still coming together.

18:27 justin_smith: do you mean the per task heaps or something else?

18:27 justin_smith: yeah that

18:27 callen: that's not two heaps

18:27 that's n-heaps

18:27 justin_smith: gotcha, I see people from the rust world call it two heaps

18:27 callen: it might be pooled for the tasks

18:27 but the way it was originally explained to me was along the lines of what erlang does.

18:27 they might've made it a little more systems friendly since then.

18:27 justin_smith: maybe "two heaps" means your task heap, and the global one (which of course each other task also sees two heaps, though there are more than two total)

18:27 maybe?

18:27 callen: maybe, I'm not usre

18:27 I've mostly been following the changes to syntax and the iterators lately.

18:27 http://attractivechaos.wordpress.com/2013/04/06/performance-of-rust-and-dart-in-sudoku-solving/

18:27 technomancy: callen: wait does rust only infer types of locals?

18:28 callen: technomancy: you can't H-M a language like Rust.

18:28 technomancy: so yes.

18:28 technomancy: =\

18:28 callen: or I should say D-M I guess.

18:29 technomancy: I wouldn't want the restrictions of a damas milner compatible type system in a language like Rust.

18:30 technomancy: maybe once I've done enough ocaml to hate it I'll feel the same way

18:30 callen: technomancy: well like I'd said before, I need concurrency and Rust is a close-enough concurrent systems ML

18:31 I don't hate OCaml, I just got tired of the broken ecosystem and constraints.

18:31 technomancy: callen: good for you. =) different people want different things.

18:31 hyPiRion: callen: hasn't the ecosystem turned better lately?

18:31 callen: I know, I'm just saying.

18:31 justin_smith: futile: clojure-metal is far from done, I am sure they would appreciate help

18:31 callen: hyPiRion: yes but that doesn't mean OCaml is suddenly concurrent.

18:32 futile: justin_smith: its clojurec im worried about

18:32 callen: justin_smith: he doesn't actually do anything.

18:32 justin_smith: he just proposes projects but doesn't write code.

18:32 Raynes: It also doesn't mean people suddenly actually use OCaml for anything.

18:32 futile: justin_smith: https://github.com/schani/clojurec

18:32 Raynes: And thus libraries are probably not growing very quickly.

18:32 callen: Raynes: other than implementing languages better than OCaml.

18:32 hyPiRion: callen: nono, I'm just mentioning it.

18:32 abp: huh!

18:33 futile: hullo!

18:33 clojurebot: Cool story bro.

18:33 futile: yeah, it was.

18:33 abp: for sure

18:33 hyPiRion: oh what, the argument ordering for isa? and instance? is confusing

18:33 technomancy: isa? =(

18:34 hyPiRion: technomancy: huh?

18:34 technomancy: (is isa? actually-is-a?) ; -> false

18:34 callen: It's doubly disappointing that OCaml comes from the same organization that did join-calculus.

18:34 technomancy: it's not a well-named function?

18:34 callen: I don't know how you fuck up that deeply.

18:34 hyPiRion: technomancy: I don't know

18:34 ,(isa? Integer Number)

18:34 clojurebot: true

18:35 technomancy: hyPiRion: but that's nonsense

18:35 Integer is a Class, not a Number

18:35 Raynes: I'm pretty sure an integer is a number.

18:35 hyPiRion: technomancy: oh yeah, that's true too. That confuses me as well

18:35 technomancy: Raynes: then it should be called instances-of-this-are?

18:35 hyPiRion: ,(instance? Number 2) ; Order reversed

18:35 clojurebot: true

18:35 Raynes: I'm not following what is confusing.

18:35 SegFaultAX: Raynes: I think his point is that isa sounds like it's querying an object's type, not the class hierarchy itself.

18:36 Raynes: *shrug*

18:36 technomancy: (that's apart from the arg order facepalm part)

18:36 callen: technomancy: is it that you hate writing down the type signatures?

18:37 you end up writing down your types in Haskell typically, surely it's the same for your code in OCaml?

18:37 I don't think anybody writes Haskell code without type sigs. it doesn't work half the time anyway.

18:37 technomancy: callen: if you get inference for locals but not args, it means locals are more convenient than args

18:37 if locals are more convenient than args, then that gives you incentive not to break things out into their own function when they should be

18:37 which leads to function bodies being longer than they would be otherwise

18:38 which leads to hate, which leads to anger, &c

18:38 this is what happened to me when I wrote Mirah anyway

18:38 callen: maybe.

18:38 hyPiRion: which leads to poorly designed programming languages, and then the circle is complete.

18:38 callen: Haskell users seem to have no problem with decomposition and function composition based APIs.

18:38 despite always writing down their types.

18:39 justin_smith: no no, anger leads to hate which leads to knowledge

18:39 technomancy: justin_smith: oh dang; I forgot about that

18:40 haskell people want to spend all day thinking about types. I'm not like that. I like OCaml *because* it doesn't put them in my face everywhere.

18:40 justin_smith: I miss ocaml

18:40 callen: TimMc: to reinforce my earlier point, there's a programmer on my twitter feed freaking out about police arresting somebody across the street. He's even talking about moving. After I was done lol'ing I googled - invariably caucasian.

18:40 hyPiRion: justin_smith: it's not too late

18:40 abp: technomancy: But thinking about types ensures your program is correct!

18:40 callen: technomancy: thinking about types is culturally part of ML. They're the ones that got that ball rolling.

18:40 technomancy: abp: what can I say; I live on the edge.

18:41 callen: technomancy: I think you're alone in this with respect to OCaml.

18:41 justin_smith: it also keeps you regular, and purifies the soul

18:41 callen: very zen-like way to do OCaml though. Pro.

18:41 whee: noonian: basically this: (defn map-values [m f] (into {} (for [[k v] m] [k (f v)])))

18:41 noonian: I'm guessing there's already a function for it, since it seems like a common pattern

18:41 patchwork: So is this just way out of date? https://github.com/clojure/clojurescript/wiki/Quick-Start

18:41 justin_smith: whee: not really, just a common pattern

18:41 patchwork: I guess 10 months ago is awhile in clojurescript time

18:42 abp: technomancy: Well, something like, write types or know what you are doing anyway and check where necsessary would've been more in my favour, but ok. :P

18:42 patchwork: Anyone have a current method for compiling cljs from a clojure repl?

18:42 hyPiRion: whee: it's in the useful library

18:42 callen: technomancy: mis-inference of types in Damas-Milner based languages like OCaml and Haskell is *really* common for me. I don't know how you avoided bumping into that.

18:42 hyPiRion: (the lib named useful)

18:42 technomancy: abp: I like getting yelled at when there's a mistake, sure.

18:42 callen: like overlapping field names or other stuff?

18:43 callen: technomancy: No not even that. I had to write interface files for my functions in OCaml.

18:43 whee: hyPiRion: perfect...I'll go check that out; thanks

18:43 abp: technomancy: Who doesn't? But let's say constructively being talked to.

18:44 technomancy: abp: I've noticed a dramatic decrease in ESL-based grammatical errors in the compiler messages just in the last 2 years

18:45 noonian: hyPiRion: is useful just a bunch of miscellaneous useful functions?

18:46 hyPiRion: noonian: afaik, yes.

18:46 abp: technomancy: And really, I'm talking about http://blog.fogus.me/2012/06/20/not-enough/ vs "a pure dynamic language is always the right thing"

18:46 futile: ok, gotta get some work done

18:46 noonian: whee: you could also use zipmap, (zipmap (keys m) (map f (vals m))) but i don't think it's any more elegant than what you were doing

18:46 hyPiRion: cool

18:47 cemerick: dnolen: you mean on github, or elsewhere?

18:47 technomancy: anyone know if `lein upgrade` is still busted on windows? https://github.com/technomancy/leiningen/issues/1150

18:47 abp: technomancy: Well, C and C++ while just starting out in programming puts compiler yelling in perspective. More like vomitting VS6...

18:47 technomancy: abp: see I would love to see a compiler that's hooked up to insult generation algorithms

18:48 cemerick: callen: improve what?

18:48 technomancy: :compiler-insults :shakespeare in defproject or something

18:48 hyPiRion: technomancy: you can do that with sudo, it's neat

18:48 technomancy: hyPiRion: love it

18:48 hyPiRion: they are predefined though

18:49 technomancy: yeah, we can do better than that

18:49 callen: cemerick: pomegranate.

18:49 cemerick: callen: in what way?

18:49 callen: technomancy: what was your objection?

18:50 cemerick: The aether stuff is radioactive. I consider that part of the library to be a failure.

18:50 technomancy: callen: to which?

18:51 justin_smith: I would like to see a compiler with zalgo errors

18:51 the more you fuck up your code, the more unintelligible the output

18:52 abp: technomancy: Easy, just dont use alphanumerics. Sorry hyPiRion. :)

18:54 hyPiRion: every time you hit a compile error, the compiler converts your code to swearjurian.

18:54 abp: hyPiRion: Oh I just found an application for a subset of swearjure. :)

18:55 hyPiRion: abp: the error message thing or what? :o

18:56 abp: hyPiRion: The insult generation algorithm for the compiler, quite manual but.. wait: "Please use "!$%&/-;:.,=" for symbols would be approptiate. :)

18:57 hyPiRion: heh

18:57 abp: ah, quote miss

18:57 hyPiRion: I'm doing something which can turn into something like that

18:58 Swear at you when your tests fail

18:58 abp: Also with workflow integration?

18:58 hyPiRion: well, with lein test.

18:59 coincidentally I'm writing tests for it now

18:59 abp: The five whys for your project: 1. Make an easy target.

18:59 Does it work for you? ;P

18:59 muhoo: so far, nothing i've seen beats cljs stacktraces for the wtf factor

18:59 hyPiRion: abp: oh yeah, it does

19:00 actually, I designed it because I got bored of waiting for the Leiningen test cases to finish

19:00 so I wanted to get some sound signal whenever those test finished.

19:00 abp: muhoo: huh? I've seen quite well put error messages with offending js using browser nrepl.. after 5 minutes of programming.

19:00 muhoo: That's all I did in ClojureScript :x

19:01 hyPiRion: Ah like yelling at you while your program fucks up?

19:02 hyPiRion: abp: well, more like signalling when the test suite has finished

19:02 but it could be used for that later on, yes.

19:02 abp: hyPiRion: yeah, the word *sound* arrived even in my brain by now. :)

19:04 muhoo: abp: it's been a few months since i did any cljs, but i'm pretty sure i saved or maybe posted some good ones.

19:04 abp: hyPiRion: Yeah lets hook up swearing samples to failed tests and let all tests run allways.

19:04 muhoo: wow, just browsing my history on reheap, it's like a catalog of fail. every broken thing that's baffled me for a year is there in one convenient place :-/

19:04 justin_smith: swear at you if tests fail, swear twice as much if you push without running tests

19:05 abp: muhoo: Like life: fail<->fail, get used to it or die?

19:06 justin_smith: CI

19:06 justin_smith: more like CS

19:06 muhoo: abp: more like get used to it, and die. the dying part isn't really a choice.

19:06 abp: muhoo: Yeah but let it be the later part also, please.

19:07 muhoo: the learning part, happily, is.

19:08 * muhoo sings "all i want to do is have a little fail before i die. said the man in the chatroom next to me. out of nowhere, apropos of nothing".

19:09 abp: muhoo: That's the wise reaction. :P

19:13 Fer`: Hi there, is there a better idiom for (some identity coll) ?

19:13 ThatOneGuy: depends on the coll

19:13 Fer`: I just wanna check if there is anything non nil on it

19:14 it's a seq

19:14 ThatOneGuy: lazy-seq?

19:14 hyPiRion: (not-any? nil? coll) sounds better then

19:14 technomancy: depends on whether you care about false vs nil

19:14 hyPiRion: er.

19:14 Fer`: no its nil vs something because its the result of mapping re-seq

19:14 hyPiRion: not-every?*

19:15 Fer`: i'll use not-every? :-)

19:20 Wait that ends up being (not-every? (complement nil?) ..). I'm not sure if that's worse :-P

19:21 Oh just every? :-)

19:21 hyPiRion: not every element is non-nil.

19:21 some element is nil

19:27 abp: Fer`: (assert (not-any? ::unbound cells) (str "Got unbound cell: " (some ::unbound cells)))

19:27 Fer`: That was a nice line to write. :)

19:27 callen: muhoo: CLJS stackstraces with core.async are worse.

19:27 muhoo: way, way worse.

19:28 muhoo: you end up balls deep in a state machine you didn't have any real participation in. I'd rather debug Ragel C output.

19:28 core.async is amazing, but the debugging...z0mg.

19:28 abp: callen: on modern things. :) Have your read http://hueypetersen.com/posts/2013/08/02/the-state-machines-of-core-async/

19:29 callen: abp: on modern things what?

19:29 yes I've read that.

19:29 abp: callen: you

19:29 callen: ah ok, I thougt it helps/mitigates

19:30 callen: technomancy: what do you want fixed in pomegranate before you're comfortable recommending it?

19:31 is this accurate? "Pomegranate is being used by Leiningen v2.x as its sole dependency resolution library. This has prompted rapid maturation of the scope and quality of Aether support."

19:31 abp: callen: https://github.com/swannodette/Ejecta just blew me awaey, conceptually, let alone core.async on cljs error msgs..

19:32 Is anyone in here using pallet for automation besides the clouds?

19:32 callen: abp: no, I avoid it all costs and use Fabric or Ansible instead.

19:32 abp: Or virtualboxes...

19:32 callen: virtualboxes aren't an automation methodology.

19:32 they're a stateful machine image.

19:33 abp: callen: No but well supported by pallet, but thanks. :P

19:33 technomancy: callen: oh, I'd want something that could save off the old project.clj, compare it with the new one, and dynamically add new dependencies to the classpath where possible and issue huge warnings (or maybe abort) where not.

19:33 abp: /query hypirion

19:33 callen: technomancy: sounds magical.

19:34 technomancy: sufficiently advanced technology, &c

19:34 abp: nice one

19:34 callen: technomancy: I'm not totally sure why one would want to munge the user's project.clj. AFAIAC pomegranate is to make working in a REPL less-annoying.

19:34 ala Quicklisp.

19:35 and yes, this is something Common Lisp already had

19:35 and it works fine.

19:35 technomancy: callen: no, I mean the user would edit project.clj and then go to the repl and be all "hey repl, become the change you want to see in the world" or wahtever

19:35 boom

19:36 callen: technomancy: oh, now I get it.

19:36 kmicu: BOOOOOOM

19:36 callen: technomancy: that's fucking sweet.

19:36 technomancy: callen: maybe we can convince futile to do it

19:36 oh, he left

19:36 callen: I don't think I've seen you overtly troll like that before.

19:37 technomancy: my next project is Rack::attack for Ring. I'll add this to the list.

19:37 technomancy: callen: I try to talk people into writing software I want all the time

19:37 it's how clojurebot exists

19:41 callen: well cemerick probably isn't going to do it.

19:41 he's too busy with not doing anything ever that he doesn't want to do.

19:44 hugod: ritz has support for reloading a changed project.clj file

19:44 ThatOneGuy: I'm in the same boat. The only thing keeping my attention is project euler problems in clojure. I should be working at work :'(

19:48 callen: hugod: if only I could figure out how to debug code with it.

19:48 I would love something like this one-liner for Clojure: 'import sys; sys.stdout = sys.__stdout__; import ipdb; ipdb.set_trace()'

19:53 hugod: callen: and what does that do exactly?

19:53 supersym: what were you talking about trying to get, reload a project without repl restart?

19:54 technomancy: hugod: huh; I think you told me that once and I forgot

19:54 will have to try that out

19:54 hugod: have you tried my nrepl-discover thingy yet?

19:54 callen: hugod: rehooks stdout and trips a pdb-based debugger that uses the ipython shell.

19:54 hugod: technomancy: sorry, no - I've not done anything on ritz/nrepl since c/west

19:54 callen: hugod: it's convenient, easy to use, and powerful enough for almost any Python debugging use-case.

19:55 hugod: and you get to debug your code in terms of the native language (python) not something eldritch underneath.

19:56 arohner: is it possible to deliver an exception w/ promise/deliver?

19:56 supersym: callen: you said 'like this one-liner for CLOJURE'..how is that?

19:57 callen: supersym: you misunderstood what I was saying.

19:57 supersym: right :P

19:57 callen: supersym: it's a Python one-liner, I'd like something comparable *for* Clojure.

19:57 supersym: well as in the one-liner or the debugger or...

19:57 now I'm all confused :)

19:58 since we dont have a debugger that I know of,...nor do we really care about lines? :P

19:59 callen: arohner: wrap it in an fn and deliver an executable?

19:59 arohner: https://www.refheap.com/17420

20:00 exceptions aren't values, so what you're asking for is a little odd.

20:01 you could do some magic with slingshot if you were so inclined, probably a waste of time though.

20:05 ToxicFrog: supersym: "here is a python one-liner that activates useful debugging features. It would be nice if clojure had an equivalent, both in "usefulness of debugger" and "ease of activation"."

20:05 callen: ToxicFrog: gracious of you, thank you.

20:21 technomancy: https://mail.mozilla.org/pipermail/rust-dev/2013-August/005158.html

20:40 technomancy: why is that wondermark comic your status?

20:46 technomancy: callen: I'm trying to be positive, so I'd rather not go into detail.

20:48 it's not about ocaml or rust if that's what you're wondering =P

20:55 callen: http://michid.wordpress.com/2010/01/29/scala-type-level-encoding-of-the-ski-calculus/

21:08 srruby: Any opinion on the value of clojure conf? I have to pay from my own pocket from california. I'm an experienced Ruby dev. Thanks, John

21:10 mlb-: I feel like I'm missing something: aside from conj operating differently, what is the difference between lists and vectors?

21:14 callen: mlb-: they're different data structures with different performance characteristics and syntax.

21:14 conj'ing a list is a head cons, conj'ing a vector is an append.

21:14 mlb-: where's your book?

21:19 jcromartie: had too much to drink, typed "hookup" instead of "hiccup"

21:19 not going to work

21:22 schaefer: core.logic question: i want some interop between a core logic program and clojure. core.logic/project nearly gives me what i want but if the lvar is not ground, i don't want to execute the code within the projection. ideally, i'd like project to fail if the listed lvars are not ground.

21:23 how can i write a goal that fails if the lvar is not ground?

21:23 seems like this is a fairly common case. i'm figure i must be missing something in the library

21:23 brehaut: schaefer: does a non-grounded lvar unify with itself?

21:24 schaefer: yep: (l/run 1 [q]

21:24 (l/== q q))

21:24 returns (_0)

21:24 hiredman: schaefer: I would recommend rewriting to avoid project

21:24 Fretsejaz1: Quick question, for the vim users in here, would you recommend https://bitbucket.org/kotarak/vimclojure for a setup?

21:25 hiredman: schaefer: can you not express what you want purely using core.logic?

21:25 brehaut: Fretsejaz1: not a vim user, but i think tim pope and cemerick have the current popular choice?

21:25 schaefer: would love to... here's what i'm trying to achieve: i want to use core logic to traverse a graph. i've got clojure functions to return the next and prev.

21:26 for toy programs, i could express the graph using defrel and facts but that's not going to fly in production

21:26 hiredman: ah, so you need next and prev relations then

21:27 schaefer: yes

21:27 jcromartie: why the heck is file-seq not in clojure.java.io

21:27 hiredman: yeah, even dnolen isn't very keen on defrel and facts these days

21:27 jcromartie: :{ seems to be quite inextricably tied to java.io.File

21:27 schaefer: i was looking at using IUnifyTerms but that seems overkill for what i'm trying to do

21:27 hiredman: schaefer: have you looked at the internals of core.logic yet?

21:28 cemerick: Fretsejaz1: vim-fireplace is the current favorite AFAIK

21:28 schaefer: hiredman: heheh. yeah, i've looked but not groked :) if there is no straightforward answer, i'll spend more time studying the code

21:28 hiredman: schaefer: dnolen has given some talks here and there on the internals

21:29 schaefer: hiredman: thanks. i'll check those out

21:29 hiredman: a core.logic goal/relation is a function that returns a substitution

21:30 so (core.logic/== x y) returns something like (fn [substitution] ....)

21:30 I should say it takes a substitution and returns it if the goal succeeds

21:31 schaefer: ok. looks like i need to understand the substitution map data structure

21:36 mlb-: callen: okay, knowing they have different perfromance traits iswhat I didn't know. Also, no book. Just breifly going through tutorials as I can find them

21:37 jcromartie: mlb-: I can't blame you for the confusion

21:37 it is a little unclear why you'd ever choose a list

21:38 except when building code to be evaluated, as in a macro

21:38 schaefer: hiredman: fyi - turns out there are existing lvaro and nonlvaro goals (macros) which test whether an lvar is ground or not. hopefully, a clever combination of these and project will work

21:39 jcromartie: mlb-: conj'ing on the front combined with drop turns out to be a decent enough implemenation of a persistent stack structure

21:42 schaefer: yep, that was the trick: you have to use a lnonvaro in conjunction with project in order to ensure that the lvar is ground before passing it into the clojure fn

21:43 i don't mind using project in this case since i have clojure functions for getting both successors and predecessors. i *think* this ensures the core.logic goal is relational

21:51 brehaut: apropos nothing at all, does anyone have a recommendation for browser based presentation stuff?

21:52 trinary: brehaut: make everything as big as possible: https://github.com/tmcw/big/

21:53 brehaut: sorry, i meant software

21:53 unless that was a pun?

21:54 trinary: not really a pun, bit of a joke but that will let you get slides in a browser in a very simple way. :)

21:55 brehaut: right

21:56 trinary: do you mean things that do slide layout, timers, notes, and so on?

21:56 brehaut: yeah basic slide layout from a bunch of html

21:56 timers i dont need so much but notes would potentially be nice

21:57 hiredman: I spent a good deal of the last conj playing with impress to make slides for my lightening talk that ended up being in a room without a projector

21:57 trinary: hah

21:58 xeqi: heh, but everyone still loved the robot

21:58 hiredman: I think the guy behind me got motion sickness watching the transitions

21:58 trinary: yeah impress.js lets you do a lot of crazy transforms prezi.com style, and I think has addons that do notes/layout helpers

21:58 hiredman: http://thelibraryofcongress.s3.amazonaws.com/conj2012-robot/index.html

21:58 trinary: nice

21:59 brehaut: hiredman: holy cats!

21:59 hiredman: like a michael bay movie

21:59 brehaut: haha

21:59 its beachballed firefox

22:01 hiredman: :|

22:01 trinary: https://github.com/bartaz/impress.js/wiki/Examples-and-demos links to things that help make/use impress slides

22:01 http://strut.io/ looks cool

22:01 brehaut: yeah thats a lot better in chrome

22:02 how often does sun.misc.Unsafe end in tears

22:04 hiredman: hard to say, for me I have only ever used it hear, and it has worked out fine

22:05 it means the only jni I needed for fiddling with pins directly in memory instead of via the fs is exposing a simplified mmap interface to java

22:05 brehaut: nice

22:40 axle_512: question for emacs users: Does anyone have something like a namespace browser within emacs?

22:41 I suppose the autocompletion in an *nrepl* buffer is pretty close to a namespace browser

22:45 ToBeReplaced: is the right way to get the later of two datetimes (if (after? a b) a b)? ie, no "max" or comparable methods?

22:51 gfredericks: ToBeReplaced: this is a question about clj-time?

22:51 ToBeReplaced: and/or joda-time

22:54 gfredericks: ,(max (java.util.Date. 7) (java.util.Date. 842))

22:54 clojurebot: #<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>

22:54 gfredericks: ,(< (java.util.Date. 7) (java.util.Date. 842))

22:54 clojurebot: #<ClassCastException java.lang.ClassCastException: java.util.Date cannot be cast to java.lang.Number>

22:54 gfredericks: ,(compare (java.util.Date. 7) (java.util.Date. 842))

22:54 clojurebot: -1

22:54 ToBeReplaced: gotta use compare for Date

22:54 gfredericks: hm

22:54 presumably joda-time is similar

22:55 ToBeReplaced: joda-time has a .isAfter method on instants, and clj-time wraps that into an after? method, which you can use

22:56 nothing wrong with what i typed above, it just felt like a common enough operation that i was expecting a shorthand

23:05 uvtc: Just noticed <https://github.com/clojure-emacs> today. Seems to be the new home for all things Clojure+Emacs. Nice.

23:15 futile: oh

23:26 The paredit thread makes me sad.

23:26 It's like trying to explain to a BASIC programmer how wonderful lambdas are.

23:27 They take offense to it, and nobody wins.

23:27 technomancy: clojurebot: popcorn please

23:27 clojurebot: Titim gan éirí ort.

23:27 futile: Not that they aren't capable, in fact quite the opposite: they could learn it and love it if they just tried.

23:27 They just have the mindset of "it's not for me" and that's stopping them from experiencing how great it is.

23:28 fin.

23:29 axle_512: futile: I generally prefer paredit, but I do occasionally get myself into a jam where I can't fix things without turning it off for a minute.

23:29 futlie: that's probably my own fault, and I just need to learn paredit a little better.

23:29 futile: axle_512: I've had that happen too, when I accidentally copy/paste a by lines rather than by s-expressions, etc.

23:29 axle_512: futle: yes, exactly

23:29 cgag: yeah that's a normal art of the process, occationally needing to turn it off

23:30 afaik

23:30 futile: But that's true of any tool. Sometimes it bites you because no tool is perfect.

23:30 But this particular one is more true without paredit ;)

23:31 jcromartie: are there any really dumb Clojure text file template tools out there?

23:31 I just made one

23:31 it's real dumb

23:31 technomancy: clojurebot: paredit?

23:31 clojurebot: paredit is not for everyone, but what you need to understand ís how to become the kind of person that paredit ís for.

23:32 uvtc: hehe

23:32 technomancy: clojurebot: botsnack

23:32 clojurebot: thanks; that was delicious. (nom nom nom)

23:32 axle_512: jcromartie: A template tool like YASnippet?

23:32 jcromartie: no, for arbitrary text files

23:32 static site generation

23:32 axle_512: I see

23:32 jcromartie: I saw misaki

23:33 futile: technomancy: http://bit.ly/13Uo4XJ

23:33 jcromartie: but there's nothing quite as simple as ERB

23:33 axle_512: jcromartie: clostache?

23:33 technomancy: futile: it's the truth

23:34 futile: technomancy: I know I just had that URL in my pasteboard and felt like it was a good opportunity

23:34 jcromartie: axle_512: I like it

23:34 * futile is hacking some awful CSS

23:35 axle_512: jcromartie: cool. Yes, I've used it a bit and I like it quite a bit.

23:35 jcromartie: axle_512: I'll see how this one I just rolled works out

23:35 I am not sure mustache is quite right

23:35 axle_512: jcromartie: is yours available on github?

23:35 jcromartie: not yet

23:35 it's just a namespace righ tnow

23:36 axle_512: ah ok

23:36 jcromartie: I need to work out the file generation part

23:36 I was looking at Jekyll but it seemed like they made a lot of decisions ahead of time like being blog-oriented

23:36 I could just build my site with Compojure and Hiccup

23:36 I guess

23:37 instead of trying to do it with static pages

23:37 but I like the idea of lightweight pre-rendered pages

23:37 I dunno, as long as I'm paying for Linode, might as well run Compojure

23:37 technomancy: jcromartie: the seajure website is a static html output thing

23:37 futile: I'm about to have a whole weekend with no family in the house. I need a biggish-sized side project to do.

23:38 I'm leaning towards writing a Clojure IDE in Clojure.

23:38 With minimal features, only the main ones I want.

23:38 technomancy: futile: why not nightcode?

23:38 futile: technomancy: not the same feature-set-priorities as me

23:38 *as mine

23:39 But I'll definitely use Seesaw.

23:41 jcromartie: technomancy

23:42 technomancy: looks like a good use of enlive

23:42 I guess that's kind of the point of enlive huh?

23:42 technomancy: well TBH it's 100% cargo culted

23:42 but sure =)

23:44 callen: jcromartie: https://github.com/yogthos/Selmer

23:44 futile: that already exists.

23:44 futile: it's called Clooj.

23:45 technomancy: callen: and nightweb, and waterfront.

23:45 *nightcode

23:47 futile: waterfront?

23:48 hm

23:48 looks old

23:48 technomancy: http://javadots.blogspot.com/2009/03/stroy-of-waterfront.html

23:48 super old

23:48 futile: uses sf

23:48 doesnt seem to hold same priorities as me

23:50 scottj: what are your priorities, other than a really basic editor, obviously?

23:51 futile: scottj: Sorry can't answer, I have a bad cold and need to sleep.

23:51 Good night.

23:52 scottj: futile: sorry to hear that, hope you get better. gl

23:53 axle_512: hmm, he left with all that suspense

23:53 that was cruel

23:53 haha

23:55 technomancy: what's special about seajure's site?

23:56 ToBeReplaced: i have [x y z] [[1 4 5] [2 7 8] [3 6 9]] are all monotonically increasing seqs ... i want a lazy-seq that takes the lowest element from the heads of x y z... thoughts?

23:56 axle_512: jcromartie: another interesting approach is to use something like angular.js instead of server-side template generation

23:56 ToBeReplaced: above would yield [1 2 3 4 5 6 7 8 9]

23:58 technomancy: axle_512: nothing; just boring static HTML

23:58 axle_512: technomancy: ah, gotcha

Logging service provided by n01se.net