#clojure log - Jul 27 2014

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

0:36 lpvb: I'm sorry I asked this question before but had to afk,

0:36 do swap! reset! compare-and-set! block?

0:37 jeremyheiler: lpvb: do you mean block as in sync/async, or block as in locking?

0:38 lpvb: um, I think locking, if that's the one where the function doesnt return until it's completed

0:39 jeremyheiler: ok, so atoms don't block in the sense that they don't lock up a thread. but they do return synchronously. i believe you mean the latter.

0:39 that is, they complete their action before returning

0:40 lpvb: oh

0:40 yea that's what I meant

0:40 whats the difference between locking

0:42 Fare: is there a builtin equivalent of CL's ignore-errors, or do I have to define it with a try / catch all

0:43 how do I catch all?

0:43 jeremyheiler: lpvb: locking specifically has to do with thread coordination. so, if it were a locking mechinism, another thread that tries to change that atom concurrently will block until the original unlocks it. however, it doesn't do it that way.

0:44 lpvb: jeremyheiler: oh I knew that one, I was just confused from the wording

0:44 jeremyheiler: yeah, i suppose the word "blocking" is overloaded :-/

0:45 ... or at least can imply different things at a high level

0:46 Fare: is there a standard way to strip a string's prefix?

0:46 jeremyheiler: Fare: you catch Exception (or Throwable if you want to catch even fatal jvm errors)

0:46 Fare: clojure.core/subs ?

0:59 john2x: why is subs in clojure.core, and not in clojure.string?

1:00 TEttinger: it's probably used in clojure.core internally?

1:00 macro whatnot?

1:02 jeremyheiler: hmm... it is used internally, but so is .substring

1:03 looks like subs was introduced in 1.0, but clojure.string was in 1.2

1:07 Fare: jeremyheiler, yes, that's what I do. Just wanted to know if there were builtins for the same.

1:09 jeremyheiler: Fare: nope :-/

1:10 Fare: I'm slowly but surely developing a collection of random small utilities.

1:53 kristof: Fare: Wrong channel but are you familiar with subject-oriented programming?

1:54 Fare: Your discussion on multiple "views" of the same essential object using composition of interfaces reminded me of it, and I believe you wrote that you were looking for good examples of such uses

1:55 Fare: I was going to suggest that the papers on SOP would surely yield such examples and I was even thinking of rewriting many of them myself using LIL just as an exercise

1:58 Fare: kristof, not super-familiar

1:59 do you mean something similar to urbit or nominine?

1:59 kristof: Not in the slightest, I have no idea how urbit could relate

1:59 Isn't urbit dead in the water while Curtis figures out his jets or whatever?

2:50 tuft: o

2:51 hmm, momentarily tmux confused there

2:56 Fare: kristof, didn't slate implement subject-oriented programming?

2:57 and/or AspectL ?

2:58 you can of course reimplement it using Interface-Passing Style.

2:59 where your interfaces can be seen as the subject

3:17 ProTip: Anyone familair with using om?

5:23 daGrevis: hi! how could i say something like if “x“ is in ["x" "y" "z"] ?

5:25 looks like im looking for contains?

5:29 TEttinger: ,(#{"x" "y" "z"} "x")

5:29 clojurebot: "x"

5:29 TEttinger: ,(#{"x" "y" "z"} "a")

5:29 clojurebot: nil

5:29 TEttinger: sets are functions, daGrevis

5:30 daGrevis: i didn't have set though

5:30 TEttinger: ,(doc contains?)

5:30 clojurebot: "([coll key]); Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'."

5:30 TEttinger: there's that too

5:30 daGrevis: yep, did that with contains?

5:30 TEttinger: haha I thought you were asking a question at first

5:30 the ? at the end threw me off

5:30 H4ns: daGrevis: only that it does not work, as contains? checks for the index range, not the values

5:31 daGrevis: ((set ["x" "y" "z"]) "x")

5:31 daGrevis: TEttinger, ha :)

5:32 TEttinger: you're right, H4ns -- "key is present" not "value is present"

5:32 daGrevis: H4ns, right. good catch

5:33 TEttinger: (inc H4ns)

5:33 lazybot: ⇒ 1

5:34 daGrevis: any idea how could i check that something is a English word or isn't?

5:34 want to filter out stuff like “anc2iwv9wh“

5:35 i have idea myself. get entropy of that

5:58 hyPiRion: daGrevis: sliding window + dictionary?

5:59 If you just want to check if something is an English word, you only need to look it up in a map.

5:59 daGrevis: i want to let through words with mistakes etc.

6:01 hyPiRion: uh. I'd go with Levensthein-Damerau then

6:01 daGrevis: okay, I will read about it

6:01 is there something like take-while that includes the element that returned false?

6:03 ,(take-while #(== % 2) [1 2 3 4])

6:03 clojurebot: ()

6:03 daGrevis: oh well ignore that

6:04 farhaven: daGrevis: do you only want to know _if_ something is an english word or do you want to offer translations?

6:04 for the former, a bloom filter could be a nice idea

6:04 daGrevis: farhaven, i want only to know

6:05 hyPiRion: farhaven: bloom filters would be reasonable if daGrevis didn't want words which may be mistakes to pass through

6:06 daGrevis: well i think that i can fix problem in the root

6:06 farhaven: make the filter large enough and errors become almost impossible :P

6:06 daGrevis: u see i get those words from twitter

6:06 and i parse them by simple regex

6:06 farhaven: heh, good luck finding any english in there

6:07 daGrevis: i get links inside them too and I don't want stuff like t.co/abc123 there

6:07 actually it's more like t.co and abc123 based on my current regex

6:07 farhaven, :)

6:09 might as well parse some book

7:41 gfixler: How would one achive (map vector [1 2 3] [4 5 6] [7 8 9]) if the vectors were infinite?

8:24 AeroNotix: gfixler: take

8:25 gfixler: https://gist.github.com/AeroNotix/a45de619ad2d4245cd53

8:25 map returns a lazy seq

8:25 hyPiRion: gfixler: do you mean an infinite number of vectors?

8:41 expez: I'm trying to read a file in a macro but the form (io/file some-file) barfs complaining that some-file is a symbol. How do I fix this?

8:41 AeroNotix: expez: show macro

8:43 expez: (defmacro my-macro [my-file] (println (slurp (io/file my-file)))) would be a minimal example

8:43 AeroNotix: so you need to splice the my-file variable

8:43 and also, you need to return a syntax quoted form

8:44 since that body will be evaluated at compile-time

8:44 and thus, my-file is literally a symbol

8:44 expez: right, I want to use the content of the file to build the source, but I'm having problems reading the file at compile time

8:46 Perhaps it's easier if I just wrap the macro in a function which reads the file?

8:46 AeroNotix: expez: show how you're calling this

8:47 because if you want the file to be read at compile-time, you need to pass something which has a value at compile-time

8:47 so that would be a string in the case of io/file

8:47 It only operates on the raw syntactic elements, not the values they may represent at runtime

8:48 expez: look

8:48 https://gist.github.com/AeroNotix/cba1855cc8bf18f0b612

8:48 because the macro gets the symbol 'c

8:48 not the string it represents

8:49 because at macroexpansion time, this is all it has

8:49 Unfortunately Macros are not covered in as much depth as they should be

8:50 expez: Might be a blessing in disguise

8:50 In cl I found the need to write a macro a lot more often

8:51 AeroNotix: That's probably not the case

8:51 Macros are overused

8:51 but, perhaps you need one here -- what are you trying to do?

8:52 expez: I'm writing a small library that records the arg => result pairs for certain functions and then creates mocks using the arg => result pairs it squirreled away

8:52 well, I'm trying :)

8:52 AeroNotix: expez: so the first part is taken care of by memoization

8:53 expez: http://clojuredocs.org/clojure_core/clojure.core/memoize

8:53 expez: I want to persist this to disk, so my tests don't hit external services

8:54 AeroNotix: IIRC memoize puts the mapping as part of its metadata

8:54 you could run your tests once, read out the memoize data

8:54 TBH -- this seems like a lot of work just to not write mocks yourself

8:55 llasram: expez: So the goal is a more general version of something like the Ruby VCR library?

8:55 expez: That's what I thought, but when the external services keep changing I found myself manually capturing a lot of data for use in mocks

8:56 llasram: yeah, that's the idea

8:57 Figured this would be pretty easy to write, but that project has 1.7k commits Oo

8:57 AeroNotix: For something basic it'd be pretty easy

8:58 llasram: expez: My suggestion for approaching this would be to write a very small macro which uses `with-redefs`

8:58 AeroNotix: yeah^

8:58 and having your body executed by logging the args and values to disk

8:59 And your macro would also generate code for reading a specific file (this can be done at runtime)

8:59 llasram: Well

8:59 Having trouble phrasing for some reason

8:59 But I think it'd be easier if the macro did nothing but the `with-redefs`

8:59 expez: yeah, this is the part I got stuck on, trying to read the bindings for with-redefs from file

8:59 llasram: And the main body of the work happened in the generated function you redef too

8:59 AeroNotix: llasram: this^

8:59 llasram: Interesting

8:59 AeroNotix: There's no reason it needs to read the file at compile time

9:00 macroexpansion time*

9:00 just generate the code for it

9:00 expez: mhmm :)

9:00 Thanks guys!

9:00 llasram: expez: Why do you need to specify the bindings in a file?

9:00 AeroNotix: llasram: to persist across runs

9:00 they want to run their tests, get initial values, run tests again using the values from the previous run

9:01 for some functions

9:01 llasram: I guess I'm thinking of the VCR style, where you write your test, it captures data the first time you run it, then it regurgitates the captured data on subsequent runs

9:01 In that model, you'd specify the functions to wrap in your test

9:01 AeroNotix: llasram: sure -- but it needs to persist this data somewhere, right?

9:02 llasram: Sure. I'm just talking about specifically "then bindings for with-redefs"

9:02 s,then,the,

9:02 AeroNotix: not sure what they meant by that

9:02 llasram: Indeed

9:02 And now we may never know...

9:03 AeroNotix: This doesn

9:03 This doesn't seem like a difficult task for Lisp

9:03 I'd probably make something like defn-recorded

9:05 expez: https://github.com/ifesdjeen/vcr-clj

9:05 there's this

9:06 I have the same reservations as Alex there

9:06 Mocking stuff is notoriously difficult to do properly

9:09 expez: yup

11:18 mi6x3m-alt: hey guys, what would you call a function returning the page size of a webbrowser page?

11:18 page-size [browser] ?

11:20 jeremyheiler: mi6x3m-alt: do you not like page-size?

11:22 mi6x3m-alt: jeremyheiler: nah, just asking :)

11:22 without or with verb

11:25 jeremyheiler: it seems fine, given the context you gave

11:28 vdmit11: Hi folks. I need to define a type whose interface and semantics almost exactly matches to list. The only difference I need is a different class name and perhaps a custom toString method. How can I do that?

11:30 In other words, I need to inherit list. I know inheritance is bad, but in this case it helps to avoid boilerplate code.

11:31 bbloom: vdmit11: do you really mean list? or seq?

11:32 dnolen_: vdmit11: if you're talking about deftype not possible, you just have to write the code

11:32 or defrecord for that matter

11:36 vdmit11: well, generally I need a sequence, but the list is the most suitable thing for me

11:38 Glenjamin: why cant you just use an actual list?

11:43 vdmit11: Well, I collect actions into lists. And there is two slightly different kinds of such list: one means "actions are done in sequence", another means "actions are done in parallel". They may be nested to each other and so on. And I would like to distinguish them, and I think it is not really a metadata, so I think perhaps I can just make two classes with the same behavior but different names.

11:45 H4ns: use a hash with a type and a list key. the type indicates whether it is parallel or sequential.

11:45 bbloom: yes, what H4ns said

11:45 or, use a vector and a set

11:46 [do this and then this] vs #{do all these in any order}

11:47 H4ns: no need for a "type", that is the message. just combine the existing data strutures in the way that you require.

11:47 TimMc: vdmit11: Yes, as others have said, the correct answer is to lift the tagging from the virtual machine level (class-tagged objects) to the "userspace" level -- tag/list pairs.

11:48 vdmit11: set looks more suitable because the order of parallel actions doesn't matter, but it requires the elements to be unique, and I think I may have duplicate actions done in parallel

11:50 tagging in a hash-map looks a bit redundant, but if there is no cleaner way, I'll use it

12:01 bbloom: i'm sure there's a multiset out there somewhere :-)

12:03 myguidingstar: Someone please help with this strange Clojurescript compilation error: https://gist.github.com/myguidingstar/ad29083023130817eb01

12:08 gfredericks: myguidingstar: that's definitely a weird use of macros

12:08 i.e., calling macroexpand

12:09 myguidingstar: are you sure you need a macro here?

12:09 myguidingstar: gfredericks, I know it, but I need an abstraction over javascript

12:10 gfredericks: myguidingstar: what are you trying to do exactly?

12:10 myguidingstar: gfredericks, please consider it a playground. I don't understand why the compiler yelled that message

12:14 gfredericks: I don't either.

12:14 and I don't have a cljs setup so I can't try reproducing outside of vanilla clojure

12:18 (and macroexpanding that in vanilla clojure doesn't give anything suspicious)

12:19 dnolen_: ,{{}}

12:19 clojurebot: #<RuntimeException java.lang.RuntimeException: Map literal must contain an even number of forms>

12:19 dnolen_: hrm, anyways myguidingstar my guess is that you have a malformed map based on the error

12:20 ,(hash-map {})

12:20 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: {}>

12:21 dnolen_: but also those macros don't make sense I can't really understand them

12:28 myguidingstar: dnolen_, I've just updated the explanation

12:28 btw, do you think it's a bug?

12:30 dnolen_: myguidingstar: I still have no idea what you are trying to do or why you trying to do it

12:30 gfredericks: myguidingstar: line 26 should fail the read regardless

12:30 dnolen_: if I can determine the above then maybe we can talk about bugs

12:30 that said ... I doubt it

12:31 myguidingstar: dnolen_, I'm trying to make a Compojure-like abstraction over a javascript request handler

12:32 dnolen_: myguidingstar: but what is the macro doing for you here?

12:32 it seems to serve no purpose

12:32 myguidingstar: dnolen_, user can use Clojure map to define what a request return

12:33 (instead of imperatively calling Javascript)

12:33 gfredericks: myguidingstar: why can't you do that with a function?

12:33 dnolen_: myguidingstar: what gfredericks said

12:34 myguidingstar: gfredericks, yes of course, but a macro should produce shorter javascript at runtime

12:35 anw, please consider it a playground

12:36 dnolen_: myguidingstar: remember, you have Google Closure Compiler working for you - anything you might do by hand will be trivial compared to that.

12:36 myguidingstar: dnolen_, thanks. I didn't think about it

12:37 anw, I want to learn an other thing about this mess, too

12:38 mi6x3m-alt: is there a version of doto that returns nil?

12:38 myguidingstar: (sorry for being so annoying)

12:38 gfredericks: mi6x3m-alt: no

12:38 myguidingstar: maybe try to produce a more minimal case?

12:39 extra points if it involve just one macro

12:39 mi6x3m-alt: gfredericks: thanks

12:39 myguidingstar: gfredericks, I did, and that one worked

12:42 gfredericks: myguidingstar: e.g., try it without the map, or with fewer keys in the map

12:42 without the pr-str

12:42 etc etc

12:43 dnolen_: ,(let [{:keys [foo]} '(foo [] {})] foo)

12:43 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: No value supplied for key: {}>

12:43 dnolen_: myguidingstar: ^

12:43 myguidingstar: my-response is getting (end [] {}) unevaluated and you're trying to destructure that

12:43 er (end [] {})

12:44 myguidingstar: dnolen_, you're right. But I tried with (macroexpand ...)

12:44 and it still failed

12:44 gfredericks: oh geez I didn't know you could map-destructure a not-map

12:44 dnolen_: myguidingstar: if you need to call macroexpand in a macro ... game over

12:44 myguidingstar: so the only good that will come of this is understanding how macros work ... fine if that's your goal

12:45 myguidingstar: gfredericks, I've just comment a more minimal code that works

12:46 dnolen_, absolutely I want to

12:46 dnolen_, any suggestion to make it work?

12:47 dnolen_: myguidingstar: macroexpand doesn't work for different reasons

12:47 + isn't defined for collections

12:47 you want str not +

12:47 gfredericks: dnolen_: that shouldn't fail at macroexpand time though?

12:48 ,(macroexpand `(+ ~{} ~[]))

12:48 clojurebot: (clojure.core/+ {} [])

12:48 dnolen_: gfredericks: it's not failing at macroexpand

12:48 failing at runtime

12:48 gfredericks: ooh okay

12:48 myguidingstar: dnolen_, I use [] and {} to make sure it's evaluated in javascript

12:49 dnolen_: myguidingstar: macroexpand and changing + to str makes it work

12:49 myguidingstar: I don't know what you are saying

12:49 if it's a http response it's just text

12:49 nothing to do w/ JavaScript

12:51 myguidingstar: (+ [] {}) is just to make sure the code is executed in javascript environment, not Clojure (macro expansion)

12:51 dnolen_: myguidingstar: yes this statement does not compute

12:51 (+ [] {}) is not legal Clojure or ClojureScript

12:52 myguidingstar: yes, you'll get a type warning for that

12:52 hmm, that's a bit off track

12:52 gfredericks: dnolen_: I think he means he can tell where + is running based on whether he gets an exception from the jvm or the js runtime

12:54 dnolen_: gfredericks: well ClojureScript has inference enough for obvious problem like this one - compiler warning

12:55 myguidingstar: dnolen_, I learnt that trick from clojurescript.test README https://github.com/cemerick/clojurescript.test

12:58 dnolen_: myguidingstar: anyways this works https://gist.github.com/swannodette/332c574cb4d9df41aa35

13:00 myguidingstar: but as I said before you can abstract over some JS lib w/o any of this macro stuff, it just creates more problems to do it this way.

13:01 myguidingstar: dnolen_, that's quite strange. I think I was unsuccessful with such code

13:01 dnolen_, that's the best lesson for me today, thanks

13:01 gfredericks: mo macros mo problems

13:01 myguidingstar: rule #1 ;)

13:02 SagiCZ1: hey guys.. i want to assert that there is only zero or one element in a collection, if there is more, i want clojure to throw runtime exception, how do i do that?

13:02 dnolen_: SagiCZ1: assert

13:02 ,(doc assert)

13:02 clojurebot: "([x] [x message]); Evaluates expr and throws an exception if it does not evaluate to logical true."

13:03 SagiCZ1: dnolen_: wow.. that was hard..

13:03 dnolen_: thanks :)

13:03 dnolen_: np

13:04 gfredericks: SagiCZ1: assert is only appropriate for guarding against programmer errors

13:07 whigmaleerie: dnolen_: opinion of assert vs the built-in precondition meta data?

13:08 dnolen_: whigmaleerie: just depends

13:09 bbloom: i've kinda given up on :pre

13:09 every time i use it, i shortly later discover i need to do something to an input before i assert something about it

13:09 and wind up rewriting it to an assert

13:11 SagiCZ1: bbloom: how would i get the only element of a list? is (first '(5)) the correct way?

13:11 ,(first '(3))

13:11 clojurebot: 3

13:12 bbloom: SagiCZ1: seems like a question for the room, not for me specifically...

13:12 but yes, that's fine

13:13 SagiCZ1: sorry about that bbloom

13:13 and thanks

13:31 gfredericks: okay so I feel like transit has to have an ambiguity on the JS side

13:32 between ints and floats

13:32 42 encodes to JSON as "[\"~#'\",42]", and 42.0 to "[\"~#'\",42.0]"

13:32 but javascript's JSON parser parses those two identically

13:47 schmee: how do I destructure a map with a key called `time`? It errors since `time` is also a core function

13:49 hyPiRion: schmee: ##(let [{t :time} {:time "foo"}] t) ?

13:49 lazybot: ⇒ "foo"

13:49 hyPiRion: or do you mean the symbol `time`?

13:50 ,(let [{t 'time} {'time "foo"}] t)

13:50 clojurebot: "foo"

13:51 gfredericks: ,(let [{:keys [time]} {:time "foo"}] [time time])

13:51 clojurebot: ["foo" "foo"]

13:51 bbloom: schmee: it absolutely should not give that error because it does not evaluate the destructuring expression

13:51 gfredericks: ,(let [{:syms [time]} {'time "foo"}] [time time])

13:51 clojurebot: ["foo" "foo"]

13:51 bbloom: you've got a syntax error somewhere

13:52 schmee: I see, thanks!

13:52 gfredericks: ,(let [{t time} {time :foo}] t)

13:52 clojurebot: #<CompilerException java.lang.RuntimeException: Can't take value of a macro: #'clojure.core/time, compiling:(NO_SOURCE_PATH:0:0)>

13:52 gfredericks: ,(let [{t +} {+ :foo}] t)

13:52 clojurebot: :foo

13:52 gfredericks: nice

13:53 dnolen_: gfredericks: yes Transit doesn't address the problem of roundtripping floats, but that's way bigger issue than JS anyway

13:53 gfredericks: and for the design space - not particularly important to address

13:54 bbloom: it's really quite amusing how bad of a trade off floats are for most use cases :-/

13:55 gfredericks: dnolen_: rich seemed to say that everything roundtrips perfectly, so this surprises me

13:55 dnolen_: gfredericks: was likely speaking about tagged values specifically (perhaps implicitly)

13:55 so if you don't have a handler so someone's custom type, doesn't matter

13:55 gfredericks: gotcha

13:56 right

13:56 dnolen_: gfredericks: if for some reason you need to roundtrip floats you can override BigDec and deal w/ it yourself.

13:56 gfredericks: dnolen_: what do you mean by roundtripping floats being a big issue? something about string representations of floats in general?

13:57 dnolen_: gfredericks: floating point reps have problems between languages

13:57 gfredericks: that's not an inherent problem is it? just divergent interpretations?

13:58 dnolen_: gfredericks: I already said you can solve this yourself if it's important ^

13:59 gfredericks: dnolen_: right, I'm just trying to understand how things work; sorry for the bother

14:00 if anybody else knows what dnolen_ meant I would be interested

14:01 hyPiRion: gfredericks: Well, for C/C++, it is both OS and compiler-dependent.

14:02 gfredericks: hyPiRion: IEEE 64-bit floating points in particular?

14:05 hyPiRion: gfredericks: Oh, it's about 64-bit specifically?

14:05 gfredericks: well in this context we're talking about JSON, so I figured so

14:05 * gfredericks checks the JSON spec

14:06 gfredericks: I guess they're not very specific about that

14:06 bbloom: gfredericks: floats are basically 100% broken for data interchange

14:06 gfredericks: bbloom: what I'm trying to understand is if that's justa coordination issue, i.e. lack of an adhered-to standard, or if it's something inherent to FP

14:07 bbloom: gfredericks: fundamentally, there are multiple floating point values that have the same string representation, but may produce different results when computed with

14:08 even within the same language, round-tripping to text can change is not an identity operation

14:08 s/can change/

14:08 /

14:08 gfredericks: bbloom: can't you solve that with more decimal places?

14:08 bbloom: gfredericks: no

14:08 floats aren't encoded in decimal

14:08 gfredericks: or are we talking about 0/infinity edge cases?

14:08 bbloom: no

14:08 gfredericks: I know they aren't

14:08 bbloom: http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

14:09 in short: floats are a friggin mess

14:10 hyPiRion: Best used in banking systems if you want to maximise damage.

14:11 gfredericks: based on what I know about decimal and binary numbers, I have a hard time making sense of this

14:11 if there were an example of two floats that print the same way, that'd be extremely helpful

14:12 the set of floating point numbers (excl the weird ones) should just be a subset of the ratios

14:12 and you should be able to use decimal representations to get arbitrarily close to any given rational number

14:12 hyPiRion: gfredericks: +0 and -0?

14:13 oh, that's probably a weird one.

14:13 gfredericks: hyPiRion: bbloom said it wasn't a 0/infinity/nan issue

14:13 yeah definitely weird

14:13 bbloom: gfredericks: i meant to say it's not JUST a 0/inf/nan issue

14:13 gfredericks: sure, either way

14:13 I'm ignoring the weird numbers for the moment since you said the normal ones have this problem too

14:15 bbloom: gfredericks: trying to find an article, hold on

14:16 gfredericks: I'm scanning through the one you already pasted

14:16 bbloom: sheesh, there's so many problems w/ floating point i don't even know where to start :-P

14:17 gfredericks: yeah I'm familiar with why they're problematic, I just didn't think they had the problem you were describing :)

14:18 bbloom: http://www.drdobbs.com/cpp/even-simple-floating-point-output-is-com/240165594

14:18 hyPiRion: gfredericks: they are represented on the form sign * significand * 2^(exponent - c)

14:18 bbloom: http://www.drdobbs.com/cpp/floating-point-input-and-output-are-not/240165984

14:18 http://www.drdobbs.com/cpp/accurate-floating-point-input-several-co/240166140

14:18 (the drdobbs site is atrociously difficult to navigate and for some reason breaks cmd-click in many places)

14:19 gfredericks: bbloom: I think this quote from your first link supports my hunch

14:19 "When a binary IEEE single precision number is converted to the closest eight digit decimal number, it is not always possible to uniquely recover the binary number from the decimal one. However, if nine decimal digits are used, then converting the decimal number to the closest binary number will recover the original floating-point number."

14:19 bbloom: gfredericks: if you read the rest, you'll see you that the standard printing mechanism does not have that property

14:19 it tries to create "nice" looking values

14:19 which is in line with the use cases where floats are actually valid: when accuracy doesn't matter really

14:20 gfredericks: bbloom: yeah, I can imagine real life serialization having ambiguities, I just didn't think decimal reps inherently had that problem

14:20 bbloom: gfredericks: i was talking about the *printed* reps

14:20 gfredericks: me too

14:20 bbloom: as spec'ed

14:20 gfredericks: there's printing in the IEEE spec?

14:20 bbloom: i thought so

14:20 gfredericks: probably so

14:21 so it's a spec problem then; I'm just saying it's easy enough to imagine a similar printing strategy that has no ambiguity

14:21 bbloom: yes, conversions to and from strings are in the spec according to wikipedia

14:21 gfredericks: i.e., it's not an inherent base 10 vs base 2 thing

14:21 bbloom: yes, but that printing strategy would produce reaaallly long decimal strings

14:22 gfredericks: hardly longer than the longest normal ones, no?

14:22 hyPiRion: use binary, be happy

14:22 gfredericks: :)

14:22 bbloom: well the standard string conversions include rounding, truncation, handle repeated decimals, etc

14:23 if you can't reinterpret cast a float to a bit string, you can't possibly round trip it correctly without intrinsic support

14:23 but the whole purpose of floats is to optimize when you don't care about losing some precision here or there

14:24 gfredericks: yeah; when I hear people complain about FP problems I usually assume it's related to the floating point magma

14:25 or base 2 vs base 10

14:25 bbloom: they basically only make any sense during the very last stage of a pipeline

14:25 gfredericks: whereas it sounds like this is the fact that rounding is in the serialization spec

14:25 bbloom: like colors in a rasterization buffer :-P

14:26 gfredericks: bbloom: hyPiRion: thanks

14:31 arrdem: $seen john2x

14:31 lazybot: john2x was last seen quitting 2 hours and 49 minutes ago.

14:31 arrdem: :/

14:33 gfredericks: in any case, my original question about transit wasn't about roundtripping particular floating points, it was about even roundtripping types in the first place

14:35 e.g., if I start with a long and a double in clojure, and I send it to JS and back, I'll get two numbers of the same type

14:35 bbloom: gfredericks: i think numerics are a problem & i've mentioned to dnolen_ that i'd like to be able to force longs

14:35 at least for js interop's sake

14:35 gfredericks: bbloom: yeah at worst you have to avoid the ground types

14:36 bbloom: i think this is a case of "now you're talking about the real problems"

14:36 gfredericks: that just requires cooperation across the system, you can't fix it only in the user JS code

14:36 bbloom: that is, you already had these problems w/ edn, json, etc

14:36 but now that you have a tool that papers over the (retroactively) obviously broken bits, you can see the underlying issues more lcearly

14:37 it's like when people hear that datomic doesn't need to touch the network to get the current database, and their first thought is "isn't the data stale then?" ... yes... but so is the data you get back from a SQL query!

14:37 same idea: once you eliminate stupid problems, the real struggles become clear... even if they are just more stupid problems :-P

14:38 arrdem: will cljs allow you to perform bitwise operations on the sign bit or does it hide bit 63 like the JVM does.

14:39 because one option... albeit a shitty one, is to just write a Double -> BitString -> Double pipeline.

14:39 bbloom: arrdem: would defeat the performance goals....

14:39 arrdem: bbloom: fair

14:39 bbloom: if you *need* exact representations: don't use floats.

14:40 full stop. with or without any network transport of any kind

14:42 gfredericks: bbloom: datomic analogy is a good one

14:42 bbloom: it's not exactness, it's type preservation

14:43 bbloom: gfredericks: if you lift a type/value tuple in to the domain of dynamic values, then you've got value exactness ;-)

14:43 gfredericks: yep

14:44 I'm not saying it was a bad design choice, I'm just interested in what the unadvertised edge cases are

14:45 bbloom: well numerics are always a good place to go splunking for edge cases!

14:45 gfredericks: when you have a lot of clojure usage at a large company, it's useful to have somebody familiar with such things

14:46 bbloom: pack on your door: Gary Fredricks -- Purveyor Of Fine Edge Cases

14:46 s/pack/plaque/ # i wasn't even close

14:46 gfredericks: ha

14:51 vdmit11: Hi folks. When I define a protocol, I would like to specify pre/post conditions like I can do with functions. I would like to assert that all method implementations may assume that the input will be so and so, and they all shall return a value that follows certain constraints. Is there a way to do that?

14:52 schmee: Does anyone know how to use an Thread/UncaughtExceptionHandler in clojure?

14:53 mi6x3m-alt: vdmit11: ehm, not that I know of, also the pre and post condition thing is seldomly used

14:53 schmee: I tried adding this to the top of the file but it doesn't work for me, http://www.paullegato.com/blog/uncaught-exceptions-in-clojure/

14:53 gfredericks: vdmit11: defprotocol doesn't support that, but I think you can wrap the generated function via alter-var-root

14:53 bbloom: vdmit11: just define a wrapper functions for your protocol methods

14:53 gfredericks: schmee: in what way does it not work?

14:54 bbloom: (defprotocol P (-foo [this x y z])) (defn foo [p x y z] {:pre ...} (-foo p x y z))

14:54 gfredericks: I like bbloom's idea better

14:54 vdmit11: wrappers are boilerplate and they are not abstract

14:54 I would like to specify interface, not implementation

14:55 schmee: gfredericks: well, I found a bug in a future I'm using, and now I've reintroduced the bug and added that handler thingy with a print

14:55 arrdem: well you can't have an interface with pre/post conditions... pre/post conditions are an implementation detail handled by the fn macro

14:55 gfredericks: vdmit11: I don't think you're specifying the impl in any sense

14:55 schmee: but it just hangs and doesn't print anything

14:55 bbloom: vdmit11: clojure does not have a notion of pre/post conditions are part of interface

14:55 gfredericks: schmee: futures catch exceptions

14:55 schmee: you'd want to deref the future

14:56 schmee: oh!

14:56 bbloom: vdmit11: and wrapper functions really aren't all that much boilerplate... they are frequently necessary to decouple argument handling, pre/post processing, from the service interface of the objects

14:56 schmee: I'm just using the future for dispatch only, so I can't actually access the value once I've sent it off

14:56 bbloom: vdmit11: in general, you should be defining so few protocols that the "boilerplate" should be an essential part of the work you're doing

14:57 gfredericks: schmee: well it's up to you where you want to handle it I guess

14:57 bbloom: vdmit11: if you need *the same* boilerplate many times, then you can define a macro to generate it

14:57 gfredericks: ,(defmacro elsewhere [& body] `(.start (Thread. (fn [] ~@body))))

14:57 clojurebot: #'sandbox/elsewhere

14:57 schmee: hmm yeah, I just want to print exceptions without wrapping my entire program in try/catch statements

14:57 gfredericks: schmee: ^ an alternative to future that should hit your handler

14:58 schmee: gfredericks: sweet, I'll try it out!

14:59 gfredericks: worked like a charm, thanks!

15:00 vdmit11: bbloom: well, I'm talking about readability when I say "boilerplate", when you see some pre/post conditions in the interface specification, you can understand better what kind of data must be passed to the method and what kind of value it returns, and you may assume that these assertions are always true and rely on these assumptions and write less code

15:00 bbloom: for me it just would be nicer to read an interface that gives some idea about inputs/outputs of a method

15:01 bbloom: vdmit11: protocols define java-style interfaces. that's just what they do. if you want a more powerful contractual programing mechanism, you'll have to look elsewhere or define it yourself

15:01 vdmit11: i'm also telling you the community accepted approach: just define a function

15:02 vdmit11: ok, thanks, I just wanted to know the conventional way

15:03 schmee: is there any way to list the currently running threads in the repl?

15:03 bbloom: vdmit11: that's the very first thing i told you :-P

15:05 gfredericks: schmee: http://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#getAllStackTraces%28%29

15:05 ,(Thread/getAllStackTraces)

15:05 clojurebot: #<AccessControlException java.security.AccessControlException: access denied (java.lang.RuntimePermission getStackTrace)>

15:05 gfredericks: I've never tried it; looks promising

15:06 sun.misc.Unsafe.park

15:06 is apparently a popular method on my jvm

15:07 schmee: gfredericks: it worked great. now I just gotta prettyprint it...

15:08 gfredericks: w00t

15:09 ,(.getStackTrace (Thread/currentThread))

15:09 clojurebot: #<StackTraceElement[] [Ljava.lang.StackTraceElement;@f8deca>

15:09 gfredericks: ,(str (firsrt (.getStackTrace (Thread/currentThread))))

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

15:09 gfredericks: ,(str (first (.getStackTrace (Thread/currentThread))))

15:09 clojurebot: "java.lang.Thread.getStackTrace(Thread.java:1495)"

15:10 gfredericks: ,(str (rand-nth (.getStackTrace (Thread/currentThread))))

15:10 clojurebot: "clojure.core$eval74$fn__75.invoke(NO_SOURCE_FILE:0)"

15:14 gfredericks: I can't believe I didn't know about that...that will be super useful for when things are hung in the repl.

15:25 andyf: bbloom: I saw your message in the :pre/:post error message clojure-dev thread, and am wondering if I am missing something when you say "it requires non-local analysis". Do you mean it requires resolving whether the symbol number? resolves to the Var #'clojure.core/number? vs. resolving to number? in some other namespace?

15:26 bbloom: andyf: more simply:

15:26 (def x false)

15:26 (defn f [] {:post [x]})

15:26 ,(def x false)

15:26 clojurebot: #'sandbox/x

15:26 bbloom: ,(defn f [] {:post [x]})

15:26 clojurebot: #'sandbox/f

15:26 bbloom: ,(f)

15:26 clojurebot: {:post [false]}

15:26 bbloom: ,(defn f [] {:post [x]} nil)

15:26 clojurebot: #'sandbox/f

15:26 bbloom: ,(f)

15:26 clojurebot: #<AssertionError java.lang.AssertionError: Assert failed: x>

15:27 bbloom: andyf: does that make my comment clear?

15:28 andyf: Eastwood can look at number?, see that it should resolve to #'clojure.core/number?, and I can bake into Eastwood that such a Var is by default a function, but it is uncomputable to determine whether its current value is a boolean or not.

15:28 Eastwood makes best guesses at times like that, based on usual practice.

15:28 bbloom: andyf: right, which is why that's a good analysis for a linter, but the vector vs not vector analysis is doable in the standard defn macro, hence my patch & comment

15:29 andyf: ok, makes sense. Thanks.

15:30 bbloom: getting formal: the analysis you just described is neither sound nor complete

15:30 but i'm an advocate for ignoring soundness and completeness ;-)

15:37 andyf: in lint tools, at least :)

15:38 bbloom: for sure

15:38 ...at least :)

16:07 augustl: how do I add a http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/server/handler/ResourceHandler.html to my ring.adapter.jetty handler?

16:11 seems I can just .getHandler and go from there, in a :configurator

16:21 jeremyheiler: augustl: i've had to do that before; seems like the "best way" given how it's all set up.

16:28 fifosine1: Is it faster to consistently use tail on a sequence or to reverse it first and grab the head over and over?

16:29 gfredericks: fifosine1: the former

16:29 er

16:29 bbloom: no

16:29 gfredericks: unless you mean

16:29 bbloom: fifosine1: do you need to be able to push on to the front of the list?

16:29 fifosine1: no

16:29 bbloom: use a vector

16:29 (doc peek)

16:29 clojurebot: "([coll]); For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empty, returns nil."

16:30 fifosine1: when do I want to use sequences vs. vectors? I've structured my code so that it's only using sequences. Should I probably be using vectors?

16:31 gfredericks: fifosine1: you're getting the last element repeatedly?

16:31 fifosine1: gfredericks: Yea, recurring on the last element of a list

16:31 gfredericks: fifosine1: why? what sort of collection is this?

16:31 fifosine1: a sequences

16:32 sequence

16:32 gfredericks: but why do you need the last thing? what else do you do with the sequence?

16:32 andyf: fifosine1: Many Clojure functions produce sequences as results, regardless of the kind of collection they are given, so trying to structure your code to use vectors "everywhere" is probably impossible, and using them everywhere that you return values from functions would require converting from sequences to vectors a lot.

16:33 I believe many people's Clojure code uses sequences where they do not present a performance problem, e.g. they only need to access it from first to last, and vectors if they have a special need for fast random access.

16:35 bbloom: fifosine1: use seqs whenever you're doing stuff to the left side of the collection, or when you're walking *the entire* collection linearly

16:35 fifosine1: otherwise, use vectors

16:35 andyf: that is fairly generic advice, though. If you have performance problems in particular parts of your code, profiling can help find those places and other data structures might help speed up those parts.

16:35 bbloom: there are other cases, of course, but that's a good rule of thumb

16:45 gfredericks: ~gfredericks: Yes. The file name

16:45 clojurebot: gfredericks: Yes. The file name is the interface to implement, and the content is a newline-separated list of the names of the concrete implementations

16:46 gfredericks: ~sadness and spaghetti

16:46 clojurebot: <amalloy> weeping willows with cold pasta draped over their limbs, marinara sauce dripping forlornly to the ground, silent splats nobody can hear

16:47 gfredericks: clojurebot picks up the weirdest things by accident

16:47 ~tutysara: sorry, not sure what

16:47 clojurebot: tutysara: sorry, not sure what is up, I'm getting the same thing. May take me some time to figure out and I can't do so now--I'll put something in github issues and update it ASAP.

16:47 hyPiRion: by accident?

16:48 oh right, like the random "this is to me" messages it reads

16:48 gfredericks: exactly

16:48 lynaghk: map unification

16:48 ~lynaghk: map unification

16:48 clojurebot: lynaghk: map unification is quite simple - it should be easy to see how it should be changed to do what you want for this new type.

16:49 gfredericks: ~tbaldridge: this

16:49 clojurebot: tbaldridge: this is why I think tick maybe an OK compromise, allow work to be done in the natural order, pick a respectable granularity, yield for timeout

16:50 gfredericks: okay last one

16:50 sveri: Hi, using compojure is there a way to get the request variable and some destructured post variables like this: (POST "/uri" [param1 param2] req (index param1 param2 req))?

16:50 gfredericks: ~arrdem: There

16:50 clojurebot: arrdem: There is a refheap API call to edit a paste. I'd happily take a pull request to add this functionality in refheap.el.

16:51 jeremyheiler: sveri: (POST "/uri" [param1 param2 & req] ...)

16:52 ooops

16:52 sveri: (POST "/uri" [p1 p2 :as req] ...)

16:52 sveri: https://github.com/weavejester/compojure/wiki/Destructuring-Syntax

16:52 tbaldridge: ~gfredericks: what the?

16:52 clojurebot: No entiendo

16:53 tbaldridge: ~gfredericks: this

16:53 clojurebot: Titim gan éirí ort.

16:55 sveri: jeremyheiler: thank you, didn't see that one

16:55 jeremyheiler: sveri: np!

16:55 gfredericks: tbaldridge: :P

16:57 ~b: ,

16:57 clojurebot: b: , is white space

16:58 SagiCZ1: ~SagiCZ1

16:58 clojurebot: Excuse me?

17:00 arrdem: what the heck..

17:03 lxsameer: hey guys, does any one uses emacs + cider ?

17:05 catern: nope

17:05 augustl: lxsameer: don't ask to ask, just ask :)

17:05 catern: everyone here uses Eclipse

17:05 lxsameer: augustl: ok then

17:05 arrdem: catern lies like a dog

17:05 catern: :D

17:06 arrdem: lxsameer: the last estimate I saw is that Emacs+{Cider,Slime} and Vim+Fireplace is ~75% of Clojure hackers

17:07 lxsameer: arrdem: really ? I'm new to clojure or any JVM lang, but as far as I see most of jvm related people use Eclipse

17:07 catern: lxsameer: I was joking

17:07 I use Emacs+cider

17:07 augustl: lxsameer: in my experience most jvm peeps use intellij

17:07 arrdem: lxsameer: depends on how much Java interop you're having to do... if you're using Clojure to wrap a huge Java app of course you'll do better with a strong Java IDE

17:08 lxsameer: if you're just handling a boatload of Clojure code, then the other tools do it better

17:08 catern: i personally hate Java and wouldn't be caught dead using an IDE

17:08 (someone reaaaaaaaaally needs to write a guide to Java for Clojure programmers)

17:08 gfredericks: I thought of that back in the day and then I promptly didn't do it

17:10 technomancy: a time-honored tradition

17:12 lxsameer: catern: cool, I setup up cider with clojure mode but i get this error opening a clojure file http://dpaste.com/3G9CCGF do know about it ?

17:12 arrdem: thanks

17:12 catern: lxsameer: have you enabled the cider-nrepl lein plugin?

17:12 lxsameer: catern: yeah I added it to ~/.lein

17:13 catern: speaking of configuring leiningen... it really should obey the XDG-hierarchy and put its config under .config/leiningen/

17:14 lxsameer: catern: really ? but mine is in ~/.lein, and I'm installed lein using the conventional way

17:15 catern: how can I make sure that leiningen used my conf files ?

17:15 catern: oh no

17:15 i was just saying

17:15 in general

17:16 totally not specific to you

17:21 arrdem: tbaldridge: has Bronsa done two or three years of GSoC now?

17:21 I forget

17:22 tbaldridge: 2 afaik

17:22 last year was clojure-in-clojure which resulted in tools.analyzer

17:23 arrdem: kk

19:07 sdegutis: What's a good way to name a library?

19:20 catern: UUIDs

19:22 sdegutis: Well played sir-or-madam.

19:22 AeroNotix: sdegutis: I usually just use http://online-generator.com/name-generator/project-name-generator.php

19:22 sdegutis: Thanks.

19:23 I'll try doing the whole metaphor thing that the Ruby people do.

19:23 Aha! "Computer Program."

19:23 Oh wait.

19:23 AeroNotix: sdegutis: meta

19:23 what does the program do?

19:23 sdegutis: AeroNotix: I'm sure that's taken.

19:23 AeroNotix: Oh it like, well...

19:23 I don't know.

19:23 It's cool though.

19:24 gfixler: sdegutis: I named a tool like that once. I called it "MultiTool"

19:24 AeroNotix: unknownjure

19:24 sdegutis: LOL got "Metaphor Essential" from http://online-generator.com/name-generator/project-name-generator.php

19:24 gfixler: sdegutis: then I was going to rename it later; I never did

19:24 sdegutis: gfixler: Perfect!

19:24 gfixler: Ah nope, trademarked: http://www.trademarkia.com/trademarks-search.aspx?tn=multitool

19:24 AeroNotix: sdegutis: I just got "disappointed toothbrush"

19:24 gfixler: sdegutis: MultipleTool!

19:25 sdegutis: SoManyTool!

19:25 sdegutis: Ah nice call.

19:25 Yes that last one works great. Thanks!

19:25 I'll rename my app to that. Thanks!

19:25 gfixler: WowSuchUtil

19:25 sdegutis: Even better.

19:26 This is my app btw http://hackhydra.com/

19:26 Go buy some of it.

19:26 AeroNotix: I don't own an iProduct

19:26 gfixler: iDontEither

19:26 AeroNotix: Who would? Chumps

19:27 gfixler: I have gridding in Ubuntu

19:27 c/o Compiz

19:27 although I'm really looking into this xmonad thing now

19:27 AeroNotix: gfixler: I use xmonad -- wanted to use stumpwm

19:27 but stumpwm shares groups across screens

19:27 so individual screens don't have individual groups, kind of annoying

19:27 apparently it can be hacked around

19:28 gfixler: AeroNotix: you use stumpwm with xmonad?

19:28 or xmonad in place of stumpwm

19:28 AeroNotix: gfixler: no, stumpwm and xmonad are separate window managers

19:28 gfixler: right, that's why I was confused :)

19:28 I parsed wrong

19:29 AeroNotix: xmonad is fine, really. I just really like Lisp and the idea of being able to hack on my WM from emacs and have it evaluated straight away

19:29 gfixler: I'm learning Haskell, slowly but surely, and I want power over my wm

19:29 AeroNotix: Haskell doesn't interest me

19:29 gfixler: whoa, that's what stumpwm does?

19:29 AeroNotix: Yeah, it's a CL process you can connect to

19:30 so you just use SLIME like you would any other CL process

19:30 gfixler: suddenly stumpwm has become interesting

19:30 AeroNotix: it's great if you don't mind the way it handles groups

19:30 gfixler: by 'screens' do you mean monitors?

19:30 AeroNotix: highly recommend

19:30 yeah

19:31 gfixler: btw, thanks for the answer like 10 hours ago re: (take)

19:31 AeroNotix: gfixler: no wakkas

19:31 gfixler: that was locking up on me, but it turns out I was passing it a vector of infinite expressions

19:31 they needed to be separate things to map

19:31 AeroNotix: gotcha

19:31 gfixler: obvious, now that it's not 4AM

19:31 AeroNotix: :)

19:31 gfixler: man, now I don't know which wm I like more

19:32 catern: i've never tried stumpwm

19:32 AeroNotix: I'd definitely give stumpwm a go

19:32 gfixler: Haskell is super interesting to me, but CL is really awesome, too

19:32 catern: but AeroNotix has made me interested in CL

19:32 AeroNotix: catern: every lisper should try CL out :)

19:32 it's the most "mature" of the lisps I've used

19:32 catern: i've never actually used CL, just scheme and clojure

19:32 gfixler: I made it halfway through PCL, and I like CL quite a bit

19:32 although I prefer Lisp-1s now

19:32 AeroNotix: gfixler: PCL is a great book :)

19:32 catern: it appears enterprisey

19:33 AeroNotix: catern: enterprisey lisp, good one :)

19:33 gfixler: AeroNotix: I only stopped because it was turning into giant projects

19:33 AeroNotix: gfixler: lisp1 > lisp2

19:33 gfixler: I'd like to revisit them at some point

19:33 sdegutis: welp

19:33 catern: AeroNotix: inasmuch as that's possible

19:33 gfixler: we made sdegutis sad

19:34 AeroNotix: catern: it's definitely a large lisp

19:34 gfixler: AeroNotix: is it, or do you think it's possible to have a window over top of a window in stump or xmonad?

19:34 AeroNotix: and it suffers its "design by committee" roots

19:35 gfixler: floating windows are possible in both

19:35 gfixler: catern: CL has crazy names for everything

19:35 arrdem: eh.. the Lisp2 argument that "well a bunch of the good names are needed for functions, and locals vs. globals isn't obvious" does make sense to some extent

19:36 AeroNotix: disagree wholeheartedly, but whatevs, it is what it is

19:36 catern: i actually prefer shared-workspaces-between-monitors to independent-set-of-workspaces-per-monitor

19:36 so it sounds good

19:36 arrdem: you just need an editor that can interface with the analyzer and highlight locals and globals differently :P

19:36 scottj: gfixler: you can have windows over top of windows in several ways in stumpwm. one is a workspace that's all floating windows. another is multiple windows in the same tiling frame, where one window is limited size like maybe a dialog or a movie window with a different ratio. another way is if you have one window fullscreen, like a video, you can have windows in tiled frames appear over the top of it.

19:36 AeroNotix: catern: you caveman1

19:36 !

19:36 catern: (er, assuming you can mix workspaces)

19:36 AeroNotix: catern: wdym mix workspaces?

19:37 catern: AeroNotix: nonsense! it's powerful to be able to move my emacs and terminal workspace to my large monitor or to my small monitor

19:37 AeroNotix: like, i can independently choose workspaces for the two monitors. the workspace doesn't span across both monitors

19:37 AeroNotix: catern: exactly -- stumpwm doesn't do this

19:37 and I want that behaviour

19:37 catern: what does it do?

19:38 one big workspace covering both monitors?

19:38 AeroNotix: exactly

19:38 catern: aw, lame

19:38 AeroNotix: yeah, biggest killer for me

19:38 I spent all weekend setting it up getting nerdily exicited (single monitor at home)

19:38 got to my multi monitor setup at work and then had a sad

19:38 catern: hack it yo

19:39 AeroNotix: X code (even in lisp) makes me puke

19:39 gfixler: AeroNotix: yeah, that's lame

19:39 catern: huh, surely it's plenty abstracted already

19:39 AeroNotix: apparently if stumpwm isn't in xinerama mode then it works with separate groups

19:40 scottj: catern: not really (having viewed my fair share of stumpwm code)

19:40 catern: (if clojure wasn't hosted on the jvm we could have a clojure TWM)

19:40 gfixler: AeroNotix and scottj - I meant that I'd like to have 2 fullscreen windows with the front one a bit transparent

19:40 AeroNotix: catern: there's no reason why not -- I assume you mean the long startup time/

19:40 scottj: gfixler: I think you could do that fine

19:40 gfixler: e.g. I've had code fullscreened over Autodesk Maya, sending commands through from Vim, and watching things change in the 3D scene

19:41 scottj: transparency levels is a thing?

19:41 catern: AeroNotix: it just feels wrong to have to boot up a memory-huge JVM just for my window manager

19:41 AeroNotix: catern: I agree

19:43 scottj: gfixler: handled by compositor like compton, not window manager.

19:43 catern: not for long!

19:43 (wayland)

19:44 (and that separation is dead in all the DEs anyway)

19:44 gfixler: scottj: understood - I am a newb in the field of window layout

19:45 DE, WM, compositor... these are just words, really

19:46 Compiz has logical monitors, which I've needed, as I use the Matrox GoofyName TripleHead2Go Digital Edition

19:46 i.e. I have one DVI cable from the card to the Matrox box, and 3 from there to each of my 19" screens

19:46 the computer sees one, 4' wide monitor

19:47 so fullscreen and maximize do their thing across all displays

19:47 I wrangle that with Compiz's "Outputs"

19:47 i.e. with geo strings - 0x0+0+0

19:48 but with something like xmonad, I think I could make all manner of splits and such

19:49 I'm curious about nesting of logical things - like could I split the 1 group into 3 parts, and then sub-split those in a useful way

19:51 AeroNotix: gfixler: just try it out

19:51 it's easier to see what's possible when you use it

19:52 gfixler: Ah, the old "Dive Into X" approach

19:59 catern: hmm

20:25 justin_smith: gfixler: I've run into issues with some wms and not others, in my experience xmonad and i3 are better behaved than most

20:26 gfixler: what made me stick with i3 is the fact that when a monitor disappears, it doesn't reshuffle windows that were on that monitor, the "frame" of things that was on that monitor is just detached (and then attachable to any other monitor but configured as it was before in terms of window placement within the monitor)

22:06 myguidingstar: Hi all, I'm doing TDD with cljx but cljsbuild tends to compile before cljx finishes

22:07 as a result, the final javascript is a mix of old and new clojure(script) source

22:09 I mean I run "cljbuild auto" and "cljx auto" at the same time

23:16 allenj12_: is anyone here familiar with overtone?

Logging service provided by n01se.net