#clojure logs

2015-11-28

00:05justin_smiththe version that is exactly like lambda x:x is (fn [x] x)
00:05clojurebotRoger.
00:05justin_smithdork
00:06justin_smith~the version that is exactly like lambda x:x
00:06clojurebotYou don't have to tell me twice.
00:06justin_smith~the version that
00:06clojurebotthe version that is exactly like lambda x:x is (fn [x] x)
00:06justin_smithnumbskull
00:23pontikin00b question - is (identity x) different from (fn [x] x) ?
00:25justin_smithpontiki: it's not an identical object, but it does the same thing
00:26pontikiis the x returned in each case the same x as sent in?
00:28justin_smithyes
00:28justin_smith,(let [o (Object.)] (= o (identity o) ((fn [x] x) o))
00:28clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
00:28justin_smith,(let [o (Object.)] (= o (identity o) ((fn [x] x) o)))
00:28clojurebottrue
00:28pontikigood to know. background: in the bridge class, i wrote the latter form during an exercise, and the TA mentioned the identity function
00:29justin_smithyes, it's clever to come up with the identity function, it's a useful one, but clojure does have it built in
00:29justin_smithone more bit of info for the code above:
00:29justin_smith,(= (Object.) (Object.))
00:29clojurebotfalse
00:29pontikiyes, that i get
00:30justin_smithno two objects are the same, so we know o, (identity o) and ((fn [x] x) o) all return the same object
00:30justin_smith,(= identity (fn [x] x)) ; clojure doesn't have value identity for functions
00:30clojurebotfalse
01:12akkadclojure compiles to java byte code?
01:13akkadpondering if a static java bytecode analysis tool for security would be of any use for a clojure jar
01:15justin_smithakkad: I doubt the analysis would be useful - consider the fact that you can't run clojure without the compiler, and at runtime a clojure program could easily eg. load a string of data from a client, compile it, and run it
01:16justin_smithand if that can happen, the static analyzer can't tell you anything useful...
02:19beakyhello
02:21beakyi am beaky
02:21beakyoops wrong channel
03:08SerafHello everyone, I'm new to clojure, coming from a python world. This langage is very nice but I've some difficulties about manipulating datastructures. I'm trying to create an om component which will draw a menu by exploring a map. Here is my "code snippet", the result I want and the data structure I have : http://pastebin.com/f0MDaLHF does someone can help me please ?
03:09SerafIf there's a way to avoid the double for and do this in a more elegant way, I take all advice :)
03:30tomjackSeraf: (for [[account playbooks] deployment playbook (:results playbooks)] ...) ?
03:31tomjackhmm, well, that will not have an <li> for accounts with no playbooks
03:35Seraftomjack, "deployment playbook" => where it come from ? my structure is in (:deployment app)
03:35tomjacksorry, I meant (:deployment app) for deployment
03:36tomjackanyway, :results is a key in playbooks there, which is a map. so you are getting :results out of the wrong things
03:37tomjackI think if you used map destructuring like (for [[account {:keys [results]}] (:deployment app)] ...) you'd be a bit closer
03:38tomjack(or just use (:results playbooks))
03:40tomjackit should be possible to avoid flatten. flatten is more useful when you don't know exactly how your data is nested. but your data's nesting is very known
03:42Serafok. Is there a problem to chain "for" ? I mean I need to iterate from accounts, then iterate from results. I tried what you gave me but it didn't handle my structure well.
03:47tomjackno problem. I guess you want (map :name (:results playbooks))
03:48tomjackyeah, what I gave you was garbage :(
03:56Serafthanks tomjack it worked :)
03:57Serafalso, I have a problem with the key. when I display "account", it returns me : cycloidcycloid21537751054096 and I don't know where it come from as my key is only "cycloid"
04:00tomjackwhen you do (for [[account playbooks] (:deployment app)] ...), you are iterating over the key/value pairs in the :deployment map
04:01tomjacknot sure, but maybe what you're seeing is an artifact of the implementation of keywords in cljs
04:01tomjackbecause account is then a keyword like :cycloid or :customer
04:02tomjackyou can convert a keyword to a string like (name :cycloid)
04:02tomjackassuming you don't care about the keyword's namespace, or that it doesn't have a namespace
04:03Serafok, thanks for the help :)
04:12rmrfchikHi
04:13rmrfchikhow can I pass java method as clojure function? like (my-func .getName)
04:13ARM9you'll need to wrap it in a fn
04:13ARM9(my-func #(.getname %))
04:13ARM9since java functions don't implement the interface clojure needs for higher order functions
04:15rmrfchikyep, came to the same
04:15rmrfchikthanks
04:15ARM9I don't know if/how you can avoid reflection doing that
04:15rmrfchikwrap is ok
04:15ARM9which sucks
04:19scottj_,((memfn floatValue) 1)
04:19clojurebot1.0
04:25ARM9does memfn resolve all reflection?
04:25ARM9or do I manually have to typehint all the things
08:00rmrfchiki want to log my lazy list like this: (log/info (format "files are: %s" (doall (map #(.getName %) flist))))
08:01rmrfchikdespite doall, i got 'files are: clojure.lang.LazySeq@13a11'
08:01rmrfchikwhat i miss here?
08:07beakyhello
08:08beakydoes clojrue have sum types
08:12aneno
08:12anetyped clojure has them
08:24rmrfchikwhat about lazy map?
08:24rmrfchikdrives me crazy
08:32TEttingerrmrfchik: like a lazy hash-map?
08:32TEttingerwithout order does that even make sense?
08:37rmrfchikTEttinger: it does
08:37rmrfchikjust want to quick look to sequence
08:37rmrfchikmapv did the trick, but wtf...
08:38TEttingerI thought you meant you wanted an equivalent to lazyseqs that was associative by key
08:40rmrfchikTEttinger: I want to (format "%s" (map inc [1 2 3]))
08:42TEttingerah.
08:42TEttingeryeah mapv is good for that
08:42TEttinger(format "%s" (pr-str (map inc [1 2 3])))
08:42TEttinger,(format "%s" (pr-str (map inc [1 2 3])))
08:43clojurebot"(2 3 4)"
08:46rmrfchiki wonder why format didn't look into seq
08:53TEttinger,(format "%s" (range))
08:53clojurebot"(0 1 2 3 4 ...)"
08:53TEttingerit appears to here
08:53TEttinger,(format "%s" (map inc [1 2 3]))
08:53clojurebot"clojure.lang.LazySeq@7c42"
08:54TEttingerhm
08:54TEttingerthat's weird
08:54TEttinger,(class (range))
08:54clojurebotclojure.lang.Iterate
08:54TEttinger,(class (map inc [1 2 3]))
08:54clojurebotclojure.lang.LazySeq
08:54TEttingerah
09:00rmrfchikTEttinger: so, any ideas?
09:00TEttingerpr-str is my best shot
09:01TEttingerkeep in mind though
09:01TEttinger,(format "%s" (pr-str (range)))
09:01clojurebot"(0 1 2 3 4 ...)"
09:01TEttingeroh print-length is set
09:02TEttingerif it isn't that might try to print an infinite strinh
09:05beakyhello
09:06beakyhow do i do dijskstras algorihtm in clojure
09:15TEttingerbeaky: do you care about the performance of the algorithm much? dijkstra called on large graphs with a straightforward implementation can be rather slow
09:15beakyah
09:16beakyprobably wont matter its just for rogueliek :D
09:16TEttingerthere are less straightforward versions of dijkstra that are faster
09:17TEttinger(my personal recommendation is to use squidlib, which is in java and has dijkstra and A* implemented already. but the next release should be rather soon)
09:17douglarekI opend lein repl not in some clojure project, and cider-connect it in Emacs, but how can I switch repl namespace to some specific project
09:18TEttinger(I'm the primary committer to squidlib)
09:18beakywow ill try squidlib then
09:18beakyhow do i include it in lein
09:18TEttingerhttps://github.com/SquidPony/SquidLib
09:18TEttingermaven deps are similar hang on
09:19TEttinger[com.squidpony/squidlib-util "3.0.0-b1"]
09:22beakyhttps://github.com/SquidPony/SquidLib/blob/master/squidlib-util/src/main/java/squidpony/squidai/DijkstraMap.java wow im glad i dont have to implement all this myself now :D
09:22beakythis is perfect
09:23beakybtw how does lein know where to pull your lib
09:24TEttingerI put it on maven central. lein pulls from there and clojars
09:24beakyah
09:24TEttingermaven central is a pain to get going properly
09:24TEttingerclojars is...better
09:25beakyis maven like the npm of clojure
09:25TEttingermaven is like one of the NPMs for java
09:25TEttingerand clojure can use it
09:25beakyah
09:25TEttingerlein is a nice way to use maven without uh
09:25TEttingerbadness
09:26beakynever used maven (or java much) im guess im glad i've got lein then :D
09:26TEttingeryou have these horrid pom.xml files https://github.com/SquidPony/SquidLib/blob/master/pom.xml
09:27TEttingertell me if you hit any stumbling blocks for that dijkstra in clojure
09:28TEttinger3.0.0 final should be fairly soon. api should be similar, i've added to dijkstramap but not removed and not changed anything
09:28TEttingeroh!
09:29TEttingerany Coord stuff you hit may be tricky. use (Coord/get 3 4) to get the point at x=3, y=4 . if there's a ... argument, it's really an array (this is true in java too)
09:29beakyah
09:30TEttingerI'm trying to remember how to make a Coord array in clojure
09:32TEttinger(into-array [(Coord/get 1 2) (Coord/get 3 4)])
09:32beakyI love the coord thing going on even supports 3d type of roguelike worlds
09:32TEttingernot as well
09:32beaky(wonder how dijkstra works in 3d tho :D)
09:33TEttingerCoord is really really much better with 2D. it is immutable, which plays nice with clojure
09:33beakyye my game stick with 2d type coords for now
09:33TEttingerlimited to the range from -3 to 255 for x and y IIRC
09:33TEttinger(efficiently)
09:34TEttingerthere's a way to make bigger Coord caches if needed, but dijkstra is dog-slow on 1000x1000 maps
09:37TEttingerbeaky: I'm most curious about how the dungeon gen algos are consumable from clojure, since I'll be doing the same soon
09:37TEttingersquidgrid.mapping sort of package/ns
09:38beakyright will try out squidlib dungeon gen too (my crappy game still uses static maps haha)
09:38TEttingerhttps://github.com/SquidPony/SquidLib/blob/v3.0.0-b1/squidlib-util/src/main/java/squidpony/squidgrid/mapping/DungeonGenerator.java
09:39TEttingerthe problem as I see it is that amap and other clojure builtins like dealing with 1d arrays
09:39TEttingerand all of these use 2d char arrays
09:39luxbockbeaky: sticking to the standard Clojure data structures is usually a good idea
09:39TEttingerfor dijkstra?
09:39TEttingerI have a version that sticks with them
09:40luxbockI have never actually used dijkstra for anything, so I was just making a more general point
09:43TEttingerhttp://ideone.com/YnhoF3 lines 97 to 140 are a (unoptimized) dijkstra map using immutable clojure data structures
09:43TEttingeryou get better performance with transients on clojure data or by using arrays
09:45TEttingerthid used both http://ideone.com/27YYx3
09:47TEttingerbeaky: sorry to recommend and run, but I have a plane back home to catch!
10:30gfredericks,(reduce #(assoc %1 %2 %1) nil [:foo :bar :baz :bang :haloooo])
10:30clojurebot{:foo nil, :bar {:foo nil}, :baz {:foo nil, :bar {:foo nil}}, :bang {:foo nil, :bar {:foo nil}, :baz {:foo nil, :bar {:foo nil}}}, :haloooo {:foo nil, :bar {:foo nil}, :baz {:foo nil, :bar {:foo nil}}, :bang {:foo nil, :bar {:foo nil}, :baz {:foo nil, :bar {:foo nil}}}}}
10:30gfredericksthat turned out more interesting than I expected
10:32justin_smith,(reduce #(assoc %1 %2 %1) nil "abcde")
10:32clojurebot{\a nil, \b {\a nil}, \c {\a nil, \b {\a nil}}, \d {\a nil, \b {\a nil}, \c {\a nil, \b {\a nil}}}, \e {\a nil, \b {\a nil}, \c {\a nil, \b {\a nil}}, \d {\a nil, \b {\a nil}, \c {\a nil, \b {\a nil}}}}}
10:34gfredericks,(reduce #(assoc %1 %2 %1) nil (range 5))
10:34clojurebot{0 nil, 1 {0 nil}, 2 {0 nil, 1 {0 nil}}, 3 {0 nil, 1 {0 nil}, 2 {0 nil, 1 {0 nil}}}, 4 {0 nil, 1 {0 nil}, 2 {0 nil, 1 {0 nil}}, 3 {0 nil, 1 {0 nil}, 2 {0 nil, 1 {0 nil}}}}}
10:34gfredericksit's a bit like the set-theoretic definition of an integer as the set of smaller integers
10:35gfredericks,(defn set-int [n] (set (map set-int (range n))))
10:35clojurebot#'sandbox/set-int
10:35gfredericks,(set-int 5)
10:35clojurebot#{#{#{} #{#{} #{#{}}} #{#{}}} #{} #{#{#{} #{#{} #{#{}}} #{#{}}} #{} #{#{} #{#{}}} #{#{}}} #{#{} #{#{}}} #{#{}}}
10:35gfrederickss/integer/natural number/
10:39justin_smithgfredericks: I always thought it would be a funny experiment to make Number act as IFn as in the peano numbers, so that (6 5) would return 30
10:39justin_smithwhile we're doing overloads that hide common errors anyway, why not one more
10:55gfrederickschurch numerals
10:58justin_smithgfredericks: in that case (6 f) would be the equivalent of (nth (iterate f f) 6) right?
10:59justin_smithor would that be (apply comp (repeat 6 f))
11:00gfredericksit's been a while since I church numerals
11:04gfredericksyou could make a pretty simple interactive lambda calculus thing by just doing a thin mapping from ascii strings to "lists" of church numerals, for some suitable lambda calc implementation of a list
11:05gfredericksjustin_smith: looks like it is nth+iterate: http://briancarper.net/blog/479.html
11:07justin_smithgfredericks: oh, nth + iterate, except the initial arg is not f, it's more like #(nth (iterate f %) N)
11:09gfredericksyeah
11:25Glenjamin,(get {'get 123, :a 1} :a)
11:25clojurebot1
11:25Glenjamin,('get {'get 123, :a 1} :a)
11:25clojurebot123
11:25Glenjaminon the subject of possibly error-hiding IFn implementations
11:43Glenjamin,(let [get 'get] (get {a: 1} 2))
11:43clojurebot#<RuntimeException java.lang.RuntimeException: Invalid token: a:>
11:43Glenjamin,(let [get 'get] (get {:a 1} 2))
11:43clojurebot2
13:58hlolliHow can I get just (list + 2 2) out of...
13:58hlolli,(eval `(let [a# 1 b# 2] (list + a# a#)))
13:58clojurebot(#object[clojure.core$_PLUS_ 0x1a145a4e "clojure.core$_PLUS_@1a145a4e"] 1 1)
13:59hlolli,(eval `(let [a# 1 b# 2] '(list '+ ~a# ~a#)))
13:59clojurebot#error {\n :cause "Unable to resolve symbol: a# in this context"\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.RuntimeException: Unable to resolve symbol: a# in this context, compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyze "Compiler.java" 6704]}\n {:type java.lang.RuntimeException\n :message "Unable to resolve symbol: a# in this context"...
14:00justin_smithhlolli: eval doesn't use locals
14:00nornagonIs it just me or is there no transducer that produces a sliding-window over a collection a la (partition-all n 1 coll)?
14:01nornagon,(partition-all 2 1 [1 2 3 4])
14:01clojurebot((1 2) (2 3) (3 4) (4))
14:01hlolliok, Im having a problem that Im in a macro and want to return unevaluated list, but it keeps evaluating.
14:01hlolliOf course I evaluate the macra since Im calling it.
14:02justin_smithhlolli: a macro should return the code it wants to be run - if you want to return the data unevaluated you should probably wrap the whole thing in quote
14:03hlolliok, let me show you this macro.. wait
14:03gfredericks,(defmacro put-this-code-in-a-list [& args] (list 'quote args))
14:03justin_smithshould be as simple as (cons 'quote current-body-of-your-macro)
14:03clojurebot#'sandbox/put-this-code-in-a-list
14:03gfredericks,(put-this-code-in-a-list foo (inc 41))
14:03clojurebot(foo (inc 41))
14:04justin_smithoh yeah, list quote, not cons quote, right
14:04hlollihttps://www.refheap.com/112165
14:04gfredericksthat macro is probably way too big
14:04justin_smiththat macro is bad and you should feel bad
14:05gfrederickswhat is it that makes this need to be a macro?
14:05hlolliWell, I really need this to be a macro.
14:05gfredericksoh it's creating more macros
14:05hlolliI cant evaluate immeadiately.
14:05gfredericksbut isn't it expanding to a bunch of defmacro calls? what's wrong with evaluating those immediately?
14:05hlolliIt has to connect pieces togeather before a function inside this macro can be evaluated, works fine.
14:05justin_smithhlolli: as gfredericks was suggesting, if you changed that do to quote at the top, that would quote the whole damned thing
14:06hlolliIm a macro cowboy, sure :)
14:06hlolliok, I try that.
14:06justin_smithor wait, wrap the do in (list 'quote ...)
14:06justin_smithbecause you have more than one thing in that do blcok, my bad
14:07justin_smithhlolli: if you look at core.async, they have a very nice way of making larger macros - instead of putting all of it in one macro, they make constituent parts, using functions that return lists
14:07hlolliok, so to be more percise. Everywhere this macro works fine except in :load part of it, the only place ev-conc-ref# wants to evaluate prematurely
14:07justin_smithit makes something like that much more intelligible
14:08hlolliok, I'll look into that. Originally this was suppose to be a small macro that I just got crazy on.
14:09justin_smithmy rule of thumb is that macros are for defining a syntax, and the semantics (the logic implemented) is not the macros job and should be defined using functions
14:09justin_smithand, if the syntax part gets complex, you can use functions that do list transforms to decompose it
14:10hlolliyes that could ease this a alot, doing the logic elsewhere.
14:14hlollibut isn't it expanding to a bunch of defmacro calls? what's
14:14hlolli wrong with evaluating those immediately? ....... goodpoint gfredericks
14:14hlollibut one thing I was not able to debug was that by not having this as a macro (function) I was not able to define symbols outside on my namespace.
14:16justin_smithyou can bind symbols to any namespace using intern
14:17justin_smithit will be a macro if it's a function and you add the metadata :macro true to the metadata of the symbol you bind
14:17justin_smith(and you need to insert two extra args at the beginning, that you will likely ignore)
14:17clojurebotI don't understand.
14:18hlolliok, there's way too little info on interns on the clojure docs website
14:18hlollior anywhere, I do use interns but slightly and not for macros.
14:20jsabeaudry_When trying to setup datomic, I feel like a complete retard
14:20justin_smithhlolli: no, not ns-interns - that lists things
14:20justin_smithintern, that adds a binding
14:20hlolliyesyes, I mean that
14:21hlolliit's just a (intern ns symbol body)
14:21justin_smith,(intern 'clojure.core 'foo "FOO")
14:21clojurebot#'clojure.core/foo
14:21justin_smithhlolli: yeah, that's all it is
14:21justin_smith,foo
14:21clojurebot"FOO"
14:21justin_smith,'foo
14:21clojurebotfoo
14:21justin_smith,#'foo
14:21clojurebot#'clojure.core/foo
14:21justin_smithsee, I just defined something in clojure.core, easy
14:21hlollibut how can you tell the body to be a macro
14:22justin_smith,(intern 'clojure.coo ' ^:macro bar (fn [nil nil x] x))
14:22clojurebot#error {\n :cause "Unsupported binding form: "\n :via\n [{:type clojure.lang.Compiler$CompilerException\n :message "java.lang.Exception: Unsupported binding form: , compiling:(NO_SOURCE_PATH:0:0)"\n :at [clojure.lang.Compiler analyzeSeq "Compiler.java" 6891]}\n {:type java.lang.Exception\n :message "Unsupported binding form: "\n :at [clojure.core$destructure$pb__4924 invoke "core.clj" 429...
14:22justin_smithergh
14:22justin_smithone moment :)
14:22hlolliok I see where you are going with this
14:24justin_smith,(intern 'clojure.core ' ^:macro bar (fn [_ _ x] x))
14:24clojurebot#'clojure.core/bar
14:24justin_smith,(refer-clojure)
14:24clojurebotnil
14:24justin_smith,(bar 42)
14:24clojurebot42
14:24justin_smith,#'bar
14:24clojurebot#'clojure.core/bar
14:24justin_smithsee, working macro
14:25justin_smitha stupid macro, but it's a macro
14:25hlolliok ok
14:25hlollimaybe this will do it
14:25justin_smithhlolli: that stuff is slightly weird, but I think it's simpler than macro generating macro generating macros
14:26hlolliyes, what I want is not really to solve this by solving it. As this is set up now, I only need to require one namespace and I can start to make music. Similar to overtone, I want to keep it that way.
14:54hlolliOk, I just found out that the reason it evaluated is because the dosync returns the last item in the list.... so I guess I stick to this uglieness here and be wiser next time.
15:07n3wbI have a beginner question. When you use packages from others, how do you usually go about getting to know the available namespaces and functions? I often find myself trying to reverse engineer whatever map + special keys I need to pass, thinking there must be a better way...
15:08justin_smithn3wb: I usually end up reading the source. But there is also the doc function for seeing doc strings, and ns-publics for seeing all the functions in an ns
15:09Frozenlockn3wb: the function doc and the readme.
15:10FrozenlockWhich makes me 'not liking' libraries without function docs.
15:14jonathanjcan anyone recommend a logging library?
15:19nornagoni think clojurebot has something to say about java logging
15:53codahalejonathanj: clojure.tools.logging and then unilog to actually set things up
15:55rhg135~logging
15:55clojurebotexcusez-moi
15:55rhg135~java
15:55clojurebotjava is a mutable basket case
15:55rhg135Ok
16:17jonathanjcodahale: what's the opinion of timbre?
16:17jonathanj(it seems really complicated, at first glance)
16:18codahalejonathanj: I’d generally recommend against using things that don’t play nicely with SLF4J
16:18codahaleAdding yet another logging backend into the mix seems unwise
16:19jonathanjcodahale: why is that?
16:19jonathanjcodahale: recommending against those things, i mean
16:19codahaleIt’s rare to work on a JVM-hosted project and not have a dependency which requires an SLF4J backend
16:22kenrestivoaye, the joy of silent failures. :compnent-will-mount doesn't execute. wonder why? :)
16:24splunkFWIW we've been on timbre in prod for two years, no problems. We also have Datomic (and possibly others) using SLF4J but at least with a little bit of fiddling it has not conflicted.
16:26splunkAlthough that being said we don't do a ton of work like, unifying logging settings / levels / whatever across the systems. It all just goes to stdout/stderr and then gets picked up by external processes.
16:29jonathanjsplunk: i don't plan on doing anything complicated either, but using timbre seems more complicated than tools.logging (at least reading the examples)
16:31splunktimbre should only be (ns foo (:require [taoensso.timbre :as t])) (t/info "hello world")
16:32splunk+ the add in project.clj
16:32splunkso...should be reasonably cheap to try out and see what you like
16:44eseghi, does anyone know of clojure programming projects I can join?
16:47justin_smithkenrestivo: yeah, I've found if I want to reliably know what went wrong in starting components, I need to wrap the start method in a try/catch
16:48justin_smithsplunk: the problem is that timbre is not compatible with any logging done by any java lib you might use, so then you have a minimum of two logging systems to configure and use
16:48justin_smithit would be different if I could make the java libs use timbre, but you can't
16:58codahaletools.logging + unilog also has the virtue of making it very easy to have a single, JSON-formatted log stream
16:59esegi guess i should ust come up with my own project to work on
16:59esegjust*
16:59codahaleAnd then puppetlabs/structured-logging makes it easy to log structured data which plays nicely with said log stream
16:59justin_smitheseg: leiningen has many issues marked as being contributions that should be easy for a newcomer
19:59gfrederickshttps://github.com/gfredericks/schema-bijections/blob/master/test/com/gfredericks/schema_bijections_test.clj
20:57justin_smithgfredericks: what does it mean to biject a schema?
20:59amalloydang, i drop in for just a few minutes and apparently into the middle of a grand existential debate about schemas
21:02amalloyjustin_smith: i would guess, given two compatible schemas, a way to convert from one to the other and back losslessly
21:51blackdiceever since I started growing a beard I've really liked programming a lot more for some reason
21:53pontikiROFL
22:03gfredericksamalloy_: justin_smith: more or less yeah
22:04gfredericksthough the idea in this case is to only have to write one schema, and other equivalent schemas get generated for you, along with conversion functions
22:05justin_smithgfredericks: so do you use prismatic/schema extensively at work?
22:06gfrederickslately yeah
22:06justin_smithI've become the annoying guy who won't shut up about how we would have a lot less of these problems if we had unit tests and used prismatic/schema at system boundaries
22:07justin_smithat work, that is
22:07gfredericks"these problems" ≟ the problems you have
22:08justin_smithgfredericks: "these problems" being rare bugs that only happen occasionally at runtime, with no leads toward what makes them happen, any significant change to the implementation involving a long session of tracking down everything you just broke through trial and error, and fixing it
22:08justin_smithpeople having to spend 10 minutes running the app through its paces before they are sure their change is good
22:09gfredericksoh manually?
22:09justin_smithright, manually
22:09justin_smithpoint and click
22:10gfredericks~that is not how george washington meant for us to test software
22:10clojurebotRoger.
22:10justin_smithhaha
22:10gfredericks~that
22:11clojurebotthat is http://images2.fanpop.com/images/photos/3000000/Arrowed-teen-girl-squad-3099521-570-420.jpg
22:11gfredericksclojurebot: that?
22:12clojurebotthat is highly unlikely
22:12gfredericksquite the lag
22:12justin_smithgfredericks: little known fact, the "arrows" in that illustration are the category theory kind, that comic is about monads
22:12gfredericksI'm trying to make a homestarrunner joke out of this but I don't know how
22:14justin_smith"something something strongbad functor something"
22:29kenrestivois there a library function that does basically (apply disj (-> new-map keys set) (keys old-map))
22:40justin_smithkenrestivo: not quite - for some reason that vaguely reminds me of data.diff, but it looks at more than keys
22:49kenrestivochanged-keys, i named it. another item for the utilty library
23:45virmundihello. Is the right place to discuss clojure/clojurescript related project design?