#clojure log - Jul 05 2012

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

0:00 wingy: so whatever expression returns it can be stored in a file to be read by the reader?

0:01 (pr-str (assoc {:name "foo"} :age 20)) returns a string that is readable

0:01 or rather it prints a string that is readable

0:02 xeqi: &(read-string (pr-str (Object.)))

0:02 lazybot: java.lang.RuntimeException: Unreadable form

0:02 talios: ToxicFrog - I assume sanDbox :)

0:02 ToxicFrog: talios: yeah, me too, but that's not what it actually says :P

0:02 wingy: do all expressions return a value that could be stored as string?

0:03 and what would the use case be?

0:03 store our values in a file/database?

0:03 to be resumed later on or in a data crash?

0:05 xeqi: wingy: no, some expressions are not, but most data is

0:05 and its useful as a cljs <-> clojure server serialization

0:06 wingy: i see

0:06 xeqi: rather then trying to put something like sets into a json representation

0:06 wingy: just like json but for clojure values

0:06 cool

0:06 does this mean we don't need json anylonger between clojure server and clojurescript client?

0:08 xeqi: I get that impression

0:08 wingy: wow only clj between server and client

0:08 and only clj between server and database

0:08 this is heaven

0:09 seems to be the power when the lang is to manipulate data

0:10 dnolen: wingy: you already don't need json between server & client if you're using CLJ + CLJS

0:11 wingy: one ambitious improvement would be to make clojure data a JSON superset.

0:12 wingy: cool

0:13 the more i work with clj the more i think cljs will make a perfect fit in frontend

0:13 cmajor7: dnolen: do you know if there a way to memoize remote calls in cljs? e.g. using a "defremote" from ibdknox's "fetch", and it would really save a lot of time and server RAM if I can memoize a "defremote" macro

0:13 wingy: clj is a good lang targeting various platforms (java, clr and js)

0:15 i mean jvm

0:16 dnolen: cmajor7: I don't see any challenges there. either the value is cached and you invoke the callback immediately or not.

0:19 cmajor7: dnolen: it makes perfect sense theoretically, but it seems I am hitting the wall with memoizing a macro (e.g. "defremote")

0:20 (def funn-memo (memoize funn)), where "funn" is "(defremote funn [req] (some-server-fun req))"

0:20 dnolen: cmajor7: memoizing a macro probably won't work. I don't know anything about fetch, but you'll probably need to memoize at the level below the sugar.

0:21 cmajor7: that what I was afraid off :0

0:22 dnolen: cmajor7: doesn't sound very challenging. in the end it's probably just functions after all.

0:22 cmajor7: if it's not, it's broken.

0:22 cmajor7: (this is what I am talking about memoizing: http://bit.ly/M7iKGh)

0:23 dnolen: cmajor7: it's greek to me.

0:24 cmajor7: my clojurefu is not yet strong (although it is getting better, so it is hard to take it apart)

0:24 oh.. ok, so it is not just me.. good to know :)

0:25 dnolen: cmajor7: all I mean is that I don't really care decipher what's going on. Ask the maintainer.

0:26 amalloy: speaking of asking the maintainer, dnolen, did you see my $mail about dynamic bindings of logic variables?

0:27 dnolen: amalloy: I did not. dynamic binding of logic variables sounds like trouble.

0:27 amalloy: well, here's a re-paste: i tried binding a dynamic variable to a fresh logic variable, to make it easily accessible throughout my program (we discussed this and decided it probably ought to work). but from https://gist.github.com/3049645 it looks like that binding just creates a snapshot of the logic variable, which can't be unified with anything anymore

0:28 i discussed it with you before and you thought it would be fine, but it sounds like we misunderstood each other

0:30 dnolen: amalloy: I probably misunderstood, I don't understand what you're trying to accomplish

0:32 amalloy: dnolen: at the start of my program i set up a few lists of the relevant things. like there's a list of all the doors, all the people, etc. then inside dooro and related functions, i want to also specify "by the way, this door object is a member of the 'global' list of doors"

0:33 otherwise the unifier will try just making up a new door for me rather than unifying with the existing ones

0:33 augustl: away away

0:33 #fail

0:33 amalloy: up up

0:34 dnolen: amalloy: still not following. probably because I don't understand what dynamic binding solves here.

0:35 amalloy: dnolen: it doesn't solve much; i'm not going to be rebinding it during run*. i just want a global value that i can set once, and then refer to inside my logic functions without needing them to be lexically scoped

0:35 dnolen: amalloy: so why not define a global thing? global logic vars will be global.

0:36 amalloy: dnolen: how?

0:36 dnolen: (def x (lar 'x))

0:36 oops

0:36 (def x (lvar 'x))

0:36 in a run that may be bound only once.

0:37 wingy: in OOP one have class that is instantiated to an object

0:37 class equivalents to record in clojure .. what does one call the "instantiated" record?

0:38 amalloy: so i would do that outside of run*, before all my function definitions, and then inside of run* it would be treated like any other fresh variable?

0:38 dnolen: amalloy: maybe I see what you're getting at - you want an initial set of bindings to be in place.

0:38 by "bindings" i mean logic var bindings.

0:39 amalloy: yes to your last question.

0:39 amalloy: yes. but i don't know what those initial bindings are when "setting up" my logico functions, only when i have a specific problem before me

0:39 thanks, i'll try again with lvar

0:40 dnolen: amalloy: eventually I gotta do a deep dive talk about this stuff - it's really not hard to interact with core.logic minus sugar.

0:45 wingy: "instance of the record

0:45 "

0:46 dnolen: wingy: instance of the type/record works.

0:57 wingy: is the meaning of data type and class/record interchangable? eg. if you wanna know what data type a value is of, then what you wanna know is the class of the value (class value). is that right?

0:59 amalloy: that's a pretty narrow definition of a data type. [2012 7 4] is a vector of numbers, not just a vector. or maybe it's a date, if you're storing those as YMD tuples. and {:name "steve" :age 10} isn't just a map, it's a person

1:02 wingy: amalloy: so one value can have multiple data types?

1:02 dnolen: wingy: class is an loaded word - inheritance usually a factor

1:02 wingy: yeah

1:03 whereas data type is not

1:04 dnolen: wingy: deftype is pretty simple, you've got some fields and the protocols it implements - that's it

1:05 wingy: defrecord is there so that people can write map-centric code w/o having to write boilerplate

1:08 wingy: ive seen patterns where you first create a protocol and defines the method signatures .. then you implement that interface in a record

1:08 but also where you first define a protocol then you extend it with extend-protocol where you also implement that interface

1:09 what's the diff between the last step in those two scenarios

1:09 dnolen: wingy: protocols are design, types/record may implement them - but you can also extend types you do not control to the protocols you care about.

1:10 wingy: ah that makes sense

1:11 explains why they are extending a vector with extend-protocol

1:12 can't anyone write a http://headfirstlabs.com/ book for clojure

1:12 that series is kick ass

1:13 dnolen: wingy: do you have the O'Reilly book?

1:13 wingy: yeah Clojure Programming

1:14 dnolen: wingy: I'm sure it's covered.

1:14 wingy: it is .. im reading it atm .. but often it's explained without you getting the pic

1:15 dnolen: wingy: IME ... patience and re-reading helps.

1:15 wingy: yeah and having to complement with asking questions here or googling/reading doc examples/doing clojure koans :)

1:16 dnolen: wingy: definitely.

1:17 wingy: and clojuredocs rocks .. good examples .. should be made the default one

1:18 dnolen: wingy: when it's good, clojuredocs has quality control issues.

1:19 wingy: i c

1:26 frio: I don't actually use clojure much (yet - have had a couple of prototypes turn out very well!), but: is there some way to enforce a degree of compile-time type-checking?

1:26 I know static typing isn't a very lisp-y thing to do, and I know clojure is dynamically typed

1:27 dnolen: frio: ambrosebs is working on Typed Clojure

1:27 frio: (I ask because it sounds like this kind of info could easily be derived from protocols :))

1:28 ooh

1:28 wingy: isn't it mandatory for a type/record to implement all methods of the interface?

1:28 frio: thanks dnolen :)

1:28 found the gsoc for it

1:28 dnolen: frio: even so I suspect experiments with the CLJS analyzer, datomic, core.contracts, & core.logic will eventually deliver more interesting forms of verification than just types.

1:28 wingy: i tried to omit some methods but it still worked

1:29 dnolen: wingy: not enforced, but definitely broken if you don't, IFn perhaps the exception

1:29 wingy: dnolen: but then what is the purpose of protocol?

1:29 if you are not forced to implement them

1:29 dnolen: wingy: think about it for a couple days.

1:29 couple of days

1:30 wingy: im afraid i wont get the answer

1:30 dnolen: wingy: you will.

1:30 wingy: i will!

1:30 frio: that's cool dnolen :)

1:31 (ever since playing with Haskell, there's a Thing in my head that constantly tells me off when I notice problems that could be caught at compile-time happening at runtime)

1:31 dnolen: frio: I think so. verification is important, having it *not* be baked into the languages means we're free to figure out what works best for idiomatic Clojure code!

1:33 frio: definitely. the one thing i've really liked about playing in clojure so far is that it *feels* modern to use (as does the tooling). it'd be nice if that continued

1:35 dnolen: frio: I'm confident that interesting verification tools will arise. Also I think Light Table's approach will be able to aid debugging in pretty novel ways.

1:36 frio: yeah dnolen, im really, really looking forward to light table

1:37 i get myself caught in a tizz; on the one hand, i *love* haskell's enforced referential transparency, functional purity, and static typing

1:37 on the other hand: a simple app took me 2 hours in clojure, having never used it before

1:38 the haskell version took me a week or so to get done, having been learning it in my spare time for quite a while now

1:38 so, i guess the point is, the theoretical part of me loves and wants that stuff; the practical part of me accepts that doing so can destroy your productivity (without climbing a steep curve, anyway)

1:39 dnolen: frio: Clojure is pretty productive. Haskell seems pretty sweet - but personally I'm not big on types. static analysis yes, Haskell's approach to types ... no.

1:39 frio: also I'm not sold on monads at all.

1:40 frio: the jury's still semi-out for me on monads, but it's slowly coming in positive as i understand them better

1:40 although that could be stockholm syndrome kicking in ;)

1:40 * adu <3 clojure

1:40 adu: clojure is my favority

1:43 dnolen: frio: people like to talk about monads like they are unequivocally awesome. Yet when you understand them you realize they are opaque wrappers - very questionable from an engineering perspective (I could be quite wrong here, I'm not a monad expert)

1:43 clojurebot: |monads| is monads

1:44 frio: so far dnolen, the monad i've used the most is probably the Maybe monad... which im deeply in love with. having worked in corporate java for too long, it's nice to have a way of never actually having a NullPointerException ever ;)

1:44 dnolen: frio: yes Maybe is pretty much the monad that makes me think the whole notion is terrible.

1:44 frio: they're a decent abstraction for controlling execution in certain ways. i've not found them that opaque, but im no expert either

1:44 how come?

1:44 dnolen: frio: it's a wrapper.

1:45 nicholasf: which client are peeps using for mongodb integration?

1:45 frio: im probably going to need more elaboration than that :p

1:46 dnolen: frio: wrapper types in generally are very yucky. You can use them in some code, but they become a hassle eleswhere.

1:46 frio: i suppose from the debugging pov, it's frustrating not know which execution inside a Maybe monad chain failed

1:46 dnolen: frio: there's also an implicit cost w/o a "sufficently smart compiler" - which is hogwash IMO.

1:48 frio: no doubt - but is that cost higher than, for instance, unwinding your stack when an exception is thrown?

1:48 dnolen: frio: null pointer exceptions suck hard ... no argument ... but usually that maps to something primitive in the language you're weilding. so you can reason about the costs.

1:48 frio: just depends on the code being written.

1:49 hiredman: dnolen: I think I am seeing a bug in clojurescript where setting an atom's value to nil causes an error "TypeError: a is null", sound familiar?

1:49 dnolen: frio: for graphics stuff, may be too much.

1:49 frio: yeah dnolen

1:50 dnolen: hiredman: it does not, ticket welcome.

1:50 frio: ill have to have a think about this :). like i said, so far ive quite liked the concept, and have enjoyed making use of it... but the flipside is, ive not done anything particularly complex either

1:52 dnolen: hiredman: hmm, did you test that against master?

1:54 hiredman: dnolen: no, just against whatever version session pulls in

1:54 it looks like the bug might not exist in master?

1:54 dnolen: hiredman: (reset! some-atom nil) works for me on master.

1:54 hiredman: the issue seems be the result of calling type on nil, and I cannot find a definition of type on master

1:55 dnolen: hiredman: (type nil) definitely works on master - returns nil.

1:55 hiredman: good to know

1:56 dnolen: hiredman: yeah looks like session is on lein-cljsbuild 0.1.8, very old in CLJS world, 0.2.2 is the latest.

1:56 wingy: so i thought that records remind about classes in oop and that was what we didn't want .. methods and data in one structure .. but that's not exactly the same thing as classes since the records don't have mutable state?

1:57 hiredman: I see

1:57 dnolen: wingy: nothing wrong with methods + data.

1:57 wingy: its the changing state that is bad in oop?

1:58 dnolen: wingy: statefulness & inheritance are problematic yes.

1:58 wingy: ok

1:59 hiredman: well, bleh, session cannot upgrade the version of clojurescript without breaking the version of noir it is using, and I really don't want to touch noir

1:59 dnolen: hiredman: ah right ...

1:59 borkdude: dnolen can I ask a stupid question, why exactly is inheritance bad, can you give an example?

1:59 hiredman: but doesn't seem to use noir-cljs?

2:00 dnolen: borkdude: read up on why C++ video games have abandoned it.

2:00 frio: the term "fragile base class" or something to that effect is tickling my memory from uni

2:00 borkdude: dnolen where

2:00 dnolen: borkdude: google C++ component video games.

2:01 frio: http://en.wikipedia.org/wiki/Fragile_base_class

2:01 which links to http://www.javaworld.com/javaworld/jw-08-2003/jw-0801-toolbox.html (which i havent read, so might be completely bogus ;))

2:02 dnolen: hiredman: not sure why session needs noir, I guess the remoting bits are convenient. I imagine wouldn't be hard to separate.

2:07 brainproxy: borkdude: found this http://en.wikipedia.org/wiki/Composition_over_inheritance

2:08 reading it reminded me of some of the interesting features of perl's Moose, which I haven't used in a while but which was pretty nice

2:10 you could build up some interesting classes with has relationships, and those `has` rels can be declared with `isa` rels, which can in turn be composite things built up w/ `has` and `isa`

2:10 it's not static typing, but you got some type-checking like benefits

2:11 borkdude: brainproxy tnx, it begs for the question that if this is better, why isn't everybody doing it like this?

2:12 brainproxy: and it's dynamic so can be manipulated at runtime, and instances can even override rels declared on the parent classes

2:12 hiredman: dnolen: looks like just some convenience for calling the compiler

2:12 brainproxy: sorry, i meant you could declaratively override the rels w/ instance specific rels

2:13 borkdude: well.. people do what they're use to doing

2:13 and people tend to teach other people what they're used to, and so on

2:16 borkdude: brainproxy I agree, inheritance feels counter-intuitive to me anyway

2:16 dnolen: borkdude: brainproxy: http://www.gamasutra.com/blogs/MeganFox/20101208/88590/Game_Engines_101_The_EntityComponent_Model.php

2:16 borkdude: maybe there should be a rule like with macros: don't use inheritance unless you absolutely need it?

2:17 dnolen: borkdude: 'cept ... you never need it.

2:17 borkdude: dnolen great, I will read it later, have to go soon

2:18 dnolen: borkdude: brainproxy: http://gamearchitect.net/Articles/GameObjects1.html

2:19 brainproxy: dnolen: what's interesting is that when I was actively playing with Moose and actively using Joose (a port of Moose to JavaScript), I tended to favor `has` and Roles (which were interfaces in Java parlance) and rarely used subclassing

2:19 borkdude: dnolen noted

2:20 brainproxy: which kind of makes sense now looking back on it... the inheritance stuff just wasn't all that useful

2:20 dnolen: brainproxy: same princple applies to my experience w/ Cocoa.

2:21 brainproxy: inheritance is simply looked down upon.

2:21 brainproxy: this is all bringing back interesting memories of me really wanting and trying to like "modern" perl

2:21 read a couple of books, eventually gave up on it

2:21 dnolen: borkdude: funny enough, macros ease the tension around *not* having inheritance.

2:21 brainproxy: but Moose was the best part

2:22 borkdude: I think clojure is a modern enough language to try

2:22 brainproxy: borkdude: agreed... this was a couple years ago, was unaware of clojure at that time

2:22 dnolen: thanks for the links

2:23 borkdude: dnolen why does clojure use inheritance in its implementation? ;-P

2:23 brainproxy: still, if you ever want to read some interesting javascript, try groking the interals of Joose3

2:23 the meta object protocol implemented on top of prototypal inheritance is really cool stuff

2:24 the Russian programmer behind it is quite the whiz

2:27 wingy: composition is where you add behavior to something else? is protocols/records used for composition in clj?

2:27 dnolen: borkdude: where? in the interfaces?

2:27 wingy: is it possible to add multiple protocols (behaviors) to a record?

2:27 borkdude: dnolen AFunction, APersistentVector, etc

2:28 dnolen: borkdude: because it's convenient, doesn't matter much if you have protocols.

2:29 borkdude: dnolen so the inheritance thing only goes against a deep inheritance tree, or what?

2:30 dnolen: broquaint: I'm not following ...

2:30 oops

2:30 borkdude: I'm not following

2:30 wingy: ok its possible

2:31 borkdude: nm, I gtg!

2:35 frio: like everything in computer science, inheritance (and all that goes with it) has it's pros and cons

2:35 there's no silver bullet, or 100% right way of doing stuff (yet), basically

2:37 dnolen: frio: disagree ... inheritance is like mutablity ... the cons outweight the pros.

2:37 frio: sounds like we disagree on a lot dnolen :p

2:38 dnolen: frio: disagreement is ok. but I've also got a lot of industry experience reports on my side.

2:38 frio: don't get me wrong - i avoid inheritance (hell; i avoid OOP altogether) when i can

2:39 but, for instance, it's nice that in java i can declare exceptions which extend other exceptions, to give me a more or less granular control of how i deal with them when they bubble up the chain

2:39 dnolen: frio: as I said earlier, tensions arise w/o inheritance - so the language must fill the gaps in some way.

2:40 frio: there are variety of Clojure specific solutions - macros, default cases, etc.

2:40 frio: yeah; im talking more about my day job with that anecdote (where clojure is a distant twinkle in a BA's eye ;))

2:41 speaking of which, hometime!

2:53 jon___: Hi I keep doing this. I have a variable like foo, and I want to conditionally do something to it, or simple return foo. I tend to write it like this: (if condition (dosomething foo) foo). feels a bit clunky

3:02 adu: hi jon___

3:02 jon___: hey

3:11 amalloy: jon___: so write a function that captures that common pattern for you. (defn maybe-do [action pred x] (if pred (action x) x))

3:12 jon___: ok

3:12 amalloy: personally i like useful.utils/fix, since i wrote it, but it's not exactly the same. it may or may not be useful to you

3:12 jon___: just did it so often it felt I'm missing something else

3:12 I'll have a look - thanks

3:12 amalloy: er, useful.fn/fix. silly me

3:12 &(require 'useful.fn)

3:12 lazybot: ⇒ nil

3:13 amalloy: &(useful.fn/fix 10 even? inc)

3:13 lazybot: ⇒ 11

3:13 amalloy: &(useful.fn/fix 10 odd? inc)

3:13 lazybot: ⇒ 10

3:19 ro_st: anyone using emacs have a thing that automatically highlights occurences of the symbol under the point?

3:19 kinda like when you i-search

3:20 but with awareness of clojure's lexical scope

3:25 cljs_newb_293878: within clojurescript, how do I set a global javascript variable?

3:25 augustl: wingy: you happen to know if/how dynamic attributes are supported in datomic?

3:25 cljs_newb_293878: i.e.e, I'd like to set js/foo.bar , which would be the same as "foo.bar" in the js console

3:25 augustl: I'm currently using a document database, because my data is schemaless documents. Datomic seems like a great fit except for that part

3:26 cljs_newb_293878: what is the closest open source alternative to datomic? fleetdb?

3:27 augustl: cljs_newb_293878: didn't know about that one, nice

3:28 seems like it never persists?

3:28 (to disk)

3:30 si14: what can I do if my (github and whatnot) nickname was written with a mistake on http://clojure.org/contributing ?

3:30 wingy: fleedb seems abandoned?

3:31 cljs_newb_293878: it doesnt' seem very active

3:31 but it seems like an interesting project to work on for learning about databases

3:31 and I love the name

3:31 wingy: augustl: no idea .. just started with datomic

3:31 i love the word datom :)

3:31 augustl: wingy: everyone in #datomic seems to be in the wrong time zone :)

3:31 wingy: augustl: doesn't seem to be a very active channel

3:32 the google group is answering questions though

3:32 the Clojure Programming is giving a lot of too detailed examples imo

3:32 there is no way you wanna get into those kind of details and LOC

3:33 augustl: I would very much like to know if I can use datomic before a meeting 4 hours from now :)

3:33 wingy: augustl: its possible

3:33 takes like 5 min to set it up

3:33 download the zip folder and read README

3:34 and you are ready to go with it in a lein project

3:35 and then you read samples/seattle/getting-started.clj

3:35 and the data files its using and you will get the pic while you are reading the reference pages in the doc

3:35 Datalog is so sweet

3:36 augustl: wingy: I have it installed now

3:37 my problem is whether I can write my schemaless data to it somehow

3:38 wingy: augustl: what is your use case?

3:38 augustl: wingy: schemaless data :)

3:38 I'm storing events as my main ever-growing entity, and an event has attendants

3:39 the fields for the attendants vary from event to event

3:39 the data is always limited to one event, so I could always "shard" manually by using partitions and eventually multiple databases

3:40 wingy: in the schema of datomic you only have to define the attributes any entity can use .. not relations between entities, not how an entity should look like (what attributes they will have etc)

3:40 augustl: right, but there's still a schema

3:41 wingy: yeah .. i think it's mandatory since you wanna specify what attributes are indexable and not

3:42 or what type it is etc .. i dont know if you can add an attribute that is not predefined .. ask in google group

3:42 or let me just check :)

3:43 ivaraasen: augustl: excuse my newbieness, but sharding is basically splitting the table by rows to reduce the size of the index, right?

3:44 augustl: ivaraasen: haha if you ask me, I ask you!

3:44 what I meant with sharding was that there are ways to naturally split the data. For example, events are owned by "customers", so we could shard so 50% of the customers used one db, and 50% another, for example

3:45 in relational DBs, sharding is usually splitting one single table I think, for example sharding on a foreign key

3:45 wingy: augustl: nope didnt work

3:45 augustl: anyways, I'll roll with datomic. It has everything I need. And by the time I end up having too many partitions, datomic probably has support for dynamic schemas, _or_ I can shard my data :)

3:46 wingy: i had to have it the attribute defiend in the schema or i got an error

3:46 ivaraasen: augustl: ah, thanks. datomic looks really nice, BTW

3:47 augustl: yeah, and it's a _perfect_ fit for this project

3:48 ro_st: i'm getting a java.lang.NullPointerException when compiling in swank. no location. lein2 compile produces no exceptions. where do i look for more?

3:48 wingy: augustl: i also need to add attributes i can not be aware of .. they should be created in runtime by users

3:48 augustl: but i think what we really want is to have a way to define new attributes in the schema in runtime

3:48 perhaps that is possible

3:48 so we can specify if those should be indexable or not, if they are strings or booleans etc

3:49 augustl: wingy: I don't need that either

3:50 using one schema foreverything wouldn't make sense

3:51 wingy: why not

3:52 your attributes are namespaced

3:52 augustl: it's impossible to shard :)

3:52 so when I eventually hit the limit of the number of attributes in a schema, I'd need to re-do everything

3:54 wingy: i think datomic can handle many many attributes

3:55 isnt the point with sharding that data should shard

3:55 not the schema itself?

3:56 augustl: I wonder how people typically manage their schema.. Is it common to have a schema.dtm that you need to run once?

3:57 wingy: the data has to follow the same schema no matter in which server it is .. and if you dont want that then that server would be for something else .. with a new schema and data set

3:58 seems like it

3:58 and then we need to lookup if you can dynamically add attributes, which seem likely since they are all just entities in the db

4:03 ro_st: is there a way to list all the environment variables and their values?

4:03 i know i can use System/getenv to read a particular value

4:04 augustl: ro_st: (System/getenv) :)

4:04 ro_st: doh

4:04 of course.

4:05 ok. so how do i get the swank/slime repl to see env vars i've set in my user profile? failing that, how do i set env vars for the slime repl?

4:24 no one? :-(

4:24 augustl: have you tried accessing env vars?

4:24 clojurebot: http://www.slideshare.net/mudphone/fun-with-vars

4:25 augustl: I can't imagine they manage to screw that up

4:26 ro_st: i can read env vars just fine

4:26 but i've set some in my .zshrc and i'm not seeing them from within the repl that swank starts up

4:27 augustl: are you seeing them in zsh itself?

4:27 ro_st: absolutely

4:27 and from a lein2 repl

4:27 just not from the repl in clojure-jack-in

4:28 which kinda sucks because we're following this http://www.12factor.net/config

4:30 there's probably some really simple thing that i need to do

4:30 if i can just find the documentation

4:31 would my swank command be the problem? it's currently: echo "/Users/robert/bin/lein2 jack-in %s" | $SHELL -l

4:38 technomancy: how do i set env vars for a slime-repl?

4:52 clgv: ro_st: you can modify the java object returned by (System/getenv) if you want to add or change value for something that is accessing those variables in the following

4:52 ro_st: interesting :-) it says it's an UnmodifiableMap instance

4:53 do you perhaps have a code sample, clgv?

4:53 clgv: oh. but I remember having seen something like that. maybe there is a System/setenv ?

4:54 ro_st: unfortunately not :-(

4:54 it's ok. i'll work around this issue another way

4:56 clgv: oh maybe I confuse it with System Properties

5:07 wingy: why is it called tag and not child in http://clojuredocs.org/clojure_core/clojure.core/derive

5:07 what is the meaning of it being called tag

5:47 ro_st: what work factor are you all using to encrypt passwords with bcrypt?

6:10 clgv: wingy: you want explanations for all namings - may they be important or not, don't you? :P

6:22 wingy: clgv: no i want to get what tag is

6:23 why "tag"

6:23 clgv: wingy: thats described in the docstring

6:23 tag is the child part of the relation but it can be an ns-qualified symbol, keyword or class

6:24 a parent is not allowed to be a class

6:25 wingy: yeah i knew that .. was just curious about why not use "child"

6:26 clgv: "child" would be very generic

6:26 but it is limited to the three types mentioned above

6:27 thats my guess on it

6:27 and it doesnt really matter at all, since the docstring clearly states what that function does and what roles are assigned to the parameters

7:07 mystiiq: I am writing one library in clojure and I have another project where I'd want to use it. how can that be achieved?

7:08 I dont want to compile the library to .jar or something right now because I am still working on it

7:12 clgv: mystiiq: you want leiningen's checkouts feature

7:12 mystiiq: do you use Eclipse+CCW by any chance?

7:13 mystiiq: clgv: naah, Sublime text and terminal

7:14 clgv: ok so you work leiningen based. create a checkouts folder that contains a symlink to the dependency project's directory

7:14 wingy: isn't repeat returning a sequence: (= [:a :a :a :a :a :a :a :a :a :a ] (repeat 10 :a)) => true

7:15 is vector converted into a seq?

7:15 clgv: wingy: clojure's equal comparison are by value. you should read on that

7:15 wingy: ah

7:17 clgv: wingy: seriously, continue reading that book you bought. ;) you will have to ask less basic questions then ...

7:17 wingy: i _am_ reading it

7:19 clgv: good :)

7:22 mstrlu: Does someone have a link at hand for an online reference on equality? vector ~ seq does not seem obvious `by-value' equality

7:24 clgv: mstrlu: there are the equality partitions: sequentials, maps, sets - within a partition it is only compared by value

7:25 mstrlu: vector, sequence, list, cons are all sequential...

7:25 mstrlu: clgv: got it.. thanks

7:34 by the way.. is there any reason <= is only works for numbers (and not for Comparable)?

7:39 clgv: mstrlu: there is `compare` for everything comparable

7:42 mstrlu: clgv: yeah but compare is only binary and not boolean... and numbers have it too. Why do only numbers have <= then

7:44 clgv: mstrlu: well since compare has 3 different outcomes, a bigger arity would probably make not much sense

7:44 mstrlu: clgv: sure.. but for <= it would

7:44 clgv: mstrlu: the source shows that <= is optimized for numbers

7:45 so the reason is performance

7:45 mstrlu: clgv: ok, fair enough

7:45 thx

7:45 clgv: $findfn "abc" "bcd" "cde" true

7:45 lazybot: [clojure.core/not= clojure.core/distinct?]

7:46 clgv: mstrlu: but you can write yourself a less-or-equal function that behaves like <= for more than two arguments

7:47 mstrlu: sure

7:48 clgv: in fact you can take the code of <= and replace (<= A B) with (neg? (compare A B))

8:02 wingy: a good one: http://www.lurklurk.org/clj_repl/clj_repl.html#start

8:16 clgv: wingy: lol. didnt know that one ^^

8:24 mystiiq: I need to build a small REST API in clojure, what tools should I look for? currently I am trying it with Noir

8:26 cmiles74: I wrote a Webmachine-like library for Clojure called Bishop that I like a lot. :P https://github.com/tnr-global/bishop

8:27 mfex: mystiiq, also see this list at the clojure-rest google group: https://groups.google.com/forum/#!topic/clojure-rest/lPTHMI4M2bM

8:30 clgv: mystiiq: something base on ring or pure ring

8:32 mystiiq: I don't know whether there is a downside using noir - certainly it is intended for more than just REST ;)

9:09 cemerick: So, for those of you using heroku or elastic beanstalk or any of the other services that like to be piped through on a CNAME: how are you redirecting your top-level requests to that CNAME's domain?

9:10 wmealing: (with-data-line [source line fmt] .... ) <- what are the square brackets here.. ?

9:10 cemerick: I just discovered that the redirection service I've been using sends out its own disallow-all /robots.txt. — of course, definitely what you want. :-)

9:10 solussd_: cemerick: is it possible to have friend's http-basic present an authentication challenge?

9:11 cemerick: solussd_: like?

9:12 wmealing: https://github.com/wmealing/clj-audio/blob/master/src/clj_audio/core.clj#L175 <-- like this for example

9:14 vectors...

9:14 solussd_: like a 401 unauthorized (i'm not an expert by any means) and whatever fancy stuff needs to be in the header for the challenge

9:15 cemerick: solussd_: it's entirely up to the user agent how to display the credential request for HTTP Basic. Most browsers use a plain dialog. There's no way to customize it.

9:15 solussd_: hmm.

9:16 cemerick: The only thing you can do is set the `realm` parameter for the HTTP Basic workflow, which is usually passed along within some text in the dialog.

9:16 This is why most sites use a combination of (for example) form authentication for interactive use, and HTTP Basic for API access, etc.

9:17 solussd_: i thought the client would make an http request, the server would respond w/ a 401, if not authorized, then the client would provide basic auth credentials. right now i can only access resources using workflows/http-basic if I provide credentials up front, i'm not getting the 401 challenge back

9:18 sure, in my case it's a restful web service using basic auth, so the client (an ios app, in this case) waits for the basic auth challenge before supplying credentials

9:29 ToxicFrog: clojure.contrib.server-socket doesn't appear to be maintained anymore :(

9:44 clgv: ToxicFrog: clojure.contrib itself is deprecated since clojure 1.3

9:44 ~contrib

9:44 clojurebot: Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

9:46 ToxicFrog: clgv: yeah, what I mean is, server-socket never made it out of monolithic.

9:47 clgv: ToxicFrog: maybe there were other better libs for its purpose?

9:48 ToxicFrog: If so, I can't find them.

9:48 solussd_: cemerick: shouldnt workflows/http-basic call http-basic-deny also in the case that no credentials were supplied so the client can respond to the challenge (status 401 w/ a www-authenticate header) ? My understanding is, if the response is a 401+www-authenicate header and credentials werent provided the first time the client should perform the request again with credentials. Then, the second time, if the credentials are invalid, that's the end of it

9:48 (http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#Code401) --At least that seems to be the sequence of events CuRL and the apple NSURLConnection api expect. :/

9:48 zawzey: Hi I have a library whose I/O to a db has to be synchronized (or transaction locked). This library would be used by different clojure processes (not threads) concurrently, how do i achieve synchronization so that different processes are synchronized?

9:49 If it's a single process, I guess a combination of ref and agent would work, but since it's across processes, would I need an external locking mechanism?

9:50 so would i need to use an external device like Avout, or some system-level locking to achieve that?

9:51 solussd_: zawzey: are transactions alone inadequate?

9:51 jsabeaudry: zawzey, One way to do it is to have one process dedicated to db access (and the synch is done there) and other processes make their request on that process

9:52 zawzey: jsabeaudry: well, that is possible, in that case it's a classic IPC mechanism

9:53 solussd_: e.g. if using jdbc transactions, throwing an exception anywhere in the transaction will trigger a rollback, so you could perform whatever queries you need to in the transaction to make sure you're good to go, and throw if you're not.

9:53 zawzey: solussd_ Well, there isn't any transactions, it's redis i'm interfacing with, and redis doesn't work with nested "watch" operations

9:53 solussd_ Redis has transactions, but it can't nest multiple transactions

9:54 solussd_: zawzey: ah.. I'm not terribly familiar with key/val stores

9:55 zawzey: solussd_ Yes, in JDBC, it's easier since there's row-level locking, in redis' case i have to do app-level synchronization for certain use cases

9:56 nDuff: Hrm.

9:57 cemerick: solussd_: you may be right. Can you open an issue?

9:57 solussd_: cemerick: certainly. thanks!

9:58 nDuff: While trying to initialize the clojurescript REPL, it looks like goog.string.StringBuffer is being loaded before goog.string, leading goog.isDefAndNotNull (called by goog.getObjectByName, called by goog.isProvided_) to claim that goog.string is already loaded, preventing its load from happening.

9:58 cemerick: My experience with HTTP Basic has always been in conjunction with headless API access, etc., so that may be borked for interactive stuffs.

9:58 solussd_: ^^

10:03 solussd_: cemerick: I've actually been testing with the REST client Rested (from the osx appstore). It has a checkbox under http auth called "Present before challenge", which is off by default

10:04 makes it act like some frameworks I use, e.g. nsurlconnection

10:10 XPherior: Does anyone know if it's possible to use Korma without an actual database? Problem I'm trying to solve is to generate raw queries for multiple database vendors, not actually execute the queries.

10:11 cemerick: solussd_: and you said there's a mode in curl for this as well?

10:13 solussd_: cemerick: yeah, I believe passing the '--anyauth' option will force it to wait for the first response before providing credentials

10:15 rkz: XPherior: https://github.com/ibdknox/Korma/blob/master/src/korma/db.clj hack do-query to print it out instead of actually grabbing a connection and running it

10:17 cemerick: solussd_: got it, thanks. Please do still open that ticket.

10:19 solussd_: cemerick: will do, as soon as I get to work. :)

10:20 dajero: I am wondering what the idiomatic way is to return a value directly from a function (this will allow me to later implement it. Right now I am writing code like this (defn stub-implementation [_] (identity false))

10:23 llasram: &(doc constantly)

10:23 lazybot: ⇒ "([x]); Returns a function that takes any number of arguments and returns x."

10:23 llasram: dajero: ^^

10:24 dajero: Oh, or maybe you just want: (defn example [& _] false), if you're stubbing things for future filling-in

10:25 XPherior: rkz: Thanks!

10:26 dajero: llasram: Thank you for your help, both seem to work. Funnily enough I previously tried the latter but then got an error. I was probably trying to figure out too much at one

10:34 clgv: dajero: you should write (defn stub-implementation [_] false)

10:44 mystiiq: how can I use routing with ring?

10:46 iwillig: mystiiq: not sure what you mean.. but you might want to look at compojure

10:46 cemerick: mystiiq: Ring is routing-agnostic. Check out compojure for one approach to layering routing on top.

11:42 rplevy: cemerick: do you know of any ring apps demonstrating use of friend to implement OAuth authentication?

11:59 cemerick: rplevy: None that are public. I'm going to have to go down that road myself this month, so the results of that will find their way out if nothing else does from others that have hacked it together.

12:05 rplevy: great! thanks

12:49 hugod: rplevy, cemerick: this is what I ended up with https://gist.github.com/2839891

13:07 nDuff: hugod: Are there any public projects using zi-cljs?

13:10 hugod: nDuff: not as far as I know - I haven't touched it in a long while

13:11 nDuff: do you still have your zi issue? I couldn't repro locally

13:12 nDuff: hugod: lack of line numbers in error messages, even on Maven 3.0.4? Yes, still getting that -- and on zi-cljs also.

13:12 hugod: ...the other issue was resolved by moving to Maven 3.

13:14 hugod: nDuff: ok, see the missing line numbers now

13:22 elliottw: anyone using noir-blog on heroku?

14:01 amalloy: dnolen: i see that (str (lvar 'x)) prints as "<lvar:x_3118>", as does pr-str. this seems like a bad choice, because that reads back in as a symbol

14:15 locojay: hi what library should i use to generate html with clojurescript (hickup for cljs) : crate? or is there something better. I m new to cljs so might not know all the goodies out there...

14:16 gfredericks: locojay: I haven't heard of anything besides crate

14:16 I've used crate and it works fine

14:17 locojay: maybe c2?

14:17 k thanks

14:17 rplevy: locojay: enfocus might be useful to you

14:17 amalloy: (also, def'ing an lvar seems to work perfectly to solve the problem i was trying to solve with dynamic bindings. thanks for the nudge)

14:19 locojay: rplevy : thanks will have a look

14:31 nDuff: If I'm binding ClojureScript functions to events, I notice that redefinitions don't take effect (ie. the events still refer to the old versions). Is there a better approach to avoiding this than building proxy functions for event handlers?

14:34 dnolen: nDuff: wouldn't work in Clojure either w/o passing the var.

14:34 amalloy: np. glad that works for you.

14:35 ohpauleez: nDuff: You might want to take a look at how CLJS:One is doing their events, that might provide some insight

14:35 hugod: nDuff: line numbers fixed for clojure in zi-0.5.2

14:35 ohpauleez: You can also avoid explicit events and use a pubsub system, as found in Shoreleave, or a binding system like some other projects have been promoting

14:47 ro_st: ohpauleez: so i'm very keen to get stuck into cljs, and i'd love to do so with shoreleave as one of my guides. how's your demo stuff coming along?

14:47 in particular, i'm interested in seeing how the remotes and pubsub stuff interact

14:48 dnolen: amalloy: patches to printing welcome.

14:48 amalloy: cool. i'll put together a ticket/patch, probably this afternoon

14:48 ohpauleez: ro_st: I just pushed the early demo to the shoreleave org - it uses SOLR, JSONP (remotes), and pubsub

14:49 I'm going to make another demo of a pdf reading app

14:49 that lets you look up terms

14:49 (the demo app also uses the google maps decode service packaged in Shoreleave's services

14:49 dnolen: amalloy: I agree w/ fixing pr-str behavior, but you're saying str should change as well? I use str for debugging.

14:49 ohpauleez: )

14:50 amalloy: dnolen: str is probably fine

14:50 ro_st: ooooh

14:50 dnolen: amalloy: k, so patches should focus on correcting oversights around pr-str.

14:50 amalloy: i don't see what harm putting a # in front of str would do, but i'll look into what other folks usually do for str before i patch that

14:52 ro_st: ohpauleez: awesome!

15:18 jkkramer: is pushing to clojars timing out for anyone else?

15:20 nevermind

15:48 mmarczyk: dnolen: I've looked at the double doseqs in the "missing spaces" patch; I thought that's actually a pretty sane approach? I mean, at first glance it's easily avoidable at the cost of something ugly (checking a flag at each iteration to avoid 3 duplicated lines) or by introducing a macro (again, maybe not worth it?)

15:54 amalloy: mmarczyk: mind giving me a link? sounds like it's probably an issue that doesn't need much domain-specific knowledge so maybe i have useful input

15:54 mmarczyk: amalloy: sure, just a sec

15:54 dnolen: mmarczyk: seems like it would slow down printing considerably ... could be wrong about that.

15:54 mmarczyk: amalloy: http://dev.clojure.org/jira/browse/CLJS-319

15:54 cmajor7: is there a clojure (wrapper?) user/ account management lib (e.g. http://bit.ly/Pfssdp, http://janrain.com/, etc.. ) you can recommend? thx

15:55 mmarczyk: dnolen: really? hm, that's unfortunate

15:55 dnolen: it would be correct though :-P

15:55 dnolen: but yeah, that needs to be profiled

15:55 ro_st: cmajor7: there's github.com/cemerick/friend

15:56 dnolen: mmarczyk: reading / printing in CLJS has been without much consideration for perf. I think any new work even corrections should be perf conscious.

15:56 "has been done"

15:56 mmarczyk: dnolen: I'm hoping to wrap up some loose ends on cljs stuff this weekend... the new version of the bitmask patch for proto methods, splitting the :import patch into a "saner parse 'ns" patch and a separate :import patch based off that etc.

15:57 dnolen: so I'll be happy to look into the printing stuff too

15:57 dnolen: mmarczyk: cool!

15:57 mmarczyk: thx

15:57 mmarczyk: might be delayed a little, but not by more then a couple days (and I'm hoping I won't be)

15:57 so anyway, I generally agree about printing perf, it needs to be inquired into

15:58 but this could fix a bug and if we're possibly going to get a new release...

15:58 amalloy: it doesn't look to me like the patch at http://dev.clojure.org/jira/secure/attachment/11341/cljs-319.patch could make things any slower than they are now, did i miss something?

15:58 dnolen: mmarczyk: people like kovasb working on session have already into issues even when dealing with what looks like small amounts of data

15:59 mmarczyk: dnolen: true, though kovasb was still on 1011 fairly recently (last Saturday)

15:59 dnolen: amalloy: extra pr-seq call, pr-seq doesn't very seem fast to me.

16:00 cmajor7: ro_st: "friend" looks great. thank you. started reading the docs. I see that "Individual authentication methods (e.g., form-based auth, HTTP Basic, OpenID, oAuth, etc.) are implemented as workflows in Friend". do you know how easy it is to integrate popular kids/login methods (e.g. google, twitter, etc..)

16:00 mmarczyk: dnolen: so he should already experience a speedup just by moving to any recent version

16:00 dnolen: mmarczyk: oh haha

16:00 ro_st: cmajor7: unfortunately not. it's on my own to-do list

16:00 dnolen: mmarczyk: wow yeah.

16:00 mmarczyk: incidentally, session looks soooo aaawwweeesome 8-D

16:00 dnolen: mmarczyk: right, he's reliant on noir cljs version

16:00 mmarczyk: it does!

16:01 amalloy: dnolen: it's the same number of runtime pr-seq calls, right? one for each object in objs. it's just that the old way did N in a single place, while the new one does 1 in one place, and N-1 in another

16:01 cmajor7: ro_st: I see. that's still solves a lot of man hours :) thx for the reference

16:02 mmarczyk: dnolen: right... for which reason I'll be looking into patching noir-cljs so it's usable with fresh cljs if noone beats me to it -- anything to remove obstacles to session's progress basically :-)

16:03 dnolen: plus his talk was generally inspiring, so many things to dig into...

16:03 dnolen: amalloy: true, the hit is probably negligible. delaying applying that patch means that I can get a couple to look at it :)

16:03 mmarczyk: dnolen: incidentally -- you think your talk got recorded too? I got me hopes up again a bit :-)

16:03 dnolen: amalloy: mmarczyk: well if you all see no obvious improvements I'll apply it.

16:04 amalloy: i think the hit is actually negative - it should be marginally faster now

16:04 mmarczyk: dnolen: I'll definitely look into it again, but might not be able to before a release if it gets cut before the weekend

16:04 dnolen: mmarczyk: maybe, though my talk was very fast and kind of low-level :)

16:04 mmarczyk: but generally, yeah, I think amalloy's right

16:04 dnolen: sounds good to me :-)

16:05 would be cooler actually to be there, but still

16:05 dnolen: mmarczyk: yeah, kovasb prez was great as was hearing about reducers from rhickey

16:06 mmarczyk: dnolen: re: session's move to newer cljs, I've created cljs-334 (which I think is definitely a "no rush" thing) after talking to kovasb; dunno what the right approach is there

16:06 dnolen: yeah :-)

16:06 amalloy: quick, post the video so i can just play that instead of presenting on reducers myself tonight

16:06 mmarczyk: amalloy: :-D

16:07 rhickey also talked about reducers @ EuroClojure in an extra slot (one of the other speakers couldn't make it)

16:07 what a great talk :-)

16:07 dnolen: oh cool!

16:07 319 applied to master

16:08 mmarczyk: "we need to make it so you can make programs go faster just by buying a new computer again" (from memory, might be imprecise)

16:08 dnolen: great, thanks!

16:08 I think someone tweeted the actual quote

16:09 hiredman: giving each expr -> result pair an identity ala session's loop is something I hadn't thought about before, very interesting

16:09 dnolen: mmarczyk: edmund jackson's core.logic presentation was very good, watched that a couple nights ago.

16:10 rplevy: hugod: cool, I just saw your gist link, thanks!

16:10 mmarczyk: dnolen: it was! glad it's up, it's a great intro to core.logic

16:15 lynaghk: emezeske: ping

16:16 emezeske: lynaghk: pong

16:17 lynaghk: emezeske: looks like you're using hiccup in cljs a fair bit (based on github issues activity)

16:17 emezeske: lynaghk: I am.

16:17 lynaghk: have you tried Singult out at all?

16:17 emezeske: Haven't heard of it, reading...

16:18 lynaghk: Also, I'd be interested to hear your thoughts on extending for convenience. I think weavejester has closed a few hiccup issues on comlpexity grounds, but I'm leaning towards a bit more sugar.

16:18 emezeske: Are you shooting for pretty high compat with hiccup?

16:18 lynaghk: e.g., the :style key in an attribute map should accept a map value.

16:19 emezeske: no, more featureful and some additional semantics that only make sense on the clientside

16:19 (e.g., the unify construct)

16:19 weavejester: lynaghk: I don't think I closed that issue, but maybe I'm not remembering correctly.

16:19 emezeske: lynaghk: Hmm, I use hiccup a lot on the server side, am I going to be confused by switching between hiccup and singult template code?

16:19 lynaghk: weavejester: I was thinking of this one: https://github.com/weavejester/hiccup/pull/53

16:20 ro_st: weavejester! i've been struggling with org.mortbay.logger class not found exceptions when using your ring-serve library with leiningen 2 and swank-clojure. how do i resolve that issue when i encounter it?

16:20 lynaghk: emezeske: no, Singult should be a superset.

16:20 weavejester: lynaghk: Yeah, I don't think nested data attributes are worth it.

16:20 emezeske: lynaghk: Oh, okay, that's what I meant by compat -- I guess forward compat is what I meant?

16:20 lynaghk: As long as it's a superset, that's cool

16:20 weavejester: lynaghk: Especially if you then use a map for stylesheets

16:21 lynaghk: weavejester: special handling of stylesheets is something you don't want in Hiccup?

16:21 weavejester: (er, the :style attribute)

16:22 weavejester: ro_st: I haven't tested ring-serve with Lein2. I'm deprecating the library as soon as I can replace it with ring-server

16:22 ro_st: ah :-) thank you

16:22 weavejester: lynaghk: Special handling of stylesheets is a possibility, but if you have that *and* embedded data maps, you lose consistency

16:23 lynaghk: weavejester: how do you mean?

16:23 weavejester: lynaghk: e.g. {:data {:url "foo"}} = {:data-url "foo"}, but {:style {:color "red"}} != {:style-color "red"}

16:24 ro_st: gah. so much to learn

16:24 lynaghk: weavejester: yeah, but that's just a reflecting of the underlying semantics of the browser

16:25 weavejester: ro_st: I'll try and get ring-serve an equivalent working with Lein2

16:25 ro_st: i could just use ring-server instead?

16:25 weavejester: lynaghk: It's not really anything to do with th browser; it's sugar that depends on the attribute name, which feels complex.

16:26 ro_st: i just want to easily be able to start up ring from inside my emacs repl. ring-serve seemed to be the way to do it

16:26 lynaghk: emezeske, weavejester: My philosophy for Singult is that you should be able to represent all view state using real data structures. Since things like styles or properties (checked/unchecked) are part of the view, they should get first class representation in the data structure so you don't have to always be munging strings or whatever.

16:27 weavejester: ro_st: Yep. So I planned on replacing ring-serve with a more complete library. ring-server has a standalone Ring adapter runner, and one designed to be run by Lein. I'm also going to add one for REPL/Swank usage, but I haven't done that yet.

16:27 lynaghk: weavejester: yeah, I'm not saying it should be in Hiccup---I take it there are folks using Hiccup to do rendering of other XML things where you don't want to be caring about attribute names at all. Singult is targeting a different, more specific use case.

16:27 emezeske: lynaghk: So no more [:blah {:style "a bunch of text here"}] ?

16:27 weavejester: ro_st: Usually, "lein ring server" is sufficient for me so far, as it reloads source files automatically.

16:27 lynaghk: yeah. C2 has had special style handling since the beginning. It makes a lot more sense (to me) to say [:div {:style {:width (my-fn ...) :background-color (another-fn ...)}]

16:28 emezeske: lynaghk: that is tasty!

16:28 ro_st: weavejester: if i use lein ring server, then how do i repl into that process?

16:28 lynaghk: likewise, {:properties {:checked? true}} for checkboxes. I'm also thinking about having :class accept sets

16:28 since that's semantically what classes are about anyway.

16:28 emezeske: nice.

16:29 well, I will definitely try switching my project to singult as an experiment

16:29 weavejester: ro_st: You can't, so it isn't as good, but sometimes it's good enough. :)

16:29 emezeske: during my next library-investigation phase :)

16:30 lynaghk: My only concern is that it'll be tricker to share the same view code between the client and the server (e.g., render visualizations using hiccup). Then again, since the whole idea is that it's just data structures I guess I just need to write something to walk the element and flatten out all of the sugar.

16:30 ro_st: weavejester: ah :-) ok. i'll stick to the in-repl way then because i use midje-mode to code and the browser to verify and test from the client-side codebase (which isn't clojure or clojurescript based)

16:30 lynaghk: emezeske: definitely let me know if you run into any issues or have suggestions/concerns with sugar syntax.

16:31 weavejester: lynaghk: Maybe you just need a "macro-expand" equivalent that turns a data structure into pure Hiccup.

16:31 emezeske: lynaghk: Will do. Thanks for the heads up about singult!

16:32 lynaghk: weavejester: yeah, that's basically what it would be. Treating data as data is just so nice...

16:32 weavejester: lynaghk: That sounds like a good idea, then :)

16:32 lynaghk: emezeske: sure thing; I'm all about self-promotion, bro =P

16:32 ro_st: how did all you clever chaps survive before clojure came along? :-)

16:33 rplevy: hugod: this is neat, just to see another example of cemerick/friend in use. what I am working on right now is figuring out a good solution for the "authentication server" side of the oauth transaction.

16:33 weavejester: ro_st: I'll try and get a ring.server.repl namespace up soon as a better replacement for ring-serve.

16:34 ro_st: that'd rock :-)

16:34 right now i have the (use 'ring.util.serve) and (start app 8080) in a (comment) in my main clj file which i just C-x C-e when i want a server up

16:35 rplevy: what example is that? i'm about to dive into friend, some example code would be most welcome

16:36 rplevy: ro_st: hugod posted a gist link earlier, it was https://gist.github.com/2839891

16:36 hugod: rplevy: ah, misinterpreted what you were looking for...

16:36 photex: hello all, attempting to switch to leiningen 2.x

16:36 expected trouble, but I'm not sure how to debug a couple of issues

16:37 for starters, I'm not able to jack in, and when trying to 'lein search' it couldn't download the repo from clojars

16:37 weavejester: ro_st: Yeah, I was going to pull that into "ring-server". It would work the same way, but it would be consoladated with all the other server-starting code used by lein-ring and such.

16:37 photex: not sure if these issues are related, because when trying to jack in, the error is that the artifact for lein-swank 1.4.4 couldn't be found

16:38 ro_st: weavejester: awesome. i'm watching both ring-serve and ring-server now

16:38 photex: oh snap, sorry, I meant to report this on #leiningen

16:38 weavejester: photex: Do you have lein-swank as a plugin in your profile.clj?

16:38 photex: I do

16:39 ok

16:40 I just noticed that I hadn't removed 'swank-clojure' from profiles.clj

16:40 so jack-in works!

16:40 search does not though

16:40 I'll move that to #leiningen

16:40 rplevy: curious if anyone who has used pelle/clauth knows if timestamp / nonce to prevent replay is implemented, or how that would be implemented. I don't see anything obvious in the source.

16:44 actually I bet the "Expirable" stuff deals with this, need to read the code in more detail

16:54 Cheiron: Hi, properly this is a stupid question but how to create a bitmap in clj?

17:00 rimsky: Cheiron: you can create an image with (BufferedImage. 100 100 BufferedImage/TYPE_INT_ARGB)

17:02 Cheiron: I mean http://en.wikipedia.org/wiki/Bit_array , my bad

17:04 gfredericks: the multi-arity version of <= is quite useful for testing sorts

17:05 else you'd have to (every? #(<= (first %) (second %)) (partition 2 supposedly-sorted)) which is stupid

17:05 rimsky: Cheiron: oh, no idea then :-)

17:06 Cheiron: np. appreciate your help :)

17:13 cljs_newb_24598: anyone know if apple is goign to release a future 17" laptop?

17:14 not sure if I want to buy an existing model .... or wait until a retina 17"

17:16 brehaut: nobody *knows* anything about apples future releases, best you'll get is an educated guess

17:16 cljs_newb_24598: where can i get these educated guesses?

17:16 brehaut: gruber et al

17:19 i think the summary is that the 17" MBP is one of the lowest volume units apple sell, lower even than the Mac Pro. The mac pro is getting an unspecified update in the coming year, so maybe they'll do something for the 17" too.

17:19 If the 17" does get a retina screen it will probably be the very last mac to do so though

17:21 amalloy: /part #mac-rumors

17:21 brehaut: hah sorry

17:22 mich2: so

17:23 so last time i needed to get a REPL runing on my mac , there where a lot of suggestions but finally this one worked for me: https://github.com/arthuredelstein/clooj

17:29 yonatane: Is there in clojure the ml style dispatching according to argument value?

17:30 brehaut: yonatane: thats coming in core.match but its not ready for use just yet

17:31 yonatane: will it just be part of defn?

17:31 brehaut: no

17:31 yonatane: eventually, let's say?

17:31 oh

17:32 cgag: isn't that what multimethods do?

17:32 brehaut: not quite

17:32 multimethods are open for extension

17:33 ml style algebraic type based pattern matching is resolved at compile time

17:35 and also allows for easier arbitrary destructuring in the match clause

17:37 yonatane: is there another way right now to avoid (if) for detecting stop conditions etc.?

17:39 brehaut: i believe the answer is yes, but you'd probably need to be more specific about what you are trying to do for someone to give you a useful suggestiion

17:40 nDuff: yonatane: Do you mean error handling? Clojure *does* support exceptions.

17:41 yonatane: an example would be to handle an empty string one way and do some other thing if it's not empty, but not bothering the caller about it, and not using if.

17:42 dnolen: yonatane: not really, sounds like you want pattern matching. core.match mostly works if you're not doing anything serious. fns will never probably never get official pattern matching sugar, but easy to make work w/ core.match.

17:42 zakwilson: I love it when I check to see if a project is stil active and see that the last commit is 8 minutes ago.

17:42 xclite: zakwilson: usually a reassuring feeling, I agree

17:43 dnolen: yonatane: predicate dispatch would get you everything that pattern matching does + open extension - but it's challenging to implement well.

17:43 amalloy: possibly worse: there's a commit every 8 minutes, and each one has the word "fix" in the commit message

17:43 nDuff: yonatane: "not using if" meaning _you_ not using if, or _the caller_ not using if?

17:43 yonatane: ...I mean, you could certainly write a macro that implicitly wraps things in output checks and throws exceptions, or somesuch.

17:43 yonatane: nDuff: me not using if

17:44 zakwilson: amalloy: it was actually "beta7", and you probably know what project I'm talking about now.

17:44 amalloy: hah

17:44 yonatane: nDuff: and of course the user shouldn't

17:44 nDuff: yonatane: ...but _the macro_ would be implicitly adding a conditional... I mean, *something* has to.

17:44 amalloy: zakwilson: i was at once hoping and worrying you might mean me

17:44 nDuff: yonatane: even Clojure's "and" and "or" macros turn into uses of "if"; it's not really something you can (or should try to!) get away from.

17:44 amalloy: because i totally just pushed a rebased version on top of beta7 on account of forgetting something and figuring nobody ever uses it

17:44 zakwilson: amalloy: heh. I have no idea at this point whether I should actually use jiraph, but it's nice to know it's active.

17:45 hansengel: Hi, is there any way I can override the vals function for a record? From what

17:45 I see the function is declared in RT.java rather than an interface

17:46 amalloy: hansengel: no. records are maps, and if you don't want their map-like behavior you have to use something else

17:47 yonatane: nDuff: Sure. I don't mind hiding it once in a macro

17:48 amalloy: zakwilson: jiraph is likely to be active for the forseeable future. it's an important part of the company's core product, so whenever we need new low-level features we open up jiraph

17:48 yonatane: dnolen: by predicate dispatch you mean multimethods or what core.match does?

17:48 hansengel: amalloy: Okay, I think I'll try something with defmulti. Thanks.

17:49 dnolen: yonatane: multimethods are multimethods - not predicate dispatch.

17:49 yonatane: core.match uses a OCaml algorithm to do ML style pattern matching, but the goal is to get predicate dispatch - think pattern matching + multimethods.

17:50 zakwilson: amalloy: cool. What should I read to get an idea of whether it's appropriate for my project?

17:52 rplevy: is clauth the only lib implementing the authentication server side of the OAuth2 spec or am I just not finding the other one(s)?

17:53 amalloy: zakwilson: ninjudd sez: it's probably not useful for you unless you want to get involved at a development level and read the source - we haven't written a ton of documentation for it because it keeps changing

17:54 ivaraasen: amalloy: I read some of the jiraph code yesterday. great learning experience

17:55 zakwilson: amalloy: I did a little of that a year ago, but didn't keep up with it because I didn't have something to use it for.

17:55 amalloy: it has pretty good docstrings, but no sort of "guiding README"

17:55 zakwilson: amalloy: I suppose I'll read some source.

17:56 amalloy: hit us up in #flatland if you have questions

17:56 ninjudd: amalloy is going to write an amazing README eventually if someone else doesn't beat him to it

17:56 amalloy: i've only been working on it for a year, man. READMEs take at least a decade to simmer

17:56 brehaut: "RTFS"

17:56 zakwilson: Oh, I'm not in #flatland. I used to be, I think.

17:56 brehaut: done

17:57 amalloy: brehaut: "If you're reading this file, you're not hardcore enough to use this library"

17:57 ninjudd: if you notice, the current README is very old. "The easiest way to use Jiraph in your project is via Cake."

17:57 zakwilson: Yeah, I thought cake was dead.

17:57 ninjudd: it is

17:57 brehaut: amalloy: lol

17:57 amalloy: unlike clojure/core, jiraph welcomes pull requests! someone fix that readme!

17:58 ivaraasen: didn't cake and leiningen merge?

17:58 ninjudd: not quite merge

17:58 rplevy: completely unrelated question: do you think it is helpful or annoying to issue a pull request that fixes whitespace, badly formatted parens, replace 'use's with 'require', move demo code to test path etc? these things are somewhat well established conventions and would probably be good for any lib in my opinion...

17:59 ninjudd: more like cake was eaten by lein

17:59 gerunddev: Any chance someone currently in here attends the Seattle seajure group?

17:59 zakwilson: Helpful, unless they ignore you the first couple times you do it. Then it becomes annoying.

17:59 rplevy: zakwilson: :)

17:59 Raynes: technomancy: Yo

18:00 ToxicFrog: rplevy: I would consider it helpful

18:01 Raynes: zakwilson: I actually just upgraded jiraph to lein2 like an hour ago.

18:01 So we're definitely phasing cake out.

18:02 It has been hard because we have lots of other things to do and, well, cake works even if we don't maintain it anymore so it was hard to get motivation.

18:02 rplevy: ToxicFrog: then I will do this for clauth because it looks to be useful, just very messy

18:02 ToxicFrog: How hard is lein to use? Is it something I could reasonably use for a small command line project, or is it more like ant/maven where it's really meant to be the backend for an IDE and not something the user ever touches directly?

18:02 amalloy: rplevy: if my repos had any bad whitespace or paren errors i would appreciate a pull. if you turned use into require i'd decline the pull request

18:03 rplevy: amalloy: heh :)

18:03 wmealing: lein is easy imho

18:03 amalloy: gerunddev: i'm willing to bet technomancy does

18:03 arrdem: +1 to lein being easy

18:03 Raynes: amalloy: That's why I pingeded him.

18:03 dnolen: ToxicFrog: it's easy and will save you lots of time.

18:03 Raynes: Leiningen is the easiest build tool since build tools were invented by technomancy back in '06

18:04 wmealing: and has awesome plugins for when you need to do odd things

18:04 rplevy: I thought the persistent jvm in cake was nice (I didn't use cake, but I liked the idea), is that somehow finding its way int lein?

18:05 amalloy: rplevy: it was nicer in theory than in practice anyway

18:05 zakwilson: You should use lein for any Clojure project. It's almost always easier to use it than not use it.

18:05 gerunddev: amalloy: Thanks, has he been active recently?

18:05 amalloy: he never sleeps

18:05 hiredman: technomancy generally leads the meetings

18:06 Raynes: rplevy: The hope is that jark would be suitable for integration with lein.

18:06 ToxicFrog: dnolen: I'll give it a shot for my next project, then!

18:07 Raynes: rplevy: As a user and developer of cake, I'm not the least bit interested in seeing any persistent JVM stuff in lein. My coworkers might feel differently, but it caused me nothing but issues when we used cake.

18:07 hiredman: gerunddev: I attend sporadically (will be missing today's)

18:07 rplevy: Raynes: oh right, and I guess no lein interactive mode in lein 2 either

18:07 Raynes: rplevy: technomancy has said that if we ever do actually get jark or something, it'd be optional and off by default which I would support.

18:07 rplevy: I just happenned to notice it was missing the other day

18:07 gerunddev: hiredman: I was hoping to confirm time / place and see if I needed to bring anything.

18:08 rplevy: Raynes: I guess they could use nailgun, jark would probably be better

18:08 hiredman: gerunddev: technomancy sent a message to the seajure mailing list yesterday or the day before

18:09 https://groups.google.com/forum/?fromgroups#!forum/seajure

18:09 amalloy: is today the SF meetup too? i don't know how all the west coast folks happened to settle on first thursday of the month

18:10 brehaut: its the hamilton meetup today. im having a coffee myself

18:10 hiredman: gerunddev: I am not sure what he has planned, but generally you don't need to bring anything, maybe your laptop?

18:10 gerunddev: hiredman: perfect, thanks for the info!

18:10 solussd_: how can i "hold on" to all the current dynamic bindings when a lazy-cat's second arg is using (some) of them?

18:12 dnolen: solussd_: lazy seqs & dyn binding don't really work well together.

18:12 solussd_: im seeing that. :) i'm lazily generating ranges of revisions from a call out to the 'git' command, but I need to carry the binding of *sh-dir* with me

18:13 amalloy: &(doc bound-fn)

18:13 lazybot: ⇒ "Macro ([& fntail]); Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place."

18:18 ivaraasen: life is pretty good right now. just me, Emacs, nicotine and some fresh coffee

18:20 rplevy: amalloy, Raynes, ninjudd: I've been sticking some bits of code into this lib https://github.com/drakerlabs/mostly-useful if you see anything you want to add to useful, let me know

18:20 or just do it

18:20 or let me know and I will open a pull request

18:20 probably nothing you want though

18:22 amalloy: rplevy: we already have within; it's called returning

18:22 also your docstring is a little misleading, because you say "first" in both places

18:22 rplevy: oh cool, I will get rid of that one

18:23 not saying within is a great name but isn't "returning" a little non-lispish in its terminology?

18:23 amalloy: if you mean it's not specifically named prog1, then yes

18:23 rplevy: haha

18:24 amalloy: but c'mon, (returning (the-result) (do some side effects)) - so self-documenting

18:24 rplevy: I guess I tend to think of consuming/producing or "evaluating to" but I guess we all know what return means when we hear it

18:25 it's maybe too pedantic to avoid that word

18:25 ToxicFrog: I can't find (returning) in the API index?

18:25 rplevy: ToxicFrog: it's in flatland/useful

18:26 ToxicFrog: Aah.

18:26 hiredman: do1!

18:26 amalloy: say, what does scheme call it? does it exist?

18:26 hiredman: http://www.cs.utexas.edu/~novak/schemevscl.html

18:27 amalloy: so, no?

18:27 hiredman: may depend on the scheme?

18:32 nelson-: good night everyone! I'm having a little issue with emacs and clojure and I am hoping you guys can help me

18:33 everytime I use C-x C-e to eval an expression and that expression has some kind of error, my emacs crashes for a while and starts filling with sldb buffers

18:34 I'm using emacs-prelude with clojure-mode and lein-swank

18:38 solussd_: amalloy: this pretty much goes through my entire thinking process… and ended with an elegant solution. :) I now have a bound-lazy-cat (most awesome name ever for a function!) thread-

18:38 amalloy: http://kotka.de/blog/2009/11/Taming_the_Bound_Seq.html

18:42 taufiq: reading bytes from an array and converting to numbers - am I better sectioning off this functionality and doing it in java?

18:44 hiredman: taufiq: wrapping the array in a ByteBuffer makes that easy if that is what you are looking for

18:45 taufiq: could be, thanks hiredman

18:46 i have a crude implementation in clojure, but i'm calling it in a tight loop and performance is underwhelming

18:47 Cheiron: Hi, would you please have a look at: http://pastie.org/4207040 I'm look for the last destructuring

18:48 what is the destruc of target-data should be?

18:57 Raynes: Anyone here that uses middle click paste and hates things that it doesn't work with?

18:59 Cheiron: Raynes: Thanks God you are hear. If you have a couple of seconds, would you please check my question?

18:59 *here

18:59 Raynes: Hahahaha

18:59 I've never had someone so happy to see me.

18:59 Cheiron: well, I'm :)

19:00 kindly if you can help to destruct the last map http://pastie.org/4207040

19:00 brehaut: Cheiron: using symbols as map keys is a bit quirky. if you used :keywords, you wouldnt need to quote the map

19:00 Cheiron: I will switch to keywords, it is experiment now

19:01 I can't figure out how to destruct target-data

19:01 brehaut: {:keys [hits duration]}

19:02 (once you switch to keywords. currently its {:syms [hits duration]} i think)

19:02 Raynes: &(let [{:syms [foo]} {'foo 0}] foo)

19:02 lazybot: ⇒ 0

19:02 Cheiron: :syms isn't working , i'm getting nil

19:03 hiredman: because you went too deep

19:03 wmealing: inception.

19:04 hiredman: replace target-data in [target-id target-data] with the destructure

19:04 Raynes: wmealing: Hahaha

19:05 Cheiron: hiredman: replace it with {:syms [hits duration]} ?

19:05 hiredman: sure

19:06 nDuff: ...bizarre... cljs.core.PersistentHashSet.fromArray isn't present in my ClojureScript REPL...

19:06 (compiled with optimizations turned all the way off)

19:08 Cheiron: destructuring has performance penalties?

19:08 hiredman: compared to what?

19:09 wmealing: not having to destructure

19:09 Cheiron: I don't know really, just a question popped out of my head

19:10 brehaut: destructurings get compiled down to the same code to you would have written by hand

19:10 hiredman: wmealing: you don't have to

19:10 Cheiron: Oh, impressive!!

19:10 hiredman: brehaut: that is not strictly speaking true

19:11 they get compiled to the most generic code you would write by hand

19:11 brehaut: right

19:11 Cheiron: it is working now!! thank you all . truly Inception xD

19:11 hiredman: which in theory can be made faster, and in some cases the faster case is what you will most likely write by hand (:foo x) vs. (get x :foo) etc

19:12 if x is a record (:foo x) will be faster

19:12 brehaut: ah of course

19:12 hiredman: but it is all sort of corner case details

19:13 brehaut: hiredman: would .foo be faster again for records?

19:13 hiredman: I think it would only be noticeably faster if x was type hinted

19:13 brehaut: that makes sense

19:13 thanks

19:14 hiredman: without the type hints :foo may end up being faster, because :foo has an ic, but .foo does not

19:14 Cheiron: how do you know all of this? :/

19:14 brehaut: sorry, IC ?

19:14 hiredman: inline cache

19:14 brehaut: ah of course

19:14 hiredman: I read the compiler

19:14 Cheiron: :'|

19:15 hiredman: (and I have a branch somewhere that adds an inline cache for reflection)

19:17 amalloy: last time i tested this, (:foo record) was several hundred times faster than (.foo record), and (.foo ^Myrec record) was like 50% faster than (:foo record)

19:21 hiredman: clojure/core seems to range from 0 interest for speeding up reflective calls to being actively hostile to it

19:23 Cheiron: "if x is a record (:foo x) will be faster" records lookup is faster than maps lookup?

19:23 hiredman: if :foo is a field in the record

19:24 wmealing: amalloy, to a newbie like myself.. isnt one a keyword lookup and the other a class function ?

19:24 hiredman: turns into jvm classfield access

19:25 wmealing: the latter, ^ ... i dont know what that is.

19:25 dynamic ?

19:25 metadata.. *thinks*

19:28 ToxicFrog: If (.foo record) compiles into classfield access, I'd expect that to be quite fast

19:29 hiredman: it will be reflective access unless the the record is type hinted

19:29 ToxicFrog: Aah.

19:29 It'd be nice if we could get some type inference going.

19:29 hiredman: for (:foo a-record) the compiler actually generates a little cache at the call site

19:30 brehaut: there is some type inference going on i think?

19:30 amalloy: ToxicFrog: that already exists...?

19:30 hiredman: to turn it in to a non-reflective (:foo a-record)

19:30 brehaut: just not as pervasive as HM

19:30 hiredman: er

19:30 ToxicFrog: Oh.

19:30 hiredman: (.foo a-record)

19:30 ToxicFrog: More type inference, then~

19:30 hiredman: and hopefully the jvm will inline the cache away

19:30 amalloy: it sounds like you might intend "type inference" to mean "guess what i'm thinking"

19:30 clojurebot: deftype is see datatype

19:31 brehaut: ~datatype

19:31 clojurebot: datatype is see datatypes

19:31 brehaut: ~datatypes

19:31 clojurebot: http://www.assembla.com/wiki/show/clojure/Datatypes

19:31 lazybot: Assembla is deprecated. Use http://dev.clojure.org

19:31 hiredman: "guess what I am thinking" is the whole point of the inline cache at the callsite

19:31 brehaut: well thats a rat hole

19:32 ToxicFrog: amalloy: well, the impression I get from this discussion is that you'd need to ^tag every access site, you couldn't just ^tag a let surrounding the accesses

19:32 amalloy: i'm not sure what makes you think that

19:32 it's certainly not true

19:32 hiredman: or why you would tag instead of using :foo

19:33 amalloy: i think it's fine to use tags specifically in auto-generated code, but if you're writing it by hand hiredman is right that :foo is better. less visual noise, very little slowdown, and no chance of accidentally going really slow if you mess up the tag

19:34 hiredman: and you should know what needs to be fast in your code and what doesn't, profile what needs to be fast, and based on that tune it to be fast

19:36 which in many cases is about the algorithmic complexity, allocation, and i/o patterns

19:37 brehaut: ~scale

19:37 clojurebot: Excuse me?

19:38 hiredman: if you're calling .getBytes on large strings in a tight loop, you're gonna have a bad time

19:45 Cheiron: "if you're calling .getBytes on large strings in a tight loop, you're gonna have a bad time" why?

19:46 hiredman: strings are immutable, .getBytes returns a mutable byte array, so a copy must be made

19:48 Cheiron: eye c

19:52 amalloy: technomancy: was there something wrong with clojars? it was acting like https://gist.github.com/b57c1ae0cf5e96f2c9ee for a few minutes, although now it seems to be fine

19:53 oh, i see. i gave scp a bad filename, which...somehow caused it to send a message that the clojars scp daemon didn't understand?

19:55 lpetit: Look ma, textmate-style completion in Counterclockwise: http://t.co/LfTlP7zW , http://t.co/mphFqixS , http://t.co/9tOcVaIp !!

19:56 Frozenlock: Is the version we input in the project.clj ("1.0.0") available as a variable inside the other clj files?

19:56 S11001001: Frozenlock: yep

19:56 Frozenlock: as a system property

19:56 Frozenlock: Tell me more :)

19:57 Raynes: Any Clojurians with easy access to a development environment on Windows want to help me out with something Windows-specific?

19:58 augustl: think I'll use mongodb instead of datomic.. The documentation for datomic is sparse, and it's 0.1 after all.

19:58 </randomobservation>

19:59 hiredman: datomic hasn't had any headline grabbing horror stories...

19:59 Raynes: Actually, never mind. brehaut just reminded me I don't care about Windows.

20:00 talios: brehaut++

20:01 hiredman: https://twitter.com/hiredman_/status/218742772713267200

20:02 oh gawd, so good

20:02 nDuff: Why doesn't the following return an empty set? (let [test (atom #{:a :b})] (swap! test disj @test) @test)

20:03 arohner: disj takes single values?

20:03 Frozenlock: S11001001: Got it, (System/getProperty "my-project-name.version") . Thanks!

20:03 nDuff: arohner: Doesn't swap have an implicit apply? ...ahh.

20:03 augustl: hiredman: haha

20:04 arohner: ,(let [test (atom #{:a :b})] (swap! test #(apply disj % @test)) @test)

20:04 clojurebot: #{}

20:06 brehaut: ,(use 'clojure.set) (let [t (atom #{:a :b})] (swap! t difference @t) @t)

20:06 clojurebot: nil

20:06 brehaut: ,(do (use 'clojure.set) (let [t (atom #{:a :b})] (swap! t difference @t) @t))

20:06 clojurebot: #{}

20:15 augustl: isn't there a CLR version of Clojure? I recall hearing about that.

20:16 just found https://github.com/clojure/clojure-clr ;)

20:46 Frozenlock: Hmm... When I uberjar one of my projects, System/getProperty seems to return nil as the project version. Normal?

20:48 amalloy: dnolen: i'm poking around at my lvar patch. do you actually use str for debugging, or do you use pr-str (eg, by just evaluating it at the repl)? my dilemma is whether to make pr-str human-friendly, eg #<lvar:x_113>, or re-readable, eg #clojure.core.logic.LVar["x_113" 113701324 nil {:name x}]. the latter seems better if re-reading makes sense for lvars, and if you don't need that to look nice for your debugging style

20:49 dnolen: amalloy: I thought the point of pr-str was to re-readable

20:49 amalloy: I use println + str for debugging

20:50 amalloy: welllll, pr-str should be readable, but it's okay to use #<...> to indicate "i don't intend this to be readable". for example ##(pr-str (java.util.ArrayList. [1 2 3]))

20:50 lazybot: ⇒ "#<ArrayList [1, 2, 3]>"

20:50 S11001001: Frozenlock: that lein thing is not part of java, you don't get to keep it

20:51 amalloy: if you think reading lvars makes sense, i'll make them readable

20:51 S11001001: check your jar for a manifest file; it may contain the version

20:52 Frozenlock: S11001001: Can I simply use a macro for this? I think they evaluate at compile time...

20:52 S11001001: Frozenlock: you can, but if it breaks, you get to keep both pieces

20:52 in other words, drop word "simply"

20:54 dnolen: amalloy: I don't see the problem ... but I should probably think about it some more.

20:55 amalloy: yeah, it seems to me like it's probably correct to be able to read them, but i haven't used them much and they seemed like they might be "internal" or "stateful" in some way

20:57 nDuff: Should dynamic bindings for functions work in clojurescript?

20:57 dnolen: nDuff: it should.

20:58 nDuff: Hmm.

21:00 amalloy: dnolen: do you want a jira ticket with a patch, or a new branch in the core.logic repo, or...?

21:01 dnolen: amalloy: jira ticket, thx

21:01 amalloy: I only really use branches for big changes, or changes that will take some serious free time to assess

21:04 nDuff: Hmm; looks like what I'm seeing is a usage issue; doesn't work as I expect with upstream clojure either.

21:06 amalloy: dnolen: looks like lvars aren't value-comparable with = at the moment; would you like me to add that as well? i found out when attempting to test that (= lv (read-string (pr-str lv)))

21:07 dnolen: amalloy: hmm, you can't compare lvars

21:08 amalloy: actually, it looks like you tried to implement .equals but did it in an inconsistent way

21:09 dnolen: amalloy: equals I think works the way it does after some consideration.

21:10 amalloy: dnolen: you're asserting that x's name is identical? to y's name, which will only happen if x is identical to y; you might as well just use that identical test if that's the goal

21:10 dnolen: amalloy: no

21:10 amalloy: no, that's not true

21:10 i'm curious why identical? rather than =, then, i suppose

21:10 dnolen: amalloy: yeah I thought about the possibily of reading.

21:11 amalloy: just perf conscious I guess.

21:11 Raynes: dnolen: I think you should rename conso to gonzo. Sounds the same, but looks cooler.

21:11 amalloy: = short-circuits pretty fast if they are identical

21:11 dnolen: Raynes: noted ;)

21:12 amalloy: maybe, but this is also used in hash lookups too.

21:12 amalloy: *nod*

21:12 so you'd like me to leave .equals alone, and make some different assertion in the test?

21:13 dnolen: amalloy: don't this so that test should work.

21:13 amalloy: ?

21:15 dnolen: amalloy: should probably just remove the print-method in this case ... since deftype have a default print rep that works.

21:15 amalloy: dnolen: LVars are created like (LVar. (str foo bar) ...), so their names are not interned. when you read from a string, the strings that get returned are interned, so they're not identical? to the original object

21:16 dnolen: amalloy: so another argument for =

21:16 amalloy: and no, deftypes don't have a default print rep; that's only defrecords

21:17 or rather, the default rep for deftypes isn't readable; it's #<LVar (str lv)>

21:17 dnolen: amalloy: sorry I'm a bit deep in some other core.logic stuff, can you open the ticket with the patch you have with these notes?

21:17 amalloy: okay

21:18 dnolen: amalloy: thx mch

21:21 amalloy: http://dev.clojure.org/jira/browse/LOGIC-43 opened, speculative patch attached

21:22 dnolen: amalloy: excellent

21:38 gfredericks: I just mashed together an undocumented lib called vcr-clj; was it a bad idea?

21:38 it's like the ruby lib, but without hardly any features

21:39 wingy: well documented libs are never a bad idea

21:46 mdeboard: What's the latest version of SLIME that is operable with clojure-mode? I'm having some interop issues between SLIME 20100404 and swank-js/slime-js

21:55 scottj: mdeboard: I don't think there's a version that works with swank-js and swank-clojure

21:56 mdeboard: scottj: Yeah I don't think so either. swank-js requires SLIME 2011112 or later, apparently. :\

21:56 what a shame

21:59 zakwilson: Somebody should fix that.

22:00 * zakwilson considers taking a look.

22:00 mdeboard: Yeah but in what direction do you fix :P

22:00 zakwilson: Update swank-clojure to work with newer SLIME.

22:01 mdeboard: Ah

22:01 zakwilson: The default should almost always be supporting new stuff.

22:01 mdeboard: That would be smart because apparently package.el is maintaining 20100404 because of clojure-mode interop

22:02 Raynes: zakwilson: Convince the SLIME people to make real releases.

22:03 brehaut: CVS isnt real releases?

22:03 zakwilson: Raynes: I don't think they're going to do that, especially not to support Clojure.

22:03 Raynes: What does it have to do with Clojure?

22:04 It has to do with not being completely insane and making your software impossible to follow.

22:05 zakwilson: Old-time CL people seem to be hard to sell on any new Lisp. SLIME works for its creators, so why should they want to improve?

22:06 Raynes: Isn't that the mindset I'm arguing?

22:06 mdeboard: What's blocking the road to updating swank-clojure?

22:06 zakwilson: Actually, SLIME issues have kept me from using CL much as it was too annoying to have working CL and clj at the same time.

22:06 mdeboard: Well, in a way this is somewhat a relief to hear because it means I'm not an idiot.

22:07 zakwilson: Anyway, regardless of who's *right*, updating swank-clojure to work with newer SLIME seems like the only workable path forward.

22:07 * mdeboard has been banging his head into slime & swank all night

22:07 madsy: Apropos clj, how can I access properties from javascript objects?

22:07 foo.bar can be a constant

22:08 zakwilson: Perhaps lighttable will eventually save the day.

22:08 madsy: (. foo bar) is obviously a function call.

22:08 brehaut: (-foo bar)

22:09 kovasb: anyone tried using CCW lately?

22:09 I haven't played with it in a long time but it seems to be getting new releases

22:09 alandipert: kovasb: i have. nice presentation re: mathematica btw!

22:09 kovasb: thanks!

22:09 lynaghk: kovasb: yeah dude, it was boss.

22:09 kovasb: :)

22:10 its all about traveling to foreign computation lands and bringing stuff back

22:10 alandipert: kovasb: but yeah, it's updated pretty regularly. i have been using it to get people started at clojure training and it's been working well

22:10 lynaghk: I'm still pissed at my collegate self for not recognizing wtf was going on in Mathematica. Funny story though, writing a symbolic algebra system in Common LISP was my first large programming project. 90% motivated by Mathematica's terrible TeX output.

22:10 alandipert: kovasb: i'm too far gone in emacs land to ever want to switch to it, but as clojure IDEs go, it's pretty nice

22:11 kovasb: alandipert: cool. Im ok with emacs, but I just don't like the text editor (paredit aside)

22:11 alandipert: just the way text selection works and stuff.. annoying

22:11 brehaut: madsy: sorry (.-foo bar)

22:11 kovasb: lynaghk: thats a funny connection

22:11 lynaghk: alandipert: that seems to be a big problem. I've been too-far-gone in emacs to ever really think deeply about alternative IDEs/REPL environments (save YMacs, which is emacs in JavaScript).

22:11 kovasb: lynaghk: most people think mathematica is a big calculator, so its understandable

22:12 lynaghk: I'm sure the instructors themselves had no idea

22:12 lynaghk: kovasb: yeah. Parsing symbolic algebra really hit home that whole "code is data" thing.

22:12 * zakwilson considers Emacs and SLIME the only remotely sane modern programming programming environment. It's terrible, but nothing else is really usable, so I use it.

22:12 kovasb: lynaghk: its also pretty nice to not have to quote symbols all the time

22:12 alandipert: i've been really obsessed with structural editors and storing code in datomic for awhile, but have nothing to show

22:12 part of my "data all the things" learning clj spiral

22:13 zakwilson: I have not used datomic at all.

22:13 lynaghk: alandipert: I take it you saw that Microsoft research video from the 90's that twittered around a few weeks back?

22:13 alandipert: if i switched, it would be to something like that (or to whatever kovasb has cooking)

22:13 kovasb: I'm definitely keen on storing code in datomic as well

22:13 have yet to find time to play with datomic tho

22:13 alandipert: lynaghk: yeah

22:14 zakwilson: It seems like a cool idea, but I'm not sold on database-as-a-service.

22:14 kovasb: alandipert: https://github.com/jonase/scape

22:14 alandipert: kovasb: excellent!

22:14 kovasb: zakwilson: i'm not sold on database not as as service :)

22:15 lynaghk: alandipert: a lot of that stuff was over my head, but even on the parts I could grasp all I want is a semantics-aware git.

22:15 kovasb: zakwilson: one of the comforting things about datomic is that it won't overwrite data.. fewer ways to bork yourself

22:15 zakwilson: kovasb: I'm not sold on a database.

22:15 kovasb: lol

22:15 zakwilson: Seriously. I hate everything.

22:15 alandipert: kovasb: me neither, but in my lifetime i want to work in an environment that doesn't involve files with strings

22:16 kovasb: i suppose i could just switch to mathematica ;-)

22:16 zakwilson: I think what I want is something like Mongo without the part where it sucks.

22:16 kovasb: alandipert: but it is its own platform!

22:16 :0

22:16 alandipert: zakwilson: lol

22:16 kovasb: alandipert: mathematica is file based as well, which leads to problems

22:16 zakwilson: Mongo ate my data.

22:16 kovasb: alandipert: like, 100 mb files which are impossible to open

22:16 alandipert: my dream is code in time-aware databases everywhere, stored as data and queryable, with a structural editor

22:16 lynaghk: kovasb: like powerpoint, but with more maths.

22:17 kovasb: alandipert: in session we will have references to s3 buckets etc for embedding data

22:17 alandipert: "clippy: that function you wrote is a 43% structural match for somethin in core.match, shall i substitute what you type with it and run your tests? [y/n]"

22:18 kovasb: lynaghk: right. in mathematica you can open up the file and try to fix the syntax error/corruption at least, though I've cursed like hell during the entire operation it would work

22:18 lynaghk: alandipert: core.logic + generative testing and your program writes itself.

22:18 kovasb: alandipert: doable

22:18 zakwilson: Haskell has a search-by-type-signature service.

22:18 alandipert: well, i don't want this system to take my job... but it should be pretty good ;-)

22:19 kovasb: zakwilson: is it integrated into editors?

22:19 alandipert: kovasb: i think so too. also once we store code as real data, we can have lower-level dependencies. expressions or definitinos instead of files

22:19 kovasb: we need a big datomic database of all the analyzed clojure code on github

22:19 yup

22:20 its also interesting to think of selling commercial packages in the same way

22:20 like, the equivalent of adwords for function suggestions

22:20 alandipert: yeah

22:20 kovasb: once you have an editor that understands pieces of your program

22:20 other people can write services against that

22:20 alandipert: "your code would be 34% faster if you buy this lib from the lib store"

22:20 kovasb: exactly

22:20 alandipert: interesting

22:21 a cottage industry of clojure expression writing. like getting paid to 4clojure!

22:21 kovasb: or in a cloud based setting, literally execute the code for you

22:21 lynaghk: kovasb: I take it you've played around a bit with kibit? I've been thinking for a while of just doing statistical analysis of Clojure code on github as a kind of linter. E.g., look at histograms of forms-per-fn or form-depth between projects.

22:21 kovasb: lynaghk: i haven't yet

22:21 lynaghk: I'm basically refusing to do data analysis until i can do it in session

22:21 alandipert: lynaghk: i've had similar thoughts around scanning for idioms, like something that identified the relationship between update-in and fnil

22:23 lynaghk: alandipert: whoa, I've never seen fnil.

22:23 kovasb: i discovered fnil a few weeks ago

22:23 pretty useful when u need it

22:24 lynaghk: alandipert: that's more complex semantic stuff; I'd settle just for counting so I can have a linter that yells at me for having really long fns.

22:24 kovasb: what's a typical use case?

22:24 kovasb: for fnil?

22:24 lynaghk: yeah

22:24 alandipert: (update-in {} [:x] (fnil + 0) 1)

22:24 kovasb: yeah

22:24 exactly

22:24 lynaghk: ah, sweet.

22:26 kovasb: honestly what i really want is some refactoring tools

22:27 alandipert: that's part of my motivation to data all the things

22:27 madsy: brehaut: Thanks. It's (.- bar foo) actually :-)

22:27 alandipert: i can write tools in clj that work with clj code-data as i go

22:27 kovasb: yeah

22:27 alandipert: vs. mucking around with jars and files

22:27 kovasb: i agree

22:27 though it would need good ui support as well

22:28 at least for the things i want

22:28 unit tests as data would also be excellent

22:29 could have a central repo where people can just contribute tests for various packages

22:29 alandipert: yeah

22:29 kovasb: especially if all you need to do is flag it in the UI

22:29 alandipert: could also continuously CI the dependency graph

22:30 kovasb: right

22:30 though that could potentially benefit more from logical analysis

22:30 than from testing

22:30 alandipert: true

22:30 or at least a logic heuristic

22:31 kovasb: i mean, its stupid we have to find out the hard way that some library changed the namespace

22:31 and then its incompatible with your other library

22:31 like when the analyzer moved to a new ns, a bunch of stuff broke

22:31 we should be able to find that out ahead of time

22:32 dependency management is just a computational problem

22:33 alandipert: what are you working on now?

22:34 alandipert: mostly been working on clj training related things, traveling around a bit this summer delivering courses

22:35 is anyone gonna be at OSCON?

22:35 kovasb: how many people are gonna be trained?

22:36 alandipert: 20-30 a pop, and there 4 this summer, so hopefully around 100

22:37 kovasb: cool. is it mostly companies that decided to use clojure?

22:37 or just random people

22:37 alandipert: it's a mix, i've done a few on-sites at companies that are in adoption process

22:38 other companies send a few people to the public trainings. it's fun because people come with interesting problems

22:38 kovasb: cool. I'm curious about the adoption process at companues

22:38 yeah

22:38 though i imagine its hard to avoid just solving their problem for them

22:39 do you ever make their day with a 1 liner?

22:39 :)

22:39 alandipert: not always, some of them are pretty tough :-) and code isn't always the answer. but yes, we try and hook people up with the tools to succeed

22:40 i try to blow like 7 minds a day with 1-liners, kinda low today, only 5 - and they ran me out of the supermarket

22:40 kovasb: lol

22:43 alandipert: well, bedtime, g'night all

22:43 we must drink beers some day lynaghk and kovasb and plan the revolution

22:46 TimMc: Hmm, 'deliver claims it will throw an exception if you call it twice on a promise, but that doesn't appear to happen.

22:47 zakwilson: kovasb: yes. haskell-mode at least provides a function to query hoogle.

22:47 kovasb: cool

22:47 those haskell people have a lot of stuff

22:47 too bad i don't understand the language

22:48 wmealing: gives me a headache

22:48 kovasb: i haven't tried to understand

22:48 yet

22:48 probably need a good book

22:49 but besides clojure they are the main people doing sophisticated stuff

22:49 zakwilson: I wrote a non-trivial thing in Haskell. Ended up porting it to Clojure.

22:49 bfabry: I can't fit both monads and an awkward binding-precedence based syntax in my head at the same time

22:50 kovasb: i wouldn't want to code in it

22:50 zakwilson: The way I see it, Haskell is a research language you can write practical stuff in. Clojure is a practical language that draws heavily on research.

22:50 kovasb: but there are a lot of algorithms type papers published in haskell

22:50 thats a good way of putting it

22:51 basically to be aware of whats going on, knowing haskell helps a lot

22:51 zakwilson: I like Haskell though. If I was writing a non-trivial file format conversion tool, I might do it in Haskell.

22:53 Of course, some of the research-heavy Haskell guys hate Parsec. I think it's awesome.

22:54 kovasb: why do they hate it?

22:54 brehaut: how dare you write something so practical in haskell!

22:54 compute Pi again!

22:54 kovasb: lol

22:54 wkelly: research-heavy people hate everything by nature

22:54 hehe

22:54 kovasb: true

22:54 wkelly: it is what makes them good at coming up with things no one else has done before! ;p

22:54 kovasb: i think its just everything else is a threat

22:54 against their special thing

22:55 e.g., academia is a 0 sum game

22:55 wkelly: it seems like a lot of people came to clojure from haskell

22:55 kovasb: i see a number on irc

22:55 zakwilson: kovasb: dunno. Parsec is somehow worse in a parser theory way than the complainant's favorite parser.

22:55 brehaut: i can from haskell and python concurrently

22:56 kovasb: zakwilson: there are so many ways of parsing stuff that there will always be a better parser for some category of thing

22:56 wkelly: I use haskell to configure my window manager, and I played with it prior to clojure

22:56 wmealing: haskell does have a serious advantage in speed and memory , compared to clojure.

22:56 wkelly: I do a lot more in python and ruby, but I am a sys admin, not a programmer

22:56 wmealing: but of course, you lose all the java -interop

22:56 kovasb: its actually pretty wild how many parsing algorithms there are

22:57 wkelly: haskell has the advantage of easily working with c for we sysadminy types who like to drop privs in our servers

22:58 zakwilson: I didn't come from Haskell to Clojure. I came from Common Lisp to Clojure, and tried out Haskell after I was already regularly using Clojure.

22:58 I still like CL in theory, but Clojure is usually easier to get stuff done in.

22:59 kovasb: i just think the mid-late 80s were a bad time in PL design

23:00 CL is like the C++ of lisp

23:00 wkelly: haha

23:00 zakwilson: It is.

23:00 A much smaller and cleaner language just like CL would be awesome, but nobody would use it.

23:01 kovasb: yeah

23:01 wkelly: I would!

23:01 zakwilson: There was... T, I think.

23:01 wkelly: common lisp is a bit intimidating for me

23:02 kovasb: its hard to separate the good from the bad

23:02 wkelly: I have poked at it, but I haven't really given it a try

23:02 kovasb: from my attempts to look at it

23:03 basically, i trust that rh already stole the good ideas

23:03 so there is no point now

23:03 zakwilson: It's not that there's much bad. There's just too much TIMTOWTDI.

23:03 sabe: good evening. question:

23:03 kovasb: i guess what i mean is marginal versus non marginal

23:03 sabe: given this: https://gist.github.com/3057818

23:03 wkelly: zakwilson: that is my experience. It is overwhelming to get into

23:04 zakwilson: There are good ideas in CL that aren't in Clojure. User-defined reader macros are nice. Symbol macros are nice.

23:04 wkelly: I like the reader macros in CL

23:04 sabe: how do I pass the received varargs to another function still as varargs instead of a list?

23:05 kovasb: (apply f list)

23:05 ,(apply #(vector 1 %%) [2 3])

23:05 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: sandbox$eval28$fn>

23:05 kovasb: o dear

23:06 sabe: kovasb: (defn f2 [a & r] (apply (partial f a) r)) ?

23:06 kovasb: ,(apply vector [1 2 3])

23:06 clojurebot: [1 2 3]

23:06 zakwilson: Variables in CL that aren't created in a lexical scope are always dynamic (probably with some odd exceptions). Not so in Clojure.

23:07 sabe: kovasb: it works but it looks kinda ugly. isn't there a better way? I thought ` would solve it for some reason :/

23:07 kovasb: anyway depending on if you want to pass additional arguments as well as the varargs, some form of apply should do the trick

23:07 zakwilson: And that's a big deal if you really need a backdoor in to somebody else's code.

23:07 mdeboard: scottj: I somehow have swank-js working fine. Interacting with the browser live and all.

23:08 kovasb: sabe: probably is a better way but not coming up with it at the moment

23:08 sabe: kovasb: well, that did the trick. thanks man :D

23:09 kovasb: cool

23:29 ferd: anybody knows why Korma's (select) doesn't return a lazy seq of the result set ?

23:30 arohner: ferd: my guess is, the DB has side effects when closing the connection, so you need to know when that happens. Lazy seqs would have to depend on GC, which isn't deterministic

23:30 zakwilson: Because the database doesn't work that way.

23:31 kovasb: my vote is with zakwilson

23:31 ferd: zakwilson: why do you say so? A JDBC resultset may use a db cursor... it doesn't pull the whole DB in memory

23:32 hiredman: jdbc has several object's with life cycles to manage

23:32 kovasb: in that case my vote is with arohner :)

23:32 hiredman: connection objects, statement objects, resultsets

23:32 zakwilson: Here's an idea. Ask ibdknox instead.

23:33 hiredman: ibdknox has been asked and responder in this channel

23:33 arohner is correct

23:33 responded

23:33 zakwilson: Then arohner is correct.

23:34 hiredman: by not returning a lazy-seq, korma can punt on the life cycle management

23:35 kovasb: hiredman: thanks for the input on session

23:35 zakwilson: I've often wondered why SQL doesn't have declarative schemas.

23:35 ferd: I see... my only thought was around the same vain: that it's implicitly creating connections and transactions

23:35 so, we'd need a "with-transaction" kind of thing... inside of which I do my (select ) and any data processing "lazily"

23:36 hiredman: kovasb: oh sure, it's way cool, and I want a clojure notebook

23:37 kovasb: hiredman: any particular use case?

23:37 hiredman: the idea of giving each computation and result an identity (as a loop in session) is not something that had occured to me before, but it is just sort of "oh of course, and that's how you get x y and z working"

23:37 kovasb: cool

23:37 ferd: (confesion: I spent 10mins with Korma... I saw that it was returning a vector and that triggered my question)

23:37 kovasb: yeah, need 1st class entities to represent computations

23:38 hiredman: in the sense of a document with embedeed clojure computations

23:38 kovasb: right

23:39 well I'm waiting for this hadoop job to finish before i can go back to debugging the new version

23:39 hiredman: I've been doing a lot of sort of "one off" work recently, writing little scripts to shovel data around, and logically a notebook idea seems to fit that kind of thing better than emacs+git

23:39 kovasb: i think things will shape up in the next couple of weeks

23:40 right

23:40 tmciver: Has anyone here read 'The Little Schemer'? I'm looking at a preview on Amazon. Is the entire book like this - a series of questions and answers?

23:41 kovasb: and we're back

23:42 inklesspen: Hello, I'm having a problem where 'lein repl' complains about a missing class org.codehaus.jackson.JsonFactory. Some googling turned up hints this could be caused by conflicting dependencies, but no clue on how to resolve this.

23:42 Here's the error and my 'lein deps :tree': https://gist.github.com/3057916#file_repl+with+error.txt

23:42 Any ideas?

23:42 nonuby: l

23:42 ferd: ibdknox: Any strong reason why Korma's (select) doesn't return a lazy seq of the result set ?

23:43 hiredman: and it would be sweet if, when someone asks "what is the status of x" you just email them a document that would be able to connect to a sql instance and generate a table

23:43 kovasb: hiredman: right. thats definitely a use case i have in mind as well

23:44 hiredman: so much easier than setting up a webapp

23:44 hiredman: though i imagine it as emailing a permalink… otherwise they need to have session installed

23:45 hiredman: kovasb: well, bundling with a javafx webview or whatever is the next step

23:45 and you can generate a double clickable app with javafx (I think?)

23:45 kovasb: why javafx over just svg

23:46 i see

23:46 actually it might be possible to solve the clicking problem in a number of ways

23:46 i mean, if its just an html file with the js embedded in it, it would work

23:47 hiredman: javafx is really a whole bunch of things, not really comparable to a thing like svg

23:47 kovasb: yeah

23:47 maybe someone will write the tagged literal converter for it

23:48 I'm mostly gonna work on svg based stuff

23:48 hiredman: in the scenario I imagine, javafx provides the webview instead of a browser, but all of session would just run the webview

23:49 kovasb: would be interesting, though i don't know javafx at all to see what it can do

23:50 hiredman: I bought a book, played with writing a repl ui using javafx, it just another ui framework, but it brings more modern widgets (like the webview) to java

23:51 I think the webview is based on webkit

23:51 kovasb: i see

23:51 yeah, web views are useful

23:51 it was brought to my attenion that epub3 has js and html5 support

23:52 also an interesting platform

23:52 hiredman: Oh

23:52 yeah

23:52 kovasb: create interactive ebooks

23:54 hiredman: I am biased towards clojure over clojurescript pretty heavily, hard to get excited about just having clojurescript (unless you have a session (nrepl?) server some place)

23:54 kovasb: i am also biase

23:54 d

23:54 but for simple, common stuff, the abstractions shouldn't care

23:55 thats why i'm so big on tagged literals

23:55 you can have the same graphics formats on all clojure platforms

23:55 and they can just get interpreted the right way

23:56 you can imagine extending it to database objects as well

23:58 hiredman: now I have to google about making epubs

23:58 kovasb: haha

23:58 i just saw the high level summaries but hard to find good technical docs

Logging service provided by n01se.net