#clojure log - Jan 20 2014

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

0:00 ryantm: egghead, okay, it seems like either you need to choose a different :root at runtime or package the jar with a different resources directory

0:01 egghead, I'm not sure how to do the latter, but it seems like it would be preferable

0:02 egghead: hm could probably use lein profiles for that

0:02 ryantm: egghead, it looks like you can set :resource-path in :profiles

0:02 https://github.com/technomancy/leiningen/blob/master/sample.project.clj

0:03 egghead: ya, thats a good idea, thanks ryantm

0:03 ryantm: egghead, you're welcome

0:21 tpope: gtrak: haven't attempted that yet, no

0:31 eraserhd: Is it idiomatic to define a protocol for use internal to a package when using deftype? E.g. accessors for fields?

0:32 amalloy: no. just define a function; there's no need to physically attach it to the object as a method

0:32 eraserhd: amalloy: Then how do I access fields?

0:32 amalloy: (.foo obj)

0:33 eraserhd: amalloy: Oh. That's not in the deftype docs... (unless I missed it)

0:33 amalloy: it's just how you access a field of any object

0:34 http://clojure.org/java_interop

0:35 dj_ryan: is there a way to do circularly dependent java/clojure code?

0:35 or is it limited to one way only?

0:39 saj_: Hi, I have a question about 'require'

0:41 ryantm: saj_, ask it

0:42 saj_: regarding the :refer option, from reading the documentation something like (ns blah.core (:require [compojure.core :refer [defroutes])) should bring defroutes into the blah.core ns

0:42 but that's not what's happening for me when I try it out; it says it can't resolve defroutes

0:44 logic_prog: when should I use async/thread instead of using async/go ?

0:45 saj_: I've read about 'require' being able to replace 'use' using the :refer option, but the options seem to be ignored as far as I can tell

0:47 ryantm: saj_, what version of clojure are you using?

0:48 saj_: oh :/ 1.3.0

0:48 let me try updating that to the current version first...

0:50 ryantm: Your example works for me in Clojure 1.5.1

0:51 ddellacosta: what does :scope do in leiningen dependencies? For example, in Om: https://github.com/swannodette/om/blob/master/project.clj#L12-L13

0:56 saj_: ryantm: thanks, that was the problem

0:58 ryantm: ddellacosta, I think it's a dependency that is only necessary for the :provided profile

0:58 saj_, you're welcome

0:59 ddellacosta: ryantm: is "provided" an implicit default then? I guess I was confused as I was looking for a "provided" profile per the leiningen sample project (https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L46)

1:01 ah, I see that it is... https://github.com/technomancy/leiningen/blob/stable/doc/PROFILES.md

1:01 okay, my bad--thanks ryantm !

1:02 ryantm: docstring for default-profiles in project.clj "Profiles get merged into the project map. The :dev, :provided, and :user profiles are active by default."

1:05 https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/project.clj#L405

1:05 quizdr: from the standpoint of lazyness and resource use, are these two fibonacci definitions more or less the same: (def head-fibo (lazy-cat [0N 1N] (map + head-fibo (rest head-fibo)))) and (defn fibo [] (map first (iterate (fn [[a b]] [b (+ a b)]) [0N 1N])))

1:09 actually i guess the first one is head-retaining, the second one isn't since it's a function

2:07 danneu: What's the simplest way to 'schedule an event' in clojure, like cooking a cache every 30 seconds?

2:11 noidi: I don't know if Quartzite the simplest, but it isn't too hard to use http://clojurequartz.info/

2:12 ddellacosta: danneu: also take a look at the timeout function in core.async, could be a relatively lightweight way to do you want: http://hueypetersen.com/posts/2013/07/10/code-read-of-core-async-timeouts/

2:13 danneu: ddellacosta: that was actually the simplest idea i could think of. just spawn some go-loops with (<! (timeout x))

2:14 ddellacosta: danneu: yeah, I haven't done a lot of that sort of thing myself, but it strikes that it is probably the simplest and (recently) most idiomatic way to do it in Clojure.

2:14 strikes *me

2:29 dsrx: is there a way to destructure properties on javascripts objects in cljs?

2:39 TheBusby: Will core.async let you do the following? (def out-chan (async/map identity [in-chan])) ?

2:39 I'm having issues where it only works sometimes, but other times if "out-chan" is defined without anything in "in-chan" then it doesn't wait for input

2:42 ddellacosta: dsrx: as far as I know you have to convert to a cljs data structure first, using js->clj

2:45 quizdr: would it be appropriate to say that def is like common lisp's defparameter while defonce is like defvar?

2:48 dsrx: ddellacosta: aight, thanks

2:49 ddellacosta: quizdr: my impression of defparameter is that it is more like an atom

2:49 quizdr: or perhaps like def w/dynamic set

2:50 quizdr: ok, you are right about the dynamic part, i was thinking more in terms of what happens when you def a var that already exists. scoping would be another matter, you are right.

2:50 ddellacosta: quizdr: defvar seems more like a direct analog to def. As far as defonce, I don't know enough about common lisp to know if there is an appropriate analog. defonce seems to exist in order to handle idiosyncrasies with out namespaces get loaded in clojure.

2:52 quizdr: yeah, sorry I don't know enough common lisp to say much more--that was just based on my quick lookup of how those two work in CL.

2:52 quizdr: no problem. in CL both defvar and defparameter are dynamic

2:55 anyone in here use a stand-up desk, so you aren't always sitting down?

2:58 ucb: quizdr: I do

2:58 TEttinger: I'm sitting on my right foot now.

2:59 quizdr: i fashioned something together with a chare and a small ikea table

2:59 works but not so stable

3:23 logic_prog: dnolen: ping

3:23 dnolen: for your next blog post, can you consider writing it about erorr ahndling in clojure?

3:24 dnolen: i find that as I write larger and more complicated distributed systems, > 50% of my code is daeling with error handling / exceptions

3:24 dnolen: I'd love to read a well thought piece on error handling in clojure, i.e. patterns built on top of slingshot try+/throw+

3:34 fredyr: logic_prog: would you mind expand a bit on what you run into?

3:36 bitemyapp: logic_prog: not sure why you'd ask somebody that does mostly front-end and CLJS about error handing and distributed systems.

3:36 logic_prog: bitemyapp: do you blog?

3:36 bitemyapp: point at who I should bother instead

3:36 bitemyapp: logic_prog: It's not the end-all be-all, but I rather like this for making logic and error-handling independent: https://github.com/michaeldrogalis/dire/

3:36 logic_prog: where is Rich

3:37 marcopolo`: lol

3:37 logic_prog: damn, it's erlang inspired

3:37 I'm interested

3:37 bitemyapp: there's some material to be stolen from Erlang on this subject.

3:37 logic_prog: fredyr: basically, I'm reading Joe Armstrong's programming erlang

3:37 bitemyapp: logic_prog: there are some monadic error handling approaches you could learn about from Haskell too.

3:37 logic_prog: fredyr: and writing a distributed web app in clojure/cljs

3:37 bitemyapp: logic_prog: "distributed"?

3:37 fredyr: logic_prog: right, i was actually going to recommend armstrongs thesis

3:37 bitemyapp: logic_prog: distributed how? Generally you're talking stateless clients and a database.

3:38 logic_prog: fredyr: and I'm thinking ot myself, damn, I have async/go for processes, now I wish I have erlang-like error handling

3:38 bitemyapp: i'm basically rolling my own meteor/firebase in clojure

3:38 well, clojure + cljs

3:38 bitemyapp: still not what's colloquially understood to be a distributed system.

3:38 it's a mechanism for factoring out CRUD.

3:39 logic_prog: well, riak + key / value store is involved

3:39 and i'm using multiple machines

3:39 if multiple machines is not distributed, what is?

3:39 marcopolo`: the firebase part sounds pretty distributed

3:40 * bitemyapp rubs face and groans

3:40 bitemyapp: just because you're using a replicated database doesn't mean you're really confronting anything about distributed systems

3:40 you're writing a client, an API server, and another client.

3:40 that's all firebase is.

3:41 logic_prog: no no, I'm writing this layer

3:41 which amkes real time web apps trivial to write

3:41 bitemyapp: that's like saying because I can change my car's oil and top the fluids, I'm a Formula One pit mechanic.

3:41 logic_prog: there's multiple clients, + a clojure server

3:41 bitemyapp: logic_prog: it's not real-time.

3:41 logic_prog: riak is not, my stuff is

3:41 over websockets

3:41 marcopolo`: I guess the distributed part is in the database

3:41 bitemyapp: logic_prog: no, it's not.

3:41 logic_prog: you're misusing words.

3:42 logic_prog: bitemyapp: I'm writing a single page web app, supporting rela time chat + rela time blackboard

3:42 bitemyapp: logic_prog: real-time means bounded latency, extreme limits, maximum reliability.

3:42 logic_prog: if you're using a programming language with garbage collection, it's NOT real-time

3:42 logic_prog: I consider IRC to be real time

3:42 bitemyapp: logic_prog: I think you mean streaming API via websockets, not real-time.

3:42 fredyr: logic_prog: www.erlang.org/download/armstrong_thesis_2003.pdf

3:42 bitemyapp: logic_prog: that's not what real-time means and I'm finding it really difficult to talk to you right now.

3:42 AeroNotix: "Real-time" has become far too an overloaded term

3:42 bitemyapp: logic_prog: IRC is also a streaming protocol over a socket.

3:42 logic_prog: bitemyapp: by your definition, anything over the internet is not real time

3:43 bitemyapp: since you can't guarantee latency

3:43 bitemyapp: AeroNotix: it's actually really fucking simple.

3:43 AeroNotix: bitemyapp: I get what it means, originally.

3:43 fredyr: logic_prog: the architecture parts is really good, and iirc programming erland doesn't focus on those parts

3:43 bitemyapp: logic_prog: not really no, real-time is a property of a system. A design goal.

3:43 marcopolo`: bitemyapp: "'When I use a word,' Humpty Dumpty said, in rather a scornful tone, 'it means just what I choose it to mean — neither more nor less.'"

3:43 -Through the Looking Glass

3:43 AeroNotix: At $DAYJOB I program Erlang, wouldn't mind answering any questions.

3:44 logic_prog: AeroNotix: is erlang rela time? erlang has a gc

3:44 AeroNotix: this library here leaves a bit to be desired, it looks like it just parameterizes try/catch

3:44 logic_prog: I never, ever said Erlang was real time..

3:44 bitemyapp: logic_prog: erlang's GC is designed around soft real-time constraints, the JVM's is not.

3:44 logic_prog: and it's still, AT BEST, soft real-time.

3:44 AeroNotix: though, Erlang has a pretty interesting design for its garbage collector.

3:45 Each scheduler has its own GC, which means you can't block the other schedulers when GCing

3:45 logic_prog: bitemyapp: upon further research

3:45 bitemyapp: it looks like you are right

3:45 bitemyapp: No fucking shit.

3:45 You can't really do GC in a real-time system. Hell, you can't even really use vanilla malloc due to heap fragmentation. You're generally talking statically allocated memory.

3:45 logic_prog: bitemyapp: thanks for clarifying the definition of relatime (not sarcastic; apparently I was wrong)

3:46 AeroNotix: bitemyapp: No need to be like this.

3:46 logic_prog: no no, I like people who can't tolerate incorrectness

3:46 bitemyapp: logic_prog: it's fine, I just get tired of hearing startup bullshit repeated back to me

3:46 logic_prog: I don't want some "yeah, it's sorta almost correct" person writing my airplane software

3:46 AeroNotix: logic_prog: why are you always writing relatime?

3:46 logic_prog: or nuclear plant / power grid software

3:46 AeroNotix: relatime is a thing for filesystems

3:46 bitemyapp: logic_prog: I live in the bay area and I have people describe things like websockets as "real-time" to me all the time when I grew up learning from programmers that worked on actual real-time and embedded systems. The trivialization of serious, difficult engineering work is a pet peeve in the extreme for me.

3:47 logic_prog: AeroNotix: because I should have been saying stremaing instead

3:47 AeroNotix: logic_prog: rela vs real

3:47 bitemyapp: and the popularization of streaming socket-based protocols is a good thing. They make certain modalities/applications more efficient.

3:47 logic_prog: AeroNotix: latency in my keyboard

3:47 bitemyapp: but they're not real-time.

3:47 fredyr: non real time keyboard

3:47 :)

3:47 logic_prog: bitemyapp: we hold a mutual disregard for people who believe CSS + Javascript = computer science

3:47 AeroNotix: bitemyapp: unfortunately, real-time has also this meaning

3:48 logic_prog: bitemyapp: do you intend to do a startup someday?

3:48 bitemyapp: how much would it cost to hire you away from your current job?

3:49 TEttinger: logic_prog, if you have to ask, you're not worthy *lifts nose in the air*

3:49 * ddellacosta munches on popcorn

3:50 AeroNotix: Yeah, also if you lead a proposition with a money offer, I get suspicious

3:50 back to that 'Erlang supervisors for Clojure'

3:51 it just look like it parameterizes try/catch blocks and allows you to add new catch expressions at runtime.

3:51 bitemyapp: logic_prog: I gave up a substantial chunk of income to take my current job, so it's hard to compete on that level unless it's "retire in 3-4 years" money.

3:51 AeroNotix: Doesn't really look like a supervision tree

3:51 A supervisor fundamentally needs to be able to arbitrarily kill any other Pid in the system

3:52 bitemyapp: logic_prog: I earn a salary typical for senior engineers at startups in SF.

3:52 AeroNotix: bitemyapp: out of curiosity, what is that?

3:52 I'm in PL

3:52 But I get paid very well for PL

3:52 marcopolo`: PL?

3:52 bitemyapp: Portland?

3:52 AeroNotix: poland

3:52 logic_prog: junior enginer is $100K

3:52 bitemyapp: oh, well nevermind then.

3:52 logic_prog: top junior is $200k / year

3:52 ddellacosta: wat

3:52 logic_prog: senior engineer should be up around 300-400k / year

3:53 TEttinger: waaaaaat

3:53 bitemyapp: er, no.

3:53 ddellacosta: where do I sign up

3:53 AeroNotix: according to the googles I get $68k

3:53 ddellacosta: I'll be junior

3:54 bitemyapp: http://www.indeed.com/salary?q1=Senior+Software+Engineer&l1=San+Francisco

3:54 * ddellacosta considers moving

3:54 AeroNotix: but considering that minimum wage is $6k, I'm pretty happy.

3:54 also, AeroNotix has potato now

3:54 fredyr: programmer fantasy league

3:55 :s

3:55 bitemyapp: ddellacosta: yeah but a house is $1,300,000 and rent for a two bedroom is $3k/mo

3:55 AeroNotix: lol latvia

3:55 * ddellacosta changes his mind

3:55 sm0ke: guys

3:55 AeroNotix: bitemyapp: I'm not Polish fwiw.

3:55 ddellacosta: bitemyapp: yah, Tokyo's not bad, I can't complain.

3:55 AeroNotix: I just moved here because I'm an idiot.

3:55 sm0ke: how do i defined a static final field in gen-class?

3:55 bitemyapp: AeroNotix: yeah why did you do that?

3:55 AeroNotix: bitemyapp: I have a Polish wife

3:56 marcopolo`: sm0ke: I thought that was default?

3:56 bitemyapp: AeroNotix: yeah why did you do that?

3:56 haha, jk jk :)

3:56 ddellacosta: AeroNotix: that's absolutely insane, I would never move anywhere for a foreign wife

3:56 AeroNotix: ddellacosta: are you 12?

3:56 * bitemyapp snorts

3:56 ddellacosta: AeroNotix: sorry, bad joke. I live in Japan married to a Japanese woman. ;-)

3:56 AeroNotix: not funny without context.

3:56 sm0ke: marcopolo`: just final i guess

3:57 AeroNotix: ddellacosta: ohhh ok

3:57 sm0ke: marcopolo`: static final?

3:57 logic_prog: http://michaeldrogalis.tumblr.com/post/46560874730/beautiful-separation-of-concerns <-- this is pretty nifty

3:58 ddellacosta: logic_prog: just saw that the other day. I don't end up using exceptions that much in Clojure though, haven't had a big use for dire yet. Maybe I'm doing something wrong.

3:58 sm0ke: so is it possible to have serialVersionUID in gen-class generated class?

3:58 logic_prog: ddellacosta: your computer is afraid of you and never dare do anything wrong

3:58 unfortunately, my computer is rebellious

3:58 ddellacosta: logic_prog: you know, you gotta show it who's boss

3:58 TEttinger: sm0ke, sure isn't it just a def?

3:58 marcopolo`: logic_prog: need more monads

3:59 sm0ke: TEttinger: what do you mean?

3:59 ddellacosta: logic_prog: dire does look nice though, superior to standard try/catch stuff

3:59 TEttinger: would (def serialVersionUID 1) work?

4:00 sm0ke: i need a TEttinger no i need a static variable by that name

4:00 lol

4:00 TEttinger no i need a static variable by that name

4:00 TEttinger: ah ok

4:01 I think there's some good doc for this somewhere

4:01 sm0ke: i could find anything relevant

4:01 couldnt*

4:01 ugh

4:01 marcopolo`: "By default Vars are static"

4:01 http://clojure.org/vars

4:02 TEttinger: By adding metadata – via #^{:static true} – to a method declaration you can also define static methods.

4:02 marcopolo`: you can add ^:const and that might make them final? There isn't much documentation on that

4:02 TEttinger: or in recent clojure, ^:static might work?

4:02 sm0ke: i dont get it..where do i add these meta?

4:02 TEttinger: on the method or var def

4:02 marcopolo`: (def :^const foo 42)

4:03 bitemyapp: what times are we allowed to talk about haskell again?

4:04 ddellacosta: ha

4:04 sm0ke: marcopolo`: yyou mean like by (def :^const myclass-foo 42) if prefix is "myclass-"

4:04 TEttinger: sm0ke: http://stackoverflow.com/a/3809010

4:04 bitemyapp: marcopolo`: the bosses aren't awake, go for it.

4:04 TEttinger: there's some examples there of ^:static

4:04 sm0ke: would that work?

4:04 SparkySparkyBoom: is there a clojure wrapper for postgresql

4:05 marcopolo`: SparkySparkyBoom: korma and yesql are both nice

4:05 sm0ke: yeah I think so, I've never had much luck with gen-class though

4:06 sm0ke: wow this is hard

4:06 marcopolo`: do you need gen-class, proxy wouldn't work?

4:06 SparkySparkyBoom: marcopolo`, ty for the suggestion. i tried searching on google, but i just found a bunch of tutorials on how to setup jdbc

4:07 marcopolo`: haha no problem

4:07 logic_prog: given an exception object

4:07 is there a simple way of getting all the *.clj lines of the stack trace?

4:07 it's sorta retarded to see all these *.java lines in the stack trace

4:07 marcopolo`: you could filter the lines based of a regex for starters?

4:08 but it is on of the hot topics in the community of why stack traces show everything

4:08 TEttinger: "I'm getting a stacktrace in my stacktrace reader!"

4:08 marcopolo`: one of*

4:09 logic_prog: lol

4:09 sm0ke: doesnt work that way

4:09 what bullcrap!

4:10 TEttinger: sm0ke, yeah gen-class isn't easy

4:10 is your code available?

4:10 ddellacosta: SparkySparkyBoom: alternatively, clojure.java.jdbc + HoneySQL is a nice combo.

4:11 sm0ke: TEttinger: just take any gen-class i guess, nothing special

4:11 i just need a static variable there

4:11 SparkySparkyBoom: ddellacosta, honeysql looks promising

4:13 ddellacosta: SparkySparkyBoom: I find the combination of clojure.java.jdbc + HoneySQL to be nice as HoneySQL merely generates SQL, and clojure.java.jdbc. gives you execution of prepared statements--I find it to be a nice separation of concerns.

4:14 SparkySparkyBoom: ddellacosta, i see what you mean

4:16 egghead: wut in the, why is my cljs app making 'SELECT' http requests to my app :|

4:16 sm0ke: seems impossible, http://stackoverflow.com/questions/15062179/how-to-generate-a-serializable-java-class-in-clojure-by-gen-class

4:16 no answer since 1 year

4:30 TEttinger: sm0ke, hm? I'll take a look, but I just accessed a static variable from gen-classs

4:31 machrider: does 'lein run' imply 'lein compile'? (it seems not to, as my gen-class call doesn't work unless i manually 'lein compile' first)

4:31 TEttinger: (def ^:static truf true) ; in one file

4:31 machrider, check :aot in project.clj

4:32 then (myClass/truf) in another file that imported the first gen-class (myClass here), and it evals to true

4:32 machrider: TEttinger: i tried adding :aot [mynamespace.core] to no avail

4:32 TEttinger: lein run should imply compilation. not sure if something's off

4:33 what's your leiningen version?

4:33 machrider: 1.7.1 (linux mint's package)

4:33 i should probably install lein 2...

4:34 TEttinger: yeah, that could be it

4:40 daGrevis: hi! i can't seem to understand the difference of mod and rem functons

4:41 TEttinger: ,[(mod -5 6) (rem -5 6)]

4:41 clojurebot: [1 -5]

4:41 daGrevis: ohh, it has the difference with negative number

4:42 TEttinger: also rem is ever so slightly faster since it doesn't involve an internal conditional

4:42 but I can't be sure

4:42 daGrevis: well if i say in my head -10 / 3, my heads tells me it's -1

4:42 not 2.

4:43 pyrtsa: daGrevis: Depends on your definition of the modulo operation. IMO, the result 2 is more useful. http://en.wikipedia.org/wiki/Modulo_operation

4:43 TEttinger: each has different uses. if you only use non-negative numbers, rem is slightly better (also plays nice with primitive math I think)

4:44 pyrtsa: ,(quot -10 3)

4:44 clojurebot: -3

4:44 pyrtsa: ^ With that definition of quot, -1 makes sense though.

4:45 Yet, an integer division like (div -10 3) => -4 is often pretty useful.

4:45 (I.e. round towards negative infinity.)

4:47 gws: ,[(mod -10 3) (mod 10 -3)]

4:47 clojurebot: [2 -2]

4:53 asmala: I'm working on porting hiccup to cljs and I'd like to write a test (using cemerick.cljs.test) that would need to compare two instances of goog.Uri. It appears that (= (goog.Uri "/") (goog.Uri "/

4:53 …")) returns false

4:56 I'm assuming this is because "=" is trying to compare them via (identity?) rather than logical equivalence

4:58 gws: that's an ellipsis in the second inner form

4:58 asmala: short of implementing IEquiv on goog.Uri, is there an elegant way of getting sane behavior for a goog.Uri comparison?

4:58 aye, that's me hitting return at the wrong point in a sentence ;-)

5:00 ddellacosta: asmala: just curious, is there a reason you aren't just using hiccups? (https://github.com/teropa/hiccups)

5:03 asmala: ddellacosta: indeed, for practical reasons that (or crate, sablono, dommy, etc.) would suffice. I'm hoping a smaller hiccup core would allow target independent base libraries to be written, with target specific compilers. See https://github.com/weavejester/hiccup/issues/75#issuecomment-31899718

5:03 ddellacosta: asmala: ah, gotcha--thanks!

5:04 asmala: for reference, I solved the issue by implementing IEquiv for goog.Uri.

5:05 ddellacosta: asmala: it would be great to have that kind of solution for hiccup. We were trying to convert tinsel to something that generated string vs. dom nodes (https://github.com/ddellacosta/tinsel) but your proposed solution would be superior as a general approach.

5:06 logic_prog: ' = quote, what does ` = ? what is the actual function name that ` maps to?

5:06 s/funciton/macro

5:07 AeroNotix: logic_prog: syntax quote

5:07 logic_prog: "syntax quote" is not a valid function name

5:07 or a valid macro name

5:07 asmala: ddellacosta: that's neat. I'm hoping that an extraction of the common bits of hiccup would make projects like tinsel easier. I've seen way too many essentially identical implementations of defelem, link-to, etc.

5:08 logic_prog: both syntax-quote and syntaxquote seem to be nil

5:08 AeroNotix: logic_prog: there's no equaivalent, but that's what it's called.

5:08 ddellacosta: asmala: absolutely agree. Very interested in where you go with it.

5:08 logic_prog: I can do (quote a) instead of 'a ... what is the equiv of `a ?

5:08 AeroNotix: logic_prog: don

5:08 don't think there is one

5:08 logic_prog: what?

5:08 how is that possible?

5:08 AeroNotix: I said: I DON'T THINK THERE IS ONE

5:08 logic_prog: (defmacro try+ [& body] (quasiquote (slingshot.slingshot/try+ ~@body)))

5:09 how can I write amacro that will take 2 arguments, and alias one amcro as anothe rmacro ?

5:09 AeroNotix: you just call the macro in the body

5:09 if I understand what you're trying to do

5:09 you just want to refer to slingshot.slingshot/try+ as just try+?

5:10 why don't you use the normal :require statements to do this?

5:10 logic_prog: ^

5:11 logic_prog: I want to have a file macros.all

5:11 which lists all the macros I use

5:11 I don't think :requre :refer is transitive

5:11 then I wnat to do (:use [macros.all])

5:11 and import all my macros

5:11 I realize there is a question here os "n00b, you have too many macros"

5:12 but I do have like ~10 commonly used macros

5:12 AeroNotix: no, it's "noob, learn to not make people hate you by importing symbols like that"

5:12 Namespaces are A Good Thing

5:13 logic_prog: good decisions come from wisdom

5:13 wisdom comes from being a n00b

5:13 i need to shoort myself in the foot to learn not so thoot myself in the knee

5:13 AeroNotix: :require :refer in one namespace does not put the :referred items into the namespace, that's correct. I'd not want it any other way.

5:13 alew: what if the ns using that macro doesn't have slingshot included

5:13 AeroNotix: alew: this

5:14 If you syntax quote something like that, it'll just replace try+ with the slingshot call. Which you would then need to have in the namespace where you use try+

5:14 unless you don't syntax quote the slingshot one, and let it expand

5:14 alew: at that point you might as well just require refer the fn

5:15 AeroNotix: Exactamundo

5:15 logic_prog: no, I have a main.cljx

5:15 alew: you could be hacky and unquote the slingshot.slingshot/try+

5:15 logic_prog: which includes all dependencies

5:15 so the slingshot.slingshot is guaranteed to be already loaded

5:15 even if it's not :required

5:16 then, sinc eit's loaded, cljore will have access to it :-)

5:16 AeroNotix: Ugh, I'm out.

5:16 logic_prog: if namespace foo.bar is (1) loaded and (2) not required from stupid.cljx, stupid.cljx stil has acess to foo.bar

5:16 alew: "loaded"?

5:17 logic_prog: yes,

5:17 (ns main (:require [foo.bar] [stupid]))

5:17 thus, foo.bar is loaded because main required it

5:17 ddellacosta: trying to wrap my head around the use-cases for set-state! and transact!/update! in Om--seems like transact! is used for updating the data which you are representing in the DOM itself?

5:17 AeroNotix: logic_prog: it's available in main

5:17 ddellacosta: (same for update! ?)

5:17 logic_prog: it's available everywhere

5:17 alew: No

5:18 ddellacosta: but not really understanding when you would use set-state!

5:18 alew: it's only available in that ns

5:18 AeroNotix: exactly

5:18 Otherwise, madness?

5:18 xificurC: I am trying to use clojure-csv to parse only the first 10 lines of a csv file. The function parse-csv from the library is already lazy and says "Be careful to ensure that if you read lazily from a file or some other resource that it remains open when the sequence is consumed". Now how do I do that? If I do a with-open and try take 10 I get an error that the stream was closed :(

5:18 logic_prog: no, the full name is available everywhere

5:18 fredyr: ddellacosta: set-state is when you want to use the react components state

5:19 ddellacosta: same as .setState

5:19 ddellacosta: fredyr: I think I even get that, I guess I just don't even get *why* you would want to do that--isn't Om replacing that mechanism with the cursor more or less?

5:20 fredyr: ddellacosta: yeah, i think youre right

5:20 ddellacosta: but you might wanna reuse others vanilla js components

5:20 ddellacosta: or otherwise

5:20 ddellacosta: fredyr: I see, and that would let you do that?

5:20 alew: xificurC: use doall to immediately evaluate take

5:21 fredyr: ddellacosta: yes i believe so

5:21 xificurC: alew: will that not evaluate the whole file?

5:21 ddellacosta: fredyr: alright, thanks, that is helpful and puts me in the right direction. I'll keep reading through the code.

5:21 alew: (doall (take 10 file))

5:22 that will give you the lines immediately

5:22 xificurC: alew: thanks. I thought doall would automatically force to evaluate the whole seq

5:22 fredyr: ddellacosta: np, i still have trying re-use of js components with om on my todo

5:22 ddellacosta: i been wanting to try something like https://github.com/petehunt/react-touch-lib/blob/master/src/primitives/AnimatableContainer.js

5:23 alew: xificurC: only if you call it on the whole seq :P

5:23 fredyr: ddellacosta: being able to reuse component libraries without modification is a sweet spot, would be great if om could support it nicely

5:23 ddellacosta: fredyr: interesting, this would let you perform arbitrary transformations on SVG elements inside?

5:23 fredyr: yah

5:25 xificurC: alew: so (doall (take 11 file)) will only take and create the first 11 but (take 11 (doall file)) would first create everything and then take the first 11

5:26 logic_prog: woe is the world

5:26 (defmacro def-macro-alias [nm1 nm2] (let [gs (gensym)] (list 'defmacro nm1 (vector '& gs) (list concat (list 'quote nm2) gs))))

5:26 my evil macro has been written

5:26 teehee, a macro that calls defmacro

5:27 asmala: why does java.net.URLEncoder encode space as "+" and not "%20"?

5:31 alew: xificurC: yes

5:32 asmala: I think it's an optimization

5:33 asmala: alew: A standard one? Just gets a bit tricky with goog.string/urlEncode using "%20"

5:33 alew: asmala: http://stackoverflow.com/questions/1634271/url-encoding-the-space-character-or-20

5:36 asmala: alew: thanks, that was helpful. I'll stick to the + as it's also what the clj implementation (of hiccup) is using

5:56 fredyr: ddellacosta: are you just looking into om, or poking around writing something?

5:58 ddellacosta: fredyr: we are thinking of using it in our front-end, so I'm just learning as much as I can about how it works. We stumbled on a similar architecture independently, in terms of the way we update our application state and render--minus the virtual DOM and intelligent checks on updating--that was the missing piece.

5:58 fredyr: ddellacosta: ah, sounds cool

5:59 ddellacosta: and might be a good fit then also

5:59 ddellacosta: fredyr: yeah, exactly. I basically had a half-assed version of it implemented already when I started hearing dnolen talking about it on twitter and IRC.

5:59 AeroNotix: I'm looking at this https://github.com/michaeldrogalis/dire/

6:00 and I really cannot see what's different about it, it just looks like it's maintaining a list of handlers for functions

6:00 when they raise Exceptions

6:00 almost like a parameterized (catch) block

6:00 *Nothing* like Erlang supervisors at all

6:01 Even the 'restarts' (self-correcting) is gimmicky

6:02 bitemyapp: AeroNotix: Lisp-style continue/restart wasn't a good idea anyway

6:02 AeroNotix: bitemyapp: ehhh, for real applications? Nope. For REPL-based programming, yep!

6:03 ddellacosta: AeroNotix: I think the point is that it separates out exception-handling stuff from the function logic. In that sense I think it promotes a nice separation of concerns. Granted, I don't have a huge problem with exceptions as it is now, so...

6:03 AeroNotix: bitemyapp: It's an interesting system, just for the novelty of it.

6:03 ddellacosta: It's a bit strong calling it "Erlang style"

6:03 ddellacosta: but why on Earth would you want that separated in such a way? I don't get it.

6:04 With Erlang, it's a little bit different, you have true Agents which need to be monitored.

6:04 ddellacosta: ddellacosta: I don't know enough about Erlang to comment; but it seems like the only place he's talking about it being Erlang style is here: https://github.com/michaeldrogalis/dire/#usage-erlang-style-with-supervise

6:04 AeroNotix: Exactly

6:04 ddellacosta: whoops, meant that to be YOUR handle

6:04 AeroNotix: He fundamentally does not understand supervisors

6:05 It

6:05 It's more than just catching exceptions

6:05 ddellacosta: AeroNotix: as far as why you want it separated, I can see the argument--it makes it nice for composing functions without worrying about exceptions.

6:05 AeroNotix: and it makes the exceptions feel more like constraints

6:05 AeroNotix: ddellacosta: but then when your program *is* screwing up, what method do you employ to discover where and when exceptions are being handled?

6:06 and god forbid, RESTARTING stuff

6:06 there's not even a mention about side-effects in this read me

6:06 ddellacosta: AeroNotix: well, presumably this doesn't change the fact that an exception is thrown. I mean, I don't think there is anyone here that is claiming that using it = getting erlang in Clojure.

6:06 bitemyapp: AeroNotix: oh yeah, I could agree with that.

6:07 AeroNotix: ddellacosta: The thing is, I *want* Erlang-style supervision trees in Clojure.

6:07 clgv: AeroNotix: http://docs.caudate.me/ribol/ is nice concerning continue on error

6:07 bitemyapp: AeroNotix: I think part of the problem with CL is that production was just seen as a REPL without a human at the helm 100% of the time.

6:07 AeroNotix: bitemyapp: :)

6:08 is there anything that is truly like Supervision trees in Clojure?

6:08 bitemyapp: AeroNotix: Grumpy old CL'er. Anyway, no. I'd like them too.

6:08 AeroNotix: but in actuality, what I want is supervision trees in Haskell.

6:08 AeroNotix: bitemyapp: Same difference :) Supervision trees are an excellent method of error handling

6:08 bitemyapp: AeroNotix: been fucking around with green threads in Haskell, it'd be easier to implement there than in core.async/JVM threads.

6:09 uhhhhh...under a particular programming model they are

6:09 ddellacosta: I was going to say, seems like you could put something together w/core.async, but don't know enough about what is required on top of that.

6:09 bitemyapp: I'd hesitate to recommend supervision trees to somebody who wasn't operating in the Erlang mindset.

6:09 ddellacosta: it wouldn't be as nice as reified green threads like Haskell.

6:09 AeroNotix: sure, Erlang's whole thing makes it a joy to use. With other languages with different concurrency guarantees it takes a bit more diligence

6:09 bitemyapp: AeroNotix: Haskell is pretty damn close.

6:09 ddellacosta: bitemyapp: yah? I gotta read up on that.

6:10 AeroNotix: ddellacosta: Learn You Some Erlang

6:10 bitemyapp: AeroNotix: languages like Java, Clojure, etc would be fiddlier.

6:10 AeroNotix: ddellacosta: free online book

6:10 ddellacosta: AeroNotix: man, I got so much to learn first...*sigh*

6:10 AeroNotix: bitemyapp: Then I need to look into the concurrency with Haskell then :)

6:10 bitemyapp: as a bonus, channels are already a thing in Haskell.

6:10 ddellacosta: AeroNotix: I just started getting into Haskell, because of that bastard bitemyapp

6:10 bitemyapp: so that plus "real" green threads == Erlang-a-go-go.

6:10 AeroNotix: bitemyapp: library or runtime?

6:10 bitemyapp: just don't be an asshole and stuff Data.Dynamic objects into channels.

6:10 people will find you, and they *will* kill you.

6:10 AeroNotix: haha

6:10 ddellacosta: heh

6:11 bitemyapp: AeroNotix: the green threads or the channels?

6:11 AeroNotix: bitemyapp: well, both

6:11 bitemyapp: AeroNotix: well it's all Control.Concurrent, which is part of base.

6:11 AeroNotix: ok

6:12 bitemyapp: AeroNotix: as you might imagine, base is fairly fundamental but technically a library. Even the prelude is optional in Haskell.

6:12 I guess the "catch" is that lower level stuff like base is implemented in terms of GHC primitives.

6:12 but those same primitives are available to you as a user anyway...so it's distinctly unmagical.

6:13 AeroNotix: bitemyapp: Cool. I read most of LYAH, but I found it a bit... meh. It didn't really show me anything I didn't already know about functional programming. Some monads I saw use of, functor etc. But I just couldn't *see* the real-world stuff

6:13 I've got Real World Haskell on my list

6:13 bitemyapp: AeroNotix: http://hackage.haskell.org/package/base-

6:13 AeroNotix: bitemyapp: is there a bounded version?

6:14 yes, there is

6:15 bitemyapp: AeroNotix: worth noting the "safe haskell" notation in the top right corner.

6:15 AeroNotix: http://www.haskell.org/ghc/docs/7.6.3/html/users_guide/safe-haskell.html

6:16 AeroNotix: interesting!

6:16 bitemyapp: AeroNotix: Also: http://hackage.haskell.org/package/stm-chans-3.0.0/docs/Control-Concurrent-STM-TBChan.html

6:16 AeroNotix: if it floats your boat, pretend Haskell is a big fat dialyzer for functional code with better error messages and higher-level understanding of the code.

6:17 AeroNotix: that sweet, sweet hackage (haddock-generated) documentation is like 1/3 of what I like about using Haskell.

6:17 Can just read the types.

6:17 AeroNotix: bitemyapp: yeah, dialyzer leaves a LOT to be desired. It sometimes doesn't catch incredibly obvious cases, but then will spit out a ridiculous error because of something minor.

6:18 It's a mess. Erlang really is a ghetto sometimes. I mean that.

6:18 But the core concepts of the language seem hard to find in other plaes.

6:19 bitemyapp: AeroNotix: it's easier to start static and reclaim dynamicity after the fact with the occasional escape hatch than to go in the other direction.

6:19 AeroNotix: bitemyapp: quite true

6:19 bitemyapp: and I really hesitate to even frame it in terms of "dynamicity" when really that doesn't mean a lot.

6:20 AeroNotix: type unsafe, really

6:20 bitemyapp: really what's meant is "carelessness with sum/product types"

6:20 Right.

6:20 AeroNotix: bitemyapp: could you compare core.match to Erlang's pattern matching?

6:20 bitemyapp: I get that people want to just sorta blindly sift through JSON and the like, but there are type-safe ways to do so that aren't tedious.

6:21 ddellacosta: alright you crazy cats, I'm going to take a break and exercise. bitemyapp get some sleep.

6:21 ;-)

6:23 bitemyapp: AeroNotix: core.match is "okay" but not really a full citizen of the language in a way that makes it nice.

6:23 AeroNotix: you're always going to have another layer of arguments, destructuring, and the word "match" inside of your functions if you want to use it prolifically. A macro can clean this up, but ugh.

6:23 AeroNotix: bitemyapp: looking just through the docs and not using it, it just seems to have Erlang's `case' expressions, right?

6:24 bitemyapp: the extensibility is cool though.

6:24 AeroNotix: basically, yeah.

6:24 AeroNotix: and it is essentially using interface-based APIs into "types" of data structures. seq'ish, vector'ish, map'ish.

6:25 AeroNotix: I like that it has (or A B) patterns, sorely missing in Erlang

6:26 bitemyapp: AeroNotix: Haskell has pattern-matching and guards, but a big plus here that doesn't "hit" you immediately is that the laziness means you get macro-esque behavior by default in Haskell functions.

6:26 AeroNotix: so composable predicates that don't eval their arguments are the default capability.

6:26 so about 80-90% of what you ever needed macros for goes "poof"

6:27 the other 10-20% falls into applicatives or free monads, depending on whom you ask.

6:27 ucb: bitemyapp: http://www.theguardian.com/music/musicblog/2014/jan/14/mogwai-rave-tapes-album-stream

6:27 bitemyapp: there are more sophisticated ways still to do such things, such as actual macros, but meh.

6:27 ucb: bitemyapp: also, I missed your last musics because backlog and limechat

6:27 AeroNotix: huh, mogwai, clojure, fp. Am I home?

6:27 ucb: AeroNotix: \o/

6:27 AeroNotix: :)

6:27 bitemyapp: I like the scottish, mogwai, clojure, fp, and haskell.

6:27 feels right to me.

6:27 ucb: danke. let me track it down.

6:28 ucb:

6:28 er.

6:28 dammit

6:28 AeroNotix: Soma.fm has a good radio station I like to listen to, similar stuff. Groovesalad and Spacestation

6:28 bitemyapp: ucb: http://www.youtube.com/watch?v=jTW1VsqiNV4

6:28 ucb: ta much

6:28 also hai

6:29 bitemyapp: ucb: hi!

6:29 ucb: I trust all is well with you, etc.

6:30 bitemyapp: oh yes. much learning very fun wow

6:30 ucb: been watching this news about scottish independence with a lot of excitement.

6:30 ucb: interesting

6:31 what excites you about this?

6:31 bitemyapp: ucb: have some ancestry there but mostly a general republican (political science term) sympathy.

6:32 AeroNotix: Where are some other good Clojure communities? I tried to use G+ but it's... meh

6:33 bitemyapp: AeroNotix: Twitter, here, reddit, hacker news (sorta), the mailing list

6:33 AeroNotix: bitemyapp: cool, cheers

6:34 ucb: bitemyapp: oh, I see.

6:34 bitemyapp: ucb: I found out about it because some CS scholars I follow are sympathetic and equally excited.

6:35 ucb: what's the sentiment where you are?

6:35 ucb: bitemyapp: excited about the fact that there'll be a referendum? that it might happen?

6:35 bitemyapp: it's divided between the yays and the mehs and the tehnoes!

6:36 bitemyapp: just like everything else really. I think the real division is between yes and no.

6:36 but I'm not following it that closely. Mainly because politics.

6:37 bitemyapp: ucb: I'm not sure it's political-as-such for me, just interesting.

6:37 ucb: bitemyapp: indeed it is. And the implications are pretty big if you ask me. It's just that I find the debate sort of void of content.

6:38 cark: bitemyapp: there was this talk from peter seibel about restarts and conditions, I think he makes a good case for these

6:38 ucb: bitemyapp: it mostly revolves around "oh, but if we were independent we could hate the English while being rich" and "if you were independent you would not be able to keep the pound, get international credit, nor be a part of the EU"

6:38 cark: i'm a bit late to the party =P

6:38 bitemyapp: cark: I'm familiar with it and every other argument on the subject

6:38 cark: I was...utterly immersed in CL culture for a long time.

6:38 I'm increasingly skeptical of it except for debugging in a REPL.

6:38 * ucb drinks more tea

6:39 bitemyapp: I don't think making reliance on implicit state "easier" is a good thing at all.

6:39 ucb: is there really any doubt about scotland being able to get into the EU after the fact?

6:39 cark: well, CL is statefull

6:39 bitemyapp: ucb: particularly if they believe they have money?

6:39 cark: so is Clojure and Haskell and everything else.

6:39 cark: the question is how principled and disciplined you are about managing that state.

6:40 ucb: bitemyapp: I haven't a clue. Many political editors/analysts say that it'd be a tough negotiation. Which I believe it would be. It'd probably end favourably, but still.

6:40 cark: bitemyapp: clojure and haskell want to be as little of that as possible

6:40 bitemyapp: CL has no shame about it

6:40 bitemyapp: ucb: tough negotiation? after the eastern european nations got in?

6:40 ucb: bitemyapp: do you really believe that if Scotland was to be independent it'd get to keep all the oil money while keeping just a fraction of national debt?

6:40 bitemyapp: well, it's all in the details really.

6:40 bitemyapp: cark: that's not an entirely accurate characterization about Clojure *or* Haskell.

6:41 ucb: bitemyapp: for instance: would Scotland adopt the Euro?

6:41 bitemyapp: cark: it's about having a variety of options and using the right defaults at the right time.

6:41 ucb: I would dearly love to know the SNP answer to currency.

6:41 logic_prog_: is there a way, in clojure, when dealing with java interop, to say: "if there is a field called .data", then do (.-data obj), else do "nil" ?

6:41 i.e. the behavior of ":data" (get me the value if the key exists, otherwise nil)

6:41 bitemyapp: ucb: but adopting the Euro would've been my guess.

6:41 cark: bitemyapp: hey we're both sold on that... but i would argue that different stuff works with diifferent languages

6:41 logic_prog_: but instead, I want to do this to a java field : ... if the field exists, get me the value, otherwise give me null

6:41 ucb: bitemyapp: same here. But they rarely (if ever) talk about this. They talk about money in magical terms: "money"

6:41 bitemyapp: mutable closures gag.

6:42 ucb: scotland should bring ducats back.

6:42 ucb: heh

6:42 bitemyapp: or the heads of slain english, as a currency.

6:42 the mint will be pike-wielding headhunters.

6:42 ucb: in any case, the issue is far trickier than the media portraits it if you ask me.

6:43 AeroNotix: logic_prog_: create a getter

6:43 bitemyapp: oh sure.

6:43 xificurC: anyone using seesaw? I am trying to do something rather simple, I have a textbox and I'd like to fix its size

6:43 bitemyapp: ucb: well it's an issue affecting populations of ~5mm and ~50mm people

6:43 AeroNotix: logic_prog_: or again, a macro

6:43 bitemyapp: ucb: meanwhile, I live in a state of ~50mm people in a country of ~300mm :)

6:44 ucb: bitemyapp: I'm not saying it's a minor issue, though I shiver at the thought that people will go and vote on an issue based on very shallow information.

6:44 bitemyapp: ucb: have you been following how people vote typically?

6:44 gws: as they have been doing since time immemorial

6:44 bitemyapp: ucb: it generally boils down to what they think will lead to them having more money or who they hate the most.

6:44 ucb: bitemyapp: I have not, but I suspect it's rather rudimentary.

6:44 heh - no surprises there.

6:44 bitemyapp: worse, it's rarely rational.

6:44 let alone informed & rational.

6:45 ucb: so the English should say they want an independent Scotland then.

6:45 which many actually do as they see Scotland as a leech/poor neighbour

6:45 bitemyapp: I've heard that before

6:45 I wonder how the north sea oil shakes out money-wise, though?

6:47 ucb: it's difficult to say

6:47 oil is refined down South afaik

6:47 bitemyapp: ucb: actually, I just looked it up.

6:47 ucb: ok, enlighten me

6:49 * ucb yays

6:49 bitemyapp: ucb: well I'm having a hard time pinning it down to exact, year-by-year figures (they're just telling me peaks and troughs)

6:49 ucb: but basically, the north sea oil output for the UK's (scotland's?) share is roughly equivalent to Norway's.

6:50 ucb: given that norway has a similar population to scotland, the economic impact could be extrapolated.

6:50 xificurC: is it possible that I am getting `Lisp nesting exceeds max-list-eval-depth` even though the parens are ok? Sometimes it seems my emacs bugs out after a change in some file but when I simply restart it it works fine

6:50 bitemyapp: all very rough numbers though.

6:51 ucb: bitemyapp: fair enough; I don't doubt that the oil money distributed amongst a smaller population would be a good thing to do/have.

6:51 bitemyapp: but again, details. Another issue: army? yes, no, size?

6:51 bitemyapp: ucb: well it could mean, long-term, a state managed fund for the wealth like norway's.

6:51 which would be, uh, really good.

6:52 ucb: bitemyapp: I mean, it's mostly paperwork (maybe not all of it) that has already been taken care of by the fact that Scotland is part of the UK. And I'm not saying this is a showstopper, but rather that these things aren't being debated.

6:52 bitemyapp: absolutely. Assuming they don't piss it away on tenents.

6:53 bitemyapp: alright alright, bedtime for me.

6:53 Goodnight all. Dream happy functional dreams. Sugar-plums and supervisor trees.

6:53 ucb: heh - night bitemyapp

6:56 sm0ke: 89% of clojure bugs are unassigned

6:56 is clojure being developed anymore?

6:58 AeroNotix: sm0ke: link to tracker?

6:58 I'll assign then all to you

6:59 sm0ke: haw haw haw

6:59 AeroNotix: sm0ke: as with all open sores project, they have open sores.

7:00 sm0ke: AeroNotix: are you a core dev?

7:00 AeroNotix: sm0ke: nope

7:00 but I could be

7:00 So can you

7:00 the power is YOURS

7:00 sm0ke: ooh

7:00 inspiring

7:01 AeroNotix: https://code.google.com/p/clojure/issues/list

7:01 sm0ke: lol

7:01 AeroNotix: sort by priority, implement the Low ones, get acquanted.

7:01 sm0ke: i think clojure uses JIRA

7:01 AeroNotix: I saw that, but it needed a login

7:02 gws: http://dev.clojure.org/jira/browse/CLJ

7:03 AeroNotix: gws: how do I jira

7:04 gws: click agile tab, feel raw power

7:05 AeroNotix: am I being kanbanned

7:54 danoyoung: I'm trying to understand why I get different results from example 3 from the dose examples @ clojuredocs: http://clojuredocs.org/clojure_core/clojure.core/doseq

7:54 when I cut and paste into the repo, I get 4 6 nil

7:55 anyone have ideas on why? I'm just learning clojure and am walking thru the examples....

8:05 fredyr: danoyoung: i get 4 6 as well

8:05 shoky: danoyoung: it's because (map list {:1 1 :2 2} {:3 3 :4 4})

8:05 danoyoung: hmm..typo on the site i guess??

8:05 lazybot: danoyoung: Uh, no. Why would you even ask?

8:05 shoky: danoyoung: er, that's returning a differnet order than in their example

8:06 so (* b d) is getting a different result

8:06 danoyoung: yea, the results on the site are 3 8 nill

8:06 shoky: run: (map list {:1 1 :2 2} {:3 3 :4 4})

8:06 and see you'll get a different order than they do

8:06 danoyoung: i'm just learning clojure, so trying to understand why I get different results.

8:06 edbond: ,(map list {:1 1 :2 2} {:3 3 :4 4})

8:06 clojurebot: (([:1 1] [:4 4]) ([:2 2] [:3 3]))

8:06 shoky: i'm explaining just that..

8:06 danoyoung: ok, that makes sense….

8:08 so the order in (map list {:1 1 :2 2} {:3 3 :4 4}) doesn't matter ???

8:08 lazybot: danoyoung: How could that be wrong?

8:09 shoky: the order in a map {} doesn't matter

8:09 edbond: and order of * doesn't matter too

8:09 ,(*)

8:09 clojurebot: 1

8:09 shoky: so instead of matching :1 1 with :3 :3 as in their example, :1 1 is getting matched with :4 4

8:09 danoyoung: if I take the example from the site and cut and paste into the repo: (doseq [[[a b] [c d]] (map list {:1 1 :2 2} {:3 3 :4 4})] (prn (* b d))) I get 4 6 nil vs 3 8 nil

8:09 shoky: stop repeating that

8:10 edbond: danoyoung, example is incorrect

8:10 danoyoung: ok, just trying to make sure I understand….

8:10 shoky: example is correct..

8:10 AeroNotix: ,(class (byte-array))

8:10 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: core/byte-array>

8:10 AeroNotix: ,(class (byte-array 10))

8:10 clojurebot: [B

8:10 AeroNotix: That^ is dogshit

8:10 shoky: it's just that the order of the items in the hashmap is different

8:10 AeroNotix: [B? What on Earth is that

8:10 looks like I didn't null terminate something

8:11 tbaldridge: , (class (into-array Object [42]))

8:11 clojurebot: [Ljava.lang.Object;

8:11 tbaldridge: AeroNotix: no, it's just the way the JVM creates class names for objects

8:12 AeroNotix: tbaldridge: It's extremely unhelpful/unreadable

8:15 edbond: AeroNotix, http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html#getName()

8:17 AeroNotix: edbond: Dayyummm, poor choice

8:18 shoky: danoyoung: (map list a b) where a and b are maps, takes "first" key-value-pair from each map and puts them together in a list. then same for the "second" kv-pair. in their example, the "first" pairs turned out to be [:1 1] and [:3 3] while when we ran it now, it chose [:1 1] and [:4 4] as "first" pairs instead

8:19 ,{:3 3 :4 4}

8:19 clojurebot: {:4 4, :3 3}

8:19 shoky: see how the order changed for us ^ while when they ran it, the order turned out to be {:3 3, :4 4}

8:20 danoyoung: shoky, thanx…

8:21 makes sense now...

8:23 edbond: ,(map list {:1 1 :2 2} {:3 3 :4 4})

8:23 clojurebot: (([:1 1] [:4 4]) ([:2 2] [:3 3]))

8:23 edbond: &(map list {:1 1 :2 2} {:3 3 :4 4})

8:23 lazybot: ⇒ (([:1 1] [:4 4]) ([:2 2] [:3 3]))

8:34 socksy: Is there a good option for running core.async over distributed systems? Or is the answer basically "don't"?

8:35 tbaldridge: the semantics of CSP don't really work with distributed systems. But that's okay since you have things like RabbitMQ, Kafka, or ZeroMQ. Pick one and interface it with core.async.

8:35 mdrogalis: socksy: Use it at the edges of the individual components in the distributed system

8:35 quizdr: socksy not sure it applies but there is a demo of Rich Hickey using overtone, a Clojure music library that has a server/client config, and he uses core.async with the connections of the synths

8:36 tbaldridge: quizdr: that's not distributed though

8:39 socksy: yeah, that would presumably be on the same computer. I was thinking something like the alt! macro would be pretty neat over multiple systems (as in, send off something, take fastest response)

8:39 I probably don't know what I'm talking about though :)

8:40 any recommendations from a clojure side for wrappings around a message queue/messaging system? I've done some zmq stuff in other languages but ideally would want something stable and idiomatic in clojure

8:41 mdrogalis: socksy: I've been thoroughly enjoying using HornetQ.

8:43 daGrevis: hi! can I somehow write down a really long number on multiple lines?

8:43 with str i can use str fn

8:46 AeroNotix: daGrevis: why do you have such constants?

8:46 daGrevis: AeroNotix, https://projecteuler.net/problem=8

8:47 mdrogalis: nope.jpg

8:47 daGrevis: Store it in a file.

8:47 daGrevis: one solution would be to use str with strings and then parse out the number using regex

8:47 mdrogalis, imo it's an overhead

8:48 edbond: daGrevis, use (str "<line1>" "<line2>" ....)

8:48 pyrtsa: ((comp bigint str) 123 456 789)

8:48 daGrevis: edbond, ye, but I need int

8:48 pyrtsa: ,((comp bigint str) 123 456 789)

8:48 clojurebot: 123456789N

8:49 daGrevis: pyrtsa cool!

8:49 AeroNotix: daGrevis: oh yeah, I did this

8:49 edbond: daGrevis, not really, you want to split string and then convert to int

8:49 AeroNotix: daGrevis: I just read it from file.

8:49 mdrogalis: daGrevis: It's Euler, just put up with it for 5 minutes. :P

8:49 edbond: btw I read from file too )

8:49 pyrtsa: ,((comp bigint str) -123 456 789) ;; crazy enough!

8:49 clojurebot: -123456789N

8:49 AeroNotix: you're just reading and parsing once, I guarantee that the rest of the program is slower

8:49 100%

8:50 daGrevis: AeroNotix, true that

8:50 comp wont work :(

8:50 one of strings starts with 0

8:52 pyrtsa: ,((comp bigint #(java.math.BigInteger. % 10) str) 0123 456 789) ;; crazy enough!

8:52 clojurebot: 83456789N

8:52 pyrtsa: Damn.

8:53 AeroNotix: just reada

8:53 Just. Read. From. File. Damn!

8:53 pyrtsa: Ah, the above works with string arguments of course.

8:53 AeroNotix: Yes, that's better.

8:53 Much better.

8:54 ,((comp bigint #(java.math.BigInteger. % 10) str) "0123" "456" "789") ;; Anyway

8:54 clojurebot: 123456789N

8:54 daGrevis: http://vpaste.net/DdYIn

8:55 pyrtsa: daGrevis: PROTIP: for that Euler exercise, you don't have to parse the whole number as a BigInteger.

8:55 Treat the input as separate digits instead.

8:56 daGrevis: pyrtsa, ohh. i should read desc of task 1st :D

8:57 imo a macro could be a solution too

8:59 quizdr: daGrevis has you seen the 4clojure exercises also?

9:00 daGrevis: quizdr, nop. i've done clojure-koans and 1st 7th euler problems only

9:02 quizdr: how are they koans? haven't looked at those yet

9:04 edbond: daGrevis, I think str, partition, reduce and max should be enough

9:05 daGrevis: quizdr, they are awesome! rly helped me a lot https://github.com/daGrevis/clojure-koans

9:05 edbond, to solve the task or to solve “syntax problem“?

9:06 quizdr, https://github.com/daGrevis/clojure-koans/tree/master/src/koans

9:06 edbond: daGrevis, to solve the problem, there is no limit how you should read it. Parse it in .clj and focus on solution :)

9:08 cgrand: ckirkendall: hi

9:08 ckirkendall: hello

9:09 quizdr: well now if i look at your solutions daGrevis then it will spoil the fun :)

9:10 ckirkendall: cgrand:have a few questions on you thoughts about how I should approach kioo and the compile. I also am interested in how you see enliven browser based templates working.

9:12 cgrand: ckirkendall: the story I want for enliven templates is that the same template can be used statically or dynamically (or anywhere in between)

9:12 daGrevis: quizdr, true ;P i recommend this as well. helped me when I was stuck http://clojurescreencasts.com/

9:13 locks: daGrevis: oh, never came across this before :o

9:14 cgrand: specifically you specify where each part of the model lives (server only, server push, local storage, sync etc.) and this will control where in the static-dynamic spectrum the template emits its stuff

9:14 quizdr: daGrevis 4clojure is cool because you can see others' solutions after you figure out yours and see just how versatile and creative the possiblities are to solving a simple (or not so simple) problem

9:15 cgrand: ckirkendall: btw I already applied two of your commits

9:17 ckirkendall: cgrand: I saw on the commits. So lets make sure I understand. You want enliven to be able to chose where the plan, pre-rende and render take place. So so all could exist on the client side or in some hybrid when you either pre-render on server or full server push..

9:18 cgrand: ckirkendall: sort of, yes

9:19 ckirkendall: pre rendering is always done server-side

9:19 static pre-rendering: emits chunks of HTML

9:20 ckirkendall: cgrand: Ok that makes a bit more sense the way I was thinking about it.

9:20 cgrand: dynamic pre-rendering: emits JS (via CLJS) code

9:21 the JS (CLJS) is going to depend of the model lifecycle, not of the actual data so it will be computed only at template definition

9:21 ckirkendall: cgrand: It looks like that won't be too hard given how you have the pre-render setup.

9:21 cgrand: what's your goal with kioo?

9:23 ckirkendall: cgrand: simiar but the target is slightly diffrent. I need to keep the tree intact and output react node structure. With a normal client side template you can use a similar stategy to what you have and output a flatten structure.

9:24 quizdr: has anyone read the OReilly ClojureScript book? Worth it? comparable resources?

9:24 coventry: Hmm, the storm issues list (https://github.com/nathanmarz/storm/issues) seems to have disappeared. No issues link on https://github.com/nathanmarz/storm/ either.

9:24 ckirkendall: cgrand: I also need to change how things are emitted based on what structure I am emmiting.

9:24 cgrand: ckirkendall: how so?

9:24 ddellacosta: coventry: looks like it's moved to apache, no? https://issues.apache.org/jira/browse/STORM

9:25 ckirkendall: cgrand: certain things like the style attributes need to be turned into a js-map where other attributes are just strings.

9:25 cgrand: and even functions

9:26 coventry: ddellacosta: Yes, but the issues list was still there just a few days ago. Bit of a pain, as I have notes linking into recipes in the issues. You're right, though, I can probably find them imported on jira.

9:26 ddellacosta: coventry: ah, gotcha. Yeah, I can see how that would be a bit of a pain...

9:27 cgrand: ckirkendall: do you have some sample (or pseudo) target code?

9:27 ckirkendall: cgrand: I was even planning on modifying the parser to pre spit out styles into a map to make it easier to manage for kioo.

9:28 cgrand: ckirkendall: re-parsing styles, I'm considering phloc-css to parse them

9:32 mdrogalis: This is kind of a wacky request, but has anyone ever done Java runtime code generation? Actual source code, not byte code.

9:35 ckirkendall: cgrand: ploc-css? Are you talking about style nodes like <style>...<style> or are you talking about style attributes?

9:35 vijaykiran: mdrogalis: as in UML to Java :) ?

9:35 cgrand: ckirkendall: both

9:37 ckirkendall: cgrand: I am all for that. It eliminates the need for special segments to manage styles.

9:38 mdrogalis: vijaykiran: Unfortunately PHP to Java. lol

9:39 vijaykiran: mdrogalis: oh, crap.

9:39 mdrogalis: I vaguely remember some project doing that

9:39 ckirkendall: cgrand: its easy to see how the style attribute would turn into a map, but what would the structure for style block turn into.

9:39 mdrogalis: vijaykiran: Yeah. Fortunately it's a small subset of PHP. But it's still a pain.

9:40 stuartsierra: mdrogalis: Not sure, but maybe http://janino.net/ is relevant

9:40 mdrogalis: stuartsierra: Thanks - yep that's actually the target of translation.

9:41 I think I'm going to end up writing a parser to generate Janino source blocks. Bleh.

9:41 stuartsierra: ANTLR may also be useful.

9:42 mdrogalis: stuartsierra: Yeah, I think that'll be a good route to go.

9:42 Thanks :)

9:42 stuartsierra: you're welcome

9:42 vijaykiran: mdrogalis: how much code are you talking about - may be automating it isn't worth it - as in http://xkcd.com/1319/ :)

9:43 mdrogalis: vijaykiran: Appropriate. :P Yeah, it's quite a bit, even though the individual blocks to be translated are small.

9:44 Oh, that's today's. Nice.

9:44 vijaykiran: yup :)

9:46 ckirkendall: cgrand: I think using goog.string.StringBuffer we could port almost everything over to the client size fairly easily. We would have to use cljx and modify the emitters to product a sequence of strings, and quoted function calls that are returned by a macro. Then we can just reduce across the sequence and pass the data in.

9:47 cgrand: The flatten structure produced by inline-emmit would work well.

9:48 cgrand: ckirkendall: sorry I was on the phone

9:49 ckirkendall: re: styles, I haven't thought enough about the model but something (for <style> themselves) as a map of selectors to styles-map; and you would find the same styles-map in style attributes.

9:52 ckirkendall: cgrand: for kioo I think I may emit something like (let [data-sym data] ...) and then pass the data-sym down the tree and any time I need to output of an action output `(path/fetch-in data-sym)

9:52 cgrand: does that sound reasonable.

9:53 cgrand: ckirkendall: I'm not sure I understand when you speak about switching to a StringBuilder client side: this would mean that you bash HTML as string on the client before converting it into (V)DOM

9:54 ckirkendall: cgrand: It is the fastest way to do it. Setting inner html is much faster than building up dom nodes.

9:54 cgrand: Now for kioo I can't do that. I have to output the nodes.

9:55 cgrand: it's still faster? I thought things have changed (especially if you used document fragment and cloned them)

9:55 ckirkendall: and which form will have the nodes then?

9:56 ckirkendall: cgrand: It depends on the browser but for chrom I still think its faster.

9:56 cgrand: I did some testing awhile back when doing enfocus.

9:56 mtrimpe: mdrogalis: You could also just target IntelliJ's AST. I've heard it's quite extensible and should be able to handle what you're intending to throw at it.

9:56 mdrogalis: mtrimpe: That's an interesting idea.

9:57 I'll check it out.

9:58 mtrimpe: mdrogalis: I'm still hoping someone will do what cgrand did for Clojure with his 'Not so homoiconic' talk (http://confreaks.com/videos/2068-euroclojure2012-not-so-homoiconic) and apply it to IntelliJ's AST.

9:58 ckirkendall: cgrand: If we determin otherwise it would follow the exact same model as kioo.

9:59 mtrimpe: mdrogalis: The we could finally use Clojure to take a chainsaw to legacy Java codebases :)

9:59 ckirkendall: cgrand: I will have to look but I know the makers of Dommy did a lot of performance testing around this.

9:59 mdrogalis: mtrimpe: Will have a watch :)

9:59 cgrand: mtrimpe: *sigh* buried in my TODO list

10:00 ckirkendall: cgrand: http://andrew.hedges.name/experiments/innerhtml/

10:00 cgrand: it seems to confirm what I saw in my testing.

10:00 mtrimpe: mdrogalis: It's about carrying formatting around when you're programmatically rewriting clojure code. So not *that* relevant for your task but still very interesting nonetheless ...

10:00 cgrand: ckirkendall: you would have to measure exactly what you need. With enliven constraints you have enough information to emit plain direct indexed DOM access to the elements you need to modify

10:01 mdrogalis: Ah, yeah. Been there. :/ mtrimpe

10:02 ckirkendall: cgrand: So we would only be taking the hit for the clone. That makes sense.

10:05 cgrand: ckirkendall: ok so you can reuse enliven plans and roll your own emitters

10:05 I'll be happy to assist in if you figure out some refactoring to perform o as to reuse the current emitters for static HTML

10:06 ckirkendall: beside that, no troubles figuring out what's going on in Enliven?

10:07 ckirkendall: cgrand: took me a bit realize what you were doing with inline-emit but most of it make sense.

10:09 cgrand: using the plan to the make the changes would be a significant change the flow of enlive. Right now you use the plan to do pre-rendering. In this case we would just emit the original content and use the plan at call time?

10:10 cgrand: or some hybrid approach?

10:11 cgrand: ckirkendall: in the browser? no I would transform the plan in CLJS code, no more "plan" data structure

10:11 ckirkendall: cgrand: be right back

10:16 cgrand: ckirkendall: https://gist.github.com/cgrand/8521651

10:34 AeroNotix: What's the equivalent of bit expressions in clojure?

10:34 such as -117 & 0xFF?

10:34 mdrogalis: ,(doc bit-and)

10:34 clojurebot: "([x y] [x y & more]); Bitwise and"

10:35 AeroNotix: mdrogalis: boom, cheers

10:35 mdrogalis: ^^

10:37 ckirkendall: cgrand: Ok that gist is made me a bit confused. For dynamic do we don't know the direct traversal because the structure of live dom can change. In cases like that I would use querySelector for traversal like enfocus.

10:38 cgrand: For static templates we can use a fragment and do direct traversal but I can't see how we could ever do that for the live dom.

10:42 cgrand: ckirkendall: I assume enliven owns the DOM (or a subtree of it) so I can keep a record of where are the elements I need to update.

10:44 ckirkendall: cgrand: I completely agree in a model like Om and kioo. Infact that is the bases for how react works.

10:46 cgrand: ckirkendall: one design goal for Enliven was "no tree-walking past definition time"

10:46 and querySelector somehow qualifies as (optimized) tree walking

10:47 mmitchel_: Can someone recommend one of these http client libs? http-kit OR neotyk/http-async ?

10:47 i've used the neotyk lib, but liking the fact that http-kit has no dependencies other than clojure

10:48 ckirkendall: cgrand: What you are describing is similar to something I want to kioo and possilby a formal clojure version of react. I am having a hard time seeing it on top of the live dom vs something like reacts virtual dom wear component definition is self contained.

10:50 cgrand: ckirkendall: an aspect that I didn't mention is event handlers

10:50 "event handlers" are transformations

10:50 ckirkendall: cgrand: Either way we can certainly build it but people would have to be very careful about the types of dom changes even made by a transform as its mutable strucuter would make the call only possible once.

10:51 juxovec: is there any possibility to get a source of a given namespace? (the way we use source for functions)

10:51 ckirkendall: cgrand: it really sounds like youa re descrbing a clojure version of react.

10:51 cgrand: ckirkendall: I don't want user to touch a DOM, be it virtual or immutable

10:52 ckirkendall: cgrand: It something that when i first saw enliven I thought could be created.

10:53 cgrand: in "event handlers" you get access to a piece of the model (the one scoped by the path)

10:53 ckirkendall: cgrand: I still think all transforms operate on fragments that replace the live dom and never directly on the live dom. This make sure the input is alway consistant for traversal.

10:55 cgrand: so the handler returns a modified version of the piece of the model which is put back in the model and transforms which depend on it are triggered for rendering

10:55 ckirkendall: cgrand: have you looked at om?

10:56 cgrand: a bit, I need to investigate how much I can use it and/or react

10:57 ckirkendall: cgrand: The idea of om is exactly what you describe. Basically you get a cursor into the model and can change that and all items transforms dependend on it are updated.

10:57 cgrand: (I laid out the design for enliven last spring)

10:58 ckirkendall: yes I saw dnolen mentioned lenses and Enliven segments/paths are lenses too

10:58 but I haven't had time to look at the invalidation logic

10:59 ckirkendall: cgrand: You see the whole dom structure as a series of nested templates.

10:59 cgrand: where the model is passed down the chain?

11:00 AeroNotix: I'm having trouble implementing this in Clojure: https://gist.github.com/AeroNotix/47314dfb31e3fded1d87

11:00 any pointers?

11:01 cgrand: ckirkendall: nesting only occurs for iteration

11:02 stuartsierra: juxovec: not directly, but you can munge a namespace name into a file name and read it as a resource from the classpath.

11:03 AeroNotix: https://gist.github.com/AeroNotix/47314dfb31e3fded1d87 I got this so far

11:03 ckirkendall: cgrand: Here is how I understand what are suggesting. A template owns a piece of the tree (dom or otherwise) the template is rendered based on the model. Only changes in the model can change how the template is rendered. Optimization can be done to only update the items where the model changes.

11:04 juxovec: stuartsierra: but can I do this for code outside my project (for exapmle clojure.core)?

11:04 ckirkendall: cgrand: the underlying imput for the transform is fixed at definition time and all changes are dictated by the changes in the model.

11:04 cgrand: ckirkendall: yes and yes

11:04 ckirkendall: cgrand: this allows for the optimization of traversal and modification.

11:05 cgrand: yes again

11:06 stuartsierra: juxovec: Yes, if the source files are on the classpath, which they normally are. clojure.core is a special case because it is split among several files.

11:06 ckirkendall: cgrand: this is exactly what react, om and kioo goals are. With a few exceptions that make this a bit cooler. One we can use the plan and point free style to optimize the performance of this to be better than reacts.

11:07 cgrand: basically it compels down to an optimized react tailored for your template

11:07 `cbp: AeroNotix: sorry yo no hablo erlang. What are you trying to do and what is the problem?

11:08 ckirkendall: cgrand: The second being that because we have a plan known at compile time we can eliminat the need for the virtual dom and diffs.

11:08 juxovec: stuartsierra: so it is enough to search over classpath for paths where ab.cd.ef-gh is replaced to ab/cd/ef_gh.clj? great thx

11:08 cgrand: ckirkendall: diff shifts from the dom to the model

11:08 ckirkendall: cgrand: yes

11:08 stuartsierra: juxovec: yes. clojure.java.io/resource can find the files on the classpath

11:08 cgrand: ckirkendall: and you still have to take care of not losing the user focus/selection etc.

11:09 ckirkendall: cgrand: this is where the event structure comes in.

11:09 AeroNotix: `cbp: We have a single sign on service which returns a cryptographically secure cookie, I need to decrypt that.

11:09 cgrand: ckirkendall: but because of the hierarchical nature of paths, most of the time (outside of loops) the diff will only be a comparison with the previous value

11:10 ckirkendall: cgrand: and like om because its a persistant data structure it can be an identity check at any layer of the path.

11:10 cgrand: indeed

11:11 dnolen: cgrand: form focus/selection this one thing that React handles pretty well, form elements are one of the only cases you ever have to "touch" the DOM.

11:11 cgrand: ckirkendall: one thing is that this sounds like you have to put more in the model? This something I tried in Om but abandoned, you often what to keep a component's local state separate from the application state.

11:13 ckirkendall: cgrand: dnolen: This is something I really like about om. It keeps component internal state out of application state.

11:14 dnolen: cgrand: still this sounds very interesting :) definitely curious about Om w/ a different renderer.

11:16 cgrand: dnolen, ckirkendall: what is the problem with the component state being namespaces inside (or alongside) the application model

11:17 ?

11:17 dnolen: cgrand: I am very interested in snapshotting, serialization - it just makes those more work you have to do separation yourself.

11:17 ckirkendall: cgrand: its more for usability of reusable components for me. I can build a component that stores local state for activities and only exposes some events for changes to application state.

11:19 dnolen: cgrand: the real long term goal for Om is time management of application state, if you want to do a data diff between two app states you'll get a lot of transient state in your diffs

11:19 if you put all state into the model, even transient stuff (mouse dragging, modals, etc)

11:19 AeroNotix: I'm having trouble implementing this in Clojure: https://gist.github.com/AeroNotix/47314dfb31e3fded1d87 Any pointers?

11:20 cgrand: dnolen: can't a lens remove the non-essential state?

11:21 dnolen: cgrand: but then it's a policy the user has to manage no?

11:23 ckirkendall: dnolan: are you thinking about a datomic style of query for application state?

11:24 dnolen: ckirkendall: querying the timeline is definitely a goal yes

11:24 cgrand: dnolen: given a path (lens) into the model another lens can be generated that will return a pair [application -satte ui-state] without the user having to do anything about it. He just gets an additional arg to his handler

11:25 AeroNotix: great, and the Erlang crypto code is a NIF

11:25 cgrand: dnolen: and the hander has to return a pair too

11:25 dnolen: cgrand: that works, so users could specify if their modifying app state or ui state

11:27 potter: hello

11:27 !list

11:27 cgrand: dnolen: I've been somehow convinced that local state is poison ;-)

11:27 dnolen: cgrand: but does this mean you need to have [app-state ui-state] at the root?

11:27 cgrand: haha, the illusion of it is still useful

11:28 cgrand: dnolen: yes but then snapshotting only the application-state is not a problem anymore, is it?

11:29 dnolen: cgrand: if some component doesn't need local state but another one does, can they both live in the same render tree

11:29 cgrand: or does the user need to juggle?

11:30 coventry: mdrogalis: Clojurejava sounds like an idea whose time has come.

11:30 cgrand: dnolen: I think they can if it's baked in the event system to make the split app/ui as proposed above

11:30 mdrogalis: coventry: Eh?

11:31 cgrand: dnolen: obviously if it's an opt-in feature you'll get clashes

11:32 dnolen: cgrand: yeah, ok, so in Om by having real local state we get modularity

11:32 cgrand: still if Enliven worked that way it would be pretty exciting to have it as an alternate backend to Om :)

11:32 coventry: mdrogalis: Compiling clojure to java to use javac to generate java bytecode.

11:33 What your question about generating java brought to mind for me.

11:33 Should have added a smiley. Not serious.

11:33 cgrand: dnolen: the dynamic emitter is not there yet :-) I need time :-(

11:33 mdrogalis: coventry: I need to end up with actual Java source code as a string. D:

11:33 coventry: I'm having a rough start to this week. ;)

11:34 cgrand: dnolen: but I hope all the constraints will yield good perfs (as they do in the static case)

11:34 ckirkendall: cgrand: Can you put a gist together on the event setup. I still trying to wrap my head around it.

11:40 cgrand: I going to try to build the template structure for kioo so that the rendering is completely based on enliven. Currently it outputs react nodes but it doesn't have too. I can then use a react wrapper to expose it to om and other.

11:43 the-kenny: dnolen: Have you had a look at the Chrome extension to inspect React applications? It's quite nice, but currently not *that* easy to use as all Om components have the name 'Unknown' and the state isn't easy to read (as the Clojure data structures aren't easy to inspect)

11:43 ckirkendall: cgrand: I am going to concentrate on the rules for outputting the traversal and modification separate from the dom input.

11:45 cgrand: ckirkendall: not precise enough but still https://gist.github.com/cgrand/8523669

11:46 anyway everything is in flux and superficial API is not my problem at the moement

11:46 ckirkendall: I have to run

11:46 AeroNotix: I'm having trouble implementing this in Clojure: https://gist.github.com/AeroNotix/47314dfb31e3fded1d87 Any pointers?

11:50 ckirkendall: cgrand: thanks for chatting

12:17 mrhanky: is it possible to shorten this binding? (binding [ns/a a ns/b b ns/c c ns/d d ns/e e ...] ... ) ?

12:19 sandbags: if ns is always "ns" i guess you could write yourself a macro to explode [a b c d …] into [ns/a a ns/b b …]

12:20 dnolen: the-kenny: yup, React need a patch to make it work

12:21 the-kenny: not difficult to do

12:23 eraserhd: So, I have a case where I'd like mutation only to guarantee amortized time of a data structure.

12:23 Its contents do not change in case of this mutation.

12:24 So I want something like an atom inside the data structure, but I don't care if the update gets lost (I mean, I don't want to retry the transaction).

12:24 the-kenny: dnolen: Nice :) I think it would be a helpful addition

12:24 dnolen: Other than that: Thank you *so* much for Om. You removed so much pain from web-application development (for me)

12:24 eraserhd: Can I just use deftype's mutable field? Do I need to do something else to make an atomic swap?

12:30 grzm: I'm getting started with core.async in Clojurescript and trying to straight-line some serial callbacks

12:30 I've taken an shot using a gist from dnolen: https://gist.github.com/grzm/8524580

12:31 bbloom: eraserhd: you should study java's synchronized, volatile, etc & understand them before attempting to do mutable fields that are concurrency safe in clojure

12:31 grzm: I'm having issues getting the value out of the go block, basically untangling the go/try/let

12:32 How should I be approaching it?

12:33 eraserhd: bbloom: Oh, right. Thanks. :)

12:33 edbond: grzm, using channels! (<! (let [out (chan)] (go <do-something> and (>! out <result>))))

12:34 bbloom: grzm: wrap the let in a go and then use <! for each binding expression

12:34 grzm: edbond: don't <! and >! have to be in go blocks well?

12:35 bbloom: grzm: at the "edges" (ie where you interop with callbacks or the top-level) you can use the asynchronous put! and take! functions

12:35 edbond: grzm, yes, should be used in go block

12:36 grzm: bbloom, edbond : thanks. let me give that a shot

12:36 bbloom: grzm: not that put! and take! are functions, not macros or special syntax in a go block. you can use them normally

12:37 edbond: I think take! is not usable in clojurescript, don't have much node exp though

12:37 also *!! (blocking variants) is not accesible in js, right?

12:37 bbloom: edbond: take! and put! are the primitives that everything is built on internally. they are necessary on any js host to interop with callbacks

12:38 edbond: the !! functions aren't variants in blocking, they are variants in threading. the single ! functions are blocking too, but they utilize "parking" instead of real threading primitives

12:39 the put! and take! functions are non-blocking & utilize a global queue

12:39 edbond: bbloom, yes you are correct, take! is valid too. I think of take! put! as <! !> wrapped in go macro

12:40 bbloom: edbond: it's the other way around :-) if you ever find yourself writing (go (<! c)) or (go (>! c x)) you could write take! or put! instead respectively

12:40 edbond: however, you should avoid asynchronous sends like that b/c are unbounded

12:41 edbond: yes, that's what I meant.

12:42 avoid because they introduce a new go block?

12:43 bbloom: edbond: no b/c there is no backpressure

12:43 edbond: if you have a bounded buffer and it's full, you block

12:43 edbond: if you have an unbounded buffer, it can't be full

12:43 so senders can overwhelm a receiver

12:43 you need to enforce the correct work balance manually

12:44 this is true of all event systems, but traditional callbacks are so damn bad at everything that you haven't got the spare brain cycles to think about anything as interesting as back pressure :-)

12:46 edbond: bbloom, thank you for explanation :)

13:20 ro_st: dnolen: what's the right way to have om/react write an unescaped script tag? doing youtube api things

13:20 luxbock: how do I rename a file in Clojure? I have a java.io.File called fff, so what I tried to do was (.renameTo fff (clojure.java.io/file "new-name.ext")) but this returns false and the file name doesn't change

13:20 dnolen: ro_st: that's a react question, don't know.

13:21 ro_st: dnolen: thank you

13:24 luxbock: hmm I must be doing something wrong since (.renameTo (file "old") (file "new")) is how rename is implemented in the fs library

13:25 ro_st: dnolen: what do you suggest my approach be when i encounter things like core.async go blocks not firing or takes from channels not receiving when i put something on them?

13:25 technomancy: error conditions that are communicated by return values. in the 21st century. =(

13:25 ro_st: ran into several such issues over the weekend

13:25 all in cljs

13:26 dissipate: does anyone know if it is worth it to create a Docker image for a basic Datomic install?

13:26 dnolen: ro_st: in CLJS in general?

13:26 ro_st: just sounds like bugs in the code you're writing.

13:26 ro_st: yes. right now when i encounter such an issue, i'm at a loss about how to proceed with debugging

13:27 dissipate: i want to write a Docker file to create a Docker image for Datomic, with a separate container for the file volume

13:27 dnolen: ro_st: it's take a bit of work to identify core.async problems if you haven't been doing it a while.

13:27 ro_st: we had a channel that received no problem except when writing to it from inside a dom handler. things of that nature

13:27 dnolen: ro_st: still it could be easier, I'm hopefully that simple-check could help w/ async testing

13:27 ro_st: automatic detection of dead locks, and checking that invariants are satisfied

13:28 even if async

13:28 s/hopeful/hopefully

13:28 ro_st: in the meantime it just takes some practice

13:28 dissipate: dnolen: deadlocks, wtf?

13:28 dnolen: dissipate: that's the tradeoff w/ CSP, deadlock

13:29 dissipate: dnolen: i thought they were trying to explicitly avoid deadlocks. :(

13:29 dnolen: dissipate: but it something plagues many async message oriented abstractions

13:29 dissipate: dnolen: that sucks. :(

13:29 dnolen: dissipate: no it's reality

13:29 nothing to do w/ sucking or not sucking

13:30 dissipate: distributed system have to face the same problems

13:30 dissipate: dnolen: correct me if i am wrong but i thought the whole idea of STM was to avoid locking

13:30 dnolen: dissipate: we're talking about CSP, not STM

13:30 ro_st: STM != CSP

13:30 dissipate: dnolen: ah, i see.

13:31 dnolen: sounds like Golang

13:31 dnolen: dissipate: or Erlang, similar abstractions

13:31 dissipate: or any serious async system

13:31 dissipate: dnolen: what is the advantage of CSP over STM?

13:32 dnolen: dissipate: they don't really address similar problems

13:32 technomancy: what is the advantage of toothpaste over gears?

13:32 TimMc: technomancy: I am going to quote you on that.

13:33 technomancy: STM is a way to coordinate changes to specific pieces of data

13:33 edbond: ro_st, take a look at the end of Markdown http://facebook.github.io/react/docs/tutorial.html#adding-markdown

13:33 technomancy: TimMc: the canonical one is "How is $X better than hadoop" IIRC

13:33 dnolen: dissipate: in CSP you have decoupled components w/ local state trying to communicate with each other. With STM you have multiple threads of control trying to interact sensibly with shared state.

13:33 TimMc: Oh, it was supposed to be silly. I hadn't read backlog, so I thought those were the names of related Clojure libraries. :-P

13:33 edbond: there is some dangerouslySetInnerHTML thing in reactjs, may help

13:33 ro_st, ^

13:33 ro_st: thanks edbond!

13:34 dnolen: dissipate: I'm sure there's some deep theoretical statement that says they are effectively equivalent, but the interface presented means you model solutions to your problems very differently.

13:35 dissipate: dnolen: sounds like systems programming vs. application programming

13:35 technomancy: TimMc: http://www.slideshare.net/gigaom/structure-data-presentationsheehywhy-you-should-not

13:35 sandbags: toothpaste won't rip the enamel off your teeth?

13:35 dnolen: dissipate: probably not a bad way to think about it.

13:35 hlship: dnolen: Where/when is a good time/place for discussion of Om?

13:35 Have some Q's and ideas

13:36 dnolen: hlship: probably best in #clojurescript

13:36 dissipate: dnolen: i have actually been thinking about this a lot lately. Hickey actually had a talk about systems programming where he outlined the problem of different systems having their own state and having to coordinate between them. seems rather unsolved to me.

13:37 dnolen: dissipate: I think core.async is his and others take on this problem.

13:38 dissipate: dnolen: but how do you use that if you have a Twitter feed, a Facebook timeline and a dozen other external systems with their own state?

13:38 TimMc: sandbags: Not with that attitude.

13:38 dnolen: dissipate: CSP is a coordination language

13:39 sandbags: TimMc: I guess it does depend how rigorously you apply the gears

13:41 dissipate: dnolen: hmm. suppose you feed all the data from each system into a Datomic database and then query as needed.

13:41 ro_st: dnolen: do any of the lifecycle methods fire after rendering?

13:42 dnolen: ro_st: IDidUpdate, IDidMount I think

13:43 ro_st: thank you

13:43 iDidUpdate sound like a suitable place to call out to YouTube api after writing a video to the page?

13:43 clojurebot: I don't understand.

13:47 dnolen: ro_st: IDidMount is probably better, happens *once*

13:48 dissipate: dnolen: have you seen this? http://www.youtube.com/watch?v=ROor6_NGIWU (The language of the system)

13:48 dnolen: dissipate: yep

13:48 ro_st: i need it to happen every time i alter the video src url. looks like mount for the first time, and update for subsequent times

13:48 dnolen: dissipate: that's pre core.async though

13:49 dissipate: dnolen: how does core.async solve the problem?

13:49 dnolen: dissipate: which solves some of those problems in the small, in the large different story.

13:49 dissipate: you have similar problems at different levels of scale

13:49 dissipate: dnolen: what's the ultimate solution?

13:49 dnolen: dissipate: everyone using Erlang?

13:50 bbloom: dnolen: gah no. erlang doesn't solve most of the problems discussed in language of the system lol

13:50 dnolen: bbloom: heh I wouldn't go so far as to say most

13:50 bbloom: dnolen: it punts by requiring homogeneous system components, which is a totally valid approach inside a single org

13:50 dissipate: dnolen: don't see how that helps. Twitter could be written in Erlang, it's still going to have its own state.

13:51 dnolen: dissipate: I don't really see a solution, beyond use a language and abstractions that can deal w/ heterogeneity.

13:54 dissipate: dnolen: if all of your systems generate a constant feed, one solution is to have them all write to a Datomic database, which produces a consistent database value at any point in time. correct?

13:54 tbaldridge: dissipate: or use something like kafka which is like Datomic-as-a-conveyor-belt.

13:55 ivan: luxbock: "The return value should always be checked to make sure that the rename operation was successful." http://docs.oracle.com/javase/7/docs/api/java/io/File.html

13:55 luxbock: if some library doesn't do this, it's broken

13:56 dissipate: tbaldridge: i see. thanks.

13:56 ivan: luxbock: the destination directory might not exist, you might be lacking permission, Windows might have a lock on it, etc

13:56 tbaldridge: dissipate: that's hwo LinkedIn does it for example.

13:56 dissipate: tbaldridge: they use Kafka?

13:57 tbaldridge: have you heard of Raft? http://highscalability.com/blog/2013/8/7/raft-in-search-of-an-understandable-consensus-algorithm.html

13:58 klrr_: hello

13:58 egosum: Good afternoon all

13:58 Liberator seems pretty great to me. I can't find anything too bad about using it…anyone know any gotchas or reasons to be wary of using it?

13:58 tbaldridge: dissipate: just recently, yes

13:58 dissipate: wow, didn't know they created Cogniect. interesting.

13:58 Cognitect

13:59 tbaldridge: do you think it is worth it to create a Docker image for a basic Datomic installation?

13:59 tbaldridge: who created Cognitect?

14:00 ro_st: dissipate: Cognitect created Datomic. Cognitect is a company

14:00 andyf: ThinkRelevance and Rich Hickey created Cognitect

14:01 dissipate: ro_st: it seems they created the company after Datomic came out. no?

14:01 andyf: do they have Clojure jobs?

14:01 ro_st: if they don't, no one does :-)

14:01 bbloom: ro_st: they were called Metadata Partner's at some point :-)

14:01 andyf: dissipate: Check their web site. maybe.

14:01 bbloom: er no apostrophe

14:01 stuartsierra: Full explanation of the Cognitect / Relevance / Datomic thing in this podcast http://thinkrelevance.com/blog/2013/09/16/cognitect-podcast-episode-040

14:02 ro_st: bbloom: yup

14:02 TimMc: ro_st: I think dissipate means "openings".

14:02 tbaldridge: dissipate: we're almost always looking for contractors : http://www.cognitect.com/jobs

14:02 dissipate: andyf: didn't see jobs on cognitect's site. but relevance does have a jobs page.

14:02 ro_st: what tbaldridge said

14:03 andyf: stuartsierra: You would not be surprised to learn that deftest's in a namespace can be executed in pretty much arbitrary order relative to each other?

14:03 stuartsierra: andyf: yes that is expected

14:03 dissipate: tbaldridge: ah, i didn't see that sidebar. cool, thanks.

14:03 tbaldridge: remote contractors as well?

14:03 andyf: stuartsierra: So if some tests in Clojure happen to pass because of the order they are executed, it would be better to change them not to depend on the order they are currently executed?

14:04 egosum: Any opinions on Liberator? Seeking opinions

14:04 bitemyapp: andyf: god yes.

14:04 tbaldridge: dissipate: yeah, we have people in almost every US timezone

14:04 bitemyapp: andyf: tests that require a particular order to pass are a failure.

14:04 dissipate: tbaldridge: why does Relevance still have its own site?

14:05 andyf: bitemyapp: Doesn't mean that it is easy to determine that they depend upon the order. Just found some by accident today.

14:05 seangrove: andyf: That's always a bad idea

14:05 tbaldridge: dissipate: because changing an existing client's contract is super hard? :-P

14:05 technomancy: I wonder how hard it would be to implement order randomization as a test fixtures

14:05 too many As there

14:05 bitemyapp: technomancy: that would be eggscellent.

14:05 technomancy: it would probably be pretty cringe-worthy of an implementation

14:05 bitemyapp: it should be non-optional.

14:06 andyf: technomancy: Not hard, I think, if you are willing to write your own slightly-modified version of test-all-vars in clojure.test

14:06 bitemyapp: symbol shufflin' err'day I'm shufflin'

14:06 technomancy: andyf: I think it would be technically possible without modifying clojure.test, but ... cringe-worthy =)

14:07 dissipate: tbaldridge: unfortunately, i am currently not versed in your technology stack. but it's good to know there are opportunities for Clojure developers to work remote!

14:07 technomancy: you just need a function that does nothing the first (dec n) times it's called and then shuffles everything on the nth call

14:09 dissipate: technomancy: how robust is the shuffler? if the PRNG doesn't produce at least n! permutations, you are hosed.

14:10 andyf: technomancy: However you do it, it would be good to have a way to repeat a previously failing order so that one could verify whether they have fixed their tests.

14:10 technomancy: andyf: definitely

14:12 TimMc: Print the PRNG seed.

14:12 dissipate: how robust is the built in 'shuffle' function in Clojure?

14:12 if it is as bad as Python's 'shuffle', that's not good

14:12 andyf: I think it was updated to be a Fisher-Yates shuffle in a recent Clojure release, but check the source.

14:13 bitemyapp: TimMc: for the love of god yes.

14:13 ivan: (source shuffle) says it calls java.util.Collections/shuffle

14:13 mdrogalis: dissipate: What's up with Python's shuffle?

14:13 dissipate: andyf: Fisher-Yates is fine, it's the PRNG used to generate the permutation.

14:14 andyf: if the PRNG wraps around before n! not all permutations will be generated. not good if you are shuffling a deck of cards.

14:14 mdrogalis: it does not produce all possible permutations of a list for any large 'n'

14:14 technomancy: dissipate: that hardly qualifies as "hosed"

14:14 bitemyapp: OpenJDK shuffle is basically fisher-yates. I have no idea re: Oracle

14:15 andyf: dissipate: So you are recommending a PRNG with enough bits of internal state to enable it to have a period like 2^1024 or something?

14:15 technomancy: you don't have to test anything remotely close to every single permutation to find problems with order-dependent tests

14:15 dissipate: Note that for even rather small len(x), the total number of permutations of x is larger than the period of most random number generators; this implies that most permutations of a long sequence can never be generated.

14:15 http://docs.python.org/2/library/random.html

14:15 stuartsierra: http://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#shuffle(java.util.List)

14:15 dissipate: andyf: more than that, a period greater than n!

14:16 ivan: that's not as bad as it sounds unless you can predict which shuffled sequences the PRNG will never generate

14:16 bitemyapp: gf3: <3

14:16 TimMc: dissipate: You want to boil the ocean to find out if there's an order-dependency?

14:17 technomancy: what the hell happened to java.jdbc

14:17 bitemyapp: gf3: thanks for bringing that to my attention, it led to the discovery of gems like: "mattpodwysocki: LOL! Man tries Haskell, realizes he’s not smart enough and gives up to pursue simple things like distributed systems. http://t.co/pdG35zz3E4"

14:17 dissipate: TimMc: well, for that use case it's fine. what if i want to use 'shuffle' for an online casino?

14:17 bitemyapp: technomancy: it's an open source simulation of a flailing startup

14:17 TimMc: OK, different use-case.

14:17 bitemyapp: technomancy: `fix pivot`

14:17 technomancy: problem is, pivoting is divergent and does not have a convergent fixed point :(

14:18 dissipate: ivan: it's pretty bad. imagine i want to write the back-end for an online casino. it's not good if i have to worry about 'shuffle' leaving out a massive number of permutations of a deck of cards.

14:18 ivan: https://stackoverflow.com/questions/3062741/maximal-length-of-list-to-shuffle-with-python-random-shuffle

14:19 I guess you want a better RNG anyway if you have a casino

14:20 bitemyapp: ivan: you mean /dev/urandom?

14:22 andyf: TIcket and patch for the particular issue I found in Clojure's tests: http://dev.clojure.org/jira/browse/CLJ-1328 Doesn't address the randomization of order that technomancy suggests for finding other such cases that may exist.

14:23 dissipate: ivan: you probably want it for a lot of situations, including scientific simulations. i just don't understand why a robust 'shuffle' is not built directly into these languages. i shouldn't even have to worry about it.

14:23 stuartsierra: andyf: thank you

14:24 technomancy: dissipate: more randomness requires more entropy, which is in short supply in many virtualized environments. defaulting to a basic shuffle which doesn't consume much entropy makes a lot of sense.

14:24 stuartsierra: Good randomness is expensive.

14:26 dissipate: technomancy: you are right, that is the ultimate source of the problem, lack of available entropy at the hardware and OS level, especially in a VM. is anyone even working on fixing that?

14:26 ivan: Intel has an RNG instruction now

14:27 dissipate: ivan: NSA approved? :D

14:27 cark: dissipate: nsa mandated

14:27 ivan: yes, how else would NSA analysts win all their online poker tables

14:35 bitemyapp: Morgawr: some people don't understand that games are subject to prototyping too.

14:47 edbond: dnolen, is it overkill to apply core.logic to solve euler224? https://projecteuler.net/problem=224

14:47 noonian: is there something like keywordize-keys from clojure.walk in cljs?

14:49 ToBeReplaced: noonian: do you need the walk behavior?

14:50 noonian: no, just replace string keys with keywords

14:50 holo: hi

14:51 ToBeReplaced: ,(reduce-kv (fn [m k v] (assoc m (keyword k) v)) {} {"foo" "bar"})

14:51 clojurebot: {:foo "bar"}

14:51 holo: is there a way to specify namespaces with wildcards to AOT compile? like :aot [app.*] (this does not work of course) . :all doesn't apply to my case

14:52 noonian: ,(doc reduce-kv)

14:52 clojurebot: "([f init coll]); Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals."

14:52 `cbp: (zipmap (map keyword (keys map)) (vals map))

14:52 noonian: thanks guys, so i guess there isn't anything built in

14:52 technomancy: holo: I think you can use regexes

14:53 dnolen: edbond: hmm, can't say but it would be fun to try.

14:53 ToBeReplaced: edbond: looks like a great use case for core.logic

14:53 holo: technomancy, hey how are you? ok, i'll try. thanks

14:53 edbond: ha-ha, there are too much variants

14:53 holo: (inc technomancy)

14:53 lazybot: ⇒ 92

14:53 edbond: I would probably start with fd

14:57 ToBeReplaced: `cbp: i don't like that solution because i believe the consistency of ordering of (keys m) and (vals m) is an implementation detail, not part of the contract (am i wrong?)

14:59 Morgawr: bitemyapp: some people can't understand the fun in prototyping and experimenting :P

14:59 `cbp: ToBeReplaced: seq, keys and vals walk maps in the same order

15:00 kschrader: is Immutant the way to go when deploying a Clojure webapp?

15:01 or do people do some sort of Jetty/Nginx dance?

15:02 ToBeReplaced: `cbp: they do, but is that a promise of the language? that's all i was getting at

15:03 holo: kschrader, i did a jetty dance when deploying with uberjar. now i'm trying to uberwar

15:05 `cbp: ToBeReplaced: It doesn't seem to be documented anywhere but I wouldn't worry too much about it

15:09 nDuff: ToBeReplaced: Hmm. It'd be interesting to submit a doc patch upstream to make that explicitly contractual.

15:09 ToBeReplaced: ...as I understand it to be something that's presently followed without fail within the core library.

15:12 jcrossley3: kschrader: if you only need web bits, immutant is overkill. it starts to make sense when you have multiple apps and some of them require messaging, jobs, or caching.

15:17 kschrader: jcrossley3: does it make deployment fairly brainless though?

15:18 I'm going to need jobs soon, so that probably makes my decision fairly easy

15:19 jcrossley3: kschrader: you're going to need some sort of init script and everything that goes along with that, either for immutant or your jetty-embedded app. so you need that much brain anyway. :)

15:23 kschrader: hosting is another factor. it's simpler to get a jetty-embedded app on say, heroku, than immutant. really depends on what you need and who's gonna support it.

15:23 kschrader: jcrossley3: yeah, that's not hard, I'm wondering about what it takes to continuously deploy changes

15:24 I'm going to start on Digital Ocean and eventually probably move to Amazon

15:24 and use Ansible for ops

15:24 jcrossley3: kschrader: it's essentially just a matter of rsync/scp'ing an archive.

15:25 kschrader: jcrossley3: got it, that's what I was hoping for

15:25 * kschrader goes to read the docs

15:25 jcrossley3: kschrader: feel free to pester us in #immutant if you run into anything weird or confusing. we'll try to help. :)

15:41 AeroNotix: grr, trying to write a macro to generate functions. Can't seem to get this quote/unquote business right

15:43 egosum: AeroNotix: you can do it!

15:43 bitemyapp: kristof: http://dl.dropboxusercontent.com/u/7810909/docs/applicative-errors-scala/applicative-errors-scala/html/index.html

15:43 AeroNotix: egosum: indeed, f it

15:47 kristof: bitemyapp: disjoin union = sum type

15:48 bitemyapp: I thought monads were sufficient to model errors

15:48 bitemyapp: Anyway, reading :P

15:49 grzm: anyone know of an issue requiring cljs.nodejs and "ReferenceError: Can't find variable: require" when using clojurescript.test ?

15:49 bitemyapp: kristof: Responses indexed by your messages: 1. http://i.imgur.com/uakbfh6.gif 2. http://i.imgur.com/SxprH.gif 3. http://i.imgur.com/W6sM7Ku.gif

15:50 grzm: I don't even need to use node/require in the app: just (:require [cljs.node :as node]) in the namespace

15:53 bitemyapp: kristof: Haskellers generally operate on the least-power principle. Monads are overkill for some forms of error handling.

15:53 kristof: the idea is to learn how to grow up *and* down in abstractions.

15:54 and get the "right-sized" approach to your problems.

15:55 kristof: bitemyapp: I'm a little confused by the type signature of an applicative functor.

15:56 Oh! I understand it now

15:56 bitemyapp: kristof: ^a ^k

15:57 kristof: It just means "take a context of things, and a context of functions which operate on those things, and return the new context of things

15:57 arrdem: bitemyapp: so it turns out that RethinkDB is entirely the wrong datastore for what I'm trying to achieve :/

15:57 bitemyapp: arrdem: confess your sins. I am interested.

15:58 arrdem: bitemyapp: I asked over in #rethinkdb, explained my datastore architecture and hardware limitations and the answer was "yeah we're an in-memory db, sorry".

15:58 bitemyapp: this is what I get for trying to host everything off my old High School laptop :P

15:59 bitemyapp: arrdem: so is Datomic, lol.

15:59 arrdem: bitemyapp: yeah. the answer is that I either do some contracting work and get a real server or I just use an SQL I suspect.

15:59 bitemyapp: arrdem: PostgreSQL is the practical choice here.

16:00 arrdem: in either case cloutjure is off the table for another week or two because I need to get back to school work..

16:00 bitemyapp: yeah that's basically where I was leaning.

16:01 bitemyapp: the intended architecture is that the DB is really just a linear buffer of all timestamped messages and that I do analysis with sequential scans...

16:05 bitemyapp: arrdem: I look forward to hearing how fast it is with PostgreSQL.

16:10 kristof: bitemyapp: cool presentation :)

16:11 bitemyapp: kristof: Tony Morris is a good person to keep an eye on.

16:11 grumpy, but very good.

16:13 kristof: bitemyapp: but error handling in Haskell seems to be done with monads, I.e. Control.Monad.Error

16:13 marcopolo`: is there a way to search lein templates?

16:14 bitemyapp: kristof: uh, that's one way.

16:14 technomancy: marcopolo`: https://clojars.org/search?q=lein-template

16:14 bitemyapp: kristof: there's actually a lot of ways, some being as simple as Either.

16:14 technomancy: hm; that's not right

16:14 bitemyapp: Applicatives are basically just a way to "combine" Either values.

16:15 and have intelligent error handling.

16:15 technomancy: marcopolo`: https://clojars.org/search?q=artifact-id:lein-template

16:15 marcopolo`: technomancy: great, thanks! I didn't know about that feature

16:15 bitemyapp: kristof: the applicatives themselves, because they lend themselves to a tree/dependency-graph representation of your inputs, mean you get a declarative and safe way to handle reducing down to final answers while comprehensively handling errors.

16:16 kristof: but the bonus is: you don't need monads if you'd like to model your errors that way.

16:16 kristof: bitemyapp: So you can just use regular error and data

16:16 technomancy: no problem

16:16 kristof: bitemyapp: and that way, if you want to use that data somewhere else, it doesn't have to know about monads

16:17 bitemyapp: kristof: hum, even the use of monads doesn't preclude taking data out of the monadic context

16:17 kristof: well, you have to bind it

16:17 bitemyapp: kristof: it's just that you'd have a sum-type to express the non-deterministic possibilies, then case them out to extract the "everything worked" and "at least one thing failed" cases.

16:17 kristof: ok, that makes sense

16:17 bitemyapp: kristof: not necessarily. it depends on what the monad is implemented against.

16:18 kristof: Maybe is an example here.

16:18 it's just a sum type. So is Either.

16:18 kristof: ok.

16:18 bitemyapp: Either can be used to express left StringError right OkayValue

16:18 after monadically sequencing operations, you can split the sum type and rip it out if you want.

16:18 kristof: with a case

16:18 bitemyapp: yeah.

16:19 fromJust makes some people kinda angry though :)

16:19 because if you use it without a pattern match / case, it'll create an exception.

16:19 error, technically.

16:19 I should be more specific, sorry. not "exception", error.

16:19 kristof: Ok, this makes sense

16:20 Is there a categorical dual to applicatives? Reversing the arrows in the type signature makes it look like... just another applicative.

16:21 bitemyapp: kristof: (f a -> f b) -> f (a -> b)

16:21 f a -> a

16:22 kristof: if you imagine what catamorphic folding a tree looks like vs. an anamorphic unfold, this could have a similar mental picture.

16:22 kristof: but that's really just one way to construct a dual of an applicative, you could also make a contravariant.

16:23 kristof: the problem with broadly asking, "what's the dual of this?" is you have to know which aspect of the thing you're trying to find the "co" of.

16:23 kristof: bitemyapp: I was talking about <*> :: f a -> (f a -> f b) -> f b

16:23 bitemyapp: kristof: do you want the dual of the covariance? of the monoid'ishness?

16:23 kristof: bitemyapp: I'm not sure. :)

16:23 bitemyapp: see?

16:23 it's a good question.

16:23 kristof: It is.

16:23 bitemyapp: it's just not yet well-formed because you don't know what you want.

16:24 if you were solving a more specific problem with Applicatives, and you wanted to do something, the answer would be easier to attain and more useful to boot.

16:24 kristof: Ah, that's true. I guess I was looking for a general pattern, but this question is too general to begin with.

16:24 mmitchell: I'm working with a java lib, that when printed, clojure calls "key" on something it thinks is a map-entry. I get an exception: "java.lang.ClassCastException: org.apache.solr.common.SolrInputField cannot be cast to java.util.Map$Entry at clojure.core$key.invoke (core.clj:1482)" -- is there a way to add "key" support to the SolrInputField?

16:25 btw... if I don't print the result, the code works just fine

16:25 bitemyapp: kristof: it's important to remember that theorems in the category of Hask are universally more specific than those involving category theory in general. the implication is that you're going to need to also have a more specific noun or verb informing your inquiry.

16:25 kristof: bitemyapp: Oh, I was reading about free monads because of our discussion with bloom the other night and I'm slightly confused about how join is supposed to behave on a free monad.

16:25 bitemyapp: kristof: that having been said, the intuitions and patterns from category theory are still interesting.

16:26 dobry-den: How come (spit (str (io/resource "cache") "/42.html") "Hello") doesn't work from inside an uberjar?

16:27 llasram: Um. Because you'd be asking it to write to something inside of your JAR?

16:27 bitemyapp: kristof: I'm going to answer this by providing what I think is a good introduction: https://www.fpcomplete.com/user/dolio/many-roads-to-free-monads but I can tell you how I've seen them used colloquially in Haskell.

16:27 technomancy: dobry-den: how exactly would you expect that to work?

16:27 bitemyapp: kristof: especially by Tekmo.

16:28 kristof: bitemyapp: That was the article that I was reading. It's a bit long so I've been having trouble getting through all of it but I'll grok it all eventually.

16:28 bitemyapp: kristof: let me find one lower on the ladder of abstraction then.

16:29 kristof: no reason to suffer.

16:29 kristof: First read the description: http://hackage.haskell.org/package/free

16:29 kristof: the description matches how I've seen them used.

16:29 dobry-den: technomancy: when run from `lein ring server`, it creates resources/cache/42.html. from within an uberjar, i get a nondescript 500 error.

16:29 bitemyapp: kristof: pause to reflect on what macros in Lisp are like.

16:29 dobry-den: llasram: oh, so it actually *shouldn't* work

16:29 technomancy: dobry-den: how would you expect it to work in an uberjar?

16:29 bitemyapp: kristof: what are you doing? you're manipulating a tree-like structure before it has taken on a specific meaning.

16:30 llasram: dobry-den: Yes :-)

16:30 dobry-den: technomancy: yeah, i see. an uberjar is a zip file. of course

16:30 holo: dobry-den, spitting outside uberjar works though. it seems it's read-only fs

16:30 bitemyapp: kristof: the final, transformed tree-value then gets handed off to some sort of interpreter/compiler.

16:30 kristof: this is an example (one among many) of how Haskellers do EDSLs and macro'ish things without template haskell.

16:31 dobry-den: Is it good enough to just (spit "/users/absolute/path/42.html" "Hello") from within an uberjar, then?

16:31 kristof: bitemyapp: So what's the underlying natural transformation that macros are equivalent to?

16:31 holo: anyone knows some dirty trick to refer assets that are outside the uberjar?

16:31 kristof: bitemyapp: If ASTs are our free monad.

16:32 AeroNotix: Can I expand a macro even if it would raise an exception?

16:32 bitemyapp: kristof: applicatives are kinda like lists, and you can encode trees within nested lists.

16:32 kristof: AeroNotix: Wouldn't you just get the exception?

16:32 holo: dobry-den, i can do it here

16:32 bitemyapp: kristof: so S-exprs are kinda like applicatives in that respect, but the "feeling" of it is closer to free monads.

16:33 kristof: bitemyapp: Gotcha. Interesting to think about, though; what kind of magnificent meta programming can you do when you're able to describe code more descriptively than "lists"?

16:33 bitemyapp: kristof: what's it equivalent to? runFree or runFreeT I'd imagine.

16:33 technomancy: dobry-den: doesn't really have anything to do with an uberjar

16:34 bitemyapp: kristof: well the thing that'll really smash the proverbial brain-egg against the idea-skillet is when you realize you can use *ANY* types, denotation, semantics, or values you want.

16:34 and it'll all be type-safe to boot, insanely enough.

16:35 unless your interpreter is evil.

16:35 arkh: in core.async, is there a way to count the number of items available to be taken from, say, (chan 10) ?

16:35 kristof: bitemyapp: http://tratt.net/laurie/research/pubs/papers/berger_tratt__program_logics_for_homogeneous_meta_programming.pdf

16:36 Laurence has a lot of papers on PyPy and JIT compiler generation, so I was surprised that he had delved into this topic

16:36 The PyPy project is, in itself, a lot of metaprogramming though and he's complained about python being a poor metaprogramming language so I guess it isn't *too* surprising

16:37 bitemyapp: kristof: I guess the only caveat to using free monads as a DSL is that they're a runtime mechanism so unless you do a codensity transformation for performance you might produce slower code than something more naturally flat in nature.

16:37 kristof: bitemyapp: that is true

16:38 bitemyapp: kristof: nothing really stops you shoving it to compile-time though.

16:38 kristof: it's just that people like having the power at runtime.

16:38 kristof: bitemyapp: Anyway, it's a good idea for any language to have the entire language available for compile-time programming

16:38 tbaldridge: arkh: no, because that would introduce a race condition, that number could change the moment after you read it.

16:39 bitemyapp: kristof: interesting paper, but other than the lifting of functions it seemed mostly like a typed Lisp macro derivative.

16:39 arkh: tbaldridge: ok - thank you

16:39 bitemyapp: kristof: right, I agree, and that's why TH is a thing.

16:39 I just think for most purposes laziness and EDSLs go further.

16:39 tbaldridge: kristof: I agree, meta programming should be required in almost every language.

16:40 kristof: and then there's this: http://h3.gd/ctrace/

16:40 kristof: bitemyapp: But Template Haskell is one of the ugliest things to read

16:40 tbaldridge: "ctrace is a compile-time raytracer written in the D Programming Language." - one of the best things I've read

16:40 bitemyapp: kristof: it's a bit ghetto because of how rarely people rely on it.

16:40 kristof: considering how much sorcery people like Tekmo engage in, that should say something.

16:41 AeroNotix: some help? https://gist.github.com/AeroNotix/f218770087e322a1c78c I want to generate functions which otherwise I'd have to write out manually

16:41 bitemyapp: I don't think there's anything wrong with a compile-time access to the language semantics, but I'd prefer the type system be constrained to something total and decidable.

16:41 kristof: bitemyapp: Anyway, that paper was an operational semantics for meta-programming so I wouldn't just call it "just a typed lisp macro derivative" :P

16:42 bitemyapp: kristof: I stay out of that field.

16:42 kristof: outside of my ken.

16:42 or sub-field if you like, either way, you get my meaning.

16:42 kristof: tbaldridge: "I'm just a pervert and I love raping the D compiler." Tactless choice of words but still funny

16:43 tbaldridge: kristof: is that on that page? ick...I didn't see that. I find such language offensive...

16:43 llasram: Yeah.....

16:43 bitemyapp: kristof: given that anybody that uses D is probably in Alexandrescu's school of thought, it seems within character.

16:43 kristof: tbaldridge: I don't find it offensive as much as I'm worried it'll trigger someone.

16:44 bitemyapp: Ditto.

16:44 kristof: But maybe that's a form of being offended.

16:44 bitemyapp: I don't see it as being offended because I'm not.

16:44 I'd just prefer people not unduly suffer.

16:44 kristof: ^

16:44 bitemyapp: but if I let myself suffer because of what he said, then that would add to the suffering, so I'm not going to suffer because I was worried about another person's suffering.

16:45 llasram: So close, yet so far

16:45 AeroNotix: any pointers?

16:45 tbaldridge: None the less, I apologize to the room for that. I'll try to be more careful in the future.

16:45 llasram: (inc tbaldridge)

16:45 lazybot: ⇒ 4

16:45 AeroNotix: (inc lazybot )

16:45 lazybot: ⇒ 1

16:46 bitemyapp: lazybot's back? about fucking time.

16:46 (inc Raynes)

16:46 lazybot: ⇒ 41

16:46 bitemyapp: $karma bitemyapp

16:46 lazybot: bitemyapp has karma 15.

16:46 bitemyapp: well that has to change.

16:46 liflash: hi everybody, i'm working on my first project with clojure (a web app) and experimented a bit with server and client side coding. suddenly I get a compile exception the clojure.tools.reader/Reader-types cannot be found. It's a dependency from ring.middleware which itself is a dependency of noir, which I use. The package is definitely in my repository. Any ideas what's causing the error?

16:46 kristof: AeroNotix: I only glanced at it but are you sure using "bindings" that way without gensyms is alright?

16:46 llasram: bitemyapp: Trying to remember -- were you attempting to get the most negative karma?

16:47 dobry-den: Well imagine that. All of the performance issues of my app have been solved by running `lein ring server` in production mode (LEIN_NO_DEV=true)

16:47 Raynes: bitemyapp: I don't have any way of knowing when it goes down unless I try to use it or someone informs me.

16:47 bitemyapp: Raynes: I wasn't going to perturb your bubble.

16:47 Raynes: can I get free karma for not bothering you?

16:48 AeroNotix: kristof: it puts the value of bindings in the form

16:48 Raynes: (dec bitemyapp)

16:48 lazybot: ⇒ 14

16:48 Raynes: jk ily

16:48 (inc bitemyapp)

16:48 lazybot: ⇒ 15

16:48 technomancy: dobry-den: LEIN_NO_DEV is only used by lein 1.x

16:48 bitemyapp: Raynes: <3

16:48 technomancy: using `lein ring server` in production is not a good idea

16:48 bitemyapp: Raynes: I am debugging Python code. My spleen ruptured an hour ago.

16:49 technomancy: you should either use an uberjar or if you can't do that for some reason, use `lein with-profile production trampoline ring server`

16:49 bitemyapp: get the winchester, put me down. I'm done. stick a fork in it.

16:49 AeroNotix: bitemyapp: Where are you from?

16:50 * technomancy actually just grepped a checkout of lein-ring to confirm because he saw Raynes was here and figured he'd protest =)

16:50 dobry-den: technomancy: really? lein-ring github suggests LEIN_NO_DEV and it really did just dramatically change the performance of my app in a reproducible way.

16:50 Raynes: technomancy: I did the same thing because I would like to protest.

16:50 dobry-den: technomancy: i agree about uberjar though. honestly it's because of my dumb `spit` issue.

16:51 technomancy: dobry-den: it will make a difference if you're using lein 1.x

16:51 kristof: bitemyapp: Last question of the day before I stop bugging you: anything worth looking at in Eff?

16:51 Raynes: technomancy: I don't think you still have very good reasons for condemning lein ring, but sure, LEIN_NO_DEV is a README leftover.

16:51 Bronsa: liflash: you have a typo somewhere. the correct namespace should be clojure.tools.reader.reader-types

16:51 mmitchell: What protocol defines "key" for MapEntries?

16:51 technomancy: unless lein-ring is doing something very grep-resistant like (System/getenv (str "LEIN_" "NO_DEV")) =)

16:51 Raynes: "i don't think you still"

16:51 dobry-den: technomancy: lein 2.3.4.

16:52 Raynes: "I still don't think"

16:52 dobry-den: i'll read the source and look

16:52 bitemyapp: kristof: extensible effects you mean?

16:53 technomancy: dobry-den: I think it would be more beneficial to understand what the actual problem you're having with spit is rather than changing everything up to work around it

16:53 Raynes: technomancy: I hope it's doin' that.

16:53 kristof: bitemyapp: effects and handlers

16:53 egghead: anyone used purnam for cljs midje?

16:54 dobry-den: technomancy: right, i understand them now (duh, can't spit into a zip (uberjar)). so in the meantime i was just running with lein-ring on the server until i figured it out.

16:54 bitemyapp: kristof: oh you mean Bauer/Pretnar paper. I'm not familiar with that work, only extensible-effects in Haskell.

16:54 kristof: roughly it's an alternative to monad transformers, I don't know how they compare beyond the difference in implementation.

16:54 it's definitely a different way to model the problem.

16:55 kristof: they both stem from algebras of monads, AFAIK.

16:55 technomancy: dobry-den: so it sounds like what you're actually doing is making your resources/ directory perform double duty as a scratch-pad as well as a resources/ dir

16:55 arrdem: bitemyapp: tempting as it may be you won't get the winchester until you either break an ankle or start pushing untyped code in here.

16:56 bitemyapp: arrdem: I could push some uni-typed Haskell if that works.

16:56 liflash: Bronsa: it came out of my head. the message should be correct, since it is loaded within ring.middleware

16:57 dobry-den: technomancy: i was using resources/cache as a place to cache markdown->html rendering. it just seemed tidy. but of course on the server i'll have to spit into another location.

16:59 liflash: Bronsa: My problem is, I don't think this error is really the problem since it worked before and checking out the same template works fine. I must have broken something somewhere else, but am not sure where to start. The stacktrace only complains about the missing resource when initializing the source files for compilation

16:59 dobry-den: after skimming lein-ring 0.8.10 (latest) on leiningen 2.3.4, i can't figure out why LEIN_NO_DEV=true dramatically changed everything though. and there's no way it's a fluke.

16:59 Bronsa: liflash: without the actual error it's hard to tell

17:00 kristof: bitemyapp: One of the claims in the paper is that effects are more composable (or more easily composable) than monads. Also, as far as I know, monad transformers and their relationship to monads aren't actually very well understood yet.

17:00 bitemyapp: kristof: I don't personally know how strong their argument for that is.

17:00 kristof: the composability argument, that is. If you find this interesting, look at extensible-effects on Hackage for something immediately usable.

17:01 kristof: bitemyapp: will do!

17:02 bitemyapp: The thing is, though, I'm not sure extensible effects are orthogonal to monad transformers. It seems like there's an underlying abstraction that applies to both, and one or the other needs to go away. ...But I wouldn't know. As you said earlier, "Why not both?"

17:02 bitemyapp: kristof: well yeah, I wouldn't describe them as orthogonal either. I think they're parallel approaches to roughly the same problems.

17:02 kristof: one might have better usability or composability than the other, but transformers were the more "obvious" answer originally I think.

17:03 kristof: considering how far you can go with relatively simple combinators like Parsec, these seems like #PostSingularityProblems rather than #FirstWorldProblems

17:03 these seem*

17:03 but I'm sure I'll eat those words in ~5 years.

17:07 liflash: Bronsa: I just tried to 'create' the error by starting the repl and suddenly it works again..... but something else doesn't work... sorry for bothering, will have to look into it

17:07 Bronsa: thanks :)

17:12 Bronsa: ok, got 'working' again (the compiled files of a working branch were still available).... which part of the stacktrace do you need?

17:12 Bronsa: liflash: how about all of it? :)

17:13 liflash: Bronsa: hehe, ok, here it comes

17:13 Bronsa: Exception in thread "main" java.lang.NoClassDefFoundError: clojure/tools/reader/reader_types/Reader

17:13 at clojure.tools.reader.edn__init.load(Unknown Source)

17:13 at clojure.tools.reader.edn__init.<clinit>(Unknown Source)

17:13 at java.lang.Class.forName0(Native Method)

17:13 at java.lang.Class.forName(Class.java:270)

17:13 at clojure.lang.RT.loadClassForName(RT.java:2098)

17:13 at clojure.lang.RT.load(RT.java:430)

17:13 at clojure.lang.RT.load(RT.java:411)

17:13 at clojure.core$load$fn__5018.invoke(core.clj:5530)

17:13 at clojure.core$load.doInvoke(core.clj:5529)

17:13 arrdem: liflash: MOTHER OF GOD USE A PASTEBIN

17:13 liflash: at clojure.lang.RestFn.invoke(RestFn.java:408)

17:13 at clojure.core$load_one.invoke(core.clj:5336)

17:13 at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)

17:13 at clojure.core$load_lib.doInvoke(core.clj:5374)

17:13 at clojure.lang.RestFn.applyTo(RestFn.java:142)

17:13 at clojure.core$apply.invoke(core.clj:619)

17:13 at clojure.core$load_libs.doInvoke(core.clj:5413)

17:14 at clojure.lang.RestFn.applyTo(RestFn.java:137)

17:14 kristof: guy's first time in IRC

17:14 liflash: at clojure.core$apply.invoke(core.clj:619)

17:14 kristof: someone kick him :P

17:14 liflash: at clojure.core$require.doInvoke(core.clj:5496)

17:14 at clojure.lang.RestFn.invoke(RestFn.java:421)

17:14 at ring.middleware.cookies$loading__4910__auto__.invoke(cookies.clj:1)

17:14 rasmusto: ~doInvoke

17:14 clojurebot: Gabh mo leithscéal?

17:14 arrdem: http://static2.wikia.nocookie.net/__cb20130417063927/epicrapbattlesofhistory/images/f/f4/Picard-facepalm.jpg

17:14 liflash: at ring.middleware.cookies__init.load(Unknown Source)

17:14 at ring.middleware.cookies__init.<clinit>(Unknown Source)

17:14 at java.lang.Class.forName0(Native Method)

17:14 at java.lang.Class.forName(Class.java:270)

17:14 at clojure.lang.RT.loadClassForName(RT.java:2098)

17:14 arrdem: technomancy: danke

17:14 liflash: at clojure.lang.RT.load(RT.java:430)

17:14 kmicu: WHY!

17:14 liflash: at clojure.lang.RT.load(RT.java:411)

17:14 at clojure.core$load$fn__5018.invoke(core.clj:5530)

17:14 at clojure.core$load.doInvoke(core.clj:5529)

17:14 at clojure.lang.RestFn.invoke(RestFn.java:408)

17:14 at clojure.core$load_one.invoke(core.clj:5336)

17:14 at clojure.core$load_lib$fn__4967.invoke(core.clj:5375)

17:14 at clojure.core$load_lib.doInvoke(core.clj:5374)

17:15 scgilardi: just when we got to load-lib

17:15 kristof: maybe he was testing a bot

17:15 arrdem: okay. so the votekick bot is totally gonna have a "is pasting stacktrace" module...

17:15 justin_smith: (inc arrdem)

17:15 lazybot: ⇒ 13

17:15 rasmusto: or just a search for ^I

17:16 Bronsa: oh god.

17:16 bitemyapp: (inc arrdem)

17:16 lazybot: ⇒ 14

17:16 bitemyapp: arrdem: yeah, I endorse this.

17:16 kristof: bitemyapp: I suppose the latter, then, might disappear in the future if algebraic effects become more popular. But the point of monads were to model computation-on-the-side style effects anyway, so if that's the case, then what's the point of a monad? :)

17:17 arrdem: (inc technomancy) ;; active ops > active bots

17:17 lazybot: ⇒ 93

17:17 arrdem: good lord

17:17 this is why I don't feel bad about having lazybot karma be a parameter to the votekick score... it correlates so well with activity here!

17:17 bitemyapp: kristof: eff is still part of monads AFAIK

17:18 hyPiRion: Something has to be tone.

17:18 We need to get better stacktraces, otherwise the IRC community will be destroyed and shattered.

17:19 kristof: bitemyapp: monads are more general than algebraic effects

17:19 arrdem: hyPiRion: I agree that better stack traces would be awesome, but I fail to see the link to the death of #clojure

17:19 Bronsa: maybe having clojurebot yell "IN A PASTEBIN" everytime "stacktrace" is mentioned.

17:19 hyPiRion: arrdem: sarcasm :(

17:19 kristof: bitemyapp: I think eff's point is that reducing the generality yields a structure that is more amenable to composition

17:19 liflash: ok, sorry again, but you really don't have to kick me immediatly

17:19 arrdem: hyPiRion: internet, intent and microexpressions :/

17:20 Bronsa: liflash: anyway, are you by any chance using cljsbuild?

17:20 liflash: it's really my first time on irc

17:20 AeroNotix: liflash: we really did, now you know

17:20 liflash: Bronsa: yes

17:20 rasmusto: liflash: refheap for pasting :>

17:20 technomancy: liflash: your client was streaming the lines out at a trickle

17:20 bitemyapp: kristof: yeah I could see that. Also see: http://eb.host.cs.st-andrews.ac.uk/drafts/effects.pdf

17:20 technomancy: so it was interrupting ongoing conversations

17:20 bitemyapp: kristof: this is probably partly responsible for the surge of interest in Idris.

17:20 technomancy: otherwise I wouldn't have kicked

17:20 AeroNotix: liflash: also, get a better client. The good ones say "ARE YOU SURE YOU WANT TO BE AN IDIOT" before doing stuff like that

17:21 liflash: AeroNotix: I use ERC ;)

17:21 arrdem: liflash: weird... it should have warned you...

17:21 technomancy: liflash: hang on; there is a thing you can do

17:21 AeroNotix: liflash: like I said, get a better client.

17:21 kristof: bitemyapp: Huh? I thought Idris's claim to fame was dependent types

17:21 AeroNotix: Weechat, Irssi etc

17:21 bitemyapp: AeroNotix: lol, you're about to get driven out of town.

17:21 technomancy: (setq erc-flood-protect nil)

17:21 kristof: bitemyapp: But yeah, this paper seems more relevant to this discussion than the Eff paper

17:21 arrdem: AeroNotix: dude. bashing ERC in here? good luck...

17:21 bitemyapp: kristof: yeah but it's one of the algebraic effects petri dishes.

17:21 arrdem: liflash: see technomancy's last

17:22 AeroNotix: arrdem: Compared to weechat+znc? Puh-lease

17:22 kristof: bitemyapp: cool stuff :)

17:22 arrdem: AeroNotix: I run ERC+IRSSI. come at me brah

17:22 bitemyapp: kristof: you're right that dependent types is the raison d'etre, but Agda already had that.

17:22 * AeroNotix comes

17:22 technomancy: liflash: will disable the trickle behaviour so at least it'll all come out in one fell swoop and freenode's own protections will kick in

17:22 * arrdem reaches for a rusty crowbar

17:22 bitemyapp: kristof: Idris is more designed for programming than Agda or Coq.

17:22 liflash: technomancy: thx

17:23 technomancy: but shouldn't I set the flood-protect to t?

17:23 technomancy: also I think there's a setting to warn you right when you press enter in 24.4, but that hasn't been released yet

17:23 liflash: in this case flood-protect means "trickle the lines out slowly so that it won't trigger freenode's anti-flood mechanism" which is unambiguously bad

17:23 justin_smith: liflash: flood-protect makes the output come out slow, so you don't get auto-booted for spammy output

17:23 AeroNotix: technomancy: surely it's got a lot of hooks that you could write this yourself?

17:24 technomancy: (add-to-list 'erc-pre-send-hooks .... )

17:24 ivan: I like flood protection because I don't flood by accident

17:24 AeroNotix: or w/e

17:24 justin_smith: liflash: so it is more like "flood-enable" since it bypasses the automatic protection

17:24 xuser: so thinking of jumping to emacs with evil, what packages do I need for a basic clojure enviroment besides cider?

17:24 technomancy: AeroNotix: yes, it's included now in 24.4

17:24 AeroNotix: cool

17:24 technomancy: but not many are running 24.4 yet

17:24 kristof: bitemyapp: Well, Idris is Turing Complete. :)

17:24 arrdem: yay now UTCS will be 16 emacs releases behind....

17:24 technomancy: the new setting is erc-accidental-paste-threshold-seconds

17:24 AeroNotix: huh, 24.3 here, Archlinux too. Damn thing.

17:24 * arrdem mutters darkly about having to manually install package.el

17:24 technomancy: if you're on an emacs build new enough to have that, even better

17:24 kristof: bitemyapp: I'm going to put down this Eff paper, all the examples are unwieldy and no matter how cool the underlying theory is, no one would ever want to program this way.

17:25 hyPiRion: is 24.4 out already? I thought snapshot was, at least a week ago when I built it

17:25 Bronsa: liflash: https://github.com/cemerick/austin/issues/23

17:25 technomancy: hyPiRion: I think it's in feature freeze

17:25 arrdem: technomancy: that sounds right... there was a post yesterday about the comming new features.

17:26 hyPiRion: technomancy: ah

17:26 hrm.

17:26 liflash: Bronsa: thanks, looking into it....

17:28 kristof: bitemyapp: You should send some of Tekmo's more interesting experiments my way

17:28 If it's not too much trouble.

17:29 bitemyapp: kristof: (touching on effects): http://hal.archives-ouvertes.fr/docs/00/44/58/73/PDF/dualV1.pdf

17:29 (and duals)

17:30 socksy: I feel like I do in #idris, and I haven't got a clue what's going on in anything anyone's talking about

17:30 liflash: Bronsa: do you know that issue from your own experience? austin is already in my dev profile...

17:31 bitemyapp: kristof: tekmo: http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html

17:31 kristof: but also: http://ttic.uchicago.edu/~dreyer/course/papers/wadler.pdf

17:31 kristof: intuition for free monads is closely tied to understanding free theorems.

17:31 tekmo mentions this in his article about fusion and pipes.

17:32 Bronsa: liflash: no, I only heard about that since I'm the tools.reader author.

17:33 liflash: Bronsa: ;) ok

17:34 bitemyapp: kristof: one of my dream projects is making a "mapper" for community contributed of dependency trees for white papers

17:35 kristof: so that if you were looking at a blog post or paper for "free monads" you'd see upvotes for "theorems for free"

17:51 dsrx: Monads for nothin' and type checks for free

17:51 liflash: Bronsa: I had to move the aot to the production profile too, if anyone is asking again ;)

17:51 Bronsa: thanks a lot!

17:51 dsrx: s/ and/;/

17:58 bitemyapp: (inc dsrx)

17:58 lazybot: ⇒ 1

17:58 bitemyapp: socksy: I kinda brought #haskell and #idris here.

17:58 benkay: I'd like to use with-redefs in a midje with-state-changes (before :facts) block instead of wrapping my facts in it, but I think that I'm going about this incorrectly. Thoughts?

18:00 socksy: bitemyapp: you might enjoy #idris. It's active, but not as busy as #haskell

18:00 benkay: (my goal is to replace my datomic db uri with the in-memory test db for integration tests)

18:00 bitemyapp: socksy: just joined because you reminded me it existed.

18:00 socksy: :D

18:01 bitemyapp: benkay: you're making at least two, possibly three mistakes.

18:01 benkay: 1. using midje 2. wanting to use with-redefs

18:01 benkay: save me from myself oh sage

18:01 what's wrong with midje?

18:01 bitemyapp: benkay: proper configuration.

18:01 arrdem: benkay: loooooolz

18:02 clojurebot: forget bitemyapp |is| it ammuses me to mock other people gods

18:02 bitemyapp: benkay: https://github.com/bitemyapp/berossus/blob/master/src/berossus/rocks/your/data/config.clj

18:02 arrdem: you misspelled it and don't do that.

18:02 arrdem: damnit.

18:02 rasmusto: arrdem: dammnit*

18:02 bitemyapp: benkay: ignore the larger scope of "services" for now, focus on how environ and the config namespace are being used.

18:02 arrdem: bitemyapp: hey. "save me from myself oh sage" is pretty good too.

18:02 bitemyapp: benkay: https://github.com/bitemyapp/berossus/blob/master/test/berossus/api_test.clj

18:03 arrdem: a noun can have multiple facts.

18:03 half the reason I wanted to open source berossus was so I could use it as example code.

18:03 dnolen: Om tutorial in progress here - http://github.com/swannodette/om/wiki/Tutorial, will be adding more to it over the coming weeks but probably enough already to have quite a bit of fun and explore.

18:04 dsrx: egghead: i thought about it a little and it might be cool to re-implement a karma-like (the test runner) thing in clojure using austin

18:04 tbaldridge: Bronsa: do you know if anyone is working on SSA passes for tools.analyzer? If not I'm going to be starting on that this week. No reason to keep this stuff specific to core.async

18:04 locks: dnolen: nice :D

18:04 dsrx: dnolen: nice!

18:04 benkay: thanks bitemyapp.

18:04 egghead: dsrx: that would be cool

18:04 locks: dnolen: how familiar with Reactjs does one need to be?

18:04 * bitemyapp puts his bamboo stick away

18:05 dsrx: egghead: better lein integration, you could drop into a repl when tests fail, no node.js dependency

18:05 rasmusto: dnolen: cool beans

18:05 bitemyapp: locks: I can't see it hurting.

18:05 egghead: dsrx: just ran my first travis CI build with karma + firefox testing my cljs :)

18:05 dsrx: neato

18:05 same project you were working on before?

18:05 dnolen: locks: by the time the tutorial is done hopefully not at all

18:05 egghead: ya dsrx

18:05 it is now fully CI-ified

18:06 except my project.clj is almost 100 lines long :)

18:06 dnolen: locks: though it's still worth understanding React as it's the underpinning.

18:06 hyPiRion: egghead: at least it's not a POM =)

18:07 locks: dnolen: sure, kinda like understanding the JVM for clojure

18:16 liflash: bitemyapp: you said it's a mistake using midje. what's wrong with it?

18:16 Bronsa: tbaldridge: not that I know of.

18:17 bitemyapp: liflash: I'm done nailing the 95 theses to the doors on that one.

18:17 tbaldridge: Bronsa: kk, just wanted to make sure I'm not duplicating work.

18:20 AeroNotix: can I not alias java class names?

18:21 bitemyapp: liflash: it'd be easier to just search IRC logs and/or the mailing list.

18:21 liflash: bitemyapp: ok... just setting up my first tool chain for clojure and don't want to waste time with the wrong ones

18:22 bitemyapp: liflash: just use clojure.test

18:22 justin_smith: AeroNotix: you can kind of do it with a reader macro (see #inst)

18:22 liflash: bitemyapp: will do :)

18:22 justin_smith: ,(java.util.Date.)

18:22 clojurebot: #inst "2014-01-20T23:20:03.856-00:00"

18:23 noprompt: dnolen: i ended up just going with a regular callback w/ that example i shared yesterday.

18:23 AeroNotix: justin_smith: hmm

18:23 noprompt: dnolen: the only other alternative i could come up with was to pull the channel out in to a def but i don't really like that. having a regular callback isn't that big of a deal though.

18:24 dnolen: no that om.core/root is idempotent live coding with Om ROCKS

18:24 justin_smith: AeroNotix: sadly last I checked clojurebot does not let you create them, or I would demonstrate that

18:24 dnolen: s/no/now

18:25 noprompt: 0.2.3 has some new functionality, you can have shared data across the entire render tree

18:25 AeroNotix: justin_smith: no worries, just wouldn't mind aliasing this to a shorter name: https://gist.github.com/AeroNotix/397846a0955b48b86e04

18:25 TransactionType

18:25 dnolen: noprompt: so you can establish channels that everyone shares (not sure if this is relevant for what you were doing)

18:25 noprompt: and since om.core/root is idempotent not a problem for redef

18:25 noprompt: dnolen: sweet! we'll definitely update this week.

18:26 justin_smith: AeroNotix: you could likely pull something off with a tricky macro...

18:26 AeroNotix: justin_smith: meh, not worth it

18:26 justin_smith: though maybe not because I think classes are pulled in at the reader-macro level, not regular macros

18:26 noprompt: dnolen: this little app we're working on, om's been *very* impressive. it's really easy to move parts around, etc.

18:26 justin_smith: which means eval, which means kind of ick

18:27 noprompt: dnolen: lots of moving parts. routing, views, etc.

18:28 dnolen: noprompt: exciting :)

18:28 noprompt: dnolen: we've been using the REPL a lot w/ it too. it's been great.

18:28 dnolen: noprompt: excellent, the latest changes should make it a lot nicer too

18:28 noprompt: dnolen: i did run across something though around tests that might be worth sharing on the mailing list.

18:29 dnolen: noprompt: please do

18:29 noprompt: at some point I'll establish an Om specific list, but we're not quite there yet

18:29 teslanick: noprompt: You should write up your experience. I want to push for a clojure/om app where I work, and having people relate their experience helps make that case.

18:29 locks: ^

18:30 bitemyapp: I just realized what I'm going to have to do to this lexer

18:30 and it is positively hateful.

18:30 noprompt: dnolen: it's pretty easy to figure out but it might trip up someone new. when running tests one might encounter 'TypeError: 'undefined' is not a function (evaluating 'RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/)')'

18:30 bitemyapp: actually wait a second, the wizard of regex is here.

18:30 noprompt: regex lexer for arbitrary depth quoted strings that drops a single layer of quoting.

18:31 I'm currently contemplating a post-match fold and would very much like to avoid it.

18:31 noprompt: dnolen: it's fairly easy, you just patch Function.prototype.bind in your extra_test_commands.js, but, like i said, it could trip someone up for a good half hour.

18:32 bitemyapp: that sounds like a bed of roses. :)

18:32 bitemyapp: noprompt: I'm asking if the regex is possible.

18:32 I guess not.

18:32 noprompt: don't sweat it.

18:32 noprompt: edn is a cruel bitch.

18:33 noprompt: dnolen: i'm not sure what the company's status is on a tech blog but i definitely would like to write about the experience.

18:33 bitemyapp: doubly so with bad parsers.

18:33 arrdem: bitemyapp: yeah that's gonna be a parser problem because it's fundimentally based on counting escapes..

18:33 noprompt: bitemyapp: hmm... yeah you probably don't want a regex for that.

18:34 arrdem: counting -> CFG -/>regex

18:34 bitemyapp: noprompt: right.

18:34 noprompt: I'm trying to decide whether I want the quote-level folding in the lex or parser stage.

18:35 probably parser.

18:35 noprompt: if it helps at all, I'm programming with boxing gloves on my hands. lex/yacc parser generator for *Python code* of all things.

18:35 Not my technological choices.

18:36 noprompt: dnolen: i'm going to extract some short tutorials from the app we've been working on. ie. table sorting, filtering (with highlighting), pagination, etc.

18:36 bitemyapp: LOL!

18:36 bitemyapp: noprompt: I'm about to have kittens man.

18:40 the whole thing is based on mutation of the AST.

18:41 * bitemyapp gently weeps

18:41 AeroNotix: ouch

18:41 dnolen: noprompt: cool, not sure I follow on the Regex thing?

18:41 noprompt: what's the context?

18:42 bitemyapp: noprompt: whatever happens, don't let dnolen unignore me. This has been delightful.

18:42 I've had wonderful conversations lately due to the non-interference.

18:43 noprompt: dnolen: so when i run tests w/ cemerick.cljs.test and phantomjs, phantom will complain loudly about that bit of code. i'm guessing it's in react.js somewhere.

18:43 dnolen: noprompt: oh huh, wacky

18:43 bitemyapp: oh, thought it was a reference to our regex convo.

18:43 just as well.

18:43 noprompt: dnolen: tl;dr i guess phantomjs 1.9.3 doesn't have Function.prototype.bind

18:43 so you gotta use a polyfill.

18:45 bitemyapp: noprompt: https://github.com/ariya/phantomjs/issues/10522

18:45 Milestone: Release 2.0

18:45 iref: hi guys

18:45 bitemyapp: iref: hi girl

18:46 arrdem: iref: hello fellow AI

18:46 noprompt: bitemyapp: yeah. kind of a bummer. but easy enough to patch.

18:47 bitemyapp: noprompt: I gave up on phantomjs after the relentless onslaught of segfaults.

18:48 I used it 1.6->1.9 I believe.

18:48 my sanity is more valuable than the milkshakes it's offering.

18:48 I have to reserve some sanity for dealing WITH THESE INFERNAL FUCKING PARSERS anyway.

18:49 noprompt: bitemyapp: you sir are *the* unhappiest programmer i know. lol. which is a good sign in my book.

18:50 bitemyapp: "good sign"

18:50 noprompt: bitemyapp: unhappy programmers generally have a reason. i approach happy programmers with caution.

18:50 bitemyapp: noprompt: your evaluation of good/bad appears to be scope blind to the survival rates of the authors of the libraries I use.

18:50 noprompt: haha.

18:51 bitemyapp: a happy clojure/haskell programmer is generally a good sign; a happy javascript programmer, well, that's questionable.

18:52 dobry-den: Is the main drawback of using datomic-free that the transactor runs on the same server as the webserver peer?

18:52 bitemyapp: (inc noprompt)

18:52 lazybot: ⇒ 4

18:52 bitemyapp: dobry-den: I can think of others, including a fairly huge one with the label "H2" on it.

18:53 iref: could you take a look at this gist https://gist.github.com/iref/8531602. I am trying to render content for every article with mustache and save it to file. Problem is that render-resource returns only first character instead of string so BufferedWriter crashes. And i have no idea why.

18:53 bitemyapp: you know who you should be suspicious of? People happy with H2. Those people are fucking perverts.

18:53 dobry-den: bitemyapp: what kind of issues can i expect as i'm running a quickly growing forum on top of h2?

18:53 noprompt: bitemyapp: i think last week we ditched H2. guess there were some issues w/ it.

18:53 `cbp: i use h2 in production

18:53 mwahahahahah

18:53 noprompt: i've never used it though.

18:53 bitemyapp: `cbp: you goddamn madman

18:53 noprompt: "some issues"

18:54 understatement of the century.

18:54 it's 2014 and you've already won.

18:55 `cbp: although the h2 part could honestly be replaced with an edn file or something

18:55 justin_smith: iref: each of the bindings in doseq is iterated over

18:55 ivan: do you have links to critical h2 bugs?

18:56 justin_smith: you probably want to bind rendered-article in a let, inside the doseq

18:56 teslanick: We use h2 to write fast integration tests against a similar-family SQL db. It seems pretty good at that.

18:56 bitemyapp: `cbp: that probably would've been better if you serialized writes.

18:56 justin_smith: iref: iterating over a string (which is what render-resource returns) gives you a sequence of chars

18:56 AeroNotix: lein cloverage just hangs when I run it

18:56 it's screwing with my makefiles

18:56 bitemyapp: ivan: h2 is the King of heisenbugs.

18:56 dobry-den: i've started trying to set up datomic-starter + postgres on another server, but i'm reluctant about yet more moving parts. h2

18:57 iref: justin_smith: thanks. I didn't know that about doseq

18:57 bitemyapp: dobry-den: I use datomic-free in testing, happily.

18:57 AeroNotix: I kind of don't like cloverage (no output options) so any recommendations welcome

18:57 bitemyapp: dobry-den: It'll probably work for you, just don't use it in production.

18:57 dobry-den: bitemyapp: oh, it's a forum in production

18:57 noprompt: for the record, programming w/ a retina display is just great.

18:58 the full glory of anti-aliased monospaced type is like icecream for the coder eyes.

18:58 dobry-den: i guess i'll underestand your aversion towards h2 as the forum expands.

18:58 bitemyapp: noprompt: that's pretty similar to how I felt about it.

18:58 dobry-den: maybe? maybe it works for you anyway.

18:59 dobry-den: bitemyapp: can you mention a few issues you had with it?

18:59 * noprompt puts icecream in his eyes.

19:01 bitemyapp: dobry-den: I'm pretty sure hating H2 is a club larger than the freemasons at this point.

19:01 dobry-den: and how haskell wouldve solved those issues?

19:01 bitemyapp: dobry-den: I'm not going to be the human bazooka for every issue in this IRC channel.

19:02 technomancy: iirc clojurebot uses h2

19:02 bitemyapp: strictly speaking, I don't even hate H2 or the functionality it purports to provide, it's just slippery, often annoying to work with, and has transient errors.

19:02 hiredman: nope

19:02 dobry-den: ah

19:02 hiredman: postgres

19:02 bitemyapp: lol.

19:03 Redhasafn: hiredman, do you hate me too?

19:03 hiredman: it used derby at one point

19:03 technomancy: see I like derby because it makes me think of hats

19:03 h2 makes me think of hydrogen and the Hindenberg

19:03 hiredman: Redhasafn: if you have to ask

19:03 arrdem: Redhasafn: hello again chord

19:04 dsrx: derby makes me think of hitting a home run

19:04 hiredman: h2 is apparently really fast, in single threaded mode that throws exceptions when multiple threads try to use it

19:04 Redhasafn: Everyone hates me

19:04 including AimHere

19:05 hiredman: I'm a derby man

19:06 dobry-den: so far though, datomic is a wizard abstraction over lucene + db implementation for me. hopefully it also lets me fake it til i make it when i get it set up with postgres

19:07 bitemyapp: "wizard abstraction"

19:08 dobry-den: i have a certain hubris about my stack these days. i feel like my users respect me that much more when i put 'Powered by Clojure and Datomic' in the footer

19:08 and when they read my stacktraces

19:09 bitemyapp: dobry-den: definitely cooler than `Warning: mysql_connect(): Too many connections in /var/www/database/mysql/common.php on line 10`

19:09 dobry-den: can't wait to construct a Datomic query (indirectly) that OOMs your box running the peer.

19:12 jstew: why can I do (map-indexed (fn [i e] [i e]) [1 2 3]), but not (map-indexed #([%1 %2]) [1 2 3])?

19:13 According to the docs, #() is syntactic sugar for (fn []..)?

19:13 Bronsa: jstew: #([%]) is (fn [a] ([a])) not (fn [a] [a])

19:13 dobry-den: If Datomic never supports ordered results, is there any other way to optimize (->> (:post/_topic topic) (sort-by :post/created <))?

19:13 dsrx: jstew: what Bronsa said

19:13 too slow :(

19:14 jstew: you could do #(vec %1 %2) probably?

19:14 clojurebot: Cool story bro.

19:14 dsrx: what the

19:15 jstew: Ah, makes sense.

19:15 arrdem: dsrx: clojurebot will respond to -? messages with some probability... it's an inference engine rule.

19:15 dsrx: arrdem: ah, i see

19:16 > (map-indexed #(vector %1 %2) [1 2 3])

19:16 , (map-indexed #(vector %1 %2) [1 2 3])

19:16 clojurebot: ([0 1] [1 2] [2 3])

19:17 TEttinger: ,(map-indexed vector [1 2 3])

19:17 clojurebot: ([0 1] [1 2] [2 3])

19:17 dsrx: yeah, there we go

19:18 jstew: If I understand correctly, the extra () makes the reader try to evaluate the []?

19:18 dobry-den: ,(map vector (iterate inc 0) [1 2 3])

19:18 clojurebot: ([0 1] [1 2] [2 3])

19:18 TEttinger: that too

19:19 jstew: I'm still stumbling my way through clojure, trying to practice with code jam.

19:19 akurilin: Anybody here tried yesql?

19:20 Trying to figure out how to pass :row-fn and :identifiers into one of the vars generated by (defquery)

19:20 bitemyapp: akurilin: honeysql didn't pan out?

19:20 also I liked the slams on Korma in yesql's documentation.

19:20 akurilin: bitemyapp: never tried it, is it analogous?

19:20 TEttinger: jstew, I struggled a bit with #() at first too. it's often easy enough just to do (fn [[k v]] (+ k v)) or something, which doesn't work with #() syntax

19:20 bitemyapp: akurilin: it might come more naturally. Give it a whirl.

19:21 I think at this point I am the Ron Swanson of Korma.

19:21 technomancy: yesql sounds like it needs some editor support to jump directly to the relevant SQL files

19:21 teslanick: What does being the Ron Swanson of Korma mean?

19:21 technomancy: apart from that navigation sounding really tedious to do by hand I like the sound of it

19:21 dobry-den: there are a lot of cases where i prefer (fn [...] ...) over #(...)

19:21 bitemyapp: technomancy: you know, if only there was a tool for integrating a DSL directly into a language

19:22 technomancy: maybe by structuring it as a tree or list of lists and allowing data-driven transformations...

19:22 dobry-den: when #(...) has nested forms, it quickly becomes painful to read

19:22 bitemyapp: technomancy: NAHHHH. I'm fuckin' crazy.

19:22 dobry-den: like when you finally get to %1 and %2 and you don't remember what they are.

19:23 technomancy: bitemyapp: well granted I'm totally out of touch with databases these days, but I like just writing SQL

19:23 bitemyapp: technomancy: so do I

19:23 technomancy: that's why I use Korma rather than an "ORM"

19:24 technomancy: cool

19:25 jstew: I'm figuring out that clojure makes me write better code by forcing me to keep my functions small

19:27 [1 2]

19:28 bitemyapp: technomancy: I think part of it may have to do with where your needs are on complexity vs. composition.

19:28 akurilin: Am I the only who doesn't like SQL DSLs for large queries? I struggle enough reading raw sql, seems like that's adding an extra transformation to it.

19:29 bitemyapp: akurilin: well that's just it, isn't it?

19:29 akurilin: do you need more leverage with programmatically composing components of queries or with parameterizing one fat query?

19:30 akurilin: I believe Korma accommodates both but apparently raw-sql makes people upset. or something. I don't know.

19:30 you can't compose yesql function-y thingiejobbers

19:30 except for uh...partial application. That's about it. it's a string blob interpolator.

19:30 if that suits your needs, awesome!

19:30 but know your needs.

19:33 akurilin: I might not be exploiting the composability aspect of it too much tbh, I might need to pay more attention to that.

19:33 bitemyapp: akurilin: don't try to discover schlep, just know where your schlep is.

19:34 That was a common mistake in CL. Discovering and then yak-shaving schlep for the hell of it.

19:37 alew: ddl and sql just seem like terrible ideas in retrospect

19:38 bitemyapp: Nothing really works compatibly across multiple implementations without the introduction of Pharaonic magnitudes of labor.

19:40 alew: bitemyapp: I appreciate your vocabulary

19:40 bitemyapp: alew: I appreciate your appreciation.

19:40 TEttinger: a synonym for "slavetacular"?

19:40 bitemyapp: (inc TEttinger)

19:40 lazybot: ⇒ 12

19:40 arrdem: (inc TEttinger)

19:40 lazybot: ⇒ 13

19:40 bitemyapp: TEttinger: ERP-esque?

19:41 TEttinger: I prefer Pharaonic because it hits less-close-to-home for most people.

19:41 TEttinger: heh fair enough

19:41 bitemyapp: but slavetacular is jocular and fun :)

19:41 TEttinger: stonehengian is also fitting I think

19:41 "how did they move those rocks dude"

19:41 bitemyapp: TEttinger: but we don't actually know how it was built or what labor was involved.

19:42 TEttinger: so it fits your last statement!

19:42 bitemyapp: TEttinger: I would hesitate to ascribe large centralization of labor to a society for whom we have little evidence of such organization.

19:42 TEttinger: also, I use Pharaonic because they didn't actually use slaves that much to build the pyramids.

19:43 TEttinger: "Nothing really works compatibly across multiple implementations without the introduction of mysterious but probably very large magnitudes of labor"

19:43 bitemyapp: it was centered around a state-sponsored core of craftsmen IIRC

19:43 TEttinger: I meant large, centralized, organized.

19:43 turbofail: also, "aliens"

19:43 TEttinger: oh

19:43 also aliens

19:43 arrdem: TEttinger: ANSI standards can help, but probably fall under the aliens category..

19:44 TEttinger: (inc arrdem)

19:44 lazybot: ⇒ 15

19:44 technomancy: so... I have an issue saying that URL-based DB specs no longer work in clojure.java.jdbc 0.3.x

19:44 turbofail: the ancient alien guy's hair is pharaonic on its own

19:45 technomancy: but I am unable to reproduce... has anyone heard of people having trouble with this?

19:47 TEttinger: technomancy, link to the issue?

19:47 technomancy: TEttinger: internal support tracker; sorry

19:47 TEttinger: ah

19:47 technomancy: "Particularly, you can no longer simply use `DATABASE_URL`, and parsing it out into a db-spec map (like at the top of https://github.com/clojure/java.jdbc#example-usage) is non-trivial."

19:48 bitemyapp: akurilin: alternative to honeysql: https://github.com/r0man/sqlingvo

19:48 technomancy: anyway, this actually works for me https://github.com/technomancy/shouter/blob/master/src/shouter/models/shout.clj

19:49 so I'm wondering if there are any specific scenarios I'm not thinking of where it might still be broken

19:49 akurilin: bitemyapp: awesome. So many options!

19:53 TEttinger: technomancy: https://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj#L140 is non-trivial? Am I correct about what this does?

19:54 bitemyapp: chare: I can't unmute you.

19:54 chare: do you really think these people would give me ops? Don't be a clown.

19:54 turbofail: lol

19:54 bitemyapp: chare: the fact that you're screaming at me in privchat demonstrates why you'll never be unmuted.

19:54 chare: all-caps and everything.

19:54 technomancy: TEttinger: according to this guy, those functions don't work like they should, but yeah that's the part in question

19:54 bitemyapp: chare: get a handle on yourself Neo.

19:56 chare: that you're calling me a "FUCKING BACKSTABBER" also demonstrates why we're not "friends"

19:56 chare: are you going to calm down?

19:57 quizdr: a couple days ago chare pm'd me to say "i've learned my lesson and can be unmuted now." oh how lessons are so easily forgotten.

19:57 bbloom: bitemyapp: if you insist on communicating with him, please do it in private chat

19:57 arrdem: bitemyapp: bbloom has a point, it's not like anyone else here is talking to him or cares.

19:57 bitemyapp: bbloom: he's ignored now.

19:58 bbloom: btw <3

19:58 bbloom: bitemyapp: you're lucky my irc client forgets my ignore settings

19:59 turbofail: on the issue of SQL dsls, i've found the ability to manipulate queries as data to be pretty darn useful

19:59 also, being able to use paredit to edit your queries is great for interactive use

19:59 bitemyapp: bbloom: why is that?

19:59 technomancy: (add-hook 'sql-mode-hook 'paredit-mode) ; =)

20:00 ^ I have not done this

20:00 bbloom: bitemyapp: b/c i've /ignore-d you 3 or 4 times now

20:00 turbofail: technomancy: yeah, but that doesn't help you skip around different clauses of your query

20:00 bitemyapp: bbloom: I don't feel lucky, but <3 anyway.

20:00 turbofail: of which there can be a lot

20:00 technomancy: turbofail: yeah, it's a pale approximation of paredit's true power

20:00 amalloy: haha, same here, bbloom. what terrible irc client do you use?

20:00 technomancy: more like "yay strings don't break"

20:00 arrdem: so show of hands, who here actually uses paredit?

20:00 bbloom: amalloy: Textual

20:01 i think it remembers ignores if i put them in the settings, but if i just issue the command it doesn't save them

20:01 quizdr: paredit is quite nice for the basic stuff, i have yet to make use of the more complex commands aardem

20:01 technomancy: arrdem: everyone?

20:01 hopefully

20:01 arrdem: I don't....

20:01 TEttinger: amalloy, ouch you use Purple as IRC? I'm so sorry

20:01 justin_smith: another paredit user here

20:01 amalloy: pidgin

20:02 bbloom: amalloy: i kinda like it tho, it's like a temporary ban, so i use it more often than i would otherwise

20:02 TEttinger: yep, the intenal chat stuff is called purple, and that's your ctcp version

20:02 amalloy: i know

20:02 llasram: arrdem: Well get with the program!

20:02 * bitemyapp is a paredit skeptic

20:02 arrdem: llasram: once I figure out why llvm is ignoring my modules we'll see

20:02 technomancy: clojurebot: paredit?

20:02 clojurebot: paredit is not for everyone, but what you need to understand ís how to become the kind of person that paredit ís for.

20:02 amalloy: i generally have to /ignore the same people at the start of every day, so that #clojure isn't full of discussions about dota2 and trollbaiting

20:03 bitemyapp: I've liked Erlang's structural editing better.

20:03 justin_smith: the key to paredit is that kill-region and quoted insert still work, once you have that down, it is only a convenience

20:03 unless you use some broken-ass paredit in a non-emacs editor

20:04 arrdem: technomancy: lemme guess... you wrote that.

20:04 quizdr: is it a glaring weakness that i only use slurp and barf with paredit and nothing else?

20:04 technomancy: arrdem: bots... they are labour-saving devices

20:04 gtrak: quizdr: try M-s

20:04 RickInAtlanta: quizdr: probably, that is what I do too

20:04 turbofail: kind of. paredit raise and splice are both pretty useful

20:04 arrdem: technomancy: and I take exactly zero issue with this!

20:04 turbofail: and transpose

20:04 technomancy: quizdr: even without any specific paredit commands it's valuable on its own

20:04 TEttinger: ,(map int "understand ís")

20:04 clojurebot: (117 110 100 101 114 ...)

20:05 TEttinger: gah

20:05 technomancy: just the fact that it keeps edits from messing the buffer up

20:05 turbofail: i use paredit-raise all the time

20:05 TEttinger: well what I'm confused is why the i is an í

20:05 technomancy: TEttinger: whoa

20:06 arrdem: TEttinger: did you insert-char by accident or something?

20:06 amalloy: quizdr: M-( is one i use all the time

20:06 justin_smith: TEttinger: int value of 237

20:06 technomancy: TEttinger: I guess the answer is that clojurebot is a simulation of an unstable personality and does all kinds of crazy things just to mess with you

20:06 amalloy: and like...M-r, plus i mapped in convolute-sexp for occasional use

20:06 TEttinger: arrdem, no, I was intentionally trying to figure out why the i has an acute

20:06 arrdem: I should invert my number row so that 9 and 0 are ( and ) by default...

20:06 ~inventory

20:07 amalloy: arrdem: i've had it that way for two or three years. big win imo

20:07 arrdem: amalloy: kk. I'm just realizing how rarely I do numeric input compared to inserting special symbols. programming ftw.

20:07 it'd also help me write more swearjure..

20:07 TEttinger: hahaha

20:07 quizdr: I've seen the M-( shorcut on cheat sheets but it does nothing on mine unless I 'm not using it correctly

20:08 turbofail: do it next to an existing expression

20:08 quizdr: gtrak M-s is nice, thanks for the tip. i'll use that one.

20:09 RickInAtlanta: does Light Table have paredit?

20:09 gtrak: that's splice

20:09 quizdr: so M-( is basically the same as adding a new parenthesis and slurping the expression to teh right? I suppose this saves me one keystroke

20:09 turbofail: yeah

20:10 amalloy: well, several keystrokes really, because (-then-slurp often leaves you with a SPC you need to remove as well

20:11 quizdr: amalloy what is SPC?

20:11 sorry don't know all the lingo

20:11 clojurebot: Excuse me?

20:11 turbofail: it doesn't leave a space in the most recent paredit version

20:11 amalloy: \space

20:11 quizdr: oh

20:11 a couple of you mentioned paredit-raise, how is that?

20:12 amalloy: pretty handy

20:12 M-r

20:12 gtrak: we need a cheatsheets sorted by popularity.

20:13 quizdr: so my naive interpration of raise is that it is splicing the affected symbol while deleting all the others in the sexpr, is that right?

20:13 turbofail: yeah, basically it replaces the parent s-expression with the one at point

20:14 quizdr: i can see that being useful

20:15 technomancy: the coolest one is paredit-convolute-sexp

20:15 turbofail: i still haven't figured that one out

20:15 technomancy: I honestly can't describe what it does in actual words

20:15 and I don't use it very often

20:15 locks: LOL

20:16 technomancy: but when I do it feels really cool

20:16 TEttinger: technomancy is making hand gestures trying to figure out how to explain it

20:16 RickInAtlanta: what is the keybinding for that one?

20:16 quizdr: that's pretty funny actually

20:16 technomancy: TEttinger: and sound effects

20:16 TEttinger: (inc technomancy)

20:16 lazybot: ⇒ 94

20:16 technomancy: RickInAtlanta: I don't think it's bound by default; I just M-x it because it's rare

20:17 amalloy: i bound it to M-LEFT

20:17 gtrak: lol M-x is rare?

20:17 maybe for technomancy

20:17 amalloy: just cause like...it feels like i'm doing stuff to the left of point, and it's not common enough to deserve a spot on the home row

20:17 justin_smith: M-x is needed for rare commands, that being rare, are not bound to keys

20:17 technomancy: it's basically "turn this thing inside out by taking the following sexp and embedding the surrounding sexp inside it"

20:18 terrible explanation because it is fundamentally ineffable

20:18 amalloy: (map inc (map dec |xs)) ===convolute==> (map dec (map inc xs))

20:18 justin_smith: "it's like a popple, but it's your code"

20:18 locks: oh

20:18 RickInAtlanta: wow

20:19 gtrak: ah, technomancy I first interpreted your sentence as replacing binding convolute-sexp to M-x. My further comments can make sense either way.

20:19 technomancy: gtrak: heh; sure

20:21 bitemyapp: Raynes: you're doing Python these days and should be able to appreciate this: ''.join(map(''.join, edn_parse.fold_thing(1, '|', "blah|||woot")[0]))

20:21 Raynes: it's hiding a 20 line closure >:)

20:22 * technomancy can't help but guffaw at ''.join

20:22 technomancy: "but it's pythonic!"

20:22 bitemyapp: technomancy: I'm using it because it's fast.

20:22 in this case.

20:22 trying to do harm reduction on the already extant insanity in this parser.

20:23 technomancy: bitemyapp: oh no not the fact that you're using it

20:23 it's idiomatic python supposedly

20:23 RickInAtlanta: I got an email from a recruiter today that said "I have a 12 month perl contract that you would be perfect for"

20:23 arrdem: RickInAtlanta: I'm so sorry

20:23 RickInAtlanta: I am trying to remember what I did to upset him

20:23 bitemyapp: technomancy: I don't try very hard to write idiomatic Python because their idioms are silly and unprincipled.

20:23 technomancy: it's just hilarious how people defend it as something that actually makes sense and deserves to be idiomatic

20:25 bbloom: i always chuckle when i see a string multiplied by a number :-P

20:25 feels kinda APL-ish

20:26 arrdem: ,(* "a" 4)

20:26 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number>

20:26 locks: ‘’.join is idiomatic python? what’s the explanation

20:26 arrdem: bbloom: not here obviously...

20:26 bitemyapp: locks: lets not and say we did.

20:26 technomancy: locks: because guido said so

20:26 bitemyapp: ^^

20:26 arrdem: python: because guido said so

20:27 locks: php: fuck it, we’ll do it live

20:27 bitemyapp: I'm always really happy I use desktop-mode when I accidentally take an axe to my emacs.

20:27 tos9: locks: mostly that it's a place to put it that requires implementing it only once.

20:28 bitemyapp: It's always a bad sign when I have code I want to show coworkers in person just so I can see their horrified expressions.

20:28 quizdr: bbloom forgive me but what does APL mean?

20:28 TEttinger: it's a very terse programming language

20:28 bitemyapp: quizdr: "A Programming Language"

20:28 TEttinger: with its own character set

20:29 bbloom: quizdr: http://www.youtube.com/watch?v=DmT80OseAGs

20:29 locks: APL is one of the most glorious programming languages ever

20:29 TEttinger: like in clojure you have range, which is 5 characters, plus a space between it and its args, and parens. in APL you have an iota character from greek, and next to it a number.

20:30 locks: I saw the core.matrix presentation yesterday, he mentions APL

20:30 bbloom: locks: APL is the original core.matrix ;-)

20:30 TEttinger: you very rarely need whitespace in APL, so people use it rarely, and it leads to legendary feats of hard-to-read code

20:30 bitemyapp: locks: like carving runes into one's grimoire, as I always say.

20:31 arrdem: bitemyapp: carving... paper.

20:31 bitemyapp: TEttinger: to be fair, it bears a faint resemblance to the aggressively pipe-y Python I write.

20:31 TEttinger: there's also the left and right args

20:31 bitemyapp: arrdem: I can demonstrate sometime if you want.

20:32 arrdem: bitemyapp: just because it's physically possible doesn't mean it was the appropriate verb...

20:32 turbofail: the nice part about APL is that your code is already greekified for when you put it in a paper

20:32 locks: I actually want to try J, see if I can make sense of anything

20:32 bitemyapp: arrdem: I'm dreaming of soldering irons, smoke, and fearful coworkers.

20:33 arrdem: you could say...I have a dream.

20:34 locks: turbofail: that gives me an idea…

20:34 arrdem: bitemyapp: I tried that once... loooong time ago. I think I managed to ruin that soldering iron quite thoroughly.

20:34 bitemyapp: time to end my work day triumphant, now that I have wrought horrors in the process of making a test pass.

20:35 also lol @ test that relies on deterministically ordered results in HAMTs. Just lol.

20:36 not even my coworker's fault, pretty sure that came with the library.

20:39 koreth_: Has anyone had experience trying to train "average" Java programmers to write Clojure? I'm consulting on a project where the Java code is a mess and parts of it would be dramatically cleaner in Clojure, but then I stop and think, "The team who created this mess would have to maintain it, and they are barely competent in Java, let alone a new language none of them has ever seen."

20:39 bitemyapp: koreth_: yeah.

20:40 koreth_: they weren't amazing at Java, but they knew a bit of Python.

20:40 koreth_: went well, they write good Clojure now, although some of it is idiomatically naive, the fundamentals are definitely there.

20:40 koreth_: Thanks. That's encouraging!

20:40 turbofail: at the very least they'll have fewer thread-unsafe bits

20:40 bitemyapp: it was fairly hands off on my part, I pointed them in the right direction and swooped in for code reviews periodically.

20:40 technomancy: koreth_: keep in mind that programming against immutable data structures is fundamentally less mental overhead

20:41 bitemyapp: koreth_: the code reviews were the teachable moments.

20:41 technomancy: the difficulties arise more from unfamiliarity than inherent difficulty

20:41 bitemyapp: koreth_: what technomancy said. I use FP because I'm dumb.

20:41 koreth_: smart people zip along in C++, nary a care in the world.

20:41 arrdem: technomancy: or more, until you get the hang of it...

20:41 bitemyapp: koreth_: there is an initial ramp, but the blocker there is time and well-directed effort, not raw intellect.

20:42 technomancy: arrdem: well yeah if you want to mess around just for kicks you can certainly take it to another level =)

20:42 clojurebot: juxt?

20:42 clojurebot: juxt is a little hard to grok but it's the best thing ever

20:42 koreth_: The irony is that most of the Java code that needs work is actually used to build up big immutable trees of maps. (Well, technically mutable but they never mutate it after it's built.)

20:42 Thanks, this gives me the encouragement I needed!

20:42 bbloom: obligatory: <3 juxt

20:42 bitemyapp: technomancy: I will say that while it's a lot more general, sequence is harder to understand than juxt.

20:42 arrdem: eew. yeah. perfect application of Clojure.

20:42 bitemyapp: koreth_: .copy() lol

20:50 `sequence [[1], [2], [3]] => [1, 2, 3]` ; `sequence [Just 1, Just 2, Just 3] => Just [1, 2, 3]` `sequence [succ, pred, (*3)] 4 => [5, 3, 12]`

21:09 koreth_: The Java code base I'm looking at uses Spring for dependency injection. If I want to port some of the existing Java code to Clojure, it'll have to play nice with the rest of the application, which means accepting injected dependencies. What would be the closest thing to an idiomatic approach? Atoms are the obvious one.

21:10 Or am I just thinking about it completely wrong (likely)?

21:10 technomancy: I haven't used dependency injection, but from what I understand you usually just take a function as an argument for that kind of thing

21:11 jeremyheiler: koreth_: if you need objects from the applicationcontext, i'd think giving clojure access to that object woudl be easier

21:12 marcopolo`: Why shouldn't you use go blocks to run IO intensive code?

21:12 I remember tbaldridge saying something about that

21:14 bbloom: marcopolo`: b/c your IO will block other go blocks b/c they are essentially cooperatively multithreaded. you can use core.async/thread blocks with the <!! and >!! operators for real threads that can actually execute simultaneously

21:16 marcopolo`: bbloom: Ah, and that's because we can't change how the JVM treats blocking for IO?

21:16 bbloom: marcopolo`: i guess you can think of it that way.... the point is that blocking IO calls are just that: blocking. where as <! and >! are semantically blocking, but implemented as "parking"

21:16 <!! and >!! are *actually blocking*

21:17 but they only block their thread, not all other parking pseudothreads that are sharing that real thread

21:17 marcopolo`: gotcha, thanks

21:18 so if there was a hypothetical IO operation that used events, a go block would be fine, because it isn't really blocking, just listening for events?

21:18 in other words, Clojurescript wouldn't have the same issues, right?

21:19 bbloom: um, i'm not sure if i can answer your question yes or no, so i'll just say something that should make it clearer

21:20 all IO in javascript requires callbacks. you can use put! and take! to convert callbacks in to channel operations and then use the go macro for IO stuff. there is no thread macro in cljs

21:20 if you had callback-based IO on the JVM (and there is stuff like that, NIO, etc) then you can do the same thing

21:21 it may be illustrative to think about what happens if you just write a loop that is slow

21:21 in javascript, it will block all other stuff

21:22 with core.async, a slow loop will... block *a* thread, but there is usually a pool of threads (approximately one per core or something like that)

21:22 arrdem: bitemyapp: gimme something to build in Rust...

21:22 bbloom: if you use thread and <!! and >!! on the JVM instead of go and <! and >! then your slow loop will only block the one thread that you created

21:22 marcopolo`: clear now?

21:24 marcopolo`: Yes thank you. However does callback-based IO allow you to do more IO in go blocks since it wouldn't be blocking the same way?

21:25 bbloom: marcopolo`: potentially, but you'd need to use take! and put! and glue it together with callbacks at the "edges"

21:25 marcopolo`: I understand you would still get bogged down by the computation part of it

21:25 justin_smith: a go block is a pseudo-thread that creates callbacks

21:25 *is made out of callbacks

21:25 they are invisible to your code though

21:25 said pseudo thread also runs in a thread on the jvm though

21:26 marcopolo`: okay I think I understand that limitation

21:26 thanks bbloom and justin_smith

21:26 (inc bbloom)

21:26 lazybot: ⇒ 22

21:26 marcopolo`: (icn justin_smith)

21:26 (inc justin_smith)

21:26 lazybot: ⇒ 26

21:34 quizdr: is that lazybot interpreting clojure without an escape string prepended?

21:34 arrdem: quizdr: no

21:34 bbloom: quizdr: special cased karma system

21:34 marcopolo`: for certain phrases it knows

21:34 bbloom: $karma quizdr

21:34 lazybot: quizdr has karma 0.

21:35 bbloom: (inc quizdr) ; just cus you asked

21:35 lazybot: ⇒ 1

21:35 bbloom: $karma quizdr

21:35 lazybot: quizdr has karma 1.

21:35 quizdr: interesting

21:35 well, for answering that one

21:35 (inc bbloom)

21:35 lazybot: ⇒ 23

21:35 * bbloom bows

21:36 bitemyapp: arrdem: hum

21:36 arrdem: bitemyapp: actually never mind I have one

21:37 bitemyapp: koreth_: don't use atoms.

21:37 arrdem: what?

21:37 * arrdem digs out the last 2600 coding challenge

21:38 koreth_: bitemyapp: What's the better approach, given that the code will be called from a Java container?

21:39 saj: Using korma, how do I perform a join on an entity that has a "has-many" relationship with itself?

21:39 bitemyapp: koreth_: function as an argument or a protocol.

21:40 sritchie: ddellacosta: hey, did you see the friend post?

21:40 curious to hear your take on if I made it too confusing

21:41 saj: I get an "ambigious column name" error because it's using the same table name to refer to the select and the join row

21:41 ddellacosta: sritchie: I read about halfway through, sorry I haven't finished it yet! Let me finish it up right now

21:42 sritchie: haha, it's so freaking long

21:42 ddellacosta: sritchie: I think it probably was too confusing though, to be completely honest. Part of the problem is that friend is somewhat confusing, and more to the point, oauth2 is confusing

21:42 sritchie: yeah, I didn't even touch oauth

21:42 ddellacosta: sritchie: yeah, I mean, you covered a little bit of the flow out of necessity I guess

21:42 sritchie: oh, yeah, that one mention

21:42 ddellacosta: sritchie: it gave me a lot of food for thought though, re: authn/authz in clojure web apps

21:43 sritchie: ddellacosta: there's got to be a better way to structure it all

21:43 ddellacosta: sritchie: I meant to write a response to your mailing list post, sorry I have not been engaged

21:43 sritchie: no worries

21:43 ddellacosta: I had originally tried to implement a friend-like thing as a Liberator resource

21:43 ddellacosta: sritchie: yeah. I've also built an authorization system wrapping apache shiro and that gave me some things to ponder--it was problematic in its own way (mostly: very java)

21:43 sritchie: but the redirect handling was pretty tough without a watching middleware

21:44 ddellacosta: sritchie: I think friend is the right direction, but maybe it needs a bit more refining of the way it is structured.

21:44 sritchie: yup

21:44 koreth_: bitemyapp: I am no doubt being dim but I don't see how that could work. I have to provide a setter that takes a Java service object as an argument, and the setter will be called once at app startup. How will functions as arguments get that value to the Clojure code that needs it later on?

21:44 ddellacosta: sritchie: well, let me read through it fully and write something substantial. I'm definitely super interested in the discussion and helping push friend and/or whatever the community wants to work on forward

21:45 sritchie: awesome

21:45 yeah, I appreciate it

21:46 ddellacosta: sritchie: yeah, same here--it's great all the work you've done getting this going and trying to build something real-world. That's the only way to know what the issues are with these systems, shake them out, and build something better.

21:46 sritchie: so, kudos and thanks on that.

21:46 sritchie: yeah, to you too

21:47 I should put together something for that other oauth2 stuff so we can try and sync up

21:47 ddellacosta: sritchie: okay, sounds good.

22:08 luxbock: there's a library that I would like to use, but it's not on Clojars/Maven

22:08 mainly this one: https://github.com/levand/prolin

22:08 can I just submit it there on my own or what should I do?

22:13 noprompt: luxbock: you could clone it and do a `lein install`, bug the author to release it on clojars, or, finally, clone it change the project name to luxbock/prolin, push that to clojars and be on your merry way. ;-)

22:13 bitemyapp: koreth_: you need to learn more FP I think.

22:13 luxbock: alright

22:13 bitemyapp: koreth_: and figure out some ways to cross the Clojure/Java bridge

22:13 noprompt: luxbock: i've had cognac.

22:14 bitemyapp: koreth_: this is not a subject I can efficiently summarize in an IRC channel.

22:14 luxbock: haha, thanks for the disclaimer

22:14 bitemyapp: koreth_: when you feel comfortable with a solution that doesn't involve global mutable state and think your coworkers could understand it, then you'll probably have a plausible approach for porting the Java app.

22:14 koreth_: bitemyapp: That's what I'm trying to do. Where should I look for more discussion of this? I spent a fair while searching before coming here to ask about it.

22:14 bitemyapp: koreth_: as it is, you're better off stepping back at a coarser grained level

22:14 koreth_: and parting out the application at the systems level (a subject Hickey has talked about)

22:15 koreth_: and letting Clojure do what it does best, on its own terms.

22:15 koreth_: a naively implemented frankenstein doesn't make you (or Clojure) look good.

22:15 koreth_: look into SOA to see what I mean by 'coarser grained'

22:15 it'll save you reimplementing everything at once.

22:16 noprompt: i'm gonna write a syntax highlighter in pure clojure. wish me luck.

22:16 * noprompt cognac

22:17 noprompt: bitemyapp: when you purchase the "top shelf shit" you can do anything.

22:17 arrdem: noprompt: m0ar power to ya...

22:17 bitemyapp: noprompt: truth.

22:17 noprompt: yak that shit up.

22:18 noprompt: arrdem: what's the elipsis suggest? fear? doubt? BORDEM?

22:18 * noprompt cognac

22:18 koreth_: So basically, step 1 in migrating to Clojure: completely rearchitect the app. That's disappointing though I do take your point and you are most likely exactly right.

22:18 * arrdem grabs beer

22:18 arrdem: noprompt: doubt in ultimate success.. concern based on relative task complexity for a drinking project...

22:18 luxbock: after 'lein install', how do I find out what to include in my project.clj to include that library as a dependency?

22:19 bitemyapp: koreth_: monolithic applications are an anti-pattern. Monolithic Spring applications doubly so.

22:19 arrdem: noprompt: whatever offends you more :P

22:19 luxbock: I tried looking at the pom.xml that was generated but I couldn't make much sense of it

22:19 bitemyapp: koreth_: the monolith and the Spring are bigger problems than it being in Java.

22:19 koreth_: systemic problems are more dangerous than linguistic ones.

22:19 koreth_: doesn't mean your SOA-ization can't involve Clojure, it sure can, but you have to decomplect and componentize before that makes sense.

22:19 noprompt: arrdem: well it's not like i'm totally smashed. plus i have some experience wrt this sort of thing.

22:20 bitemyapp: koreth_: I have patterns/approaches for things like DI and IoC in Clojure, but it's...man...not right now.

22:20 koreth_: you're better off drinking deeper from the FP pool of knowledge than you are going through the pain I did to model that sort of stuff.

22:20 arrdem: noprompt: I'll be interested to see what you come up with, and I hope that it's generally extensible to arbitrary tag higlighting.

22:20 koreth_: Sure, I don't expect anyone to write a book in an IRC discussion.

22:20 noprompt: arrdem: "this sort of thing" can be read either as cognac or lexing.

22:21 arrdem: which ever makes you laugh.

22:21 arrdem: noprompt: I hate parsing/lexing with a firey passion, which is unfortunate because I like languages and compilers.

22:21 noprompt: arrdem: bro. it's gotta be extensible.

22:21 koreth_: Thanks, bitemyapp -- you are no doubt steering me clear of a bunch of pain.

22:22 arrdem: koreth_: the advice is definitely good once you get over the delivery.

22:22 noprompt: arrdem: the lexing/parsing part is the most fun!

22:23 arrdem: noprompt: ..... no. just no.

22:23 bitemyapp: arrdem: he's always like that. always enthused about those kinds of problems.

22:23 arrdem: I keep telling him he needs to try Parsec, but I'm starting to hesitate because I think he'd end up writing a compiler just so he could use it more.

22:23 noprompt: arrdem: actually syntax highlighting is kind of sad because most of the time people use a plain old lexer to do it. i mean it works but it would be much better to use a real "hardcore" parse.

22:24 arrdem: bitemyapp: I've used parsec-likes so that I could get on with writing a compiler and escaping parser garbage...

22:24 bitemyapp: noprompt: my bullshit fold-in-parser worked btw.

22:24 bbloom: bitemyapp: parsec is a damn good parser combinator library, but i generally dislike combinator libraries that don't reify a real data structure for the parser or parse tree

22:24 bitemyapp: arrdem: I haven't seen any that attain the true sorcery of the original, but it's halfway there and nice to have.

22:25 bbloom: or rather more generally for any combinator library: the data structure for the composed program

22:25 bitemyapp: I know this pains you, but the functions are the data.

22:25 bbloom: if it doesn't instance show, it doesn't count :-P

22:25 arrdem: noprompt: sure sure. TBH I think that there are a lot of really fun things left to be done with editing programs by ASTs. which is sad because one of my professors wrote his own structural editor back in the 1980s and it went nowhere..

22:25 * bitemyapp grins and laughs

22:26 bitemyapp: bbloom: I've seen tree-aware show for free monads.

22:26 arrdem: noprompt: in-editor semantic analysis and highlighting based on the AST for instance.

22:26 noprompt: AST based drag and drop code motion including comments...

22:26 noprompt: all kinds of cool stuff. all eventually possible in LT!

22:26 noprompt: arrdem: that's what the world needs.

22:26 bbloom: bitemyapp: let me know when the haskell people drag combinator libraries all the way back to lisp & i'll happily give it a try

22:27 bitemyapp: bbloom: well, liskell. but I know what you mean. I'd like that too, it's just not as important to me as not chasing errors.

22:27 noprompt: arrdem: seriously. structural editing makes coding much more pleasurable.

22:27 arrdem: bitemyapp: I just won an argument with a C programmer by bashing on the C pointer system. what do I win.

22:27 brehaut: haha

22:27 not needing to write C ?

22:27 arrdem: brehaut: if Rust takes off I hope so...

22:28 (dec so)

22:28 bitemyapp: arrdem: wait what who?

22:28 lazybot: ⇒ -1

22:28 arrdem: (dec also)

22:28 lazybot: ⇒ 0

22:28 bbloom: bitemyapp: instaparse is a nice compromise. the combinators return maps of production names to combiners

22:28 turbofail: arrdem: a pointer, mounted as a hunting trophy

22:28 arrdem: bbloom: instaparse is the shit

22:28 bbloom: (dec so) ; too, i hate the highlighting when i use common words

22:28 lazybot: ⇒ -2

22:28 bitemyapp: bbloom: it's reasonable and nice to use, but attoparsec/parsec present a supremely practical production/prototype pair.

22:28 (dec so)

22:28 lazybot: ⇒ -3

22:29 noprompt: `lein new blood` ... (defproject blood :description "A syntax highlighter written in blood" ... welp that's a start.

22:29 * noprompt cogna

22:30 noprompt: :(

22:30 ok i should probably cook my lamb chops now.

22:30 brehaut: ah

22:30 err sorry

22:30 noprompt: bbloom, bitemyapp is there anything close to Parsec for clojure?

22:30 arrdem: noprompt: instaparse

22:31 $google instaparse

22:31 lazybot: [Engelberg/instaparse · GitHub] https://github.com/Engelberg/instaparse

22:31 arrdem: noprompt: not blazing fast but really really easy to work with.

22:31 noprompt: arrdem: true. good to know it's not fast. i wrote a CSS parser with it and the resulting parser was slow as mud.

22:32 arrdem: i wasn't sure if it was instaparse or if i just wrote a bad grammar.

22:32 arrdem: noprompt: some of it is the grammar... some of it is the toolkit

22:32 bitemyapp: arrdem: programming via type errors is going well so far in Rust-land.

22:32 arrdem: I'm fiddling with a benchmark.

22:32 arrdem: bitemyapp: I'm still browsing r/guns and thinking about food... the coffee crash isn't kind.

22:33 noprompt: bitemyapp: what instrument is the benchmark playing?

22:33 bitemyapp: arrdem: that's why I drink tea.

22:33 arrdem: (inc noprompt)

22:33 lazybot: ⇒ 5

22:33 bitemyapp: noprompt: Golang channels vs. Rust tasks. FIGHT

22:33 arrdem: noprompt: what are you doing that you only have 5 karma. I'm at 15 already and you totally do more awesome stuff.

22:33 bitemyapp: arrdem: he writes libraries and doesn't use IRC much ;)

22:34 arrdem: bitemyapp: legitimate.

22:34 noprompt: arrdem: that and i don't say anything worth a damn in here.

22:34 arrdem: bitemyapp: http://i.imgur.com/fkrcD9R.jpg why would you ever...

22:34 bitemyapp: mosin in an aluminum frame

22:35 bitemyapp: arrdem: fuck 'em with a rake.

22:35 that poor mosin :(

22:36 * arrdem foods

22:39 seangrove: arrdem: He's doing better than me. It can always get worse...

22:40 arrdem: and this is why we wanted Cloutjure to have github/clojars as input sources...

22:40 justin_smith: I think karma is kind of silly, but really the easiest way to get it is to crack a good joke or solve a bug in some code from someone that doesn't know clojure yet

22:41 it's easy, half the time it's just that they are using map as if it was eager

22:41 bitemyapp: arrdem: man I am getting thoroughly reamed by the compiler.

22:41 noprompt: ugh. if i see one more mashup of "clojure" and another word i'm gonna see one more mashup of "clojure" and another word.

22:41 bitemyapp: arrdem: like poorly dribbling a soccer-ball and then getting waterboarded in a puddle of mud by the soccer coach.

22:41 justin_smith: that sounds terrible

22:41 (fits both previous statements actually)

22:42 bitemyapp: justin_smith: Rust.

22:42 I am doing stupid, error-causing things and it is stopping me.

22:42 justin_smith: hah

22:43 noprompt: seriously. jump on wikipedia. name your library after a planet or a japanese demon or something. something that's not "cloduhr" or "duhrjure" or whatever.

22:44 bitemyapp: noprompt: I do similar things!

22:44 * justin_smith rushes out to register u-madjure.com

22:44 bitemyapp: noprompt: my latest name I picked was "yama"

22:44 noprompt: when people do that, i don't wanna use their shit.

22:44 RickInAtlanta: I was creating a project called "filer" unitl I saw that leiningen restricted project names, so I had to see what would happen if I called it filejure

22:44 bitemyapp: highly recommend: http://thesaurus.com/

22:44 RickInAtlanta: are you in alabama?

22:44 seangrove: I name worker machines from things like that, last one was samjoko

22:45 * noprompt recommends that offended parties take his words lightly because congac.

22:45 eraserhd: Is there a way to compare for identity in clojure (e.g. == in Java)?

22:45 bitemyapp: nobody answers

22:45 RickInAtlanta: bitemyapp: I reccmend maps.google.com

22:45 bitemyapp: I got this

22:45 eraserhd: okay.

22:45 eraserhd: we can do this.

22:45 eraserhd: bitemyapp: ?

22:45 noprompt: seangrove: see there. that's a bad ass name.

22:45 bitemyapp: eraserhd: you are very close already.

22:46 eraserhd: take what you just said and combine it with a word

22:46 eraserhd: guess!

22:46 seangrove: Well, could use a little bit of a hint...

22:46 noprompt: ganymede. that's a killer name! why hasn't someone named a library that?

22:46 seangrove: "Are these two things ... ?"

22:46 bitemyapp: eraserhd: guess the obvious thing!

22:46 eraserhd: same?

22:46 seangrove: Another word for same

22:46 TEttinger: has a q in it

22:46 bitemyapp: eraserhd: you already used the right word

22:47 TEttinger: dammit silence

22:47 TEttinger: squid?

22:47 bitemyapp: eraserhd: just combine it with...

22:47 justin_smith: TEttinger - there is one without a q in it that does that

22:47 I feel like this is a game show

22:48 eraserhd: ,(apropos "q")

22:48 clojurebot: (chunked-seq? sequential? doseq sequence rseq ...)

22:48 bitemyapp: eraserhd: http://www.youtube.com/watch?v=HuABhumm6fY

22:48 eraserhd: dude, TEttinger was fucking with you. there's no q

22:48 eraserhd: you already said the word once.

22:48 eraserhd: guess the MOST OBVIOUS possible thing!

22:48 TEttinger: oh I meant equals

22:48 eraserhd: oh, identical?

22:48 bitemyapp: ,(identical? {} {})

22:48 clojurebot: true

22:49 eraserhd: ,(identical 'a 'a)

22:49 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: identical in this context, compiling:(NO_SOURCE_PATH:0:0)>

22:49 TEttinger: one way of doing it?

22:49 eraserhd: ,(identical? 'a 'a)

22:49 clojurebot: false

22:49 TEttinger: http://clojure.org/cheatsheet see if you already mentioned the function

22:49 eraserhd: Sweet.

22:50 bitemyapp: ,(.equals 'a 'a)

22:50 clojurebot: true

22:50 seangrove: Equality is an intriguingly philosophical questions

22:50 TEttinger: bitemyapp, I see a q

22:50 seangrove: Grammar, less so

22:50 bitemyapp: TEttinger: different semantics yo.

22:50 eraserhd: You know, the word "identical" to me implies two different objects.

22:50 seangrove: Hrm...

22:51 eraserhd: :)

22:51 ToBeReplaced: eraserhd: why's that? i thought most languages shared the identical-means-same-object convention

22:52 seangrove: Maybe instead of (identical? ...) it should be (occupies-the-same-place-and-time? )

22:52 ToBeReplaced: or (same-object?)

22:53 noprompt: what about (are-these-two-fucking-things-the-same? )

22:53 seangrove: Turtles all the way down...

22:53 We need symbolic grounding!

22:53 TEttinger: jeez, I was wrong here. I thought the == part of the question was asking about = in clojure :|

22:54 bitemyapp: TEttinger: wheeeeee

22:54 ,[(System/identityHashCode {}) (System/identityHashCode {})]

22:54 clojurebot: [20331287 20331287]

22:55 eraserhd: ToBeReplaced: Well, to my ear "comparing for identity" is slightly different meaning from "identical".

22:55 same-object? would be the clearest thing to me.

22:55 bitemyapp: ,(let [a {}] [(System/identityHashCode (assoc a :a 1)) (System/identityHashCode (assoc a :a 1))])

22:55 clojurebot: [29197670 25242632]

22:56 noprompt: eraserhd: to make it really clear you could use screaming dash case (SAME-OBJECT??? )

22:56 eraserhd: TEttinger: I have discovered that splay trees are difficult in an immutable language.

22:56 BUT I have figured out how to do it.

22:56 TEttinger: eraserhd, that's interesting

22:56 eraserhd: Though I'm afraid I'm too tired to finish it this evening.

22:57 bitemyapp: ,(let [a {} b {}] [(identical? (assoc a :a 1) (assoc a :a 1)) (identical? a b)])

22:57 clojurebot: [false true]

22:57 TEttinger: I would have thought the opposite since Okasaki's book was about pure data structures

22:57 * bitemyapp dances in glee in the shadow of the chaos

22:58 eraserhd: Okasaki's book doesn't mention splay trees, though.

22:58 TEttinger: whaaaat I thought... hm I should find it

22:59 eraserhd: I didn't actually have the book, I looked through the TOC on amazon.

22:59 So I might stand to be corrected. That would be cool.

23:00 bitemyapp: do I need to say it?

23:00 * bitemyapp checks the clock

23:00 bitemyapp: it's between 0200 and 0500, I'm doing it.

23:00 eraserhd: http://hackage.haskell.org/package/TreeStructures-0.0.2/docs/Data-Tree-Splay.html

23:00 eraserhd: Hahaha. I just typed "(cdr (cdr" into my clojure.

23:01 bitemyapp: eraserhd: https://gist.github.com/m2ym/4232390 http://comonadology.blogspot.com/2013/02/splay-tree-access-is-coalgebraic.html

23:02 arrdem: lolz

23:02 Bronsa: bitemyapp: (let [a [1] b [1]] (identical? a b)) returns true when compiled with tools.emitter.jvm. similar "optimization" used for the expr you were testing.

23:03 eraserhd: dude, nnext.

23:04 arrdem: Bronsa: or ffirst...

23:04 bitemyapp: Bronsa: we need a ffffffffffirst

23:04 eraserhd: Heh. I was trying to avoid the zipper. That does make it lots easier, though.

23:05 arrdem: bitemyapp: I remember reading a Racket extension that added arbitrary C[AD]R support...

23:05 noprompt: bitemyapp: (reach-in-there-and-grab-the-first-item-in-the-first-most-deeply-nested-list xs)

23:05 bitemyapp: arrdem: Racket users are my favorite crazy people.

23:05 TEttinger: eraserhd: ! just found something https://github.com/cpdomina/SplayTree

23:05 bitemyapp: noprompt: well we kinda have that.

23:05 arrdem: bitemyapp: ... the implication of this is that you consider Haskellers and Pythonistas more stable. I find this disturbing.

23:06 noprompt: bitemyapp: and there should be a note that says "TODO: Figure out what the fuck I'm doing"

23:06 Bronsa: oh god

23:06 there's a nfirst

23:06 I never knew

23:06 bitemyapp: ,(def l [[[[[[[[[[1]]]]]]]]]])

23:06 clojurebot: #'sandbox/l

23:06 amalloy: Purely Functional Data Structures goes into splay heaps

23:06 bitemyapp: ,(let [[[[[[[[[[[x]]]]]]]]]] l] (println x))

23:06 clojurebot: 1\n

23:06 arrdem: amalloy: that's on my shelf... I need to finish reading it sometime.

23:06 bitemyapp: ffffffffffirst. QED.

23:07 Bronsa: beautiful.

23:07 bitemyapp: s/[/f/g

23:07 amalloy: which, as i understand it, is just using a splay tree as a heap implementation. so yes, it does go over splay trees

23:08 nfirst. wow

23:08 bitemyapp: arrdem: Python users aren't my favorite though. Haskell users are merely sorcerers and wizards of various sorts.

23:08 Bronsa: I need to find a place to use nfirst ASAP

23:08 bitemyapp: ,(nfirst [[:a :e] [[:d :c]] [[:b]]])

23:08 clojurebot: (:e)

23:08 arrdem: bitemyapp: ... what is this sorcery

23:09 ,(doc nfirst)

23:09 clojurebot: "([x]); Same as (next (first x))"

23:09 * Cr8 writing a tiny Om app

23:09 Cr8: this is nifty

23:09 amalloy: Bronsa: i bet it'll be even harder to find a use for than cdar

23:09 bitemyapp: amalloy: well when you have destructuring...

23:09 seangrove: Cr8: Yeup, we're really enjoying it

23:10 Has some sharp edges though

23:10 arrdem: amalloy: that's easy.... that's just (second).

23:10 amalloy: no it isn't

23:10 that would be cadr

23:10 cdar is nfirst

23:10 Cr8: seangrove: what've you run into. I'm about an hour in, got my data model and some update helpers defined, doing live repl testing and that's nifty

23:11 arrdem: right because you chase the pointer in the value cell.

23:11 damn

23:11 Cr8: but now I'm going to be actually adding the interaction

23:11 RickInAtlanta: seangrove: Cr8: are you planning on blogging about your Om projects? I would love to read about them

23:12 bitemyapp: RickInAtlanta: not much luck, can't find Atlanta in Alabama. Are you sure?

23:12 seangrove: Cr8: Be sure to centralize your mutations/transformations or things can become difficult to track down

23:12 bitemyapp: RickInAtlanta: almost same number of "a"s though, can't be far.

23:12 Cr8: heh, I'd like to blog about mine but what I'm putting together is a simulation of scenarious in which my company's software will explode horribly, to make a point

23:12 *scenarios

23:12 seangrove: RickInAtlanta: Next month's SF ClojureScript meetup will be about Om, and we should have some good talks

23:13 RickInAtlanta: Cr8: in that case, don't blog, take a video!

23:13 bitemyapp: seangrove: next month's?

23:13 seangrove: Probably won't have the budget to record the talks, but might make good fodder for blogging

23:13 Cr8: that is actually the plan

23:13 bitemyapp: seangrove: is this month's still happening?

23:13 seangrove: bitemyapp: Yeah, definitely

23:13 Just planning things out

23:13 RickInAtlanta: seangrove: in SF there is a ClojureScript meetup, in addition to a Clojure one?

23:13 bitemyapp: seangrove: can't hurt.

23:13 RickInAtlanta: there is now, wasn't before.

23:13 seangrove: RickInAtlanta: There are quite a few. Clojure Dojo, early/late Clojure meetups, and now a ClojureScript one

23:13 RickInAtlanta: Wow, awesome

23:14 seangrove: Prismatic's Clojure Community Night too

23:14 Which bitemyapp gave a good talk about an as-yet unfinished project :)

23:14 Cr8: are these all under the same meetup group or should i be looking somewhere

23:14 RickInAtlanta: we have a monthly clojure meetup in atlanta. hoping to do a code dojo seeon

23:15 soon

23:15 * bitemyapp hackles raise, grumbles

23:15 bitemyapp: Cr8: diff groups.

23:15 seangrove: bitemyapp: I just mention it because I'm upset about some metric stuff today

23:15 "Oh, I wonder how that's being used. Oh, well, let me implement metrics and wait a day or two..."

23:16 arrdem: that's what I was gonna build... a tagged numerics library.

23:16 bitemyapp: seangrove: the stuff I'm learning with Fay for the presentation ties into it, if that's any comfort.

23:16 arrdem: ಠ_ಠ

23:17 arrdem: bitemyapp: you keep using that face, and it still doesn't render in ERC.

23:17 seangrove: Renders in my erc

23:17 ಠ_ಠ

23:17 noonian: the owl

23:18 Cr8: doesn't like my urxvt

23:18 bitemyapp: Cr8: so much for the u in urxvt :(

23:19 arrdem: yeah inicode in general is pretty suck under Arch...

23:19 Cr8: i think I just don't have a font w/ those chars, or my current font doesn't? dunno

23:19 all my terminals and editors on my Arch box and my Mac are in PragmataPro

23:19 arrdem: Cr8: that's the primary cause of all this stuff...

23:26 Cr8: well shucks

23:26 installed some fonts, now it works in chrome, still not urxvt

23:29 okay, enough shaving that yak, back to cljs

23:33 * ddellacosta wants to be hanging out at ClojureScript meetups talking about Om with seangrove and bitemyapp ...*sigh*

23:34 quizdr: allow for me please to provide for you here some confirmation that, upon my return from lunch, i noticed gracing upon my screen, in little ol ERC, a most beautiful pair of lovely owl eyes

23:34 noprompt: ddellacosta: om is so awesome.

23:34 seangrove: ddellacosta: Come out for a week, it won't kill you, despite what bitemyapp might have told you ;)

23:34 ddellacosta: noprompt: yeah, went through and did a test proto-implementation of a section of current codebase in Om yesterday...really impressed

23:35 seangrove: well, I'm angling to get there for Clojure/West, so you may see me soon. ;-)

23:35 seangrove: Come out twice

23:35 Bring the wife

23:35 ddellacosta: seangrove: haha, don't have that kind of money right now, but we'll see, we'll see...

23:35 seangrove: Once she experiences winter like this, she'll never want to go back to Japan ;)

23:35 ddellacosta: ah, haha

23:36 seangrove: I think she would definitely be psyched to be in the bay area, most definitely. We are talking about moving to North America soon, just depends on job stuff.

23:37 bitemyapp: ddellacosta: oh definitely visit the bay area, just do so before deciding to move here.

23:37 noprompt: ddellacosta: we've been working with it for the past week or so on something serious at work and it's been so much.

23:37 bitemyapp: seangrove: he's already married, he's fine for being in the bay area.

23:37 ;)

23:37 ddellacosta: bitemyapp: haha, is that the main problem? ;-)

23:37 bitemyapp: ddellacosta: main implies I can sift through the list in a reasonable amount of time.

23:38 ddellacosta: noprompt: yeah...I think it's just a matter of time before we add Om into our app in a serious way. We already are using a poor-man's version of it which I came up with independently, but which is really weak compared to Om. I just have to figure out some more details first and find the right place/way to introduce it.

23:39 bitemyapp: I definitely intend on visiting before any decisions are made...don't get me wrong.

23:40 bitemyapp: ddellacosta: I'm considering making a decision to move before visiting, myself.

23:40 so I can leave sooner.

23:41 ddellacosta: bitemyapp: you mean move *away*?

23:41 bitemyapp: ddellacosta: yeah, gtfo of dodge.

23:41 arrdem: doge....

23:41 bitemyapp: arrdem: I nearly spat on my monitor damn you.

23:41 seangrove: My doge coings doubled in value over the last week

23:41 ddellacosta: bitemyapp wants to gtfo of doge so he can have a doge

23:41 * arrdem cackels evily

23:41 bitemyapp: (inc ddellacosta)

23:41 lazybot: ⇒ 2

23:42 arrdem: ddellacosta: yeah it's kinda silly...

23:42 ddellacosta: heh

23:42 arrdem: ddellacosta: price is falling a little bit as #dogesled is fading but that spike..

23:42 ddellacosta: seangrove: you really have dogecoin?

23:42 deadghost: https://www.refheap.com/26038

23:42 ddellacosta: arrdem: I don't have any. I'm wholly out of the loop on this whole digital currency thing.

23:42 arrdem: ddellacosta: you don't?

23:42 deadghost: session/clear! doesn't seem to want to clear for me

23:42 ddellacosta: arrdem: nope. :-(

23:42 arrdem: seangrove: high five!

23:43 deadghost: figure I'm derping on something

23:43 seangrove: ddellacosta: Yeah, went out to dinner and refused to let the guy pay, so he transferred some dogecoin to me

23:43 xuser: arrdem: what's your hash rate?

23:43 seangrove: I also got bitcoin the same way :P

23:43 ddellacosta: seangrove: oh man, that is so perfect

23:43 arrdem: xuser: my gaming rig only has two nvidia cards, so best I can do is about 350KH/s

23:43 ddellacosta: welcome to northern california

23:43 deadghost: what is the problem?

23:44 arrdem: xuser: I was playing with getting some more heavy duty mining gear for a while but the ecconomics don't make sense.

23:44 deadghost: session isn't getting cleared

23:44 seangrove: ddellacosta: I'm not super excited about people being able to give me access to money against my will. Makes paying for dinner/drinks cleanly way more difficult

23:44 ddellacosta: seangrove: does some obligation come with receiving it? Not trying to be snarky, seriously don't know

23:44 seangrove: oh, from a business/expense kind of perspective?

23:44 bitemyapp: ddellacosta: seangrove is a wonderful person but very hard to pay for anything with him.

23:44 arrdem: ddellacosta: only the social one of you can't refuse to let someone pay for their drinks...

23:45 seangrove: ddellacosta: No, just my habit of paying for things

23:45 xuser: arrdem: depends on if you believe the coin value will do a big increase on the future

23:45 ddellacosta: seangrove: ah, I see...

23:45 bitemyapp: very hard.

23:45 seangrove: arrdem: Yeup

23:45 arrdem: xuser: I don't have two grand of faith in doge. litecoin maybe, but probably not.

23:45 bitemyapp: ddellacosta: I think you need to plot ahead of time in order to pay for anything.

23:45 ddellacosta: seangrove: well...you could do it the Japanese way and be gracious by letter others pay so that they can assert their position above you. If you really want to get complicated. ;-)

23:46 seangrove: ddellacosta: Sure sure, flows with the culture ;)

23:46 xuser: arrdem: yeah, I think litecoin has a chance

23:46 ddellacosta: bitemyapp: ha, good to know next time I try to buy him a drink.

23:46 arrdem: xuser: which is interesting because transitively dogecoin has a chance.

23:46 xuser: BTC is just prohibitively expensive and hard to mine. people aren't really getting in at this point.

23:47 xuser: because doge is such a joke I feel like it could in fact stand a reasonable chance because it feels more accessible.

23:47 my 2D worth.

23:47 quizdr: time is probably better spent learning how to trade bitcoin than in mining it.

23:47 arrdem: currently near about 0.0000014 btc...

23:47 ddellacosta: deadghost: not sure what is up, but are you sure your log-out fn is getting called? app seems to be right...

23:47 arrdem: ,(* 0.0000014 2 965.00)

23:47 clojurebot: 0.002702

23:48 arrdem: dang. should a done 10D, then I woulda been right!

23:48 20 because math.

23:49 ,(* 969.86 0.0192)

23:49 clojurebot: 18.621312

23:49 arrdem: wtf I have ~$20 in doge.

23:49 quizdr: you can pay for drinks at bars here in singapore with bitcoin

23:50 arrdem: the real money in all of these things is automated trading because they are so volitile at the moment...

23:51 seangrove: up to 210 satoshi/doge!

23:51 where will the bubble burst...

23:51 deadghost: ddellacosta, yep definitely getting called

23:54 I've been staring at it for a while, so I'm sure it's probably something stupid

23:55 ddellacosta: deadghost: I gotta be honest, I'm stumped--I have an app with pretty similar structure here, using noir.session as well, and the signout happens almost identically to what you have laid out. The one difference is that we are not explicitly setting the memory-store, but I'm not sure what difference that would make

23:55 deadghost: how do you know it's not cleared out, btw.?

23:56 deadghost: chromium dev tools

23:56 and FF cookies manager+

23:57 well I guess I should have it display something to be triply sure

23:58 ddellacosta: deadghost: ..the cookie won't necessarily get wiped just because you've cleared the session. You still have a session, it's just empty. I would confirm by dumping something out of the session variables themselves.

23:59 xuser: arrdem: hard to know really

Logging service provided by n01se.net