#clojure log - Feb 25 2012

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

0:12 muhoo: is there any non-painful way to redirect println's to a tcp-connected lein repl?

0:13 cause, if i run (println "foo") in the lein repl connected via tcp, i get "foo" , life is good. but, if i put (println "foo") in a function that's called from a server, like, say aleph/netty, it gets output to stdoout, not to tthe lein repl

0:14 ah, nm i see #<OutputStreamWriter java.io.OutputStreamWriter@602f958>

0:14 *out* is different in each

0:15 * muhoo wonders

0:15 muhoo: &*out*

0:15 lazybot: ⇒ #<StringWriter >

0:15 muhoo: ,*out*

0:15 clojurebot: #<StringWriter >

0:33 tardo: (= (__ "Dave") "Hello, Dave!") to make that true, i thought i should use str "Hello, " but alas that's not right

0:34 shoot that wouldn't hit the "!"

0:40 theconartist: tardo: concatenate

0:40 tardo: theconartist: i found a solution

0:40 ut

0:40 but

0:41 i did (fn [x] (str "Hello, " x "!"))

0:41 and i see that #(str "Hello, " % "!") works

0:41 but why does it need the "#"

0:41 is it just a shorthand for a function?

0:41 theconartist: yea it's a macro

0:42 tardo: cool

0:42 theconartist: str is just string concat btw, so yea

0:43 alexyk: one can extract multiple keys into a vector like: &(map {:a [10 11] :b [20 21] :c 3} [:a :b])

0:43 &(map {:a 1 :b 2 :c 3} [:a :b])

0:43 lazybot: ⇒ (1 2)

0:43 alexyk: now I want to extract first elements of vectors under keys

0:44 &(map {:a [10 11] :b [20 21] :c 3} [:a :b])

0:44 lazybot: ⇒ ([10 11] [20 21])

0:44 alexyk: but I want

0:44 &(map {:a [10 11] :b [20 21] :c 3} [(comp first :a) (comp first :b)]

0:44 lazybot: java.lang.RuntimeException: EOF while reading, starting at line 1

0:45 alexyk: can I get the first elements in the same map, without a second (map first …)

0:45 ?

0:58 qbg: &(map (comp first {:a [10 11], :b [20 21]}) [:a :b])

0:58 lazybot: ⇒ (10 20)

0:58 qbg: alexyk: like that?

0:59 alexyk: yeah

0:59 mdeboard: Does the `_` here mean something specific or just a generic local variable binding: `(defmethod fib 0 [_] 1)`

0:59 qbg: Generic ignorable parameter

0:59 alexyk: the problem is more general: I want a key :a and a first element of a sub vector under ut but the whole :b

1:02 qbg: &(map #(({:a first, :b identity} %) ({:a [10 11], :b [20 21]} %)) [:a :b])

1:02 lazybot: ⇒ (10 [20 21])

1:03 qbg: That problem sounds more complex than it needs to be (without knowing context at least)

1:04 IceD^: technomancy, hey

1:04 technomancy, how do we add various slime extensions when we loading slime from clojure-jack-in]

1:06 for example, I'd like to have thouse fuzzy expansions, but don't want to resort writing too much about it into .emacs

1:06 murm: how would I do a map lookup with a regex?

1:06 IceD^: murm, ?

1:06 murm, what do you mean

1:06 murm: (re-verb {"match-me" "value"})

1:07 (re-verb "match" {"match-me" "value"})

1:07 rather

1:07 IceD^: you want to match key and return value?

1:07 murm: (re-verb "match" {"match-me" "value" "nomas" "val2"}) => "value"

1:07 yea

1:07 IceD^: as usually

1:07 re-match key, get value by key

1:08 qbg: If multiple match, which one would be returned?

1:08 murm: first

1:08 IceD^: map isn't ordered ;]

1:09 but yes - as I said - use (keys map)

1:11 qbg: &(->> {"match" 1, "nomas" 2} (filter (comp (partial re-matches #"mat.*") first)) first second)

1:11 lazybot: ⇒ 1

1:11 qbg: But that is just insane...

1:11 emezeske: ,(first (filter (fn [[k _]] (re-matches #"a$" k)) {"a" 1 "b" 2 "c" 3}))

1:11 clojurebot: Execution Timed Out

1:11 emezeske: &(first (filter (fn [[k _]] (re-matches #"a$" k)) {"a" 1 "b" 2 "c" 3}))

1:11 lazybot: ⇒ ["a" 1]

1:12 murm: mm

1:12 emezeske: Heh, I guess that's pretty much the same as qbg's ^_^

1:12 qbg: &(first (filter (fn [[k _]] (re-matches #"a$" k)) {"a" 1 "b" 2 "c" 3}))

1:12 lazybot: ⇒ ["a" 1]

1:13 qbg: Made yours a bit shorter :)

1:13 &(first (filter (fn [[k]] (re-matches #"a$" k)) {"a" 1 "b" 2 "c" 3}))

1:13 lazybot: ⇒ ["a" 1]

1:13 qbg: There we go

1:13 emezeske: qbg: Oh, nice, I didn't know you could do that

1:13 &(let [[a] [1 2 3 4 5]] a)

1:13 lazybot: ⇒ 1

1:14 emezeske: Neat

1:15 IceD^: does bot have protection from (repeat 1)?

1:15 emezeske: IceD^: Yeah I think there are sandboxy limits set up

1:15 IceD^: wana try? :)

1:16 emezeske: &(repeat 1)

1:16 lazybot: Execution Timed Out!

1:16 emezeske: "Execution Timed Out" is my guess

1:16 ah

1:16 IceD^: :)

1:16 nicely

1:17 sideeffects goes to /dev/null I think

1:17 &(println 123)

1:17 lazybot: ⇒ 123 nil

1:17 IceD^: mhm

1:17 &(println "1\n2\n")

1:17 lazybot: ⇒ 1 2 nil

1:17 IceD^: well, at least it eats newlines

1:21 qbg: &(let [m {"a" 1 "b" 2 "c" 3}] (m (some #(re-matches #"a$" %) (keys m))))

1:21 lazybot: ⇒ 1

1:22 emezeske: qbg: I like that one

1:32 IceD^: back to my issue

1:33 I did some reasearch and still don't see how to get my fuzzy expanding in clojure-jack-ined slime

1:33 main problem here - I go tune my emacs when I'm tired and can't do anything productive ;]

1:34 so some help 'd be welcome

1:39 or just give me quite few .emacses here at list ;)

2:14 tjgillies: how do i not use state here? https://refheap.com/paste/839

2:14 typically i would make :name be a ref and mutate it, but i think thats wrong way to be doing it

2:16 or should i be using a ref since im working across threads?

2:16 IceD^: make person a ref

2:17 all data are immutable unless you ref

2:17 tjgillies: should person be a ref? or should :name be a ref?

2:17 IceD^: I'd vote for person

2:17 tjgillies: why? isn't that really OOish?

2:17 IceD^: you are mutating person, not name

2:18 tjgillies: im mutating the name attribute of person

2:18 ideally i would not like to mutate anything and just update the structure "tyler" variable points to

2:18 but im not sure i can do that across threads

2:18 s/not like to/like to not/

2:27 qbg: &(doc alter-var-root)

2:27 lazybot: java.lang.SecurityException: You tripped the alarm! alter-var-root is bad!

2:27 qbg: ,(doc alter-var-root)

2:27 clojurebot: "([v f & args]); Atomically alters the root binding of var v by applying f to its current value plus any args"

2:28 qbg: Still, indirecting through a(nother) reference type would be nicer

2:29 tjgillies: woah thats a cool function

2:29 never seen that before

2:29 qbg: Very little reason to use it though

2:30 Using an atom or ref is almost always better

2:30 tjgillies: ok

2:30 thats what i was asking

2:30 clojure seems to have an anti-state mentality

2:31 so i wanted to know when to use stateful things

2:31 qbg: When you have to :)

2:31 tjgillies: yes

2:31 that is clever, but not entirely helpful

2:31 :)

2:32 qbg: You usually try to push all of your state into just a few instances of the reference types

2:32 Depends on what you need to do though

2:32 bsteuber: it's not really anti-state, more like "be conscious about your state"

2:32 tjgillies: im a ruby guy so im used to everything being an object

2:33 then i go to clojure where its "theres not really any such thing as an object"

2:33 qbg: They're still objects, but immutable objects

2:33 bsteuber: oh everything is still an Object in java sense :) just not mutable most of the time ^^

2:33 argh, too slow

2:34 qbg: We just don't tie functions to our objects

2:34 bsteuber: data is always stateless

2:35 but a reference can hold different data over time

2:35 an "object" is a lot of things at once

2:35 clojure rather gives you all aspects split apart

2:36 tjgillies: which is what i meant by "theres not really any such thing as an object"

2:36 theres aspects, that combined, can be called an "object"

2:37 im talking more in the philosophical sense, not what literally is happening on the JVM because i realize the datastructures are objects there

2:39 callen: tjgillies: just pass data around man.

2:39 no need to mutate 99% of the time.

2:39 qbg: For simple applications, you can store all of the state in a single atom or ref

2:40 Create the future using a pure function of the past

2:40 tjgillies: thats the part that scares me

2:40 decoupling state from object identity

2:40 keeping those together is so familiar to me ;)

2:40 bsteuber: the funny thing is, once you're familiar with it you will consider everything else insane

2:40 dbushenko: hi all!

2:40 callen: bsteuber is quite right here.

2:41 tjgillies: i look forward to that day, hence my presence here

2:41 dbushenko: what is the best library for parsers implementation with clojure?

2:41 callen: tjgillies: just do some 4clojure exercises.

2:41 dbushenko: well, depends on the kind of parser

2:41 dbushenko: there's a clj-peg IIRC

2:41 tjgillies: oh cool

2:41 just googled 4clojure never been there before

2:41 dbushenko: callen, and what are the options?

2:41 tjgillies: looks neat

2:42 callen: thnx

2:42 qbg: Consider an address book application. The state would probably be a map of names to entries.

2:42 callen: tjgillies: once you've made yourself comfy, implement something using idiomatic Clojure, avoiding mutation.

2:42 emezeske: bsteuber: I'm quite familiar with immutability and functional programming, and I definitely don't find everything else insane.

2:43 qbg: To change, say the city of "bob", you'd do (swap! the-state assoc-in ["bob" :city] "Anytown")

2:43 *the city bob lives in

2:44 tjgillies: i think he meant specifically coupleing state and object identity is insane

2:44 coupling*

2:44 i could be wrong however

2:44 emezeske: tjgillies: Right, and I don't think it is :)

2:44 tjgillies: ah

2:44 callen: tjgillies: it's just hard to manage once you're doing something non-trivial or concurrent.

2:44 emezeske: I happent to quite like functional stuff

2:44 callen: tjgillies: it's not a big deal if the problem is relatively simple, but then anything would suffice.

2:44 emezeske: But that doesn't mean that everything else is insane.

2:44 dbushenko: callen: clj-peg looks much like yacc or antlr. are there any libraries like parser combinators (except fnparse, its old)

2:45 callen: emezeske: prolific mutation is insane, mutation in and of itself isn't insane.

2:45 rplevy: dumb question: when a literal string is processed by the reader, but before it is evaluated there doesn't appear to be any way to see it has metadata, but it does, as you can see after it is evaluated. is there any way to get at the metadata prior to evaluation? Example part 1: (read-string "(def ^:private foo)") => (def foo) , Example part 2: (meta (eval (read-string "(def ^:private foo)"))) => {... , :private true

2:45 , ...}

2:45 callen: dbushenko: it's a new lang, I'd say implement your own if your needs are that specific.

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

2:45 tjgillies: i like to program everything that starts out relatively simple as if i were programming it relatively complicated, because in practice thats how it usually works out

2:45 so i would rather not program something with the mentality that is "ok" to do it that way as long it stays simple

2:45 bsteuber: emezeske: ok maybe it was a bit exaggerated, but you get the point

2:46 emezeske: callen: I think "insane" is the wrong word. I mean, we're writing programs that get executed by machines, which are by their nature massively stateful

2:46 qbg: ,(meta (read-string "^:foo hello"))

2:46 clojurebot: {:foo true}

2:46 tjgillies: emezeske: and insane ;)

2:46 emezeske: Insanely cool, maybe

2:47 bsteuber: dbushenko: a friend of mine and me also wrote a parser lib that is quite usable

2:47 arohner: dbushenko: there's also parsatron, though I haven't used it

2:47 bsteuber: https://github.com/contentjon/tools/blob/master/gen/src/main/clojure/com/contentjon/gen/core.clj

2:47 arohner: I used fnparse a long time ago, which was pretty cool, but very easy to make something dog slow

2:47 bsteuber: the tests document how it works

2:47 qbg: ,(-> "(def ^:foo hello)" read-string second meta)

2:47 clojurebot: {:foo true}

2:47 qbg: rplevy: Works for me...

2:48 bsteuber: we did pretty much fnparse with a few extras

2:48 rplevy: oh I was apply meta on the def expression, duh

2:48 ok it really was a dumb question

2:48 I only half-believed it was actually

2:53 tjgillies: on https://www.4clojure.com/problem/95 what is meant by "predicate" ?

2:54 qbg: Function that returns a boolean

2:55 For example, odd?, even?, etc.

2:55 tjgillies: qbg: thnx

2:55 qbg: (predicates in Clojure tend to end in ?)

2:55 callen: a handy but small thing to steal from Ruby.

2:55 tjgillies: i know them from ruby didn't know they were called predicates

2:56 qbg: or Scheme

2:56 I like it better than the Common Lisp approach of having it end in p or -p

2:56 callen: that's where Hickey got them from

2:56 but most people know Ruby better.

2:56 qbg: there were many things in CLisp that were kind of ugly.

2:57 qbg: Though sometimes the p convention makes for good jokes

2:58 tjgillies: is that where condp comes from?

2:59 qbg: Don't think so. condp is a version of cond that takes predicates

3:01 IceD^: ritz throws stacktrace on me on start

3:01 I'm very, very sad panda here

3:30 tjgillies: so from what im hearing this seems to be the way to decouple state and object identity in clojure: https://refheap.com/paste/840

3:31 callen: tjgillies: don't over-rely on refs when they're not necessary man

3:31 tjgillies: just contain them in a map.

3:31 tjgillies: stop trying to shove a square peg in a round hole

3:32 tjgillies: callen: what do you mean contain them in a map?

3:33 to stop shoving a square peg in a round hole, one must first identify what is round and what is square

3:34 callen: tjgillies: https://refheap.com/paste/841

3:34 tjgillies: no mutation, just returns a new map with the appropriate changes.

3:34 tjgillies: just do 4clojure man. You'll get the idea.

3:38 tjgillies: ok thanks

3:39 callen: I'm not convinced he was convinced.

3:56 emezeske: Wooooooo, finally, released lein-cljsbuild 0.1.0

3:56 That took way too forever

4:58 espringe: How do I check if a value implements a particular (user-defined-protocol) ?

4:59 I want something like "extends?" but that can accept a value rather than the record name itself

5:19 morphling: espringe: ##(doc satisfies?)

5:19 lazybot: ⇒ "([protocol x]); Returns true if x satisfies the protocol"

5:19 espringe: morphling: thanks

5:49 _ulises: morning all

6:18 tdrgabi1: I'm failing to insert in a table, using clojureql, if the table has a column with auto_increment

6:18 I tried with :id nil or with missing :id at all, but I get evaluation aborted

6:18 if I remove the column from the table, conj! works

6:19 anyone worked with clojureql before?

10:54 photex: if there happens to be anyone out there that's familiar with data.zip.xml: data.zip.xml/text apparently gives me the text from *all* the nodes below the current node instead of just "" or whatever might be at the current level

10:54 is there some way for me to avoid this?

10:54 I'm processing xml that is essentially schema-free and can take several forms

10:55 in a couple of places

10:55 I'm make a gist with the variations that are possible

10:59 https://gist.github.com/1909221

11:00 my original attempt to parse the xml documents was this large, callback-ish soup and I'd more or less handle any of these

11:00 the exception being when the default attribute on an option element is used to indicate a value

11:00 anyway, once I learned about zippers I have started to re-implement my ingestion process

11:01 and it's largely a big win

11:01 but I'm not understanding some aspects of them

11:01 if anyone has advice about this I'd be very grateful

11:03 Ideally, when I use data.zip.xml/text on a node I'd like it to return "" or nil if nothing is there, rather than give me all the text that sits below

11:44 h0x5f3759df: Hi, Is this talk moved away? http://blip.tv/clojure/clojure-sequences-740581

11:44 When i try to watch it, It ends in < a minute

11:50 ivan: h0x5f3759df: try youtube-dl on it, I seem to be getting a lot more than a minute

11:53 technomancy: whoa; youtube-dl works on other sites?

11:55 ivan: yeah, it works on a lot of sites

11:55 even infoq sometimes

12:00 technomancy: slick

12:03 ivan: I use a bookmarklet to hit a server that youtube-dls the URL I passed in

12:03 now my disks are full

12:10 jjcomer: I'm trying to get auto-complete working in clojure-mode. I have enabled it as a global major mode, installed ac-slime, and followed the setup instructions. AC works in slime, but not in clojure-mode. I'm using the emacs-prelude settings pack. Any thoughts?

12:14 kiras: jjcomer: i think in slime you can just press tab to trigger auto-completion, but in clojure-mode it defaults to C-c tab. have you tried that?

12:17 jjcomer: kiras: I'm looking to get the autocomplete where the menu pops up with the doc strings and such.

12:19 kiras: jjcomer: oh... so not just the list of currently matching functions? how do you get what you're talking about to show up in slime mode?

12:20 jjcomer: kiras: here is a screencast detailing the setup and usage http://goo.gl/npGQD

12:22 kiras: jjcomer: i see. i haven't used that. sorry to waste your time. :/

12:24 jjcomer: kiras: no worries :)

12:25 h0x5f3759df: ivan: thanks, it worked

12:31 kij: Hey, what is the most simple way to run a noir app on my server?. I thought that a "lein uberjar", would give me a working jar. No ?

12:33 photex: kij totally been wondering that myself, I've just been using 'lein run' on a clone of the repo

12:35 kij: photex: goodie - we will be told how to get that manifest file shortly :)

12:36 tomoj: did you use `lein noir new`?

12:37 kij: tomoj: i did

12:37 tomoj: hmm.. should work then

12:38 photex: I'm trying it now... haven't actually given it a shot ;)

12:39 kij: lein new testjar; cd testjar; lein uberjar; java -jar testjar-1.0.0-SNAPSHOT-standalone.jar, Gives me :Failed to load Main-Class manifest attribute

12:39 DAMN\

12:39 ;/

12:40 tomoj: right.. `lein noir new` sets up :main in project.clj and creates a server.clj to set it to

12:40 of course, it doesn't work :(

12:40 need to add (:gen-class) to the ns form in server.clj

12:42 photex: ah, that was the issue

12:42 tomoj: those are the three general steps I guess 1) add ":main my.main.namespace" to project.clj, 2) (defn -main [& args] ...) in src/my/main/namespace.clj, 3) put (:gen-class) in the my.main.namespace ns form

12:44 photex: starting with lein noir new, I just had to had :gen-class in server.clj

12:47 kij: That gives me an java.util.zip.ZipException: ZIP file must have at least one entry

12:56 tomoj: kij: hmm

12:56 `jar tf youruberjar.jar` is empty?

12:57 you get that error when trying to create the uberjar, or when running it?

12:59 kij: tomoj: Not anymore, should be (:gen-class) Thanks!

13:29 rplevy: the compiler knows what file it is compiling, so is there a java call that can be made in a macro to introspect what file is being compiled?

13:30 in a function call you can use (.getStackTrace (Thread/currentThread))

13:30 qbg: *file*

13:30 rplevy: but in a macro no useful info on what is being compiled can be found

13:31 *file* ? I'll try that...

13:34 qbg: awesome

13:34 qbg: I also know how you can get the line number if you really want to

13:48 emezeske: Does anyone in here have the privileges to un-moderate me on the Clojure google group?

13:48 I'm stuck in a time bubble :(

13:50 qbg: I think it usually only takes a few accepted posts

13:52 emezeske: I've had a few, maybe not quite enough.

13:52 Seems to be a manual process, I'm guessing.

15:14 stuartsierra: emezeske: moderation is manual, after a period of time (determined by G.Groups) you will become unmoderated by default

15:15 Raynes: stuartsierra: I has question.

15:15 stuartsierra: uh oh

15:16 emezeske: stuartsierra: Thanks.

15:16 stuartsierra: Raynes: hit me

15:17 Raynes: stuartsierra: When I sent my CA in a couple of years ago, I signed my name as Anthony Simpson. That was before I had the plane ticket mishap that scared me into using my legal last name canonically. Over time, I've managed to get my name changed to Grimes across the entire internets, but it is still AnthonySimpson on JIRA and my name was signed as Simpson on that CA. Should I send in another CA and what should I do about getting that Jira account

15:17 changed?

15:18 stuartsierra: You should probably send in another CA. Email clojure-dev about changing your JIRA account.

15:19 Raynes: Sounds like a plan.

15:19 stuartsierra: cool

15:32 TimMc: Raynes: They wouldn't let you through security?

15:58 Raynes: TimMc: No, I realized my screw up a few days before the flgiht.

15:58 flight*

15:58 TimMc: It was a miracle they let us change the name on the ticket

15:58 cemerick is my hero

16:11 Null-A: ,,3

16:11 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>

16:14 TimMc: ~suddenly

16:14 clojurebot: CLABANGO!

16:15 qbg: ,(/ )

16:15 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>

16:15 qbg: ,(/ 0)

16:15 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>

16:15 qbg: http://nooooooooooooooo.com/

16:16 Null-A: heh

16:16 qbg: Poor clojurebot, we hardly knew ye

16:16 TimMc: &(+ 1 2)

16:16 lazybot: ⇒ 3

16:16 TimMc: phew

16:25 muhoo: ,alive?

16:25 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: alive? in this context, compiling:(NO_SOURCE_PATH:0)>

16:25 muhoo: ~alive?

16:26 clojurebot: Cool story bro.

16:26 muhoo: heh

16:28 Raynes: amalloy_: You need to spend time with me on the weekends. I get lonely.

16:29 muhoo: heh _VALID_URL = r'^((?:https?://)?(?:youtu\.be/|(?:\w+\.)?youtube(?:-nocookie)?\.com/)(?!view_play_list|my_playlists|artist|playlist)(?:(?:(?:v|embed|e)/)|(?:(?:watch(?:_popup)?(?:\.php)?)?(?:\?|#!?)(?:.+&)?v=))?)?([0-9A-Za-z_-]+)(?(1).+)?$'

16:29 Raynes: ...

16:29 muhoo: now you have two problems

16:29 Raynes: No, you have about 37.

16:32 muhoo: wow. it works on dailymotion, google, photobudket, vimeo,depositfiles, facebook, blip(!?), comedycentral(!) .. heh. and xvideos

16:32 i had no idea

16:34 Raynes: muhoo: (def titlere #"(?i)<title>([^<]+)</title>")

16:34 My favorite regex.

16:34 It has never ate my kitten.

16:36 gfredericks: Is there a way to restart the swank-server after running `lein deps`? Or must I restart all of emacs?

16:37 Raynes: gfredericks: The swank server isn't in Emacs. Just delete the slime repl buffer which will kill the connection and then you can run M-x clojure-jack-in again.

16:38 gfredericks: man I swore that didn't work last time

16:38 but I'm willing to try again

16:38 and if it does I swear not to swear as much in the future

16:42 Raynes: right you are sir. Thanks.

16:42 muhoo: Raynes: http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags

16:43 Raynes: muhoo: ?

16:44 muhoo: check the top-voted answer

16:44 but yes, ([^<]+) works in a pinch

17:00 * muhoo is back in purple bat van land for a few hours

17:11 murm: Is there a better way than selenium to take an existing webfrontend and putting a slicker one on top?

17:20 TimMc: I thought selenium was a website test framework.

17:20 Is it used that way too?

17:21 bbloom: It's more of a browser automation API

17:21 a library to be used by a test framework

17:21 In practice, it's a giant time black hole ;-)

17:23 murm: Yea, I've been using it to automate some repetitive activities in webinterfaces that I can't change (don't have access to)

17:24 bbloom: I personally (and quite a few smart people I know) have wasted an incredible amount of time trying to get it to work just right and have a sensible API for writing integration tests…. what works in practice much better is something like QUnit

17:24 murm: But if I wanted to scale that up I'd have to deal with the issue of needing a running webdriver for every user of the new front end

17:25 bbloom: basically: stick your app in an iframe, automate it from the outside using a little javascript, and run your tests using the browser's refresh button

17:26 then you can use selenium to load the page, manage the refresh button, and parse out the test results…. ie the minimum required to automate test execution… but not the tests themselves

17:27 murm: So basically dome dom manipulation from an iframe?

17:27 couldn't clojurescript do that?

17:27 bbloom: sure, why not?

17:27 murm: could that be implemented as a browser plugin or extension? Because technically a middle server wouldn't be necessary, right?

17:28 bbloom: maybe? what we did for our app was to simply make a /test route which loads the test framework and then loads the root route in an iframe… we just run our tests by navigating to http://localhost/test

17:29 TimMc: haha

17:29 Sounds like it's time for a better web automation lib.

17:29 bbloom: there's a great one already: it's called jQuery :-P

17:30 the problem with selenium is that it's extremely low level

17:30 but also oddly perscriptive

17:30 espringe: I want to make a function which accepts a key-value array. E.g. [:a foo, :b blah, c: dog]. Being a dynamically typed language, I assume the best way to do this is to accept an array where every 2nd element is a key? If so, what's the best way to "destructure" this, and iterate two-elements at a time, so i can use it easily

17:30 bbloom: it's designed to be run via java RMI, so it has totally non-useful operations for non-java clients

17:31 it has things like assertTextContent, but then you get a remote server error… so you need to do hasTextContent and implement the assert client side in ruby/javascript/python/whatever-non-java you're using

17:31 espringe: (Also, I can't use a map -- because I don't need random access, and order is important)

17:31 amalloy: espringe: you sure you don't just want to accept an array of pairs?

17:32 murm: what does it do if a new window is opened?

17:32 espringe: amalloy: That sound reasonable, would that be the standard way of doing it in clojure?

17:32 amalloy: *shrug*

17:32 murm: this isn't for a front end that I have development access to

17:32 amalloy: your scenario is too vague to have a standard. ##(hash-map 1 2 3 4) takes them flattened, and ##(into {} [[1 2] [3 4]]) takes them paired

17:32 lazybot: (hash-map 1 2 3 4) ⇒ {1 2, 3 4}

17:32 (into {} [[1 2] [3 4]]) ⇒ {1 2, 3 4}

17:32 murm: I'm taking a public facing front end automating some business processes

17:34 espringe: amalloy: I noticed functions like "let" seem to just take an array, where every 2nd element is a value

17:34 So wouldn't it be best to go that style?

17:34 * murm looks at qunit

17:34 * amalloy threatens to shrug again

17:35 amalloy: let is a macro, so the forms are typed in by a human and asking for manual pairing is a bit mean

17:35 bbloom: murm: take my advice here with a grain of salt… my team is relatively new to integration testing browsers… we've got a custom test framework… it's all coffeescript

17:37 espringe: amalloy: fair enough, i'll do it as you suggest. So for an end-user it'll look like:

17:37 [[:a foo] [:b foo] [:c foo]] right?

17:37 amalloy: looks that way

17:42 murm: bbloom: can you click on elements within an iframe using qunit?

17:42 bbloom: depends on what you mean by "click"

17:42 if you mean "trigger the onclick event handler" then yes

17:42 murm: like getElement "username" (click)

17:43 bbloom: if you mean "simulate the act of a user clicking the button with the mouse at a particular point on the screen"

17:43 then "it depends"

17:43 murm: and then put data in that text field, log in, etc

17:43 bbloom: the containing frame own's the iframe's DOM as long as they are on the same domain

17:44 jamii: If anyone has any comments on this idea I would love to here them - http://www.reddit.com/r/Clojure/comments/q5xf7/crowdfunding_an_opensource_clojure_library_for/

17:44 bbloom: so you can just myIframe.getElementById('foo').click()

17:44 murm: well, if on a seperate server...

17:44 bbloom: murm: then probably not, due to same origin access policy

17:44 murm: and you could run that on rhino headlessly, right?

17:45 bbloom: dunno

17:46 murm: From the user's perspective, I'd want to make the iframe invisible, and provide them a much more simplified interface.

17:46 bbloom: can you do the work server side?

17:46 murm: yea

17:47 bbloom: the same domain origin access policy is a feature of browsers to protect users & doesn't apply if you're not using an iframe really

17:47 murm: would probably be better too.. from a business model question

17:47 bbloom: so you could just load a page in any old javascript execution environment, like rhino, and poke and prod it from the outside however you want

17:47 that assumes rhino has a headless dom emulation library, which i'd be surprised if it didnt

17:48 murm: how would that be different than selenium?

17:48 bbloom: selenium is an API for remotely controlling real browsers

17:48 you don't actually need a browser to communicate with web servers ;-)

17:48 murm: true, but it has htmlunit, that runs headlessly on rhino

17:49 muhoo: murm: in general, javascript breaks the way i used to do stuff like this: by screen scraping

17:49 murm: I know, but I need to crawl and navigate the page, sometimes executing javascript to do so, fill forms, etc... so what's the best tool for that?

17:49 muhoo: but if the app is javascript-based, scraping it with something like htmlunit is not going to work too well

17:49 murm: muhoo: what do you mean?

17:49 bbloom: http://www.envjs.com/

17:50 http://zombie.labnotes.org/

17:50 those are both js-based. i'm sure there are comparable components in the JVM world

17:51 muhoo: actually, i was told there is no such thing in java world

17:51 there's rhino, but that's not quite the same

17:51 but i haven't done really exhaustive research either

17:51 bbloom: well, you could probably run envjs in rhino

17:51 i mean, you *already need* a javascript execution env to use something like envjs

17:52 however, it's probably better supported on nodejs

17:53 murm: envjs' docs refer to running it on rhino

17:53 bbloom: perfect :-)

17:53 go with that :-P

17:54 murm: this is all very testing focused though. Looking for docs on things like "how to enter credentials into texts fields and click login."

17:54 bbloom: yeah, testing tends to be the motivator for these things

17:54 muhoo: um, isn't entering data into form fields a crucial part fo testing?

17:55 bbloom: b/c scraping is doable with libcurl or whatever http lib you have

17:55 usually

17:55 unless you need to execute javascript

17:55 which is basically google and bing :-P

17:56 and, apparently, you — and surely a growing number of people as more sites b/c javascript dependent

17:57 muhoo: my god, is there one web framework for every person on the planet now?

17:57 s/every/each/

17:57 bbloom: muhoo: ?

17:58 muhoo: it seems like everywhere i turn, there's a new web framework

17:58 bbloom: heh.

18:00 muhoo: wow, rhino is the default implementation of envjs! exciting, a clojure-scriptable headless browser?

18:00 i could turn every damn website i have to deal with into a command-line app :-)

18:00 bbloom: i don't see why not ;-)

18:01 muhoo: heh "remember that all javascript executed will have read/write access to your file system"

18:01 clojail here we come

18:10 bbloom: so… i've been looking at this thread: https://groups.google.com/d/topic/clojure-dev/bjZsHQ6u7Fk/discussion

18:11 does anyone have an experience with multiplexed repls? i'm interested in evaluating code simultaneously in various clojurescript environments at once… like if i want to quickly send a message to multiple browsers that are connected to the same server

18:11 rogererens: murm: I'm pretty sure that I don't understand what you're looking for, but is Diazo http://docs.diazo.org/en/latest/index.html perhaps something you could use?

18:12 bbloom: holy xml nightmare flashbacks batman!

18:14 murm: rogererens: I'll check it out. Thanks.

18:20 muhoo: so, i'm confused now. if i wanted to fire up envjs inside cljs, how would i do that?

18:20 cljs already runs inside of rhino, so that part's done. i'm not clear how to wedge envjs in there thoguh

18:23 bbloom: i'd assume it involves a rhino repl and a call to load-file :-P

18:23 * muhoo tries the obvious

18:23 bbloom: envjs is just a javascript lib

18:23 http://www.envjs.com/doc/guides#running-rhino

18:24 muhoo: the cljs part was what confused me though

18:24 but then again, why not, there's js interop

18:24 bbloom: a cljs repl is just like a rhino repl…. with different syntax :-P

18:24 * muhoo is torn between being confused, scared, excited, enlightened, and laughing maniacally like a mad scientist

18:36 muhoo: wait, i'm conffused

18:37 i thought the clojurescript repl was connected to the browser

18:37 not to rhino

18:37 bbloom: there are two backends:

18:37 ibdknox: it can be either

18:37 bbloom: https://github.com/clojure/clojurescript/tree/master/src/clj/cljs/repl

18:37 muhoo: thx

18:38 i see, i'm using clojurescript one, which uses the browser epl

18:38 i gotta go bareback

19:46 murm: what's the throughput over nfc for phones?

19:56 424 kbps

19:58 which is 424 kbps, right?

19:58 I mean 53 KBps, right?

20:02 kij: murm: wrong chan ?

20:03 murm: and with SMS at 140 bytes, you should be able to transmit 378 sms messages a second over nfc.

20:04 kij: it's just an idea for an application

20:09 who wants to build an android app?!

20:09 we could build it in clojure

20:21 rads: anyone know why lein-cljsbuild is giving me a JSC_DUPLICATE_NAMESPACE_ERROR when I try to compile?

20:25 dnolen: rads: it's not telling you which namespace?

20:25 cemerick: alexbaranosky: Shrink looks like a good direction.

20:25 rads: dnolen: it's one of my application code namespaces

20:26 not a library or anything like that

20:26 seems to work fine until I have two files that try require/use the same namespace

20:26 alexbaranosky: cemerick, thanks, do you have any constructive criticism?

20:27 rads: actually it seems to just give me that error any time I require/use one of my application namespaces

20:27 alexbaranosky: cemerick, I think at some point I'll want to know how to shrink arg-lists full of values, not just one at a time

20:27 amalloy: alexbaranosky: the readme could use a link to a description of what shrinking is

20:27 dnolen: rads: helpful to know if you can recreate with just CLJS or if it's a lein-cljsbuild specific issue

20:28 alexbaranosky: I haven't hooked it up to Midje yet, so that is usually when the use cases you forgot about show up

20:28 amalloy, good idea

20:28 rads: dnolen: I had it working with cljs-watch. I'm trying to migrate over to lein-cljsbuild and only started getting errors now

20:29 dnolen: rads: ah k, might wanna check with emezeske then

20:30 cemerick: alexbaranosky: nope, just unvarnished encouragement. :-)

20:30 alexbaranosky: amalloy, it is surprisingly hard to find an article about it.. I might have to write something short myself.

20:32 rads: dnolen: I was setting my source-dir to "src/my-app/client" rather than just "src", since I have src/my-app/client and src/my-app/server, where the client is browser JS and the server is Node.JS, so I need different compilers for that

20:32 it seems that it breaks unless you set the source-dir to the root of the source files rather than a couple folders deep into the namespaces

20:36 kwertii: What happens to stdout/stderr when you do M-x clojure-jack-in?

20:39 cemerick: kwertii: stdout/err falls into the console for the process

20:39 * cemerick reminded to implement stdout/err subscriptions for nREPL

20:39 kwertii: cemerick: the Swank process or the Emacs process?

20:39 cemerick: kwertii: swank process IIRC

20:41 kwertii: cemerick: thanks

20:50 emezeske: rads: What version of lein-cljsbuild?

20:50 rads: emezeske: 0.1.0

20:51 emezeske: rads: Did you ever have an older version installed?

20:51 rads: emezeske: I did at one point, but I just restored from a backup recently which I believe did not have it

20:51 so I don't think so

20:52 and by backup I mean backup of my entire hard drive

20:53 emezeske: rads: Would it be possible to paste your project.clj somewhere?

20:54 rads: sure

20:56 emezeske: https://gist.github.com/5ed4cfc51b8b9e87ed15

20:56 the first revision is the broken version, the second revision is the one that works

20:57 emezeske: ah, cool

20:57 That's pretty weird!

20:58 And so for the second one, you're just moving the whole src/clicktrip/client dir to src-client?

20:58 rads: yeah, so it's src-client/clicktrip/client now

20:58 emezeske: oh, so the namespace is clicktrip.client?

20:58 rads: yeah

20:58 emezeske: I see

20:59 The :source-path just tells cljsbuild where the toplevel dir is

20:59 So if you specify src/clicktrip/client, it's going to use that as the toplevel

20:59 So the directory/namespace structures will be out of whack

21:00 rads: I guess I should just keep my node.js CLJS and browser CLJS into separate source directories

21:00 rather than the same source directory, but separate namespaces

21:00 emezeske: What are you using to compile the node.js part?

21:01 rads: I've been using cljs-watch for both, and now I'm trying to migrate to cljsbuild. I got stuck at this part before I tried adding the node.js compilation

21:01 emezeske: Gotcha.

21:01 Yeah, I think separate directories might be the way to go

21:01 You have to set a compiler option for node.js output, right?

21:01 rads: yeah

21:02 emezeske: That's cool, I hadn't thought about a fully clojurescript app

21:03 rads: I'm actually just using the node.js component for client-server STM/OT using racer: https://github.com/codeparty/racer

21:03 the main server is noir, though I'm considering just going all node if that turns out to be simpler

21:03 so I've actually got browser cljs, node cljs, and clj in one project

21:04 emezeske: Very cool!

21:04 * emezeske has not seen anything like that before.

21:05 rads: yeah, it's been quite the learning curve getting all this to work together. I plan to write about it after I get some experience with it

21:06 emezeske: I'd read about it.

21:07 rads: setting up a cljs project is pretty finicky right now, but I'm looking forward to getting my own workflow down and using that knowledge to make it easier for others

21:08 emezeske: Yeah, there's definitely a big gap in the "best practices" area

21:08 Not a whole lot of examples to go off of

21:09 Somebody's gotta go out there and make mistakes for us all to learn from :)

21:11 rads: emezeske: yeah. I'm just picturing a year or two from now when we can have something like rails for a clojurescript project. not in terms of features, but something that gives you good conventions to follow right from the start

21:12 clojure/cljs could make JS-heavy apps much eaiser

21:26 kwertii: rads: that'll be nice when the rough edges are smoothed out and stuff comes out of the box already configured and ready to go. That's still a big advantage for Ruby. I'm currently several hours into just setting up logging on a clojure project.

21:37 muhoo: whomever it was who pointed me to env.js, THANK YOU!

21:44 scriptor: *whoever

21:44 hmm

21:44 actually it is *whomever

21:44 since you used "it was"

21:45 kwertii: Is there a way to make SLIME pretty-print hashes (with newlines and indentation) instead of dumping them linearly?

21:46 scriptor: kwertii: check out http://clojuredocs.org/clojure_core/clojure.pprint/pprint

21:46 kwertii: scriptor: cool, thanks!

21:47 Any way to hook the SLIME REPL up to that so it does that automatically to everything it gets back at the top level?

21:48 scriptor: hmm, I'm not sure

21:48 the closest I know is pp, which pprints the last result

21:51 emezeske: muhoo: Have you used PhantomJS? I'm curious how env.js compares

21:51 amalloy: i doubt if you really want everything pprinted. it's not always gorgeous

21:51 muhoo: emezeske: env.js works inside rhino, so i can run it from clojurescript

21:52 i haven't tried phantom

21:52 kwertii: amalloy: dunno, it seems nicer than just dumping gigantic hashes out linearly, which is what it does now. that's kind of useless.

21:53 muhoo: emezeske: actually phantom was a PITA to try to build, so i tried and gave up

21:55 emezeske: muhoo: Ah, cool. Yeah, running in rhino seems like a nice thing

21:55 muhoo: What platform are you on that you have to build phantomjs yourself?

21:55 muhoo: linux, debian squeeze

21:56 emezeske: muhoo: That sucks, I can't believe they don't offer a .deb

21:57 muhoo: Debian stable is always like a decade behind, though

21:57 muhoo: their pre-built binaries required versions of libc that are later than what i have

21:57 whatev, i'm happy with env.js

21:57 emezeske: Yeah it sounds cool

21:58 muhoo: now i'm going to try to run it from cljs. wish me luck

21:58 it'll be good to translate ugly crap like $.map($("#mainmenu li > a"),function(j,i){return(j.innerHTML)}); into nice cljs sexps

21:58 sorry sequences :-)

21:59 emezeske: good luck!

22:00 muhoo: thx

22:03 kwertii: i saw in some project.clj files, stuff like :pretty-print true

22:03 i have no idea what it does though

22:04 kwertii: muhoo: interesting, thanks, I'll check it out

22:09 amalloy: clojure.repl/repl has pluggable options for each phase, including the print phase. lein exposes those options somehow, but i don't know how. if you look into the arguments to repl, and the options in project.clj, you should find what you want

22:11 kwertii: amalloy: great, thanks!

22:27 technomancy: kwertii: there's also C-c S-i *1

22:28 kwertii: technomancy: nice, thanks

22:28 amalloy: really? for maps? i wouldn't have expected that to be pretty

22:29 muhoo: emezeske: and that brings me to lein-cljsbuild, which i'm going to try now :-)

22:30 kwertii: it only understands the top level of the hash. subhash values are still linear strings

22:31 map, sorry. I've been working in Ruby lately.

22:31 amalloy: hash is fine too

22:31 kwertii: (at least they're not called dictionaries...)

22:32 amalloy: and it seems to not be very general either. it does a pretty poor job of inspecting (reify clojure.lang.IPersistentMap (count [this] 2) (seq [this] (seq {:a 1 :b 2}))) - thinks the contents are empty and the meta has elements

22:32 kwertii: I'm fine with just piping the output of everything into (pp)

22:32 technomancy: the inspector is actually like the one part of the swank internals I actually have played with

22:33 it's not too gnarly; you should try to fix it =)

22:33 amalloy: where is it?

22:34 technomancy: src/swank/commands/inspector.clj

22:34 amalloy: of, uh...what project? i don't know anything about what parts of swank are where

22:34 technomancy: I added support for showing implemented interfaces

22:34 all the clojure is in swank-clojure

22:39 amalloy: it does indeed look pretty straightforward. can't see a reason why it doesn't work :P

22:40 oh, nm. statements are just in the wrong order. ez fix

22:45 technomancy, kwertii: any opinion on whether slime inspector should print metadata before or after contents? it was written to do...neither of those things, so i get to make the choice

22:45 technomancy: I'd do before since ^ is more common than with-meta

22:45 amalloy: cool. that's what i thought too (though for different reasons)

22:46 kwertii: I can see it both ways. before, because, well, it's META data that is conceptually higher up the hierarchy than the data. after because people will normally be interested in the data rather than the metadata, so that should be more easily accessible.

22:46 amalloy: personally i want it before, because the meta will usuqally be small, and the contents might be large

22:46 kwertii: amalloy: good point

22:52 muhoo: heh https://refheap.com/paste/857

22:57 amalloy: technomancy: how do i test my changes?

22:57 muhoo: this too https://refheap.com/paste/858

22:58 works from inside raw rhino though. just don't know how to do it from inside cljs though

22:58 technomancy: amalloy: it's a bit more awkward now that lein-swank is spun out; need to "lein install" inside swank-clojure then get lein-swank to assoc in the updated version

22:59 amalloy: I guess that means I need to make lein-swank skip associng in a swank-clojure version if one is already present

23:02 amalloy: actually screw it, just do "lein swank" inside swank-clojure itself

23:07 muhoo: emezeske: i give up. if you feel like a quick writeup of how to use lein-cljsbuild to get a working cljs repl using an env.js emulated headless browser, that'd be great, but i can tell it's way over my head to figure it out on my own.

23:08 amalloy: technomancy: pull request flying your way

23:10 technomancy: woooo

23:18 muhoo: technomancy: is there a sane way to pool all my jars so that for every project lein deps doesn't pull down a separate jar of, say, clojure-1.3.0.jar, commons-codec-1.4.jar, compojure-1.0.1.jar, hiccup-0.3.8.jar etc

23:18 technomancy: muhoo: yes: use leiningen 2!

23:18 muhoo: i must have like 10 copies of those jars littering my drive

23:18 technomancy: it just keeps everything in ~/.m2/repository

23:18 muhoo: is lein2 out yet?

23:18 well, there are some things in my ~/.m2/repository

23:19 and sometimes stuff gets loaded there, sometimes not

23:19 technomancy: course it's out; it's on github. =D

23:19 muhoo: if i use pomegranite, it puts stuff in ~/.m2/repository . but lein deps doesn't

23:19 technomancy: it's not technically released yet, but you know...

23:19 why be picky?

23:19 amalloy: wait, doesn't lein1 do that too? it's not actually re-downloading all the jars for every new project; it's just copying the ones from ~/.m2

23:19 technomancy: amalloy is correct

23:20 it copies them from ~/.m2 into lib

23:20 muhoo: oh

23:20 amalloy: i guess it's not clear whether he was complaining about the download or the disk space

23:20 but since people who complain about disk space are CRAZY i assume the former

23:20 muhoo: well, that's still disk space littering

23:20 technomancy: amalloy: I took a patch to do symlinking from someone who complained about disk space

23:21 amalloy: sure it is. and it's good that lein2 stops doing it. but you have like a trillion bytes available

23:21 technomancy: it was only done for hysterical raisins

23:21 ahem

23:21 historical reasons

23:21 muhoo: i have a netbook with a flash drive, so disk space matters. and my main internet connection is via tmobile 3g, so bandwidth matters too

23:21 technomancy: well there's not really any help for bandwidth

23:21 unless you rsync ~/.m2 from another local machine

23:21 muhoo: if it's just copying, then bandwidth is not a problem

23:23 technomancy: it'll still go checking for snapshots, so don't use them unless absolutely necessary

23:23 muhoo: that's ok, if there's newer stuff, grab it.

23:24 technomancy: well it also slows everything down

23:24 muhoo: but as long as it's not downloading a new copy of clojure-1.3.0.jar from clojars every time i type lein deps, i'm fine

23:24 technomancy: yeah, it never did that

23:24 but you should still use lein2

23:25 muhoo: well of course. i'm on lein 1.6 atm. i'm also on debian stable :-)

23:25 technomancy: I'm on squeeze too

23:25 alexbaranosky: anyone know of a good list of all the different characters as they are used in cl-format?

23:26 technomancy: nix is really the only thing that makes squeeze bearable though

23:26 muhoo: nix?

23:26 clojurebot: nix is a purely functional package manager exhibiting many similar characteristics to Clojure's persistent data structures or git commit trees: http://nixos.org/nix/

23:26 muhoo: reallly, cool

23:26 amalloy: ,(map char (range 65532)) ;; alexbaranosky

23:27 clojurebot: (\

23:27 amalloy: omg that 2 should be a 5. nobody tell me i'm an idiot plz

23:27 muhoo: i dunno, i've been using apt-get for, like, 9 years now, and i'm happy with it.

23:27 alexbaranosky: amalloy, nice

23:28 technomancy: muhoo: apt-get is fantastic for system-level stuff

23:28 but sometimes you just *have* to have multiple versions installed side-by-side, and apt-get is awful for that

23:28 juhu_chapa: is it posible to declare global var with def where its value references a function not yet defined, (def name get-name)

23:28 technomancy: plus flawless rollbacks with nix are just fantastic

23:28 muhoo: hehe true. i remember the nightmares of trying to have jackd and jackdmp installed at the same time

23:28 (now known as jack2)

23:29 technomancy: juhu_chapa: you can use resolve to delay lookup to runtime.

23:29 muhoo: the papers on nix are really accessible

23:29 there are some really great ideas in there; I highly recommend it

23:29 muhoo: nice, nix looks like github for binaries

23:29 sorry git for binaries

23:29 technomancy: the similarity is quite strong

23:30 it's also great in that it can coexist fine with other package managers

23:30 so you can keep all your system stuff stable with squeeze but still get cutting-edge versions of stuff when you need it in a totally isolated package tree

23:31 muhoo: was nix written by a clojure person?

23:32 technomancy: no, but it does have Leiningen packaged

23:32 juhu_chapa: technomancy: how does resolve works?

23:32 technomancy: I should update the package though; it's still 1.6.2

23:32 juhu_chapa: (resolve 'clojure.set/difference) looks up the clojure.set/difference var at runtime, so even if it wasn't loaded when your code was compiled, it should still work

23:34 muhoo: what? no /lib??! http://nixos.org/nixos/screenshots/nixos-terminals.png

23:35 how, what the, how can..... what does ldd /usr/bin/something actually do?

23:35 technomancy: hehe

23:35 photex: tells you which libraries are linked at runtime

23:35 juhu_chapa: technomancy: why "declare" does not work in this case?

23:35 technomancy: you'll have to read the paper; it's awesome

23:35 muhoo: is everything statically linked then?

23:36 technomancy: muhoo: no, but you can actually tell just by using grep every dependency of a package

23:36 because of the way it stores everything by cryptographic hashes

23:36 muhoo: so, for example, how does grep link with, say, libc.so.x ?

23:36 if there is no libc.so.x ?

23:37 technomancy: it's in /nix/store/kqn6mcxay9a3i43q971xaqy9br53wzaf-glibc-2.12.2.drv

23:37 muhoo: yeah, i gotta look at this paper.

23:37 technomancy: it's impossible for a package to have dependencies that are undeclared in the package definition

23:37 muhoo: ok, so ldd will give you a long spew of paths llike /nix/store/kqn6mcxay9a3i43q971xaq then, ok

23:38 technomancy: start with "Nix: A Safe and Policy-Free System for Software Deployment" on http://nixos.org/docs/papers.html

23:38 muhoo: it's not like there is no /usr/lib, it's more like they link the packages to paths like that

23:38 technomancy: if you install nix on debian then there's still /usr/lib, but all the nix packages are isolated from it

23:39 if you install nixos (an entire nix-based OS) then there's no /usr/lib

23:39 muhoo: i'm getting old. when people move the furniture around on me, it makes me angry :-)

23:39 technomancy: heh

23:39 muhoo: i'm going to have to fire up a vm and try this out

23:39 technomancy: you don't need a VM

23:39 since everything is isolated

23:39 if things go wrong you can blow away /nix and start over

23:39 m0smith: Noir question

23:39 muhoo: ok, a chroot then

23:40 atually, i don't even need a chroot

23:40 technomancy: yeah, that's the beauty of it

23:40 muhoo: if these things don't link to /usr/lib, i get it.

23:40 technomancy: I mean, you can try nixos, but that's more hardcore and experimental

23:40 muhoo: unless of course it has kernel dependencies, but in general, yeah.

23:40 photex: does anyone here actually use nixos on daily basis

23:41 I've been tempted to move to Arch

23:41 but recently discovered nixos

23:41 discovered == stumbled upon clicking links

23:41 technomancy: a couple people I talked to had trouble getting nixos working

23:41 photex: this was my worry

23:41 technomancy: I'd recommend starting by just adding nix to whatever you're currently using

23:41 photex: especially on a laptop

23:41 muhoo: i know a few people who really love arch

23:42 photex: I setup an arch box on a vm and enjoyed it

23:42 I've been running Suse for a while

23:43 anyway, don't mean to hi-jack the discussion

23:43 muhoo: it's already a free-for-all :-)

23:43 technomancy: nix and debian stable is the best of both worlds as far as I'm concerned

23:43 muhoo: though it has somewhat diverged from clojure.

23:43 yeah, i have to try it

23:44 technomancy: system-level stuff hums along flawlessly; fresh stuff flows in with no risk of destabilization

23:44 muhoo: i have an old box that runs lenny, and it'd be nice to have some modern stuff on it, i was using a chroot with squeeze, but i suppose nix might be better

23:44 photex: technomancy is that what you're running?

23:44 technomancy: photex: yeah

23:44 photex: laptop or desktop?

23:44 technomancy: laptop

23:45 muhoo: hence why destabilizationis a concern :-)

23:45 once you get a laptop working right with linux, you kinda don't ever want to change anything

23:45 photex: muhoo exactly why I've been running my install for so long

23:45 i3wm, custom .xinitc instead of a desktop env

23:45 technomancy: well, it seems like debian's fine as long as you stick with stable

23:45 photex: soooo much built up over time

23:46 muhoo: i'm fucked because ion3 is gone now

23:46 photex: /home is it's own partition, but ya never know what lies ahead

23:46 muhoo tried i3wm yet?

23:46 muhoo: and the successor, notion, won't read my customizations.

23:46 havne't, mmaybe i should.

23:46 photex: closer to ion than xmonad imo

23:50 muhoo: looks cool, will have to try it.

23:50 maaybe with nix

Logging service provided by n01se.net