#clojure logs

2014-03-21

00:09blakeHey all: I want to generate a sequence from one of a series of functions for guessing numbers. The functions are of the form "fn[lo hi]" and return a number between lo and hi. I want to create a sequence of the numbers returned, where the sequence ends when the value returned matches the number to be guessed.
00:10blakeI know this is a noob question but...I'm a noob =P
00:10blakeShould I just use loop?
00:11beamsohttp://clojuredocs.org/clojure_core/clojure.core/take-while ?
00:11blakeAhhh...thanks beamso.
00:13beamsonot a problem
00:16amalloyblake: see also ##(doc iterate)
00:16lazybot⇒ "([f x]); Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects"
00:17amalloyyou probably want to iterate over a pair of [hi lo], with a function that narrows it according to a guess
00:19blakeamalloy: Yeah, it's putting all the pieces together that's getting me.
00:20blaketake-while I get. But the examples don't have changing parameters to the function calls.
00:22amalloyblake: well, you can't with take-while. that's what iterate is for. the general structure is going to look like (take-while (complement successful-guess?) (iterate improve-guess [0 100]))
00:23amalloywhere improve-guess takes a [hi lo] pair and returns a new [hi lo] pair by guessing something according to the strategy and seeing whether it was higher or lower
00:23beamsoi didn't realise that the guessed values were being passed back into the function
00:24blakeRight. That's how it knows to narrow it's guessing range. Also, one of the functions has a random element, so I have to make sure I'm not--getting into trouble there.
00:25amalloyheh. well, purity is nice, but a function that's impure because of randomness is going to be a lot easier than anything else here
00:25amalloyit's good to feel a little uncomfortable about it, though
00:25blakeBut how do I get the return from improve-guess to test for a successful guess?
00:26amalloyblake: you include that as part of improve-guess
00:26blakeYeah, I'm trying to get used to the whole super-high-level/super-low-level thing.
00:28seangroveI think I'm confused about core.async tap
00:28technomancyturing vertigo?
00:28blakeHeh. Maybe.
00:29seangroveI have a channel, I pass it to (mult ...) (not sure what this does), then I can take the result of that and the channel and pass it as (tap (mult ...) my-ch) and I get back ... hrm, I'm not sure
00:30seangroveOk, I think I need to create a local channel and then tap the mult result onto that
00:31seangroveYup, that did it
00:34sm0kehow do i create a java class which behaves like a record in clojure?
00:34amalloyblake: if you want an example solution to look at, there's https://www.refheap.com/62676
00:35sm0keso class MyClass { private a; } , should behave like (:a (MyClass. 1)) => 1
00:35sm0kewhat class i need to extend/implement?
00:36amalloyto behave like a record? you have to do a lot of work. why don't you just do it in clojure, sm0ke?
00:37sm0keamalloy: yea clojure record have some porblem with serialization
00:37sm0keamalloy: is it really that hard?
00:38ivanI am going to email hotspot-compiler-dev@ about https://github.com/technomancy/leiningen/issues/1025 - does anyone want to be cc:'ed (especially people who know how the Clojure compiler works?)
00:38amalloy&(require 'clojure.reflect)
00:38lazybot⇒ nil
00:38amalloy&(require 'clojure.reflect.java)
00:38lazybot⇒ nil
00:38amalloy&(ancestors clojure.reflect.java.Constructor)
00:38lazybotjava.lang.ClassNotFoundException: clojure.reflect.java.Constructor
00:38amalloy&(ancestors clojure.reflect.Constructor)
00:38lazybot⇒ #{clojure.lang.IMeta clojure.lang.Seqable clojure.lang.Associative clojure.lang.IKeywordLookup clojure.lang.ILookup clojure.lang.IRecord clojure.lang.Counted java.lang.Object clojure.lang.IPersistentMap java.io.Serializable java.util.Map clojure.lang.IObj clojure.lan... https://www.refheap.com/62678
00:39amalloysm0ke: that's the list of interfaces you have to implement to really act like a record
00:39sm0ke:/
00:39sm0kehmmm IKeywordlookup is interesting
00:39amalloybut records are serializable, so i think that whatever problem you've found with actual records is imaginary
00:40sm0keamalloy: https://github.com/nathanmarz/cascalog/issues/239
00:41blakeamallow: Thanks. I'm heartened that it looks a lot like the code I've written, the parts that I got working, anywya.
00:41amalloyblake: most IRC clients let you tab-complete other users' names. i can tell you don't know this because you spelled my nick wrong :)
00:42amalloysm0ke: oh man. trying to do it in java makes that problem much much worse, not better
00:42blakeamalloy: Aha. Another good tip!
00:43amalloyjust do what the ticket suggests, and define your own serializers, or use a map instead of a record (good advice in general anyway)
00:49sm0keRegistering my own serializer implies writing another class in java
00:49sm0keor using a gen class
00:49sm0kewhich is equally gros
00:51amalloywell, it's gross that kryo makes you extend a class instead of implementing an interface, but you can use proxy instaed of gen-class
00:52amalloyjust like https://github.com/revelytix/carbonite/blob/master/src/carbonite/serializer.clj#L28 does
00:52sm0keamalloy: i dont know how ancient is that library you showed me, but i guess 100 years old?
00:53amalloybro, you're the one trying to use it
00:53amalloybecause cascalog uses it
00:53sm0keamalloy: :) kryo has moved to esoteric also now there are just write and read methods
00:54sm0keamalloy: also for registering you dont need to send instance just the serializing class
00:55sm0kecascalog uses com.twitter/carbonite i guess
00:56sm0keoh thats the confusion, when i search for carbnite i get this only which you send me
01:01JavaIsAwful'night all
01:02sm0kethe dawn of Java
01:02sm0kedusk?
01:08TheMoonMasterI've run into a bit of a snag, I have a socket connection that I'd like to be available everywhere since that's probably a lot cleaner than passing it around everywhere. How can I do that without getting "Unable to resolve symbol" when requiring other files?
01:11sm0keTheMoonMaster: Why is passing around not cleaner?
01:11TheMoonMastersm0ke: Because it's an isolated app and it just ends up being A LOT of calls of things like, (write out "message")
01:12TheMoonMasterWhere passing out seems extremely redundant because it will never ever change.
01:12TheMoonMasterIt's always going to be that single socket connection.
01:12TheMoonMasterWell, {in: reader, :out writer}
01:13sm0keTheMoonMaster: and you cant `use` the namespace containing it where you require it?
01:14TheMoonMasterIt's defined in app.core so it might make a circular dependency.
01:14sm0kethen define it in a namesapce which everyone else will `use`
01:15sm0kea namespace dedicated for socket operation maybe
01:16sm0kewhere you can define (write..) (read..) and you dont need to work with that socket instance anywhere else
01:18blakeamalloy: Having some trouble making that code work. It seems to always replace the high value, never the low...
01:18TheMoonMasterGotcha, I think I just need to rethink the architecture a bit more. Thanks
01:20amalloyblake: when i paste that into my repl, i get stuff like: (guess-stream 50 bad-guesser 1 100) ;=> ([1 100] [37 100] [37 87] [37 77] [37 71] [50 71] [50 59] [50 58] [50 51] [50 50])
01:21blakemalloy: Huh. I get things like [1 100] [1 49] [1 24] [1 11]... Lemme try a clean namespace.
01:21amalloydid you pick 1 as your number? :P
01:22blakeHeheh.Wait...Lord, I hope not.
01:24blakeamalloy: OK, it's obviously getting late. I was passing in 1. Duh.
01:27sm0kehurm wtf is print-dup? i defined a literal tag which creates a Java instance but when i do something like {:key #my/tag[1]}
01:28sm0keI get CompilerException java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined
01:28sm0ke,(doc print-dup)
01:28clojurebot"; "
01:50vimuser2hmm
01:51vimuser2(:test ni) is nil, is this supposed to be true?
01:51vimuser2erm , is this the way it's supposed to be?
01:52vimuser2(nil :test) fails to copmile...
02:06FrozenlockIs there some kind of timestamp function in cljs, or is it just js/Date?
02:07ivanFrozenlock: (goog.now) if you prefer that
02:09Frozenlockivan: isn't it the same thing?
02:10ivanyep
02:10Frozenlockah ok :-p
03:52john2xvimuser2: yes, that's intentional
03:55arrdem,(println "http://i.imgur.com/ATY0kCE.jpg") ;; testing erc images
03:55clojurebothttp://i.imgur.com/ATY0kCE.jpg\n
03:55arrdemtest passed... this is either going to be awesome or terrible
05:33danielszmulewiczI just encountered this in a leiningen project.clj: ":repositories {"snapshots" {:url "s3p://lein-snapshots/snapshots"}}" Has anybody seen that before? And what is s3p?
05:35mpenets3 wagon private url scheme
05:35mpenetsee: https://github.com/technomancy/s3-wagon-private
06:14danielszmulewiczmpenet: Oh, thanks!
06:14danielszmulewicz(inc mpenet)
06:14lazybot⇒ 2
06:55wagjogood morning (ugt)
07:12clgvgood lunch (GMT+1) :P
07:20neilmHi, I'm starting with midje autotest (doing the clojure mooc). When I save it says no facts checked. What am I doing wrong?
07:21clgvneilm: oh hmm, that stupid crystal ball is defect, so no idea. ;)
07:22clgvneilm: you need to provide more information about your project setup so that someone might be able to help you
07:22neilmbetter on email perhaps
07:23clgvneilm: huh? why?
07:25neilmclgv: because not sure about pasting into irc anyway just cloned the trainingday repo
07:25neilmclgv: project reads (defproject training-day "1.0.0-SNAPSHOT"
07:25neilm :dependencies [[org.clojure/clojure "1.5.1"]
07:25neilm [iloveponies.tests/training-day "0.1.0-SNAPSHOT"]]
07:25neilm :profiles {:dev {:plugins [[lein-midje "3.1.1"]]}})
07:25neilmclgv: tests run once only
07:26clgvneilm: there are sites for posting gists refheap.com or gist.github.com
07:26clgvneilm: did you run "lein midje :autotest" in you project folder?
07:26Kneivaneilm: that autotest is broken in those excercises
07:26neilmclgv: I did
07:27neilmKneiva: thanks
07:27Kneivaneilm: or it doesn't work because the tests are in separate projects
07:27neilmKneiva: It gets better later?
07:28Kneivaneilm: I don't think it has been fixed yet
07:28clgvneilm: I have [midje "1.6.2"] in my project's dev dependencies and [lein-midje "3.1.3"] in my ~/.lein/profiles.clj in the :user profile dependencies
07:29clgvneilm: and the tests are in the same project as the code
07:29neilmclgv: yep
08:03mikerodIs there a significant perf overhead to setting up dynamically bound vars in a fn via `binding`? Example; I have a fn that is called 500K-1mil times (from different locations) and it rebinds a dynamic var each time when the fn body is entered.
08:09Pate_Hey peeps. I'm doing an Introduction to Clojure talk in my local dev community, and I'm looking for good resources on the best way to introduce developers to Lisp/Clojure. I particularly like Rich's approach of starting with data structures and working from there. Do you know of any good resources I can borrow from, or have advice for approaching a large group, e.g. using whiteboard vs powerpoint vs Light Table?
08:15wagjoPate_: For slides, I would recommend Stu's at https://github.com/stuarthalloway/clojure-presentations , they are CC licensed
08:15Pate_thanks, wagjo
08:18wagjomikerod: Yes
08:18mikerodwagjo: any particular reason for that?
08:18mikerodI've tried to experiment some with a profiler
08:18wagjomikerod: I've tested var-get/var-set and it is very slow, compared to the atom or hand-crafted mutable reference
08:19mikerodhmm interesting
08:20mikerodI did a really basic example like : `(time (dorun (repeat 100000000 (binding [*ns* (the-ns 'my.tester)] (resolve 'a)))))`
08:20mikerodto attach a profiler and just see what sort of hot-spot I hit
08:20wagjowell just reading a dyunamic var checks if it is a root binding or a thread local one, if it is the latter, it gets a frame for given thread and from this frame it gets the thread local value
08:21mikerodI got about "Elapsed time: 22953.87 msecs", not so bad. The example is pretty trivial though.
08:21mikerodwagjo: so you are saying commenting on the overhead of reading a dynamic var in general?
08:21mikerodso you are commenting*
08:22wagjoset has to go through same checks too
08:24mikerodinteresting
08:25mikerodI suppose this should be avoiding in a heavily hit fn then...
08:26wagjobut it may be OK for you, depends on the situation
08:27wagjoAtom is faster so if you do not need the additional features of Var, I would go with atom
08:27mikerodwagjo: in my usage specifically, I needed to change the *ns*.
08:28mikerodwhich is a strange use-case probably
08:29mikerodI appreciate the feedback on it.
08:29wagjomikerod: well that is a strange case indeed :)
08:30wagjohacking the compiler?
08:32wagjomikerod: OK I've dug up my benchmarks, swap! is 2-3 times faster than var-set using with-local-vars
08:33mikerodwagjo: interesting, I guess that makes sense though
08:33mikerodwagjo: um, hacking the compiler; I suppose
08:33mikerodI'm in a DSL scenario. I have to create fn's but they are coming from different *ns* environments
08:33mikerodSo I want to let the fn body be eval'ed against the *ns* it was defined in.
08:36mikerodI think there are smarter ways to accomplish what I'm going for. So exploring those. I was generally interested the perf of using `binding` though.
10:09clgvmikerod: yeah binding kinda slows down compared to just passing functions as parameters
10:09clgvor values
10:09clgvmikerod: do you have a lot if these bindings?
10:59uzoc/ear
12:17seangroveGenerated art with Om/clojurescript http://dl.dropbox.com/u/412963/Screenshots/dj.png
12:17locksseangrove: looks almost like Piet
12:18seangroveHeh, just kidding - getting a dragging with snap-to-grid / snap-to-arbitrary-guidelines components going
12:18seangrovelocks: Oh, interesting, you're right, heh
12:18malynseangrove: Boo! I was excited about the generated art angle. :)
12:19seangrovemalyn: Maybe we'll get there :)
12:20dnolen_seangrove: nice
12:22ddellacostadnolen_: this caused me a lot of pain: http://dev.clojure.org/jira/browse/CLJS-523
12:22ddellacostadnolen_: seems like there should be some way for dates to return a hash value so that it doesn't break, for example, sets
12:23seangroveAh, the understated elegance of real-world Javascript "toString.call(aDate) == '[object Date]'"
12:27dnolen_ddellacosta: sure patch welcome
12:28ddellacostadnolen_: is it reasonable to add something further to extend js/Date though? Seems like that jira thread suggests that would not be the direction folks want to move in. The fix is simple--using the string representation of Dates to generate a hash works.
12:28dnolen_ddellacosta: CLJS-525 is the only thing I'm interested in
12:30ddellacostadnolen_: okay, understood
12:32dnolen_ddellacosta: a separate ticket for proper hashing of dates not based on strings would be considered, Joda Time looks like it some good ideas
12:33cemerickcontrary to the docs, e.g. >! and co. never return anything but nil. I presume this is a bug?
12:33ddellacostadnolen_: okay, thanks. I'll go head down that rabbit hole now...
12:34JavaIsAwfulI'm doing some command line parsing, and I want `server` or `client <url>` to be valid arguments. What's the convention to use for the usage string?
12:35dnolen_there are lots of useful ClojureScript libraries now, feel free to extend this list http://github.com/clojure/clojurescript/wiki#useful-libraries
12:35JavaIsAwfulthe best I could think of was "[server/client url]", but that's obviously not proper
12:38JavaIsAwfulohh, I think the convention is [server|client url]
12:39JavaIsAwfulexcept server and client are literal strings, while url is a variable name
12:39JavaIsAwfulI suppose I should instead use [--server|--client url]
12:40jjttjjmaybe a dumb question but is importing 20 million small entities going to be feasible/easy on a normal pc
12:40jjttjjin datomic
12:41dnolen_jjttjj: more likely to get a good answer in the #datomic channel
12:42jjttjjdnolen_: k thanks
12:42swksexit
12:55mr-foobardnolen_: In om can I print a component to string ?
12:55dnolen_mr-foobar: dom/render-to-str
13:00dnolen_mr-foobar: https://github.com/swannodette/om/wiki/Documentation#omdom
13:01mr-foobardnolen_: thx !
13:10JavaIsAwfulin tools.cli, is there a way to have a command line option change the :parse-fn for another option?
13:12JavaIsAwfulspecifically, I have a --IPv6 flag, and if it's on, I want the --hostname=HOST option to be parsed by Inet6Address instead of Inet4Address
13:35arrdemJavaIsAwful: I don't think there is. For something like that you'll proabably have to implement it yourself as a tack-on transform over the options map.
13:36JavaIsAwfularrdem: I've decided to just leave the host un-parsed, and let the client function handle it
13:36JavaIsAwfulit's simple enough that way
13:36arrdemor that I guess...
13:37arrdemI'd argue that if you have some standard IR for an address that's more detailed than a string you should convert to it early rather than late but that's just me.
13:38JavaIsAwfulwell, it's not like this is production code
13:38JavaIsAwfulso I'm not too worried about it
13:46arrdemtotally quoting you on that...
13:49amalloyJavaIsAwful: that shouldn't be possible in tools.cli, because it processes the args one at a time and there's no guarantee of what order the user passes them
13:53JavaIsAwfulamalloy: that makes sense
14:01JavaIsAwfulso, say I have two functions, f and g, a boolean b, and some argument
14:01JavaIsAwfulbased on b, I want to either do (f argument) or (g argument)
14:02JavaIsAwfulis there a better way to do it than this: ((if b f g) argument) ?
14:02JavaIsAwfulit's kind of hard to read
14:02JavaIsAwfulimo
14:03pyrtsaIf you really find the above hard to read, of course you can write (if b (f argument) (g argument)).
14:03Averellor maybe a multimethod?
14:03dacc(cond a (f arg) b (g arg)) ?
14:04JavaIsAwfulI don't really want to call (f arg) and (g arg) separately though
14:04JavaIsAwfulI guess this really is the simplest way
14:04pyrtsaJavaIsAwful: Just get used to thinking (if b f g) can return a function.
14:04daccyeah, reads fine to me
14:05JavaIsAwfulpyrtsa: I'm used to things returning functions, just something seems bad about it to me
14:05JavaIsAwfulbut I guess it beats the alternatives
14:05dacchigher order functions are your friend =)
14:05pyrtsaJavaIsAwful: You can of course use a let expression to highlight the fact that the function gets called either way. (let [h (if b f g)] (h arg))
14:05JavaIsAwfulpyrtsa: that's a good point, I think I'll do that
14:06JavaIsAwfuldidn't think of that
14:06pyrtsa:)
14:12JavaIsAwfulI think I should start using my github username, so people actually remember me
14:12RosnecI've probably used about 5 different nicks in here before :P
14:21amalloyRosnec: back when i had trouble reading ((if b f g) arg), i decided to use it whenever reasonable, so that i would get used to it and improve my command of the language
14:22Rosnecamalloy: I don't really have trouble reading it, just something about it seems wrong to me
14:22Rosnecnot a big deal
14:23RosnecI use it whenever I can, though
14:23Rosnecor better yet, do the thing with let that pyrtsa suggested
14:27justin_smithbefore I go and implement this myself - is there a clojure or java package that would let me check if a string is an SQL reserved word?
14:27justin_smithseems like a simple set of strings would suffice, but no need to store the information twice if it is out there somewhere
14:30hiredmanjustin_smith: that is highly implementation dependent
14:31hiredmanfor example, fun fact, ssl is a reservered word in some versions of mysql
14:31justin_smithweird
14:31justin_smithOK, I'll just put a bunch of strings in a set for the db backends I care about
14:31justin_smiththanks
14:41puredangerif you're using JDBC, there is a call in DatabaseMetaData that can give you the set of reserved words for your database
14:42justin_smithnow THAT would be nice
14:42puredangerhttp://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSQLKeywords()
14:42justin_smithsweet, exactly what I was looking for actually
14:42puredangeralthough it looks like that is a list in addition to SQL:2003 keywords
14:43justin_smithwell I can compromise and hardcode those
14:44justin_smithbut better that than have to hand collate (and keep updated) the reserved words of all the backends we support
14:44justin_smith(inc puredanger)
14:44lazybot⇒ 1
14:45puredangerhazards of having written a JDBC driver :)
14:54seangrovednolen_: What's the use-case for :shared? If I have some data modifyable elsewhere that all of my subcomponents need to be able to access the latest version of, is that an appropriate place to put it vs app state?
14:54seangrovednolen_: In fact, feel free to disregard the second question, and just share your answer to the first
14:54Rosnecah crap
14:55Rosneca catch clause can't be in the tail position, right?
14:55RosnecI'm trying to make a loop which retries a few times on a socket timeout
14:58amalloyRosnec: http://stackoverflow.com/questions/1879885/clojure-how-to-to-recur-upon-exception
14:58dnolen_seangrove: :shared + :tx-listen is pretty useful
14:59dnolen_seangrove: anyone can subscribe to transacts! as they occur
14:59seangrovednolen_: So for tapping state/events, or for inter-component/intra-app communication?
14:59dnolen_seangrove: yep
14:59seangroveOk, thanks, will chew that over
15:00Rosnecooh
15:01Rosnecthanks amalloy
15:01Rosnecheh, the code in the question is almost identical to mine
15:19AmnesiousFunesbbloom: Can I pester you about the cljs port of fipp? Any news?
15:19bbloomAmnesiousFunes: nothing new besides what is in those github tickets
15:20bbloomAmnesiousFunes: however, i simply dislike cljx and don't feel like maintaining a copy/paste directory of code
15:21bbloomit's unlikely that I'll maintain a simultaneous clj/cljs version of anything until the cross platform code story gets better
15:22AmnesiousFunesbbloom: Does that mean that jonase's cljs fork would be the "official" port, if it reaches working status?
15:22bbloomAmnesiousFunes: i haven't run it, but my udnerstanding is that it worked from the first try
15:22bbloomAmnesiousFunes: it's like a 3 line change to swap finger trees out for rrb vectors
15:22AmnesiousFunesNice to know. Thanks.
15:23bbloomAmnesiousFunes: and then after that there's a macro that you don't need and can simply delete
15:23bbloomactually, that macro is gone in the latest version
15:24bbloomAmnesiousFunes: if you want to make your life easier for tracking changes, you'll need to either prove that the clj version is faster/the-same with rrb vectors, or you need to port finger trees to cljs :-)
15:24AmnesiousFunesWasn't there a finger tree cljs impl hovering around?
15:24bbloom*shrug*
15:28wagjoAmnesiousFunes: https://github.com/wagjo/data-cljs
15:29wagjobut ftrees are very slow compare to rrbt vectors
15:29AmnesiousFuneswagjo: Thanks, I had just found the link to your lib in the fipp issue tracker.
15:29AmnesiousFunesI see
15:29bbloomwagjo: that was my understanding as well, but some benchmarking in fipp was wildly inconclusive
15:31wagjothe 32 chunk array is more appropriate in most situations than digits and node objects, for both nth and conj
15:31RosnecI don't understand why gloss frames always get placed in a sequence
15:31Rosnecwhy doesn't it just return a single ByteBuffer?
15:33bbloomwagjo: rust heavily leans on left and right consing, concatenation, and left popping, which are all the heuristic operations of rrb vectors
15:33wagjobbloom: IIRC ftrees produce a lot garbage objects and while v8 handles it well, it was not perfect. Haven't compared it in CLJ though
15:33bbloomhttps://github.com/brandonbloom/fipp/issues/6
15:34wagjoI've tried to limit garbage in ftrees and provide special fns for e.g. reduce and nth, but still
15:35bbloomwagjo: by rust, i meant fipp
15:35Rosnecohh, I think I get why it returns a seq. It splits byte buffers at any delimiters you give
15:35bbloomwagjo: i happened to be reading a thing about rust at this moment and brain slipped :-P
15:39tbaldridgeAKA, he'd rather be programming Rust than Clojure :-P
15:39bbloomtbaldridge: more like i rather NOT be writing C++ :-P
15:39arrdem++rust
15:40wagjoheh
15:43borkdudecould it be that the ordering of map entries (on which I should not depend, I know) differ per JVM version?
15:43borkdudeor Java version
15:43wagjoborkdude: or per Clojure version ;)
15:46wagjoborkdude: if you use hashmap, than the order depends on the hash, and the algorithm for hash changes between Oracle JVM versions
15:46wagjoborkdude: see http://vaskoz.wordpress.com/2013/04/06/java-7-hashing-drastically-better-than-java-6/
15:46borkdudewagjo, I see ok!
15:47wagjoborkdude: and Clojure changes hashing algo for 1.6 drastically too, so there
15:48borkdudewagjo yeah, I saw that
15:57dnolen_bbloom: the Clojure RRBTrees still need quite a bit of optimization work last I looked.
15:58bbloomdnolen_: that was my understanding as well
16:06FrozenlockWhen I try to `lein jar' a cljx project, it warns me that there's some duplicate files. (namely, core.clj and core.cljs)
16:07FrozenlockWasn't lein skipping cljs files?
16:08FrozenlockIf not, does it mean that I can remove lein-cljsbuild entirely from my project?
16:14gtrakyou don't need cljsbuild to distribute cljs in jars
16:15gtrakI guess you might need it to run tests and such
16:22Frozenlockgtrak: Ah! Perfect then.
16:23Frozenlock(I alreadly run the tests on the clj part)
16:24cYmenThe reasonable IDE choices are Vim, Emacs, Lighttable and Eclipse, correct?
16:25gtrakCursive?
16:26gtraknightcode?
16:26cYmenThat's intellij, right?
16:26gtrakcursive is, yea
16:26cYmenNightcode looks interesting, too.
16:26cYmenAre there any comparisons available?
16:27cYmenooohh nightcode comes with presets for doing android dev in clojure
16:28gtrakdo you already know emacs? if not, probably worth it to use something else :-)
16:28cYmenThat could be fun.
16:28cYmenI'm currently using emacs. :p
16:28Rosnecokay, I have a bit of an issue
16:28cYmenI wouldn't go as far as saying that I "know" emacs. ;)
16:28RosnecI'm trying to send some DatagramPackets
16:28gtrakit's hard for me to use light table b/c I'm used to emacs, but I know a vim guy that likes it.
16:29Rosnecand I'm getting the bytes from gloss frames
16:29Rosnecbut gloss sometimes splits the frame into multiple ByteBuffers
16:29Rosnecis there a way to force it to put everything in a single buffer?
16:30Rosnecor if not, a way to make DatagramPacket see the seq of ByteBuffers as a single ByteBuffer?
16:30gtraki think it has to know sizes ahead of time, yea?
16:30malynRosnec: I think that you want to call (contiguous ...) on the seq of buffers that you are getting back -- https://github.com/ztellman/gloss/wiki/Introduction
16:31Rosnecmalyn: ooh
16:31Rosnecnow I feel dumb for not noticing that
16:33malynThere is a lot of content there, it's easy to miss single lines like that.
16:33RosnecI'm pretty sure I read that paragraph a few times already
16:33Rosnecbut that was before I realized I actually needed it
16:34malynYeah, that's frequently me and all of Clojure. Oooh, that looks neat. I hope I remember that someday when I actually understand what it means. :)
16:36cYmengtrak: How hard/annoying/tedious is it to edit files on a machine to which I have ssh access with emacs?
16:36cYmenIf you happen to know how to do that. :)
16:36gtrakemacs is good at that, that's tramp mode, or I prefer sshfs.
16:36gtrakwhich is not emacs-specific.
16:36cYmenyeah, I know sshfs
16:36hlshipWhat is the expected behavior in core.async when code inside a go block throws an exception?
16:37gtrakthere was a recent commit to enable cider-jack-in on tramp mode buffers.
16:37hlshipIt looks like the channel that receives the body result is closed
16:37DomKMnoprompt: I'd like to use Bourbon and Neat in a project I'm working on. Thorn looks cool, how's it coming along?
16:37gtrakcYmen: https://github.com/clojure-emacs/cider/pull/489
16:37cYmengtrak: Genera question, what's the meaning of the current buffer when I start an nrepl?
16:38gtrakso, if you have a single buffer open, and it's on a clj source file, cider-jack-in will start a repl for that current project.
16:38hlshipI'm curious if there's anyway I could get go blocks into a "zombie" state?
16:38nopromptDomKM: i've been a tad on the busy side so i haven't had time to work on it this week. it'll mostly convert css->clj but full scss support isn't ready yet.
16:38gtrak'current buffer' just means the selected or active one.
16:38noprompti could always use help on it though.
16:38amalloycYmen: i use tramp to edit files over ssh. it's pretty convenient: C-x C-f /ssh:me@host:/home/me/whatever.txt
16:39hlshipIt feels like any go blocks parked waiting for the failed go block will see the nil and, at worst, NPE
16:39nopromptDomKM: basically it's a matter of implementing remaining the remaining methods.
16:39amalloythe only thing i have trouble with is editing remote root-only files using sudo. i can't figure out how to get that to work
16:40DomKMnoprompt: Ah, okay cool. Looking forward to using it. :)
16:40nopromptDomKM: if you'd like to help and have time i could give you the quick 'n dirty on it.
16:42nopromptDomKM: essentially the remaining methods would need to handle SCSS vars, mixins, etc. it's just a PITA.
16:43cYmengtrak: So, repls are somehow project specific and information from the project definition is being used for something?
16:43nopromptone thing that would be awesome would be to figure out how to keep track of where top-level vars are defined and how to properly expand them when emitting code.
16:45cYmenamalloy: I think I don't have that installed because I think I just created a weird folder and now emacs is trying to start aspell :p
16:50gtrakcYmen: yes, that's the case, the project.clj tells leiningen how to set up the java classpath correctly, among other things.
16:51joeltwhere to find Clojure job?
16:51SegFaultAXjoelt: Where are you based?
16:51joeltAustin
16:51joeltnothing i see in Indeed.
16:52arohnerjoelt: do you have any remote experience? CircleCI is always hiring
16:52joeltplanning on going to local Clojure group.
16:52arohner(remote, out of SF)
16:53joeltoddly not a big fan of working remote, but possible i guess.
16:53arohnerno problem. just throwing it out there
16:54SegFaultAXarohner: Where is your office? SOMA?
16:54joeltthx though. didn't know if there was a clojure specific jobboard.
16:54SegFaultAXYou told me once before but I forgot.
16:54arohnerSegFaultAX: we were at Heavybit at the time
16:54SegFaultAXDid you guys move into your own office?
16:54arohnernow we're in a temporary loft while looking for 'real' offices
16:54arohnersome genius built a 6000 sq ft, 3 story, one bedroom apt
16:54SegFaultAXWell that's a step in the right direction! Congrats!
16:55arohnerso we're there for a few months. The ground floor is offices, the second floor is a 'normal' apt living room & kitchen, and we turned the bedroom into a conference room
16:55arohnerSegFaultAX: Thanks!
16:56SegFaultAXarohner: We're also in a loft for the moment (near 4th & King). But we're moving in a couple weeks.
16:56tmciverjoelt: functionaljobs.com
16:57joelttmciver: nice.
16:57arohnerSegFaultAX: congrats! do you know where yet?
16:57SegFaultAXarohner: Yup. 5th and... mission I think? Maybe folsom.
16:57arohnercool. We're looking at a place on 2nd or 3rd & market
16:58SegFaultAXarohner: Oh man i really love that area. Rally was at 2nd & Mission. Such a sweet spot.
16:58SegFaultAXThey're still there (for the moment), but I left Rally at the start of this year.
16:58arohnerSegFaultAX: cool. where are you now?
16:59SegFaultAXarohner: StyleSeat.
17:02arohnerSegFaultAX: cool. Another clojure startup!
17:03SegFaultAXWe loved Circle at Rally. The only thing was our tests were really shitty so the builds took fricken forever.
17:03SegFaultAXThe most cost effective solution for us at the time was to setup jenkins+2 slaves on beefy hand built boxes.
17:06daccSegFaultAX: Rally as in rallydev.com?
17:07SegFaultAXdacc: rally.org
17:07SegFaultAXdacc: Crowdfunding for causes and non-profits.
17:08daccSegFaultAX: ah cool
17:08SegFaultAXarohner: StyleSeat is mostly Python for the moment (3+ year old Django codebase), but Clojure is starting to infect.
17:08SegFaultAXSoon it will consume everything in its path. :D
17:08SegFaultAXAt least that's my plan.
17:08arohner:-)
17:09daccmost of the infection has been ideas here so far =)
17:09SegFaultAXdacc: Yea but you're probably on good Django. We
17:09SegFaultAX*we're on 1.4.2 :O
17:09daccwe just clawed our way into 1.6 i believe
17:09DomKMnoprompt: I'm a CSS newb but I'd be happy to help if I can. I'm busy at the moment but maybe we can go over it later.
17:10daccSegFaultAX: i actually find the ORM pretty nice. QuerySets have some decent composition properties
17:10SegFaultAXdacc: And 1.7 is about to go final.
17:10daccSegFaultAX: the forms and templates can be horrid, though =\
17:10SegFaultAXdacc: I prefer it to ActiveRecord, but in general I despise ORM.
17:11daccyeah
17:11SegFaultAX"ORMs make easy things easy and hard things impossible" - Abraham Lincoln
17:11dacchah, exactly
17:13dacci recently convinced everyone we should look at switching to SERIALIZABLE transaction isolation. manual locking + greedy orm touching everything in sight is a recipe for deadlock.
17:13SegFaultAXdacc: Manual commit like a boss.
17:14pmonks"transaction per table" pattern ftw
17:15SegFaultAXpmonks: How does that even work?
17:15pmonksExactly! ;-)
17:15pmonksIt took me a week to even believe what I was seeing.
17:15SegFaultAXSeriously though, how do you even write to the database for anything even slightly non-trivial?
17:15pmonksI thought I was seeing something super-advanced and not understanding it.
17:16daccthat'll solve your contention, and your, uh, atomicity =)
17:16SegFaultAXAnd your consistency, too!
17:16SegFaultAXpmonks: Actually wait, I know how they did it.
17:17SegFaultAXThe entire site was a single thousand column table.
17:17pmonks:-D
17:17SegFaultAX#webscale
17:17pmonksSimpler than that: they'd (accidentally) made the system no-concurrency (only one request at a time).
17:18pmonksI inherited it with a "fix performance" mandate.
17:18daccSegFaultAX: how are you phasing in clojure at your shop?
17:18SegFaultAXdacc: Brute force and fear tactics.
17:18SegFaultAXAlso, water-boarding.
17:18dacchaha
17:19turbofail"Power is in tearing human minds to pieces and putting them together again in new shapes of your own choosing."
17:20turbofailparen-shaped pieces
17:20dacci'm fighting the idea war as i mentioned. largely writing clojure in python, which is actually pretty idiomatic as python is a little schizo.
17:21SegFaultAXturbofail: Factually correct.
17:22llasramdacc: It seems pretty sane. A bunch of functions directly defined in a module, with the occasional deftype, er, class when you need to do something OOy
17:26technomancyllasram: got my forth working last night, kinda excited
17:26technomancy"working"
17:26nopromptDomKM: just ping me if you have questions. i'm no stranger to google hangouts, etc. if you wanna chat that way too.
17:27technomancyyou can't define your own words, but it executes primitives and stuff
17:27noprompti think it might be cool to see if we could pull together a group of interested people each month to talk about garden, thorn, and how to make it better.
17:28llasramtechnomancy: Awesome!
17:28nopromptis it possible to transform comment nodes w/ enlive?
17:28noprompti'm not sure how to target them
17:29malyntechnomancy: Which platform/environment are you targeting?
17:29technomancymalyn: AVR on a Teensy ucontroller
17:30technomancyllasram: I ended up going with C just because the docs for doing avr asm are beyond horrible
17:31malynNeat! I looked at building one of those once and then got discouraged on something. Maybe the fact that it would be a pain to constantly have to flash newly-defined words due to the limited RAM and Harvard architecture? I can't remember now.
17:32technomancymalyn: haven't gotten it running quite yet on the board. it's got 2.5k of ram; we'll see.
17:33technomancythe split memory is unfortunate for sure
17:33malynYeah, it made me sad. :( I went back to ARM after that brief foray into AVR.
17:37muhoo~orm makes easy things easy and hard things impossible
17:37clojurebotExcuse me?
17:38muhoo~orm is orms make easy things easy and hard things impossible
17:38clojurebotIk begrijp
17:38justin_smith~omg
17:38clojurebotHuh?
17:38justin_smith~orm
17:38clojurebotorm is orms make easy things easy and hard things impossible
17:38justin_smith~erm
17:38clojurebotHuh?
17:38tmcivertechnomancy: what's this? You're trying to get a forth interpreter running on an AVR?
17:39technomancytmciver: yeah, that's the plan
17:40technomancyhttps://github.com//technomancy/orestes
17:40pmonks~pmonks is mullet aficionado
17:40clojurebotRoger.
17:40pmonks~pmonks
17:40clojurebotpmonks is mullet aficionado
17:40seangrovednolen_: You might like https://github.com/sgrove/om-draggable
17:40technomancymalyn: I came really close to using an arm in this project, but the pins on the board I had were to big to let it fit in the enclosure
17:41seangroveGeneric draggable component behavior with free-drag, grid-snap-drag, and guideline-snap-drag
17:41dnolen_seangrove: nice!, in the example there's a typo I think, `app` is not an argument
17:42tmcivertechnomancy: cool. I've had an idea to write a clojure compiler for a PIC or AVR or something. We'll see if I ever get to it.
17:42technomancytmciver: I was pretty surprised to find there was only one forth for avr I could find, and it takes over the bootloader
17:42seangrovednolen_: fixed, thanks
17:43malyntechnomancy: Yeah, one nice thing about AVRs is the variety of sizes that you can get. I understand that half the fun of using Forth is writing your own, but in case you want to just quickly build your app then you might check out SwiftX. Works great on the AVR micros (and ARM).
17:43seangrovednolen_: It'll need a bit of work, but overall pretty happy with it for an early-morning piece
17:43dnolen_seangrove: looks cool will take a closer look later
17:44technomancymalyn: too late! I've got mine working. =)
17:44technomancy"working"
17:45tmcivertechnomancy: why forth? I've heard of it but don't think I've ever seen any code. Is it functional?
17:45malyntechnomancy: So close! Almost prevented http://xkcd.com/927/ yet again. ;)
17:47justin_smithtmciver: it is stack based / concatenative
17:47tmciverjustin_smith: Ah yes, that sounds familiar.
17:49justin_smithactually no, forth is not strictly concatenative, but concatenative languages are often related to forth
17:50paulswilliamsesqHi, can anyone advise how I use (seq x) when x is a clojure.lang.LazySeq ?
17:50justin_smithhttp://en.wikipedia.org/wiki/Stack-oriented_programming_language
17:50justin_smithwhat are you trying to do with it?
17:53justin_smithI don't think there is anything you can do to a seq that you cannot do to a clojure.lang.LazySeq, but seq is useful if you get an arg that may be a vector, lazyseq, array, string, hash-map, whatever, and you want to be able to treat it as a generic sequence
17:54paulswilliamsesqmy code is..
17:54paulswilliamsesq([ids-to-process metrics]
17:54paulswilliamsesq (if (seq ids-to-process)
17:54paulswilliamsesq (let [current-activity (activity-details (first ids-to-process))]
17:54paulswilliamsesq (recur (rest ids-to-process) metrics)))))
17:55technomancyjustin_smith: is it parsing words that make it not strictly concatenative?
17:55paulswilliamsesqOh, that didn't work well ;)
17:55arrdempaulswilliamsesq: https://refheap.com
17:55justin_smithtechnomancy: not sure... forth also has heap manipulation words
17:55justin_smith,(map seq [(range 3) [:a :b :c] "hello" {:a 0 :b 1 :c 2 :d 3}])
17:55clojurebot((0 1 2) (:a :b :c) (\h \e \l \l \o) ([:a 0] [:c 2] [:b 1] [:d 3]))
17:56technomancyjustin_smith: ah, of course
17:56arrdemhey technomancy, what chip are you using on that board?
17:56paulswilliamsesq@arrdem can you see this page?
17:56justin_smithhttp://concatenative.org/wiki/view/Forth technomancy looks like we were both right
17:56technomancyarrdem: it's an atmega32u4 inside a teensy 2
17:58arrdempaulswilliamsesq: you need to paste the link
17:58technomancyalmost ended up using a teensy 3, which uses an arm cortex m4 and a boatload more ram
17:58paulswilliamsesqhttps://www.refheap.com/62990
17:58arrdemtechnomancy: want a Clojure assembler? I found a bytecode spec :D
17:58paulswilliamsesqids-to-process is a lazy-seq
17:58technomancyarrdem: this board is way too small for scheme
17:58justin_smithpaulswilliamsesq: ahh, in that example seq forces empty inputs to be treated as false
17:59arrdemtechnomancy: you say that...
17:59paulswilliamsesqjustin_smith: yes, nil punning?
17:59justin_smithpaulswilliamsesq: it turns empty things into nils which are false
17:59arrdemtechnomancy: really what I mean is extending http://github.com/arrdem/toothpick
17:59arrdemtechnomancy: not a full port of some runtime
18:00paulswilliamsesqjustin_smith: yep, which I believed was idiomatic?
18:00justin_smith,(if "" true false) ; paulswilliamsesq
18:00clojurebottrue
18:00justin_smith,(if (seq "") true false) ; paulswilliamsesq
18:00clojurebotfalse
18:00justin_smithyes, it is
18:01justin_smith,(if (lazy-seq) true false) ; more apropos
18:01clojurebottrue
18:02paulswilliamsesqjustin_smith: given ids-to-process is lazy, do I need to 'doall'?
18:02justin_smithnot at all
18:02paulswilliamsesqjustin_smith: don't like the idea of that, just struggling to understand why I can't iterate over the lazy seq
18:03justin_smith,(if (seq (range)) true false)
18:03clojurebottrue
18:03justin_smithwait, why can't you?
18:03justin_smithand why would you want to doall?
18:03paulswilliamsesqthe pasted code blows up with a ...IllegalArgumentException Don't know how to create ISeq
18:04justin_smiththen ids-to-process is not a lazyseq
18:04justin_smithit is some other kind of thing
18:05justin_smithsomething that cannot be made a seq, it should be saying "Don't know how to create ISeq from..." and that will tell you the type coming in
18:05justin_smith,(seq 0)
18:05clojurebot#<ExceptionInfo clojure.lang.ExceptionInfo: Don't know how to create ISeq from: java.lang.Long {:instance 0}>
18:05paulswilliamsesqjustin_smith: the full code listing is https://www.refheap.com/62994
18:06justin_smithpaulswilliamsesq: activity-ids is not a lazy seq
18:06paulswilliamsesqjustin_smith: as you can see, ids-to-process comes from activity-ids a function which when seperately returns a LazySeq
18:06justin_smithit is a functino which if called would return one
18:06justin_smithso you need to call it
18:06paulswilliamsesqjustin_smith: ridetothesun2014-strava-facade.ws=> (type (activity-ids))
18:06paulswilliamsesqclojure.lang.LazySeq
18:07justin_smithright
18:07justin_smithbut then you use it in strava-metrics
18:07edbondhow to make lein repl use clojure 1.6?
18:07justin_smithin strava-metrics you provide activity-ids as the first default arg if unprovided
18:07justin_smithit's not a lazy seq, it's a function that returns one, thus your error
18:08justin_smithchange line 33 to (strava-metrics (activity-ids)
18:08paulswilliamsesqjustin_smith: oh yeah, think I'm following that.. I just changed it and it's taking a while... hopefuly going to work - thank you :-)
18:17technomancyedbond: outside a project `lein repl` uses the version of clojure that ships with leiningen
18:17technomancy(inside a project it's too dark to see)
18:18amalloy*groan*
18:18technomancyadmit it, you loled
18:19hyPiRionAnd then you got eaten by a grue :(
18:19arrdemgrues: 2, hackers: 0
18:20zspencersounds like a gruesome fate
18:21arrdemhttps://www.youtube.com/watch?v=4nigRT2KmCE
18:25paulswilliamsesqjustin_smith: cheers - that worked a treat.
18:31michaniskin1hahaha, blowing on the 5.25" floppy
18:31michaniskin1classic
18:31arrdemso sad that I didn't manage to see front at sxsw this year :c
18:32michaniskin15.25" floppy: it likes to be clean
18:34technomancyare those two Lisas in the background?
18:39arrdemmaybe, I have no idea what all front got his hands on for that
18:39arrdemI wouldn't be too surprised given the character of his fanbase :P
19:11brehauthi joshnz
19:16joshnzhowdy brehaut
19:16brehauthows saturday?
19:16joshnzdunno, just waking up :)
19:17brehauthah nice :)
19:18joshnzOtherwise need to clean up the grounds from that cyclone last week. Hundreds of cabbage tree leaves everywhere. Then I'll probably play some more of The Swapper. Quite an interesting game I started last night.
19:18brehauti have not heard of this game
19:19joshnzNeither. I got it as part of one of the recent Humblebundle deals. Essentially a puzzle game at heart.
19:19brehautoh huh
19:19brehauthow recent is this bundle?
19:20joshnzI think it was in the last 'original' one. Bundle 11 perhaps? They've had android and book bundles since then.
19:21joshnzyup, it was 11. What does Saturday bring for you?
19:22brehauthmm is this the same bundle as has fez?
19:22brehautbbiab; lunch
19:23joshnzit did have fez yes. Giana sisters, guacamelee and dust, along with others. Lunch for me too.
19:24perplexahmpf
19:25perplexai want fez so badly ;x
19:26brehautfez is available for all three major computer platforms? (although the linux version might be tricky?)
19:26seangrovebbloom: Not sure if you've noticed yet, but the browser's layout system is completely bonkers
19:26technomancybrehaut: the linux compatibility consists of "here's a branch of the engine on github that's supposed to work, good luck"
19:26technomancypretty annoyed about that
19:27bbloomseangrove: haha, no, never noticed. i love CSS and believe it is THE WAY GOD INTENDED APPLICATIONS TO BE BUILT
19:27brehauttechnomancy: pants
19:27technomancywait pants is bad?
19:27brehautyes
19:29hiredmanye old compendium of idioms from common wealth nations
19:30seangroveNattering on like a registered nonce
19:30brehauthiredman: olde
19:31hiredmanþou art correct
19:32divyyperplexa: fez is really nice. One of the best games in recent times i'd say
19:32divyyAlthough I've only tried it on windows
19:34brehautlogic programming: you get to see all your errors at once
20:46arohnerin lein, what is the default dir for :resources?
20:47arohnerand more generally, is there a way to find the default, w/o reading source?
20:51hiredmanarohner: the sample project.clj is the best place to look for stuff
20:51arohnerhiredman: AFAICT, that doesn't tell you what the default value is though
20:51clojurebotIk begrijp
20:51hiredmanOh, huh
20:52hiredmanarohner: the default is resources
20:52arohnerthanks
20:54technomancy`lein pprint` will show you the values
20:55arohnertechnomancy: cool!
20:55technomancy(it's a plugin, not built in)
20:56arohneryeah, found it
20:57arohneranother stupid resources question. Is there a way to get a resource before you've built a jar?
20:57arohnerhrm, nvm, that's working now
20:57amalloyarohner: anything on the classpath is available as a resource
21:00arohnerI'm confused then, what's the point of the resources directory? is that to guarantee that dir ends up in the jar?
21:05amalloyyes
21:06amalloyit also lets you put things onto your classpath which otherwise wouldn't be, eg an html/ top-level dir
21:07amalloy(or, indeed, resources/, which is only there because it's lein's default)
21:07arohneraha
21:07arohnerthanks
22:03seangrovebbloom: Should borders be considered styling or layout? They certainly affect layout in the browser, so I'm leaning towards that right now
22:04bbloomseangrove: layout, but layout needs to (eventually) be controllable from styling
22:05bbloomseangrove: interestingly... a border can be a ... component!
22:05bbloomhttp://msdn.microsoft.com/en-us/library/system.windows.controls.border(v=vs.110).aspx
22:05seangrovebbloom: How so? Seems like they're orthogonal?
22:05seangroveHrm, checking it now
22:05bbloomseangrove: they are orthogonal, except when they aren't
22:06bbloomhaha sorry
22:06bbloomthis is probably a better thing to read: http://msdn.microsoft.com/en-us/library/ms751709(v=vs.110).aspx
22:06bbloomthere are several example images that help there
22:07bbloomi'll bb in a bit
22:07seangroveThe point about borders being components in their own right makes sense though. I've been enjoying teasing out components (like dragging, resizing, etc.)
22:09m00nlightHi all, in the let bindings how can I force it to evaluate the LazySeq ? I use (let [a (doall exp)]), but it seems that a is still a LazySeq
22:12seangrovebbloom: Just to help me wrap my head around all of this, the second link is suggestions a very different layout system (alignment, padding, margin) compared to the auto-layout/constrain system in osx/ios (leading space, size, trailing space re: siblings or parent)
22:18arrdemm00nlight: doall is the tool of choice and you are using it...
22:19m00nlightarrdem: Yes, I use do all, but in the body I print the type of the binding, it is still clojure.lang.LazySeq
22:24amalloyforcing it doesn't change its type
22:24seangroveSurprising how many things from the game world seem relevant in the browser when trying to get layout right. Thinking about having to translating local<->world space for elements and sub-elements
22:45xeqicemerick: do you know if the tab completion for cljs-repls is working for latest cider/austin?
22:45cemerickxeqi: works for me, at least for the rev of cider I'm using?
22:45xeqihurray!, I haven't updated in a bit
22:46xeqiwill do so then
22:49cemerickxeqi: well, keep in mind, I got on head to produce a patch some months ago, and haven't moved
22:50cemerickironically, a tool luddite to the end, per usual
22:50xeqiyet you maintain so many of the pieces
22:53bbloomseangrove: coordinate systems aren't unique to games by any means ;-)
22:54bbloomseangrove: so the padding/margin/alignment stuff can work with either a content negotiation or constraints based model equally fine
22:54ddellacostaseangrove: https://github.com/sgrove/om-draggable it's like you know what I need and you are making it for me
22:55bbloomseangrove: 1) padding is a derived concept, it's simply margin on an extra wrapper
22:55bbloomseangrove: 2) margin and alignment are applied within a "layout slot"
22:56bbloomseangrove: so even if you use constraints, you don't need to render things exactly where the constraints tell you, you can simply use that as the coordinate system for a subcomponent
22:57bbloomseangrove: the idea of margin is that it simply contracts the coordinate space on all 4 sides and the idea of alignment is what to do if some sub component is smaller than the slot it has been allotted
22:58bbloomwpf offers left/right/center/stretch and top/center/bottom/stretch, with horz/vert=stretch/stretch being the default
23:00bbloomthere's probably a more general way to think about it than an enum though: probably a pair of scalars where like left to right is 0 to 1 or -1 to 1, and then some scalar where like 0 is expected size and 1.0 == stretch
23:00bbloomseangrove: does that make sense?
23:09akhudekRegarding this: https://www.refheap.com/63120
23:10akhudekis this because the 300 positions is considered too small for fold to use multiple threads?
23:12bbloom(doc clojure.core.reducers/fold)
23:12clojurebotI don't understand.
23:12bbloom(require 'clojure.core.reducers)
23:12bbloom(doc clojure.core.reducers/fold)
23:12clojurebotCool story bro.
23:12bbloom,(require 'clojure.core.reducers)
23:12clojurebot#<FileNotFoundException java.io.FileNotFoundException: Could not locate clojure/core/reducers__init.class or clojure/core/reducers.clj on classpath: >
23:12seangrovebbloom: Juuuuust barely
23:12bbloom(doc clojure.core.reducers/fold)
23:12clojurebotexcusez-moi
23:12bbloom,(doc clojure.core.reducers/fold)
23:12clojurebotGabh mo leithscéal?
23:12akhudekhaha, yes, I just went and checked
23:12bbloomakhudek: blah, screw clojurebot, but yeah default is 5122
23:12bbloom512*
23:12bbloomyou can override
23:13akhudekyep, found it :-)
23:13seangroveddellacosta: Let me know if it works for you, it's been pretty nice here. There's still more work to be done on it though
23:13bbloomseangrove: what needs clarification?
23:14ddellacostaseangrove: definitely. I was going to just wrap google closure's drag and drop but now I'm going to try this. Good thing I took care of other stuff first...
23:15ddellacostaseangrove: and yeah, I may be able to help with shoring it up as need be
23:16seangrovebbloom: Trying to visualize contracting spaces, which I think I just about got, but the scalar stuff doesn't quite make sense. Is expected size the intrinsic size?
23:17seangroveddellacosta: I changed the free-drag locally to be constrained inside of its parent element already, haven't generalized it yet though
23:18bbloomseangrove: so again, in the "content negotation" model, the idea is that components ask for space, potentially infinite in either or both direction. then the parent grants space and the component makes due with what it was given
23:18bbloomseangrove: the space given to the component is the "layout slot"
23:18bbloomit's a rect
23:19bbloomso let's say you need 50px width, but you're given 100px for whatever reason
23:19bbloomwhere do you render?
23:19bbloomdo you render the left 50px? the right 50px? 25px in? or do you stretch your content to 100px wide and offer extra space to your children?
23:20bbloomthat's what alignment is about
23:20vimuser2mmm is there no built in function to append a vector and return a vector?
23:20seangrove,(conj [123] 456)
23:20clojurebot[123 456]
23:21vimuser2ah, i meant something like concat
23:21seangrove,(apply conj [123] [456])
23:21clojurebot[123 456]
23:21vimuser2...
23:21vimuser2oh apply, yeah
23:21amalloyinto
23:22metellus,(into [123] 456)
23:22clojurebot#<ExceptionInfo clojure.lang.ExceptionInfo: Don't know how to create ISeq from: java.lang.Long {:instance 456}>
23:22seangrovebbloom: I think that's probably good for today, I'm not going to be able to absorb much more about all of that. Going to work on some simpler stuff for now
23:22seangrovebbloom: Thanks for your patience and explanation, as always
23:22ddellacosta,(into [123] [456])
23:23clojurebot[123 456]
23:23vimuser2meh perfect, thanks into is exactly what i want
23:23vimuser2*yeah, perfect
23:23clojurebotGabh mo leithscéal?
23:23vimuser2thanks for the help =)
23:27vimuser2o, interesting,
23:27vimuser2.(into nil [1])
23:27vimuser2,(into nil [1])
23:27clojurebot(1)
23:30vimuser2i could do something like (into (or var []) [1 2 3]) , just interesting it returns a list, or mabey it's a lazy seq
23:31vimuser2,(type (into nil [1]))
23:31clojurebotclojure.lang.PersistentList
23:58chareok suppose I want to make a news aggregator website with clojure, first off how do you get a list of the news sites?
23:59michaniskinm00nlight_: (let [a (into [] exp)] …)
23:59michaniskinm00nlight_: or reduce over it
23:59michaniskinthings like that