#clojure log - Sep 06 2013

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

0:00 bbloom: cjfrisz_: i don't understand how haskell programmers can stomach all that manual lifting :-)

0:00 cjfrisz_: bbloom: I just don't understand how to Haskell

0:01 bbloom: cjfrisz_: i can't read infix :-P

0:01 cjfrisz_: I get types for the most part, and I've written some toys, but I just can't get it to stick with me

0:01 dobry-den: http://docs.datomic.com/schema.html explains that you'd want to create a new partition for different logical groups but I'm not sure what that means (and despite its example, the Seattle demo doesn't create a :communities partition).

0:01 seabre: I like Haskell a lot, I just don't know what to do with it.

0:01 cjfrisz_: I get this odd sensation that I'll end up playing with it some more if I spend some time with core.typed

0:02 dobry-den: If you had a forum schema (Users have many Threads have many Topics), would those be in the same logical group since you query across them?

0:03 bbloom: cjfrisz_: some particularly weird things i just can't deal w/ tho… like i can't move code between models w/o changing the encapsulation behavior & i now have to manually make public accessor functions? wtf?

0:03 cjfrisz_: i just wanna cut and paste some code dammit! stop trying to protect me from me!

0:03 dobry-den: famous last words from my time with php

0:04 cjfrisz_: bbloom: I hate to cut off our chat, but I need to go sleep

0:05 bbloom: cjfrisz_: psha. you people and your real jobs

0:05 cjfrisz_: bbloom: Yeah, man…keeping a schedule in line with other people's is a drag

0:05 Being an adult is a dumb idea and we should beat up whoever thought of it

0:06 I just wanna circles move around in my browser all day

0:06 bbloom: cjfrisz_: agreed. that's why i quit being an adult

0:07 cjfrisz_: bbloom: I'm off. I'll be back on sometime soon

0:07 bbloom: cya

0:07 cata: can anyone advise me how to write this idiomatically without my silly helper function? http://paste.lisp.org/display/138795

0:16 bbloom: cata: have you see ##(doc for) ?

0:16 lazybot: ⇒ "Macro ([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost f... https://www.refheap.com/18381

0:23 sdegutis_: Okay I'm stumped.

0:24 I have a defprotocol, I extend-type a few types to implement it, and I try calling it. And it throws java.lang.ClassCastException: nepenthe.core$eval200$fn__201$G__191__212 cannot be cast to clojure.lang.IFn$OOLLO

0:25 brehaut: OOLLOO = Object Object Long Long Object Object i think? thats the method type signature

0:25 sdegutis_: Ah, OOLLO means it takes 2 objs and 2 longs

0:26 Ah, it was a bad type hint.

0:26 Thanks.

0:28 seabre: This might be kind of an off the wall question: Is there something like rake for clojure?

0:32 ddellacosta: seabre: not really; part of the problem is that you have to spin up the jvm

0:33 seabre: yeah

0:33 ddellacosta: seabre: you could see if this scratches any of your itches tho: https://github.com/technomancy/grenchman

0:34 xeqi: seabre: like rake in what sense?

0:37 seabre: I just want to be able to define some tasks in a file

0:37 and run them when I want

0:37 Like in a Rakefile

0:38 xeqi: seabre: I usually put project specific tasks in a file in the project and add an alias for lein

0:38 for example

0:39 https://github.com/ato/clojars-web/blob/master/src/clojars/db/migrate.clj#L56 - is a file that will run database migrations

0:39 https://github.com/ato/clojars-web/blob/master/project.clj#L39 is an alias to make it nicer

0:39 then `lein migrate` will run the db migrations

0:40 sdegutis_: In all my years of Ruby I'm not sure I ever defined a rake task or needed to.

0:40 seabre: Well, yeah, but that only works if you're working in a clojure project.

0:41 technomancy: sdegutis_: when you do it's because rake doesn't make it all that easy to abstract things out and share tasks

0:46 seabre: I keep some personal documents in LaTeX and use rake and guard to autocompile while I work on them.

0:47 technomancy: seabre: why not just a ruby script with a shebang?

0:47 seabre: My rake file is like four lines of code.

0:49 technomancy: oh, do you mean like a library that tracks timestamps of various files and relationships between them?

0:51 seabre: Sure

0:52 I was really just wondering if there was a clojure equivalent to rake, in general.

0:53 nightfly: lein

0:54 technomancy: rake is used for a lot of different things, but I don't think there's any generalized file timestamp tracking library in clojure

0:55 ddellacosta: is there a reason why a channel in a go block wouldn't pick up the first message passed in?

0:56 xeqi: ddellacosta: because someone else read from the channel first?

0:56 ddellacosta: xeqi: sorry, I'm not being clear: the first message I pass into a channel doesn't seem to be getting read, but subsequent messages are

0:57 xeqi: nothing else is reading it, that much I can confirm--it is all the same go block right now

0:58 xeqi: no good ideas. I haven't seen that behavior in my cljs core.async explorations

0:58 ddellacosta: I'm setting up a go block to handle messages coming in via browserchannel, THEN I set up the browser channel with a request on open, which I see passed in--but nothing comes out of the channel in the go block which I set up initially. Very perplexing.

0:58 I'm sure it's something stupid I'm doing, but not sure how to break it down, since it seems like everything is so obvious.

0:59 xeqi: "which I see passed in" - are you doing a println right before?

0:59 ddellacosta: xeqi: yep…is that the stupid thing I'm doing?

1:00 xeqi: I don't think so. I just wanted to make sure I understood

1:00 ddellacosta: yeah, let me make up a refheap, it's hard to explain

1:08 xeqi: this hopefully explains it: https://www.refheap.com/18382

1:08 xeqi: I gloss over some of it, but hopefully is obvious from the output at the bottom

1:11 xeqi: never mind, think I solved it…but writing up that refheap was necessary for me to do so. haha

1:11 xeqi: ddellacosta: quack

1:11 ddellacosta: xeqi: thanks for being my "foil" so to speak.

1:11 xeqi: what does "quack" mean?

1:11 xeqi: http://en.wikipedia.org/wiki/Rubber_duck_debugging

1:11 I am a duck

1:12 ddellacosta: xeqi: ah! Thanks for being the duck. (and apologies…)

1:16 rhg135: lol

1:17 i had never heard of that

1:18 rigger: it works

1:19 sometimes i talk to myself outloud while debugging and my wife thinks i've lost it

1:19 seancorfield: ddellacosta: and what was the problem?

1:20 glad you've solved it and all... but don't keep us in suspense! :)

1:21 ddellacosta: seancorfield: haha…honestly, I'm still a bit confused

1:22 mtgrubb: hello all, I'm having some issues with defrecord and extend-type interaction. You can see some code that I used to reproduce the problem at https://gist.github.com/mgrubb/3dcfff07433314002afd

1:22 ddellacosta: seancorfield: I'm using browser channel, and I solved it by passing in an operation on opening of the browser channel channel, and that seemed to happen at the right time

1:22 seancorfield: but it almost seems like dom/log was being called outside of the scope of the function it was declared within--it's very strange to me.

1:23 mtgrubb: The tl;dr is that when I try to extend-type and use a protocol that was defined in a different namespace i'm getting the interface X is not a protocol exception

1:23 ddellacosta: seancorfield: I will have to investigate further, 'cause how it is behaving doesn't make sense.

1:24 seancorfield: according to that code you were sending {"success" false} first? or am i misunderstanding the gist?

1:24 xeqi: mtgrubb: try compiler/Render instead of compiler.Render

1:24 seabre: rigger: Make your wife think you're even crazier http://en.wikipedia.org/wiki/Rubber_duck_debugging

1:25 seancorfield: seabre: i talk to my cats to debug problems...

1:25 rigger: yep, i do have a rubber duck sitting on top of my rubik's cube collection

1:25 mtgrubb: xeqi: Thanks! I new it was something simple that I was missing.

1:26 rhg135: I should buy one lol

1:26 seancorfield: rhg135: a rubber duck or a cat? :)

1:27 rhg135: Clojure needs a debugger

1:27 seabre: Oh, xeqi posted the same thing, haha didn't see it.

1:27 rhg135: River sick ;-)

1:27 KB :'(

1:27 Rubber duck*

1:29 danlentz: pardon the diatomic centric question, but #datomic channel seems to be less active. If I have 2 entities each with the same many-values attribute is it possible to efficiently union the two sets of values into a new entity with that same attribute?

1:29 ddellacosta: seancorfield: sorry, got distracted, one sec

1:29 rhg135: Define efficiently :'(

1:30 ;-) *

1:30 ddellacosta: seancorfield: yeah, that code reference is a bit confusing, but it all has to do with sending stuff on the client side, within the context of receiving browserchannel responses from the server

1:30 danlentz: in my particular use-case i have two graphs [collections of statements] and i want a third graph that is the union of those two

1:31 ddellacosta: seancorfield: so, I'm not sure what was going on with the initial {"success" false}--it's very strange that there was no sending to the channel

1:32 danlentz: rhg135: well i don't want to just iterate over both sets one by one building the union with all that wasted overhead

1:33 xeqi: danlentz: clojure.set/union ?

1:33 rhg135: look at clojure.set/union

1:33 sorry i'm also new to clojure :P

1:33 danlentz: but then i have to insert 2n nodes back into the db

1:34 i want it computed without sucking them all out and then shoving them all back in again

1:36 w/o much experience with diatomic yet my initial thought was to implement my own collections using a trap structure implemented using diatomic tuples

1:37 but i just thought there had to be an easier way

1:37 trap rather

1:37 treap

1:38 damn autoincorrector

1:39 rhg135: Ah

1:39 xeqi: danlentz: using :db/ref as pointers ?

1:39 danlentz: y

1:41 i actually have the basics of the tree model built already but bedore i start getting too far i thought i might ask someone wiser in the ways of datomic

1:42 xeqi: how would that prevent having to insert the nodes again?

1:42 lynaghk: ping: dnolen

1:42 danlentz: its actually a weight balanced tree not a trap. wb will perform better because it does a lot less rebalancing

1:43 well i can union two wb trees within the db more efficiently nthan 2n

1:44 the trees are functional and share structure

1:45 and don't require eager evaluation

1:46 its essentially like adams tree / purely functional data structures based

1:47 i've used them to implement collections before both in memory and on disk. but by on-disk i mean at a lower level using mmap

1:48 seems like if i have a diatomic database it should be doing that bit for me

1:50 things should be at least a little more convenient then working directly in memory using octets… :)

1:50 xeqi: the sharing structure seems like it could be beneficial to reduce the node insertion

1:51 danlentz: it seems lile this would be a common type of requirement

1:51 xeqi: though work never happens "in the db". the client pulls the data out, and works on it locally

1:52 danlentz: y but I'm just surprised i have to go and implement my own index structure from scratch rather than some facility of diatomic existing indexes

1:54 xeqi: even trying to use an ordered list attribute requires building your own index

1:54 danlentz: also wb trees are ordered whoch enables some other optimizations

1:55 xeql: meaning your own data structure?

1:56 also in the future i had in mind that i wanted to add and remove indexes dynamically at will

1:56 e.g. some graphs may have multi-constituent indexes, etc

1:56 xeqi: a :db.cardinality/many of :db.type/ref, and those refered entities need to have a :db.type/long representing their index. so yes?

1:57 danlentz: but the union of two many-valued attributes just seems like such a basic thing i thought perhaps i was missing sopmethging

2:00 seems a little do-it-yourself for a commercial product like diatomic aims to be

2:01 and a closed source one at that

4:20 mklappstuhl: Using a (try (catch)) block as it is used here: http://en.wikibooks.org/wiki/Clojure_Programming/Examples/JDBC_Examples#Dropping_a_Table — my functions always return nil on error case — I looked into various SO threads but wasn't able to figure out how to get the stracktrace to be printed

4:23 jack_rabbit: mklappstuhl, what have you tried?

4:24 have you tried the printStackTrace() method?

4:24 mklappstuhl: (catch Exception e (.printStackTrace (.getCause e)))

4:24 this one?

4:26 jack_rabbit: yeah.

4:26 why are you doing getCause, though?

4:29 mklappstuhl: jack_rabbit: to be honest I dont really know. I found that on SO. tried it without getCause now and the output is actually far more verbose

4:30 jack_rabbit: well. Stack traces are usually verbose.

4:30 ALL of Java is usually verbose.

4:30 mklappstuhl: I was looking for that so it's good :)

4:31 I'm trying to delete tables btw and printStackTrace gives me that: java.sql.BatchUpdateException: Batch entry 0 DROP TABLE migrations was aborted. Call getNextException to see the cause.

4:31 jack_rabbit: So do that if you want the next exception.

4:31 mklappstuhl: the table doesnt exist but I wonder if getNextException provides me with more sql related info

4:32 jack_rabbit: I have no idea. it seems to be a java.sql thing.

4:32 mklappstuhl: oh, wow. just replacing .printStackTrace with .getNextException is pretty good

4:33 maybe I didn't get this working yesterday because it was late already :D

4:34 jack_rabbit: could be.

4:35 do you know Java?

4:41 mklappstuhl: jack_rabbit: no, not at all

4:41 jack_rabbit: that's your problem.

4:41 mklappstuhl: jack_rabbit: yeah, apparently. It's a bit sad that you get to Java so fast just wanting to use clojure :)

4:42 jack_rabbit: I agree.

4:46 clgv: mklappstuhl: there is the clojure.stacktrace namesapce that offers you print-stack-trace and print-cause-trace

4:47 I often use print-cause-trace during development

4:47 jack_rabbit: clgv, good to know.

4:51 sheldonh: reverse is not lazy. does that mean that (filter some-filter (reverse lazy-sequence)) will end up building the entire sequence into memory before some-filter sees the first entry?

4:51 jack_rabbit: sheldonh, yes.

4:51 mklappstuhl: clgv: I will look into that, thank you :)

4:51 sheldonh: jack_rabbit: owch.

4:52 clgv: sheldonh: yes. but the filtering is lazy again

4:52 sheldonh: clgv: right. so on a monster sized lazy-sequence, reverse is an extremely bad idea if i have other options. true?

4:53 clgv: shadlonh: you can implement a lazy reverse though. but it takes O(n) time

4:53 jack_rabbit: clgv, you could implement a lazy reverse on vectors that was in constant time, though, no?

4:55 clgv: jack_rabbit: yes

4:55 oh no I think I misjudged lazy-reverse is not possible for lazy-seq. since you need the last element as first

4:56 sheldonh: just reverse the data after you know how much you need to realize

4:58 sheldonh: clgv: i'm trying to learn how to a) take a sequence and return a sequence (to minimize memory usage when it matters) while at the same time b) dealing with the fact that my use of conj in reduce gives me the result in reverse

4:59 clgv: sheldonh: conj with a list?

5:00 sheldonh: clgv: yes. like so: https://www.refheap.com/18386

5:00 clgv: sheldon: if you conj on a list and do not like the order being reversed then use a vector in the reduce instead of the list

5:00 sheldonh: clgv: hmmm, thinking...

5:01 clgv: sheldon: as a rule of thumb: for sequential data you almost always use vectors except you have a special goal that definitely needs a list

5:02 sheldon: I meant eager calculation. for lazy calculation you have lazy-seq and the sequence functions built on it

5:02 sheldonh: clgv: so... "as a rule of thumb: for eager calculation you almost always use vectors except ..." ?

5:03 clgv: yes

5:03 eager calculation of sequential data ;)

5:04 jack_rabbit: It also makes me wonder that if you have a single sequence so large that it is deserving of memory consumption consideration, if you shouldn't be splitting the data somehow into smaller chunks.

5:05 sheldonh: jack_rabbit: well exactly. the exercise i'm working on is to implement core's partition function :)

5:06 clgv: jack_rabbit: assuming the data isnt generated on the fly and does not fit into memory it must originate somewhere: network or file/database

5:06 in the memory case you can build a function reading the file applying a function on each read datum

5:06 jack_rabbit: clgv, exactly.

5:13 sheldonh: maybe my approach to reducing is wrong. i start with [[]], filling the inner vector until it has the right size. that requires a lot of (conj previous-partitions (conj current-partition x))

5:19 hmmmmm... assoc applies to vectors :)

5:31 clgv: sheldonh: problem link?

5:39 sheldonh: clgv: it's just "implement partition yourself" http://www.4clojure.com/problem/54 current attempt here: https://www.refheap.com/18387 ... seems what's tripping me up is that rest returns a list, not a vector

5:39 clgv: sheldonh: you do not have to be lazy for that one.

5:40 sheldonh: clgv: it just feels like i should be able to get away with not having the whole input set in memory at any time. maybe that's a bad intuition

5:40 clgv: sheldonh: dont overcomplicate the task ;)

5:41 sheldonh: clgv: i must! laziness is a huge reason i'm interested in clojure, and (as you can see) i don't understand it very well :)

5:41 clgv: it's very exciting to see a chunk of code that looks like it'd be a single thread in ruby, flattening 5 of my cores :)

5:44 clgv: sheldonh: how are those two statements connected?

5:44 sheldonh: clgv: i'm going to have to go with tangentially :)

5:45 clgv: but i'm guessing it's because referential transparency plus laziness provide easy opportunities for exploiting concurrency

5:45 clgv: (because you can execute a producer and a consumer concurrently)

5:46 krgn: morning

5:46 clgv: sheldonh: no. lazyness is the archenemy of concurrency. that's why the important lazy functions from clojure.core are reimplemented in clojure.core.reducers

5:46 jack_rabbit: sheldonh, laziness just allows you to compute only what you need.

5:47 krgn: I have a question: if I have a 'resources' folder in a project, I'd like to get the contents into the uberjar as well, but they don't get included

5:47 Brand0: sheldonh, did you try a for loop?

5:47 clgv: s/important lazy functions/important sequence functions/

5:48 Brand0: or take

5:48 sheldonh: excellent. i don't understand laziness. i will go back to plodding through the exercises and revisit this next time around block :)

5:48 jack_rabbit: meanwhile in ##java....

5:48 Brand0: ^JavaSpaghettiOO

5:51 clgv: sheldonh: you could use lazy-seq + take + drop ;)

5:52 sheldonh: clgv: bloody hacker :)

5:53 Brand0: cheater!!!

5:53 ;-)

5:53 clgv: sheldonh: well, I would not reimplement `partition` in the first place if it wasnt an exercise... :P

5:53 Brand0: sheldonh, did you look at the source to partiton before you started?

5:54 sheldonh: nooooooooooooooo!!!!!

5:54 Brand0: good first step to alert you to functions that you may or may not have know existed (or could be used that way)

5:54 clgv: Brand0: well, looking at the source is cheating...

5:54 sheldonh: clgv: you have a point. why am i worrying about this? when i find myself in a situation where my solution to this problem is necessary, i can just use partition!!!

5:54 Brand0: not always

5:55 clgv: sheldonh: indeed

5:55 Brand0: for 4clojure exercises to reimplement a core function always ;)

5:55 * sheldonh spatulates his brain back into the bony casing atop his neck...

5:56 Brand0: clgv, a lot of the time the functions are written using java interop and would bring your score way up (bad!)

5:56 but you're right for some of them

5:56 sheldonh: you guys must be so sick of 4clojure :)

5:56 Brand0: nah it's the best way to learn clojure

5:58 and there's few better feelings than entering your answer and seeing yours is the shortest (or = to)

5:58 sheldonh: Brand0: glad to hear it. i meant, those of you who already know clojure, answering questions about 4clojure here :)

5:58 Brand0: oh lol ... I don't think anyone in here is sick of talking about clojure yet

5:58 for any reason really

5:58 sheldonh: and now for something completely different. does clojure have sugar like haskell's $? so far, comp is the next best thing i can find

5:58 llasram: There's a pretty clear self-selection process there :-)

5:59 sheldonh: The threading macros (->, ->>, etc) can yield a similar result

6:00 &(->> 5 range second inc)

6:00 lazybot: ⇒ 2

6:00 sheldonh: oooo. great! thanks

6:31 you've got to marvel at the perverse pedantry of students, that demanded the use of the word distinct in this exercise: "Write a function which returns a map containing the number of occurences of each distinct item in a sequence." :)

6:34 clgv: sheldonh: much better than underspecified descriptions

6:50 sheldonh: clgv: absolutely. i've encountered a few serious headscratchers :)

6:52 Brand0: distinct = unique

7:16 ambroseb_: hyPiRion, callen, technomancy: core.typed needs to stick to Clojure semantics wrt keywords. There's some room for warning on potentially non-existent keyword lookups, but then you've got macros that use keywords as predicates and it might all get a bit messy.

7:17 and you don't have control over other peoples macros, so you might get lots of "Potentially missing keyword lookup" warnings.

7:18 I can add a flag if people are interested to turn these warnings on though.

7:18 (this is RE: http://clojure-log.n01se.net/date/2013-09-05.html#18:35a)

7:46 noncom: how often fo you find yourself using mapply? i feel like i am doing some kind of a hack with it. although my reason says that there is nothing bad, the fact that it is not in the language core tickles me..

7:47 ambroseb_: noncom: apply?

7:47 noncom: no, mapply

7:47 ambroseb_: ok

7:47 I don't know what that is.

7:48 llasram: noncom: Reminder what `mapply` is?

7:49 noncom: it is same as apply, but used in case if you have a function that acceps a map of optional parameters like (defn my-func [& {:keys [a z]}] ...), and then you have {:a 1 :z 2}. So you need mapply to pass that map easiy

7:49 code: (defn mapply [f & args] (apply f (apply concat (butlast args) (last args))))

7:50 ambroseb_: hehe that's nasty. looks useful though.

7:51 llasram: noncom: Ok. Yeah, for me -- honestly, never

7:51 noncom: heh..

7:52 must be a sign of code smell?

7:52 ambroseb_: it seems like it exposes something about the way Clojure implements kw args.

7:52 I can't put my finger on it though.

7:52 I'll have to think about that one

7:55 noncom: this code is what hyPiRion gave me when i asked how can i apply a map like that. Also, i remember someone said that Clojure's kw args mechanism looks like it is not as it intended to be. The keyword args were added later and issues like this one can happen... something like this..

7:55 ambroseb_: noncom: I guess if your stuck with a map of data and a function that takes that map as keywords, it's a nice utility.

7:56 noncom: see, yes, my mind is calm. but there is an itch - why isn't this in the core as of 1.5.1 ?

7:56 ambroseb_: noncom: I haven't seen any demand for it in core.

7:57 usually you need to kick up a fuss to get something in.

7:57 perhaps the jury is still out whether mapply is encouraged.

7:58 noncom: yeah, maybe...

7:58 but it looks VERY natural for a language with such destructuring abilities..

7:59 ambroseb_: good point.

7:59 the lack of mapply certainly encourages the use of a map arg over kw args.

8:00 which seems against Clojure's decision to flatten almost every piece of syntax.

8:01 noncom: i guess maybe i should ask in the user group and some from the creators team could answer. it very interesting why is it so.

8:03 ambroseb_: also consider it's very hard getting things into clojure.core.

8:03 everyone has their own set of convenience macros

8:04 there's nothing wrong with dissoc-in, but it's not being added to core.

8:06 noncom: no problem with this, rather i want to know the bias behind the situation.. but this even seems more fundamental than dissoc-in.. it feels something like if in Java you could not pass, well, say, double args, instead you'd have to pass floats and then make them double.. hehe :)

8:07 ambroseb_: yes.

8:08 clgv: just out of curiosity: is there a pipeline construct in core.async? pipeline means I have a function to put data in the pipeline and the pipeline function running in several different threads process the data and I have a function to retrieve the results afterwards

8:12 noncom: yet i did not get to extensive use for core.async... a little sad this is.. what is your domain of application for core.async, if it is not secret :)?

8:18 clgv: noncom: I do not use core.async. I just head need for the described pipeline

8:18 I wrote it myself now

8:19 noncom: the use case is processing data from a huge file in parallel with only a limited number of entities in memory at the same time

8:22 noncom: interesting!

8:22 clgv: it's build on java.util.concurrent now

8:58 xeqi: clgv: that sounds like 2 channels and N go blocks reading from one channel, processing, and sticking the result in the other channel

8:59 I don't know of anything yet that wraps that structure up into an api ala http://immutant.org/documentation/current/messaging.html#messaging-pipelines

8:59 clgv: xeqi: yes. but without having to construct that yourself. I think it is general purpose enough to be implemented in some lib..

9:00 ah nice. approximately like the immutant one

9:00 except that I have limited queues and thus backpressure for all participant

9:02 xeqi: I've seen some gists from dnolen that are exploring error handling and mentions of pipelining where channels exist for the intermediate steps, but I don't think anything is wrapped up in a lib yet

9:10 silasdavis: Can I print to the console from a lein ring app?

9:12 mathiasp: I think with pprint, at least it works under immutant

9:13 crocket: Is there a good database library for clojure?

9:13 Datomic is just too expensive.

9:14 too expensive for individuals

9:17 xeqi: crocket: what are your qualifications for "good" ?

9:17 drbobbeaty: crocket: I've used postgresql with clojure as well as hadoop and both are working really well for me.

9:17 crocket: xeqi, I don't have any yet, but I heard Datomic was good.

9:17 drbobbeaty, Both?

9:17 drbobbeaty, postgresql is not a library.

9:18 drbobbeaty: crocket: Sorry, I saw your request for a database to use with clojure.

9:18 crocket: I've used korma as a library into postgresql, and it's nice.

9:18 Anderkent: Is there a nicer way of saying (condp apply expr #{foo} ... bar? ..._

9:19 i.e. the equivalent of (cond (fun-a expr) ... (fun-b expr) ... ...)

9:19 drbobbeaty: crocket: I've created a webhdfs-clj library to interface with a WebHDFS system - which is the heart of hadoop.

9:19 crocket: drbobbeaty, What is hadoop?

9:20 drbobbeaty: crocket: http://hadoop.apache.org

9:20 It's a large, distributed, clustered, database with map/reduce capabilities.

9:20 xeqi: crocket: https://github.com/clojure/java.jdbc is the base level everything builds on. Some people like http://sqlkorma.com/ ; others like https://github.com/jkk/honeysql for nice querying and doing create/update/delete with c.j.jdbc

9:20 for normal sql databases

9:21 Balveda: What libraries are good for webapp development?

9:21 crocket: What does Rich Hickey build?

9:21 xeqi: crocket: none of those. He built datomic

9:21 * and others

9:21 crocket: xeqi, And datomic is expensive.

9:21 xeqi, It seems he earns money from datomic.

9:21 xeqi: you can push datomic-free quite far

9:22 crocket: xeqi, datomic-free doesn't include SQL backend.

9:22 xeqi: correct

9:22 crocket: Loss of SQL backen is loss of everything.

9:22 If I can't use Datomic with postgresql or mysql, it's not worth for individual devs.

9:22 Companies might be tempted to pay for it.

9:23 xeqi: that is an interesting position to take

9:23 crocket: xeqi, Who doesn't use SQL nowadays?

9:23 Balveda: Is Noir handy?

9:24 noncom: i don't use sql

9:24 xeqi: Balveda: noir has been deprecated. Most people are using compojure, possibly with lib-noir and other libs to build a stack. check out http://www.luminusweb.net/ for a starting point

9:24 Balveda: Thanks!

9:25 xeqi: crocket: I feel like this is moving into troll territory. but on the case you are sincere, I know of several companies using mongo, riak, cassandra, couchdb, and others that are not sql

9:26 crocket: xeqi, However, I think absence of SQL backend in datomic-free is a serious mistake.

9:27 xeqi: crocket: out of curiousity, what benefits does the sql backend provide?

9:27 crocket: Absence of it excludes a significant portion of individual devs.

9:27 xeqi, Lots of people still use SQL DBs.

9:33 noncom: that is true

9:33 crocket: hmm

9:34 Datomic-free seems to support embedded datalog backend.

9:39 hmm

9:39 Is datalog better than SQL?

9:40 bamford: Folks, when I run parallel calls to functions with println, the output lines can sometimes be interleaved:

9:41 (doall (apply pcalls (repeat 3 (fn [] (dotimes [_ 3] (println "Hey hello!"))))))

9:41 but AFAIK, in Java it is guaranteed that System.out.println output lines won't ever be interleaved

9:41 is there a way to make Clojure's println also "thread-safe" in this respect?

9:42 Balveda: hm

9:42 counterclockwise crashes when i try to make a project with a luminus +cljs template

9:42 clojurebot: Excuse me?

9:45 Balveda: apparently it doesnt like the parameters

9:46 xeqi: bamford: you could use bound-fn instead of fn

9:47 Anderkent: How can I go from a non-namespaced symbol to a fully namespaced one, on runtime? I.e. (let [sym 'foo] (fully-qualify sym))

9:47 I guess (symbol (-> sym resolve meta :ns) sym) kinda works, but fugly

9:48 bamford: xeqi: thanks, unfortunately that doesn't help, same problem

9:49 ambroseb_: Anderkent: do you mean `resolve`?

9:49 I guess that returns a Var, but do you want the symbol that is currently in scope?

9:51 Anderkent: ambroseb_: I want a fully qualified symbol that would resolve to the same var

9:51 or the symbol back if it resolves to a non-namespace-qualified special

9:51 (or doesnt resolve at all)

9:52 ambroseb_: Is this in a macro?

9:52 Do you mean a local variable?

9:52 or a special form?

9:53 Anderkent: yes

9:53 I check that it's not a local already, so that's not a problem

9:53 but basically if I get 'if

9:53 then I want 'if

9:53 but if I get 'loop, I want 'clojure.core/loop

9:53 (unless of course there's a loop defined that shadows clojure.core)

9:53 ambroseb_: ,(clojure.core/if 1 2 3)

9:53 clojurebot: #<CompilerException java.lang.RuntimeException: No such var: clojure.core/if, compiling:(NO_SOURCE_PATH:0:0)>

9:54 ambroseb_: didn't know that.

9:54 then again I don't think I wanted to know.

9:54 Anderkent: https://www.refheap.com/18393 does the job, I think. But .... :P

9:54 ambroseb_: ,(clojure.core/do)

9:54 clojurebot: #<CompilerException java.lang.RuntimeException: No such var: clojure.core/do, compiling:(NO_SOURCE_PATH:0:0)>

9:55 Bronsa: ambroseb_: only clojure.core/import* is namespaced of all the special forms

9:55 Anderkent: https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java here, anything that doesn't intern as (clojure.core, ...) is not namespaced

9:55 ambroseb_: Bronsa: ah yes. I think I wrote some docs about that, must have been pushed out of my brain.

9:57 Anderkent: really, I just want what ` does

9:57 eric_normand: another day, another sexp

9:57 ambroseb_: ,(-> 'do resolve class)

9:57 clojurebot: nil

9:58 Anderkent: specials dont resolve

9:58 the compiler picks them up

9:58 ambroseb_: if I was more proud of my Clojure knowledge I'd do that privately ;)

9:58 I knew that! :)

9:58 Anderkent: hah :P

9:59 ambroseb_: ;)

9:59 Anderkent: it's not something that comes up most of the time

9:59 ambroseb_: Anderkent: so you will have to special case the specials.

9:59 Anderkent: but when doing full program transfomrations

9:59 it's pretty damn annoying

9:59 nah

9:59 Bronsa: Anderkent: https://github.com/clojure/tools.reader/blob/master/src/main/clojure/clojure/tools/reader.clj#L456

9:59 Anderkent: since they dont resolve, they dont get ns, so I treat them as any symbol that doesnt resolve

9:59 i.e. return it back

10:00 ambroseb_: Anderkent: sounds amazing.

10:00 amazingly fun that is.

10:01 crocket: Does anyone use datalog for database queries/

10:01 Anderkent: yuck, that feel when your change breaks all the tests without actually breaking anything useful

10:02 ambroseb_: is it actually 100% reliable to lookup :ns in Var meta?

10:02 I always just get the Java field.

10:02 Anderkent: ah, that I wouldn't know

10:02 why wouldn't it be? :P

10:02 ambroseb_: I don't know. I don't trust metadata very often :)

10:02 probably because ... yea types.

10:07 Anderkent: clojure.lang.ArityException: Wrong number of args (-1) passed to: instrument$form-type

10:07 i love this

10:07 ambroseb_: what does that mean?

10:07 Bronsa: that happens when you have a runtime error inside a macro

10:08 e.g (defmacro x [] (map)) (x) ;=> ArityException Wrong number of args (-2) passed to: core$map clojure.lang.Compiler.macroexpand1 (Compiler.java:6473)

10:09 ambroseb_: ,(inc Bronsa)

10:09 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: Bronsa in this context, compiling:(NO_SOURCE_PATH:0:0)>

10:09 ambroseb_: (inc Bronsa)

10:09 lazybot: ⇒ 10

10:09 Anderkent: yes, I believe I was explaining that to someone months ago just here :P

10:09 or rather, it happens when you have an ArityException inside a macro

10:10 because macroexpand catches that and substracts 2

10:10 mikerod: just don't pass -2 arguments to map, no problem

10:10 Bronsa: I tracked it down in Compiler.java but could never come up with a fix

10:10 Anderkent: yeah, for &form and &env

10:10 mikerod: ah

10:10 Anderkent: Bronsa: use a different exception for macro arity exceptions, perhaps?

10:11 Bronsa: how? macros are just fns

10:12 Anderkent: hm. check your metadata when throwing it? :D

10:12 crocket: What is a good datalog library for clojure?

10:13 Let's exclude Datomic for now.

10:13 Bronsa: Anderkent: I don't believe AFn.throwArity can access the var's metadata

10:14 Anderkent: Could you tell AFn if it's a macro when constructing it?

10:14 Bronsa: no

10:14 the macro is set at the Var level, not the fn level

10:14 Anderkent: right, because it's just (with-meta (fn*) ...)

10:14 yeah i see your point

10:14 ugh

10:14 Bronsa: not really, it's (def x (fn* ..)) (.setMacro #'x)

10:15 Anderkent: ,(apply @#'or [false false true])

10:15 clojurebot: true

10:15 Anderkent: heh

10:16 Bronsa: you're calling (or true) with that

10:16 Anderkent: oh right

10:16 ,(apply @#'or nil nil [false false true])

10:16 clojurebot: (clojure.core/let [or__3943__auto__ false] (if or__3943__auto__ or__3943__auto__ (clojure.core/or false true)))

10:16 Anderkent: that makes more sense

10:24 Balveda: What's a good CLJS library for jquery like functionality?

10:25 Anderkent: only one I've heard of is dommy

10:26 xeqi: Balveda: https://github.com/ibdknox/jayq is a wrapper around jquery. I've been using https://github.com/Prismatic/dommy/ lately

10:26 ddellacosta: Balveda: I've used a lot of domina, which works well enough, but I feel like the library is rapidly falling into disuse as maintenance seems to really have lagged. To echo Anderkent, dommy really seems to have promise.

10:26 and what xeqi says re: jayq, if you want something that explicitly wraps up jQuery

10:27 Balveda: I should add, you can use the google closure lib stuff directly pretty easily as well, they are "built in" so to speak.

10:27 actually, I came on here to ask if anyone knows the fate of domain--are there any plans to revive it?

10:28 domain -> domina

10:28 xeqi: google closure lib stuff: http://docs.closure-library.googlecode.com/git/closure_goog_dom_dom.js.html

10:37 silasdavis: what's a nice clojurey way to fire an async task, but only start it if the last one has finished, and only ever queue at most one

10:46 can I set a maximum queue size for an agent

10:46 crocket: Is there a good Datalog library?

10:48 I'm looking for SQL DB alternatives.

10:51 Rubix: &(doseq [e (list 0 1 1 2 3)] (println e))

10:51 lazybot: ⇒ 0 1 1 2 3 nil

10:52 Rubix: &(map :name (filter #(contains? :type) (:members (clojure.reflect/reflect "foobar"))))

10:52 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox91102$eval135274$fn

10:55 noncom: read-string reads one form from the string, but is there any common method to read the next form, and then next.. so i have a sequence of forms?

10:56 Rubix: &(map :name (filter #(contains? % :type) (:members (clojure.reflect/reflect "foobar"))))

10:56 lazybot: ⇒ (count value CASE_INSENSITIVE_ORDER serialVersionUID hash offset serialPersistentFields)

10:57 Rubix: there we go... any idea how I can use data member names to automagically build a key-value map from a pojo ?

10:57 jkkramer: noncom: you can find that in several utility libs, such as flatland's useful

10:58 noncom: thank you very much!

11:00 Rubix: maybe you find some inspiration here: http://aurellem.org/cortex/html/util.html

11:01 Rubix: noncom: what is all this

11:01 ?

11:05 noncom: Rubix: sorry, i totally messed it up

11:06 that's a very different thing

11:11 Rubix: noncom: it's okay

11:13 noncom: Rubix: somewhere on that website i saw a good example of wrapping java classes and stuff into clojure,much like you said, but I can't it find there now.. maybe i remember it wrong or it has moved..

11:14 crocket: hmm

11:14 Clojure doesn't seem to have nice database libraries yet.

11:14 sqlkorma and ClojureQL look promising, but they lack ORM capabilities.

11:14 Rubix: noncom: I've got some hacky java.data from-java defmethods, but I don't want to write them for every java class I have

11:14 sdegutis: crocket: datomic is the best db lib I've seen to date

11:15 crocket: (in any language actually)

11:15 crocket: sdegutis, However, datomic-free puts a lot of restrictions.

11:15 sdegutis: crocket: like?

11:15 noncom: Rubix: there he somehow took the names of the fields/classes, turned them into keywords or symbols and related them to clojure.. sorry, can't say more, I don't remember..

11:16 crocket: sdegutis, datomic-free supports embedded datalog engine, and embedded memory database.

11:16 sdegutis: crocket: I don't see how that's a restriction...

11:16 callen: crocket: Korma is pretty intentionally designed not to be an ORM and you're going to have a very hard time convincing anybody capable of writing the sort of library you want that it's a good idea.

11:16 crocket: sdegutis, I don't plan to use memory database.

11:17 sdegutis: crocket: you don't have to use a memory database, that's only there to help you for testing

11:17 callen: crocket: if you have specific recommendations or requests, I highly suggest you post them to the github issues for Korma.

11:17 Rubix: noncom: if you find it again, please send a link

11:17 callen: sdegutis: inmem dbs make test runs a lot faster <3

11:17 crocket: sdegutis, I don't know which databases datalog engine supports.

11:17 callen: crocket: the default free edition of Datomic has free and mem. Free is h2.

11:17 crocket: h2 is mem

11:17 callen: the pro edition...man why don't you just read the documentation?

11:18 free persists to disk.

11:18 sdegutis: crocket: Free includes "Transactor-local Storage" which persists to disk

11:18 * callen scowls

11:19 crocket: sdegutis, oops

11:19 noncom: Rubix: maybe point 1.3 here: http://aurellem.org/cortex/html/world.html

11:19 crocket: sdegutis, Does it mean it can persist on postgresql?

11:19 callen: efjknrghnldfghg

11:19 sdegutis: crocket: I know several people who say they use Free in production and don't have a need to upgrade to Pro

11:19 callen: crocket: it uses H2.

11:19 sdegutis: crocket: I dunno what H2 is but it uses that

11:19 crocket: Can H2 persist on disk?

11:19 sdegutis: crocket: http://www.h2database.com/html/main.html

11:20 callen: crocket: http://docs.datomic.com/storage.html just read the docs.

11:20 sdegutis: callen: to be fair, I couldn't easily find that page from their home page

11:21 callen: sdegutis: found it with google and a two word query

11:21 and I just woke up.

11:21 sdegutis: callen: then you're smarter than us

11:21 callen: no I'm just less lazy.

11:21 and actually google things and read documentation.

11:21 sdegutis: if you say so

11:22 callen: in no way is googling `datomic storage` novel.

11:23 sdegutis: callen: not everyone thinks the same way, give us a break

11:23 crocket: callen, It's sad that datomic-free doesn't support postgresql anyway.

11:23 callen: sdegutis: that's what I'm fixing. I'm impressing into you two that you should just google/read.

11:24 sdegutis: callen: no, you're just making people defensive

11:24 callen: querying other humans (a high latency request) should be reserved for when it's not actually facile to get the answer with obvious google queries.

11:24 sdegutis: And defensive people don't usually think about how to improve themselves, they think of how to defend themselves.

11:24 callen: by a sleepy coffee-less grumpy programmer first thing in the morning no less.

11:25 sdegutis: You catch more flies with honey than with vinegar.

11:28 seangrov`: sdegutis: We have a fruit-fly trap here... telling you, apple-cider vinegar, dozens and dozens more flies

11:28 callen: seangrov`: you missed out on a great conversation after the meetup.

11:28 seangrov`: Will scroll up and check it out in a bit

11:29 callen: seangrov`: no no, it was in person.

11:29 seangrov`: at the meetup, after the meetup. there were 5 of us.

11:29 seangrov`: Ah, bummer

11:34 sdegutis: Heh, I wanted str.indexOf() the whole time.

11:34 Should have figured it would be in Java.

11:35 TimMc: seangrov`: No fair, those are vinegar flies.

11:35 sdegutis: So btw, with type hints, parsing my string is the same speed as tokenizing the same string without type hints, which is a 5x increase in speed. That's pretty cool.

11:41 Rubix: noncom: that will give me a starting point, thanks very much!

11:53 cmajor7: given a snippet of "lazy-select" for korma: https://gist.github.com/toby/3783867 how to call that given a full "statement": e.g. (lazy-select users (fields :x :y) (where {:x 42 :y "fourty-two"})) ?

11:53 I feel there is something quote/paren/slice related..

11:54 coventry: Would it make sense for multiarity-for-speed functions to be built with macros, so that they could go all the way out to 20-arity?

11:54 cmajor7: ,(source partial)

11:54 clojurebot: Source not found\n

11:55 cmajor7: coventry: take a look at (source partial), it is built upto 3 though..

11:55 coventry: cmajor7: I was looking at it. Doesn't use macros.

11:56 cmajor7: coventry: right, and it is fast too

11:56 coventry: and composable

11:57 coventry: WRT fast, it only goes to three arguments. WRT composable, it would still be a function, just constructed programattically. Like `(defn partial ~@(loop which makes the various arity signatures.))

11:58 cmajor7: coventry: is there a real performance problem, or just "curiosity"?

12:00 coventry: in your example there could only be a single "defn partial" with a fixed n params for a given namespace

12:01 coventry: Curiosity. It might be an easy win, though. I think you could do a multi-arity defn the way I outlined. Hang on...

12:12 hyPiRion: noncom: it was clojurebot who gave it to you, I've just overheard earlier conversations

12:12 ~mapply

12:12 clojurebot: You have to do something like (defn mapply [f & args] (apply f (apply concat (butlast args) (last args)))), which just goes to show why unrolled keyword args are a bad idea

12:12 pizzasauce: s

12:14 silasdavis: I'm trying to implement an agent that effectively has a maximum queue of length 1

12:14 I'd like to avoid using an is_running flag that I have to set and unset if possible

12:14 is there a nice way to do this

12:14 ?

12:14 eric_normand: silasdavis: what happens when you send to an agent that already has a full queue?

12:16 hyPiRion: And what happens when you request an agent that has no elements in the queue?

12:16 (And, why not use Java's blocking queues?)

12:17 tobyp: cmajor7 also see this: https://gist.github.com/toby/113814480a4e79d186c9

12:17 silasdavis: eric_normand, didn't know the queue could be full...

12:17 tobyp: which I use in addition to the other one

12:18 eric_normand: silasdavis: you said it had a maximum of 1. if there's one in it, it's full, no?

12:19 tobyp: kc = korma.core

12:20 mdrogalis: silasdavis: Yeah, using a queue is definitely what you want here.

12:20 silasdavis: eric_normand, sorry that's what I'm trying to implement. I can think of various ways to do it, but not being very familiar with clojure's async plumbing I'm wondering if I can exploit some feature of agents that already exists

12:21 mdrogalis: Blocking queues & core.async are straightforward, you can pick it up fast.

12:21 eric_normand: silasdavis: So I don't understand exactly what you want to do.

12:22 silasdavis: but perhaps you should check out executor service.

12:22 silasdavis: which has a queue (you decide which) and runs jobs in n threads (you decide n)

12:22 cmajor7: tobyp: thx. not sure I get it :) can the first one (https://gist.github.com/toby/3783867) be used by itself? and if yes, how do I pass that statement.. as a string?

12:23 eric_normand: silasdavis: and I am happy to help

12:23 muhoo: whenever i have more than 3 args i end up just passing a map instead

12:23 eric_normand: silasdavis: I recently did something similar myself

12:24 muhoo: haven't really dug into keyword args. huge lists of args smells funny to me.

12:26 tobyp: cmajor7 yes the first one can be used by itself but it takes a korma query as the "statement" not a string

12:27 anything you'd make with (select* ...) in korma

12:30 silasdavis: eric_normand, thanks

12:30 I'll be using a ScheduledExecutor through at-at

12:30 I have one thread-pool watching some filessytem locations

12:30 sandbags: afternoon

12:31 silasdavis: I'll have those functions add to a blocking pool

12:31 blocking queue sorry

12:32 and have some other periodic funciton process the queue

12:33 eric_normand: silasdavis: and the queue needs to be length 1?

12:33 silasdavis: sounds like you can use agents that read from a blockingqueue

12:34 aaelony: A few days ago I set DISPLAY=localhost:10 to be able to view x11 things from a clojure project. I didn't anticipate that this would interfere with anything, but now when I try "lein ring server-headless" I get a nasty error msg of "Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using '' as the value of the DISPLAY variable." I've tried various values for the DISPLAY without success. Any help

12:34 insight as to the cause appreciated.

12:35 silasdavis: eric_normand, actually I think I can actually just use an atom 'next' instead of a queue

12:35 either it is a function or nil

12:36 then just poll it

12:38 eric_normand: be careful with race conditions

12:39 s4muel: aaelony: give DISPLAY=0:0 a shot

12:39 aaelony: that's the default IIRC

12:40 mtp: :0

12:40 technomancy: server-headless shouldn't care though

12:40 mtp: not 0:0

12:40 aaelony: also 'export DISPLAY'

12:40 otherwise the subprocesses your shell spawns won't get that in the environment

12:41 coventry: cmajor7: Not sure how to get the eval out of there, but this demonstrates that it is possible to define multiarity functions in this way: https://www.refheap.com/18396

12:42 The multiarity-for-speed functions in clojure/core all have a similar structure, so you could probably make a macro to get them all.

12:45 noncom: hyPiRion: right, now I remember! it was him

12:48 coventry: Oh, that leaves off the higher-arity branch, too. Anyway...

12:50 sdegutis: In programming, there's a fine line between right/wrong and subjective opinion.

12:51 Also, core.async is really really cool.

12:53 dnolen: sdegutis: it is!

12:53 sdegutis: I think I now have no more reason to envy Go.

12:57 callen: the moment I started working with a queue and callbacks, I suddenly had a lot of reasons to enjoy using core.async

12:57 immensely grateful it exists.

12:58 sdegutis: :)

12:59 dnolen: sdegutis: for ClojureScript it's a killer app, might be for Clojure as well but I'm more of a front end person.

13:00 kmicu: killer lib

13:06 mdrogalis: dnolen: Combining j.u.c blocking queues and go blocks make life pretty awesome too

13:06 Suddenly you can produce/consume with much much greater parallelism

13:06 sdegutis: dnolen: That surprises me, since I figured core.async on CljS would be less useful on account of lack of threads.

13:08 dnolen: sdegutis: client side apps are highly asynchronous and thus highly concurrent, so core.async is a pretty fantastic tool. as Rob Pike says, concurrency != parallelism

13:08 bbloom: dnolen: s/client side apps/networked apps/

13:08 technomancy: I've never understood Pike's definition of parallelism

13:09 bbloom: dnolen: personally, i'm much more excited about doing streaming protocols instead of REST style APIs

13:09 dnolen: bbloom: yes, but GUIs trump networked apps in nearly everywhere in terms of complexity IMO ;)

13:09 bbloom: dnolen: i don't buy in to the notion that UIs are inherently asynchronous :-P

13:09 technomancy: it seems he uses it to mean "two things are literally happening at once" rather than "the same computation is being performed on different pieces of data at the same time"

13:09 dnolen: bbloom: I'll wait patiently for that blog post.

13:09 bbloom: dnolen: but that's just the game developer in me talking

13:09 technomancy: which doesn't really make sense given ... the English definition

13:09 sdegutis: dnolen: heh good point

13:10 bbloom: dnolen: i've got far too many projects going on at once. working on the UI stuff today, trying to make that the #1 priority

13:11 sdegutis: technomancy: I think he focuses more on "concurrency" (by which he means a program designed to be split up into multiple linear steps that communicate with one another via channels) and defines "parallelism" as "what you thought concurrency was but it isn't because of my defintion"

13:11 dnolen: sdegutis: I don't think his definition is that complicated, people had to deal with concurrency long before they had real parallelism

13:11 technomancy: sdegutis: yeah but doesn't he use "concurrency" to mean "you can think of it as things happening at the same time even if they're not"

13:12 which I would call "the illusion of concurrency"

13:12 bbloom: technomancy: it's pretty simple: concurrency means that two things occur over overlapping time spans. parallelism means that any some particular point sample, two things are simultaneously occurring

13:12 dnolen: technomancy: that doesn't make sense to me.

13:12 bbloom: s/any/at/

13:12 sdegutis: technomancy: the best analogy I know of that explains what Rob Pike thinks concurrency means is "source-code-centric parallelism" rather than "execution-time parallelism"

13:12 technomancy: bbloom: that's not what concurrency means in english though

13:12 sdegutis: i.e. your source code is doing multiple things at once, not the runtime.

13:13 technomancy: sdegutis: right, hence the illusion

13:13 dnolen: technomancy: if it's single core and something is diving up the time for your it's effectively concurrent. whether it's really running at the same time is irrelevant.

13:13 bbloom: technomancy: and parallel means something different in english too

13:13 dnolen: technomancy: not an illusion, since you have to deal w/ it.

13:13 sdegutis: heh

13:14 But even if it wasn't running in parallel, I really liked thinking in goroutines/channels.

13:14 technomancy: taking words and inventing new meanings that are the opposite of their existing definitions is literally the worst thing you can do.

13:14 sdegutis: It's another step in structuring my code properly.

13:14 bbloom: technomancy: i don't think it's the opposite definition at all....

13:15 callen: we've had this conversation before guys

13:15 it didn't end well

13:15 sdegutis: Look, let's all just agree that Erlang > Go, ok?

13:15 * sdegutis ducks

13:16 technomancy: dnolen: "effectively concurrent" would be a good way to put it

13:16 vs "literally concurrent"

13:17 bbloom: technomancy: i think the point your missing is that parallelism implies concurrency

13:17 technomancy: bbloom: eh; I understand that

13:17 sdegutis: When I first started learning about channels/goroutines, I remember being confused by this, so I looked up "concurrency" in the dictionary and it said "existing, happening, or done at the same time".

13:17 callen: bbloom: it doesn't have to.

13:17 parallelism and concurrency are independent of each other.

13:18 sdegutis: And that strongly implies that at runtime, the things are executing ("happening") all "at the same time"

13:18 bbloom: callen: how can something be parallel and not concurrent?

13:18 technomancy: that's just another way of saying literal concurrency is a subset of effective concurrency, which is basically a truism

13:18 callen: bbloom: half the stuff Haskellers do.

13:19 coventry: Is there a way to make ##`{~@(range 10)} DWIM?

13:19 bbloom: callen: you're gonna have to be more specific

13:19 callen: bbloom: contrived example, array with two elements

13:19 bbloom: coventry: what do you mean?

13:19 callen: map an fn across said array

13:19 single thread? no concurrency, no parallelism.

13:19 dnolen: ,`(~@(into [] (range 10)))

13:19 clojurebot: (0 1 2 3 4 ...)

13:19 dnolen: coventry: ^ or something like that

13:20 callen: map across the fn in parallel haskell style and you're parallelizing but not introducing concurrency or non-determinism into your code.

13:20 technomancy: I'm gonna keep calling it "literally concurrent" kthxbai

13:20 callen: you're just performing the work "simultaneously" for the purposes of the user-programmer.

13:20 coventry: bbloom, dnolen, some way to syntax-quote straight into a map.

13:20 TimMc: &`{~@(range 10) ~@[]}

13:20 lazybot: ⇒ {0 1, 2 3, 4 5, 6 7, 8 9}

13:20 hyPiRion: (inc TimMc) ; beat me to it

13:20 lazybot: ⇒ 47

13:20 Bronsa: coventry: not without some trick

13:21 TimMc: coventry: ^ Only via a trick.

13:21 technomancy: Bronsa: tricks are what we do best around here

13:21 coventry: TimMc: thanks. What is the trick there?

13:21 TimMc: (inc hyPiRion) ; for actually coming up with that in the first place

13:21 lazybot: ⇒ 22

13:21 callen: bbloom: thus, parallelism without concurrency.

13:21 dnolen: coventry: oops sorry missing the bit about hash-map

13:21 callen: http://existentialtype.wordpress.com/2011/03/17/parallelism-is-not-concurrency/

13:21 TimMc: coventry: Reader expects even number of *expressions* in the { form.

13:21 callen: as I've said time and time before, concurrency is non-determinism.

13:21 silasdavis: how can I do something like (map .getProtocol urls) instead of (map #(.getProtocol %) urls)?

13:21 coventry: dnolen: No worries. TimMc: Got it, thanks.

13:22 rasmusto: &`{~@(range 9) ~@[]}

13:22 lazybot: java.lang.IllegalArgumentException: No value supplied for key: 8

13:22 TimMc: coventry: So you give it a second one that expands to nothing.

13:22 technomancy: pike's way of redefining things kinda reminds me of http://martinfowler.com/articles/mocksArentStubs.html

13:22 "hey everyone, it would be great if you could start using these existing terms the way I say you should, thanks"

13:23 callen: Pike is a religious lout.

13:23 sdegutis: Welp, my parser's not complete, but getting there.. https://www.refheap.com/18399

13:24 bbloom: callen: i've read that before & i don't know if i buy that argument. Bob Harper is clearly a smart guy, but I'm not sure I buy in to many of his view points

13:24 callen: bbloom: I don't buy into everything he says but he's far from the only person that understands concurrency and parallelism are independent of each other conceptually.

13:24 dnolen: bbloom: understatement about Mr. Harper :)

13:24 callen: bbloom: concurrency is principally about non-determinism, systems for managing concurrency are about controlling non-determinism.

13:25 bbloom: dnolen: the smart guy point, or the non-buyin part? :-P

13:25 dnolen: bbloom: both

13:25 callen: this is something I've understood since even back before I'd taken FP seriously, I don't know why this is a contentious point to make.

13:25 dnolen: bbloom: incredibly smart, and says things I don't buy at all.

13:25 callen: +1

13:26 bbloom: callen: i don't buy the argument that concurrency is inherently about non-determinism either

13:26 callen: there are deterministic concurrency models

13:27 callen: the second part of my sentence was designed to address that

13:27 bbloom: callen: such as http://lambda-the-ultimate.org/node/4699

13:28 callen: "determinism" and "non-determinism" are already useful adjectives. if you redefine concurrency to be about non-determinism, then you've eliminated a useful word without gaining anything

13:28 callen: no, it's a bit more subtle than that.

13:28 bbloom: it's also worth mentioning that words change meaning over time, particularly subtle ones

13:28 callen: and the second part of my sentence was designed to address deterministic methods for controlling concurrency

13:28 bbloom: particularly in engineering fields

13:28 callen: you could think of it in terms of interleaving if you wanted, but that's usually missing the more critical point.

13:29 hyPiRion: words change meaning over time, except in Clojure, where we reverse the flow of time and say that simple is not easy

13:29 bbloom: i need 1) a pair of words to describe whether or not things happen with predictable order & repeatable results and 2) a pair of words to describe whether any point sample will include simultaneously occurring operations

13:29 callen: bbloom: also that system you linked isn't fully deterministic by any means.

13:30 bbloom: dnolen: i take particular issue with the "uni-typed" languages nonsense

13:31 shaungilchrist: I suggest something related to groundhog day

13:31 dnolen: bbloom: I take massive issue with that as well. Far as I can tell non of strong typing goons have actually read any Haskell B. Curry

13:31 bbloom: dnolen: it's an issue of whether or not your VM's objects are tagless. Haskell is tagless… you know… except for sum types, which have tags…. and represent 99% of useful code in haskell

13:31 dnolen: s/non/none

13:32 bbloom: dnolen: but i don't understand why anybody would want a tagless VM except for some key performance cases…. seems obvious to me that the preferable default is to have fully reflective objects for debugging, which implies tags

13:33 dnolen: bbloom: I think the point of tagless is simplicity and performance - but I agree it's a big tradeoff

13:33 bbloom: dnolen: but it's certainly not simple!

13:33 dnolen: in order to be tagless, that means you must infer type from context

13:33 dnolen: you're complecting type with access path

13:33 dnolen: bbloom: well simple in one regard, certainly the ramifications of reflection are pervasive

13:34 bbloom: dnolen: but consider discriminated vs non-descriminated unions in C

13:34 dnolen: if i know from context, this union is a Foo and that one is a Bar, then i don't need that FooBarType enum

13:34 dnolen: that's what tagless is about, to me anyway

13:35 dnolen: that's why tagless representations are *insane* to me on the wire

13:35 dnolen: bbloom: this is true

13:35 bbloom: dnolen: b/c you have fundamentally two different paths: the code on both ends of the wire

13:36 dnolen: this is also what the CLR's "value types" are about

13:36 dnolen: only value types complect tagless with copy by value

13:37 brb

13:40 dnolen: this is kind cool https://github.com/niitsuma/Racket-miniKanren/tree/recursive

13:40 miniKanren with support for infinite structures

13:40 eric_normand: bbloom: I think the uni-type idea (which only makes sense from a static typing point of view) IS the advantage

13:40 bbloom: one type means one interface

13:41 bbloom: which means better interoperability and reuse

13:41 dnolen: eric_normand: but this critique of uni-type is just false IMO. Haskell said you can overlay types based on what context you care about.

13:42 eric_normand: dnolen: so in that sense, type is more like haskell (language) type class?

13:43 dnolen: I must read this. Have a reference?

13:43 dnolen: eric_normand: not really, he specifically said keep pure untyped lambda calculus and you can place the types elsewhere

13:43 eric_normand: which is effectively what Clojure programmers are doing!

13:43 eric_normand: dnolen: I see.

13:44 dissipate__: hmm, has anyone considered a web framework that is like opa where you write your entire web app in 1 language and the framework decides where to run the code automatically (on the server or the client)? except instead of javascript, it would be clojurescript?

13:44 eric_normand: dnolen: you are opening my head, which seems to be a can of worms!

13:44 dnolen: eric_normand: this is pretty dense and I've only skimmed it but http://people.uleth.ca/~jonathan.seldin/RCS2.pdf

13:45 eric_normand: I only came to this realization because I heard Philip Wadler point this out

13:45 eric_normand: dnolen: static type checking is like parsing: easy to write a checker/parser, but hard to give error messages

13:45 dnolen: eric_normand: then I started hunting around for references

13:45 eric_normand: dnolen: thanks

13:46 dnolen: eric_normand: author of that paper also co-authored this which looks really good http://www.amazon.com/Lambda-Calculus-Combinators-Introduction-Roger-Hindley/dp/0521898854

13:46 dissipate__: has anyone considered a clojurescript web framework that uses node.js on the back end?

13:49 callen: dissipate__: you're the first. go for it.

13:49 dnolen: dissipate__: I fail to see the advantage over using the JVM on the backend. But I think people like the fact they can use Clojure on front/back even if it can't really be done transparently

13:49 dissipate__: callen: are you aware of the Opa web framework?

13:49 callen: dissipate__: yes

13:50 dissipate__: callen: so you know what i am talking about? how it is all done in Opalang and it figures out where to run any particular function automatically, but still allows you to tag a function to run on either one specifically

13:50 callen: dissipate__: yes.

13:50 eric_normand: dnolen: so much to read

13:50 dissipate__: callen: so why not the same with clojurescript? write your entire web app in clojurescript and the framework determines where to run the code?

13:50 callen: dissipate__: take a look at shoreleave. cleaner model.

13:52 eric_normand: dnolen: I agree with the "weak uni-typed argument" (my own name)

13:52 dissipate__: callen: link? shore leave is giving me a bunch of unrelated hits on google

13:52 eric_normand: dnolen: which basically states that given a language with static type system, the only way to implement a dynamic type system (a la type tags) is to make every value of the same type

13:52 callen: dissipate__: https://www.google.com/search?q=github+clojure+shoreleave&oq=github+clojure+shoreleave&aqs=chrome..69i57j69i64.4161j0j1&sourceid=chrome&ie=UTF-8

13:52 eric_normand: dnolen: (same static type)

13:53 dnolen: eric_normand: yes this whole view is just wrong

13:53 callen: SegFaultAX: wakie wakie ^^

13:53 dnolen: eric_normand: it's Church notion of typing vs. Curry notion of typing

13:53 callen: SegFaultAX: your uni-typed bullshit manifesto is getting called out. Time for school.

13:54 eric_normand: dnolen: well, I agree that it is wrong. but it's the only thing Haskell lets you do!

13:54 bbloom: eric_normand: http://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/

13:54 dissipate__: callen: and how is that cleaner?

13:54 bbloom: eric_normand: that's what dnolen and i were discussing

13:54 callen: dissipate__: it involves less cancer.

13:54 dnolen: eric_normand: yes Church notion of typing is a straight jacket, my theory why Milner got bored and moved onto Ubiquitous Abstract Machine

13:54 cmajor7: tobyp: had to take off to play some ping pong. thank you for defining the "statement", I'll give "select*" a shot

13:54 dissipate__: callen: cancer??

13:54 lazybot: dissipate__: Definitely not.

13:55 tobyp: cmajor7 cool, let me know how it goes

13:55 bbloom: eric_normand: dnolen: in my opinion, tags are concrete things that exist on objects to help you differentiate them. like the .getType method on java objects. I'd call that getTag :-P

13:55 eric_normand: bbloom: yes, I recently read that

13:55 callen: dissipate__: http://pages.citebite.com/b2x0j8q1megb

13:56 sdegutis: dnolen: I can imagine how core.async could turn an otherwise ugly callback chain into a linear workflow.

13:56 bbloom: eric_normand: dnolen: types are a more abstract notion. i view types as little monotonically increasing database values, like logic variables in core.logic or sussman's propegators. there are many type systems, since they are many logic systems. a type is the sum of proven or asserted facts about some particular variable or object

13:56 dnolen: sdegutis: internally yes, though you do have lift all your async code into world of channels. But I think it's fair tradeoff for being able to write sensible code

13:57 bbloom: eric_normand: dnolen: the other interesting concept that isn't discussed much was pointed out to me recently by kovas: http://en.wikipedia.org/wiki/Head_(linguistics)

13:57 dissipate__: callen: you have a point. i'm definitely no fan of node.js

13:58 eric_normand: bloom, dnolen: I totally disagree with the major thesis of the uni-type argument: "rather than affording the freedom to ignore types, they instead impose the bondage of restricting attention to a single type!"

13:58 sdegutis: dnolen: not that I'm a huge front-end dev, but I've seen solution after solution for this problem in the past 5 years, and none of them seemed very elegant. This one may be.

13:58 bbloom: eric_normand: dnolen: you might have an object '(+ 2 4) with tag clojure.lang.PersistentList, and it might have a type that includes IPersistentList, and ISequential, and a whole bunch of other stuff, the *head* of that expression is clojure.core/+

13:58 eric_normand: dnolen: but the "head" of 5 is Integer :-P

13:58 dnolen: sdegutis: it's the best I've seen, that's for sure. If we can drag everybody into maybe we'll actually come up with something better

13:58 sdegutis: heh

13:58 dnolen: bbloom: interesting

13:58 callen: sdegutis: if somebody asked me how to write a SPA, I'd say to do it in core.async or angularjs.

13:59 bbloom: dnolen: tags, types, and heads… on my infinitely growing blog TODO list :-P

13:59 callen: bbloom: what's infinite growth?

13:59 infinite acceleration or unceasing incremental growth?

14:03 eric_normand: bbloom, dnolen: adhering to a single type is no more a bondage than adhering to HTTP is bondage

14:03 bbloom, dnolen: in fact, it is freeing in that it solves a very difficult n x m problem

14:04 dnolen: eric_normand: honestly part of me agrees w/ Harper on this point. There no such thing as uni-typed anyway the types are somewhere. It's just a matter of whether they are part of the terms or somewhere (including your head)

14:04 "somewhere else"

14:05 eric_normand: bbloom, dnolen: and this is on top of the fact that static checking and dynamic type tags are not mutually exclusive

14:05 dnolen: agreed

14:05 bbloom: eric_normand: yeah, i think at the representation level, it's a good thing

14:06 eric_normand: dnolen: uni-typed is always "for a given static type checker"

14:07 bbloom: eric_normand: right. it's always a matter of perspective

14:08 eric_normand: dnolen: for instance "the only way X expression is allowed by Y type checker is if X uses a single type in Y"

14:09 bbloom: eric_normand: any given object might have a VM tag, a metadata tag, a first element in a list that acts as a tag, a key in a map, etc. same idea applies to types

14:09 eric_normand: bbloom, dnolen: I'm glad we're all in agreement!

14:09 bbloom: eric_normand: heh, yup :-)

14:10 eric_normand: bbloom, dnolen: I'd love to see a plethora of static analysis (not only type!) checkers for Clojure

14:10 bbloom: especially programmable ones that you can customize for your invariants

14:10 bbloom: eric_normand: well, we got type hints for java tags, plus core.typed for general type theoretic consistency checking & there are like half a dozen schema systems

14:11 eric_normand: i'd personally like to see a core.logic powered pluggable theorem prover… get on that dnolen :-P

14:11 eric_normand: dnolen: yeah, why haven't you done that? :)

14:13 coventry: The first two arguments to the "." special form are special, and the rest are evaluated as clojure, right? I'm talking about just "." by itself, not any of the macros which expand into it like (.length "foo")

14:13 bbloom: (doc .)

14:13 clojurebot: Huh?

14:13 bbloom: aw.

14:14 wait a minute....

14:14 ##(doc .)

14:14 lazybot: ⇒ "Special: .; The instance member form works for both fields and methods.\n They all expand into calls to the dot operator at macroexpansion time."

14:14 bbloom: yeah. wtf. i wanna file a bug report on clojurebot

14:15 coventry: bbloom: That has a lot about the macros, not so much about the special form "." which they macroexpand into. ##(macroexpand '(.length "foo"))

14:15 lazybot: ⇒ (. "foo" length)

14:15 bbloom: http://clojure.org/java_interop#dot explains it

14:15 coventry: go to "The Dot special form" section

14:20 coventry: Thanks, I read that before but was confused. Reading it again having played around a bit, I get it now. I guess the answer is no, (. instance-expr (method-symbol args*)) doesn't match that pattern.

14:25 sdegutis: Oh, I get it.

14:26 TimMc: hyPiRion: nephila has an example graph in its README now; thanks for the tip. https://github.com/timmc/nephila

14:26 sdegutis: The Ruby community fell into the trap of putting bikeshedding into action.

14:26 And the JS community.

14:26 That explains everything.

14:26 coventry: Hmm, "." will silently take extra arguments ##(. "foo" (charAt 2) 5)

14:26 lazybot: ⇒ \o

14:27 TimMc: coventry: As will var.

14:27 eric_normand: would love a static information system that told me the invariants of an expression (locally)

14:27 coventry: TimMc: Thanks.

14:28 TimMc: The perils of hardcoded forms.

14:28 eric_normand: meaning, given (map f xs), it would tell me "f has to implement IFn, xs must be ISeqable, etc"

14:28 TimMc: *special forms

14:33 sdegutis: I think Google has the right approach: any sufficiently complex tool needs to be built custom-made from scratch.

14:33 When's the next Conj?

14:33 oh wait, googling

14:33 callen: sdegutis: you're learning >:)

14:34 TimMc: "The beatings will continue until googling improves."

14:35 sdegutis: callen: more like "now I'm remembering"

14:35 I used to be a bad IRC citizen and then turned into a good one, and sometimes bad habits resurge for a tiny while.

14:42 callen: sdegutis: http://i.imgur.com/6DXhpyF.png

14:44 sdegutis: uhh

14:46 TimMc: To get your random API learnin' of the day, just run: (->> clojure.core quote the-ns ns-publics seq rand-nth val meta ((juxt :name :doc)) (map println) dorun)

14:47 bbloom: TimMc: glorious.

14:47 callen: TimMc: <3 love it.

14:48 TimMc: alias learn=java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar -e '(->> clojure.core quote the-ns ns-publics seq rand-nth val meta ((juxt :name :doc)) (map println) dorun)'

14:48 technomancy: learnyousomeclojure

14:49 TimMc: (Oh, put some quotes around "java ...")

14:50 callen: TimMc: thank you. :)

14:51 rasmusto: TimMc: haha, cool

14:53 TimMc: An alias I already have is alias cljhere="java -jar ~/.m2/repository/org/clojure/clojure/1.5.1/clojure-1.5.1.jar -e" which allows me to write things like cljhere '(java.util.UUID/randomUUID)'

14:53 rasmusto: TimMc: you can put :arglists in there too

14:55 technomancy: TimMc: grench eval dude

14:56 TimMc: heh

14:57 Still calling it grench?

14:57 drusellers: trying to find a word I can google for so I can understand the #' - context - (-> #'compojure-routes middle-ware middle-ware2)

14:57 technomancy: well... yeah

14:57 callen: TimMc: why not?

14:57 TimMc: OK, for some reason I thought you were planning on changing it.

14:58 callen: drusellers: (-> (var compojure-routes) middle-ware middle-ware2)

14:58 TimMc: &'#'foo

14:58 lazybot: ⇒ (var foo)

14:59 drusellers: thanks :)

15:00 hyPiRion: TimMc: I want to add this in for a dependency too. Is that possible? E.g. leiningen-core AND leiningen

15:00 nephila, that is

15:01 TimMc: Not yet!

15:01 technomancy: TimMc: I'm irrationally attached to the name despite it being objectively bad

15:01 TimMc: That's what I figured. :-)

15:01 hyPiRion: Patches welcome! :-D

15:01 hyPiRion: TimMc: Argh, now I have something to do for this weekend

15:01 clever girl.

15:02 TimMc: This is still mostly a throwaway project.

15:04 callen: TimMc: wait what project?

15:04 TimMc: nephila

15:04 callen: https://github.com/timmc/nephila ?

15:04 TimMc: https://github.com/timmc/nephila

15:04 callen: okay, thanks.

15:05 sdegutis: TimMc: to expand on that a bit: http://clojuretip.herokuapp.com/

15:05 TimMc: sdegutis: Nice.

15:05 callen: sdegutis: did you just make that?

15:05 sdegutis: Yes.

15:05 callen: lol.

15:05 (inc sdegutis)

15:05 lazybot: ⇒ 3

15:06 TimMc: (inc sdegutis)

15:06 lazybot: ⇒ 4

15:06 sdegutis: For v2, I plan to make it cycle all of them per session.

15:06 So you don't get the same one for a long time.

15:06 callen: very cool.

15:07 TimMc: sdegutis: You could grovel over github and build a frequency table, then weight rarer vars more heavily.

15:07 sdegutis: TimMc: if it skips common ones, that wouldn't help newbies as much

15:07 gfredericks: and it would probably lean toward useless things

15:07 TimMc: Just like me!

15:07 gfredericks: unchecked-add

15:07 seangrov`: TimMc: Any way to get nephila to work with cljs?

15:07 gfredericks: locking

15:08 TimMc: seangrov`: No idea!

15:08 hyPiRion: TimMc: http://hypirion.com/imgs/leincore-deps.png <- Leiningen core. Trust me, it's not complex at all.

15:08 * seangrov` checks the source

15:08 TimMc: hyPiRion: That's nice and clean.

15:08 coventry: Can clojure objects have any influence over how they are displayed at the repl? Something like python's __repr__ and __str__ special methods?

15:08 hyPiRion: TimMc: many arrows though

15:09 technomancy: hyPiRion: doesn't catch the runtime-require =(

15:09 amalloy: &(doc print-method)

15:09 lazybot: ⇒ "; "

15:09 amalloy: ...

15:09 llasram: whaaaat?

15:09 hyPiRion: technomancy: TimMc would probably say "patches welcome"

15:09 coventry: amalloy: Thanks.

15:09 llasram: ##(doc print-method)

15:09 lazybot: ⇒ "; "

15:09 technomancy: lazybot: cool docstring bro

15:09 llasram: Nice

15:10 hyPiRion: Better to do source

15:11 &(source print-method)

15:11 lazybot: java.lang.RuntimeException: Unable to resolve symbol: source in this context

15:11 callen: cute.

15:11 hyPiRion: at least that gave a better error message

15:11 TimMc: The Midje graph is pretty unreadable. http://i.imgur.com/KIrwPXo.jpg

15:12 technomancy: relevant: https://github.com/technomancy/bludgeon

15:12 hiredman: TimMc: well so is midje

15:12 TimMc: :-P

15:13 callen: lol

15:13 seangrov`: TimMc: Looks like this is the responsible fn: https://github.com/clojure/tools.namespace/blob/master/src/main/clojure/clojure/tools/namespace/file.clj#L25

15:13 TimMc: seangrov`: Actually, could you file an issue?

15:13 seangrov`: Wonder how worthwhile it is to differentiate between clj and cljs files

15:14 TimMc: I don't know if I'll ever do more work on this plugin, but it would be nice to collect ideas.

15:14 seangrov`: TimMc: Sure, was just poking around to see how nephila determined which files to map

15:14 callen: TimMc: ava.io.IOException: Cannot run program "dot": error=2, No such file or directory

15:14 hyPiRion: callen: install graphwiz man

15:14 callen: dammit.

15:14 hyPiRion: graphviz*

15:14 TimMc: sudo apt-get install graphviz or whatever

15:14 callen: hyPiRion: is graphwiz the graphviz for Wussians?

15:14 hyPiRion: Well, I think I didn't get the name for this

15:15 I can't spell it.

15:15 upwardindex: Anyone using seesaw to make applets? I can't get anything to load (the java warning doesn't even popup)

15:20 ztellman: applets!

15:22 upwardindex: yes indeed!

15:23 localstorage is not enough for my clients

15:24 callen: hrm yes. indubitably.

15:24 upwardindex: have you considered a database?

15:28 squidz: is anybody using schema with clojurescript? I can't seem to get this working (s/validate {"key" s/Number} {"key" 1}). if the keys are string it doesnt validate, if the key is a keyword it works fine though

15:29 callen: squidz: don't use strings? read the code?

15:29 swizzle some pop rocks and cocaine?

15:29 upwardindex: callen: yes unfortunately not possible in the context...

15:30 callen: upwardindex: is someone holding a gun to your head?

15:30 squidz: callen: doesn't clojurescript automatically read json keys as strings?

15:31 callen: squidz: http://i.imgur.com/siOU3kj.gif

15:32 TimMc: callen: <_<

15:32 upwardindex: My problem with laoding applet is actually bug in firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=907600

15:32 squidz: alright then, I guess somebody isn't in a helpful mood today

15:32 bbloom: callen: you're being a dick again

15:32 callen: bbloom: so are you.

15:32 squidz: it may be the mrHyde library that is automatically converting js object keys to strings in clojure maps

15:32 TimMc: squidz: What's the context, you're parsing JSON and then trying to validate it?

15:33 callen: squidz: clojure.walk.keywordize-keys

15:34 squidz: yes i'm reading in some json and it is being converted to maps like {"key" "somekey" "vals" [...]}, but I just realized it is the library that is automatically parsing it that way

15:35 I assumed that was how clojurescript parses js objects by default but I guess not.

15:36 callen: squidz: there's a patch-js-with-key-lookup in hyde that keywordizes.

15:36 or should be, anyway.

15:38 gfredericks: squidz: that looks like the sort of pattern you'd use when serializing to json from a context where keys can be arbitrary data

15:38 e.g., clojure/edn

15:38 jkkramer: squidz: for schema, believe you can do {(s/required-key "key") "somekey"}

15:39 squidz: jkkramer: right that is exactly what I was looking for

15:40 I see at the bottom of schemes tests now

16:00 noprompt: there's way to much good stuff happening in the clojure world. it's distracting. :P

16:04 upwardindex: noprompt: indeed, i fell off my chair this morning when I saw the piplin presentation

16:04 unlink: I am able to create a working war file with `lein ring uberwar' and host it under tomcat; however `lein ring serve' exits without printing a message.

16:06 dnolen: noprompt: nice console lib

16:10 seangrov`: noprompt: I agree, looks very nice

16:13 learner_: hi. A newbie question here. At work I need to build an application that transforms XML. It should be able to accept Type A, B, C xmls and convert it to some internal format. then I can export it to other format. For example. If I get type A, I convert it to internal format and store it, which can later be converted to B or C. I am planning to use Java & some apache libraries that support XSLT. I am wondering if I can use Clojure fo

16:13 ToxicFrog: "can use Clojure fo"...it cuts off.

16:13 learner_: I am wondering if I can use Clojure for this. need your opinion. thanks

16:14 upwardindex: learner_: the answer is yes

16:15 learner_: upwardindex: Thanks. are there any clojure libraries for this kind of need?

16:15 rurumate_: How to generate clojurescript compiler from source, please?

16:16 upwardindex: learner_: depends on the format you want when you say "other format"

16:16 seangrov`: rurumate_: hrm?

16:17 manutter_: learner_: http://stackoverflow.com/questions/1194044/clojure-xml-parsing

16:17 ToxicFrog: learner_: clojure has built in clojure.xml library (parsing

16:17 ) and xml-seq (walking the DOM produced by parsing); there's also more powerful libs like data.xml

16:18 manutter_: and clojure has good Java interop, so anything that's available for Java can generally be used in clojure.

16:18 rurumate_: seangrov`: I know I should not ask that here ;)

16:19 seangrov`: rurumate_: Just a bit confused about what you're looking for

16:21 learner_: upwardindex: manutter_: ToxicFrog: Thanks for your answers. So instead of writing XSLT, I will be writing functions. Am I right? or will I need XSL also?

16:22 upwardindex: learner_: I don't know enough about your project to answer that question

16:22 rurumate_: seangrov`: oh, is it just a library? no standalone version?

16:23 seangrov`: rurumate_: If you're looking for the clojurescript compiler, it's here: https://github.com/clojure/clojurescript/

16:23 rurumate_: got that, I was just wondering how to build it

16:24 manutter_: learner_: is your internal/intermediate format supposed to be XML also, or are you ok with building a non-XML data structure

16:24 If non-XML is ok for your internal data structure, you should be find just using clojure functions

16:24 seangrov`: rurumate_: script/bootstrap && script/build

16:24 rurumate_: seangrov`: there is no project.clj

16:25 learner_: manutter_: Internal format doesn't need to XML. it can be anything as long as it's structured

16:25 seangrov`: rurumate_: You can add a dummy one in

16:25 teemujin: hi im trying the tutorial on github - and ran into an issue.. is it ok to ask here?

16:25 seangrov`: Bronsa was on the hook to provide a dev one, I believe... :)

16:25 manutter_: learner_: Ok, so clojure functions should be fine.

16:25 seangrov`: anyone?

16:25 clojurebot: anyone is anybody

16:25 seangrov`: anybody?

16:25 clojurebot: anybody is anyone

16:25 manutter_: teemujin: ask away

16:26 learner_: manutter_: Thanks mate

16:26 seangrov`: Well, can't argue with that logic

16:26 teemujin: i got to where it shows you how to load docs — and got this

16:26 my-stuff.core=> (user/clojuredocs pprint)

16:26 Loading clojuredocs-client...

16:26 Warning: Could not load the ClojureDocs client, so `clojuredocs` will be unavailable

16:26 Details: #<FileNotFoundException java.io.FileNotFoundException: Could not locate cd_client/core__init.class or cd_client/core.clj on classpath: >

16:27 its from this github tutorial: https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md

16:27 learner_: teemujin: did you try? (doc pprint)

16:27 manutter_: teemujin: You can use gists or similar services and then just paste the URL, looks better than pasting into IRC

16:27 teemujin: ah ok sorry

16:27 Bronsa: seangrov` yeah, I put a patch on jira with a dev project.clj

16:27 teemujin: let me try (doc pprint)

16:27 manutter_: teemujin: np, let me check out that tutorial so I'm on the same page as you

16:29 teemujin: thanks - it seems to not be following what the tutorial seems to imply will happen at that point

16:30 manutter_: Trying to duplicate your results in my local REPL

16:32 technomancy: teemujin: looks like the tutorial is out of date

16:32 teemujin: ah just my luck :( well at least I don't feel as dumb now.

16:33 technomancy: cdoc was removed because of common dependency conflicts

16:33 teemujin: ok thank you for that info then - Ill continue past that part - hopefully the rest will be ok?

16:34 technomancy: yeah, I think so

16:34 manutter_: You can always just go to clojuredocs.org to get the docs, it just won't be within the repl

16:34 technomancy: hm; you should get a better error message too; that is kind a crappy

16:34 manutter_: I think clojure-docs.org is more up-to-date, though?

16:34 technomancy: teemujin: can you open a github issue reporting the problem?

16:35 teemujin: ah yes sure I will - ill do so right now

16:35 technomancy: thanks

16:35 teemujin: many thanks for all you guys helping

16:35 cheers

16:35 technomancy: you can add back in clojuredocs manually too; I will make sure the next release mentions that

16:37 TimMc: clojurebot, forget anybody |is| anyone

16:37 clojurebot: I forgot that anybody is anyone

16:37 TimMc: clojurebot, forget anyone |is| anybody

16:37 clojurebot: I forgot that anyone is anybody

16:40 noprompt: dnolen: thanks for the hat tip.

17:01 upwardindex: I uberjar :aot :all and :omit true and somehow something is trying to read file data_readers.clj at run time?

17:01 https://www.refheap.com/18404

17:02 llasram: upwardindex: Yeah. data_readers.clj isn't actually a clojure source file -- it's an EDN data file

17:03 upwardindex: It needs to be available as a resource (i.e., on the classpath somehow) to work

17:04 upwardindex: llasram: is that recent? 1.5?

17:07 llasram: am I right to conclude that applets cannot simply be uberjars anymore?

17:10 egghead: applets, hissssss

17:12 mercwithamouth: hi, would anyone say haskell is much harder to get a grasp on than clojure?

17:13 Rubix: mercwithamouth: the answer is contextual. In the extreme.

17:13 nDuff: mercwithamouth: I wouldn't say that it's harder to learn. It's harder to use for real-world programs involving lots of side effects.

17:14 mercwithamouth: hmm, fair enough

17:14 nDuff: mercwithamouth: ...but before you start getting into the real-world side of it (heck, even after you do), haskell has a lot of conceptual beauty.

17:14 * nDuff certainly considers it worth learning.

17:14 dobry-den: Anyone doing Clojure Cup?

17:15 mercwithamouth: nDuff: it's syntax looks rather scary though cleaner than clojure(at first)

17:15 or well it seems like a HUGE language...

17:15 technomancy: depends on how you feel about memorizing a lot of precedence rules

17:15 rurumate_: seangrov`: thanks (sorry I'm a bit slow)

17:16 something: is there any good way to make a vector into a queue? since conj and pop make it work like stack, but queue seems more difficult

17:16 amalloy: &(into clojure.lang.PersistentQueue/EMPTY [1 2 3 4])

17:16 lazybot: ⇒ #<PersistentQueue clojure.lang.PersistentQueue@e41ad382>

17:16 amalloy: doesn't print nicely, but works fine

17:17 something: then conj and pop work opposite?

17:17 amalloy: they act like queues

17:17 coventry: Is there a function which gives an empty version of whatever collection is passed? Like (cond (list? arg) () (vector? arg) [] etc.

17:17 amalloy: coventry: have you tried...empty

17:17 rasmusto: ,(empty [])

17:17 clojurebot: []

17:18 coventry: Thanks.

17:19 bbloom: amalloy: sadly: ##(empty 123)

17:19 lazybot: ⇒ nil

17:19 bbloom: amalloy: i've run in to this problem several times ##(-> {:x 1} first empty)

17:19 lazybot: ⇒ nil

17:22 dobry-den: amalloy: awesome. i never would have known about that.

17:22 bbloom: amalloy: makes it hard to write generic operations that also work on maps…. MapEntries are generally vectors, except when they aren't...

17:22 dobry-den: PersistentQueue

17:22 mikerod: I will com.stuartsierra/clojure.walk2 had a version out on clojars :)

17:23 xeqi: top

17:27 dobry-den: {:db/id #db/id[:db.part/db]

17:28 Whoops. The above is a key/val you'd use in Datomic. How can I understand what the syntax #db/id[...] is doing?

17:29 Not what it does in Datomic, but what that actually means in Clojure.

17:32 coventry: dobry-den: That is a reader literal. http://clojure.org/proposed-updates

17:34 dobry-den: coventry: awesome. thanks

17:42 coventry: I'm working on a tool which walks into a fully macroexpanded form and instruments it with tracing wrappers, sort of like emacs's edebug. Different special forms in clojure need different wrapping logic, and I've grouped the forms where I can use the same logic into maps and sets, which I then dispatch off in a big cond. It feels clumsy. I welcome suggestions about better ways to do it. https://www.refheap.com/18409

17:42 (BTW, I haven't written the handlers for the different logic, so that code is untested and probably contains errors. I'm just looking for suggestions about the overall organization at the moment.)

17:43 seangrov`: coventry: Sounds pretty interesting to use, but no suggestions

17:46 mimieux: Hi all

17:46 !

17:47 How would be the fn signature for a send to agent call?

17:49 technomancy: mimieux: should take the current value of the agent plus any other args you provide to send

17:50 mimieux: technomancy: Ok, I got it.

17:58 clj_newb_2345: i'm switching off of emacs live

17:58 anyone have a suggestion for a tutorial on manually settting up a powerful emacs / clojure setup?

17:58 something like "emacs/clojure" from scratch in the spirit of "linux from scratch"

17:58 a tutorial that walsk me through what to isntall, why I wnat to use it, and how to use it

17:58 technomancy: clj_newb_2345: start here: https://github.com/technomancy/better-defaults

17:59 clj_newb_2345: that's it?

18:00 technomancy: I've been meaning to write such a guide about recommended packages but haven't gotten much done yet

18:00 clj_newb_2345: I was thikning more alonnt the liens of nrepl, paredit, git stuff, ...

18:00 technomancy: https://github.com/technomancy/emacs-starter-kit/blob/v3/README.markdown

18:01 clj_newb_2345: it doesn't do anything besides lnk to better-defaults

18:01 are you resting on your laurels from writing lein these days? :-)

18:01 technomancy: right; see the big "TODO"? =)

18:01 that's where it would go

18:02 visualize some nicely-typeset, conversational prose walking you through which packages you should care about and why

18:02 that's the starter kit v3; currently a work in progress

18:03 rasmusto: clj_newb_2345: magit, nrepl.el, paredit.el?

18:03 clj_newb_2345: we should do this

18:03 we should force every contributor to clojure.core / clojure.contrib to lsit out which emacs packages they use

18:03 that'd be enough for me

18:03 technomancy: I would add smex, idle-highlight, find-file-in-project, ido-hacks, elisp-slime-nav

18:05 also http://p.hagelb.org/nrepl-words.el.html obviously

18:05 egghead: all the nice ido stuff disappear when I left starter-kit for better-defaults

18:06 technomancy: really don't like the default nrepl-words-of-inspiration

18:06 egghead: lol

18:07 clj_newb_2345: random curiosity

18:07 has the clojure data structures by any chance ported to emacs?

18:08 technomancy: clj_newb_2345: emacs lisp doesn't have the necessary means of abstraction to create new data structures

18:09 clj_newb_2345: technomancy: what?

18:09 emacs lisp is a lisp

18:09 lisps are powerful

18:09 powerful things can create new data structures

18:09 wtf

18:10 dnolen: technomancy: huh really, I see it has a vector type

18:10 technomancy: clj_newb_2345: emacs lisp is designed around the notion that mutable cons cells should be good enough for anyone

18:10 dnolen: sure, it ships with vectors out of th ebox

18:10 but no one uses them; they are terrible

18:11 they implicitly quote their contents, and none of the list-centric existing functionality works on them

18:11 and anyway, you can't define new data structures beyond structs; nothing that can be anything close to first-class

18:12 hiredman: quoted mutable lists are lots of fun

18:12 callen: technomancy: you could do it.

18:12 it just wouldn't be fun.

18:12 dnolen: technomancy: oof implicit quoting, killer

18:12 technomancy: right

18:12 callen: even if you had immutable lists, you couldn't get immutable strings

18:13 (at least without sacrificing interop)

18:13 it is a tale of heartache and woe

18:13 callen: yeah I'm not expecting interop

18:14 I'm talking about a clj-universe-unto-itself in elisp.

18:14 built from the decaying corpses of bindat trees.

18:14 technomancy: http://technomancy.us/159

18:14 callen: so yeah, it's doable, but you shouldn't do it.

18:15 technomancy: right; it would be more like Kawa than Clojure

18:15 callen: more or less.

18:15 but I'm not bothered that much by elisp, so I wouldn't do it.

18:17 technomancy: equality in elisp/cl is so gross =\

18:17 callen: core.async in Emacs would be fucking cool though :)

18:17 technomancy: I'd take referential transparency over homoiconicity any day

18:17 callen: probably the strongest argument I know of for editors based on JS like LightTable.

18:17 technomancy: I'm headed in that direction, but I originally showed up to this party for the Lisp, not the FP.

18:18 technomancy: I think it means I'm getting old

18:18 callen: I do FP as a means to an end (preserving my sanity)

18:18 technomancy: valuing correctness over flexibility

18:18 callen: I like to think of principled, well designed flexibility as a means to producing correct-ness.

18:18 I think I'm in line with hickey on that.

18:19 I think part of the problem with correct-ness is that all, *all* programs will forever and always be under-specified by their very nature - and should be. that's part of what makes producing software economical. You have to pick your battles.

18:20 I'm not hostile to referential transparency or type-assisted programming by any means, I just refuse to be wholly subservient to either.

18:23 technomancy: sure; I just mean if I had to pic kone

18:27 callen: technomancy: mind a query?

18:27 I won't be offended if you don't want me to bug you.

18:27 technomancy: sure

18:46 noprompt: lein cljsbuild example <-- i want this.

18:46 CaptainLex: I mispronounced "doseq' when I read it the first time

18:46 rasmusto: CaptainLex: did you pronounce it like the beer?

18:46 CaptainLex: I thought "I don't always work with side effects, but when I do - I use doseq"

18:47 rasmusto: CaptainLex: :)

18:47 CaptainLex: rasmusto: You guessed it!

18:47 dnolen: noprompt: something more thnan this? http://github.com/swannodette/hs-async/blob/master/project.clj

18:47 s4muel: Hahahaha.

18:47 noprompt: or rather `lein cljsbuild sample`

18:47 dnolen: i want to see it on the cli though

18:47 dnolen: oh right, just to remember the options?

18:48 noprompt: dnolen: yeah. some of the more esoteric options i forget and either have to look it up or dig through my projects.

18:57 including lein <command> sample seems like it would be a good staple for plugins with several options

18:58 having to revisit the READMEs or the source is a bit of a drag sometimes :/

18:58 MisterSinister: Speaking of Leiningen - how do I include local jars in a Leiningen project (i.e. without having them be in some repository online)?

18:59 noprompt: guess i'll could always roll up my sleeves and pitch in :)

19:00 seancorfield: core.async has found its way into our code base :)

19:00 MisterSinister: I've tried reading the various online stuff about local jars and Leiningen, and *none* of them make much sense to me

19:02 technomancy: MisterSinister: probably because the question doesn't really make sense

19:02 why are you trying to avoid repositories?

19:03 MisterSinister: technomancy: So if I have a jar of Clojure utilities that only I ever use, I still have to reposit it somewhere before Leiningen can automatically manage it?

19:04 technomancy: sure

19:04 dissipate__: what's the best book for learning in depth about macros? joy of clojure?

19:04 MisterSinister: OK then.

19:04 technomancy: is `lein deploy clojars` too much work?

19:04 MisterSinister: technomancy: I get your point.

19:04 CaptainLex: dissipate_: I too wonder about this!

19:05 MisterSinister: Yeah - I'd like a resource on macros too, since I suck at them.

19:07 dissipate__: hmm, the current 'joy of clojure' book only looks like it has about 20 pages on macros

19:07 MisterSinister: dissipate_: The others aren't much better.

19:08 dissipate__: that sucks.

19:08 MisterSinister: The only macro-focused book I know of is Paul Graham's 'On Lisp', but that's targeted at CL, not Clojure.

19:08 dissipate__: super lame

19:08 MisterSinister: It's got some good tips and ideas, but having to convert across the languages is annoying as fuck.

19:08 Mostly because I really dislike CL syntax.

19:09 CaptainLex: MisterSinister: It's good for theory, though, right?

19:09 llasram: When I started using Clojure I was pretty excited about the potential of macros. In practice, you don't use them very often, and there really isn't anything "hard" about how you do use them

19:09 CaptainLex: I don't really understand the full theoretical power of macros

19:09 dissipate__: MisterSinister: but clojure smells of the 'cube farm'

19:09 MisterSinister: CaptainLex: I *guess* so, but I'm not the best person to ask, honestly.

19:09 dissipate_: Explain?

19:09 llasram: They're built-in code-generation in the same language you're writing in in the first place

19:10 dissipate__: MisterSinister: see this screed on clojure: http://www.loper-os.org/?p=42

19:10 llasram: Which is amazing, but also not that difficult to get a handle on if you've gone code-generation anywhere else

19:11 dissipate__: "Clojure is the False Lisp, which Reeketh of the Cube Farm. A Lisp unworthy of the name; one which encourages users to pepper their code with calls to opaque routines having no underlying Lispiness. A Lisp which barfs Java stack traces. It promotes – no, mandates - the use of undigestable foreign matter in Lisp code: primitives on which you cannot pop the hood to reveal intelligible innards."

19:11 llasram: So hilarious

19:11 MisterSinister: dissipate_: I think that's a *little* extreme.

19:11 I guess for me, this is less of an issue, given that the programming I have to do is mostly for academic purposes.

19:11 nDuff: The purists have a point. But that doesn't mean they can actually get anything *done* in their pure little world.

19:11 arrdem: MisterSinister: it's comming from the loper-os guy. what did you expect?

19:12 MisterSinister: Which means I don't have to use Java for... pretty much anything.

19:12 CaptainLex: Yeah, I originally got into Clojure so I could use a specific Java library

19:12 I'd probably be focusing more on Scheme if outside libraries weren't a concern :P

19:13 dissipate__: MisterSinister: he does have a point, but it is exaggerated.

19:13 CaptainLex: (Though I also really like Clojure's focus on immutability, which I think is missed too often by LISPs)

19:13 MisterSinister: CaptainLex: I quite like the immutability as well. It makes it a hell of a lot easier to write programs for hacks like me. :P

19:13 arrdem: nDuff: yeah were one too bootstrap a simple bytecode interpreter capable of hosting Clojure from clojure onto raw metal, you may have a "pure" system but that doesn't make it useful in the slightest.

19:14 dissipate__: MisterSinister: what about the Java stack traces?

19:14 noprompt: oh that article and the comment thread are a riot.

19:14 some gems in there.

19:14 MisterSinister: dissipate_: My programs don't exceed 300 SLoC of Clojure in most cases.

19:14 OK, I get an ugly stacktrace.

19:14 dissipate__: noprompt: i think the post is a riot. but why the comments?

19:14 MisterSinister: It's not like it's gonna matter much in a program of that size.

19:15 noprompt: dissipate_: quotes like "Fine… I will dine on chocolate ice cream while you eat “filtered” liquid shit."

19:15 dissipate__: hehehe

19:16 MisterSinister: Plus, if I don't use mutable state (referentially-transparent functions and so on), I can just test each bit individually and incrementally.

19:16 noprompt: "My position is that lying is wrong, and that a turd is still a turd even when you call it sausage and eat with relish. "

19:16 dissipate__: noprompt: i didn't see any linkage to this guy's 'beautiful' common lisp code

19:16 MisterSinister: dissipate_: Sorry, CL syntax is pretty hideous.

19:16 I know that car and cdr have historical origins.

19:16 But honestly?

19:16 noprompt: dissipate_: he's probably too busy dining on his ice cream to write any software.

19:16 CaptainLex: CL is undeserving of being the default LISP :P

19:16 MisterSinister: CaptainLex: I think it got that title by default.

19:16 technomancy: CaptainLex: MACLisp 4 lyfe

19:17 dissipate__: noprompt: he's a big baller common lisp shot caller. everyone else is in a 'cube farm'

19:18 CaptainLex: technomancy: I think I'd be rep Scheme myself, except all the SLoC of LISP I've written in the past six months have been in clj or cljs

19:18 Those two languages are so useful :(

19:18 (If I were into systems, it'd be Guile, but seriously, who does that?)

19:18 technomancy: http://vintage-digital.com/hefner/misc/lisp-programmers.jpg

19:19 MisterSinister: So.... we're the Borg?

19:19 I take that as a compliment. :D

19:19 technomancy: related: http://www.motivateusnot.com/resize.php?name=LzM3OC9DYXB0YWluLUphbWVzLVQuLUtpcmstSSdtLXNvcnJ5LC1JLWNhbid0LWhlYXIteW91LW92ZXItdGhlLXNvdW5kLW9mLWhvdy1hd2Vzb21lLUktYW0uanBn&w=550&h=9999&extension=.jpg

19:19 CaptainLex: Hahaha Scheme is Spock! :O

19:19 :D*

19:19 noprompt: technomancy: that's halurious. :P

19:20 the ruby one cracks me up.

19:20 smalltalk is bill nye the science guy. can it get any funnier?

19:20 CaptainLex: Hahahaha @ Javascript

19:21 I have never even heard of Arc, Forth, or Factor

19:21 technomancy: arc should have been wesley crusher

19:21 llasram: Total missed opportunity

19:21 technomancy: other than that it is perfect

19:21 dissipate__: CaptainLex: Arc is Paul Graham's experimental LISP langauge

19:22 MisterSinister: The ASP.Net one amuses me the most.

19:22 technomancy: racket can be zachary quinto's spock

19:25 noprompt: dissipate_: "Right now I have very little working code. " -- loper-os

19:25 he goes on to say " This is because I have spent much of my time so far developing an understanding of the Lisp Machine systems which inspired Loper, and of the X86-64 architecture – the only consumer-market CPU sufficiently capable for my purposes."

19:27 a commenter says "Sounds like you might be kind of a douche. Ever thought about redesigning the car? Because driving with my feet always made more sense that these hands on a clumsy wheel."

19:27 that about sums it up.

19:30 rasmusto: haha, just got to the icecream comment

19:31 MisterSinister: Ice-cream is tasty. That was a derp comment. :P

19:32 CaptainLex: I actually find myself on loper-os's side, philosophically

19:32 But in the short-term, I'm a turncoat :P

19:32 MisterSinister: I just consider it too extreme a position. I get a mental image of Angry German Kid while I read that.

19:32 Yelling 'STOP LIKING WHAT I DON'T LIKE!'

19:32 dissipate__: CaptainLex: how are you on his side philosophically? he's butt hurt that common lisp got pushed aside

19:32 MisterSinister: (In German)

19:33 CaptainLex: dissipate_ MisterSinister: I also think it's an extreme position, but I'm all about compromise in situations like this.

19:34 I would like to have a Lisp-All-the-Way-Down, but I'd also like to have widespread adoption of LISP and functional design patterns

19:34 MisterSinister: CaptainLex: Does that article have much of a compromisory tone?

19:34 CaptainLex: It doesn't matter to me what order they come in

19:34 MisterSinister: 'Compromise' requires both sides to be OK with giving a little. This guy isn't giving a millimeter.

19:34 CaptainLex: No, I know. I mean

19:34 I agree with him, but I am compromising

19:35 In 50 or 100 years, I'd be on his side. If Clojure took the world by storm and enterprise became functional, I'd start telling them to implement it all in pure LISP from the beginning

19:35 hiredman: use belt cpus

19:35 dissipate__: CaptainLex: enterprise is broken and seems like it always will be no matter what language enterprise is using

19:35 MisterSinister: The thing is, in 50 or 100 years, we might well have strong AIs to do all our programming for us, and all we'd need is a specification language, making this whole thing meaningless.

19:36 Here and now is what counts.

19:36 dissipate__: CaptainLex: don't expect *any* language to fix enterprise, period

19:36 MisterSinister: And also, I'm not in any way selfish to say that I evaluate a language based on how much it serves my needs.

19:36 Clojure serves my needs. Therefore I like it and use it.

19:36 dissipate__: CaptainLex: if enterprise adopted clojure, they would just crank out bad clojure code

19:36 CaptainLex: Haha I don't mean functional like it works, I mean functional like using FPLs :p

19:37 dissipate__: CaptainLex: how would FP fix enterprise, at all?

19:38 CaptainLex: dissipate_: It'd make my skillset more marketable xP

19:38 Raynes: I agree with dissipate__ -- FP doesn't make shitty coders less shitty.

19:38 MisterSinister: Raynes: I would argue it makes shitty coders shittier.

19:38 dissipate__: CaptainLex: yeah, you might make more money, but get ready to deal with a bunch of Java heads who have 0 concept of craftsmanship.

19:38 MisterSinister: Since FP actually requires more thinking.

19:39 Raynes: MisterSinister: I would disagree because I think the premise is untrue.

19:39 MisterSinister: Raynes: Could you explain that a bit more?

19:39 CaptainLex: MisterSinister: Sadly, you're probably correct. I'd ideally hope that it would force everyone think more, but probably not

19:39 Raynes: FP doesn't require more thinking. Haskell requires more thinking. You can mostly take a dump in a .clj file and have it work just fine.

19:40 dissipate__: CaptainLex: no, they wouldn't think more. if they thought more, their code would already be a lot better.

19:40 MisterSinister: Raynes: In that case, we agree.

19:40 dissipate__: CaptainLex: perhaps Haskell is your savior. but i don't see that being adopted by enterprise *anytime* soon

19:40 noprompt: how does one become less "shitty" at anything?

19:41 CaptainLex: dissipate_: Perhaps so. I've often thought it was the most enterprise-ready FPL, though

19:41 Brand0: practice

19:41 MisterSinister: noprompt: Practice? Thinking? Work?

19:41 dissipate__: noprompt: acknowledge you are doing stuff badly and correct your actions

19:41 MisterSinister: dissipate_ is right - knowing you suck is the first step in improvement.

19:41 sdegutis: Raynes: which I often do.

19:41 rigger: choosing good peers

19:41 MisterSinister: rigger: And mentors.

19:41 dissipate__: CaptainLex: but enterprise has a huge culture problem, and that is namely rewarding programmers who dump out shit code

19:41 noprompt: i guess that's probably it then.

19:42 i always feel like i'm "shitty" programmer.

19:42 rigger: and actually caring about improving your skill set

19:42 noprompt: so i'm always practicing.

19:42 rasmusto: "sharpening the saw"

19:42 dissipate__: CaptainLex: you can make six figures cranking out shit code

19:42 noprompt: and constantly banging out shitty code.

19:42 dissipate__: that's a culture problem

19:42 that will not be fixed by any programming language

19:42 CaptainLex: dissipate_: Definitely true. But I'm young and idealistic! I wanna change the woooooorld!

19:42 MisterSinister: noprompt: I always feel like I'm shitty in everything I do. Funnily enough, this has been my most productive year. :P

19:43 CaptainLex: I guess some of us have been disabused of that notion. :P

19:43 noprompt: MisterSinister: yes, it's always interesting when you look back and see how much you've accomplished.

19:43 dissipate__: CaptainLex: find a shop where people care about their craft. that's what i recommend.

19:43 nDuff: "enterprise", eh.

19:43 MisterSinister: noprompt: I prefer to look forward. Right now, my supervisor is pushing me to publish a paper in SToC.

19:43 * nDuff isn't sure that it's a useful label.

19:43 MisterSinister: Which is *crazy-hard*.

19:44 Raynes: noprompt: You're not a shitty programmer.

19:44 noprompt: i can atest to the hypothesis that deliberate practice and interest is key to becoming less "shitty".

19:44 * Raynes pats noprompt on the back.

19:44 * MisterSinister pats noprompt on the back too.

19:44 * noprompt tries to bite his ear and lick his elbow.

19:45 rasmusto: its friday, isn't it

19:45 MisterSinister: Saturday for me.

19:45 * nDuff has been at large companies that wouldn't know good code if it hit them in the head, and at least one medium-sized one with a crazy-high bar... but wouldn't say that the latter (with its focus on building at scale) was really less "enterprise".

19:45 rigger: i work at a company that has 1M (yes one million) lines of csh as a core of an application

19:46 noprompt: i've been teaching an introductory javascript class and i really stress the importance between practicing and becoming a better programmer.

19:46 MisterSinister: noprompt: Where do you teach?

19:46 hiredman: rigger: I smell the next clojurescript compiler target

19:46 rigger: and the guy who made that decision is still working for the company :|

19:46 noprompt: MisterSinister: it's just a six week intro class through one of the tech companies here in fresno.

19:46 dissipate__: noprompt: why aren't you teaching clojurescript? :P

19:46 rasmusto: cljs -> tcsh -> csh

19:47 arrdem: cljs -> c?

19:47 noprompt: dissipate_: i'm teaching *beginners*

19:47 MisterSinister: noprompt: Ah, I see. I figure pretty much everyone here is from the States.

19:47 noprompt: naturally i'm taking the functional route.

19:47 dissipate__: clojurescript isn't for beginners?

19:47 noprompt: dissipate_: :P

19:48 there seems to be a consensus that if you teach functional programming before object oriented it's easier for the student to understand.

19:48 rigger: i believe that to be a fair statement

19:48 noprompt: interestingly enough it seems to be true.

19:48 MisterSinister: noprompt: I only wish my university would let me *show* this.

19:48 rigger: i learned lisp/scheme before c++ then java

19:48 MisterSinister: Since around here, they have OO on the brain so hard, they might as well be a cult.

19:48 dissipate__: yeah, i think FP should be taught, but OO is absolutely entrenched

19:49 MisterSinister: There is actually a non-trivial subset of the teaching staff at the university who honestly believe that Object Oriented Design (no programming, just the theory) should be a first-year class.

19:49 Before *any* programming gets taught.

19:49 *That's* how bad it is.

19:49 wkelly: get some UML up in there!

19:49 dissipate__: oh hell no

19:49 UML?? oh hell no

19:49 MisterSinister: wkelly: Kill me now.

19:49 arrdem: MisterSinister: ah here at UTAustin that _was_ a first year class

19:50 wkelly: haha

19:50 noprompt: dissipate_: i definitely had an option and took advantage of the situation to do the "right" thing.

19:50 MisterSinister: arrdem: My sympathies.

19:50 arrdem: MisterSinister: I survived and learned clojure :D

19:50 dissipate__: noprompt: how are you doing the right thing?

19:50 MisterSinister: arrdem: I did too. I just wish other people could take a less painful pathway.

19:50 arrdem: MisterSinister: I'm not convinced it was actually a bad thing... there are some domains for which OO does make sense

19:50 noprompt: dissipate_: by the quotes i meant what i think is right.

19:51 arrdem: MisterSinister: in fact I'm trying to draw an OO model for my next clojure app as I type

19:51 noprompt: dissipate_: and that is teaching the students to learn how to program in a functional style with JavaScript.

19:51 MisterSinister: arrdem: Teaching it as the One True Model of programming and saying it's the best thing since sliced bread?

19:51 arrdem: MisterSinister: yeah that's a load of ****

19:51 MisterSinister: I will (grudgingly) accept that OO is useful *sometimes*.

19:51 But this is *definitely* not the way it gets taught at my uni.

19:51 noprompt: MisterSinister: i don't dis OO in class and don't deny it's usefulness.

19:51 CaptainLex: My University used to have its intro class for majors taught in Scheme (such as when I was a freshman)

19:52 MisterSinister: noprompt: I'm a Master's student. I'm done with classes. :P

19:52 CaptainLex: They just approved a plan to change it to Python, then Java, THEN Scheme

19:52 arrdem: MisterSinister: I'm jelly

19:52 MisterSinister: arrdem: Why would you be jelly? You wanna be an algorithm researcher?

19:52 noprompt: MisterSinister: however, being skilled with functional programming in JS is far more useful than OO.

19:52 dissipate__: noprompt: fair enough

19:52 arrdem: MisterSinister: the grad student part, not the research :P

19:53 MisterSinister: noprompt: You don't need to convince me. I dislike OO. :P

19:53 hyPiRion: well gurr. Polymorphism is good, not sure what classes are.

19:53 MisterSinister: arrdem: It's a lotta work, because my supervisor is a slavedriver.

19:54 dissipate__: isn't it funny that in the past decade OO best practices have essentially gutted inheritance?

19:54 arrdem: hyPiRion: classes are an excuse to complect datastructures and fns

19:54 noprompt: hyPiRion: completely agree.

19:54 MisterSinister: dissipate_: Yeah, I read 'Operator new considered harmful' too. :P

19:55 dissipate__: arrdem: complect data structures??

19:55 lazybot: dissipate__: Uh, no. Why would you even ask?

19:55 hyPiRion: arrdem: I'd rather say that it complects state and value, although I get your point.

19:55 noprompt: it's funny. as bad as javascript could be it could be a lot worse.

19:56 dissipate__: ah, i see

19:56 hyPiRion: objects are used to hide data, essentially

19:57 hyPiRion: Well, the main issues with js is weak typing, scoping rules and namespace issues, isn't that it?

19:57 dissipate__: hyPiRion: don't forget objects and mutable state

19:57 CaptainLex: dissipate_: To be fair, that's not a bug, that's a feature

19:57 The earlier things are pretty universally condemned

19:58 hyPiRion: Well, that could be dealt with. It's harder to change scoping rules and namespacing

19:58 yeah, what CaptainLex said

19:58 noprompt: hyPiRion: yes there are those issues. but for beginners just trying to get started you can impress upon them some good practices w/o getting too deep.

19:58 technomancy: hyPiRion: equality too

19:59 MisterSinister: Speaking of equality: Why does CL have like, four equality tests?

20:00 hyPiRion: three

20:00 noprompt: Raynes: so are you like a core elixir team member now or something? ;)

20:00 ThatOneGuy: because CLOS

20:00 :P jk I have no idea

20:00 hyPiRion: eq, eql, equal

20:00 MisterSinister: Isn't there a string equal thing or something as well?

20:01 hyPiRion: that's equal

20:01 CaptainLex: Scheme has some of them too

20:01 One is pointers-equals, one is value

20:01 arrdem: when does the clojure challenge start?

20:01 CaptainLex: For performance reasons

20:01 noprompt: damn this mrhyde lib is kinda cool

20:01 hyPiRion: oh right, string equal is kind of performancey

20:01 arrdem: s/challenge/cup/

20:01 dfuenzalida: you also have (.equals "foo" "bar") with Java interop

20:02 technomancy: MisterSinister: pretty sure there's more than four actually

20:02 equalp

20:02 MisterSinister: technomancy: Maybe. CL is a huge language and I don't even pretend to know most of it.

20:02 technomancy: it's insane

20:02 (equality specifically)

20:02 clojurebot: egal?

20:02 clojurebot: egal is http://home.pipeline.com/~hbaker1/ObjectIdentity.html

20:02 technomancy: MisterSinister: ^ great coverage of why it's necessary in CL and why that's a horrible thing

20:02 Brand0: Dang, I cannot get clojure.contrib to load

20:03 MisterSinister: I think I might enter the ClojureCup next year. Not this year - too busy.

20:03 arrdem: Brand0: first of ohai, second off contrib is dead

20:03 Brand0: arrdem, 2 the rescue

20:03 hiredman: because there is no such thing

20:03 technomancy: eq, eql, equal, equalp, =, plus then string=, char=, etc

20:04 MisterSinister: Eeeek.

20:04 Wow.

20:04 hyPiRion: oh right, equalp

20:04 MisterSinister: That's worse than I thought.

20:05 One thing I actually like about Clojure - the damn language is easy to look up.

20:05 Looking up stuff about CL is painful.

20:05 arrdem: MisterSinister: oh you want HyperDoc? good luck finding one...

20:06 MisterSinister: arrdem: I've tried reading HyperDoc. It's not fun.

20:06 The first Lisp I tried was CL.

20:06 Yeah.... Clojure was much easier.

20:07 arrdem: MisterSinister: yeah the clojure-doc, clojuredocs and github.com/clojure documentation may be confising but at least you can always (doc) or find the docs with a single google search

20:07 MisterSinister: arrdem: I actually found all of those things to be really easy to work with.

20:07 Also, why is ClojureDocs stuck at Clojure 1.3?

20:07 arrdem: MisterSinister: it got abandoned I think

20:07 MisterSinister: Awwwwwwwwww.

20:07 That sucks.

20:08 noprompt: ,e,s

20:08 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: e in this context, compiling:(NO_SOURCE_PATH:0:0)>

20:08 MisterSinister: The examples of use on there are so useful.

20:08 arrdem: MisterSinister: someone else here has an examples site...

20:08 MisterSinister: that's new shiny and active

20:08 MisterSinister: arrdem: Link please?

20:08 arrdem: MisterSinister: trying to remember...

20:09 MisterSinister: brain cache fault, incurring google latency..

20:09 brainproxy: I suggested that Clojure's API be adapted to DevDocs

20:09 MisterSinister: Happens to all of us.

20:09 brainproxy: the maintainer said he would at least think about it :)

20:09 * noprompt needs to stop styling everything to look like a terminal.

20:10 arrdem: noprompt: false. my new buisness cards look like a `whois`

20:10 MisterSinister: So, what do you guys all do? Are you all software-making folks?

20:10 noprompt: arrdem: that's so awesome.

20:10 ThatOneGuy: oui

20:10 brainproxy: if you're doing webdev and not using DevDocs, it's the bomb, give it a go: http://devdocs.io/

20:11 CaptainLex: I'm a student, and will be a software-making folk when the time comes

20:11 callen: brainproxy: no clojure? gerd dermmert.

20:11 brainproxy: callen: i asked for it

20:11 arrdem: CaptainLex: I'm still a college undergrad but aspire to the `hacker` and `lisper` mixins. `sofware-maker` seems inevitable.

20:12 brainproxy: callen: you can voice your support for clojure here: https://trello.com/c/PVnfdeaN/26-suggest-new-docs-here

20:12 CaptainLex: arrdem: My long term goal is indie game dev, but until then I'll be a contractor

20:12 callen: brainproxy: I'd rather not ask, and just use dash.

20:12 brainproxy: https://itunes.apple.com/us/app/dash-docs-snippets/id458034879?mt=12 you can upload your own docs, you don't have to beg some dude with a website.

20:13 noprompt: brainproxy: that's pretty cool.

20:13 MisterSinister: arrdem and CaptainLex: Nice. I got the impression everyone here was a professional already. :P

20:13 brainproxy: callen: cool, wasn't aware of dash

20:14 noprompt: callen: has that app gotten better? it used to be kinda "balls" to use a "modern" adjective.

20:14 brainproxy: callen: hopefully at some point the maintainer will turn it into a community effort, where new docs can be submitted by pull request, you can fork and run your own devdocs, etc.

20:14 arrdem: MisterSinister: nah. hyPiRion and a bunch of other people are academic(ish) too but for the most part it's library maintainers, the honorable technomancy and fulltime clj-users

20:14 noprompt: fuck it. i give up. i'm not getting anything done today.

20:14 CaptainLex: MisterSinister: I'm a "professional" in some senses, but basically not :P

20:14 arrdem: noprompt: needs more redbull. I've had to much so IRC.

20:15 MisterSinister: arrdem: Ah, I see.

20:15 dobry-den: Damn, I love Schema

20:15 MisterSinister: Also, lol at 'the honourable technomancy'.

20:15 arrdem: $karma leiningen

20:15 lazybot: leiningen has karma 2.

20:15 hyPiRion: I'm a professional Swearjure programmer, but that's about it.

20:15 MisterSinister: Swearjure?

20:15 clojurebot: Swearjure is http://hypirion.com/swearjure

20:16 MisterSinister: Lol.

20:16 hyPiRion: ~quicksort

20:16 clojurebot: quicksort is https://www.refheap.com/paste/284a0552a6b69c6037faa2db5

20:17 arrdem: hyPiRion: I'm still in awe of how far you've gotten that.

20:17 MisterSinister: This feels like reading Brainfuck.

20:17 CaptainLex: hyPiRion: Hahahaha that's awesome

20:18 callen: noprompt: it's usable. I like it.

20:18 CaptainLex: I've always wanted an esolang that wasn't just more stack manipulation nonsense

20:19 hyPiRion: Yeah, this is splice unquoting abuse and SKI calculus hacks and whatnot

20:20 MisterSinister: hyPiRion: Now write eval in Swearjure. :P

20:21 hyPiRion: Hrm. It's possible to write eval in Swearjure for Swearjure code, but not sure you can further than that

20:21 MisterSinister: Also, what can we do with the clojurebot?

20:22 hyPiRion: ,((-> [!] #([!](+))) (*))

20:22 clojurebot: 1

20:23 MisterSinister: So I can feed it s-expressions starting with a comma, and it'll eval them?

20:23 hyPiRion: yea

20:23 h

20:23 MisterSinister: ,(+ 1 2)

20:23 clojurebot: 3

20:23 MisterSinister: Whee.

20:23 It's like a talking REPL.

20:23 dissipate__: can i feed it sex expressions?

20:23 llasram: There's also lazybot!

20:24 &(println "hi")

20:24 lazybot: ⇒ hi nil

20:24 MisterSinister: dissipate_: Try it.

20:24 llasram: And also ##(println "hi")

20:24 lazybot: ⇒ hi nil

20:24 MisterSinister: Just make sure you use prefix notation. :P

20:24 dissipate__: ,8====D

20:24 clojurebot: #<NumberFormatException java.lang.NumberFormatException: Invalid number: 8====D>

20:24 MisterSinister: What's the difference between the bots?

20:24 llasram: They're entirely different bots :-)

20:24 TEttinger: MisterSinister, yes

20:24 ,(range 1 10)

20:24 clojurebot: (1 2 3 4 5 ...)

20:24 TEttinger: &(range 1 10)

20:24 lazybot: ⇒ (1 2 3 4 5 6 7 8 9)

20:24 dissipate__: ,(fib 5)

20:24 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: fib in this context, compiling:(NO_SOURCE_PATH:0:0)>

20:26 MisterSinister: I'm guessing I shouldn't feed the bot infinitely-recursive things?

20:26 technomancy: try it and see

20:26 MisterSinister: Or ask it to realize an infinite seq? :P

20:27 ,(doc iterate)

20:27 clojurebot: "([f x]); Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"

20:27 technomancy: unless you are more devious than Raynes and xeqi you can't hurt it

20:27 MisterSinister: ,(iterate inc 0)

20:27 clojurebot: (0 1 2 3 4 ...)

20:27 MisterSinister: I doubt I'm more devious.

20:27 I was just curious.

20:27 rasmusto: &(iterate inc 0)

20:27 lazybot: java.lang.OutOfMemoryError: Java heap space

20:27 MisterSinister: So now I know the difference between the bots.

20:30 Raynes: xeqi is the only one who can break lazybot.

20:31 MisterSinister: I'll take your guys' word for it.

20:32 hyPiRion: Raynes: http://clojure-log.n01se.net/date/2012-12-17.html#22:30

20:33 Not sure if it's breakage, but still proud of that one

20:33 MisterSinister: Wow....

20:33 I am such a programming noob.

20:36 CaptainLex: hyPiRion: You are my hero. That's incredible!

20:36 ThatOneGuy: we all are. no one knows everything

20:37 MisterSinister: Yeah, that is pretty incredible.

20:37 Raynes: hyPiRion: amalloy thinks that this was the final straw that made us ignore clojurebot in lazybot.

20:37 hyPiRion: Good work.

20:37 hyPiRion: Raynes: yeah, I know

20:38 MisterSinister: ,((fn [x] (list x (list (quote quote) x))) (quote (fn [x] (list x (list (quote quote) x)))))

20:38 clojurebot: ((fn [x] (list x (list (quote quote) x))) (quote (fn [x] (list x (list (quote quote) x)))))

20:38 hyPiRion: CaptainLex: haha. Well, I've mostly done very... unorthodox things with Clojure. I haven't made anything extremely useful

20:38 Raynes: hyPiRion: You've contributed quite a bit to leiningen. You're doing fine

20:39 llasram: Indeed!

20:39 ztellman: unorthodox things are the best things

20:39 llasram: (inc hyPiRion)

20:39 lazybot: ⇒ 23

20:39 CaptainLex: You know what would be useful? If you could make the bots output things to each other indefinitely

20:39 Raynes: (inc hyPiRion)

20:39 lazybot: ⇒ 24

20:39 Raynes: CaptainLex: That's exactly what hyPiRion did which we made impossible afterwards.

20:39 MisterSinister: (inc hyPiRion)

20:39 lazybot: ⇒ 25

20:39 CaptainLex: Hahahaa :(

20:40 MisterSinister: Alrighty, I think I better get some actual work done. Thanks all, it's been fun.

20:40 hyPiRion: Oh, you guys

20:41 CaptainLex: I better take a break too! Food's on, plus I oughtta finish the enlive business

20:41 I think IRC is wonderful I love having communities around :)

20:41 technomancy: it is the best.

20:42 CaptainLex: Oopsy put a delimiter in there somewhere

20:42 technomancy: it's ok, commas are whitespace

20:42 CaptainLex: (partition 5 "I think IRC is wonderful I love having communities around")

20:42 mmoriarity: not enough irc in the world

20:43 CaptainLex: Need more IRC IRL

20:44 ThatOneGuy: …pub coding meet-ups?

20:44 …hacker spaces?

20:45 Pupnik_: game jams

20:45 CaptainLex: My metro did just git a hacker space recently

20:45 I have no memory of where it is

20:49 TEttinger: Raynes, if you have two bots that auto-announce youtube links... https://www.youtube.com/watch?v=O1QZqQQOPfs

20:49 thank god

20:50 the title of that video was meant to test title and eval stuff

20:51 Raynes: TEttinger: Already had that problem once.

20:51 Fixed it too.

20:51 TEttinger: one channel I'm in has two bots like that, and I set up "~whatis annoying" to yield that video

20:52 Raynes: $title https://www.youtube.com/watch?v=O1QZqQQOPfs

20:52 lazybot: "##(str " http://www.youtube.com/watch?v=O1QZqQQOPfs ") ; noto - YouTube"

20:52 Raynes: I used to have that on all the time.

20:52 But people complained about it so I turned it off.

20:52 But before I did, people invented web pages with titles to cause a bot chain.

20:52 So I added the quotes around the title to stop it.

20:52 TEttinger: I have it on for youtube and youtu.be

20:52 Raynes: This was way before I ever bothered to ignore clojurebot -- I spent a lot of time trying to mitigate attacks.

20:54 TEttinger: lazybot's good stuff

20:57 Pupnik_: except for its memory usage

21:07 dobry-den: Is there a way to check for String map keys with Schema? (s/validate {"foo" s/String} {"foo" "bar"}) doesn't work while (s/validate {:foo s/String} {:foo "bar"}) does

21:13 i guess {(s/eq "foo") s/String} works

21:17 ambrosebs: dobry-den: looks like the way to do it.

21:20 dobry-den: ambrosebs: actually, i don't know. So, this workd: (s/validate {:foo s/String s/Any s/Any} {:foo "bar" "abc" "def"})

21:20 But not this (s/validate {(s/eq "foo") s/String s/Any s/Any} {"foo" "bar" "a" "b"})

21:20 akurilin: Random REST/MVC-related question: if I'm creating 3-4 unrelated resources from the controller of one of these resources, is that a good indication that I should create a wrapper resource for all of them?

21:21 dobry-den: Basically the error I'm getting when trying to ensure String keys is "More than one non-optional/required key schemata"

21:25 ambrosebs: dobry-den: just going by the docs I don't know.

21:32 dobry-den: https://news.ycombinator.com/item?id=6336062

21:32 dobry-den: ambrosebs: thanks, i'll close my own issue

21:35 ambrosebs: thanks for the help.

21:35 ambrosebs: dobry-den: np

21:36 yedi: how do you do 301 redirects in ring

21:38 do you just return {:status 301 :headers "Location" someurl}

21:38 akurilin: yedi, that sounds about right, I could be missing something though.

21:40 dobry-den: yedi: https://github.com/ring-clojure/ring/blob/master/ring-core/src/ring/util/response.clj

21:43 akurilin: do you have an example?

21:58 xeqi: Raynes, hyPiRion: oh, are we breaking lazybot again?

22:02 yedi: i'm trying to test if a string has an ending slash, how would I go about that?

22:02 xeqi: &(.endsWith "asdf/" "/")

22:02 lazybot: ⇒ true

22:02 xeqi: &(.endsWith "asdf" "/")

22:02 lazybot: ⇒ false

22:03 yedi: thanks

22:11 i'm trying to write a middleware for redirecting slashless uris to their slashed counterpart: e.g. (/about redirects to /about/)

22:11 can someone help me figure out what i'm doing incorrectly here: https://gist.github.com/yedi/106252dde45f40a75f89

22:14 xeqi: yedi: line 7 doesn't need to have the () around the map

22:16 yedi: ah beautiful, thanks

22:23 Raynes: xeqi: Please God no. My heart can't take it.

22:31 coventry`: Is there an easy way to change (foo) to [foo] in paredit? My current technique is C-w the current parens, do '[' at the start of the form, then C-) till the closing paren is in the right place.

22:32 amalloy: coventry`: learn to use: paredit-wrap-square, paredit-raise

22:32 coventry`: Also, anyone have a binding for saving (or reloading at the repl) a file before running its tests file with C-c C-,?

22:32 amalloy: well, i guess not raise. splice

22:33 coventry`: Oh, I see how to do it with splice. Thanks.

22:33 Well, join.

22:43 weavejester: Has anyone started using smartparens over paredit?

22:43 akurilin: What do folks use for procedurally generating parameterized queries for PG around here? Is it pretty much korma? I have all these situations where sometimes I want an insert with or without returning, sometimes with limit, sometimes sorted etc.

22:44 weavejester: And if so, how on earth do you turn paredit off globally?

22:44 akurilin: :let paredit_mode=0 , but I imagine you're not on vim :P

22:45 weavejester: Unfortunately not...

22:45 You'd have thought disabling paredit would be in the documentation somewhere

22:45 Or discoverable through Google

22:45 Raynes: akurilin: WAT YOU CAN DO THAT

22:46 weavejester: But it seems to be something no-one ever thought would be needed.

22:46 noprompt: maybe check the authors dotfiles (if they are available)?

22:46 akurilin: Raynes, what specifically?

22:46 Raynes: akurilin: I have this: command! Ptoggle call PareditToggle()

22:47 akurilin: Raynes, never used that tbh, what paredit plugin are you using?

22:47 noprompt: this core.async stuff is confusing :|

22:47 Raynes: akurilin: paredit.vim. I thought there was only one.

22:48 akurilin: Raynes, ok, just making sure

22:48 Raynes, maybe you had discovered something amazing and I wasn't aware of it

22:48 vim users need every little hack to survive against fancy emacs support :P

22:48 weavejester: It looks like the problem is that the starter-kit enables it by default, and the assumption is that if you don't want paredit, don't enable it.

22:50 noprompt: akurilin: i use emacs with vim keybindings. the only time i miss from vim is syntax highlighting for multiple modes (like erb, php).

22:51 scottj: weavejester: maybe you could redefine paredit-mode function to do nothing

22:51 akurilin: noprompt, got it. I've thought about it, but then vim fireplace happened and it eased things a little bit.

22:52 We all owe tpope big time here on the vim side

22:52 noprompt: akurilin: yeah i bailed on vim right around the time fireplace was coming out.

22:52 weavejester: scottj: Is that standard elisp practice?

22:52 scottj: weavejester: nope

22:52 weavejester: It looks like the emacs starter kit insists certain things are started, with no option not to.

22:52 noprompt: akurilin: i still use it whenever i ssh or whatever. i'm glad i know how to use it too. :)

22:52 weavejester: scottj: Thought so :)

22:53 SegFaultAX: noprompt: How did you get started with the switch?

22:53 noprompt: Did you use one of the various starter kits or did you just dive right in fresh?

22:53 noprompt: And did you start use evil mode from the start?

22:53 Using, even.

22:53 noprompt: SegFaultAX: i used the starter kit and evil-mode then spent about a month learning how to tweak various things.

22:54 SegFaultAX: i'm very happy with it. there are some annoyances, but over all i really love it.

22:54 weavejester: scottj: Aha, I took your advice, but made it slightly less hacky by overriding esk-turn-on-paredit instead.

22:55 SegFaultAX: noprompt: Can I look at your dotfiles? Are they on gh/bb?

22:55 noprompt: it's very nice to, say, have a terminal open inside your editor.

22:56 SegFaultAX: sure. https://github.com/noprompt/matilde/blob/master/emacs.d/init.el

22:56 SegFaultAX: noprompt: Thanks!

22:57 noprompt: SegFaultAX: i also discovered keychord-mode is a nice little package to install and customize too.

22:57 SegFaultAX: noprompt: As you may have seen me talking about recently, I'm trying to give emacs an honest go. I've been using vim for many many years.

22:57 noprompt: my vim config uses a lot of ,<key> stuff and keychord can help with some of that.

22:58 SegFaultAX: noprompt: Where , is your <leader>

22:58 I'm assuming

22:58 noprompt: SegFaultAX: oh sure. i like both editors very much. i'm honestly glad i spent a few years with vim before trying emacs.

22:58 SegFaultAX: modal editing is great.

22:59 SegFaultAX: noprompt: What caused you to make the switch?

22:59 noprompt: SegFaultAX: clojure. at the time i wanted a good integrated REPL experience and fireplace/vim-clojure were frustrating me.

23:00 SegFaultAX: also for a long time i've wanted things like shells, etc inside my editor and vim doesn't do a good job with that.

23:00 SegFaultAX: then there's vimscript.

23:00 SegFaultAX: noprompt: Don't get me started on vimscript.

23:01 jack_rabbit: lol

23:01 noprompt: yeah, don't get anyone started on vimscript.

23:01 SegFaultAX: noprompt: That's actually the number one driver for me to switch, although lisp support is a close second.

23:02 noprompt: i'm not saying vim is a bad editor for lisp. people certainly seem to be doing just fine with it.

23:02 muhoo: i do not mind switching back and forth between emacs and vim all day. what really fucks with my head is having to use some windows or mac derived editor. kills me. i keep tying emacs commands in them.

23:03 noprompt: muhoo: right. there are somethings i love to use vim for and others not so much.

23:03 muhoo: i do a lot of sysadmin stuff and vi is just a fact of life. if i'm ssh'ed in or sudo'ed, it's vi. if i'm doing development, repl, etc, it's all emacs.

23:03 SegFaultAX: muhoo: I thought most people just use the remote stuff in emacs to do that.

23:03 noprompt: but i'm not definitely not going to be one of those "let's start an editor war" type of folks. unless someone tries to push, you know, sublime on me or some shit like that.

23:03 muhoo: also, just try using emacs on an android phone. i dare you.

23:03 scottj: noprompt: there is evil-leader. I would be careful about keychord-mode, it can create major lag while typing

23:03 SegFaultAX: muhoo: Eg have the ssh session /inside/ emacs.

23:04 muhoo: SegFaultAX: sure, and lock up your whole emacs waiting for the file to save :-/

23:04 there is one thing emacs does really poorly at and that's multithreading. in fact it doesn't do it at all. anything that's i/o bound is painful

23:04 noprompt: scottj: i noticed that. i think i only have a handful of keychords defined and most of them are defined only in normal mode. but i will look at evil-leader.

23:04 SegFaultAX: muhoo: vim has the same problem.

23:05 muhoo: Anyway, callen was trying to convince me that this is something common and natural in emacs.

23:05 Guess not.

23:05 muhoo: right, but i can use emacs for my local stuff and vi in a mosh/screen for remote

23:05 i really could not live without either vi or emacs, now that i think of it.

23:05 without BOTH, i mean.

23:06 SegFaultAX: pop into #emacs channel and have a chat about that. last i asked, i didn't hear any solutions for remote stuff that appealed to me.

23:06 noprompt: ughh, i sware. this weekend i'm gonna sit down and learn how to use core.async.

23:07 muhoo: core.async is very tasty.

23:07 it's like a simpler, easier-to-understand version of lamina/aleph.

23:07 SegFaultAX: Unless you try to read the source.

23:07 Have you looked at the go macro?

23:07 clj_newb_2345: what is the cheapest machine I can buy if all I want is for it to host a clojure web server?

23:07 (a web server running on clojure)

23:08 i.e. needs to be able to handle the jvm

23:08 SegFaultAX: clj_newb_2345: Probably digital ocean.

23:08 $5/mo

23:08 clj_newb_2345: not rent

23:08 muhoo: really? that cheap?

23:08 clj_newb_2345: buy

23:08 SegFaultAX: Single core, half a gig-ish of ram, ssd.

23:08 clojurebot: Cool story bro.

23:08 muhoo: oh, for single core and 500mb that's normal

23:09 SegFaultAX: clj_newb_2345: Oh, to build yourself? Probably $300 or so for the bare essentials. $800 for something pretty powerful. $1500+ for something production class.

23:09 $2.5k+ for something you expect to heavily virtualize.

23:10 clj_newb_2345: hmm

23:10 so I should just get a mac mini

23:10 SegFaultAX: No. definitely not.

23:11 clj_newb_2345: Mac minis do not make good server hardware, especially not for CPU bound stuff.

23:12 clj_newb_2345: are clojure web apps io bound?

23:12 I thought it was just the jvm hogging up crap tons of memory

23:12 SegFaultAX: clj_newb_2345: Depends on the app.

23:16 ... I just typed "vim ~/.emacs.d/init.el"

23:16 CaptainLex: What silliness has caused this name?

23:16 clojure.lang.ArityException: Wrong number of args (1) passed to: layout$fn--2653$fn

23:17 TEttinger: CaptainLex, that sounds like an anonymous fn

23:17 supersym: aren't the dashes normally not there?

23:17 CaptainLex: Okay, that makes sense in retrospect. Sadly, that anon is probably deep in the library I'm using :(

23:18 clj_newb_2345: is "core i3" the same as "-piece of shit" ?

23:18 TEttinger: like you made something like ##(map #(print "whee") [1 2 3])

23:18 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox91102$eval137053$fn

23:18 TEttinger: when...

23:18 ##(map (fn [] (print "whee")) [1 2 3])

23:18 lazybot: clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox91102$eval137064$fn

23:18 TEttinger: ##(map (fn [_] (print "whee")) [1 2 3])

23:18 lazybot: ⇒ (wheewheewheenil nil nil)

23:18 TEttinger: works fine

23:19 clj_newb_2345, no

23:19 they still make celeron procs I think

23:19 i3 is low end, but not THAT low end

23:19 clojurebot: Ok.

23:19 TEttinger: dammit

23:19 ~i3

23:19 clojurebot: i3 is low end, but not THAT low end

23:20 TEttinger: it's not AMD low end

23:21 clj_newb_2345: oh

23:21 so it's i7 > i5 > i3 > celeron > AMD ?

23:21 TEttinger: not exactly

23:22 I mean

23:22 low end AMD is extremely low end

23:22 clj_newb_2345: i7 > i5 > i3 > celeron > 386 > AMD ?

23:22 TEttinger: but there's decent AMD procs too

23:22 check the benchmarks at notebookcheck

23:23 http://www.notebookcheck.net/Mobile-Processors-Benchmarklist.2436.0.html

23:25 clj_newb_2345, you can see that the highest end AMD-made chip is worse than a mid-range chip from intel, both latest generation. ouch.

23:28 muhoo: atom was the lo end of intel last i looked

23:29 hell i ran clojure on a beaglebone

23:29 it was slow and nrepl didn't work, but it worked

23:35 qwer: what's the deal with clojure.contrib.math?

23:35 xeqi: ~contrib

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

23:36 qwer: so it's not included in standard clojure? I'm looking for the expt functionality

23:38 uvtc: qwer, are you looking for this: <https://github.com/clojure/math.numeric-tower>?

23:38 hiredman: Math/pow

23:39 qwer: (Math/pow 2 8)

23:39 uvtc: ,(Math/pow 2 8)

23:39 clojurebot: 256.0

23:39 qwer: ahh

23:39 anyway to make it and int other than cast it?

23:40 ,(long (Math/pow 2 50))

23:40 clojurebot: 1125899906842624

23:46 weavejester: Agh, I *still* can't get emacs-starter-kit not to load paredit for everything.

23:46 I think I might have to dump it.

23:50 supersym: yeah hate it when those things are a show-stopper... actually a reason I haven't taken on emacs yet

23:50 too much to figure out atm

23:50 weavejester: I'm just going to use my own version of it, I think.

23:50 uvtc: I remember not getting emacs-starter-kit, so instead I just started with the basics.

23:51 Hm. Doesn't seem to be much at <https://github.com/technomancy/emacs-starter-kit> anymore (well, since the last time I looked)...

23:55 weavejester: Yeah, maybe the inflexibility is one of the reasons technomancy is changing it.

Logging service provided by n01se.net