#clojure logs

2013-12-10

00:06bitemyappfakedrake: fold is usually what you want.
00:07bitemyappsritchie: how far is far?
00:07bitemyappsritchie: I'm faux-ffended you didn't ask me first.
00:07sritchiehaha, you're the oracle, man
00:08sritchieI wanted to give the others a chance
00:08sritchiewhat's the word on logging, sir
00:08tolitiussritchie: http://blog.datomic.com/2013/11/datomic-pro-starter-edition.html it does say what your limit is: no • High Availability transactor support
00:08tolitius • Integrated memcached
00:08tolitius • Running more than 3 processes (2 peers + transactor)
00:09tolitiussritchie: but you have everything else
00:09sritchiegotcha
00:09bitemyappsritchie: logging what?
00:09sritchiebitemyapp: or did you mean, I should have asked about datomic
00:09bitemyappright, but I wrote some stuff for logging too.
00:10bitemyappI just need context.
00:10bitemyappI reacted to the mention of Datomic
00:10sritchieokay, one sec, wrapping up a quick phone thing - but I have logging questions
00:10sritchiefundamental questions
00:11bitemyappI can do fundamental, unless you mean log4j internals.
00:11cljrHmm, alright, i have this string "221ea102", what is the clojure way to convert it to 0x221ea102?
00:11bitemyappcljr: the byte value or the string?
00:11cljrwell, i'd like to go directly form the string to the byet value
00:12cljr"221ea102" -? 0x221ea102
00:12cljr->
00:12bitemyappcljr: http://stackoverflow.com/questions/11194513/convert-hex-string-to-int
00:12bitemyappI googled, Java hex value from string
00:12bitemyappt'was the third result.
00:12sritchiebitemyapp: haha, no, please keep me away
00:13sritchiebitemyapp: so I'm working on getting my app properly monitored with riemann. I'm writing a little stats-d like interface, with a gauge, counter, etc
00:13bitemyappthat's metrics.
00:13sritchieyes
00:13bitemyappso logging.
00:13sritchieI'm also using timbre for logging
00:13bitemyapptimbre has some limitations, but I manage okay with it.
00:13sritchieand right now, I'm just logging exceptions, some text strings and maps on certain events,
00:14bitemyappI've been trying to convince pt-toomanyfuckingvowels-nis to make the closure-based interface a part of stable.
00:14sritchiehaha
00:14bitemyappinstead of a global singleton config.
00:14sritchiebut I'm looking at their appender interface and wondering how I should be thinking about 1) what I'm logging, 2) what structural constraints I should put on the data structures I log,
00:14cljrbitemyapp: sorry, did a sorry job of doing my due diligence...wasnt sure what you call 0x... wasnt sure where to start
00:14sritchieand where the hell to send the logs
00:14sritchiebitemyapp: yeah, that needs to go away
00:14sritchiethe singleton.
00:14bitemyappsritchie: that's why I bugged him about a closure-based interface.
00:14bitemyappit was driving me fuckin' batty.
00:14sritchiebitemyapp: clearly monitoring and logging are very related
00:14bitemyappcljr: I just google the questions people ask and paste the most plausible answers in channel.
00:15sritchie:)
00:15bitemyappcljr: I've been doing it for over a decade. I'm getting good at googling peoples' problems.
00:15bitemyappsritchie: I mean, you've worked at much larger companies than I have. surely you have a better imagination for how far to take this line of thinking than I do
00:15bitemyappsritchie: eventually you end up with something like kafka or scribe for unifying all "events", logging or otherwise, but I imagine you want to 80/20 this yes?
00:15sritchiebitemyapp: haha, I could go all twitter and log absolutely everything
00:16sritchiebitemyapp: every interaction, every function call, all of that
00:16bitemyappthat's what I was imagining, but let me describe what I do.
00:16bitemyappI do log-level defined granularity, deployment mode defined appenders
00:16sritchieyes. I'm looking for the middle ground, after the intensity that I was part of
00:16bitemyappdev == stderr, prod == files + search engine appender
00:17bitemyappso you can tail -f/grep if you want, but there's also a unified search engine for log lines, ideally in JSON format -> ElasticSearch.
00:17bitemyappif you don't have a complicated deployment, just use a file appender and rsync the files to a central location.
00:17bitemyapplogrotate'd
00:17bitemyappnamespaced by machine.
00:17cljrbitemyapp: sounds like an unprofitable startup idea
00:17bitemyappthen have cron jobs/scripts scan the logs for weird stuff.
00:17cljr:_)
00:18sritchiebitemyapp: and you're taking care to do log in some structured way, of course
00:18bitemyappsritchie: JSON with some specified/standard fields.
00:18bitemyappsritchie: I'd kill for an edn plugin for ES.
00:18bitemyapp*kill*
00:18bitemyappyes yes, I know I can write it myself. I don't have time. I'm working on Simonides, Grom, and Keensweep.
00:18sritchie:)
00:18bitemyappand I have a day job.
00:18sritchieso, I could do this by sending everything to riemann,
00:18bitemyappand I help people in IRC too apparently.
00:19bitemyappsritchie: but do you want ephemeral event triggers?
00:19sritchiehaving it go edn -> json, (technically protobuf -> edn -> json, but whatever),
00:19sritchieand hit elasticsearch
00:19bitemyappI use logging for the history, not for the metrics.
00:19bitemyappoh you'd spout from riemann to ES?
00:19sritchieyeah
00:19bitemyappnice idea.
00:19bitemyappbetter than mine.
00:20sritchieOR I use timbre as my top level abstraction, and give timbre a riemann appender
00:20bitemyappalso I really do not like that the Seqable API is a ghetto fmap.
00:20bitemyappwant my damn <$>
00:20sritchiebitemyapp: yes, the type classes do clarify alot
00:20sritchieremember clojure.contrib.accumulator?
00:20bitemyappsritchie: that's what I thought you meant @ riemann appender.
00:20bitemyappsritchie: t'was plural, and yes.
00:20sritchiebitemyapp: all of these blocks are useful, and I can stack them in so many ways
00:21bitemyappI didn't know people still used that.
00:21sritchiebitemyapp: I'm crippled by choices. I can go recreate what I know, but I want to make sure I'm doing it for the right reasons
00:21sritchiebitemyapp: they're not, but it's a janky monoid + semigroup impl
00:21bitemyappIsn't the accumulators library mappend + identity?
00:21bitemyappyeah, I figured.
00:21bitemyappI still don't know when I would elide identity to make a semigroup in code.
00:22bitemyappI guess when identity literally has no meaning for the data type?
00:22bitemyappI'd have to dig to make up an example like that.
00:22bitemyappsritchie: well, what does "recreate what I know" mean?
00:22bitemyappsritchie: because my impression of Twitter's logging infrastructure was that it was a lot more complicated and crossed machine barriers for tracing.
00:22bitemyappso that you could follow execution path across the SOA.
00:23sritchiebitemyapp: log every API and database interaction in some schemified way
00:23sritchieplus timing data for everything,
00:23sritchieand run everything through riemann, which forwards on to graphite and elasticsearch
00:23bitemyappsritchie: textual queries can carry you a long way.
00:23bitemyappsritchie: I'd say you can YAGNI a lot of this stuff initially and add a more sophisticated appender if you find you need it.
00:24sritchiebitemyapp: it sounds like I can do the "appender" thing at a few different levels, and they're all equivalent
00:24bitemyappmostly.
00:24sritchieat riemann's level, at timbre's level, all of that
00:24bitemyappthe error/exception logging is a privileged faculty in Timbre, the rest is par.
00:24bitemyapphis macro-ified log-level API is fucking insane
00:24sritchiehaha
00:24bitemyappI've never seen hash-table-of-functions dispatch made so complicated.
00:24bitemyappI'd have an easier time understanding an array of function pointers in C>
00:25sritchiethe profiling stuff looks useful, but pushing that into my code is not the True Way
00:25sritchiebitemyapp: so my homework is to go get an elasticsearch box up on EC2?
00:25bitemyappsritchie: nah, if I needed profiling I'd make it an optional configuration-activated AOP faculty.
00:25bitemyappsritchie: uhhh, I'm saying you can avoid this work via YAGNI and stick with vanilla log-lines for now.
00:25bitemyappunless you really want structured logging + search, then yes, ElasticSearch.
00:25sritchieand just grep them
00:26bitemyappsritchie: ElasticSearch is in general an open source secret weapon.
00:26bitemyappknowing it makes your data very discoverable and it scales nicely.
00:26bitemyappand just grep them, yes.
00:26bitemyapplearn ES for the overall leverage it offers, not for this particular problem.
00:26bitemyappI'd wait for the "pain" of the absence of structured logging to hit you before adding it.
00:26sritchieI want to be the most idiotically technologically advanced race management platform ever
00:27sritchiewhich we already are, since everything sucks :)
00:27sritchieCRDTs for race timing stopwatch resolution
00:27bitemyapp :|
00:27sritchieeverything, to the extreme
00:27bitemyappthis is like the mumble project.
00:27bitemyappway ahead of its time.
00:28bitemyappsritchie: well, keep in mind, I'm using a startup-oriented cost function for your time.
00:28bitemyappsritchie: so I'm assuming it isn't that valuable for the product itself to have structured logging yet.
00:28sritchieyes, you're right
00:28sritchieit's valuable to have good monitoring in place
00:28bitemyappsritchie: also if you need user behavior analytics ping me, that's what Simonides is for.
00:28bitemyappit's "collect everything, query later" analytics.
00:29bitemyappno manual JS event emitters.
00:31bitemyappI love it when peoples' cmake setups just work.
00:32sritchiebitemyapp: yeah, I don't want to waste time building infra I don't need; I do want to set up good practices and guidelines for logging for the two teammates I have, so we can infect the code with good monitoring and logging
00:32sritchieand writing (log/info "New user submitted some params: " params) is obviously JankTown
00:32bitemyappsritchie: AOP.
00:33bitemyappif your functions are granular enough you will have a glorious time with AOP + logging.
00:33sritchietime to read up :)
00:33bitemyappsritchie: https://github.com/technomancy/robert-hooke
00:33bitemyappsritchie: https://github.com/michaeldrogalis/dire
00:34bitemyappsritchie: http://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol
00:34bitemyappsritchie: crazy Common Lisper stuff, but it works REALLY well for certain classes of problems in Clojure.
00:34sritchieI've got it
00:34sritchieinteresting, nice links
00:36sritchiehaha, this is clearly the best way to log
00:36sritchiejesus
00:36bitemyappsritchie: see?!
00:36sritchieand to hook in riemann
00:36bitemyappyou separate and unify your logging infrastructure into a family of functions "decorating" application behavior
00:36sritchiethe only thing missing might be the context of the function call...
00:36bitemyappthen you also get a nice big fat red switch for shutting stuff on and off.
00:37bitemyappsritchie: well, that's just it. it means your functions aren't granular enough.
00:37bitemyappsritchie: if you want to log sub-function (like in let expression) behavior, then make it another fn.
00:37sritchiewell, say I want to measure various latencies in the context of a particular ring requiest
00:37sritchierequest*
00:37bitemyapplatencies of queries within the Ring request?
00:37sritchieyeah, I hit a GET endpoint,
00:38sritchieand want to time the database functions that occur during that GET request
00:38bitemyappqueries -> model-fns -> decorate model-fns with time-logging. You can log the time the Ring handler itself took too.
00:38bitemyappninjudd: <3 <3 <3
00:39sritchiebitemyapp: but to actually associate them, you'd need to trap the *request* in a dynamic var; or just make sure your function arguments give you everything you need, I suppose
00:39bitemyappsritchie: don't make a dynamic var, I *BEG* of you.
00:40bitemyappsritchie: just keep the request an argument to the dependent functions.
00:40sritchieI promise
00:40bitemyappsritchie: want to hear a trick? Add a default middleware to your Ring app to inject a UUID into all requests. Boom, unique-ified application tracing via a univeral request argument.
00:40bitemyappsritchie: now you can thread application state + arguments + fn calls based on timestamps + UUID
00:41bitemyappnow you see EVERYTHING
00:41sritchie:)
00:41bitemyappI really like this stuff.
00:41sritchieyeah, then group by some UUID in Riemann
00:41bitemyappI like how far Ring lets me take simple functions and closures.
00:41bitemyappsritchie: yeppers!
00:41sritchieand report the percentages
00:41sritchieboom
00:41sritchieawesome
00:41sritchieokay, so here it is:
00:41sritchieRiemann for anything structured; just stats for now in startup mode,
00:42sritchiethen down the road, have Riemann forward to elasticsearch
00:42sritchietimbre for text logging, and grep like a champion
00:42sritchieapply logging with robert-hooke, or dire, or whatever
00:42bitemyappsounds good to me.
00:42sritchieI'd assume there's no real performance hit (beyond what you'd get by hardcoding the log statements), since you're just rebinding the vars
00:42bitemyappdecide on some fairly regular columnal formats with the textual logs and it should be pretty processable with cut or awk.
00:43bitemyappsritchie: right.
00:43bitemyappit's all just alter-var-root in the end.
00:43bitemyappand a function closure.
00:43sritchiesuch is life
00:43sritchieyes
00:43bitemyappwhich are fast in Clojure.
00:43sritchieobjects are a poor-man's closures… closures are a poor-man's objects...
00:43sritchieahhh
00:43sritchieso good
00:43sritchiethere's so much amazing stuff to work on
00:43bitemyappthe pattern in my Clojure code seems to be that closures are function factories.
00:44bitemyappwhich is the alternative to using stupid global singleton atoms for configuring function behavior. *mutter mutter*
00:44bitemyappbut really, the higher art form is what Stuart Sierra does.
00:44bitemyapphe has record-protocol factory thingies
00:44bitemyappthat lets him create whole-app-system instances.
00:44bitemyapplike ML functors.
00:44bitemyappI...am not that ambitious.
00:44sritchieyeah, I've taken that advice
00:44sritchiefor our small system
00:45sritchiethe whole lifecycle idea is beautiful
00:47bitemyappsritchie: ultimately the evolutionary shift is towards place-independent values.
00:47bitemyappsritchie: that's the real sin of global singletons. the singleton place-ness.
00:48bitemyappI do leave a few trap doors in my servers though. defonce'd short-circuiting fns for my nrepl and kttp-kit instances for example.
00:48sritchieokay, gotta run
00:48sritchiegreat talk
00:48sritchiethanks for the advice
00:48sritchiefeels good to understand the landscape a bit better.
00:49bitemyappsross07: cheers.
00:49bitemyapper
00:49bitemyapphe left :(
01:28SegFaultAXbitemyapp: Why not just emit structured log data?
01:30bitemyappSegFaultAX: forall Startups : (laziness > *)
01:30SegFaultAXI sometimes wonder why more people don't just emit json or something similar from their loggers.
01:30bitemyappwell that was one of the suggestions
01:30bitemyappI was just applying the razor of YAGNI to his problem
01:31SegFaultAXSure, but encoding as json isn't that much more work over CLF
01:32SegFaultAXIt has the added benefit of completely decoupling log producers from log consumers.
02:06gdevSegFaultAX, thats what I was trying to say 3 hours ago
02:08SegFaultAXgdev: Hmm?
02:08SegFaultAXOh, on logging?
02:08gdevwhat you said 30 minutes ago was what I was getting at 2 hours ago
02:09ddellacostawhatever happened to futile or whatever his name is?
02:10SegFaultAXgdev: Yea.
02:10SegFaultAXgdev: I missed that part of the convo.
02:10gdevsometimes I feel like I'm the only one who saw Mark McGranaghan's talk
02:11SegFaultAXWhich one?
02:11gdevSegFaultAX, yeah I was just pointing it out because I'm glad someone had the same idea
02:11arrdemgdev: which one? I'm curious now.
02:11gdevSegFaultAX, https://www.youtube.com/watch?v=rpmc-wHFUBs
02:13SegFaultAXgdev: Ah yes.
02:17SegFaultAXDoes he still work at Heroku?
02:18gdevaccording to twitter he does
02:24gdevand according to github; that's two reliable sources
02:31seriously_randomwhy is array named "vector" in this language?
02:36bitemyappseriously_random: because it's not an array.
02:36bitemyappseriously_random: arrays are a different thing.
02:36bitemyappseriously_random: you're mistaking the appearance for the reality.
02:37seriously_randombitemyapp, but why name them vectors?
02:38bitemyappbecause that's what they are
02:38bitemyapparrays are something else.
02:38bitemyappI don't know how to make this any more explicit.
02:38bitemyapparrays and vectors both exist. vectors are not the same as arrays.
02:38bitemyappseriously_random: vectors are not arrays.
02:38bitemyappseriously_random: arrays are not vectors
02:38bitemyappseriously_random: say it. Say it out loud. Scrawl it on your face with sharpie.
02:39hyPiRionI thought vectors were a subset of arrays
02:40bitemyapphyPiRion: In what context? I'm talking about Clojure.
02:40bitemyapparrays mean different things to different people in different contexts. In Clojure it's most likely a Java array.
02:40hyPiRionbitemyapp: general programming context
02:41bitemyappI don't think `subset` has a well defined meaning here.
02:41SegFaultAXhyPiRion: Probably most people consider a vector to be a resizable array.
02:41gdev,(class ["duck" "duck" "goose"])
02:41bitemyappwhich Clojure vectors aren't really.
02:41clojurebotclojure.lang.PersistentVector
02:41SegFaultAXJava's analog is an ArrayList
02:41SegFaultAXOr a std vector in C++
02:41hyPiRionSegFaultAX: oooor Vector :D
02:42hyPiRion,(import 'java.util.Vector)
02:42clojurebotjava.util.Vector
02:42bitemyappthat's not a Clojure vector and you know it.
02:42hyPiRion,(doto (Vector.) (.add 1))
02:42clojurebot[1]
02:43hyPiRionsure, there's just a naming conflic
02:43hyPiRion*name conflict
02:43SegFaultAXI'm just saying from a general programming/CS perspective, that's probably a reasonable definition.
02:43hyPiRionyeah
02:45bitemyapphttp://stackoverflow.com/questions/508374/what-are-vectors-and-how-are-they-used-in-programming
02:45SegFaultAX/Most/ vectors I've seen are backed by arrays as opposed to eg linked lists, but I'm not sure if that's a necessity.
02:45bitemyapplooks like most people use the STL definition of what a vector is.
02:45bitemyappSegFaultAX: I think the point is the mostly contiguous memory representation
02:45bitemyappSegFaultAX: otherwise linked list / stitched linked lists would suffice.
02:45SegFaultAXWell then there you go.
02:46bitemyappI have a hard time thinking of Clojure vectors as being identical to the STL definition, let alone arrays themselves.
02:47SegFaultAXWell they aren't classical vectors, so there's that.
02:47bitemyappthe reference values aren't contiguous in memory.
02:47bitemyappthat's the real point.
02:47bitemyappto remove indirection so the cache can do its thing.
02:47SegFaultAXWell, they /may/ not be contiguous.
02:47bitemyapphow could you guarantee that? batching the creation of the vector?
02:48bitemyappI think realistically the moment you cared about performance you'd use an array or matrix library.
02:48SegFaultAXEach node in the vector has 32 contiguous cells
02:48bitemyappI know that, but I don't think that's good enough in the cases where you'd care about cache locality.
02:49bitemyappin typical use-cases it's totally fine.
02:50bitemyapptoo bad there aren't any value types in Java :(
02:50bitemyapppacking longs and structs into arrays would be fun.
02:51noprompthey fellas, how's it going? :)
02:51SegFaultAXJava has primitive types.
02:51SegFaultAXnoprompt: Howdy.
02:51bitemyappnoprompt: glad to see you again!
02:51SegFaultAXbitemyapp: int long bool float double etc.
02:51bitemyappnoprompt: hacked some Haskell with a buddy yesterday, going to do it again with a different person this Saturday. you're missing out.
02:51nopromptbitemyapp: was sick for the past few days. just checked out. :(
02:52bitemyappSegFaultAX: yeah but the point is you can't have a primitive value struct.
02:52SegFaultAXThat's different from what you said.
02:52bitemyappSegFaultAX: so you have to do SOA instead of AOS, which is possibly annoying/bad depending on access patterns.
02:52nopromptbitemyapp: if that's your way of saying you'd like to screenshare/pair on some haskell code, i already told you, i'm down.
02:52bitemyappSegFaultAX: you're right, you made it more precise/detailed.
02:52nopromptbitemyapp: :)
02:52bitemyappnoprompt: well you'd just seemed busy/harried/etc lately so I didn't want to pester.
02:53nopromptbitemyapp: nah. i can make the time. the problem i'm working on atm is not likely going to be solved soon.
02:53bitemyappSegFaultAX: that also means when appending data your arrays, you have to do n-appends to n-arrays depending on how many fields are in your "struct". Really annoying.
02:53bitemyappdata to your*
02:53bitemyappwhereas in C/C++ you'd just pack the structs directly into a single array
02:53clojurebotNo entiendo
02:53bitemyappclojurebot: shush, you weren't beckoned.
02:53clojurebotNo entiendo
02:53bitemyapp~botsmack
02:53clojurebotclojurebot evades successfully!
02:54bitemyappnoprompt: this is the sort of stuff I'm doing -- (BE.bShow $ BE.BList [(BE.BInt 10), (BE.BInt 20)]) ""
02:54bitemyappBEncode for nrepl protocol (grom)
02:54bitemyappI'm still considering rewriting Simonides.
02:54nopromptbitemyapp: that looks fun, i remember what $ does.
02:55nopromptbitemyapp: i don't know if that's necissary. but hay, it's your call.
02:55bitemyappnoprompt: the parens and invocation of the value bShow returns is because it's using the Data.Text difference list hack.
02:55nopromptbitemyapp: that's the type of stuff i don't miss about syntax.
02:55SegFaultAX#haskell is a thing :)
02:55bitemyappnoprompt: uh, the query generation and input parsing stuff got annoying for me to reason about and my attempt to integrate core.typed was abortive.
02:55nopromptbitemyapp: i had the syntax argument today and it's the last time i'm ever going to have it too.
02:55bitemyappso I'd like to just have a real type system on hand so I can be lazy and mash my compile buttonover and over.
02:56nopromptbitemyapp: have you looked at prismatic/schema?
02:56bitemyappnoprompt: *shrug* I'd prefer S-exprs but it's a small price to pay for TYYYYYYYYYYYYYYYYYYPES
02:56SegFaultAXnoprompt: Syntax arguments suck. When I talk to my co-workers about Clojure it almost always devolves into "yea but lisp"
02:56bitemyapptired of having to squeeze my brain juice for shit that doesn't matter.
02:56SegFaultAXSchema is pretty neat.
02:56bitemyappSegFaultAX: haven't you heard comrade? everywhere is #haskell.
02:57bitemyappla revolucion!
02:57nopromptSegFaultAX: yep. that's why i'm done. if it's not an algo variant they don't get it.
02:57SegFaultAXbitemyapp: Yea but srsly, just go to #haskell if you want to talk about Haskell. Lots of smart folks in there.
02:57bitemyappI knows it, but we have lost souls that need the good word here.
02:57bitemyappSegFaultAX: I talked to posco in #haskell the other day, SUPER COOL person.
02:58nopromptbitemyapp: did you watch that discussion about talks that dnolen tweeted about?
02:58bitemyappI stopped following him on Twitter awhile back because SJW stuff leaked in.
02:58bitemyappnoprompt: link?
02:59SegFaultAXnoprompt: Which is bullshit considering Lisp is essentially the smallest amount of syntax you can have. And Clojure adds just a little more to be nice to programmers.
02:59SegFaultAXSJW?
02:59bitemyappSegFaultAX: dolan pls no
02:59SegFaultAXWhat?
02:59bitemyappmy coworker who has just begun learning Clojure said she liked the "tree-like" nature of S-exprs.
02:59clojurebotWhat is meta
02:59bitemyappand how regular it is.
03:00hyPiRionSegFaultAX: social justice warrior, iirc
03:00bitemyappthis channel needs more dolan duck
03:00bitemyappSegFaultAX: also I've asked noprompt to go into #haskell before and failed :P
03:01bitemyappand he still isn't in that channel, so...
03:01SegFaultAXProbably that means he doesn't want to chat about Haskell.
03:01bitemyappSegFaultAX: he just got done...are you for real man?
03:02bitemyappI do not like going through Twitter scrollback of people I intentionally unfollowed to find one reference somebody made.
03:03nopromptbitemyapp: took me a minute. http://research.microsoft.com/apps/video/dl.aspx?id=150045
03:03nopromptbitemyapp: it's a pretty long discussion. but eric meyer, if you're familiar with him, makes some interesting points about type systems.
03:03bitemyappI still need to watch that.
03:03nopromptyou can more or less listen to it.
03:03bitemyappnoprompt: Erik Meijer became kind of a crank in the last few years.
03:04bitemyappjust a fair warning
03:04SegFaultAXIt's funny, I watched a talk Paul Phillips gave about what's wrong with Scala shortly after he left Typesafe. At the end of the talk, he starts discussing his ideas for how he sees the future of PL research.
03:04SegFaultAXBasically, he describes lisp.
03:04SegFaultAXLike, exactly lisp.
03:05SegFaultAXWell, a typed lisp. But still.
03:05bitemyappScala was dragged kicking and screaming into macros.
03:05nopromptSegFaultAX: yes the argument is generally bullshit magnified by the fact they haven't actually tried lisp or the only lisp they remember is from college.
03:05bitemyappHaskell was dragged not because they didn't know, but because they wanted a safe and principled approach to structural transformation
03:06bitemyappthen TH happened
03:06bitemyappand there was much gnashing of teeth
03:06SegFaultAXIf you have time, check it out: https://www.youtube.com/watch?v=TS1lpKBMkgg
03:06SegFaultAXIt's a really fascinating talk, and Paul is a really excellent speaker (quirky, but excellent).
03:06bitemyappI've seen it.
03:07noprompti need to take a look at this again http://shenlanguage.org/
03:07bitemyappnoprompt: no you don't.
03:07nopromptbitemyapp: why?
03:07bitemyappnoprompt: the type system isn't interesting enough to merit the amount of CRAZY
03:07bitemyappnoprompt: if you really want to go weird, learn Idris.
03:08SegFaultAXnoprompt: Shen is pretty fascinating.
03:08hyPiRionAgda ploz
03:08SegFaultAXAt least what little I know about it.
03:08bitemyapphyPiRion: Idris is what the Agda kids moved to.
03:08nopromptlol
03:08bitemyappShen is fascinating like platypus is fascinating.
03:09bitemyappIt's not particularly lethal or effective, but holy hell is it goofy as shit.
03:09arrdemSegFaultAX: I'd agree with bitemyapp here... there's not a whole lot that's interesting about Shen besides the implementation.
03:09nopromptah the staircase of type madness.
03:09bitemyapptype le escalier
03:09noprompt(you have balls) haskell -> agda -> idris (you have metal balls)
03:09bitemyappyou can skip from Haskell to idris.
03:09jack_rabbitlooks like I need to learn agda and idris.
03:09nopromptam i getting this right?
03:10bitemyappHaskell -> Idris
03:10bitemyappyou'll realize, eventually, in Haskell that you just want dependent types. then you'll use idris. then you'll go to your day job and use JavaScript and contemplate suicide.
03:10bitemyappthe future is here...but unevenly distributed.
03:10jack_rabbit:(
03:11hyPiRionwhere does Coq fit into this crazy type system model?
03:11eredi haven't gotten too much into hardcore type stuff yet
03:11eredthe most i've used so far is like, schema
03:11SegFaultAXered: You haven't even scratched the surface. :D
03:11bitemyapphyPiRion: Coq is a degenerate Agda or Idris.
03:12hyPiRionI thought it was beyond Idris in terms of power, like universe constraints and the like
03:12eredSegFaultAX: yeah probably not, but hey even schema is helpful
03:12bitemyappCoq has more labor poured into it, but I think it's easier to write proofs and get useful feedback in Agda.
03:12eredit at least got me out of the "why the fuck is there a ClassCastException here? what's returning the wrong thing?"
03:12SegFaultAXered: That's not a negative. But type theory is a whole new world.
03:12bitemyappCoq is kind of inane in comparison.
03:13bitemyappCoq is the most industrialized for hardening an OCaml codebase, but I'd rather use something in Haskell.
03:14noprompti'm going to go out on a limb here and assert that javascript is probably worse than php in terms of the damage it's caused the world of software.
03:14bitemyappnoprompt: I'm not sure. client-side JS at least can't shell out directly.
03:14bitemyappI've seen people do some insane stuff in PHP.
03:15SegFaultAXnoprompt: Yeeeeaa, no. PHP wins 10 times out of 10.
03:15jack_rabbitPHP makes me want to kill myself just thinking about it.
03:15hyPiRionPHP is okay, because I don't have to use it in my browser.
03:15SegFaultAXjack_rabbit: Whoa, calm down bro. It's just a programming language.
03:15bitemyapphyPiRion: coalgebraic codata in Agda are less punishing than Coinductive streams in Coq.
03:15noprompthyPiRion: and that's rub.
03:15jack_rabbitSegFaultAX, I'm... I'm so sorry.
03:16nopromptthe fact that it's everywhere amplifies the horror.
03:16bitemyappnoprompt: just pretend it's a form of assembler.
03:16bitemyappnoprompt: a compiler target. then move on with life.
03:16bitemyappCLJS/Fay -> JS and go home happy.
03:16jack_rabbitI once took on some freelance job. After I agreed to do it, the guy informed me he wanted it done in PHP. I began working on it to find that none of the software he wanted me to use had PHP apis. After some weeks of parsing XML, I gave up.
03:16SegFaultAXUgh, that "bytecode of the internet" argument really bugs me.
03:16arrdemSegFaultAX: THANK you
03:17nopromptbitemyapp: i will agree this is the only good thing about having it run everywhere.
03:17bitemyappI don't think it's really true or totally feasible yet, but I'm happy to pretend the DOM API exists to serve non-JS languages.
03:17bitemyappI don't think JS is the bytecode of the internet, I just know how to avoid having to write it manually.
03:17bitemyappjack_rabbit: I've learned to stop accepting freelance work involving PHP or XML.
03:18jack_rabbitI wouldn't have if I knew it was PHP up front.
03:18bitemyappyou accept contracts without investigating the tech involved?
03:18bitemyappyeesh man.
03:18jack_rabbitIt was a friend running a small bike shop business.
03:18jack_rabbitNo contract.
03:18SegFaultAXWe all make mistakes when we're young.
03:19nopromptjack_rabbit: you should have told him about idris. lol.
03:19bitemyappLOL
03:19jack_rabbitXD
03:19bitemyapp(Idris is actually kinda new'ish though)
03:19bitemyappjust uh, fyi.
03:19bitemyappAgda is the oldie. Coq is the ugly hag.
03:19SegFaultAX"I can only verify that your website is correct, not that it works."
03:19nopromptbitemyapp: hey what about the clean language?
03:19jack_rabbitI was trying to convince him about C# or Java at least, and I'm not a big fan of those either.
03:19bitemyappnoprompt: no reason to use over Haskell.
03:20SegFaultAXC# is actually a pretty decent language.
03:20SegFaultAXI just wish the VM wasn't coupled to MS.
03:20bitemyapphttp://homotopytypetheory.org/2012/01/19/inductive-types-in-hott/
03:21SegFaultAXI got to paragraph 3 then gave up.
03:21nopromptwhen oreilly had that cyber monday sale i picked up the ocaml book and some ml books. i feel obligated to learn r or ocaml.
03:21SegFaultAXI don't have the brainpower or background to parse that content.
03:22bitemyappSegFaultAX: get the HOTT book!
03:22SegFaultAXbitemyapp: No application for it.
03:22bitemyappapplication is for poor people.
03:22nopromptHA!
03:22bitemyappDon't be a pleb, learn for fun.
03:23nopromptbitemyapp: that's usually the intent! haha!
03:23SegFaultAXI literally can't parse this sentence: "The main theorem is that in HoTT, what we call the rules for homotopy W-types are equivalent to the existence of homotopy-initial algebras for polynomial functors."
03:23bitemyappSegFaultAX: http://ncatlab.org/nlab/show/homotopy+type+theory
03:24bitemyappSegFaultAX: http://ncatlab.org/nlab/show/W-type
03:24bitemyapparrdem: ?
03:24SegFaultAXI'll stick to stuff I care about.
03:24nopromptoh the irony of that sentence.
03:24bitemyappIn the modern perspective (or at least, from the nPOV) homotopy theory is the higher category theory of (∞,1)-categories: those ∞-categories in which all k-morphisms for k>1 are invertible.
03:25nopromptbitemyapp: bro.
03:25bitemyappjust clarifying homotopy theory and W-types separately.
03:25bitemyappnoprompt: hack hack hack
03:25bitemyappsomebody get an oxygen mask for this dude.
03:25SegFaultAXbitemyapp: Mmm, yes. Indubitably my good man.
03:25arrdemnoprompt: hang in there buddy
03:26bitemyappokay okay, it's like Inception. We need to go deeper!
03:26bitemyappHigher category theory is the generalization of category theory to a context where there are not only morphisms between objects, but generally k-morphisms between (k−1)-morphisms, for all k∈N.
03:26arrdembitemyapp: gooby plz no wai
03:26bitemyappfor which - Category theory is a toolset for describing the general abstract structures in mathematics.
03:27SegFaultAXActually the last 2 quotes make perfect sense.
03:27nopromptposts a link to blog post 0.01% programmers can understand, says "learn for fun", doesn't realize this isn't some people's idea of "fun".
03:27bitemyappFor which, k-morphisms are: In an n-category, or most generally an ∞-category, there are many levels of morphism, parametrised by natural numbers.
03:27SegFaultAXnoprompt: I'd be surprised if the number is that big.
03:27nopromptbitemyapp: i <3 your enthusiasm man. :) it's awesome.
03:28SegFaultAXbitemyapp: No more copy pasta please.
03:28bitemyappnoprompt: listening to Dr. Dre while doing this, if that does anything for you.
03:28bitemyappSegFaultAX: fine fine.
03:28SegFaultAX<3
03:28nopromptbitemyapp: honestly, i'm not trolling you here dude. i really mean. it's great. i have a hole in my heart that stopped being filled when i stopped studying abstract algebra.
03:29SegFaultAXOh oh, it's time for my favorite gangsta rap.
03:29bitemyappnoprompt: I think if you liked abstract algebra you're really going to enjoy Haskell.
03:29nopromptbitemyapp: i did enjoy haskell.
03:29bitemyappnoprompt: you've read this right? http://www.haskell.org/haskellwiki/Typeclassopedia
03:29SegFaultAXIt's literally one of the most depressing songs I've ever heard.
03:30nopromptbitemyapp: i've programmed with it for ~6 months on/off during my free time.
03:30bitemyappnoprompt: typeclassopedia is programming+algebra porn.
03:30bitemyapphrm. I can craft a tweet from this.
03:31bitemyappnoprompt: @gvanrossum Turning into your 12 y/o? No wonder you write Python for a living.
03:32bitemyappthat was sort of a burn on my coworkers and myself too though.
03:33nopromptbitemyapp: you said that to him?!
03:33bitemyappnoprompt: yeah. twattled.
03:33bitemyappI troll him like every week.
03:33bitemyappnot that he notices or anything, but it amuses me to mock other peoples' gods.
03:34SegFaultAXbitemyapp: Ew, I hate the tweet right before that.
03:34bitemyappSegFaultAX: mine or his?
03:34SegFaultAXlrn2prefixnotation n00b. amiritegaiz?
03:34SegFaultAXYours.
03:34arrdemclojurebot: bitemyapp |is| it amuses me to mock other peoples' gods
03:34clojurebotYou don't have to tell me twice.
03:34nopromptbitemyapp: dude that's the best thing ever.
03:35SegFaultAXarrdem: Some men just want to watch the world burn.
03:35nopromptbitemyapp: i'm tired of arguing python guys about how shitty python is.
03:35bitemyappnoprompt: I'm tired of writing bad Python code to prove my point.
03:35bitemyappnoprompt: did I tell you about my "implicit parameters" hack in python?
03:35bitemyappit was GREAT
03:35arrdemSegFaultAX: I typically count myself among the marshmallow toting spectators hoping for a show... bitemyapp here brings his own flamethower just to make sure there is one.
03:35bitemyappI was pairing when I wrote it, my pair partner nearly lost his mind.
03:35nopromptdo tell.
03:35arrdembitemyapp: oh please no not the decorators
03:36bitemyapparrdem: oh it's better than that.
03:36bitemyappnoprompt: needed to eliminate dangerous threadlocal.
03:36SegFaultAXarrdem: decorators are awesome!
03:36arrdemall hands brace for impact...
03:36arrdemSegFaultAX: I've seen them legitimately used. rarely.
03:36bitemyappnoprompt: eliminated dangerous threadlocal by recursing the VM exposed stack objects and looking for an object of a given name and type in the _locals() of each stack object until it found a matching one, returning that.
03:36SegFaultAXarrdem: They're just normal HOFs with special syntax, what's the big deal?
03:37bitemyappnoprompt: this eliminated the threadlocal at the expense of some slowdown and a 15 line function nobody in my company will ever...ever...ever understand.
03:37bitemyapparrdem: ^^ you should enjoy this.
03:37arrdembitemyapp: I read it.
03:37bitemyappplus side? tests pass now.
03:37SegFaultAXbitemyapp: gist it, yo. I wanna see.
03:37nopromptyes plz.
03:37bitemyapphrm...okay.
03:37nopromptplz gist.
03:38nopromptSegFaultAX: oh yeah, so one of the guys i work with wants the sort of "real" meta programming lisp affords w/o the lisp.
03:38arrdemman if #clojure does this regularly I may have to change my sleep schedule to make it to this...
03:38nopromptSegFaultAX: it's like wat. :|
03:39SegFaultAXnoprompt: Hmm?
03:39bitemyapphttps://gist.github.com/bitemyapp/7887449
03:39bitemyappLOOK ON YE WORKS AND DESPAIR
03:39bitemyappI was cackling so hard when I wrote that.
03:39arrdembitemyapp: that's actually pretty baller.
03:40SegFaultAXThat's not that bad.
03:40bitemyapp"not that bad" this is how I know Python and Ruby coders aren't to be trusted.
03:40nopromptarrdem: oh yeah, at this hour it get's pretty funny.
03:40SegFaultAXI mean in terms of complexity.
03:40bitemyapphum. it's easy to understand in isolation.
03:40bitemyappbut it's horribly dangerous.
03:40arrdemnoprompt: I was wondering why without fail I've gotten a doge from bitemyapp at about 3am local
03:40bitemyappif anybody other than the web stack makes a request.user, we're going to pass the wrong data.
03:41bitemyappnoprompt: he gets pinged by his phone, so I make certain a shibe keeps him warm in bed.
03:41nopromptbitemyapp: so lol.
03:41SegFaultAXLet's be honest, the bigger problem here is the mixing of " and '
03:41bitemyappSegFaultAX: nuh-uh, has a specific meaning in Python.
03:41bitemyappSegFaultAX: "" is values, '' is keys.
03:41bitemyappnice try!
03:41arrdemSegFaultAX: http://img.pandawhale.com/54546-Cheers-Toast-gif-OLQT.gif
03:42SegFaultAXarrdem: There is no special meaning.
03:42SegFaultAXAnd either way, request is a key in this context
03:42bitemyappoh my god how is this JIRA thread about deploying a server 20 comments long?
03:42SegFaultAXSo it should be '' in both places.
03:42nopromptSegFaultAX: you know i hate that about ruby, python, javascript and any other language that didn't have the decency to just come up with a fucking use for ' and just left one path (") to strings.
03:42bitemyappSegFaultAX: it doesn't look key'ish enough.
03:42bitemyappnoprompt: you forgot Python docstrings
03:42bitemyappnoprompt: ", ', and """
03:42bitemyappnoprompt: and Ruby HEREDOCS
03:42SegFaultAXBut in ruby ' and " are actually different.
03:42nopromptbitemyapp: oh yeah, fuck those too.
03:43arrdemthe """ thing is actually kinda nice...
03:43bitemyappI actually kinda want docstrings :(
03:43bitemyapplets me elide escaping inner strings.
03:43bitemyappI hate typing string values in docstrings in Clojure, I need muh """
03:43SegFaultAXTriple quotes and heredocs are great.
03:43nopromptSegFaultAX: yes and the difference is fucking retarded.
03:43SegFaultAXnoprompt: Not really.
03:43lumafibitemyapp, and don't forget that you can use both ''' and """, and for any string (not just for docstring)
03:43bitemyappoh cool, my coworker understands the hare-brained way I deploy shit.
03:43bitemyappI don't even have to explain anything.
03:43SegFaultAXnoprompt: Disallowing interpolation is useful.
03:43bitemyapplumafi: yeah they're all just values. I forgot you can use ''' though.
03:44nopromptSegFaultAX: fuck that.
03:44nopromptit's a waste.
03:44SegFaultAXnoprompt: I hope you don't use basically any shell ever, then.
03:44nopromptit adds more decisions, more cognitive overhead, and more places to just flat out fuck up.
03:44arrdemI mean... in fairness I think that scala and the lisp family are the only languages with a 'real" use for '
03:45bitemyapparrdem: did you do that on purpose?
03:45bitemyapparrdem: are you trying to make us go mad?
03:45bitemyapp'real" <--- really dude?
03:45nopromptSegFaultAX: i'd like to preface all of this by saying i'm fucking idiot.
03:45arrdembitemyapp: it was a typo originally and I left it to chip away at your sanity
03:45bitemyappwe're bikeshedding, it's dangerous to say things like that.
03:45bitemyapparrdem: THIS IS BAT COUNTRY, WE CAN'T STOP HERE
03:45SegFaultAXbitemyapp: For that, I want to buy you this http://cdn-www.i-am-bored.com/media/monk-dvd-OCD.jpg
03:45SegFaultAXnoprompt: Why?
03:46bitemyappjust a reminder that: https://github.com/ninjudd/ring-async exists and is freakin' awesome.
03:46progoSegFaultAX: that must be intentional :F
03:46SegFaultAXGood box set or best box set?
03:46SegFaultAXprogo: You bet your ass it is. It's a show about an /extreme/ OCD guy.
03:46nopromptSegFaultAX: s/'m fucking idiot/ don't know anything/
03:47progoSegFaultAX: I know :>
03:47SegFaultAXnoprompt: Meh, we still love you. :D
03:47SegFaultAXAlso, my buddy tweeted this gif of himself and his fiance and I don't know how to process it: http://cl.ly/image/2S093m2d1W2l
03:48nopromptSegFaultAX: i've been doing this programming bit for four years now and each year i understand less and less. the only thing experience has brought me in this craft is figuring out how to avoid writing software that fucks you hard.
03:48arrdemSegFaultAX: thank you for sharing the wat
03:48SegFaultAXarrdem: Haha, my pleasure.
03:48SegFaultAXI can't stop watching it.
03:49SegFaultAXThat's going to be the gif on my next PR.
03:49bitemyapp"Signs you work at a startup"
03:49bitemyapp"you speak in gifs to coworkers they themselves made"
03:50bitemyappSegFaultAX: you win dude. You work at the hipster-er company.
03:50arrdemit'd be entertaining to build a "links of #clojure" website that's the top 75 last pasted links from the channel with archives. could be a really good read...
03:50bitemyappI can't match firepower of that magnitude!
03:50SegFaultAXbitemyapp: I mean in fairness, we did do no less than 2 engagements with pivotal.
03:50bitemyapphrm. might be time for my yearly star wars marathon.
03:50bitemyappSOON
03:50arrdemSegFaultAX: AAAH. FEWER NOT LESS.
03:50bitemyappSegFaultAX: countable things are fewer.
03:51SegFaultAXYour mom is fewer.
03:51bitemyappfeuer frei
03:51nopromptlol wat.
03:51SegFaultAXarrdem: 15 ITEMS OR LESS!!!! Where's your god now?
03:52arrdemSegFaultAX: http://i3.kym-cdn.com/photos/images/newsfeed/000/520/073/eb9.jpg
03:52jack_rabbitYes, lets all take our lanugage use from WalMart.
03:52arrdem(inc jack_rabbit)
03:52lazybot⇒ 3
03:52SegFaultAXarrdem: Haha, oh shit. I actually laughed out on that one.
03:52SegFaultAX(inc arrdem(
03:52SegFaultAX(inc arrdem)
03:52lazybot⇒ 9
03:52nopromptarrdem: HAHA!
03:52nopromptgawd. grammar.
03:52noprompteh.
03:52bitemyapparrdem: HAHAHAHAHAHA
03:52bitemyapp(inc arrdem)
03:52lazybot⇒ 10
03:53noprompt(inc arrdem)
03:53lazybot⇒ 11
03:53bitemyapp(inc jack_rabbit)
03:53lazybot⇒ 4
03:53SegFaultAXarrdem: Reminds me of this http://www.reactiongifs.us/wp-content/uploads/2013/06/play_times_over_kangaroo.gif
03:53arrdemhttp://i.minus.com/iVtsYj3BSskw7.gif
03:54nopromptheheh
03:54bitemyappucb: hi!
03:54arrdemSegFaultAX: haha yes love that one
03:54ucbhey bitemyapp, SegFaultAX, arrdem
03:54bitemyappucb: you caught me on one of my insomnia stretches. how goes it?
03:54ucbbitemyapp: pretty good actually
03:54ucbbitemyapp: last night we cracked a thing that made performance of riemann (and graphite) crap
03:55jack_rabbitsweet.
03:55bitemyappucb: sweet, what was it?
03:55ucbbitemyapp: turns out that, amongst other things, forking off external processes, /very/ frequently and at high speed is not a great thing to do :/
03:55arrdemnoprompt: now now.. dunno who's mixed what in there. don't drink and (apply), you should know this
03:55bitemyappucb: :|
03:55ucbbitemyapp: who would've guessed.
03:55bitemyappucb: hey, you should let Python users know that. They don't seem to be aware.
03:55ucbheh
03:55bitemyappba dum tish.
03:56nopromptbitemyapp: nice.
03:56SegFaultAXbitemyapp: But but, multiprocessing man. Multiprocessing!
03:56nopromptbitemyapp: that's their answer to multithreading.
03:56arrdem'night guys. I have a haskell to skin in the morning.
03:56ucbnight arrdem!
03:57bitemyappnoprompt: everytime somebody tells me I could use multiprocessing to solve a problem, I have to clench the chair I'm sitting in with my fists so that I don't pounce on them and projectile vomit into their mouths like a sparrow with hatchlings.
03:57arrdemwat
03:57bitemyapparrdem: g'night!
03:57noprompttoo many lols for one hour.
03:57bitemyappI'm srs :|
03:57bitemyapppeople suggesting multiprocessing == "did you just tell me to go fuck myself?", "I believe I did Bob."
03:58nopromptfn.bind(this) :(
03:58arrdem(call/cc ... )
03:59SegFaultAXarrdem: Nighty night.
03:59nopromptpoorly named functions and vars are such a source of confusion.
03:59bitemyappI was explaining namespaces, vars, and interning today.
03:59SegFaultAXSaid no one ever. Pff.
04:00bitemyappI think they understood it at the end.
04:00noprompta good way to name a function is to write documentation about what it does.
04:00SegFaultAXI name all my functions with 1 to 2 letters. Shorter is always better.
04:00bitemyappSegFaultAX: so you write like the guy that made J.
04:01SegFaultAXnoprompt: Documentation tends to interfere with "shorter is always better"
04:01noprompthaha. yes.
04:01SegFaultAXbitemyapp: Yes, I often invent new symbols for my functions to really ramp up the concision.
04:01bitemyappSegFaultAX: unicode function names or GTFO.
04:02smilerAPL->clojure
04:02smilerOr perhaps vice versa
04:02bitemyappsmiler: APL is a comonad.
04:02SegFaultAXI like to utilize all the unicode space characters (other than 32) to really keep people on their toes.
04:02igstandoes anyone know of an enhanced clojure syntax definition file for sublime text? the built-in one seems to be missing some stuff, e.g. defprotocol
04:03bitemyappSegFaultAX: brilliant.
04:03nopromptigstan: why not just patch the one you have?
04:03bitemyappSegFaultAX: make it subtle, use a unicode dash so that my-var doesn't mean what they think it means.
04:03bitemyappI should make a utility to replace unicode symbols with their ASCII equivalents (not punycode, just direct equivs) and vice versa.
04:03igstannoprompt: laziness
04:04bitemyappigstan: noprompt has actually made tooling for making syntax definitions
04:04nopromptigstan: i have?
04:04bitemyappnoprompt: indirectly, wasn't Frak used for vim-clojure?
04:04SegFaultAXI also like to use glyphs that have only very subtle connections to the concept they name. Like snowman for destructive deletes. Because you know, snowmen melt.
04:05bitemyappSegFaultAX: so clever much hipster very unicode
04:05SegFaultAXwow
04:05nopromptbitemyapp: oh right, but that's primarily for the regular expression character classes.
04:05bitemyappnoprompt: but you get my meaning. That still helps a lot.
04:05nopromptbitemyapp: however, you are correct that it could be used for this very problem.
04:05bitemyappcould reuse the regexes at a minimum.
04:05SegFaultAXigstan: Can you just make any pattern matching def* use the same rules as def/defn?
04:06nopromptbitemyapp: the funnies part about frak is that beyond the case i designed it for i've never really had much use for it.
04:06bitemyappigstan: make certain you use the Clojure symbol regex.
04:06igstanSegFaultAX: I guess I can… I'm just not in the mood for yak shaving.
04:06bitemyappnoprompt: ah the best tools are like that.
04:06bitemyappigstan: what you are complaining about is the apotheosis of yak shaving :P
04:06nopromptbitemyapp: apparently some people have found it super useful.
04:06SegFaultAXigstan: So you /want/ their hair to get all overgrown and tangled? You monster.
04:06bitemyappnot that I'm hating on you, just saying.
04:06nopromptigstan: just shave that yak.
04:06bitemyappnoprompt: well, there aren't that many nice tools for generating regex.
04:06SegFaultAXShave it real slow like.
04:07igstanhaha
04:07bitemyappnoprompt: there's FSA, Frak, and...?
04:07nopromptbitemyapp: FSA?
04:07igstanI was supposed to learn some core.logic, not fiddle with regexes :(
04:07bitemyappnoprompt: finite state automata generators
04:08nopromptigstan: that's yak shaving yo. just deal w/ it.
04:08SegFaultAXigstan: Why not both!?
04:08nopromptlol
04:09nopromptigstan: you can use frak to help you with your problem. (frak/string-pattern ["defrecord" "defprotocol" ...])
04:09ucbI had completely forgotten about frak
04:10igstannoprompt: I've used some duct tape, as per SegFaultAX suggestion. This will do it for the time being: def[^\s]+
04:11nopromptigstan: honestly that's probably the best route.
04:12nopromptgod. i hate applications. i like text. what can i say?
04:12bitemyappI mentioned off-handedly at a lunch with my coworkers that I wasn't the CS type
04:12bitemyappthey were aghast.
04:13nopromptoh no! not another one!
04:13ucbheh
04:13bitemyappnoprompt: well, they disagreed with me.
04:13bitemyappnoprompt: and said that I was one of the most rigorous programmers there. Then I remembered I work at a Python shop.
04:13bitemyappjk jk jk I love my coworkers. <3
04:14ddellacostaoh snap
04:14SegFaultAXbitemyapp: Sick burn
04:14noprompt "sick burn" lol
04:15bitemyappddellacosta: to properly represent my coworkers, they're a diverse group. There are bio people that are usually split across two domains, then there is a contingent of disaffected Scala users.
04:15bitemyappddellacosta: then there's me simultaneously spreading Clojure, Datomic, and Haskell at my company all at once.
04:15bitemyappddellacosta: how are you by the way? long time no see.
04:15ddellacostabitemyapp: sounds like an interesting group. :-)
04:15bitemyappwell the Scala users spend most of their time moping about how they can't use Scala.
04:15ddellacostabitemyapp: I'm okay. Kinda burnt out at the time being, been pushing hard lately
04:15bitemyappI spread the languages I like >:)
04:16bitemyappddellacosta: aww. burnout is no good. Can you take a mental health day/week?
04:16bitemyapplong weekend?
04:16jack_rabbitlike a virus...
04:16ddellacostabitemyapp: btw, I have an blog post I'd love for you to read if you wouldn't mind taking a gander
04:16bitemyappddellacosta: I'd be honored!
04:16bitemyappjack_rabbit: not far from the truth.
04:16ddellacostabitemyapp: yeah, I will soon, we are just trying hard to get into the next phase
04:17ddellacostabitemyapp: http://davedellacosta.com/cljs-dom-survey
04:17bitemyappthe scary part is by the time the "clojure + datomic" wave reaches the outer circles of my company, I will have already converted some people to learning type theory and Idris.
04:17nopromptat least you're not spreading more python. god. that'd be, like, spreading gonorrhea.
04:17ddellacostathanks!
04:17ddellacostabitemyapp: article I mentioned I would write on IRC, oh a month ago. "I'll do it this week!" haha...*sigh*
04:18nopromptddellacosta: ah, souce-code pro, no, no, no, bro!
04:18ddellacostanoprompt: ?
04:18bitemyappddellacosta: no no, do not punish self for creating things. Reward yourself for having put something out there!
04:18bitemyappddellacosta: get milk tea! a snack!
04:18nopromptddellacosta: oh down vote, down vote. :P
04:18ddellacostanoprompt: I don't understand, what?
04:18nopromptddellacosta: pick a readable monospaced font.
04:19bitemyappI'm not fond of that font either, looking at it on a Mac in Safari right now.
04:19ddellacostabitemyapp, noprompt: so, you don't like the font I used for code examples? Okay, noted. I was on the fence about that too.
04:19ddellacostamaybe should just use whatever the default is
04:19nopromptddellacosta: go for something like oxygen or liberation mono if you're gonna use an open source monospaced font.
04:19nopromptddellacosta: those are pretty readable.
04:19bitemyappddellacosta: in Linux, Monospace is good. For Mac clients, Menlo. For windows, there's one that starts with a C.
04:19ddellacostanoprompt, bitemyapp: cool, thanks for the tips
04:20TEttingercalibri?
04:20ddellacostawill swap it out
04:20TEttingerconsolas?
04:20bitemyappTEttinger: think so?
04:20bitemyappeither/or?
04:20nopromptTEttinger: HA!
04:20bitemyappI'm not very opinionated.
04:20ddellacostais it impossible to read without that? I'm really concerned with the content
04:20bitemyappalso, everybody get the paddles out, time to spank the windows user.
04:20bitemyappddellacosta: I'm focused on the content, again, was just pitching in.
04:20nopromptddellacosta: i'm obsessed with monospaced fonts. i have a FAT collection.
04:21TEttingernoprompt, I will one-up that. I've made a small collection of them.
04:21ddellacostabitemyapp: oh, definitely, sincerely asking though. If it is too painful to read the code examples then I'll swap it out now
04:21ddellacostaI'm so close to it I think it's easy for me to miss that kind of stuff
04:21bitemyappddellacosta: I can manage, but the collection literals such as ( and [ are a little hard to see.
04:21bitemyappit's indented nicely anyway.
04:21ddellacostabitemyapp: okay. Definitely will swap that out ASAP.
04:22bitemyappddellacosta: noprompt has done some work with two-way binding and core.async in the browser recently.
04:22TEttingernoprompt, I don't think I tagged them all right, but http://fontstruct.com/fontstructors/elementalist/fontstructions/tags/Mono
04:22bitemyappddellacosta: he was working on it to get away from AngularJS, incidentally.
04:22bitemyappddellacosta: you should check his github.
04:22bitemyappnoprompt: have you been pushing?
04:22ddellacostabitemyapp: yeah, actually I've been doing a ton of messaging + core.async + reactive kind of stuff on the client w/CLJS lately
04:22bitemyappddellacosta: there's an easy to use fallback to addEventListener that adds IE8 support if you want it.
04:23bitemyappI think I use it in Simonides.
04:23nopromptbitemyapp: i stopped working on beltway once i got my new job. really i think i got what i wanted out of it which was the repository concept.
04:23bitemyappnoprompt: repository ~= model?
04:24bitemyappnoprompt: ins + outs?
04:24ddellacostabitemyapp: right, there are plenty of one-off shims for many things. But the point is to evaluate general approaches rather than suggesting folks do a bunch of stuff like that--I assume anyone doing that knows exactly what they want anyways.
04:24bitemyappsure.
04:24nopromptbitemyapp: i don't know what else to call it but basically it's just mutable peice of state that publishes messages whenever it's state changes.
04:24ddellacostanoprompt: that sounds exactly like what I'm doing. I think we're going to see this approach popping up all over w/core.async.
04:24nopromptddellacosta, bitemyapp i do have the work i did on beltway still and would defintely be open to sharing what i have.
04:24ddellacostait is just so much cleaner
04:25ddellacostanoprompt: yeah, I want to write something up so I'd love to see it
04:25bitemyappnoprompt: well. It's not like I'd mind getting away from AngularJS.
04:25ddellacostabitemyapp, noprompt: I want to get something together as far as all the approaches people are taking who are actually using core.async w/CLJS in production
04:25bitemyappddellacosta: I was looking at ninjudd's work with Ring async (core.async) recently
04:26bitemyapppretty nifty.
04:26ddellacostabitemyapp: cool, I'll have to check it out.
04:27bitemyappddellacosta: that was a fantastic article with thorough and well-done comparisons. Might I suggest that you be a bit more opinionated though?
04:27nopromptddellacosta: yes. basically a repository is just pub/sub around a peice of state. the state should be a map. the idea is you push/pull messages from the repository.
04:27bitemyappddellacosta: most people that read your article might be looking for a, "yeah, but what am I supposed to use?" - consider serving that need.
04:27ddellacostabitemyapp: thanks! opinionated: howso?
04:27bitemyappddellacosta: you're too nice to inferior options :)
04:28ddellacostanoprompt: totally.
04:28bitemyappwhich isn't surprising, given what I know about you.
04:28ddellacostabitemyapp: hmm, I'm hoping folks will pick up on that themselves, but I guess I see your point. Honestly I think it does depend on the needs of the project, to some extent.
04:29nopromptddellacosta: it's very forward and simple to implement. i've basically been hooking this into reactjs.
04:29ddellacostabitemyapp: also, I am super close to Google Closure/Domina, as I use those all the time, and I tried to be reserved in my judgement of those two. I could actually probably write an article *just* on Google Closure and it would be...long.
04:29ddellacostanoprompt: interesting--I heard David Nolen was playing w/React.js lately too, I'm curious what he's doing
04:29nopromptddellacosta: you should have a look at it. it's super nice.
04:29ddellacostanoprompt: but all in all, that sounds really similar to what we've been doing.
04:30ddellacostanoprompt: definitely will!
04:30nopromptddellacosta: two relavant gists https://gist.github.com/swannodette/7763911 https://gist.github.com/swannodette/7813518
04:31ddellacostanoprompt: cool, thanks.
04:31ddellacostanoprompt: I like your hiccup flavor...nice.
04:31nopromptddellacosta: one note about the blog post. you could use goog.events/listen instead of addEventListener
04:31piranhaReact's good :P
04:31nopromptoh haha nm!
04:31ddellacostanoprompt: I do in the Google Closure example
04:32nopromptddellacosta: yeah, just scrolled down. (feel like an ass) :P
04:32ddellacostanoprompt: no worries...haha. ;-)
04:32nopromptpiranha: hey, did you see that gist david did with the whole Pure thing?
04:32piranhanoprompt: what's Pure?
04:32TEttingerPure the Nial-like language?
04:33nopromptpiranha: i borrowed some of the template code from pump and came up with the defhtmlcomponent macro that makes the whole bit very clean.
04:33piranhaah, second one; not yet, looking now
04:33piranhaheh cool :)
04:33nopromptpiranha: https://gist.github.com/swannodette/7813518
04:33bitemyappddellacosta: the code is really clean. You're an artisan.
04:33bitemyappI feel bad for poking you over the fonts.
04:33nopromptpiranha: you mentioned you were busy, but i'd be happy to pitch in help if you're open to some of this stuff.
04:33ddellacostabitemyapp: ha...I don't think so but thanks. :-) No, you and noprompt are right to call that stuff out--it's very important that it is readable!
04:34bitemyappRaynes: learning what?
04:35piranhanoprompt: yeah, I am, I'm actually was playing a bit with pump lately, but still didn't get enough time to push anything out. I hope to get a bit more time later though, that's something I want to see improved (I would like to introduce all of this to my work, I'm tired of JS already)
04:35piranhaalso, of course I'm open to changes in pump :)
04:35nopromptddellacosta: also ditch the letter-spacing.
04:35ddellacostanoprompt: where?
04:36piranhait was written in a hurry...
04:36nopromptddellacosta: i'm seeing a 0.1em letter-spacing when inspect the <pre> elements.
04:36ddellacostanoprompt: ah, yeah, I'll probably redo it all if I swap out the code font
04:36nopromptpiranha: well how can i help?
04:37ddellacostabitemyapp, noprompt: thanks for the feedback! Very helpful.
04:38nopromptddellacosta: is your blog written w/ clojure?
04:38piranhanoprompt: well major things with pump were a bit painful inclusion of React in projects (I tried to convert React to goog module system, and this almost worked - need to preserve tag names in one place), then drop templating system in favor of functions (since it takes a bit of time to parse) and make interface a bit more clojure-like
04:38ddellacostanoprompt: it's just a hacked together thing but yes.
04:38bitemyappddellacosta: glad I could help, your stuff was too good for me to improve upon though :(
04:38bitemyappnoprompt: mine is too! 'tis hacky though.
04:38piranhaI was thinking that maybe having component as a simple function which does render is good enough, and if you want state or componentDidMount handling you'd define it through meta...
04:38ddellacostabitemyapp: that is not true, but appreciated. :-)
04:39piranhaor no, that feels a bit hackish :( I have some ideas from others, but not sure about them
04:40piranhaalso there is a bit of a problem defining event handlers
04:41nopromptpiranha: drop the template system? i don't know if that's totally necissary. the hiccup notation is very convenient. i mean it's possible to simply write aliases to all of the fns in React.DOM.*. having gained a bit of understand of react i don't know if the hiccup templates are going to be a huge bottle neck.
04:41bitemyapp(doubt it)
04:41piranhanoprompt: well it took around 20% of runtime in our case
04:41nopromptpiranha: oh rly?
04:41nopromptwow.
04:41piranhaso I just thought that's a nice way to get your app run faster a bit
04:41bitemyapppiranha: is that problematically high?
04:41piranhanot sure ;)))
04:42piranhajust something we spotted
04:42bitemyapp20% doesn't seem out of the question for naive template code.
04:42piranhaalso, if you look here: https://github.com/wunderwaffle/warmagnet/blob/master/cljs/warmagnet/views/gamemap.cljs#L177
04:42bitemyappI bet it's worse than 20% for most backend web apps.
04:42bitemyappHave you seen Rails apps?
04:42bitemyappscary.
04:42piranhahaha yeah, same thing for django
04:42piranhaok, that's not *very* important :))
04:42piranhahaving better API is more important, sure
04:42piranhabut then look at our handlers
04:42bitemyappI'd tend to agree.
04:42nopromptpiranha: i'll have to benchmark the watered down version i wrote. basically i skipped the tag checks and dropped shorthand notation like :foo.bar#baz.
04:43piranhawe have them defined in (let ...) inside of render, so that they will know state & props, and then pass them to inner components
04:43piranhaand that's a bit problematic, since those functions are always new on every render, so every inner component has to be re-rendered
04:44piranhaI'm not absolutely sure that is a problem, but... at some points it felt like one
04:44piranhaargh, I had to log all the numbers we had :(
04:44piranhanoprompt: hehe, dropping :foo.bar#baz sounds like a good idea, it spends quite a bit of time there
04:45nopromptpiranha: syntactic sugar causes cancer of the semicolon ;)
04:46nopromptpiranha: even with vanilla hiccup i avoid the css notation because it's not composable and, imho, doesn't read well.
04:46bitemyappI decided I want to learn how lexical scope in Clojure works today.
04:46piranhanoprompt: on the other hand, how's hiccup's syntax is better than simple function call? :)
04:46bitemyappinsomnia should be leveraged to some kind of positive outcome.
04:47bitemyapppiranha: it's data, not opaque fn values.
04:47nopromptpiranha: dnolen claims that his "pure" solution should, quote, "blaze"
04:47piranha"blaze"?
04:47piranhaah, be very fast
04:47nopromptpiranha: performance wise.
04:47nopromptyes
04:47bitemyapppiranha: 420blazeit
04:47piranhasure :-) sorry, not native speaker :)
04:48nopromptpiranha: the thing i like about hiccup vs plain function calls is that it's obvious (to me anyways) where the html is.
04:48piranhaheh, sure
04:48nopromptpiranha: no worries. :)
04:49nopromptpiranha: each of the templating solutions has it's benefits and drawbacks. i feel that a function based hiccup templating approach is a nice middle ground between plain old functions and a macro based approach.
04:50piranhasure
04:50piranhaas for 'pure' - I would love to see something like our GameMap, to be honest :)
04:51piranhaI mean for basic examples there are a lot of very good-looking approaches, but then when you need to do a lot of stuff and you want your component to exist few times and it has it's own state... that's where it gets hairy :)
04:51nopromptpiranha: looking at it now.
04:53nopromptpiranha: defr might be nice as (defclass GameMap (get-initial-state [] ...) (component-will-mount [] ...))
04:53piranhanoprompt: sure! like defrecord, right?
04:53piranhaI was thinking about that :)
04:53nopromptpiranha: right.
04:55piranhanoprompt: that sounds like a good approach I guess...
04:55piranhaour components already implement all atom protocols... :)
04:55nopromptpiranha: was that so you could access `state`?
04:56nopromptddellacosta: have you tried using garden for your css?
04:56piranhanoprompt: yeah, @component == state, and also pr-str works nicer this way
04:56nopromptddellacosta: it's pretty crazy.
04:56ddellacostanoprompt: no, I've heard of it, but checked it out
04:57ddellacostabut *not checked it out
04:57ddellacostanoprompt: what do you like about it?
04:58nopromptddellacosta: a lot of things. it's funny, you know, i wrote it and didn't get to use it beyond small examples for several months. but because it's just clojure you can implement all sorts of interesting things.
04:58ddellacostanoprompt: oh, sorry, I didn't realize it was yours! haha. Will check it out.
04:59nopromptddellacosta: when i left my other job i'd been working something that was fairly css heavy and garden was tripping me out.
04:59ddellacostanoprompt: we have a compass solution that works okay. Sometimes I find it frustrating but generally it saves us some time. CSS, in general, I find frustrating though.
04:59nopromptddellacosta: i'd only used sass/compass prior to that.
04:59ddellacostanoprompt: I'll definitely have to take a look if it is any advancement on compass, and can be integrated better into a Clojure stack.
05:00ddellacostanoprompt: that's one problem with all the asset handling stuff out there now, in general. ;-/
05:01nopromptddellacosta: well there's a shitty lein-garden plugin that works well if you have one file but i haven't fixed it for directory changes which makes it worthless.
05:01ddellacostanoprompt: well, maybe can be extended, huh?
05:01nopromptddellacosta: also the lack of compass means that some things need to be handrolled.
05:02ddellacostanoprompt: I honestly don't know what the best thing to do is. I've seen some folks go so far as to try getting jruby going...which is kind of insane in my opinion, but I understand *why*, as Compass is really useful.
05:02nopromptddellacosta: oh, the other thing, garden can be used on the client too.
05:03nopromptddellacosta: but it needs some goodies to make that experience compelling. like direct manipulation of the CSSOM.
05:03ddellacostaoh, like, embedded in CLJS? That is pretty interesting...
05:04ddellacostanoprompt: I do feel like we need a better CSS solution in Clojure web land. I will have to invest some time in trying out Garden when I have more time...
05:04ddellacostanoprompt: I wish we had an exclusively web-focused Clojure survey
05:04ddellacostaI want to know what everyone doing Clojure/CLJS is doing, how they are using the tools, etc.
05:05nopromptddellacosta: well garden is a pretty solid base but it'd be a better story if more folks could pitch in.
05:05bitemyapphrm. housing is 53% cheaper in seattle than the SF bay area. hrm.
05:05bitemyappAustin? 71%. good god.
05:05nopromptbitemyapp: it's probably 90% cheaper here.
05:05bitemyappnoprompt: 65%. Cheaper than Seattle, more expensive than Austin.
05:06bitemyappnoprompt: do not underestimate how cheap Austin is.
05:06nopromptbitemyapp: would've never guessed.
05:06ddellacostabitemyapp: my 2LDK place in Tokyo is about $1300 a month...right in Meguro too
05:06bitemyappit's like $120k for a house + a few acres of land in Austin.
05:06ddellacostaI love me some Austin though
05:06bitemyappddellacosta: that's kind of upsetting. I'm paying $1200 a month for a room in a house with 11 housemates in an outer neighborhood of SF.
05:06nopromptddellacosta: how'd you get stationed there?
05:07ddellacostabitemyapp: I can understand. Then again, there are no jobs worth speaking of in Tokyo
05:07bitemyappddellacosta: remote is an ongoing discussion at my company. *prays hard*
05:07bitemyappI want to leave SF so bad ;_;
05:07ddellacostanoprompt: I stationed myself here, worked for a disappointing Japanese company for a year and a half, then started working remotely for a great small Canadian startup doing Clojure.
05:08ddellacostabitemyapp: I wouldn't mind living in SF if I didn't have to contend with the housing situation. But it makes it *so* unappealing, even though it's probably the best place in the world for me, work-wise
05:08nopromptddellacosta: that's pretty rad.
05:08piranhaheh you guys make my consideration about going to USA/SF less interesting... :)
05:09nopromptpiranha: where are you at?
05:09ddellacostanoprompt: I have no huge complaints. :-) Would like to make more money, but, I live in Tokyo and work remotely with Clojure, so, tradeoffs.
05:09piranhanoprompt: Ukraine ;)
05:09ddellacostapiranha: wow! Would like to visit Ukraine some day.
05:09bitemyappddellacosta: well, I'm sort of hoping I can shift to remote and work at my current company until I "make my own job"
05:09nopromptpiranha: ugh. i *so* want to visit eastern europe.
05:09ddellacostabitemyapp: do it man!
05:09bitemyappI'm very at my current company.
05:09piranhabut I've been thinking about leaving it for some time now, I'm tired of government and would like nicer weather :)
05:10ddellacostayeah, I can imagine the weather is a bit of a killer...
05:10bitemyappddellacosta: maybe someday hire some devs too?
05:10piranhaddellacosta: noprompt: well if you're going to visit Ukraine while I'm here, you're welcome! I could show you around I guess (I'm in Kyiv)
05:10nopromptddellacosta: yes <3 hire us. :P
05:10piranhaddellacosta: well it's not as appalling as in the Netherlands (I've lived there for a year)
05:10bitemyappnoprompt: you mean me?
05:11nopromptbitemyapp: of course. <3 i liked working w/ you.
05:11ddellacostabitemyapp, noprompt: haha, we don't have enough money yet...but we'll see what happens. :-)
05:11ddellacostapiranha: thanks!
05:12bitemyappnoprompt: aww :D
05:12ddellacostawho knows, maybe take you up on that some day. My wife loves to travel, and we haven't been to Eastern Europe. Well, I haven't.
05:12piranha:)
05:12bitemyappway too many nice people here.
05:12piranhabitemyapp: in #clojure you mean?
05:13piranhabitemyapp: come here and I'll introduce to some less nice people if you want :D
05:13bitemyappyes and in particular this night.
05:13bitemyapppiranha: :(
05:13nopromptigstan: shaving that yak buddy?
05:13bitemyapppiranha: feed me piroshkis instead.
05:13nopromptlol
05:13piranha:))
05:13igstannoprompt: neah, done with it already. learning some core.logic now
05:13bitemyapppiranha: I lived in Detroit for several years, fond memories of Ukrainian people there.
05:14nopromptbitemyapp: people "live" in detroit?
05:14noprompteh, guess i have no room to talk being in fresno and all.
05:14piranhabitemyapp: heh :) well, there is always quite a bit of good people, but some are less nice, especially when you don't have enough money, or are used to effectively robbing country and so on ;) but that's unappealing topic anyway :P
05:15bitemyappnoprompt: big words, Fresno man.
05:18bitemyapppiranha: yeah, lot of unhappiness around the world.
05:18nopromptmore ways to rob someone than just take their money that's for sure.
05:19bitemyappnoprompt: yeah, like the ways dynamic languages have robbed my fucking time with type errors.
05:19piranha:)
05:20bitemyappnoprompt: caremad.
05:20nopromptbitemyapp: so when do you wanna do some haskell?
05:21bitemyappnoprompt: I have dinner with the ubermensch weds. Haskell Saturday morning. Tomorrow night might be reserved for recovering from my dumbass insomnia.
05:21nopromptbitemyapp: i'd like to learn about what your building with grom. because odds are most of the stuff in there that isn't language specific is news to me.
05:21bitemyappnoprompt: Thursday night?
05:22bitemyappgrom is *nothing* special at all, pretty boring.
05:22nopromptbitemyapp: should be good.
05:23bitemyappI'm also not really planning to exercise Haskell's super-powers much. Vanilla Network.Socket IO monad stuff.
05:23bitemyappif I wanted to be clever I would use Conduit or something.
05:23bitemyappor figure out a way to model the network communication as codata.
05:24nopromptbitemyapp: yeah, but the whole bit about doing what grenchman does, i'm uneducated in those realms. ie. i haven't done much communication stuff with sockets, etc.
05:24bitemyappI just want to talk to lein repl :headless without building OCaml.
05:24nopromptbitemyapp: it is socket stuff right?
05:24bitemyappnoprompt: oh. hum. sockets aren't bad at all.
05:24bitemyappnoprompt: da! nrepl protocol is bencode over TCP sockets.
05:24bitemyappassociative data. basically maps.
05:24nopromptbitemyapp: yeah, i've never done much of that.
05:24bitemyappnoprompt: should expose you to some new stuff then, that's great.
05:25nopromptbitemyapp: yeah that'd be good. i might actually get some more wacky ideas.
05:25bitemyappnoprompt: should be pretty easy for you though, I think you've worked on much harder stuff than this.
05:25bitemyappI spent most of Sunday exploring a bencode library with my friend.
05:25bitemyappddellacosta: be more jealous - I'm meeting techno soon!
05:25nopromptbitemyapp: cool. yeah networking/communications is one of those areas i haven't figured out where to get started.
05:25bitemyappddellacosta: so excited *_*
05:26bitemyappnoprompt: I'm not into "networking" but I am into databases and protocols (thus my interest in Revise's pipelined connections)
05:26bitemyappnoprompt: wait...have I showed you Revise's connection model?
05:26bitemyappthe RethinkDB protocol is TCP sockets + slightly modified protobufs protocol
05:27nopromptbitemyapp: negative. i briefly looked at it. i'm considering using rethink for something but currently evaluating dataomic.
05:27bitemyappI find the "semantics" of protocols interesting.
05:27bitemyappnoprompt: well I use Datomic at work, so if you have questions about either, ping me!
05:27nopromptbitemyapp: how do you like it?
05:27bitemyappDatomic has been successful for the sort of things we do at my company.
05:28bitemyappI'd need to know a specific use-case to speak to it.
05:28bitemyappI'd be perfectly okay with the notion of Datomic as a nice default alternative to PostgreSQL for vanilla OLTP workloads.
05:29bitemyappultimately the practicality of Datomic for your workload could be decided algorithmically
05:30piranhahow's that?
05:30nopromptoverengineered bank ocr kata solution https://gist.github.com/noprompt/b07b85881d76c6ecba97
05:31bitemyapp(churn rate * dataset size growth rate * base size) == Datomic database size growth rate
05:31nopromptwas in text search mode when i was hacking on it.
05:31bitemyappbecause in PostgreSQL your dataset size grows with the number of rows
05:31bitemyappin Datomic it grows with the average length of history of per datom plus the number of datoms.
05:32bitemyappbut it's nicer for OLTP workloads if you're comfortable using Clojure.
05:32bitemyapphella lack of documentation though. if you use Datomic, you'll be in here asking me questions.
05:32piranhaah, right, so if you have a high churn rate, it'll grow too fast
05:32bitemyapppiranha: yeah, but you'd be surprised at what it would take to produce something that wouldn't work.
05:32bitemyappvery few companies have an OLTP workload with high enough churn for it to matter.
05:33piranhaok, I'm doing a simple game, but I'm more on front-end side of it, so it doesn't matter that much :)
05:33bitemyappnoprompt: that solution is pleasing. Declarative, clean, and clever.
05:33nopromptbitemyapp: has anyone come up with something to get datomic on the client?
05:33piranhawhat matters is that if I should push clojure asap or start with replacing our data layer with mori first...
05:34bitemyappnoprompt: I really like that kata solution.
05:34bitemyappnoprompt: uh, me?
05:34bitemyappCLRS + the two or three Datomic REST APIs I've written.
05:34bitemyappI literally just wrote another one (berossus), getting open sourced this week
05:34bitemyappmy coworkers are working on a Python Datomic OEM (bottom) that I will be contributing to and open sourcing as well hopefully.
05:34nopromptbitemyapp: oh you think so? thanks. i came back to it today and thought the set/intersection bit was over engineered.
05:35bitemyappnoprompt: nah, I think it's an excellent way to express the problem.
05:35bitemyappnoprompt: and reflects the nature of what's being described and computed.
05:35bitemyappI like it *very* much.
05:35bitemyapp5rlz.
05:36CookedGryphonhi, could someone explain core.async/sub to me? The docstring is useless, and I can't figure it out from the source.... what is the in channel and where do I get an out channel? And what is p?
05:36CookedGryphonpublisher? predicate?
05:36CookedGryphonparameter?
05:36nopromptbitemyapp: the reduce + set/intersection combo is so fun whenever it comes up.
05:37bitemyappCookedGryphon: this documentation is so terrible, hahaha
05:38nopromptCookedGryphon: i think i might be able to help you.
05:38nopromptCookedGryphon: you understand async/pub right?
05:39CookedGryphonnoprompt: I think so, yeah - hard to verify until i've subscribed to something ;)
05:40nopromptCookedGryphon: basically your pub is going to give you back a channel which will contain the results of whatever it's pubfn is.
05:41nopromptCookedGryphon: so for example (def publisher (async/pub (async/chan) :message)
05:41nopromptCookedGryphon: s/message/topic
05:42seriously_randomopposite of contains? (because google sucks)
05:42nopromptCookedGryphon: then you subscribe to some topic (def poetry-subscription (sub publisher :poetry (async/chan))
05:43nopromptCookedGryphon: suppose you then publish a message {:topic :poetry :value "blah blah blah"}
05:43nopromptCookedGryphon: (>! pusblisher message), then (<! poetry-subscription) will have the value {:topic :poetry :value "blah blah blah"}
05:44CookedGryphonnoprompt: with subscribing, can I subscribe to multiple topics? with (->> (chan) (sub p :a) (sub p :b))?
05:45nopromptCookedGryphon: hmm. haven't tried that. normally i would just do two subscriptions and then use alts!
05:45nopromptCookedGryphon: but give it a shot!
05:45CookedGryphonokay, will do, that's really helpful, thanks!
05:45CookedGryphonI'll let you know how it goes
05:45nopromptCookedGryphon: are you using this client or server side?
05:46CookedGryphonon an android phone ;)
05:46nopromptoh sweet.
05:46seriously_randomah, (not (contains?))
05:46nopromptseriously_random: or (complement contains?) lol
05:52CookedGryphonnoprompt: can I use a put! onto my publisher?
05:52CookedGryphonor do i need to put onto the chan that I give to the publisher
05:53nopromptCookedGryphon: i think you can put! on the publisher.
05:53CookedGryphonI'm getting no implementation of WritePort on pub$reify
05:54nopromptCookedGryphon: oh right. it might be the chan you passed in then.
05:54CookedGryphonhmm, that's annoying, does that mean I need to keep track of two things, the pub to subscribe things to and the input channel to put things into it?
05:54nopromptCookedGryphon: yeah, try putting values on the channel you passed in https://github.com/clojure/core.async/blob/76317035d386ce2a1d98c2c349da9b898b480c55/src/main/clojure/clojure/core/async.clj#L850
05:56nopromptCookedGryphon: right. i ran in to that too. what i did was create a Broker type for abstracting that.
05:56CookedGryphonokay, I think this is probably the core of the issue I've been having then
05:57nopromptCookedGryphon: the (deftype MessageBroker [ch topic-fn]) and then a protocol IBroker with publish/subscribe functions. then just create a function like make-message-broker [topic-fn] etc.
05:58noprompthave the make-message-broker fn create the channel in the closure and use the publish [message] subscribe [topic ch] functions implemented for your Broker type.
05:58nopromptCookedGryphon: does that make sense?
05:58CookedGryphonyep, thanks
06:01nopromptCookedGryphon: cool. hope it works for you. i've mainly used that pattern on the client side and it works decently.
06:02CookedGryphonokay, new function, what does a buf-fn expect
06:02CookedGryphonnew question*
06:02bitemyapptype signatures would really help here.
06:02bitemyappseriously.
06:02nopromptbitemyapp: troll but true.
06:03CookedGryphonokay, the docstring does actually help here
06:03CookedGryphonI just skimmed and assumed a meaning first time around
06:05noprompti've been putting my entire music library on shuffle for days. it's been interesting.
06:05nopromptso much random crap.
06:06bitemyappnoprompt: I've wasted too much time trying to reassemble type signatures for clojure code.
06:08nopromptbitemyapp: does core.typed help at all in that regard.
06:09nopromptdamn this song is beautiful.
06:09bitemyappnoprompt: maybe someday, but there are a lot of problems.
06:09nopromptddellacosta: translation? 生誕
06:10bitemyappnoprompt: one is that the semantics aren't very powerful, there's too many possibilities for a given function, unions are horrific, and the syntax is hard on the eyes. I think core.typed could help but it's going to need some humanization. Also, not enough libraries use it. Proper hindley-milner supported by a typed-by-default ecosystem with tools like hackage and hoogle would be...lovely.
06:10nopromptoh it means birth.
06:10ddellacostanoprompt: birth
06:10bitemyappwell, the semantics are expressive, but they're not leveraging things like monads to express uncertainty.
06:10ddellacostayep.
06:11bitemyappso instead of encoding uncertainty in something general or powerful, the type system has one big "or" attached to every annotation
06:11bitemyappthen you get to slap Any -> Any on a bunch of crap :|
06:12nopromptbitemyapp: that's a bummer. but ambrose is actively working on it, no?
06:12bitemyappnoprompt: yes, on bringing it to CLJS and the DOM API.
06:12nopromptbitemyapp: oh dear.
06:12bitemyappnoprompt: I want to love core.typed, but the limitations Ambrose is working with are crippling.
06:13bitemyappit's a particular evolutionary branch of type systems that was briefly explored and largely left to stay where it planted.
06:13nopromptbitemyapp: he seems like he's got a good attitude about it though.
06:13bitemyappfor various reasons.
06:13bitemyappwell it's partly a high level design and practical exercise for him. I think it's a success in that regard
06:13bitemyappbut when I've tasted the power, it's hard to "make do"
06:14nopromptit just kills me that no one has nailed a lisp with a solid type system yet that doesn't feel janky.
06:14bitemyappnoprompt: there are multiple fundamentals to Lisps that make it insanely awkward.
06:15bitemyappnoprompt: well. It's doable. Let me just say that. But you have to plan ahead for it.
06:15nopromptbitemyapp: maybe it's the approach.
06:15bitemyapppartly that.
06:16bitemyappif you were willing to abandon things like "symbols" and not bother to type-check macros, you could make a typed Lisp with hindley milner.
06:16bitemyappsorry, when I say abandon, I mean uni-typed references.
06:16bitemyappyou also have to plan your core API around types.
06:17bitemyappnoprompt: take a look at the core.typed annotations for Clojure core to see how awkward some things ar.e
06:17bitemyappanything with [Any * -> Any] is horrorsville
06:18noprompt:/
06:18bitemyappanything with arbitrary arity is WTFBBQ ordinarily, you'd just use function composition and recursion or a collection in Haskell to express the same thing.
06:19bitemyappnoprompt: you can't generically "apply" in a typed language, (anonymous collection) - you'd use a tuple typed for the specific combination required to be valid arguments for that function.
06:19bitemyappnoprompt: not that this is a problem in practice. Scala users do it all the time.
06:19bitemyappbut it means you have to actually make (say) what you want.
06:20bitemyapprather than blindly smashing a vector into apply like you do in Clojure
06:20bitemyappnoprompt: and you don't need apply in Haskell...because the functions are fucking curried!
06:20nopromptbitemyapp: right. all functions take only one argument.
06:20bitemyappwhen you embrace FP properly, you don't need a lot of things that are dirty or inconsistent.
06:21bitemyappnoprompt: right, so apply in Haskell is just fold.
06:21bitemyappnoprompt: and if you *REALLY* wanted, you can actually uncurry functions into taking tuples if you want, although that's not the default for various reasons.
06:23nopromptwell shit man. i think i'm gonna finish setting up this clj project for taming text and get some sleep.
06:24bitemyappnoprompt: dream of rainbows, lambdas, and types!
06:26xificurChey any ideas why is it that I can start a `lein repl' session from bash but I cannot from emacs? If I do cider-jack-in I get stuck on `Connecting to nREPL on localhost:50004' or another port
06:27xificurCI also tried creating a session from the shell and simply running `cider' and specifying the port but no luck
06:27ucbbitemyapp: remember how happy I was a few hrs. ago? not any more :/
06:28bitemyappjust unfollowed someone on Twitter because they use Golang.
06:29bitemyappucb: :( ?
06:33ucbbitemyapp: networking is hard
06:35bitemyappucb: I'm sorry you're distressed/unhappy.
06:35bitemyappucb: is there some way I can help?
06:35bitemyappi have many pictures of cats and other assorted fuzzy creatures.
06:35ucbbitemyapp: ah, no worries. I'm just ranting to release some steam. Because sensu >:@
06:36ucbwell, sensu amongst other things
06:38bitemyappucb: hum. monitoring. What's up exactly?
06:39ucbbitemyapp: just migrating a bunch of hosts to send traffic directly to the monitoring box (right now the traffic goes via an intermediary box). In theory traffic should remain the same, etc. Yet when I migrate the hosts traffic increased a good bunch, etc. Hilarity ensues.
06:40bitemyappucb: derferk?
06:40ucbno idea what that is but maybe?
06:42bitemyappucb: it's a distorted "dafuq"
06:42ucbheh
06:42ucbthen absoluyes
06:43ucbfurther, traffic rx by the intermediary box drops by 1k say, yet incoming traffic to the monitoring box only increases by .2k or so
06:43ucband yet ... the thing becomes maniacal
06:45bitemyappucb: is it possible the migration broke reporting to metrics?
06:46ucbnot really, it's just traffic redirection
06:46ucbI mean, I'd be super surprised if it were
06:46bitemyappucb: is it possible the migration fixed reporting to metrics that was previously broken?
06:47ucbwell, one thing I considered was packet drop between intermediary box and monitoring box effectively acting as a throttling mechanism
06:47ucbbut I'm not convinced that's the case
06:47bitemyappucb: did you record connection metrics between the intermediary and monitoring box?
06:47ucbmeasured with iperf, etc.
06:48ucbwell, I measured the traffic between I->M
06:48ucband it seemed ok
06:49bitemyappoh, there are bounded channels for Haskell. I feel dumb now.
06:53sm0kedoes anyone faced problems upgrading to compojure 1.1.6? i am getting java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
06:58bitemyappsm0ke: haven't upgraded, let you know if I bump into it.
07:00sm0kealthough 'lein deps :tree' shows servlet-api 2.5 as a dep
07:03sm0kesomething fishy with compojure
07:05ohcibihi I get an unsupported operation exception for (count) on a type long... the error happens in some clojures core java-file but I cant see any stacktrace... how to enable the stacktrace?
07:06sm0keAHA!
07:07sm0kecompojure 1.1.6 doesnt have servlet api
07:07sm0keactually ring core 1.2.1 doesnt have that
07:08sm0keyep, headsup guys, https://github.com/ring-clojure/ring/pull/89
07:29Jardahas someone used http://clojurequartz.info/articles/jobs.html ?
07:30JardaI need to do scheduled tasks for my webapp
07:31Jardacould I just initialize jobs in my compojure app-handler?
07:55sverihi, i am trying to run this code (clojurescript) in the browser: http://pastebin.com/68YNqptH It compiles, but when i open it in the browser i get this error: "Uncaught Error: Cannot merge $e into node of different type" Does anyone know what this means?
08:05chrisdoneis this channel publicly logged?
08:05mdrogalischrisdone: Yup
08:06mdrogalishttp://clojure-log.n01se.net/
08:12chrisdoneah, someone requested i add #clojure to http://ircbrowse.net/, but seems you already have something similar
08:15chrisdonei might scrape all the years from it
08:23chrisdoneunless anyone has znc logs of this channel?
08:42osa1hello everone. I'm currently reading Clojure compiler's source. there are huge number of unused methods in RT.java, is there a point in keeping them?
08:42tbaldridgeosa1: example?
08:43clgvosa1: are you sure that they are unused? some of them are probably used (directly or as :inline) in clojure/core.clj
08:43mdrogalisI'd kind of like to axe some of those huge blocks of commented code out in the compiler.
08:43osa1clgv: I'm not sure. my IDE says that.
08:44osa1clgv: so are they called using some kind of reflection functionality?
08:44tbaldridgeosa1: yeah, your IDE probably doesn't understand Clojure
08:44clgvosa1: it's probably just analysing the *.java sources
08:44osa1hmm yeah that makes sense
08:44clgvosa1: no. but they are called from clojure source ;)
08:45osa1yeah got it. thanks.
08:51r4viis there a ring/compojure equivilent to Pedestal's url-for? https://github.com/pedestal/docs/blob/master/documentation/service-routing.md#url-generation-1
08:54bjar4vi: not to my knowledge. https://github.com/weavejester/compojure/issues/39
08:54r4vibja: thanks
08:55bjayou might be able to do something close to url lookup if you bind each route to a particular name
08:55bjabut selecting between arities with the same name probably won't happen easily (if at all)
08:57bjaso (defroutes routes (GET "/show_bananas" [] (bananas-controller) :show-bananas) might be something you could hack
08:57r4vibja: playing with it in the repl now
08:57bjaadn then have a (url-for :show-bananas)
08:58bjabut the fill-in ability or something like "/foo/:bar/:quux"
08:58bjawould probably either be purely positional or kw-based
08:59bjaand you probably couldn't easily handle "/foo/:bar" and "/foo/:bar/:quuz" with the same name of :foo-bar-route
08:59bjawhich is otherwise something I might do (in say Django's url routing system)
08:59r4vibja: I think I would need to wrap defroutes
08:59bjayeah
08:59bjawrap defroutes and register the extra argument into an atom
08:59bjathen provide some functions to lookup in the atom
09:01bjabut with a :foo-bar route defined as "/foo/:bar" you'd probably want some url-for to be like (url-for :foo-bar :bar 25)
09:01bjaor maybe (url-for :foo-bar 25)
09:02bjabeing able to pass in :bar
09:02justin_smithr4vi: in general that is called reverse routing
09:02justin_smithit is supported by caribou (and the future replacement router for caribou, a standalone project called polaris)
09:03justin_smithreminds me I need to nag patchwork to get polaris merged, he said he wanted to be the one to do it...
09:03r4vijustin_smith: thanks, searching for reverse routing compojure gives us this https://groups.google.com/forum/#!topic/compojure/J-0KWht_-PM
09:03r4viwhich is almost exactly what bja is describing
09:04justin_smithwe gave up on compojure because it was so macro centric, and we wanted to generate routes from data structures (in particular data structures coming from the db, so the cms could control and create routes in the app)
09:06justin_smithr4vi: "I think I would need to wrap defroutes" - thats when you start feeling the growing pains of compojure imho
09:07justin_smithhttps://github.com/caribou/polaris <- I am one of the designers, but that is not the only reason I really like it for routing
09:08justin_smithvery edn-centric
09:08r4vivery nice stuff with the nested route definitions
09:09justin_smithand notice the reverse routing demo at the bottom of page
09:10r4vicaribou looks cool too, Django inspired?
09:11justin_smithwe definitely took some ideas from django
09:11justin_smithit started as a php app for rapid webapp deployment
09:11justin_smiththat was hard to maintain, so they upgraded to ruby
09:11justin_smith(RoR I think)
09:12justin_smiththen that didn't scale performance wise, so they upgraded to clojure
09:12justin_smiththen I joined
09:12justin_smithmaybe some day we will upgrade to Haskell or something, but that would make me sad
09:35gfredericks(def rails (/ (+ php clojure) 2))
09:35mdrogalisHeh.
09:44justin_smithhah
09:45justin_smithon further consideration, I think mentioning the previous implementation stacks does caribou a disservice
09:51winkwhy? not starting from scratch but learning from your errors is good
09:52clgv(inc gfredericks)
09:52lazybot⇒ 33
09:53clgv:P
09:53clgv(inc 42)
09:53lazybot⇒ 3
09:53clgv:D
10:02wei__java.jdbc question. if I have a structure like this: ["INSERT INTO tbl (name, desc) VALUES (?, ?)" "bob" "hello"], what function do I call to run the insert and return the result?
10:08arcatanwei__: clojure.java.jdbc/query
10:09wei__oh, I thought query was just for SELECTs for some reason
10:10arcatanoh, hmm. maybe you need to use jdbc/execute!
10:52justin_smithdb-do-commands / db-do-prepared
10:54justin_smithdb-do-prepared is preferred if you have many insertions with that same structure, just different parameters
10:57justin_smithalso consider insert! if you would prefer to provide a map from columns to values
11:45sritchieSegFaultAX: I did see that talk, it was great
11:46sritchiethat clearly seems like the way to go
11:53jtoydo libraries have access to their own resources directory? and if they do, can I reference them on the command line? I have a python script i want to call from my library
11:54fakedrakehello
11:55coventryjtoy: What does the script do?
11:55makkalothi, i want to get fully qualified name of some variable in clojurescript, is there a way to do that ?
11:55fakedrakeI have a vec of pairs [regex func] and I want to make a function that will run func depending on which regex is matches a given
11:55fakedrakestring
11:55fakedrakeis there a good built in for that?
11:56jtoycoventry: its a python machine learning script i wrote
11:56justin_smithjtoy: in a library it will be accessible as a resource inside the jar
11:56bodie_Does anyone have any thoughts on whether Clojure and Go are competitors, and if so, what merits are brought by each?
11:56jtoyits just reads from STDIN and outputs to STDOUT and my clojure code needs to capture that
11:57justin_smith(spit (slurp (io/resource "filename")) "file-name-on-disk")
11:57justin_smithor maybe I have those spit args reversed
11:57jtoyjustin_smith: I see, so I need to do that, thanks
11:57justin_smithbe sure that the destination file is writable - in some environments the current working directory may not be writable by your process
11:58justin_smiththis has bitten me in the ass before (inside tomcat)
11:58jtoyjustin_smith: thx, I will try to use tmp for now to be safe
11:58justin_smith(spit "file-name-on-disk" (slurp (io/resource "filename")))
11:59justin_smithI had the args reversed
11:59stompyjis there a "preferred" way of handling configuration of env vars for web apps?
11:59justin_smithalso the path will be relative to your resource-path
11:59justin_smithstompyj: you can access them directly with (System/getenv "env-key")
11:59scriptorhi, got a question about lazy seq implementation
12:00justin_smithstompyj: I sometimes find my self having to run (System/getenv "PWD") in my nrepl in emacs to remember which one it is
12:00scriptorsince technically forcing a lazy seq does mutate the actual object, how is this reconciled with also keeping them functional/persistent
12:00stompyjjustin_smith: right, but I meant, per environment variables, meaning, I have a set of AWS credentials for development, a set for staging, and a set for prod, etc
12:01scriptoris this sort of mutability considered okay?
12:01stompyjI just wondered if there was a community practice around that
12:01stompyjor if it's just a "make it work" situatin
12:01justin_smithstompyj: with caribou we have an "environment" key in the env, and use that to decide which edn file to slurp for config
12:01justin_smithwell read, but you get the idea
12:02stompyjahhh nice
12:02jtoyi use APP_ENVIRONMENT
12:02justin_smithjtoy: that sounds much more professional
12:02stompyjjustin_smith: I wanted to use caribou, but this app is so simple
12:02stompyjI couldn't convince myself it was justified
12:02stompyjit looks awesome
12:02justin_smithheh, yeah, I am working on making caribou more modular, pulling in fewer default dependencies so it makes more sense for simpler stuff
12:03justin_smith(while keeping it easy to pull in the more elaborate stuff if it is needed)
12:03justin_smiththanks :)
12:03stompyjjustin_smith: where do you store the production env vars so it doesn't get stored in git/mercurial?
12:03justin_smithyou mean the credentials?
12:03stompyjjustin_smith: yeah, this is just compojure + liberator as a fancy proxy into mongo
12:03stompyj:slamdunkL
12:03stompyj:slamdunk:
12:04justin_smithI have a lib (blackbox) using my cryptlj lib that is still in the works for storing edn in aes128
12:04justin_smithcurrently we don't have something nice and sane, sad to say
12:05stompyjno worries
12:05justin_smiththe hard part is convincing everyone to adapt to the encrypted workflow
12:05justin_smithif the security is a hassle, it just gets worked around in insecure ways, lose/lose
12:05stompyjyeah
12:05coventryfakedrake: http://clojure.org/multimethods
12:06justin_smithstompyj: I am working on a plugin system that will help address above mentioned complexity and size of caribou, and also make it easy to drop in the encrypted credentials in an existing app with minimal hassle
12:06seangroveSegFaultAX: What talk did you recommend to sritchie?
12:07stompyjjustin_smith: excited to check it out
12:07justin_smithhttps://github.com/noisesmith/cryptlj - this is the underlying convenience lib for the encryption
12:07justin_smithhttps://github.com/noisesmith/cryptlj/blob/master/src/cryptlj/disk.clj the api is pretty simple
12:08justin_smiththin wrapper on the java rigamarole
12:09justin_smiththe leiningen api is still unstable, fyi
12:11coventryseangrove: Pretty sure it was a conj talk titled "logs as data."
12:11jjl`_hi all. i've got this bizarre thing going on in my test suite where i'm comparing two maps with =. apparently both (is (= a b)) and (is (not (= a b))) pass. however, if i make a minor modification to the map, one of them starts failing as i would expect. adding prn calls shows that they're both having different values. does anybody have any idea what might cause this?
12:12llasramjjl`_: Can you produce a minimal example map?
12:12llasramThe obvious thing to my mind would be adding to the map objects which don't adhere to the .equals contract
12:13jjl`_the thing causing it is adding a key to the second map that isn't in the first map which = nil
12:13jjl`_i'm trying to create a reduced case
12:13llasramYou have non-nil objects which are `=` to nil?
12:14jjl`_the key does not exist in the first map. it is nil in the second. apparently they are both equal and not =
12:15justin_smithjjl`_: that surprises me
12:15jjl`_it surprises me too. they can't be both equal and not equal
12:15gfredericksas described this shouldn't have anything to do with the behavior of =
12:15justin_smithare you sure it isn't something like (is not (= a b))
12:15gfredericksas long as it''s deterministic
12:16gfrederickssince he just passes it to not
12:16Raynesbitemyapp: Go.
12:16RaynesThe programming language.
12:16justin_smithor (is = a b) always returns true
12:16seangrovecoventry: Ah, I liked that one a lot. Too bad it never got much traction inside Heroku :P
12:16gfredericksso justin_smith's guesses seem a lot more plausible
12:17jjl`_oh nevermind, it was an extra pair of parens, not a missing one. i'm just blind this afternoon apparently
12:18jjl`_sorry for the confusion
12:18gfredericks,(deftype Foo [] Object (equals [this other] (zero? (rand-int 2))))
12:18clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
12:18justin_smithgfredericks: lol
12:19gfredericks~sanbox
12:19clojurebotI don't understand.
12:19fakedrakecoventry: very interesting but i do not thing multimethods are suitable, I will have to write tha iterating function as a dispatch fun
12:19jjl`_i'm surprised = tolerates only having one arg actually
12:20justin_smithjjl`_: check this out
12:20justin_smith,(= Double/NaN)
12:20clojurebottrue
12:20justin_smithmindblowing
12:20justin_smith,(= Double/NaN Double/NaN)
12:20clojurebotfalse
12:20justin_smithas expected
12:21amalloyjjl`_: (apply = coll)
12:22amalloy"are all elements of this collection equal?"
12:22amalloyshould work for one-element collections
12:22jjl`_ah, i suppose that's a fair enough use case
12:22amalloyotoh it should *also* work for empty collections, and doesn't iirc
12:22amalloy&(apply = nil)
12:22lazybotclojure.lang.ArityException: Wrong number of args (0) passed to: core$-EQ-
12:23jjl`_of course every time you design for one use case, you're trampling on another :)
12:27amalloyfeel free to show a use-case that is "trampled on" by having (=) return true instead of throwing an exception
12:28jjl`_i was talking more about the one arg part than the 0 arg parts really
12:41danneu,(-> 1)
12:41clojurebot1
12:41danneu,(->> 1)
12:41clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$--GT>
12:41danneuy?
12:48TimMc,(macroexpand-1 '(->> 1))
12:48clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$--GT>
12:48llasramdanneu: Implementation quirks
12:49TimMcand poor base case coverage in clojure.core -.-
13:04BronsaTimMc: danneu that's going to be fixed in 1.6.0 though
13:06amalloy,'(->>) ;; hiredman, any plans to fix the macroexpander?
13:06clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: core$--GT>
13:08TimMcWhere is "--GT" coming from?
13:09coventryTimMc: Is that an incomplete munging of ->> ?
13:10TimMcOh, yeah.
13:10TimMcdemunging, actually
13:10TimMc->> munges to __GT__GT_
13:11TimMcand that is incorrectly split on the second __ and demunged to --GT
13:14hiredmanamalloy: I don't have any plans at the moment, I imagine the issue is the sandbox macroexpands everything ignore quotes, looking for bad forms
13:14amalloyhiredman: yes, that is the issue
13:14amalloyyou can have lazybot's macroexpand-most, if you want
13:14amalloyor i guess it's in clojail, not lazybot
13:14hiredmanI may just drop all of that given that the sandbox is in an isolated classloader and the sandbox is running in a chroot in another process
13:14hiredmanand the classloader is thrown away every 10 minutes anyway
13:15coventryriddley.walk has a pretty complete static macroexpand-all.
13:16amalloycoventry: why implement that, given that clojure.tools.macro/mexpand-all exists?
13:25hiredmanthe actual issue seems to be the 1.6 snapshot clojurebot had didn't have the fix for ->> in it
13:26coventryamalloy: My reason for rejecting it a while ago is that it reportedly doesn't deal correctly with &env, but maybe that's not relevant here. http://sgeo.tumblr.com/post/37646341234/clojure-macroexpansion
13:26coventry(Plus, riddley's not mine, anyway.)
13:52danneuHow can I clean up nested `when-let`s? Here they are in a route: https://gist.github.com/danneu/7895990
13:53danneuOne year of Clojure and this is my best right here folks
13:53RaynesGreat Scott!
13:54amalloydanneu: i mean, there's nothing *too* terrible about that
13:54technomancyone let + when/and
13:55amalloytechnomancy: i don't think that works very well when he depends on previous values?
13:55amalloydanneu: many people have written a macro (when-lets [x foo, y bar] ...), though it's not fabulous
13:55technomancyoh sure
13:56RaynesYeah, I can't think of tons of prettier ways to rewrite this.
13:56amalloyRaynes: switch to haskell, ???, profit
13:56mdrogalisWhat happens if a nil flows into one of the deeper functions, danneu?
13:56amalloydat Maybe comprehension
13:56tbaldridgeuse a macro?
13:57danneumdrogalis: nothing bad. i guess the idea was to short-circuit early
13:58mdrogalisdanneu: If those functions fail hard and throw an exception, you can just use let's with some detatched error handling from Dire.
13:58mdrogalisI've seen a few people use it to evade monads.
13:59tbaldridgedanneu: here's a macro that should allow you to collapse all the when-lets into a single when-let*: https://gist.github.com/halgari/7896099
14:00stuartsierradanneu: depending on the use, `some->` may suffice
14:00mdrogalisThe macro king.
14:00danneucool. thanks team
14:02tbaldridgeto be honest, I'm not completely sure why the standard when-let only supports a single binding.
14:02stuartsierraThis has come up on the mailing list before.
14:03TimMcWith explanation, or just speculation?
14:03coventry"lein repl" was failing for me with "clojure.tools.nrepl.transport.FnTransport cannot be cast to clojure.tools.nrepl.transport.Transport". Seems I've managed to heisenbug the failure away by touching one of the files involved. Anyone know what the cause might have been?
14:03stuartsierraIf I recall, I think it came down to semantic ambiguity.
14:03amalloystuartsierra: i think it's only ambiguous if you try to do it for if-let, not for when-let
14:03stuartsierraamalloy: That may have been the justification, for all I can remember.
14:03amalloybut maybe not; i might have been arguing semantic ambiguity myself last time
14:04stuartsierraI don't have a strong opinion. `some->` fulfills the most common use case.
14:05danneuclojuredocs.org could use a some-> example
14:06danneuoh yeah, it stopped at 1.3
14:09cldwalker__danneu: your example updated with some-> https://gist.github.com/cldwalker/7896195
14:14coventrycldwalker__: That's slightly different semantics, though, in that it's hitting the db for the story before the chapter slug has been validated.
14:41danneucldwalker__: thanks
14:42bitemyappdanneu: and
14:43bitemyappdanneu: actually wait, some-> is better.
14:43bitemyappn/m
14:55tuddmanI built a clojure library to "dynamically" push/pull/read data in and out of excel - https://github.com/tuddman/clj-dde
14:56tuddmanit's early stage. if anyone needs that sort of thing, have at it. feedback welcome.
14:56bitemyapptuddman: sounds pretty cool, announce it on the ML if you haven't!
14:57tuddmanbitemyapp: not on said ML. (new to clojure)
14:57bitemyapptuddman: the Clojure mailing list.
14:59technomancy"SML is the standard ML!" (to the tune of "ed is the standard editor!")
15:01bitemyapptechnomancy: lol Bob Harper
15:02ucbbitemyapp: http://i.imgur.com/CgfWMA2.jpg
15:03technomancyhttp://www.georgehart.com/bagel/bagel.html
15:04bitemyapptechnomancy: this explains why jewish people are well-represented in mathematics. They get topology lessons on Saturday night.
15:05rlbIs there a ring option to disable the non-ssl listener?
15:05bitemyappucb: you've found a greater trull than me. congrats.
15:05bitemyapprlb: huh?
15:06hiredmanrlb: last I checked the ring-jetty-adapter unconditionally enables it
15:06rlbbitemyapp: i.e. if I say :ssl-port 4443, "lein ring server" will set up https on 4443, but it still accepts non-https connections on 3000 (or whatever).
15:07rlbI'd like to just disable anything other than ssl-port.
15:07hiredmanit is important to distinguish between ring the library of stuff, ring the spec, and ring adaptors
15:07rlbAnd it doesn't appreciate setting :port to false ;>
15:08rlbhiredman: ok, right -- I probably meant ring-jetty-adapter.
15:08hiredmanrlb: so in case no one has had this talk with you yet, don't use lein to run services out of a git checkout
15:09hiredmanso lein ring server listening on the extra port for development, who cares
15:09rlbhiredman: thanks, no one has, though in this case, I'm just playing around.
15:10technomancySSL termination in jetty itself is mildly sketchy
15:11hiredmannow for actually deployment you'll either do like technomancy recommends, and embed ring's jetty stuff in your app, and you still won't be able to disable listening on the non-ssl port, or you'll package as a war, and you will have your own jetty config to do whatever you want with
15:11hiredmantechnomancy: in what way?
15:11technomancyhiredman: you want your JVM running as root to sit on 443?
15:12hiredmantechnomancy: that assumes it will be an external services that needs to sit on the well known port
15:12stuartsierraAlternately, JSVC / Apache Commons Daemon lets you bind to a system port and then drop privileges like a good Unix process.
15:12technomancytrue; for specialized cases it's fine
15:12technomancyit just sets off my "look out" pattern match
15:13technomancystuartsierra: the jvm and "like a good Unix process" also sets off my "sketchy" pattern match
15:13technomancybut who knows; maybe it's fine
15:13stuartsierrahaha
15:15rlbSo it isn't really immediately relevant, but I've seen the recommendation to just use apache/nginx as a proxy for https. Is that a preferred approach?
15:15justin_smithyeah, it's a lot easier
15:15justin_smithand you want them in front of the app for security reasons too
15:16hiredmanthat is a common setup, but it is less flexible, for example if you want to be cool and do client side certificate auth
15:18justin_smithapache and nginx support that don't they? or are they just less flexible in their support?
15:19rlbhiredman: so an alternative would be to run the app as non-root, but use stuartsierra's suggestion (or similar) to handle the privileged port?
15:19stuartsierraI think the most common technique is to reverse proxy with Apache or nginx.
15:19hiredmanjustin_smith: it depends if you want to do it at the app layer
15:20hiredmanrlb: *shrug* it is tradeoffs all the way down
15:20justin_smithright, of course
15:22sverihi, i have the following clojurescript code: http://pastebin.com/8JyRDGvV but when i open a page with the built js i get the following error in the js console: Error: Cannot merge $e into node of different type
15:22sveriany idea what is wrong there?
15:22bitemyapprlb: that's not Ring, that's lein ring.
15:22bitemyapprlb: that's also Jetty specific.
15:23pbostrom"don't use lein to run services out of a git checkout" <- what is the issue with this?
15:26goracihi what the best way to refer function from other namespace ? require or use ?
15:27stuartsierragoraci: `require` always and forever, optionally with `:as` or `:refer`
15:27seangrovegoraci: Always require
15:27seangrovesveri: Haven't used c2 at all, sorry - the code looks pretty reasonable
15:28goracistuartsierra: in what case use preffered ? for what ?
15:28bitemyappstuartsierra: protocols as a halfway step to ML functors. Thoughts?
15:29coventrygoraci: use (use) for as a convenient way to grab stuff at the repl.
15:29coventrys/for//
15:29stuartsierrabitemyapp: that's basically what I Do
15:30bitemyappstuartsierra: my suspicions are validated. Thanks.
15:30bitemyappwanted to make certain I was seeing the bigger picture properly.
15:32coventryThat nrepl middleware error I was asking about was caused by (:require :reload)ing [clojure.tools.nrepl.transport :as t] or [clojure.tools.nrepl.misc :as m]
15:36jcromartieso apparently you can have a protocol function and a defn in the same namespace with different arity?
15:36jcromartiecould that potentially confuse things? it seems to work in my tests
15:37stuartsierrajcromartie: that won't work in general
15:37jcromartiedefine "in general", because in this particular case it works :)
15:37jcromartie(defprotocol Herp (derp [x y])) (defn derp [x] (derp x 42))
15:38stuartsierraThe later `defn` is overwriting the protocol function.
15:38stuartsierraIt might seem to work in a few odd cases.
15:38stuartsierraBut it definitely isn't intended to work that way.
15:39jcromartiehm
15:39jcromartieyeah I didn't think so (this was someone else's code)
15:50technomancyoh man I hadn't thought of client certs for jetty doing SSL
15:50technomancyI would heart that so much
15:52sveriseangrove: thats what i was thinking too :D
15:57brainproxydnolen: have I possibly found a bug in clojurescript's range, or am I misunderstanding something:
15:57brainproxyhttps://gist.github.com/michaelsbradleyjr/7899410
16:01gfredericksjcromartie: stuartsierra: might that work because the the compilation of (derp x 42) has some inlining or something that isn't sensitive to the var being redefined?
16:01jcromartieyeah but I wouldn't want to rely on that for sure
16:01gfredericksoh certainly; presumably any further references wouldn't work
16:02jcromartiesomehow, it works, but I'll be refactoring it
16:02jcromartiethe other guy on the project is a Clojure newb
16:02jcromartiebut he picked it up amazingly well
16:02jcromartienothing can phase him
16:03jcromartieor is that faze
16:03jcromartiehm, yes, it's "faze"
16:03jcromartie:) gotta love English
16:10coredhi
16:10dnolenbrainproxy: a more informative paste that actually includes the output would be helpful :)
16:10coredis there a function that tells me the type of a value?
16:10coredsomething like (is-a?
16:10dnolen,(type [])
16:11clojurebotclojure.lang.PersistentVector
16:11brainproxydnolen: alright, wasn't sure if you could plop it into a repl
16:11brainproxywill improve it
16:12coreddnolen: thanks
16:13nopromptdnolen: this pure business is rocking my wold right now.
16:13dnolennoprompt: :)
16:14dnolennoprompt: I'm cooking some stuff up, it's a bit slow going though because I'd like to get some enhancement into CLJS before I write up a post
16:15nopromptdnolen: did you see those little macros i put together around it? well, that plus a little hiccup.
16:15cored Applies fn f to the argument list formed by prepending intervening arguments to args.
16:15coredthat's is kinda confusing
16:15coredcan somebody explain it to me please
16:15coredI think that what is says is that I can apply a function to each element of an list, is that correct?
16:16hiredmanit doesn't say each anywhere
16:16nopromptdnolen: looking forward to that new version. i'm using react.min.js right now to avoid the closure compiler complaints. :|
16:16coventry,(apply (fn [& args] args) 1 2 3 4 (range 5))
16:16clojurebot(1 2 3 4 0 ...)
16:16coventry,(-> (apply (fn [& args] args) 1 2 3 4 (range 5)) str)
16:16clojurebot"(1 2 3 4 0 ...)"
16:16coventry,(-> (apply (fn [& args] args) 1 2 3 4 (range 5)) pr-str)
16:16clojurebot"(1 2 3 4 0 ...)"
16:16coventrybah
16:16coredhm
16:16dnolennoprompt: yeah it's coming - just need to sort out this macro enhancement and I want to fix an issue with resolving namespaces
16:17justin_smithcored: also, for is-a? you may want implements?
16:17coredcoventry: still don't get it
16:17coredjustin_smith: thanks
16:17dnolennoprompt: yes the hiccup macros are pretty cool - want to get god looking api down that's just based on functions first though
16:17justin_smithwait, it isn't implements?
16:18nopromptdnolen: basically that's what i did. i ditched the macro version in favor of a minimal function based version (no css selector style tag names).
16:18justin_smith,(instance? clojure.lang.ISeq ())
16:18clojurebottrue
16:18justin_smiththat's the one, instance?
16:18coredjustin_smith: oki
16:18coredso if I have a (range 4)
16:18coventrycored: (apply f a b c [d e f]) is the same as (apply f [a b c d e f])
16:18coredand I want to use each value inside it
16:19coredI thought that I could use apply
16:19coventrycored: That's what that docstring means for example.
16:19justin_smiththat helps if you want to check for protocol / interface compatibility
16:19clojurebotexcusez-moi
16:19nopromptdnolen: but i'm interested to see what you come up with.
16:19coredbut what apply does is to stick the first argument as a front of the second which is a list and then evaluating the entire thing, correct?
16:20dnolenCLJS feedback on this enhancement *greatly* appreciated - http://dev.clojure.org/jira/browse/CLJS-721
16:20coventry... and both forms give the same result as (f a b c d e f)
16:20dnolentrying to figure out what to support as far explicitly including macros stuff in one ns spec
16:21brainproxydnolen: okay, I reworked my comments around the output (included in the gist) that I'm seeing in my browser's console
16:21brainproxyhttps://gist.github.com/michaelsbradleyjr/7899410
16:23seangrovednolen: This is to get away from having a (:require ...) and (:require-macros ...) when they come from the same ns?
16:23dnolenI'm thinking about leaving the enhancement out of :use since you really only need :require
16:23dnolenseangrove: yes
16:23dnolenso currently I'm thinking :require should support :include-macros true, and :refer-macros [...]
16:23dnolenand no support for this in :use
16:25seangrove:include-macros would bring in the macros but keep them namespaced (or aliased in the case of an :as), and :refer would drop the ns prefix?
16:25nopromptdnolen: oh that would be awesome.
16:25dnolenbrainproxy: looks like a bug, please file a ticket, thanks
16:25dnolenseangrove: exactly
16:26seangrovednolen: Not a huge fan of stuffing more flexibility into the ns form, but that does what I would expect it to. Certainly straightforward/legible enough.
16:27brainproxyso basically you would have .cljs and .clj files side by side?
16:27seangrovetechnomancy: Was it you that had a patch to make namespace immutable with functional transformations?
16:27brainproxyi.e. with the same name other than the ext
16:28dnolenseangrove: agreed, but I think think wanting to keep the two same is very desirable because of the symbol resolution issues otherwise
16:28dnolenseangrove: definitely open to better ideas if anyone has them, but this seems to cover the use cases and it isn't too verbose
16:29dnolenand implementation is straightforward
16:29tbaldridgednolen: so that would only pull in macros from that ns, or macros and fns?
16:29technomancyseangrove: no, but I was following up on some of the ancient discussions proposing to do so
16:30dnolentbaldridge: well you can load fns from a macro file in CLJS
16:30dnolens/can/can't
16:31dnolentbaldridge: this is just sugar what I'm proposing will expand in to the base ns spec DSL
16:36nopromptdnolen: i like this idea. it seems weird right now to (:require [x :as x]) and then (:require-macros [x :refer [y]]) but it doesn't bother me *that* much.
16:37dnolennoprompt: yeah that case is less obnoxious, but that's not true when you want to generate a whole bunch of inlining macros that correspond to functions ala cljs.core arithmetic operators
16:38dnolenso that why I'd like to see (:require [reactjs.dom :as dom :include-macros true]) for example
16:38nopromptdnolen: what are inlining macros?
16:38dnolenthen all dom/foo calls inline into direct React calls, but you still get all the functional goodness
16:39nopromptah
16:39dnolennoprompt: macros and fns can have the same name in ClojureScript unlike Clojure
16:39dnolenthis is why you aren't paying function call overhead for basic stuff like array access, array length, arithmetic etc
16:40nopromptdnolen: maybe a bit off topic but has anyone come up with an idea for :refer/:rename?
16:40nopromptdnolen: or is that to hairy?
16:40dnolennoprompt: :refer is already supported, patch welcome for :rename
16:42seangrovetechnomancy: Someday, someday....
16:46tonie_has anyone used clojurescript in a production environment? care to share your experience? I'm looking to build a new web application that is to be a single-page application
16:46tonie_trying to decide if i should write the application in clojurescript or javascript/angularjs
16:48marcopolo2tonie_: I've been rewriting cryptic.io in clojurescript
16:48nopromptdnolen: have there been any suggestions?
16:48dnolennoprompt: there have not
16:48bitemyappmarcopolo2: this is a what?
16:48marcopolo2I have to deal with webworkers, along with all the traditional worries in big client side apps
16:49nopromptdnolen: wow. that's surprising. seems like that'd have been a pain point for someone by now.
16:49marcopolo2bitemyapp: ?
16:49marcopolo2tonie_: The original prototype was built with backbone
16:49bitemyappmarcopolo2: what's cryptic.io?
16:49dnolennoprompt: I never use rename, mostly because I rely on :as
16:49dnolennoprompt: but rename would be nice if just to be consistent
16:50marcopolo2bitemyapp: online storage, where everything is encrypted in the browser
16:50bitemyappmarcopolo2: client-side encryption? phew.
16:50tonie_margopolo2: i'm cehcking out the site now. very interesting. did you use any frontend framework?
16:51bitemyappmarcopolo2: so nobody on the team has a background in cryptography?
16:51nDufftonie_: I have an app using clojurescript that's been humming along in production for upwards of a years -- a JIRA plugin; the big pain point there was playing nice with JIRA's own javascript, which stomps on the goog.string namespace and does other such nastiness.
16:51marcopolo2tonie_: The site that's live is using backbone, you can find the initial work of cljs in the github repo
16:51marcopolo2bitemyapp: We aren't making any new crypto schemes
16:51nDufftonie_: ...but modeling state with atoms &c. made things quite pleasant; I'd do it again.
16:52Cr8oh gods
16:52marcopolo2bitemyapp: just using the good ol' CTR block ciper with AES-256
16:52Cr8MAC'd?
16:52seangrovenDuff: Did you not use advanced compilation/munging?
16:52nDuffseangrove: I did.
16:52marcopolo2tonie_: I really like pedestal app, it makes it easy to focus on one part of the application at a time
16:52bitemyappmarcopolo2: but...client-side?
16:52Cr8Good source of randomness for nonces?
16:53seangrovenDuff: How did JIRA manage to hurt your namespaces then?
16:53bitemyappCr8: /dev/urandom
16:53seangroveAlso, how did you work around it?
16:53Cr8bitemyapp: not in JS!
16:53bitemyappCr8: WHICH IS MY POINT
16:53marcopolo2bitemyapp: I actually fixed Mega's own crypto :P
16:53bitemyappmarcopolo2: you can't fix something that doesn't have reliable access to /dev/urandom.
16:53nDuffseangrove: Google Closure's namespace loading appeared to look at whether an unmunged name exist and refused to load.
16:53tonie_marcopolo2: thanks for the advice. i looked at pedestal. the relevence team is obviously awesome. i was INTIMIDATED by the tutorial/documentation. i think i will give it another go
16:53bitemyappthis is why people can't even be trusted to deploy existing crypto, let alone implement new schemes.
16:54marcopolo2bitemyapp: browser's have window.crypto.getRandomValues
16:54tonie_nDuff: thank you for the advice. i'll keep that in mind
16:54bitemyappmarcopolo2: which provides insufficient entropy guarantees.
16:54nDuffseangrove: ...I ended up just temporarily removing their goog.string before loading the cljs-generated .js.
16:55marcopolo2tonie_: the tutorial is really long, but you'll learn alot. They are redoing a lot of stuff, so you might want to wait for the new version to come out?
16:55bitemyappmarcopolo2: did you guys consult with anybody that works in cryptography before building this?
16:55bitemyappanybody credible*
16:56tonie_marcopolo2: the concepts are really interesting. the idea of writing a frontend application without getting bogged down in statefulness is enough to sell me on it
16:56marcopolo2bitemyapp: there is no reason we couldn't have people import their own generated private keys
16:56marcopolo2bitemyapp: for the truly paranoid on the browser's random values
16:57Apage43you still need a good nonce for every message you encrypt
16:57seangrovenDuff: Ah, that's a bit rough. Wish you could prefix the namespaces so multiple apps/versions of closure could co-exist
16:57marcopolo2Apage43: that's right
16:58seangrovetonie_: Pedestal is significantly different from pretty much any other approach on the web right now - some libraries like React are independently converging on similar solutions to some of the problems though. Just expect the painful newb feeling for awhile with it.
16:58Apage43also is the message MAC'd?
16:58Apage43file body, w/e
16:58marcopolo2bitemyapp: Apage43 Cryptic still has a bit to go before being open to the public, so it's free to get shaped by anyone
16:58marcopolo2Apage43: uses CCM
16:58Apage43ah
16:59Apage43i read CTR earlier
16:59marcopolo2well CTR is a part of CCM
16:59tonie_seangrove: looking forward to trying it out. i'll have some free time over holiday break. i've heard good things about it
16:59marcopolo2but you are right, I should have said CCM
17:00nDuff...what's the status of pedestal 0.3?
17:01marcopolo2tonie_: The google group for pedestal is pretty helpful, Ryan will usually answer questions daily
17:01tonie_marcopolo2: good to know. will join that now
17:05marcopolo2bitemyapp: I can see how it could be a hard sell to trust a stranger with providing strong crypto; what would you like to see happen before you trust cryptic?
17:06Cr8if you take as given that the browser crypto is solid, we still have the issue that I *actually have to trust cryptic*
17:06Cr8same as the lavabit problem, Just because you can't read my stuff now, doesn't mean the system can't change without me noticing
17:07Cr8there's not really a good way around that in the browser though
17:07Cr8tarsnap is an example of a service I *don't have to trust*
17:07Cr8because given that I have a copy of their client that I trust, nothing they do on their end *after that* can compromise my data
17:08marcopolo2Cr8: yup. We have all client-side code open-sourced (given), and we have an extension that will verify the files returned from the server against their signed hashes on the open source repo.
17:08Cr8but with browser stuff, I download a new copy of the client every time I visit the page
17:09Cr8marcopolo2: must also ensure that no code that wasn't there before is there, not just that the code that I had before hasn't changed; e.g. window.crypto = evilCrypto
17:09marcopolo2Cr8: the extension would prevent code that isn't on the repo from going undetected
17:10marcopolo2and if the repo has it, then we are accountable to that. But, it can't happen without someone noticing
17:16tomjackhttps://www.refheap.com/d1266cb7e64bd92b31fa8d9c9
17:17tomjackI wonder if LazySeq's equals could be better about noticing identity?
17:17tomjackcould/should
17:17tomjackguess you can just seq both sides
17:18ivanwhat about NaNs!
17:18Cr8I'm wondering why that identical? returns true
17:18ivanNaNs prohibit equality optimizations everywhere
17:18tomjack:(
17:19TimMc&(map (memoize println) (repeat 32 Double/NaN))
17:19lazybot⇒ (NaNnil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil)
17:20hyPiRionhah, that's sort of funny
17:23justin_smithNaN NaN NaN NaN NaN NaN NaN NaN Batman
17:24hyPiRion,(map print (conj (vec (repeat 16 (/ 0.0 0.0))) " batman "))
17:24clojurebot(NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN batman nil nil nil nil nil ...)
17:24hyPiRionyeah, you beat me to it
17:48bitemyappmarcopolo2: an indication that you worked with an actual expert
17:48TimMc&({Double/NaN 5} Double/NaN)
17:48lazybot⇒ nil
17:48bitemyappmarcopolo2: instead of making the same mistakes every other non-crypto-expert makes
17:48bitemyapplike trusting browser entropy.
17:50TimMcOK, what am I missing -- how does memoize not run println over and over?
17:51amalloyTimMc: you're passing it a Double-wrapped version of Double/NaN, which is pointer-identical to itself
17:52amalloy&(let [x Double/NaN] (= x x))
17:52lazybot⇒ false
17:52amalloy&(let [x (Double. Double/NaN)] (= x x))
17:52lazybot⇒ true
17:52TimMcOy vey.
17:52bitemyappequality and identity are slip'ry
17:53bitemyappTimMc: I have a fun fixed point puzzle somebody posted on Twitter if you want :D
17:53amalloyyou could use (repeatedly (fn [] Double/NaN)) instead of (repeat Double/NaN), and then memoize wouldn't "work"
17:53TimMc&(find (hash-map Double/NaN 5) Double/NaN) ;; and why does wrapping not happen here?
17:53lazybot⇒ nil
17:53amalloyTimMc: you wrapped it twice
17:53amalloygot two different Double instances
17:53TimMcAha.
17:54TimMcSame NaN, different NaN. But all NaNs are different, except when they're the same.
17:54TimMcVery clear.
17:54amalloyi confess i would not have expected this behavior of memoize/NaN, but once you asked about it that was the only possible explanation
17:55TimMcSo false is wrapped specially?
17:56riley526clojurescript
17:56riley526(woops, I meant to search, lol)
17:57TimMcOr... I guess every source of false (including the reader) is using Boolean/FALSE.
17:58TimMcNo, wait... Boolean/FALSE is an object, Double/NaN is a primitive.
18:00amalloywell java the language doesn't exactly need Boolean/FALSE as a primitive, since that's a keyword already
18:01TimMcYeah, that makes "sense".
18:01amalloyheh, exactly
18:04TimMcbitemyapp: Hit me.
18:04magnarstechnomancy: since resources behave differently in Jars and on the file system, I would like to add a jar to the class path for testing purposes. Any way to do that with leiningen?
18:05hiredmanmagnars: say what?
18:05technomancymagnars: sure; just deploy it into file://$HOME/.m2/repository and add it to :dev :dependencies
18:06hiredmanin what case do they behave differently?
18:08jtoyjustin_smith: there is no navigation at http://caribou.github.io/caribou/docs/components.html
18:08magnarstechnomancy: then what about CI and other developers - would they have to manually deploy the same jar to their .m2 folders? Or am I looking at creating a nexus for my test jar?
18:08technomancymagnars: you can put your test jar on clojars
18:08magnarstechnomancy: oh, I would think that was rude somehow. :)
18:09technomancythere's tons of crazy stuff on clojars
18:09musicalchairlet's say I have a classpath generated by a different build system and want to augment leiningens classpath with that.. possible? this is for internal prototyping. Importing the clojure dependency closure into the internal build system is prohibitively expensive for prototyping
18:09TimMcI backup all my music to Clojars under the guise of a templating library.
18:10musicalchairmight be easier to go the reverse way
18:10musicalchairor just do it manually.. hmm
18:10justin_smithjtoy: "Documentation" is a hyperlink, though it should make itself more clear as such
18:10bitemyappTimMc: map fst $ filter snd $ zip [2..] $ map (=='"') $ fix show
18:10justin_smithjtoy: in fact there are many links, they just don't highlight on hover
18:11bitemyappTimMc: figure out what it does without running it.
18:11jtoycool
18:11bitemyappTimMc: hoogling is allowed.
18:11magnarshiredman: well, for one you can't do clojure.java.io/as-file on a resource in a Jar, but you can on one in the file system. But there's other quirks too, like when an input stream is opened. A file will open an input stream when you do openConnection, while a resource in a Jar will wait untill you do getInputStream.
18:11TimMcOh, nope, don't know Haskell.
18:11bitemyappTimMc: try!
18:11bitemyappTimMc: I think you can do it :D
18:12justin_smithjtoy: yeah, as far as I am concerned it should be more obvious what parts of the text are links
18:12magnarstechnomancy: thanks for the help :)
18:12TimMcMan, I don't even know the precedence rules.
18:13technomancyprecedence rules are the worst =(
18:13hiredmanmagnars: ah, differences in the url handlers
18:14technomancythe part of my brain that stores precedence rules has been re-allocated to more important tasks, please try again later
18:15justin_smithin the crazy mirror world of #clojure lolparens becomes lolprecedence
18:15TimMcbitemyapp: something like (map first (filter second (zip (range 2 Double/POSITIVE_INFINITY) (map (partial = \") (fix show)))) ?
18:16amalloybitemyapp: that's weird. i tried to do it in my head but i was quite wrong about what (fix show) would return
18:16amalloyTimMc: yes
18:19TimMcbitemyapp: Got it.
18:19technomancyTimMc: can't you pass range a single arg?
18:20TimMctechnomancy: Then it's an upper bound.
18:20technomancyoh gotcha
18:21technomancy(drop 2 (range))
18:21TimMchah
18:21TimMcOh, I like that.
18:21technomancy=)
18:21TimMcNow you're thinking with seqs.
18:22bitemyappamalloy: fix show is pretty crazy.
18:22bitemyappTimMc: are you sure you have it right?
18:22TimMcNo.
18:22bitemyappnevermind, he got it.
18:22bitemyappwell, mostly.
18:22TimMcI did have to play with show a bit to find out what the hell it was.
18:23bitemyappshow wasn't the tricky part for me, it was fix.
18:23bitemyappI understood fixed point functions but the implications for show confused me initially.
18:23TimMcI still don't know how fix is supposed to do that, but I just figured what it had to do.
18:24bitemyappTimMc: non-strictness makes it work.
18:24bitemyappnon-strictness lets you get intermediate results from infinite recursion invocations
18:25bitemyappalmost like "reductions"
18:25bitemyappinfinitely recursive*
18:25TimMcHow does it know what to start with? Or is it that show can at least realize one character, so it doesn't need to?
18:25bitemyappTimMc: you think that's weird, you should try a strange loop like loeb!
18:26TimMcHmm, this can be done in Clojure, yes?
18:27Cr8is that because the result of show, being a String
18:27Cr8the first outerly-applied show must return a result beginning with a \", so can just go ahead and do that based on that type, not needing the value
18:27Cr8and so on
18:27bitemyappTimMc: not properly, no.
18:28bitemyappyou can only imitate or fake it.
18:28TimMcI think it's possible.
18:29bitemyappTimMc: it's a matter of mathematical possibility
18:29bitemyappTimMc: anything you could come up with would be an imitation with different semantics.
18:29bitemyappTimMc: non-strict and lazy languages can express things that are non-terminating infinite loops returning nothing in strict semantics.
18:29TimMcWith show: seq -> seq, and fix (seq -> seq) -> seq
18:29bitemyapp...that's not the same thing at all
18:30bitemyappthat's faking it with sequences.
18:30TimMcFine. :-P
18:30TimMcI just mean within the scope of this exercise.
18:31TimMcI remember someone doing some knot-tying with seqs in this channel, let me dig it up.
18:31bitemyappTimMc: fix of a function diverges if the function is strict in its arguments.
18:32TimMc,(take 10 (let [p (promise)] @(deliver p (lazy-cat [1 1] (map + @p (rest @p)))))) ;; from hiredman
18:32clojurebot(1 1 2 3 5 ...)
18:33dnolen:include-macros and :refer-macros support in :require landed in CLJS master https://github.com/clojure/clojurescript/commit/de6ee41b3b0e26020e01b409f97e513bce87456d
18:34bitemyappTimMc: that's not the same thing and you know it.
18:34TimMcHmm, yeah, because map has to "participate" in the scheme.
18:34bitemyappwhen you distort the semantics that much you might as well be writing C.
18:35bitemyappnifty though.
19:19rkneufeldnDuff: slow going. There has been little movement as we became very scattered after Conj and leading into holidays
19:28ztellmandoes anyone know how to make the cider repl history persist between sessions?
19:31justin_smithztellman: set the file name
19:31ztellmanjustin_smith: ah, it's unconfigured by default
19:31justin_smith(setq nrepl-history-file "~/.emacs.d/nrepl-history.eld") ; the nrepl version
19:31justin_smithI assume s/nrepl/cider and all is golden
19:40amalloyztellman: finally giving up swank?
19:41ztellmanamalloy: I switched away while I was feverish and weak
19:41ztellmanI regret it already
19:49amalloyi'm kinda disappointed snackoverflow.com doesn't exist
19:50hiredmanare you familiar with guthub.com?
19:50amalloyi have been there many times
19:51hiredmanwell, it is one of hte possible results from a snackoverflow
19:54pjstadigah
19:54pjstadigsnackoverflow
19:54pjstadignow there's a startup idea
19:59justin_smithsnackernews
20:03justin_smithhttp://on.aol.com/video/snackoverflow-demo-at-hackathon-sf-2013-517925738
20:11bitemyappswank :(
20:11bitemyappthe cider stuff really just makes me more mad about having given up swank.
20:14Bronsabitemyapp: I tried twice to transition from slime to nrepl.el/cider but after a couple of hours I had to switch back :/
20:15ddellacostabitemyapp: why? what's bad about cider comparatively? I never got familiar with swank, which is why I ask
20:16coventryddellacosta: Debugging facilities worked a little better in swank.
20:22bitemyapp"a little"
20:22Raynesbitemyapp: Down boy.
20:23bitemyappRaynes knows my pet peeves.
20:23arrdembitemyapp: oi. do you know of a reasonable lambda calculus monads paper?
20:23RaynesI'm all up in your psyche.
20:24bitemyapparrdem: closer to type theory, algebra, and category theory.
20:24bitemyapparrdem: I don't think that's something you want to build up to from scratch from typed lambda calculus.
20:25justin_smithbitemyapp: how about a peano numbers based matrix algorithm?
20:25justin_smithlol
20:25arrdembitemyapp: meh ok.
20:25bitemyapparrdem: do you want to understand monads themselves or their relationship to other concepts?
20:26arrdembitemyapp: I've been cramming typed lambda calculus all afternoon and I was hoping there was a reasonable mapping between the two
20:26bitemyapparrdem: untyped or typed lambda calculus?
20:26bitemyapparrdem: practical use of monads is built on type deduction if you're not fucking insane.
20:26arrdembitemyapp: typed. I said that.
20:27bitemyappsorry, my eyes skipped it
20:27bitemyapparrdem: how close are you to something like System F or dependent types?
20:27coventryThis early paper on monads has lambdas in it, but I wouldn't call it lambda calculus. http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf
20:27coventryIt's a very accessible paper, though.
20:27bitemyapparrdem: monads are higher-kinded types.
20:27clojurebotTitim gan éirí ort.
20:27arrdemcoventry: okay yeah that's one of the things i'm reading.
20:29bitemyapparrdem: monads are tacked onto pure typed lambda calculus but I'm not sure how much sense it makes without typeclasses and higher-kinded types.
20:29bitemyappor algebraic types
20:31coventryWhen you say cramming, do you mean for an exam?
20:31arrdemcoventry: finals man
20:31bitemyapparrdem: you can't possibly need monads for finals?
20:32arrdembitemyapp: I'm in a programming languages class. false.
20:32bitemyappyou're not at the university of glasgow though
20:32arrdemUT Austin wishes it was UGlasgow
20:32bitemyapparrdem: the most thorough-going way to comprehend is to just write code.
20:32bitemyapparrdem: or at least look at the monad laws
20:32bitemyappand understand them algebraically.
20:32bitemyappidentity, bind, return.
20:32bitemyapparrdem: http://www.haskell.org/haskellwiki/Monad_laws
20:35coventryGood luck!
20:35bitemyapparrdem: good luck. I'm available tonight if you need any help with monads.
20:38arrdemthanks guys.
20:49Raynesarrdem: They're mostly just burritos.
20:49RaynesAnd monoids in the category of endofunctors (what's the problem?).
20:50hyPiRionarrdem: I know your pain, man. Good luck!
20:50coventryI thought monads were midgets working on dildos which they took out of boxes. http://www.chrisstucchio.com/blog/2013/write_some_fucking_code.html
20:51coventryWadler says in that paper that category theory is completely unnecessary to understand monads-as-programming-construct.
20:52coventryBut it might be necessary to the exam, I guess.
20:54bitemyappmonads are really simple...
20:54bitemyappjust write the code
20:59talioscoventry - is it wrong that in reading that post, my only question is - whats a rabbit? :p
21:01taliosand no, I don't really want an answer :)
21:02arrdemfukkit I'm just gonna get this to compile (http://www.haskell.org/pipermail/haskell-cafe/2006-November/019190.html)
21:03coventrytalios: It depends on your values, I guess. That I didn't even notice that the first time I read it because I was laughing so hard is definitely wrong, though.
21:03taliosheh
21:04taliosI wonder if an Applicative is analogous to a butt-plug.
21:05taliosNo wait, I'm not wondering. no no no no no
21:21dfuenzalidaHi everyone
21:22Shiro-IchidaHello.
21:22dfuenzalidacan somebody help me with a ClojureScript and regex question?
21:22TimMccoventry: That's a pretty good blog post.
21:24dfuenzalida...I'm trying to do text replacement using clojure.string/replace in ClojureScript code but it doesn't seem to work as in regular Clojure
21:26TimMcdfuenzalida: Regular expressions are different on different platforms. Maybe that's causing problems for you?
21:26TimMcs/platforms/hosts/ or whatever
21:27arrdemRaynes: you aren't helping here mate
21:27Raynesarrdem: I'm doing my best.
21:27Raynes<3
21:27dfuenzalidaTimMc: It seems I'll switch to .exec instead, thanks!
21:28arrdembitemyapp: associativity is just m >>= a >>= b === m >>= b >>= a, right?
21:29arrdembitemyapp: but that doesn't make any sense if you're going to overload >>= to achieve control flow
21:29arrdem*control flow manipulation
21:29coventryTimMc: justin_smith linked it here a couple of days ago.
21:31amalloyarrdem: that's not associativity, that's commutativity (which monads don't have)
21:32arrdemamalloy: that makes sense... I guess I'm reading the associativity law wrong.
21:33amalloy((m >>= f) >>= g) = (m >>= \x -> ((f x) >>= g)) is associativity, i think
21:35coventryI think there are friendlier pages to look at regarding the monad laws than the one bitemyapp linked.
21:35coventryIn particular, http://onclojure.com/2009/03/06/a-monad-tutorial-for-clojure-programmers-part-2/ , which has the advantage that it's in a familiar languge. :-)
21:41talioswithout an equivalent to flatMap/bind I don't really see how you'd do monads in clojure, in any reallllly nice fashion. concat-map isn't quite.... the same.
21:42ToxicFrogDoes clojure have a convenient wrapper around the Java sockets aPI?
21:42taliosprobably start with a Protocol with an implementation that uses concat-map tho
21:42bitemyapparrdem: you can have commutative monoids! then they're abelian groups :D
21:42bitemyappToxicFrog: the Java API is convenient.
21:43bitemyapptalios: I brought #haskell to #clojure
21:43bitemyapptalios: I'm infecting the minds here
21:43arrdem~bitemyapp
21:43clojurebotbitemyapp is it amuses me to mock other peoples' gods
21:43taliosbitemyapp - hah, Frege or die :)
21:43ToxicFrogbitemyapp: I try to avoid using Java IO because I can never remember what combination of *Readers, *InputStreams, and god knows what else I need, and in what combination, to actually get data out of the damn fd.
21:43brehautbitemyapp: sorry to disappoint, but konrad hinsen and jim duey were doing it years ago
21:43brehaut:P
21:43talioswell, I'm playing with idris and its java backend currently
21:43bitemyapptalios: Frege is really neat, but if the choice is "or die", I'd go with Idris :P
21:43talios'lo brehaut
21:44brehauthi talios
21:44taliosbitemyapp - I already have a fork of idris where I'm tinkering with improving its maven support
21:44bitemyappbrehaut: I'm fine with being the third wave. That's the one that usually wins right?
21:44bitemyapptalios: why maven?
21:44brehautbitemyapp: i just recalled third wave ska and third wave punk. i dunno about that ;)
21:44brehautbitemyapp: whoa careful, talios is a maven zealot
21:45bitemyappbrehaut: http://i.imgur.com/ONGuFw7.jpg
21:48bitemyappbrehaut: kooky. maybe even a little bit ooky?
21:48brehautbitemyapp: mostly im giving talios crap :P
21:48bitemyappbrehaut: you should tease smalltalk users instead
21:49arrdembitemyapp: those still exist?
21:49brehautits hard to say; they arent seen outside of their image
21:49bitemyapparrdem: dude, my twitter is a fucking wasteland the last 48 hours
21:49bitemyapparrdem: of people using cockamamie dynamic languages defending their gods
21:57Bronsatools.analyzer.jvm succesfully analyzed the whole core.async source+tests
22:03gdevHas anyone used Clojure in a game jam? Chris Granger's component entity system looks promising but I'm targeting the UDOO
22:04marcopolo2gdev: UDOO?
22:06ToxicFrogArgh death to this entire API forever
22:06gdevLinux and arduino http://www.udoo.org/
22:07ToxicFrogI wanted to ditch Saturnine because it's kind of a pain to debug but honestly it's looking more and more like the best option
22:07gdevmarcopolo2, basically need to target ubuntu 12
22:13arrdemBronsa: friggin awesome!
22:16gdevibdknox, for Chromashift you only had to write the system in pure javascript right? everything else was pretty clojurey
22:26taliosbitemyapp - hah, I'm an ex smalltalk lover, frege lover, and maven zealot :)
22:27taliosbitemyapp - hah, clojure isn't a cockamamie dynamic language? :)
22:28bitemyapptalios: one of the few well thought out ones.
22:29taliostrue, tho a few places could do with some more thought. it still has its fair share of wtf's in spots
22:29taliosfew and fare between, but they're still there a bit
22:41bitemyapptalios: I'm genuinely curious, where does the passion for maven come from?
22:41bitemyapptalios: I take it for granted, like running water and working indoor plumbing.
22:43taliosbitemyapp - hah, I daresay there's little "passion" for maven :p However, it works - and for its issues, maven-release-plugin is probably the primary reason for sticking. Along with mutli-language projects, and distribution.
22:43taliosleon, sbt, gradle, all seem to fail on that front. or at least have n number of 1/2 baked custom solutions
22:49talioslein even
22:49taliosmmm, ironically I just got asked to install leon on the build server so we can get some lein projects building
22:50talioshow does one install leon? :)
22:50talioslein
22:50taliosstupid autocompleting irc client
22:50talioscorrecting even
22:51arrdembitemyapp: so after much pondering, several papers and some heated arguments with classmates monads are friggin easy.
22:55bitemyapparrdem: good, now explain them to me.
22:56bitemyapptalios: script
22:56talioswell I just wget'd it and chmod+d it. now to work out how to get jenkins to use it
22:56dsrxa monad is like a burrito that doesn't leak its contents
22:57Cr8autocomplect
22:58bitemyappdsrx: fuck off with the innuendo.
22:58arrdembitemyapp: all you need is a type, a definition of return and bind over the type and however many monadic functions you feel are in order. you roll up function composition through the monad and then (eval) it whenever you start to care about the exact value or when the side-effects become meaningful.
22:58dsrxnow i'm craving a burrito...
22:58arrdemgetting not scared of >>= was the hardest part :P
22:59dsrxthe thing i still struggle with with monads in haskell is using the *M (filterM, foldM, mapM) functions
22:59bitemyapparrdem: cool. and you see the parallels to inversion of control right?
22:59bitemyapparrdem: this is why Async in OCaml is built on monads, they're inversion of control callbacks for the async semantics.
23:00bitemyapparrdem: also, monads don't need to have side effects
23:00bitemyapparrdem: they can just be a way to box up non-determinism in general.
23:01dsrxthe identity monad is a trivial example of that
23:02arrdemI mean it really isn't a callback at that point, it's a >>= chained call forwards over Maybe or something else, right?
23:03bitemyapparrdem: no, it's basically a callback.
23:03bitemyapparrdem: the difference is it's basically sequencing the chaining of the data from callback to callback when the IO is done and the data can be sent down the hole.
23:03bitemyapparrdem: they're not callbacks in the sense that you manually do CPS, but the monad is definitely hollywood style.
23:04bitemyappan event loop is managing the registered handlers in the monads
23:04taliosdoes leiningen have any form of lifecycle?
23:07bitemyapptalios: waddat?
23:08taliosa set of standard tasks to run, i.e. clean -> compile -> test -> install
23:08bitemyapptalios: it understands tasks dependency.
23:09taliosit may - but what task to run :) that can change at whim per project
23:09taliosi.e. test vs expectations
23:09talios"test" only runs some tests
23:09taliosI like expectations as a framework, but f***k - running your tests in the VM shutdown hook? what idiot dreamed up that idea
23:09talioscockamamie I tell you :)
23:10bitemyappyeah that's kinda dumb.
23:11taliostook me ages to figure out why my CI builds weren't failing - as they technically weren't running tests that affected the exit code
23:11taliosgah
23:27bellkevIs it possible to include clojure libraries as compile-time-only dependencies in clojurescript projects? So that e.g. I can write a macro that compiles hiccup to strings at compile time?
23:30technomancytalios: the shutdown hook is pretty nutty; I think that's a ruby "innovation"
23:30taliosgo ruby!
23:31arrdemyeah ruby! eat that paint!
23:31technomancyyou can add to lein's :prep-tasks, which all get called in sequence before any code gets eval'd
23:31taliosweird - wonder why I disconnected there
23:31technomancyand you can shadow existing tasks with aliases to chains that include the original task
23:31taliostechnomancy - is that like a "default task set" that gets called if I just call "lein"
23:32taliosor, usable as
23:32technomancytalios: no; `lein` -> `lein help`
23:32technomancy:prep-tasks is just "stuff that must run before the project is ready to eval any other code"
23:33technomancywe're working on programmatic manipulation of project.clj for 2.4.0 but were blocked for a long time on a lossless reader
23:34arrdemtechnomancy: don't we have that in tools.reader? it seems like writing metadata selectively would be the harder problem.
23:35xeqibellkev: does using the :dev profile do what you want?
23:35technomancyarrdem: AFAIK tools.reader does not preserve comments
23:35arrdemtechnomancy: I believe you are correct. or whitespace. interesting point.
23:35technomancybut we have sleight now
23:35technomancyerr
23:35technomancysjacket
23:35technomancyeh
23:35technomancyscrew whitespace
23:36arrdemyes... but no. the indentation of comments is meaningful sometimes.
23:36arrdemsome MFST people I talked to had interesting comments about whitespace and comment preservation with automated refactoring.
23:37coventry4clojure and Clojure Programming are still the best resources for complete beginners, right?
23:37technomancyarrdem: that's what ;; is for
23:38arrdemI think I've seem three codebases that used the ;+ convention...
23:39arrdemmost just used ;; or ; in isolation
23:39technomancymaybe you'll see it more once we start to see code-rewriting tools
23:40alandiperttechnomancy: https://github.com/adereth/leiningherk/blob/master/lein.gk :-)
23:40bellkevxeqi: hmm, I'll have to check it out. If I make something a :dev dependency, can I just include e.g. a cli dependency in a cljs file and it won't complain? I'll have to familiarize myself with profiles a bit more...
23:40technomancyalandipert: whaaaaaaaa
23:40arrdemalandipert: whatrudoing
23:40technomancyoh, bin/lein
23:40technomancyniiiice
23:42amalloytechnomancy: i bet you feel dumb, now that there's a ;;;; port of lein ;;;; followed by only a hundred LOC
23:46bellkevxeqi: actually nvm, it looks like I just need to learn how cljs macros work... Since macros work at compile-time, and the cljs compiler runs on the jvm, cljs macros have to be defined in a clj namespace. So I should be fine...
23:48taliosright - enough of this lein malarky - lein != supported for now. contractor can suffer
23:53cljrhi, i have a question concerning hex codes....in python i can specify ff as "\xff", i found unicode representations as "\u00ff" in java, but it isn't directly equivalent, im not quite sure what im doing wrong as i dont work with hex/binary data, any nudge in the right direction would be helpful and appreciated
23:54arrdem,(.toInt (first "\xff"))
23:54clojurebot#<RuntimeException java.lang.RuntimeException: Unsupported escape character: \x>
23:55arrdem$google java string hex literal
23:55lazybot[hex - \x Escape in Java? - Stack Overflow] http://stackoverflow.com/questions/3613759/
23:55cljrarrdem: yeah i actually found "\u00ff" from that, but again it isn't the exact same and i dont know enough to continue
23:57dcolish0xFF
23:58arrdemcljr: &&(= 0xff 0xFF)
23:58arrdemlazybot: HOW DO I USE YOU
23:58TEttinger,"\0ff"
23:58clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Invalid digit: f>
23:59TEttingerarrdem: ##(= 0xff 0xFF)
23:59lazybot⇒ true
23:59arrdem(inc TEttinger)
23:59lazybot⇒ 7
23:59arrdem~botsmack
23:59clojurebotclojurebot evades successfully!
23:59arrdem(dec clojurebot)
23:59lazybot⇒ 31