2013-12-10
| 00:06 | bitemyapp | fakedrake: fold is usually what you want. |
| 00:07 | bitemyapp | sritchie: how far is far? |
| 00:07 | bitemyapp | sritchie: I'm faux-ffended you didn't ask me first. |
| 00:07 | sritchie | haha, you're the oracle, man |
| 00:08 | sritchie | I wanted to give the others a chance |
| 00:08 | sritchie | what's the word on logging, sir |
| 00:08 | tolitius | sritchie: http://blog.datomic.com/2013/11/datomic-pro-starter-edition.html it does say what your limit is: no • High Availability transactor support |
| 00:08 | tolitius | • Integrated memcached |
| 00:08 | tolitius | • Running more than 3 processes (2 peers + transactor) |
| 00:09 | tolitius | sritchie: but you have everything else |
| 00:09 | sritchie | gotcha |
| 00:09 | bitemyapp | sritchie: logging what? |
| 00:09 | sritchie | bitemyapp: or did you mean, I should have asked about datomic |
| 00:09 | bitemyapp | right, but I wrote some stuff for logging too. |
| 00:10 | bitemyapp | I just need context. |
| 00:10 | bitemyapp | I reacted to the mention of Datomic |
| 00:10 | sritchie | okay, one sec, wrapping up a quick phone thing - but I have logging questions |
| 00:10 | sritchie | fundamental questions |
| 00:11 | bitemyapp | I can do fundamental, unless you mean log4j internals. |
| 00:11 | cljr | Hmm, alright, i have this string "221ea102", what is the clojure way to convert it to 0x221ea102? |
| 00:11 | bitemyapp | cljr: the byte value or the string? |
| 00:11 | cljr | well, i'd like to go directly form the string to the byet value |
| 00:12 | cljr | "221ea102" -? 0x221ea102 |
| 00:12 | cljr | -> |
| 00:12 | bitemyapp | cljr: http://stackoverflow.com/questions/11194513/convert-hex-string-to-int |
| 00:12 | bitemyapp | I googled, Java hex value from string |
| 00:12 | bitemyapp | t'was the third result. |
| 00:12 | sritchie | bitemyapp: haha, no, please keep me away |
| 00:13 | sritchie | bitemyapp: 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:13 | bitemyapp | that's metrics. |
| 00:13 | sritchie | yes |
| 00:13 | bitemyapp | so logging. |
| 00:13 | sritchie | I'm also using timbre for logging |
| 00:13 | bitemyapp | timbre has some limitations, but I manage okay with it. |
| 00:13 | sritchie | and right now, I'm just logging exceptions, some text strings and maps on certain events, |
| 00:14 | bitemyapp | I've been trying to convince pt-toomanyfuckingvowels-nis to make the closure-based interface a part of stable. |
| 00:14 | sritchie | haha |
| 00:14 | bitemyapp | instead of a global singleton config. |
| 00:14 | sritchie | but 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:14 | cljr | bitemyapp: sorry, did a sorry job of doing my due diligence...wasnt sure what you call 0x... wasnt sure where to start |
| 00:14 | sritchie | and where the hell to send the logs |
| 00:14 | sritchie | bitemyapp: yeah, that needs to go away |
| 00:14 | sritchie | the singleton. |
| 00:14 | bitemyapp | sritchie: that's why I bugged him about a closure-based interface. |
| 00:14 | bitemyapp | it was driving me fuckin' batty. |
| 00:14 | sritchie | bitemyapp: clearly monitoring and logging are very related |
| 00:14 | bitemyapp | cljr: I just google the questions people ask and paste the most plausible answers in channel. |
| 00:15 | sritchie | :) |
| 00:15 | bitemyapp | cljr: I've been doing it for over a decade. I'm getting good at googling peoples' problems. |
| 00:15 | bitemyapp | sritchie: 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:15 | bitemyapp | sritchie: 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:15 | sritchie | bitemyapp: haha, I could go all twitter and log absolutely everything |
| 00:16 | sritchie | bitemyapp: every interaction, every function call, all of that |
| 00:16 | bitemyapp | that's what I was imagining, but let me describe what I do. |
| 00:16 | bitemyapp | I do log-level defined granularity, deployment mode defined appenders |
| 00:16 | sritchie | yes. I'm looking for the middle ground, after the intensity that I was part of |
| 00:16 | bitemyapp | dev == stderr, prod == files + search engine appender |
| 00:17 | bitemyapp | so 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:17 | bitemyapp | if you don't have a complicated deployment, just use a file appender and rsync the files to a central location. |
| 00:17 | bitemyapp | logrotate'd |
| 00:17 | bitemyapp | namespaced by machine. |
| 00:17 | cljr | bitemyapp: sounds like an unprofitable startup idea |
| 00:17 | bitemyapp | then have cron jobs/scripts scan the logs for weird stuff. |
| 00:17 | cljr | :_) |
| 00:18 | sritchie | bitemyapp: and you're taking care to do log in some structured way, of course |
| 00:18 | bitemyapp | sritchie: JSON with some specified/standard fields. |
| 00:18 | bitemyapp | sritchie: I'd kill for an edn plugin for ES. |
| 00:18 | bitemyapp | *kill* |
| 00:18 | bitemyapp | yes yes, I know I can write it myself. I don't have time. I'm working on Simonides, Grom, and Keensweep. |
| 00:18 | sritchie | :) |
| 00:18 | bitemyapp | and I have a day job. |
| 00:18 | sritchie | so, I could do this by sending everything to riemann, |
| 00:18 | bitemyapp | and I help people in IRC too apparently. |
| 00:19 | bitemyapp | sritchie: but do you want ephemeral event triggers? |
| 00:19 | sritchie | having it go edn -> json, (technically protobuf -> edn -> json, but whatever), |
| 00:19 | sritchie | and hit elasticsearch |
| 00:19 | bitemyapp | I use logging for the history, not for the metrics. |
| 00:19 | bitemyapp | oh you'd spout from riemann to ES? |
| 00:19 | sritchie | yeah |
| 00:19 | bitemyapp | nice idea. |
| 00:19 | bitemyapp | better than mine. |
| 00:20 | sritchie | OR I use timbre as my top level abstraction, and give timbre a riemann appender |
| 00:20 | bitemyapp | also I really do not like that the Seqable API is a ghetto fmap. |
| 00:20 | bitemyapp | want my damn <$> |
| 00:20 | sritchie | bitemyapp: yes, the type classes do clarify alot |
| 00:20 | sritchie | remember clojure.contrib.accumulator? |
| 00:20 | bitemyapp | sritchie: that's what I thought you meant @ riemann appender. |
| 00:20 | bitemyapp | sritchie: t'was plural, and yes. |
| 00:20 | sritchie | bitemyapp: all of these blocks are useful, and I can stack them in so many ways |
| 00:21 | bitemyapp | I didn't know people still used that. |
| 00:21 | sritchie | bitemyapp: 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:21 | sritchie | bitemyapp: they're not, but it's a janky monoid + semigroup impl |
| 00:21 | bitemyapp | Isn't the accumulators library mappend + identity? |
| 00:21 | bitemyapp | yeah, I figured. |
| 00:21 | bitemyapp | I still don't know when I would elide identity to make a semigroup in code. |
| 00:22 | bitemyapp | I guess when identity literally has no meaning for the data type? |
| 00:22 | bitemyapp | I'd have to dig to make up an example like that. |
| 00:22 | bitemyapp | sritchie: well, what does "recreate what I know" mean? |
| 00:22 | bitemyapp | sritchie: because my impression of Twitter's logging infrastructure was that it was a lot more complicated and crossed machine barriers for tracing. |
| 00:22 | bitemyapp | so that you could follow execution path across the SOA. |
| 00:23 | sritchie | bitemyapp: log every API and database interaction in some schemified way |
| 00:23 | sritchie | plus timing data for everything, |
| 00:23 | sritchie | and run everything through riemann, which forwards on to graphite and elasticsearch |
| 00:23 | bitemyapp | sritchie: textual queries can carry you a long way. |
| 00:23 | bitemyapp | sritchie: 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:24 | sritchie | bitemyapp: it sounds like I can do the "appender" thing at a few different levels, and they're all equivalent |
| 00:24 | bitemyapp | mostly. |
| 00:24 | sritchie | at riemann's level, at timbre's level, all of that |
| 00:24 | bitemyapp | the error/exception logging is a privileged faculty in Timbre, the rest is par. |
| 00:24 | bitemyapp | his macro-ified log-level API is fucking insane |
| 00:24 | sritchie | haha |
| 00:24 | bitemyapp | I've never seen hash-table-of-functions dispatch made so complicated. |
| 00:24 | bitemyapp | I'd have an easier time understanding an array of function pointers in C> |
| 00:25 | sritchie | the profiling stuff looks useful, but pushing that into my code is not the True Way |
| 00:25 | sritchie | bitemyapp: so my homework is to go get an elasticsearch box up on EC2? |
| 00:25 | bitemyapp | sritchie: nah, if I needed profiling I'd make it an optional configuration-activated AOP faculty. |
| 00:25 | bitemyapp | sritchie: uhhh, I'm saying you can avoid this work via YAGNI and stick with vanilla log-lines for now. |
| 00:25 | bitemyapp | unless you really want structured logging + search, then yes, ElasticSearch. |
| 00:25 | sritchie | and just grep them |
| 00:26 | bitemyapp | sritchie: ElasticSearch is in general an open source secret weapon. |
| 00:26 | bitemyapp | knowing it makes your data very discoverable and it scales nicely. |
| 00:26 | bitemyapp | and just grep them, yes. |
| 00:26 | bitemyapp | learn ES for the overall leverage it offers, not for this particular problem. |
| 00:26 | bitemyapp | I'd wait for the "pain" of the absence of structured logging to hit you before adding it. |
| 00:26 | sritchie | I want to be the most idiotically technologically advanced race management platform ever |
| 00:27 | sritchie | which we already are, since everything sucks :) |
| 00:27 | sritchie | CRDTs for race timing stopwatch resolution |
| 00:27 | bitemyapp | :| |
| 00:27 | sritchie | everything, to the extreme |
| 00:27 | bitemyapp | this is like the mumble project. |
| 00:27 | bitemyapp | way ahead of its time. |
| 00:28 | bitemyapp | sritchie: well, keep in mind, I'm using a startup-oriented cost function for your time. |
| 00:28 | bitemyapp | sritchie: so I'm assuming it isn't that valuable for the product itself to have structured logging yet. |
| 00:28 | sritchie | yes, you're right |
| 00:28 | sritchie | it's valuable to have good monitoring in place |
| 00:28 | bitemyapp | sritchie: also if you need user behavior analytics ping me, that's what Simonides is for. |
| 00:28 | bitemyapp | it's "collect everything, query later" analytics. |
| 00:29 | bitemyapp | no manual JS event emitters. |
| 00:31 | bitemyapp | I love it when peoples' cmake setups just work. |
| 00:32 | sritchie | bitemyapp: 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:32 | sritchie | and writing (log/info "New user submitted some params: " params) is obviously JankTown |
| 00:32 | bitemyapp | sritchie: AOP. |
| 00:33 | bitemyapp | if your functions are granular enough you will have a glorious time with AOP + logging. |
| 00:33 | sritchie | time to read up :) |
| 00:33 | bitemyapp | sritchie: https://github.com/technomancy/robert-hooke |
| 00:33 | bitemyapp | sritchie: https://github.com/michaeldrogalis/dire |
| 00:34 | bitemyapp | sritchie: http://en.wikipedia.org/wiki/The_Art_of_the_Metaobject_Protocol |
| 00:34 | bitemyapp | sritchie: crazy Common Lisper stuff, but it works REALLY well for certain classes of problems in Clojure. |
| 00:34 | sritchie | I've got it |
| 00:34 | sritchie | interesting, nice links |
| 00:36 | sritchie | haha, this is clearly the best way to log |
| 00:36 | sritchie | jesus |
| 00:36 | bitemyapp | sritchie: see?! |
| 00:36 | sritchie | and to hook in riemann |
| 00:36 | bitemyapp | you separate and unify your logging infrastructure into a family of functions "decorating" application behavior |
| 00:36 | sritchie | the only thing missing might be the context of the function call... |
| 00:36 | bitemyapp | then you also get a nice big fat red switch for shutting stuff on and off. |
| 00:37 | bitemyapp | sritchie: well, that's just it. it means your functions aren't granular enough. |
| 00:37 | bitemyapp | sritchie: if you want to log sub-function (like in let expression) behavior, then make it another fn. |
| 00:37 | sritchie | well, say I want to measure various latencies in the context of a particular ring requiest |
| 00:37 | sritchie | request* |
| 00:37 | bitemyapp | latencies of queries within the Ring request? |
| 00:37 | sritchie | yeah, I hit a GET endpoint, |
| 00:38 | sritchie | and want to time the database functions that occur during that GET request |
| 00:38 | bitemyapp | queries -> model-fns -> decorate model-fns with time-logging. You can log the time the Ring handler itself took too. |
| 00:38 | bitemyapp | ninjudd: <3 <3 <3 |
| 00:39 | sritchie | bitemyapp: 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:39 | bitemyapp | sritchie: don't make a dynamic var, I *BEG* of you. |
| 00:40 | bitemyapp | sritchie: just keep the request an argument to the dependent functions. |
| 00:40 | sritchie | I promise |
| 00:40 | bitemyapp | sritchie: 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:40 | bitemyapp | sritchie: now you can thread application state + arguments + fn calls based on timestamps + UUID |
| 00:41 | bitemyapp | now you see EVERYTHING |
| 00:41 | sritchie | :) |
| 00:41 | bitemyapp | I really like this stuff. |
| 00:41 | sritchie | yeah, then group by some UUID in Riemann |
| 00:41 | bitemyapp | I like how far Ring lets me take simple functions and closures. |
| 00:41 | bitemyapp | sritchie: yeppers! |
| 00:41 | sritchie | and report the percentages |
| 00:41 | sritchie | boom |
| 00:41 | sritchie | awesome |
| 00:41 | sritchie | okay, so here it is: |
| 00:41 | sritchie | Riemann for anything structured; just stats for now in startup mode, |
| 00:42 | sritchie | then down the road, have Riemann forward to elasticsearch |
| 00:42 | sritchie | timbre for text logging, and grep like a champion |
| 00:42 | sritchie | apply logging with robert-hooke, or dire, or whatever |
| 00:42 | bitemyapp | sounds good to me. |
| 00:42 | sritchie | I'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:42 | bitemyapp | decide on some fairly regular columnal formats with the textual logs and it should be pretty processable with cut or awk. |
| 00:43 | bitemyapp | sritchie: right. |
| 00:43 | bitemyapp | it's all just alter-var-root in the end. |
| 00:43 | bitemyapp | and a function closure. |
| 00:43 | sritchie | such is life |
| 00:43 | sritchie | yes |
| 00:43 | bitemyapp | which are fast in Clojure. |
| 00:43 | sritchie | objects are a poor-man's closures… closures are a poor-man's objects... |
| 00:43 | sritchie | ahhh |
| 00:43 | sritchie | so good |
| 00:43 | sritchie | there's so much amazing stuff to work on |
| 00:43 | bitemyapp | the pattern in my Clojure code seems to be that closures are function factories. |
| 00:44 | bitemyapp | which is the alternative to using stupid global singleton atoms for configuring function behavior. *mutter mutter* |
| 00:44 | bitemyapp | but really, the higher art form is what Stuart Sierra does. |
| 00:44 | bitemyapp | he has record-protocol factory thingies |
| 00:44 | bitemyapp | that lets him create whole-app-system instances. |
| 00:44 | bitemyapp | like ML functors. |
| 00:44 | bitemyapp | I...am not that ambitious. |
| 00:44 | sritchie | yeah, I've taken that advice |
| 00:44 | sritchie | for our small system |
| 00:45 | sritchie | the whole lifecycle idea is beautiful |
| 00:47 | bitemyapp | sritchie: ultimately the evolutionary shift is towards place-independent values. |
| 00:47 | bitemyapp | sritchie: that's the real sin of global singletons. the singleton place-ness. |
| 00:48 | bitemyapp | I 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:48 | sritchie | okay, gotta run |
| 00:48 | sritchie | great talk |
| 00:48 | sritchie | thanks for the advice |
| 00:48 | sritchie | feels good to understand the landscape a bit better. |
| 00:49 | bitemyapp | sross07: cheers. |
| 00:49 | bitemyapp | er |
| 00:49 | bitemyapp | he left :( |
| 01:28 | SegFaultAX | bitemyapp: Why not just emit structured log data? |
| 01:30 | bitemyapp | SegFaultAX: forall Startups : (laziness > *) |
| 01:30 | SegFaultAX | I sometimes wonder why more people don't just emit json or something similar from their loggers. |
| 01:30 | bitemyapp | well that was one of the suggestions |
| 01:30 | bitemyapp | I was just applying the razor of YAGNI to his problem |
| 01:31 | SegFaultAX | Sure, but encoding as json isn't that much more work over CLF |
| 01:32 | SegFaultAX | It has the added benefit of completely decoupling log producers from log consumers. |
| 02:06 | gdev | SegFaultAX, thats what I was trying to say 3 hours ago |
| 02:08 | SegFaultAX | gdev: Hmm? |
| 02:08 | SegFaultAX | Oh, on logging? |
| 02:08 | gdev | what you said 30 minutes ago was what I was getting at 2 hours ago |
| 02:09 | ddellacosta | whatever happened to futile or whatever his name is? |
| 02:10 | SegFaultAX | gdev: Yea. |
| 02:10 | SegFaultAX | gdev: I missed that part of the convo. |
| 02:10 | gdev | sometimes I feel like I'm the only one who saw Mark McGranaghan's talk |
| 02:11 | SegFaultAX | Which one? |
| 02:11 | gdev | SegFaultAX, yeah I was just pointing it out because I'm glad someone had the same idea |
| 02:11 | arrdem | gdev: which one? I'm curious now. |
| 02:11 | gdev | SegFaultAX, https://www.youtube.com/watch?v=rpmc-wHFUBs |
| 02:13 | SegFaultAX | gdev: Ah yes. |
| 02:17 | SegFaultAX | Does he still work at Heroku? |
| 02:18 | gdev | according to twitter he does |
| 02:24 | gdev | and according to github; that's two reliable sources |
| 02:31 | seriously_random | why is array named "vector" in this language? |
| 02:36 | bitemyapp | seriously_random: because it's not an array. |
| 02:36 | bitemyapp | seriously_random: arrays are a different thing. |
| 02:36 | bitemyapp | seriously_random: you're mistaking the appearance for the reality. |
| 02:37 | seriously_random | bitemyapp, but why name them vectors? |
| 02:38 | bitemyapp | because that's what they are |
| 02:38 | bitemyapp | arrays are something else. |
| 02:38 | bitemyapp | I don't know how to make this any more explicit. |
| 02:38 | bitemyapp | arrays and vectors both exist. vectors are not the same as arrays. |
| 02:38 | bitemyapp | seriously_random: vectors are not arrays. |
| 02:38 | bitemyapp | seriously_random: arrays are not vectors |
| 02:38 | bitemyapp | seriously_random: say it. Say it out loud. Scrawl it on your face with sharpie. |
| 02:39 | hyPiRion | I thought vectors were a subset of arrays |
| 02:40 | bitemyapp | hyPiRion: In what context? I'm talking about Clojure. |
| 02:40 | bitemyapp | arrays mean different things to different people in different contexts. In Clojure it's most likely a Java array. |
| 02:40 | hyPiRion | bitemyapp: general programming context |
| 02:41 | bitemyapp | I don't think `subset` has a well defined meaning here. |
| 02:41 | SegFaultAX | hyPiRion: Probably most people consider a vector to be a resizable array. |
| 02:41 | gdev | ,(class ["duck" "duck" "goose"]) |
| 02:41 | bitemyapp | which Clojure vectors aren't really. |
| 02:41 | clojurebot | clojure.lang.PersistentVector |
| 02:41 | SegFaultAX | Java's analog is an ArrayList |
| 02:41 | SegFaultAX | Or a std vector in C++ |
| 02:41 | hyPiRion | SegFaultAX: oooor Vector :D |
| 02:42 | hyPiRion | ,(import 'java.util.Vector) |
| 02:42 | clojurebot | java.util.Vector |
| 02:42 | bitemyapp | that's not a Clojure vector and you know it. |
| 02:42 | hyPiRion | ,(doto (Vector.) (.add 1)) |
| 02:42 | clojurebot | [1] |
| 02:43 | hyPiRion | sure, there's just a naming conflic |
| 02:43 | hyPiRion | *name conflict |
| 02:43 | SegFaultAX | I'm just saying from a general programming/CS perspective, that's probably a reasonable definition. |
| 02:43 | hyPiRion | yeah |
| 02:45 | bitemyapp | http://stackoverflow.com/questions/508374/what-are-vectors-and-how-are-they-used-in-programming |
| 02:45 | SegFaultAX | /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:45 | bitemyapp | looks like most people use the STL definition of what a vector is. |
| 02:45 | bitemyapp | SegFaultAX: I think the point is the mostly contiguous memory representation |
| 02:45 | bitemyapp | SegFaultAX: otherwise linked list / stitched linked lists would suffice. |
| 02:45 | SegFaultAX | Well then there you go. |
| 02:46 | bitemyapp | I have a hard time thinking of Clojure vectors as being identical to the STL definition, let alone arrays themselves. |
| 02:47 | SegFaultAX | Well they aren't classical vectors, so there's that. |
| 02:47 | bitemyapp | the reference values aren't contiguous in memory. |
| 02:47 | bitemyapp | that's the real point. |
| 02:47 | bitemyapp | to remove indirection so the cache can do its thing. |
| 02:47 | SegFaultAX | Well, they /may/ not be contiguous. |
| 02:47 | bitemyapp | how could you guarantee that? batching the creation of the vector? |
| 02:48 | bitemyapp | I think realistically the moment you cared about performance you'd use an array or matrix library. |
| 02:48 | SegFaultAX | Each node in the vector has 32 contiguous cells |
| 02:48 | bitemyapp | I know that, but I don't think that's good enough in the cases where you'd care about cache locality. |
| 02:49 | bitemyapp | in typical use-cases it's totally fine. |
| 02:50 | bitemyapp | too bad there aren't any value types in Java :( |
| 02:50 | bitemyapp | packing longs and structs into arrays would be fun. |
| 02:51 | noprompt | hey fellas, how's it going? :) |
| 02:51 | SegFaultAX | Java has primitive types. |
| 02:51 | SegFaultAX | noprompt: Howdy. |
| 02:51 | bitemyapp | noprompt: glad to see you again! |
| 02:51 | SegFaultAX | bitemyapp: int long bool float double etc. |
| 02:51 | bitemyapp | noprompt: hacked some Haskell with a buddy yesterday, going to do it again with a different person this Saturday. you're missing out. |
| 02:51 | noprompt | bitemyapp: was sick for the past few days. just checked out. :( |
| 02:52 | bitemyapp | SegFaultAX: yeah but the point is you can't have a primitive value struct. |
| 02:52 | SegFaultAX | That's different from what you said. |
| 02:52 | bitemyapp | SegFaultAX: so you have to do SOA instead of AOS, which is possibly annoying/bad depending on access patterns. |
| 02:52 | noprompt | bitemyapp: 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:52 | bitemyapp | SegFaultAX: you're right, you made it more precise/detailed. |
| 02:52 | noprompt | bitemyapp: :) |
| 02:52 | bitemyapp | noprompt: well you'd just seemed busy/harried/etc lately so I didn't want to pester. |
| 02:53 | noprompt | bitemyapp: nah. i can make the time. the problem i'm working on atm is not likely going to be solved soon. |
| 02:53 | bitemyapp | SegFaultAX: 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:53 | bitemyapp | data to your* |
| 02:53 | bitemyapp | whereas in C/C++ you'd just pack the structs directly into a single array |
| 02:53 | clojurebot | No entiendo |
| 02:53 | bitemyapp | clojurebot: shush, you weren't beckoned. |
| 02:53 | clojurebot | No entiendo |
| 02:53 | bitemyapp | ~botsmack |
| 02:53 | clojurebot | clojurebot evades successfully! |
| 02:54 | bitemyapp | noprompt: this is the sort of stuff I'm doing -- (BE.bShow $ BE.BList [(BE.BInt 10), (BE.BInt 20)]) "" |
| 02:54 | bitemyapp | BEncode for nrepl protocol (grom) |
| 02:54 | bitemyapp | I'm still considering rewriting Simonides. |
| 02:54 | noprompt | bitemyapp: that looks fun, i remember what $ does. |
| 02:55 | noprompt | bitemyapp: i don't know if that's necissary. but hay, it's your call. |
| 02:55 | bitemyapp | noprompt: the parens and invocation of the value bShow returns is because it's using the Data.Text difference list hack. |
| 02:55 | noprompt | bitemyapp: that's the type of stuff i don't miss about syntax. |
| 02:55 | SegFaultAX | #haskell is a thing :) |
| 02:55 | bitemyapp | noprompt: 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:55 | noprompt | bitemyapp: i had the syntax argument today and it's the last time i'm ever going to have it too. |
| 02:55 | bitemyapp | so 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:56 | noprompt | bitemyapp: have you looked at prismatic/schema? |
| 02:56 | bitemyapp | noprompt: *shrug* I'd prefer S-exprs but it's a small price to pay for TYYYYYYYYYYYYYYYYYYPES |
| 02:56 | SegFaultAX | noprompt: Syntax arguments suck. When I talk to my co-workers about Clojure it almost always devolves into "yea but lisp" |
| 02:56 | bitemyapp | tired of having to squeeze my brain juice for shit that doesn't matter. |
| 02:56 | SegFaultAX | Schema is pretty neat. |
| 02:56 | bitemyapp | SegFaultAX: haven't you heard comrade? everywhere is #haskell. |
| 02:57 | bitemyapp | la revolucion! |
| 02:57 | noprompt | SegFaultAX: yep. that's why i'm done. if it's not an algo variant they don't get it. |
| 02:57 | SegFaultAX | bitemyapp: Yea but srsly, just go to #haskell if you want to talk about Haskell. Lots of smart folks in there. |
| 02:57 | bitemyapp | I knows it, but we have lost souls that need the good word here. |
| 02:57 | bitemyapp | SegFaultAX: I talked to posco in #haskell the other day, SUPER COOL person. |
| 02:58 | noprompt | bitemyapp: did you watch that discussion about talks that dnolen tweeted about? |
| 02:58 | bitemyapp | I stopped following him on Twitter awhile back because SJW stuff leaked in. |
| 02:58 | bitemyapp | noprompt: link? |
| 02:59 | SegFaultAX | noprompt: 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:59 | SegFaultAX | SJW? |
| 02:59 | bitemyapp | SegFaultAX: dolan pls no |
| 02:59 | SegFaultAX | What? |
| 02:59 | bitemyapp | my coworker who has just begun learning Clojure said she liked the "tree-like" nature of S-exprs. |
| 02:59 | clojurebot | What is meta |
| 02:59 | bitemyapp | and how regular it is. |
| 03:00 | hyPiRion | SegFaultAX: social justice warrior, iirc |
| 03:00 | bitemyapp | this channel needs more dolan duck |
| 03:00 | bitemyapp | SegFaultAX: also I've asked noprompt to go into #haskell before and failed :P |
| 03:01 | bitemyapp | and he still isn't in that channel, so... |
| 03:01 | SegFaultAX | Probably that means he doesn't want to chat about Haskell. |
| 03:01 | bitemyapp | SegFaultAX: he just got done...are you for real man? |
| 03:02 | bitemyapp | I do not like going through Twitter scrollback of people I intentionally unfollowed to find one reference somebody made. |
| 03:03 | noprompt | bitemyapp: took me a minute. http://research.microsoft.com/apps/video/dl.aspx?id=150045 |
| 03:03 | noprompt | bitemyapp: it's a pretty long discussion. but eric meyer, if you're familiar with him, makes some interesting points about type systems. |
| 03:03 | bitemyapp | I still need to watch that. |
| 03:03 | noprompt | you can more or less listen to it. |
| 03:03 | bitemyapp | noprompt: Erik Meijer became kind of a crank in the last few years. |
| 03:04 | bitemyapp | just a fair warning |
| 03:04 | SegFaultAX | It'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:04 | SegFaultAX | Basically, he describes lisp. |
| 03:04 | SegFaultAX | Like, exactly lisp. |
| 03:05 | SegFaultAX | Well, a typed lisp. But still. |
| 03:05 | bitemyapp | Scala was dragged kicking and screaming into macros. |
| 03:05 | noprompt | SegFaultAX: 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:05 | bitemyapp | Haskell was dragged not because they didn't know, but because they wanted a safe and principled approach to structural transformation |
| 03:06 | bitemyapp | then TH happened |
| 03:06 | bitemyapp | and there was much gnashing of teeth |
| 03:06 | SegFaultAX | If you have time, check it out: https://www.youtube.com/watch?v=TS1lpKBMkgg |
| 03:06 | SegFaultAX | It's a really fascinating talk, and Paul is a really excellent speaker (quirky, but excellent). |
| 03:06 | bitemyapp | I've seen it. |
| 03:07 | noprompt | i need to take a look at this again http://shenlanguage.org/ |
| 03:07 | bitemyapp | noprompt: no you don't. |
| 03:07 | noprompt | bitemyapp: why? |
| 03:07 | bitemyapp | noprompt: the type system isn't interesting enough to merit the amount of CRAZY |
| 03:07 | bitemyapp | noprompt: if you really want to go weird, learn Idris. |
| 03:08 | SegFaultAX | noprompt: Shen is pretty fascinating. |
| 03:08 | hyPiRion | Agda ploz |
| 03:08 | SegFaultAX | At least what little I know about it. |
| 03:08 | bitemyapp | hyPiRion: Idris is what the Agda kids moved to. |
| 03:08 | noprompt | lol |
| 03:08 | bitemyapp | Shen is fascinating like platypus is fascinating. |
| 03:09 | bitemyapp | It's not particularly lethal or effective, but holy hell is it goofy as shit. |
| 03:09 | arrdem | SegFaultAX: I'd agree with bitemyapp here... there's not a whole lot that's interesting about Shen besides the implementation. |
| 03:09 | noprompt | ah the staircase of type madness. |
| 03:09 | bitemyapp | type le escalier |
| 03:09 | noprompt | (you have balls) haskell -> agda -> idris (you have metal balls) |
| 03:09 | bitemyapp | you can skip from Haskell to idris. |
| 03:09 | jack_rabbit | looks like I need to learn agda and idris. |
| 03:09 | noprompt | am i getting this right? |
| 03:10 | bitemyapp | Haskell -> Idris |
| 03:10 | bitemyapp | you'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:10 | bitemyapp | the future is here...but unevenly distributed. |
| 03:10 | jack_rabbit | :( |
| 03:11 | hyPiRion | where does Coq fit into this crazy type system model? |
| 03:11 | ered | i haven't gotten too much into hardcore type stuff yet |
| 03:11 | ered | the most i've used so far is like, schema |
| 03:11 | SegFaultAX | ered: You haven't even scratched the surface. :D |
| 03:11 | bitemyapp | hyPiRion: Coq is a degenerate Agda or Idris. |
| 03:12 | hyPiRion | I thought it was beyond Idris in terms of power, like universe constraints and the like |
| 03:12 | ered | SegFaultAX: yeah probably not, but hey even schema is helpful |
| 03:12 | bitemyapp | Coq has more labor poured into it, but I think it's easier to write proofs and get useful feedback in Agda. |
| 03:12 | ered | it at least got me out of the "why the fuck is there a ClassCastException here? what's returning the wrong thing?" |
| 03:12 | SegFaultAX | ered: That's not a negative. But type theory is a whole new world. |
| 03:12 | bitemyapp | Coq is kind of inane in comparison. |
| 03:13 | bitemyapp | Coq is the most industrialized for hardening an OCaml codebase, but I'd rather use something in Haskell. |
| 03:14 | noprompt | i'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:14 | bitemyapp | noprompt: I'm not sure. client-side JS at least can't shell out directly. |
| 03:14 | bitemyapp | I've seen people do some insane stuff in PHP. |
| 03:15 | SegFaultAX | noprompt: Yeeeeaa, no. PHP wins 10 times out of 10. |
| 03:15 | jack_rabbit | PHP makes me want to kill myself just thinking about it. |
| 03:15 | hyPiRion | PHP is okay, because I don't have to use it in my browser. |
| 03:15 | SegFaultAX | jack_rabbit: Whoa, calm down bro. It's just a programming language. |
| 03:15 | bitemyapp | hyPiRion: coalgebraic codata in Agda are less punishing than Coinductive streams in Coq. |
| 03:15 | noprompt | hyPiRion: and that's rub. |
| 03:15 | jack_rabbit | SegFaultAX, I'm... I'm so sorry. |
| 03:16 | noprompt | the fact that it's everywhere amplifies the horror. |
| 03:16 | bitemyapp | noprompt: just pretend it's a form of assembler. |
| 03:16 | bitemyapp | noprompt: a compiler target. then move on with life. |
| 03:16 | bitemyapp | CLJS/Fay -> JS and go home happy. |
| 03:16 | jack_rabbit | I 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:16 | SegFaultAX | Ugh, that "bytecode of the internet" argument really bugs me. |
| 03:16 | arrdem | SegFaultAX: THANK you |
| 03:17 | noprompt | bitemyapp: i will agree this is the only good thing about having it run everywhere. |
| 03:17 | bitemyapp | I 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:17 | bitemyapp | I don't think JS is the bytecode of the internet, I just know how to avoid having to write it manually. |
| 03:17 | bitemyapp | jack_rabbit: I've learned to stop accepting freelance work involving PHP or XML. |
| 03:18 | jack_rabbit | I wouldn't have if I knew it was PHP up front. |
| 03:18 | bitemyapp | you accept contracts without investigating the tech involved? |
| 03:18 | bitemyapp | yeesh man. |
| 03:18 | jack_rabbit | It was a friend running a small bike shop business. |
| 03:18 | jack_rabbit | No contract. |
| 03:18 | SegFaultAX | We all make mistakes when we're young. |
| 03:19 | noprompt | jack_rabbit: you should have told him about idris. lol. |
| 03:19 | bitemyapp | LOL |
| 03:19 | jack_rabbit | XD |
| 03:19 | bitemyapp | (Idris is actually kinda new'ish though) |
| 03:19 | bitemyapp | just uh, fyi. |
| 03:19 | bitemyapp | Agda is the oldie. Coq is the ugly hag. |
| 03:19 | SegFaultAX | "I can only verify that your website is correct, not that it works." |
| 03:19 | noprompt | bitemyapp: hey what about the clean language? |
| 03:19 | jack_rabbit | I was trying to convince him about C# or Java at least, and I'm not a big fan of those either. |
| 03:19 | bitemyapp | noprompt: no reason to use over Haskell. |
| 03:20 | SegFaultAX | C# is actually a pretty decent language. |
| 03:20 | SegFaultAX | I just wish the VM wasn't coupled to MS. |
| 03:20 | bitemyapp | http://homotopytypetheory.org/2012/01/19/inductive-types-in-hott/ |
| 03:21 | SegFaultAX | I got to paragraph 3 then gave up. |
| 03:21 | noprompt | when 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:21 | SegFaultAX | I don't have the brainpower or background to parse that content. |
| 03:22 | bitemyapp | SegFaultAX: get the HOTT book! |
| 03:22 | SegFaultAX | bitemyapp: No application for it. |
| 03:22 | bitemyapp | application is for poor people. |
| 03:22 | noprompt | HA! |
| 03:22 | bitemyapp | Don't be a pleb, learn for fun. |
| 03:23 | noprompt | bitemyapp: that's usually the intent! haha! |
| 03:23 | SegFaultAX | I 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:23 | bitemyapp | SegFaultAX: http://ncatlab.org/nlab/show/homotopy+type+theory |
| 03:24 | bitemyapp | SegFaultAX: http://ncatlab.org/nlab/show/W-type |
| 03:24 | bitemyapp | arrdem: ? |
| 03:24 | SegFaultAX | I'll stick to stuff I care about. |
| 03:24 | noprompt | oh the irony of that sentence. |
| 03:24 | bitemyapp | In 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:25 | noprompt | bitemyapp: bro. |
| 03:25 | bitemyapp | just clarifying homotopy theory and W-types separately. |
| 03:25 | bitemyapp | noprompt: hack hack hack |
| 03:25 | bitemyapp | somebody get an oxygen mask for this dude. |
| 03:25 | SegFaultAX | bitemyapp: Mmm, yes. Indubitably my good man. |
| 03:25 | arrdem | noprompt: hang in there buddy |
| 03:26 | bitemyapp | okay okay, it's like Inception. We need to go deeper! |
| 03:26 | bitemyapp | Higher 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:26 | arrdem | bitemyapp: gooby plz no wai |
| 03:26 | bitemyapp | for which - Category theory is a toolset for describing the general abstract structures in mathematics. |
| 03:27 | SegFaultAX | Actually the last 2 quotes make perfect sense. |
| 03:27 | noprompt | posts 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:27 | bitemyapp | For which, k-morphisms are: In an n-category, or most generally an ∞-category, there are many levels of morphism, parametrised by natural numbers. |
| 03:27 | SegFaultAX | noprompt: I'd be surprised if the number is that big. |
| 03:27 | noprompt | bitemyapp: i <3 your enthusiasm man. :) it's awesome. |
| 03:28 | SegFaultAX | bitemyapp: No more copy pasta please. |
| 03:28 | bitemyapp | noprompt: listening to Dr. Dre while doing this, if that does anything for you. |
| 03:28 | bitemyapp | SegFaultAX: fine fine. |
| 03:28 | SegFaultAX | <3 |
| 03:28 | noprompt | bitemyapp: 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:29 | SegFaultAX | Oh oh, it's time for my favorite gangsta rap. |
| 03:29 | bitemyapp | noprompt: I think if you liked abstract algebra you're really going to enjoy Haskell. |
| 03:29 | noprompt | bitemyapp: i did enjoy haskell. |
| 03:29 | bitemyapp | noprompt: you've read this right? http://www.haskell.org/haskellwiki/Typeclassopedia |
| 03:29 | SegFaultAX | It's literally one of the most depressing songs I've ever heard. |
| 03:30 | noprompt | bitemyapp: i've programmed with it for ~6 months on/off during my free time. |
| 03:30 | bitemyapp | noprompt: typeclassopedia is programming+algebra porn. |
| 03:30 | bitemyapp | hrm. I can craft a tweet from this. |
| 03:31 | bitemyapp | noprompt: @gvanrossum Turning into your 12 y/o? No wonder you write Python for a living. |
| 03:32 | bitemyapp | that was sort of a burn on my coworkers and myself too though. |
| 03:33 | noprompt | bitemyapp: you said that to him?! |
| 03:33 | bitemyapp | noprompt: yeah. twattled. |
| 03:33 | bitemyapp | I troll him like every week. |
| 03:33 | bitemyapp | not that he notices or anything, but it amuses me to mock other peoples' gods. |
| 03:34 | SegFaultAX | bitemyapp: Ew, I hate the tweet right before that. |
| 03:34 | bitemyapp | SegFaultAX: mine or his? |
| 03:34 | SegFaultAX | lrn2prefixnotation n00b. amiritegaiz? |
| 03:34 | SegFaultAX | Yours. |
| 03:34 | arrdem | clojurebot: bitemyapp |is| it amuses me to mock other peoples' gods |
| 03:34 | clojurebot | You don't have to tell me twice. |
| 03:34 | noprompt | bitemyapp: dude that's the best thing ever. |
| 03:35 | SegFaultAX | arrdem: Some men just want to watch the world burn. |
| 03:35 | noprompt | bitemyapp: i'm tired of arguing python guys about how shitty python is. |
| 03:35 | bitemyapp | noprompt: I'm tired of writing bad Python code to prove my point. |
| 03:35 | bitemyapp | noprompt: did I tell you about my "implicit parameters" hack in python? |
| 03:35 | bitemyapp | it was GREAT |
| 03:35 | arrdem | SegFaultAX: 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:35 | bitemyapp | I was pairing when I wrote it, my pair partner nearly lost his mind. |
| 03:35 | noprompt | do tell. |
| 03:35 | arrdem | bitemyapp: oh please no not the decorators |
| 03:36 | bitemyapp | arrdem: oh it's better than that. |
| 03:36 | bitemyapp | noprompt: needed to eliminate dangerous threadlocal. |
| 03:36 | SegFaultAX | arrdem: decorators are awesome! |
| 03:36 | arrdem | all hands brace for impact... |
| 03:36 | arrdem | SegFaultAX: I've seen them legitimately used. rarely. |
| 03:36 | bitemyapp | noprompt: 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:36 | SegFaultAX | arrdem: They're just normal HOFs with special syntax, what's the big deal? |
| 03:37 | bitemyapp | noprompt: 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:37 | bitemyapp | arrdem: ^^ you should enjoy this. |
| 03:37 | arrdem | bitemyapp: I read it. |
| 03:37 | bitemyapp | plus side? tests pass now. |
| 03:37 | SegFaultAX | bitemyapp: gist it, yo. I wanna see. |
| 03:37 | noprompt | yes plz. |
| 03:37 | bitemyapp | hrm...okay. |
| 03:37 | noprompt | plz gist. |
| 03:38 | noprompt | SegFaultAX: oh yeah, so one of the guys i work with wants the sort of "real" meta programming lisp affords w/o the lisp. |
| 03:38 | arrdem | man if #clojure does this regularly I may have to change my sleep schedule to make it to this... |
| 03:38 | noprompt | SegFaultAX: it's like wat. :| |
| 03:39 | SegFaultAX | noprompt: Hmm? |
| 03:39 | bitemyapp | https://gist.github.com/bitemyapp/7887449 |
| 03:39 | bitemyapp | LOOK ON YE WORKS AND DESPAIR |
| 03:39 | bitemyapp | I was cackling so hard when I wrote that. |
| 03:39 | arrdem | bitemyapp: that's actually pretty baller. |
| 03:40 | SegFaultAX | That's not that bad. |
| 03:40 | bitemyapp | "not that bad" this is how I know Python and Ruby coders aren't to be trusted. |
| 03:40 | noprompt | arrdem: oh yeah, at this hour it get's pretty funny. |
| 03:40 | SegFaultAX | I mean in terms of complexity. |
| 03:40 | bitemyapp | hum. it's easy to understand in isolation. |
| 03:40 | bitemyapp | but it's horribly dangerous. |
| 03:40 | arrdem | noprompt: I was wondering why without fail I've gotten a doge from bitemyapp at about 3am local |
| 03:40 | bitemyapp | if anybody other than the web stack makes a request.user, we're going to pass the wrong data. |
| 03:41 | bitemyapp | noprompt: he gets pinged by his phone, so I make certain a shibe keeps him warm in bed. |
| 03:41 | noprompt | bitemyapp: so lol. |
| 03:41 | SegFaultAX | Let's be honest, the bigger problem here is the mixing of " and ' |
| 03:41 | bitemyapp | SegFaultAX: nuh-uh, has a specific meaning in Python. |
| 03:41 | bitemyapp | SegFaultAX: "" is values, '' is keys. |
| 03:41 | bitemyapp | nice try! |
| 03:41 | arrdem | SegFaultAX: http://img.pandawhale.com/54546-Cheers-Toast-gif-OLQT.gif |
| 03:42 | SegFaultAX | arrdem: There is no special meaning. |
| 03:42 | SegFaultAX | And either way, request is a key in this context |
| 03:42 | bitemyapp | oh my god how is this JIRA thread about deploying a server 20 comments long? |
| 03:42 | SegFaultAX | So it should be '' in both places. |
| 03:42 | noprompt | SegFaultAX: 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:42 | bitemyapp | SegFaultAX: it doesn't look key'ish enough. |
| 03:42 | bitemyapp | noprompt: you forgot Python docstrings |
| 03:42 | bitemyapp | noprompt: ", ', and """ |
| 03:42 | bitemyapp | noprompt: and Ruby HEREDOCS |
| 03:42 | SegFaultAX | But in ruby ' and " are actually different. |
| 03:42 | noprompt | bitemyapp: oh yeah, fuck those too. |
| 03:43 | arrdem | the """ thing is actually kinda nice... |
| 03:43 | bitemyapp | I actually kinda want docstrings :( |
| 03:43 | bitemyapp | lets me elide escaping inner strings. |
| 03:43 | bitemyapp | I hate typing string values in docstrings in Clojure, I need muh """ |
| 03:43 | SegFaultAX | Triple quotes and heredocs are great. |
| 03:43 | noprompt | SegFaultAX: yes and the difference is fucking retarded. |
| 03:43 | SegFaultAX | noprompt: Not really. |
| 03:43 | lumafi | bitemyapp, and don't forget that you can use both ''' and """, and for any string (not just for docstring) |
| 03:43 | bitemyapp | oh cool, my coworker understands the hare-brained way I deploy shit. |
| 03:43 | bitemyapp | I don't even have to explain anything. |
| 03:43 | SegFaultAX | noprompt: Disallowing interpolation is useful. |
| 03:43 | bitemyapp | lumafi: yeah they're all just values. I forgot you can use ''' though. |
| 03:44 | noprompt | SegFaultAX: fuck that. |
| 03:44 | noprompt | it's a waste. |
| 03:44 | SegFaultAX | noprompt: I hope you don't use basically any shell ever, then. |
| 03:44 | noprompt | it adds more decisions, more cognitive overhead, and more places to just flat out fuck up. |
| 03:44 | arrdem | I mean... in fairness I think that scala and the lisp family are the only languages with a 'real" use for ' |
| 03:45 | bitemyapp | arrdem: did you do that on purpose? |
| 03:45 | bitemyapp | arrdem: are you trying to make us go mad? |
| 03:45 | bitemyapp | 'real" <--- really dude? |
| 03:45 | noprompt | SegFaultAX: i'd like to preface all of this by saying i'm fucking idiot. |
| 03:45 | arrdem | bitemyapp: it was a typo originally and I left it to chip away at your sanity |
| 03:45 | bitemyapp | we're bikeshedding, it's dangerous to say things like that. |
| 03:45 | bitemyapp | arrdem: THIS IS BAT COUNTRY, WE CAN'T STOP HERE |
| 03:45 | SegFaultAX | bitemyapp: For that, I want to buy you this http://cdn-www.i-am-bored.com/media/monk-dvd-OCD.jpg |
| 03:45 | SegFaultAX | noprompt: Why? |
| 03:46 | bitemyapp | just a reminder that: https://github.com/ninjudd/ring-async exists and is freakin' awesome. |
| 03:46 | progo | SegFaultAX: that must be intentional :F |
| 03:46 | SegFaultAX | Good box set or best box set? |
| 03:46 | SegFaultAX | progo: You bet your ass it is. It's a show about an /extreme/ OCD guy. |
| 03:46 | noprompt | SegFaultAX: s/'m fucking idiot/ don't know anything/ |
| 03:47 | progo | SegFaultAX: I know :> |
| 03:47 | SegFaultAX | noprompt: Meh, we still love you. :D |
| 03:47 | SegFaultAX | Also, 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:48 | noprompt | SegFaultAX: 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:48 | arrdem | SegFaultAX: thank you for sharing the wat |
| 03:48 | SegFaultAX | arrdem: Haha, my pleasure. |
| 03:48 | SegFaultAX | I can't stop watching it. |
| 03:49 | SegFaultAX | That's going to be the gif on my next PR. |
| 03:49 | bitemyapp | "Signs you work at a startup" |
| 03:49 | bitemyapp | "you speak in gifs to coworkers they themselves made" |
| 03:50 | bitemyapp | SegFaultAX: you win dude. You work at the hipster-er company. |
| 03:50 | arrdem | it'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:50 | bitemyapp | I can't match firepower of that magnitude! |
| 03:50 | SegFaultAX | bitemyapp: I mean in fairness, we did do no less than 2 engagements with pivotal. |
| 03:50 | bitemyapp | hrm. might be time for my yearly star wars marathon. |
| 03:50 | bitemyapp | SOON |
| 03:50 | arrdem | SegFaultAX: AAAH. FEWER NOT LESS. |
| 03:50 | bitemyapp | SegFaultAX: countable things are fewer. |
| 03:51 | SegFaultAX | Your mom is fewer. |
| 03:51 | bitemyapp | feuer frei |
| 03:51 | noprompt | lol wat. |
| 03:51 | SegFaultAX | arrdem: 15 ITEMS OR LESS!!!! Where's your god now? |
| 03:52 | arrdem | SegFaultAX: http://i3.kym-cdn.com/photos/images/newsfeed/000/520/073/eb9.jpg |
| 03:52 | jack_rabbit | Yes, lets all take our lanugage use from WalMart. |
| 03:52 | arrdem | (inc jack_rabbit) |
| 03:52 | lazybot | ⇒ 3 |
| 03:52 | SegFaultAX | arrdem: Haha, oh shit. I actually laughed out on that one. |
| 03:52 | SegFaultAX | (inc arrdem( |
| 03:52 | SegFaultAX | (inc arrdem) |
| 03:52 | lazybot | ⇒ 9 |
| 03:52 | noprompt | arrdem: HAHA! |
| 03:52 | noprompt | gawd. grammar. |
| 03:52 | noprompt | eh. |
| 03:52 | bitemyapp | arrdem: HAHAHAHAHAHA |
| 03:52 | bitemyapp | (inc arrdem) |
| 03:52 | lazybot | ⇒ 10 |
| 03:53 | noprompt | (inc arrdem) |
| 03:53 | lazybot | ⇒ 11 |
| 03:53 | bitemyapp | (inc jack_rabbit) |
| 03:53 | lazybot | ⇒ 4 |
| 03:53 | SegFaultAX | arrdem: Reminds me of this http://www.reactiongifs.us/wp-content/uploads/2013/06/play_times_over_kangaroo.gif |
| 03:53 | arrdem | http://i.minus.com/iVtsYj3BSskw7.gif |
| 03:54 | noprompt | heheh |
| 03:54 | bitemyapp | ucb: hi! |
| 03:54 | arrdem | SegFaultAX: haha yes love that one |
| 03:54 | ucb | hey bitemyapp, SegFaultAX, arrdem |
| 03:54 | bitemyapp | ucb: you caught me on one of my insomnia stretches. how goes it? |
| 03:54 | ucb | bitemyapp: pretty good actually |
| 03:54 | ucb | bitemyapp: last night we cracked a thing that made performance of riemann (and graphite) crap |
| 03:55 | jack_rabbit | sweet. |
| 03:55 | bitemyapp | ucb: sweet, what was it? |
| 03:55 | ucb | bitemyapp: turns out that, amongst other things, forking off external processes, /very/ frequently and at high speed is not a great thing to do :/ |
| 03:55 | arrdem | noprompt: now now.. dunno who's mixed what in there. don't drink and (apply), you should know this |
| 03:55 | bitemyapp | ucb: :| |
| 03:55 | ucb | bitemyapp: who would've guessed. |
| 03:55 | bitemyapp | ucb: hey, you should let Python users know that. They don't seem to be aware. |
| 03:55 | ucb | heh |
| 03:55 | bitemyapp | ba dum tish. |
| 03:56 | noprompt | bitemyapp: nice. |
| 03:56 | SegFaultAX | bitemyapp: But but, multiprocessing man. Multiprocessing! |
| 03:56 | noprompt | bitemyapp: that's their answer to multithreading. |
| 03:56 | arrdem | 'night guys. I have a haskell to skin in the morning. |
| 03:56 | ucb | night arrdem! |
| 03:57 | bitemyapp | noprompt: 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:57 | arrdem | wat |
| 03:57 | bitemyapp | arrdem: g'night! |
| 03:57 | noprompt | too many lols for one hour. |
| 03:57 | bitemyapp | I'm srs :| |
| 03:57 | bitemyapp | people suggesting multiprocessing == "did you just tell me to go fuck myself?", "I believe I did Bob." |
| 03:58 | noprompt | fn.bind(this) :( |
| 03:58 | arrdem | (call/cc ... ) |
| 03:59 | SegFaultAX | arrdem: Nighty night. |
| 03:59 | noprompt | poorly named functions and vars are such a source of confusion. |
| 03:59 | bitemyapp | I was explaining namespaces, vars, and interning today. |
| 03:59 | SegFaultAX | Said no one ever. Pff. |
| 04:00 | bitemyapp | I think they understood it at the end. |
| 04:00 | noprompt | a good way to name a function is to write documentation about what it does. |
| 04:00 | SegFaultAX | I name all my functions with 1 to 2 letters. Shorter is always better. |
| 04:00 | bitemyapp | SegFaultAX: so you write like the guy that made J. |
| 04:01 | SegFaultAX | noprompt: Documentation tends to interfere with "shorter is always better" |
| 04:01 | noprompt | haha. yes. |
| 04:01 | SegFaultAX | bitemyapp: Yes, I often invent new symbols for my functions to really ramp up the concision. |
| 04:01 | bitemyapp | SegFaultAX: unicode function names or GTFO. |
| 04:02 | smiler | APL->clojure |
| 04:02 | smiler | Or perhaps vice versa |
| 04:02 | bitemyapp | smiler: APL is a comonad. |
| 04:02 | SegFaultAX | I like to utilize all the unicode space characters (other than 32) to really keep people on their toes. |
| 04:02 | igstan | does 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:03 | bitemyapp | SegFaultAX: brilliant. |
| 04:03 | noprompt | igstan: why not just patch the one you have? |
| 04:03 | bitemyapp | SegFaultAX: make it subtle, use a unicode dash so that my-var doesn't mean what they think it means. |
| 04:03 | bitemyapp | I should make a utility to replace unicode symbols with their ASCII equivalents (not punycode, just direct equivs) and vice versa. |
| 04:03 | igstan | noprompt: laziness |
| 04:04 | bitemyapp | igstan: noprompt has actually made tooling for making syntax definitions |
| 04:04 | noprompt | igstan: i have? |
| 04:04 | bitemyapp | noprompt: indirectly, wasn't Frak used for vim-clojure? |
| 04:04 | SegFaultAX | I 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:05 | bitemyapp | SegFaultAX: so clever much hipster very unicode |
| 04:05 | SegFaultAX | wow |
| 04:05 | noprompt | bitemyapp: oh right, but that's primarily for the regular expression character classes. |
| 04:05 | bitemyapp | noprompt: but you get my meaning. That still helps a lot. |
| 04:05 | noprompt | bitemyapp: however, you are correct that it could be used for this very problem. |
| 04:05 | bitemyapp | could reuse the regexes at a minimum. |
| 04:05 | SegFaultAX | igstan: Can you just make any pattern matching def* use the same rules as def/defn? |
| 04:06 | noprompt | bitemyapp: the funnies part about frak is that beyond the case i designed it for i've never really had much use for it. |
| 04:06 | bitemyapp | igstan: make certain you use the Clojure symbol regex. |
| 04:06 | igstan | SegFaultAX: I guess I can… I'm just not in the mood for yak shaving. |
| 04:06 | bitemyapp | noprompt: ah the best tools are like that. |
| 04:06 | bitemyapp | igstan: what you are complaining about is the apotheosis of yak shaving :P |
| 04:06 | noprompt | bitemyapp: apparently some people have found it super useful. |
| 04:06 | SegFaultAX | igstan: So you /want/ their hair to get all overgrown and tangled? You monster. |
| 04:06 | bitemyapp | not that I'm hating on you, just saying. |
| 04:06 | noprompt | igstan: just shave that yak. |
| 04:06 | bitemyapp | noprompt: well, there aren't that many nice tools for generating regex. |
| 04:06 | SegFaultAX | Shave it real slow like. |
| 04:07 | igstan | haha |
| 04:07 | bitemyapp | noprompt: there's FSA, Frak, and...? |
| 04:07 | noprompt | bitemyapp: FSA? |
| 04:07 | igstan | I was supposed to learn some core.logic, not fiddle with regexes :( |
| 04:07 | bitemyapp | noprompt: finite state automata generators |
| 04:08 | noprompt | igstan: that's yak shaving yo. just deal w/ it. |
| 04:08 | SegFaultAX | igstan: Why not both!? |
| 04:08 | noprompt | lol |
| 04:09 | noprompt | igstan: you can use frak to help you with your problem. (frak/string-pattern ["defrecord" "defprotocol" ...]) |
| 04:09 | ucb | I had completely forgotten about frak |
| 04:10 | igstan | noprompt: I've used some duct tape, as per SegFaultAX suggestion. This will do it for the time being: def[^\s]+ |
| 04:11 | noprompt | igstan: honestly that's probably the best route. |
| 04:12 | noprompt | god. i hate applications. i like text. what can i say? |
| 04:12 | bitemyapp | I mentioned off-handedly at a lunch with my coworkers that I wasn't the CS type |
| 04:12 | bitemyapp | they were aghast. |
| 04:13 | noprompt | oh no! not another one! |
| 04:13 | ucb | heh |
| 04:13 | bitemyapp | noprompt: well, they disagreed with me. |
| 04:13 | bitemyapp | noprompt: and said that I was one of the most rigorous programmers there. Then I remembered I work at a Python shop. |
| 04:13 | bitemyapp | jk jk jk I love my coworkers. <3 |
| 04:14 | ddellacosta | oh snap |
| 04:14 | SegFaultAX | bitemyapp: Sick burn |
| 04:14 | noprompt | "sick burn" lol |
| 04:15 | bitemyapp | ddellacosta: 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:15 | bitemyapp | ddellacosta: then there's me simultaneously spreading Clojure, Datomic, and Haskell at my company all at once. |
| 04:15 | bitemyapp | ddellacosta: how are you by the way? long time no see. |
| 04:15 | ddellacosta | bitemyapp: sounds like an interesting group. :-) |
| 04:15 | bitemyapp | well the Scala users spend most of their time moping about how they can't use Scala. |
| 04:15 | ddellacosta | bitemyapp: I'm okay. Kinda burnt out at the time being, been pushing hard lately |
| 04:15 | bitemyapp | I spread the languages I like >:) |
| 04:16 | bitemyapp | ddellacosta: aww. burnout is no good. Can you take a mental health day/week? |
| 04:16 | bitemyapp | long weekend? |
| 04:16 | jack_rabbit | like a virus... |
| 04:16 | ddellacosta | bitemyapp: btw, I have an blog post I'd love for you to read if you wouldn't mind taking a gander |
| 04:16 | bitemyapp | ddellacosta: I'd be honored! |
| 04:16 | bitemyapp | jack_rabbit: not far from the truth. |
| 04:16 | ddellacosta | bitemyapp: yeah, I will soon, we are just trying hard to get into the next phase |
| 04:17 | ddellacosta | bitemyapp: http://davedellacosta.com/cljs-dom-survey |
| 04:17 | bitemyapp | the 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:17 | noprompt | at least you're not spreading more python. god. that'd be, like, spreading gonorrhea. |
| 04:17 | ddellacosta | thanks! |
| 04:17 | ddellacosta | bitemyapp: article I mentioned I would write on IRC, oh a month ago. "I'll do it this week!" haha...*sigh* |
| 04:18 | noprompt | ddellacosta: ah, souce-code pro, no, no, no, bro! |
| 04:18 | ddellacosta | noprompt: ? |
| 04:18 | bitemyapp | ddellacosta: no no, do not punish self for creating things. Reward yourself for having put something out there! |
| 04:18 | bitemyapp | ddellacosta: get milk tea! a snack! |
| 04:18 | noprompt | ddellacosta: oh down vote, down vote. :P |
| 04:18 | ddellacosta | noprompt: I don't understand, what? |
| 04:18 | noprompt | ddellacosta: pick a readable monospaced font. |
| 04:19 | bitemyapp | I'm not fond of that font either, looking at it on a Mac in Safari right now. |
| 04:19 | ddellacosta | bitemyapp, noprompt: so, you don't like the font I used for code examples? Okay, noted. I was on the fence about that too. |
| 04:19 | ddellacosta | maybe should just use whatever the default is |
| 04:19 | noprompt | ddellacosta: go for something like oxygen or liberation mono if you're gonna use an open source monospaced font. |
| 04:19 | noprompt | ddellacosta: those are pretty readable. |
| 04:19 | bitemyapp | ddellacosta: in Linux, Monospace is good. For Mac clients, Menlo. For windows, there's one that starts with a C. |
| 04:19 | ddellacosta | noprompt, bitemyapp: cool, thanks for the tips |
| 04:20 | TEttinger | calibri? |
| 04:20 | ddellacosta | will swap it out |
| 04:20 | TEttinger | consolas? |
| 04:20 | bitemyapp | TEttinger: think so? |
| 04:20 | bitemyapp | either/or? |
| 04:20 | noprompt | TEttinger: HA! |
| 04:20 | bitemyapp | I'm not very opinionated. |
| 04:20 | ddellacosta | is it impossible to read without that? I'm really concerned with the content |
| 04:20 | bitemyapp | also, everybody get the paddles out, time to spank the windows user. |
| 04:20 | bitemyapp | ddellacosta: I'm focused on the content, again, was just pitching in. |
| 04:20 | noprompt | ddellacosta: i'm obsessed with monospaced fonts. i have a FAT collection. |
| 04:21 | TEttinger | noprompt, I will one-up that. I've made a small collection of them. |
| 04:21 | ddellacosta | bitemyapp: oh, definitely, sincerely asking though. If it is too painful to read the code examples then I'll swap it out now |
| 04:21 | ddellacosta | I'm so close to it I think it's easy for me to miss that kind of stuff |
| 04:21 | bitemyapp | ddellacosta: I can manage, but the collection literals such as ( and [ are a little hard to see. |
| 04:21 | bitemyapp | it's indented nicely anyway. |
| 04:21 | ddellacosta | bitemyapp: okay. Definitely will swap that out ASAP. |
| 04:22 | bitemyapp | ddellacosta: noprompt has done some work with two-way binding and core.async in the browser recently. |
| 04:22 | TEttinger | noprompt, I don't think I tagged them all right, but http://fontstruct.com/fontstructors/elementalist/fontstructions/tags/Mono |
| 04:22 | bitemyapp | ddellacosta: he was working on it to get away from AngularJS, incidentally. |
| 04:22 | bitemyapp | ddellacosta: you should check his github. |
| 04:22 | bitemyapp | noprompt: have you been pushing? |
| 04:22 | ddellacosta | bitemyapp: yeah, actually I've been doing a ton of messaging + core.async + reactive kind of stuff on the client w/CLJS lately |
| 04:22 | bitemyapp | ddellacosta: there's an easy to use fallback to addEventListener that adds IE8 support if you want it. |
| 04:23 | bitemyapp | I think I use it in Simonides. |
| 04:23 | noprompt | bitemyapp: 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:23 | bitemyapp | noprompt: repository ~= model? |
| 04:24 | bitemyapp | noprompt: ins + outs? |
| 04:24 | ddellacosta | bitemyapp: 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:24 | bitemyapp | sure. |
| 04:24 | noprompt | bitemyapp: 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:24 | ddellacosta | noprompt: 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:24 | noprompt | ddellacosta, bitemyapp i do have the work i did on beltway still and would defintely be open to sharing what i have. |
| 04:24 | ddellacosta | it is just so much cleaner |
| 04:25 | ddellacosta | noprompt: yeah, I want to write something up so I'd love to see it |
| 04:25 | bitemyapp | noprompt: well. It's not like I'd mind getting away from AngularJS. |
| 04:25 | ddellacosta | bitemyapp, 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:25 | bitemyapp | ddellacosta: I was looking at ninjudd's work with Ring async (core.async) recently |
| 04:26 | bitemyapp | pretty nifty. |
| 04:26 | ddellacosta | bitemyapp: cool, I'll have to check it out. |
| 04:27 | bitemyapp | ddellacosta: that was a fantastic article with thorough and well-done comparisons. Might I suggest that you be a bit more opinionated though? |
| 04:27 | noprompt | ddellacosta: 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:27 | bitemyapp | ddellacosta: most people that read your article might be looking for a, "yeah, but what am I supposed to use?" - consider serving that need. |
| 04:27 | ddellacosta | bitemyapp: thanks! opinionated: howso? |
| 04:27 | bitemyapp | ddellacosta: you're too nice to inferior options :) |
| 04:28 | ddellacosta | noprompt: totally. |
| 04:28 | bitemyapp | which isn't surprising, given what I know about you. |
| 04:28 | ddellacosta | bitemyapp: 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:29 | noprompt | ddellacosta: it's very forward and simple to implement. i've basically been hooking this into reactjs. |
| 04:29 | ddellacosta | bitemyapp: 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:29 | ddellacosta | noprompt: interesting--I heard David Nolen was playing w/React.js lately too, I'm curious what he's doing |
| 04:29 | noprompt | ddellacosta: you should have a look at it. it's super nice. |
| 04:29 | ddellacosta | noprompt: but all in all, that sounds really similar to what we've been doing. |
| 04:30 | ddellacosta | noprompt: definitely will! |
| 04:30 | noprompt | ddellacosta: two relavant gists https://gist.github.com/swannodette/7763911 https://gist.github.com/swannodette/7813518 |
| 04:31 | ddellacosta | noprompt: cool, thanks. |
| 04:31 | ddellacosta | noprompt: I like your hiccup flavor...nice. |
| 04:31 | noprompt | ddellacosta: one note about the blog post. you could use goog.events/listen instead of addEventListener |
| 04:31 | piranha | React's good :P |
| 04:31 | noprompt | oh haha nm! |
| 04:31 | ddellacosta | noprompt: I do in the Google Closure example |
| 04:32 | noprompt | ddellacosta: yeah, just scrolled down. (feel like an ass) :P |
| 04:32 | ddellacosta | noprompt: no worries...haha. ;-) |
| 04:32 | noprompt | piranha: hey, did you see that gist david did with the whole Pure thing? |
| 04:32 | piranha | noprompt: what's Pure? |
| 04:32 | TEttinger | Pure the Nial-like language? |
| 04:33 | noprompt | piranha: i borrowed some of the template code from pump and came up with the defhtmlcomponent macro that makes the whole bit very clean. |
| 04:33 | piranha | ah, second one; not yet, looking now |
| 04:33 | piranha | heh cool :) |
| 04:33 | noprompt | piranha: https://gist.github.com/swannodette/7813518 |
| 04:33 | bitemyapp | ddellacosta: the code is really clean. You're an artisan. |
| 04:33 | bitemyapp | I feel bad for poking you over the fonts. |
| 04:33 | noprompt | piranha: you mentioned you were busy, but i'd be happy to pitch in help if you're open to some of this stuff. |
| 04:33 | ddellacosta | bitemyapp: 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:34 | bitemyapp | Raynes: learning what? |
| 04:35 | piranha | noprompt: 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:35 | piranha | also, of course I'm open to changes in pump :) |
| 04:35 | noprompt | ddellacosta: also ditch the letter-spacing. |
| 04:35 | ddellacosta | noprompt: where? |
| 04:36 | piranha | it was written in a hurry... |
| 04:36 | noprompt | ddellacosta: i'm seeing a 0.1em letter-spacing when inspect the <pre> elements. |
| 04:36 | ddellacosta | noprompt: ah, yeah, I'll probably redo it all if I swap out the code font |
| 04:36 | noprompt | piranha: well how can i help? |
| 04:37 | ddellacosta | bitemyapp, noprompt: thanks for the feedback! Very helpful. |
| 04:38 | noprompt | ddellacosta: is your blog written w/ clojure? |
| 04:38 | piranha | noprompt: 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:38 | ddellacosta | noprompt: it's just a hacked together thing but yes. |
| 04:38 | bitemyapp | ddellacosta: glad I could help, your stuff was too good for me to improve upon though :( |
| 04:38 | bitemyapp | noprompt: mine is too! 'tis hacky though. |
| 04:38 | piranha | I 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:38 | ddellacosta | bitemyapp: that is not true, but appreciated. :-) |
| 04:39 | piranha | or no, that feels a bit hackish :( I have some ideas from others, but not sure about them |
| 04:40 | piranha | also there is a bit of a problem defining event handlers |
| 04:41 | noprompt | piranha: 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:41 | bitemyapp | (doubt it) |
| 04:41 | piranha | noprompt: well it took around 20% of runtime in our case |
| 04:41 | noprompt | piranha: oh rly? |
| 04:41 | noprompt | wow. |
| 04:41 | piranha | so I just thought that's a nice way to get your app run faster a bit |
| 04:41 | bitemyapp | piranha: is that problematically high? |
| 04:41 | piranha | not sure ;))) |
| 04:42 | piranha | just something we spotted |
| 04:42 | bitemyapp | 20% doesn't seem out of the question for naive template code. |
| 04:42 | piranha | also, if you look here: https://github.com/wunderwaffle/warmagnet/blob/master/cljs/warmagnet/views/gamemap.cljs#L177 |
| 04:42 | bitemyapp | I bet it's worse than 20% for most backend web apps. |
| 04:42 | bitemyapp | Have you seen Rails apps? |
| 04:42 | bitemyapp | scary. |
| 04:42 | piranha | haha yeah, same thing for django |
| 04:42 | piranha | ok, that's not *very* important :)) |
| 04:42 | piranha | having better API is more important, sure |
| 04:42 | piranha | but then look at our handlers |
| 04:42 | bitemyapp | I'd tend to agree. |
| 04:42 | noprompt | piranha: 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:43 | piranha | we have them defined in (let ...) inside of render, so that they will know state & props, and then pass them to inner components |
| 04:43 | piranha | and that's a bit problematic, since those functions are always new on every render, so every inner component has to be re-rendered |
| 04:44 | piranha | I'm not absolutely sure that is a problem, but... at some points it felt like one |
| 04:44 | piranha | argh, I had to log all the numbers we had :( |
| 04:44 | piranha | noprompt: hehe, dropping :foo.bar#baz sounds like a good idea, it spends quite a bit of time there |
| 04:45 | noprompt | piranha: syntactic sugar causes cancer of the semicolon ;) |
| 04:46 | noprompt | piranha: even with vanilla hiccup i avoid the css notation because it's not composable and, imho, doesn't read well. |
| 04:46 | bitemyapp | I decided I want to learn how lexical scope in Clojure works today. |
| 04:46 | piranha | noprompt: on the other hand, how's hiccup's syntax is better than simple function call? :) |
| 04:46 | bitemyapp | insomnia should be leveraged to some kind of positive outcome. |
| 04:47 | bitemyapp | piranha: it's data, not opaque fn values. |
| 04:47 | noprompt | piranha: dnolen claims that his "pure" solution should, quote, "blaze" |
| 04:47 | piranha | "blaze"? |
| 04:47 | piranha | ah, be very fast |
| 04:47 | noprompt | piranha: performance wise. |
| 04:47 | noprompt | yes |
| 04:47 | bitemyapp | piranha: 420blazeit |
| 04:47 | piranha | sure :-) sorry, not native speaker :) |
| 04:48 | noprompt | piranha: the thing i like about hiccup vs plain function calls is that it's obvious (to me anyways) where the html is. |
| 04:48 | piranha | heh, sure |
| 04:48 | noprompt | piranha: no worries. :) |
| 04:49 | noprompt | piranha: 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:50 | piranha | sure |
| 04:50 | piranha | as for 'pure' - I would love to see something like our GameMap, to be honest :) |
| 04:51 | piranha | I 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:51 | noprompt | piranha: looking at it now. |
| 04:53 | noprompt | piranha: defr might be nice as (defclass GameMap (get-initial-state [] ...) (component-will-mount [] ...)) |
| 04:53 | piranha | noprompt: sure! like defrecord, right? |
| 04:53 | piranha | I was thinking about that :) |
| 04:53 | noprompt | piranha: right. |
| 04:55 | piranha | noprompt: that sounds like a good approach I guess... |
| 04:55 | piranha | our components already implement all atom protocols... :) |
| 04:55 | noprompt | piranha: was that so you could access `state`? |
| 04:56 | noprompt | ddellacosta: have you tried using garden for your css? |
| 04:56 | piranha | noprompt: yeah, @component == state, and also pr-str works nicer this way |
| 04:56 | noprompt | ddellacosta: it's pretty crazy. |
| 04:56 | ddellacosta | noprompt: no, I've heard of it, but checked it out |
| 04:57 | ddellacosta | but *not checked it out |
| 04:57 | ddellacosta | noprompt: what do you like about it? |
| 04:58 | noprompt | ddellacosta: 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:58 | ddellacosta | noprompt: oh, sorry, I didn't realize it was yours! haha. Will check it out. |
| 04:59 | noprompt | ddellacosta: when i left my other job i'd been working something that was fairly css heavy and garden was tripping me out. |
| 04:59 | ddellacosta | noprompt: 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:59 | noprompt | ddellacosta: i'd only used sass/compass prior to that. |
| 04:59 | ddellacosta | noprompt: 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:00 | ddellacosta | noprompt: that's one problem with all the asset handling stuff out there now, in general. ;-/ |
| 05:01 | noprompt | ddellacosta: 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:01 | ddellacosta | noprompt: well, maybe can be extended, huh? |
| 05:01 | noprompt | ddellacosta: also the lack of compass means that some things need to be handrolled. |
| 05:02 | ddellacosta | noprompt: 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:02 | noprompt | ddellacosta: oh, the other thing, garden can be used on the client too. |
| 05:03 | noprompt | ddellacosta: but it needs some goodies to make that experience compelling. like direct manipulation of the CSSOM. |
| 05:03 | ddellacosta | oh, like, embedded in CLJS? That is pretty interesting... |
| 05:04 | ddellacosta | noprompt: 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:04 | ddellacosta | noprompt: I wish we had an exclusively web-focused Clojure survey |
| 05:04 | ddellacosta | I want to know what everyone doing Clojure/CLJS is doing, how they are using the tools, etc. |
| 05:05 | noprompt | ddellacosta: well garden is a pretty solid base but it'd be a better story if more folks could pitch in. |
| 05:05 | bitemyapp | hrm. housing is 53% cheaper in seattle than the SF bay area. hrm. |
| 05:05 | bitemyapp | Austin? 71%. good god. |
| 05:05 | noprompt | bitemyapp: it's probably 90% cheaper here. |
| 05:05 | bitemyapp | noprompt: 65%. Cheaper than Seattle, more expensive than Austin. |
| 05:06 | bitemyapp | noprompt: do not underestimate how cheap Austin is. |
| 05:06 | noprompt | bitemyapp: would've never guessed. |
| 05:06 | ddellacosta | bitemyapp: my 2LDK place in Tokyo is about $1300 a month...right in Meguro too |
| 05:06 | bitemyapp | it's like $120k for a house + a few acres of land in Austin. |
| 05:06 | ddellacosta | I love me some Austin though |
| 05:06 | bitemyapp | ddellacosta: 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:06 | noprompt | ddellacosta: how'd you get stationed there? |
| 05:07 | ddellacosta | bitemyapp: I can understand. Then again, there are no jobs worth speaking of in Tokyo |
| 05:07 | bitemyapp | ddellacosta: remote is an ongoing discussion at my company. *prays hard* |
| 05:07 | bitemyapp | I want to leave SF so bad ;_; |
| 05:07 | ddellacosta | noprompt: 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:08 | ddellacosta | bitemyapp: 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:08 | noprompt | ddellacosta: that's pretty rad. |
| 05:08 | piranha | heh you guys make my consideration about going to USA/SF less interesting... :) |
| 05:09 | noprompt | piranha: where are you at? |
| 05:09 | ddellacosta | noprompt: I have no huge complaints. :-) Would like to make more money, but, I live in Tokyo and work remotely with Clojure, so, tradeoffs. |
| 05:09 | piranha | noprompt: Ukraine ;) |
| 05:09 | ddellacosta | piranha: wow! Would like to visit Ukraine some day. |
| 05:09 | bitemyapp | ddellacosta: well, I'm sort of hoping I can shift to remote and work at my current company until I "make my own job" |
| 05:09 | noprompt | piranha: ugh. i *so* want to visit eastern europe. |
| 05:09 | ddellacosta | bitemyapp: do it man! |
| 05:09 | bitemyapp | I'm very at my current company. |
| 05:09 | piranha | but I've been thinking about leaving it for some time now, I'm tired of government and would like nicer weather :) |
| 05:10 | ddellacosta | yeah, I can imagine the weather is a bit of a killer... |
| 05:10 | bitemyapp | ddellacosta: maybe someday hire some devs too? |
| 05:10 | piranha | ddellacosta: 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:10 | noprompt | ddellacosta: yes <3 hire us. :P |
| 05:10 | piranha | ddellacosta: well it's not as appalling as in the Netherlands (I've lived there for a year) |
| 05:10 | bitemyapp | noprompt: you mean me? |
| 05:11 | noprompt | bitemyapp: of course. <3 i liked working w/ you. |
| 05:11 | ddellacosta | bitemyapp, noprompt: haha, we don't have enough money yet...but we'll see what happens. :-) |
| 05:11 | ddellacosta | piranha: thanks! |
| 05:12 | bitemyapp | noprompt: aww :D |
| 05:12 | ddellacosta | who 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:12 | piranha | :) |
| 05:12 | bitemyapp | way too many nice people here. |
| 05:12 | piranha | bitemyapp: in #clojure you mean? |
| 05:13 | piranha | bitemyapp: come here and I'll introduce to some less nice people if you want :D |
| 05:13 | bitemyapp | yes and in particular this night. |
| 05:13 | bitemyapp | piranha: :( |
| 05:13 | noprompt | igstan: shaving that yak buddy? |
| 05:13 | bitemyapp | piranha: feed me piroshkis instead. |
| 05:13 | noprompt | lol |
| 05:13 | piranha | :)) |
| 05:13 | igstan | noprompt: neah, done with it already. learning some core.logic now |
| 05:13 | bitemyapp | piranha: I lived in Detroit for several years, fond memories of Ukrainian people there. |
| 05:14 | noprompt | bitemyapp: people "live" in detroit? |
| 05:14 | noprompt | eh, guess i have no room to talk being in fresno and all. |
| 05:14 | piranha | bitemyapp: 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:15 | bitemyapp | noprompt: big words, Fresno man. |
| 05:18 | bitemyapp | piranha: yeah, lot of unhappiness around the world. |
| 05:18 | noprompt | more ways to rob someone than just take their money that's for sure. |
| 05:19 | bitemyapp | noprompt: yeah, like the ways dynamic languages have robbed my fucking time with type errors. |
| 05:19 | piranha | :) |
| 05:20 | bitemyapp | noprompt: caremad. |
| 05:20 | noprompt | bitemyapp: so when do you wanna do some haskell? |
| 05:21 | bitemyapp | noprompt: I have dinner with the ubermensch weds. Haskell Saturday morning. Tomorrow night might be reserved for recovering from my dumbass insomnia. |
| 05:21 | noprompt | bitemyapp: 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:21 | bitemyapp | noprompt: Thursday night? |
| 05:22 | bitemyapp | grom is *nothing* special at all, pretty boring. |
| 05:22 | noprompt | bitemyapp: should be good. |
| 05:23 | bitemyapp | I'm also not really planning to exercise Haskell's super-powers much. Vanilla Network.Socket IO monad stuff. |
| 05:23 | bitemyapp | if I wanted to be clever I would use Conduit or something. |
| 05:23 | bitemyapp | or figure out a way to model the network communication as codata. |
| 05:24 | noprompt | bitemyapp: 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:24 | bitemyapp | I just want to talk to lein repl :headless without building OCaml. |
| 05:24 | noprompt | bitemyapp: it is socket stuff right? |
| 05:24 | bitemyapp | noprompt: oh. hum. sockets aren't bad at all. |
| 05:24 | bitemyapp | noprompt: da! nrepl protocol is bencode over TCP sockets. |
| 05:24 | bitemyapp | associative data. basically maps. |
| 05:24 | noprompt | bitemyapp: yeah, i've never done much of that. |
| 05:24 | bitemyapp | noprompt: should expose you to some new stuff then, that's great. |
| 05:25 | noprompt | bitemyapp: yeah that'd be good. i might actually get some more wacky ideas. |
| 05:25 | bitemyapp | noprompt: should be pretty easy for you though, I think you've worked on much harder stuff than this. |
| 05:25 | bitemyapp | I spent most of Sunday exploring a bencode library with my friend. |
| 05:25 | bitemyapp | ddellacosta: be more jealous - I'm meeting techno soon! |
| 05:25 | noprompt | bitemyapp: cool. yeah networking/communications is one of those areas i haven't figured out where to get started. |
| 05:25 | bitemyapp | ddellacosta: so excited *_* |
| 05:26 | bitemyapp | noprompt: I'm not into "networking" but I am into databases and protocols (thus my interest in Revise's pipelined connections) |
| 05:26 | bitemyapp | noprompt: wait...have I showed you Revise's connection model? |
| 05:26 | bitemyapp | the RethinkDB protocol is TCP sockets + slightly modified protobufs protocol |
| 05:27 | noprompt | bitemyapp: negative. i briefly looked at it. i'm considering using rethink for something but currently evaluating dataomic. |
| 05:27 | bitemyapp | I find the "semantics" of protocols interesting. |
| 05:27 | bitemyapp | noprompt: well I use Datomic at work, so if you have questions about either, ping me! |
| 05:27 | noprompt | bitemyapp: how do you like it? |
| 05:27 | bitemyapp | Datomic has been successful for the sort of things we do at my company. |
| 05:28 | bitemyapp | I'd need to know a specific use-case to speak to it. |
| 05:28 | bitemyapp | I'd be perfectly okay with the notion of Datomic as a nice default alternative to PostgreSQL for vanilla OLTP workloads. |
| 05:29 | bitemyapp | ultimately the practicality of Datomic for your workload could be decided algorithmically |
| 05:30 | piranha | how's that? |
| 05:30 | noprompt | overengineered bank ocr kata solution https://gist.github.com/noprompt/b07b85881d76c6ecba97 |
| 05:31 | bitemyapp | (churn rate * dataset size growth rate * base size) == Datomic database size growth rate |
| 05:31 | noprompt | was in text search mode when i was hacking on it. |
| 05:31 | bitemyapp | because in PostgreSQL your dataset size grows with the number of rows |
| 05:31 | bitemyapp | in Datomic it grows with the average length of history of per datom plus the number of datoms. |
| 05:32 | bitemyapp | but it's nicer for OLTP workloads if you're comfortable using Clojure. |
| 05:32 | bitemyapp | hella lack of documentation though. if you use Datomic, you'll be in here asking me questions. |
| 05:32 | piranha | ah, right, so if you have a high churn rate, it'll grow too fast |
| 05:32 | bitemyapp | piranha: yeah, but you'd be surprised at what it would take to produce something that wouldn't work. |
| 05:32 | bitemyapp | very few companies have an OLTP workload with high enough churn for it to matter. |
| 05:33 | piranha | ok, I'm doing a simple game, but I'm more on front-end side of it, so it doesn't matter that much :) |
| 05:33 | bitemyapp | noprompt: that solution is pleasing. Declarative, clean, and clever. |
| 05:33 | noprompt | bitemyapp: has anyone come up with something to get datomic on the client? |
| 05:33 | piranha | what matters is that if I should push clojure asap or start with replacing our data layer with mori first... |
| 05:34 | bitemyapp | noprompt: I really like that kata solution. |
| 05:34 | bitemyapp | noprompt: uh, me? |
| 05:34 | bitemyapp | CLRS + the two or three Datomic REST APIs I've written. |
| 05:34 | bitemyapp | I literally just wrote another one (berossus), getting open sourced this week |
| 05:34 | bitemyapp | my coworkers are working on a Python Datomic OEM (bottom) that I will be contributing to and open sourcing as well hopefully. |
| 05:34 | noprompt | bitemyapp: oh you think so? thanks. i came back to it today and thought the set/intersection bit was over engineered. |
| 05:35 | bitemyapp | noprompt: nah, I think it's an excellent way to express the problem. |
| 05:35 | bitemyapp | noprompt: and reflects the nature of what's being described and computed. |
| 05:35 | bitemyapp | I like it *very* much. |
| 05:35 | bitemyapp | 5rlz. |
| 05:36 | CookedGryphon | hi, 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:36 | CookedGryphon | publisher? predicate? |
| 05:36 | CookedGryphon | parameter? |
| 05:36 | noprompt | bitemyapp: the reduce + set/intersection combo is so fun whenever it comes up. |
| 05:37 | bitemyapp | CookedGryphon: this documentation is so terrible, hahaha |
| 05:38 | noprompt | CookedGryphon: i think i might be able to help you. |
| 05:38 | noprompt | CookedGryphon: you understand async/pub right? |
| 05:39 | CookedGryphon | noprompt: I think so, yeah - hard to verify until i've subscribed to something ;) |
| 05:40 | noprompt | CookedGryphon: basically your pub is going to give you back a channel which will contain the results of whatever it's pubfn is. |
| 05:41 | noprompt | CookedGryphon: so for example (def publisher (async/pub (async/chan) :message) |
| 05:41 | noprompt | CookedGryphon: s/message/topic |
| 05:42 | seriously_random | opposite of contains? (because google sucks) |
| 05:42 | noprompt | CookedGryphon: then you subscribe to some topic (def poetry-subscription (sub publisher :poetry (async/chan)) |
| 05:43 | noprompt | CookedGryphon: suppose you then publish a message {:topic :poetry :value "blah blah blah"} |
| 05:43 | noprompt | CookedGryphon: (>! pusblisher message), then (<! poetry-subscription) will have the value {:topic :poetry :value "blah blah blah"} |
| 05:44 | CookedGryphon | noprompt: with subscribing, can I subscribe to multiple topics? with (->> (chan) (sub p :a) (sub p :b))? |
| 05:45 | noprompt | CookedGryphon: hmm. haven't tried that. normally i would just do two subscriptions and then use alts! |
| 05:45 | noprompt | CookedGryphon: but give it a shot! |
| 05:45 | CookedGryphon | okay, will do, that's really helpful, thanks! |
| 05:45 | CookedGryphon | I'll let you know how it goes |
| 05:45 | noprompt | CookedGryphon: are you using this client or server side? |
| 05:46 | CookedGryphon | on an android phone ;) |
| 05:46 | noprompt | oh sweet. |
| 05:46 | seriously_random | ah, (not (contains?)) |
| 05:46 | noprompt | seriously_random: or (complement contains?) lol |
| 05:52 | CookedGryphon | noprompt: can I use a put! onto my publisher? |
| 05:52 | CookedGryphon | or do i need to put onto the chan that I give to the publisher |
| 05:53 | noprompt | CookedGryphon: i think you can put! on the publisher. |
| 05:53 | CookedGryphon | I'm getting no implementation of WritePort on pub$reify |
| 05:54 | noprompt | CookedGryphon: oh right. it might be the chan you passed in then. |
| 05:54 | CookedGryphon | hmm, 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:54 | noprompt | CookedGryphon: 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:56 | noprompt | CookedGryphon: right. i ran in to that too. what i did was create a Broker type for abstracting that. |
| 05:56 | CookedGryphon | okay, I think this is probably the core of the issue I've been having then |
| 05:57 | noprompt | CookedGryphon: 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:58 | noprompt | have 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:58 | noprompt | CookedGryphon: does that make sense? |
| 05:58 | CookedGryphon | yep, thanks |
| 06:01 | noprompt | CookedGryphon: cool. hope it works for you. i've mainly used that pattern on the client side and it works decently. |
| 06:02 | CookedGryphon | okay, new function, what does a buf-fn expect |
| 06:02 | CookedGryphon | new question* |
| 06:02 | bitemyapp | type signatures would really help here. |
| 06:02 | bitemyapp | seriously. |
| 06:02 | noprompt | bitemyapp: troll but true. |
| 06:03 | CookedGryphon | okay, the docstring does actually help here |
| 06:03 | CookedGryphon | I just skimmed and assumed a meaning first time around |
| 06:05 | noprompt | i've been putting my entire music library on shuffle for days. it's been interesting. |
| 06:05 | noprompt | so much random crap. |
| 06:06 | bitemyapp | noprompt: I've wasted too much time trying to reassemble type signatures for clojure code. |
| 06:08 | noprompt | bitemyapp: does core.typed help at all in that regard. |
| 06:09 | noprompt | damn this song is beautiful. |
| 06:09 | bitemyapp | noprompt: maybe someday, but there are a lot of problems. |
| 06:09 | noprompt | ddellacosta: translation? 生誕 |
| 06:10 | bitemyapp | noprompt: 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:10 | noprompt | oh it means birth. |
| 06:10 | ddellacosta | noprompt: birth |
| 06:10 | bitemyapp | well, the semantics are expressive, but they're not leveraging things like monads to express uncertainty. |
| 06:10 | ddellacosta | yep. |
| 06:11 | bitemyapp | so instead of encoding uncertainty in something general or powerful, the type system has one big "or" attached to every annotation |
| 06:11 | bitemyapp | then you get to slap Any -> Any on a bunch of crap :| |
| 06:12 | noprompt | bitemyapp: that's a bummer. but ambrose is actively working on it, no? |
| 06:12 | bitemyapp | noprompt: yes, on bringing it to CLJS and the DOM API. |
| 06:12 | noprompt | bitemyapp: oh dear. |
| 06:12 | bitemyapp | noprompt: I want to love core.typed, but the limitations Ambrose is working with are crippling. |
| 06:13 | bitemyapp | it's a particular evolutionary branch of type systems that was briefly explored and largely left to stay where it planted. |
| 06:13 | noprompt | bitemyapp: he seems like he's got a good attitude about it though. |
| 06:13 | bitemyapp | for various reasons. |
| 06:13 | bitemyapp | well it's partly a high level design and practical exercise for him. I think it's a success in that regard |
| 06:13 | bitemyapp | but when I've tasted the power, it's hard to "make do" |
| 06:14 | noprompt | it just kills me that no one has nailed a lisp with a solid type system yet that doesn't feel janky. |
| 06:14 | bitemyapp | noprompt: there are multiple fundamentals to Lisps that make it insanely awkward. |
| 06:15 | bitemyapp | noprompt: well. It's doable. Let me just say that. But you have to plan ahead for it. |
| 06:15 | noprompt | bitemyapp: maybe it's the approach. |
| 06:15 | bitemyapp | partly that. |
| 06:16 | bitemyapp | if 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:16 | bitemyapp | sorry, when I say abandon, I mean uni-typed references. |
| 06:16 | bitemyapp | you also have to plan your core API around types. |
| 06:17 | bitemyapp | noprompt: take a look at the core.typed annotations for Clojure core to see how awkward some things ar.e |
| 06:17 | bitemyapp | anything with [Any * -> Any] is horrorsville |
| 06:18 | noprompt | :/ |
| 06:18 | bitemyapp | anything 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:19 | bitemyapp | noprompt: 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:19 | bitemyapp | noprompt: not that this is a problem in practice. Scala users do it all the time. |
| 06:19 | bitemyapp | but it means you have to actually make (say) what you want. |
| 06:20 | bitemyapp | rather than blindly smashing a vector into apply like you do in Clojure |
| 06:20 | bitemyapp | noprompt: and you don't need apply in Haskell...because the functions are fucking curried! |
| 06:20 | noprompt | bitemyapp: right. all functions take only one argument. |
| 06:20 | bitemyapp | when you embrace FP properly, you don't need a lot of things that are dirty or inconsistent. |
| 06:21 | bitemyapp | noprompt: right, so apply in Haskell is just fold. |
| 06:21 | bitemyapp | noprompt: 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:23 | noprompt | well shit man. i think i'm gonna finish setting up this clj project for taming text and get some sleep. |
| 06:24 | bitemyapp | noprompt: dream of rainbows, lambdas, and types! |
| 06:26 | xificurC | hey 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:27 | xificurC | I also tried creating a session from the shell and simply running `cider' and specifying the port but no luck |
| 06:27 | ucb | bitemyapp: remember how happy I was a few hrs. ago? not any more :/ |
| 06:28 | bitemyapp | just unfollowed someone on Twitter because they use Golang. |
| 06:29 | bitemyapp | ucb: :( ? |
| 06:33 | ucb | bitemyapp: networking is hard |
| 06:35 | bitemyapp | ucb: I'm sorry you're distressed/unhappy. |
| 06:35 | bitemyapp | ucb: is there some way I can help? |
| 06:35 | bitemyapp | i have many pictures of cats and other assorted fuzzy creatures. |
| 06:35 | ucb | bitemyapp: ah, no worries. I'm just ranting to release some steam. Because sensu >:@ |
| 06:36 | ucb | well, sensu amongst other things |
| 06:38 | bitemyapp | ucb: hum. monitoring. What's up exactly? |
| 06:39 | ucb | bitemyapp: 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:40 | bitemyapp | ucb: derferk? |
| 06:40 | ucb | no idea what that is but maybe? |
| 06:42 | bitemyapp | ucb: it's a distorted "dafuq" |
| 06:42 | ucb | heh |
| 06:42 | ucb | then absoluyes |
| 06:43 | ucb | further, traffic rx by the intermediary box drops by 1k say, yet incoming traffic to the monitoring box only increases by .2k or so |
| 06:43 | ucb | and yet ... the thing becomes maniacal |
| 06:45 | bitemyapp | ucb: is it possible the migration broke reporting to metrics? |
| 06:46 | ucb | not really, it's just traffic redirection |
| 06:46 | ucb | I mean, I'd be super surprised if it were |
| 06:46 | bitemyapp | ucb: is it possible the migration fixed reporting to metrics that was previously broken? |
| 06:47 | ucb | well, one thing I considered was packet drop between intermediary box and monitoring box effectively acting as a throttling mechanism |
| 06:47 | ucb | but I'm not convinced that's the case |
| 06:47 | bitemyapp | ucb: did you record connection metrics between the intermediary and monitoring box? |
| 06:47 | ucb | measured with iperf, etc. |
| 06:48 | ucb | well, I measured the traffic between I->M |
| 06:48 | ucb | and it seemed ok |
| 06:49 | bitemyapp | oh, there are bounded channels for Haskell. I feel dumb now. |
| 06:53 | sm0ke | does anyone faced problems upgrading to compojure 1.1.6? i am getting java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest |
| 06:58 | bitemyapp | sm0ke: haven't upgraded, let you know if I bump into it. |
| 07:00 | sm0ke | although 'lein deps :tree' shows servlet-api 2.5 as a dep |
| 07:03 | sm0ke | something fishy with compojure |
| 07:05 | ohcibi | hi 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:06 | sm0ke | AHA! |
| 07:07 | sm0ke | compojure 1.1.6 doesnt have servlet api |
| 07:07 | sm0ke | actually ring core 1.2.1 doesnt have that |
| 07:08 | sm0ke | yep, headsup guys, https://github.com/ring-clojure/ring/pull/89 |
| 07:29 | Jarda | has someone used http://clojurequartz.info/articles/jobs.html ? |
| 07:30 | Jarda | I need to do scheduled tasks for my webapp |
| 07:31 | Jarda | could I just initialize jobs in my compojure app-handler? |
| 07:55 | sveri | hi, 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:05 | chrisdone | is this channel publicly logged? |
| 08:05 | mdrogalis | chrisdone: Yup |
| 08:06 | mdrogalis | http://clojure-log.n01se.net/ |
| 08:12 | chrisdone | ah, someone requested i add #clojure to http://ircbrowse.net/, but seems you already have something similar |
| 08:15 | chrisdone | i might scrape all the years from it |
| 08:23 | chrisdone | unless anyone has znc logs of this channel? |
| 08:42 | osa1 | hello 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:42 | tbaldridge | osa1: example? |
| 08:43 | clgv | osa1: are you sure that they are unused? some of them are probably used (directly or as :inline) in clojure/core.clj |
| 08:43 | mdrogalis | I'd kind of like to axe some of those huge blocks of commented code out in the compiler. |
| 08:43 | osa1 | clgv: I'm not sure. my IDE says that. |
| 08:44 | osa1 | clgv: so are they called using some kind of reflection functionality? |
| 08:44 | tbaldridge | osa1: yeah, your IDE probably doesn't understand Clojure |
| 08:44 | clgv | osa1: it's probably just analysing the *.java sources |
| 08:44 | osa1 | hmm yeah that makes sense |
| 08:44 | clgv | osa1: no. but they are called from clojure source ;) |
| 08:45 | osa1 | yeah got it. thanks. |
| 08:51 | r4vi | is 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:54 | bja | r4vi: not to my knowledge. https://github.com/weavejester/compojure/issues/39 |
| 08:54 | r4vi | bja: thanks |
| 08:55 | bja | you might be able to do something close to url lookup if you bind each route to a particular name |
| 08:55 | bja | but selecting between arities with the same name probably won't happen easily (if at all) |
| 08:57 | bja | so (defroutes routes (GET "/show_bananas" [] (bananas-controller) :show-bananas) might be something you could hack |
| 08:57 | r4vi | bja: playing with it in the repl now |
| 08:57 | bja | adn then have a (url-for :show-bananas) |
| 08:58 | bja | but the fill-in ability or something like "/foo/:bar/:quux" |
| 08:58 | bja | would probably either be purely positional or kw-based |
| 08:59 | bja | and you probably couldn't easily handle "/foo/:bar" and "/foo/:bar/:quuz" with the same name of :foo-bar-route |
| 08:59 | bja | which is otherwise something I might do (in say Django's url routing system) |
| 08:59 | r4vi | bja: I think I would need to wrap defroutes |
| 08:59 | bja | yeah |
| 08:59 | bja | wrap defroutes and register the extra argument into an atom |
| 08:59 | bja | then provide some functions to lookup in the atom |
| 09:01 | bja | but 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:01 | bja | or maybe (url-for :foo-bar 25) |
| 09:02 | bja | being able to pass in :bar |
| 09:02 | justin_smith | r4vi: in general that is called reverse routing |
| 09:02 | justin_smith | it is supported by caribou (and the future replacement router for caribou, a standalone project called polaris) |
| 09:03 | justin_smith | reminds me I need to nag patchwork to get polaris merged, he said he wanted to be the one to do it... |
| 09:03 | r4vi | justin_smith: thanks, searching for reverse routing compojure gives us this https://groups.google.com/forum/#!topic/compojure/J-0KWht_-PM |
| 09:03 | r4vi | which is almost exactly what bja is describing |
| 09:04 | justin_smith | we 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:06 | justin_smith | r4vi: "I think I would need to wrap defroutes" - thats when you start feeling the growing pains of compojure imho |
| 09:07 | justin_smith | https://github.com/caribou/polaris <- I am one of the designers, but that is not the only reason I really like it for routing |
| 09:08 | justin_smith | very edn-centric |
| 09:08 | r4vi | very nice stuff with the nested route definitions |
| 09:09 | justin_smith | and notice the reverse routing demo at the bottom of page |
| 09:10 | r4vi | caribou looks cool too, Django inspired? |
| 09:11 | justin_smith | we definitely took some ideas from django |
| 09:11 | justin_smith | it started as a php app for rapid webapp deployment |
| 09:11 | justin_smith | that was hard to maintain, so they upgraded to ruby |
| 09:11 | justin_smith | (RoR I think) |
| 09:12 | justin_smith | then that didn't scale performance wise, so they upgraded to clojure |
| 09:12 | justin_smith | then I joined |
| 09:12 | justin_smith | maybe some day we will upgrade to Haskell or something, but that would make me sad |
| 09:35 | gfredericks | (def rails (/ (+ php clojure) 2)) |
| 09:35 | mdrogalis | Heh. |
| 09:44 | justin_smith | hah |
| 09:45 | justin_smith | on further consideration, I think mentioning the previous implementation stacks does caribou a disservice |
| 09:51 | wink | why? not starting from scratch but learning from your errors is good |
| 09:52 | clgv | (inc gfredericks) |
| 09:52 | lazybot | ⇒ 33 |
| 09:53 | clgv | :P |
| 09:53 | clgv | (inc 42) |
| 09:53 | lazybot | ⇒ 3 |
| 09:53 | clgv | :D |
| 10:02 | wei__ | 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:08 | arcatan | wei__: clojure.java.jdbc/query |
| 10:09 | wei__ | oh, I thought query was just for SELECTs for some reason |
| 10:10 | arcatan | oh, hmm. maybe you need to use jdbc/execute! |
| 10:52 | justin_smith | db-do-commands / db-do-prepared |
| 10:54 | justin_smith | db-do-prepared is preferred if you have many insertions with that same structure, just different parameters |
| 10:57 | justin_smith | also consider insert! if you would prefer to provide a map from columns to values |
| 11:45 | sritchie | SegFaultAX: I did see that talk, it was great |
| 11:46 | sritchie | that clearly seems like the way to go |
| 11:53 | jtoy | do 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:54 | fakedrake | hello |
| 11:55 | coventry | jtoy: What does the script do? |
| 11:55 | makkalot | hi, i want to get fully qualified name of some variable in clojurescript, is there a way to do that ? |
| 11:55 | fakedrake | I 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:55 | fakedrake | string |
| 11:55 | fakedrake | is there a good built in for that? |
| 11:56 | jtoy | coventry: its a python machine learning script i wrote |
| 11:56 | justin_smith | jtoy: in a library it will be accessible as a resource inside the jar |
| 11:56 | bodie_ | Does anyone have any thoughts on whether Clojure and Go are competitors, and if so, what merits are brought by each? |
| 11:56 | jtoy | its just reads from STDIN and outputs to STDOUT and my clojure code needs to capture that |
| 11:57 | justin_smith | (spit (slurp (io/resource "filename")) "file-name-on-disk") |
| 11:57 | justin_smith | or maybe I have those spit args reversed |
| 11:57 | jtoy | justin_smith: I see, so I need to do that, thanks |
| 11:57 | justin_smith | be sure that the destination file is writable - in some environments the current working directory may not be writable by your process |
| 11:58 | justin_smith | this has bitten me in the ass before (inside tomcat) |
| 11:58 | jtoy | justin_smith: thx, I will try to use tmp for now to be safe |
| 11:58 | justin_smith | (spit "file-name-on-disk" (slurp (io/resource "filename"))) |
| 11:59 | justin_smith | I had the args reversed |
| 11:59 | stompyj | is there a "preferred" way of handling configuration of env vars for web apps? |
| 11:59 | justin_smith | also the path will be relative to your resource-path |
| 11:59 | justin_smith | stompyj: you can access them directly with (System/getenv "env-key") |
| 11:59 | scriptor | hi, got a question about lazy seq implementation |
| 12:00 | justin_smith | stompyj: I sometimes find my self having to run (System/getenv "PWD") in my nrepl in emacs to remember which one it is |
| 12:00 | scriptor | since technically forcing a lazy seq does mutate the actual object, how is this reconciled with also keeping them functional/persistent |
| 12:00 | stompyj | justin_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:01 | scriptor | is this sort of mutability considered okay? |
| 12:01 | stompyj | I just wondered if there was a community practice around that |
| 12:01 | stompyj | or if it's just a "make it work" situatin |
| 12:01 | justin_smith | stompyj: with caribou we have an "environment" key in the env, and use that to decide which edn file to slurp for config |
| 12:01 | justin_smith | well read, but you get the idea |
| 12:02 | stompyj | ahhh nice |
| 12:02 | jtoy | i use APP_ENVIRONMENT |
| 12:02 | justin_smith | jtoy: that sounds much more professional |
| 12:02 | stompyj | justin_smith: I wanted to use caribou, but this app is so simple |
| 12:02 | stompyj | I couldn't convince myself it was justified |
| 12:02 | stompyj | it looks awesome |
| 12:02 | justin_smith | heh, yeah, I am working on making caribou more modular, pulling in fewer default dependencies so it makes more sense for simpler stuff |
| 12:03 | justin_smith | (while keeping it easy to pull in the more elaborate stuff if it is needed) |
| 12:03 | justin_smith | thanks :) |
| 12:03 | stompyj | justin_smith: where do you store the production env vars so it doesn't get stored in git/mercurial? |
| 12:03 | justin_smith | you mean the credentials? |
| 12:03 | stompyj | justin_smith: yeah, this is just compojure + liberator as a fancy proxy into mongo |
| 12:03 | stompyj | :slamdunkL |
| 12:03 | stompyj | :slamdunk: |
| 12:04 | justin_smith | I have a lib (blackbox) using my cryptlj lib that is still in the works for storing edn in aes128 |
| 12:04 | justin_smith | currently we don't have something nice and sane, sad to say |
| 12:05 | stompyj | no worries |
| 12:05 | justin_smith | the hard part is convincing everyone to adapt to the encrypted workflow |
| 12:05 | justin_smith | if the security is a hassle, it just gets worked around in insecure ways, lose/lose |
| 12:05 | stompyj | yeah |
| 12:05 | coventry | fakedrake: http://clojure.org/multimethods |
| 12:06 | justin_smith | stompyj: 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:06 | seangrove | SegFaultAX: What talk did you recommend to sritchie? |
| 12:07 | stompyj | justin_smith: excited to check it out |
| 12:07 | justin_smith | https://github.com/noisesmith/cryptlj - this is the underlying convenience lib for the encryption |
| 12:07 | justin_smith | https://github.com/noisesmith/cryptlj/blob/master/src/cryptlj/disk.clj the api is pretty simple |
| 12:08 | justin_smith | thin wrapper on the java rigamarole |
| 12:09 | justin_smith | the leiningen api is still unstable, fyi |
| 12:11 | coventry | seangrove: Pretty sure it was a conj talk titled "logs as data." |
| 12:11 | jjl`_ | 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:12 | llasram | jjl`_: Can you produce a minimal example map? |
| 12:12 | llasram | The obvious thing to my mind would be adding to the map objects which don't adhere to the .equals contract |
| 12:13 | jjl`_ | the thing causing it is adding a key to the second map that isn't in the first map which = nil |
| 12:13 | jjl`_ | i'm trying to create a reduced case |
| 12:13 | llasram | You have non-nil objects which are `=` to nil? |
| 12:14 | jjl`_ | the key does not exist in the first map. it is nil in the second. apparently they are both equal and not = |
| 12:15 | justin_smith | jjl`_: that surprises me |
| 12:15 | jjl`_ | it surprises me too. they can't be both equal and not equal |
| 12:15 | gfredericks | as described this shouldn't have anything to do with the behavior of = |
| 12:15 | justin_smith | are you sure it isn't something like (is not (= a b)) |
| 12:15 | gfredericks | as long as it''s deterministic |
| 12:16 | gfredericks | since he just passes it to not |
| 12:16 | Raynes | bitemyapp: Go. |
| 12:16 | Raynes | The programming language. |
| 12:16 | justin_smith | or (is = a b) always returns true |
| 12:16 | seangrove | coventry: Ah, I liked that one a lot. Too bad it never got much traction inside Heroku :P |
| 12:16 | gfredericks | so justin_smith's guesses seem a lot more plausible |
| 12:17 | jjl`_ | oh nevermind, it was an extra pair of parens, not a missing one. i'm just blind this afternoon apparently |
| 12:18 | jjl`_ | sorry for the confusion |
| 12:18 | gfredericks | ,(deftype Foo [] Object (equals [this other] (zero? (rand-int 2)))) |
| 12:18 | clojurebot | #<Exception java.lang.Exception: SANBOX DENIED> |
| 12:18 | justin_smith | gfredericks: lol |
| 12:19 | gfredericks | ~sanbox |
| 12:19 | clojurebot | I don't understand. |
| 12:19 | fakedrake | coventry: very interesting but i do not thing multimethods are suitable, I will have to write tha iterating function as a dispatch fun |
| 12:19 | jjl`_ | i'm surprised = tolerates only having one arg actually |
| 12:20 | justin_smith | jjl`_: check this out |
| 12:20 | justin_smith | ,(= Double/NaN) |
| 12:20 | clojurebot | true |
| 12:20 | justin_smith | mindblowing |
| 12:20 | justin_smith | ,(= Double/NaN Double/NaN) |
| 12:20 | clojurebot | false |
| 12:20 | justin_smith | as expected |
| 12:21 | amalloy | jjl`_: (apply = coll) |
| 12:22 | amalloy | "are all elements of this collection equal?" |
| 12:22 | amalloy | should work for one-element collections |
| 12:22 | jjl`_ | ah, i suppose that's a fair enough use case |
| 12:22 | amalloy | otoh it should *also* work for empty collections, and doesn't iirc |
| 12:22 | amalloy | &(apply = nil) |
| 12:22 | lazybot | clojure.lang.ArityException: Wrong number of args (0) passed to: core$-EQ- |
| 12:23 | jjl`_ | of course every time you design for one use case, you're trampling on another :) |
| 12:27 | amalloy | feel free to show a use-case that is "trampled on" by having (=) return true instead of throwing an exception |
| 12:28 | jjl`_ | i was talking more about the one arg part than the 0 arg parts really |
| 12:41 | danneu | ,(-> 1) |
| 12:41 | clojurebot | 1 |
| 12:41 | danneu | ,(->> 1) |
| 12:41 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$--GT> |
| 12:41 | danneu | y? |
| 12:48 | TimMc | ,(macroexpand-1 '(->> 1)) |
| 12:48 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: core$--GT> |
| 12:48 | llasram | danneu: Implementation quirks |
| 12:49 | TimMc | and poor base case coverage in clojure.core -.- |
| 13:04 | Bronsa | TimMc: danneu that's going to be fixed in 1.6.0 though |
| 13:06 | amalloy | ,'(->>) ;; hiredman, any plans to fix the macroexpander? |
| 13:06 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: core$--GT> |
| 13:08 | TimMc | Where is "--GT" coming from? |
| 13:09 | coventry | TimMc: Is that an incomplete munging of ->> ? |
| 13:10 | TimMc | Oh, yeah. |
| 13:10 | TimMc | demunging, actually |
| 13:10 | TimMc | ->> munges to __GT__GT_ |
| 13:11 | TimMc | and that is incorrectly split on the second __ and demunged to --GT |
| 13:14 | hiredman | amalloy: 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:14 | amalloy | hiredman: yes, that is the issue |
| 13:14 | amalloy | you can have lazybot's macroexpand-most, if you want |
| 13:14 | amalloy | or i guess it's in clojail, not lazybot |
| 13:14 | hiredman | I 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:14 | hiredman | and the classloader is thrown away every 10 minutes anyway |
| 13:15 | coventry | riddley.walk has a pretty complete static macroexpand-all. |
| 13:16 | amalloy | coventry: why implement that, given that clojure.tools.macro/mexpand-all exists? |
| 13:25 | hiredman | the actual issue seems to be the 1.6 snapshot clojurebot had didn't have the fix for ->> in it |
| 13:26 | coventry | amalloy: 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:26 | coventry | (Plus, riddley's not mine, anyway.) |
| 13:52 | danneu | How can I clean up nested `when-let`s? Here they are in a route: https://gist.github.com/danneu/7895990 |
| 13:53 | danneu | One year of Clojure and this is my best right here folks |
| 13:53 | Raynes | Great Scott! |
| 13:54 | amalloy | danneu: i mean, there's nothing *too* terrible about that |
| 13:54 | technomancy | one let + when/and |
| 13:55 | amalloy | technomancy: i don't think that works very well when he depends on previous values? |
| 13:55 | amalloy | danneu: many people have written a macro (when-lets [x foo, y bar] ...), though it's not fabulous |
| 13:55 | technomancy | oh sure |
| 13:56 | Raynes | Yeah, I can't think of tons of prettier ways to rewrite this. |
| 13:56 | amalloy | Raynes: switch to haskell, ???, profit |
| 13:56 | mdrogalis | What happens if a nil flows into one of the deeper functions, danneu? |
| 13:56 | amalloy | dat Maybe comprehension |
| 13:56 | tbaldridge | use a macro? |
| 13:57 | danneu | mdrogalis: nothing bad. i guess the idea was to short-circuit early |
| 13:58 | mdrogalis | danneu: If those functions fail hard and throw an exception, you can just use let's with some detatched error handling from Dire. |
| 13:58 | mdrogalis | I've seen a few people use it to evade monads. |
| 13:59 | tbaldridge | danneu: 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:00 | stuartsierra | danneu: depending on the use, `some->` may suffice |
| 14:00 | mdrogalis | The macro king. |
| 14:00 | danneu | cool. thanks team |
| 14:02 | tbaldridge | to be honest, I'm not completely sure why the standard when-let only supports a single binding. |
| 14:02 | stuartsierra | This has come up on the mailing list before. |
| 14:03 | TimMc | With explanation, or just speculation? |
| 14:03 | coventry | "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:03 | stuartsierra | If I recall, I think it came down to semantic ambiguity. |
| 14:03 | amalloy | stuartsierra: i think it's only ambiguous if you try to do it for if-let, not for when-let |
| 14:03 | stuartsierra | amalloy: That may have been the justification, for all I can remember. |
| 14:03 | amalloy | but maybe not; i might have been arguing semantic ambiguity myself last time |
| 14:04 | stuartsierra | I don't have a strong opinion. `some->` fulfills the most common use case. |
| 14:05 | danneu | clojuredocs.org could use a some-> example |
| 14:06 | danneu | oh yeah, it stopped at 1.3 |
| 14:09 | cldwalker__ | danneu: your example updated with some-> https://gist.github.com/cldwalker/7896195 |
| 14:14 | coventry | cldwalker__: That's slightly different semantics, though, in that it's hitting the db for the story before the chapter slug has been validated. |
| 14:41 | danneu | cldwalker__: thanks |
| 14:42 | bitemyapp | danneu: and |
| 14:43 | bitemyapp | danneu: actually wait, some-> is better. |
| 14:43 | bitemyapp | n/m |
| 14:55 | tuddman | I built a clojure library to "dynamically" push/pull/read data in and out of excel - https://github.com/tuddman/clj-dde |
| 14:56 | tuddman | it's early stage. if anyone needs that sort of thing, have at it. feedback welcome. |
| 14:56 | bitemyapp | tuddman: sounds pretty cool, announce it on the ML if you haven't! |
| 14:57 | tuddman | bitemyapp: not on said ML. (new to clojure) |
| 14:57 | bitemyapp | tuddman: the Clojure mailing list. |
| 14:59 | technomancy | "SML is the standard ML!" (to the tune of "ed is the standard editor!") |
| 15:01 | bitemyapp | technomancy: lol Bob Harper |
| 15:02 | ucb | bitemyapp: http://i.imgur.com/CgfWMA2.jpg |
| 15:03 | technomancy | http://www.georgehart.com/bagel/bagel.html |
| 15:04 | bitemyapp | technomancy: this explains why jewish people are well-represented in mathematics. They get topology lessons on Saturday night. |
| 15:05 | rlb | Is there a ring option to disable the non-ssl listener? |
| 15:05 | bitemyapp | ucb: you've found a greater trull than me. congrats. |
| 15:05 | bitemyapp | rlb: huh? |
| 15:06 | hiredman | rlb: last I checked the ring-jetty-adapter unconditionally enables it |
| 15:06 | rlb | bitemyapp: 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:07 | rlb | I'd like to just disable anything other than ssl-port. |
| 15:07 | hiredman | it is important to distinguish between ring the library of stuff, ring the spec, and ring adaptors |
| 15:07 | rlb | And it doesn't appreciate setting :port to false ;> |
| 15:08 | rlb | hiredman: ok, right -- I probably meant ring-jetty-adapter. |
| 15:08 | hiredman | rlb: 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:09 | hiredman | so lein ring server listening on the extra port for development, who cares |
| 15:09 | rlb | hiredman: thanks, no one has, though in this case, I'm just playing around. |
| 15:10 | technomancy | SSL termination in jetty itself is mildly sketchy |
| 15:11 | hiredman | now 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:11 | hiredman | technomancy: in what way? |
| 15:11 | technomancy | hiredman: you want your JVM running as root to sit on 443? |
| 15:12 | hiredman | technomancy: that assumes it will be an external services that needs to sit on the well known port |
| 15:12 | stuartsierra | Alternately, JSVC / Apache Commons Daemon lets you bind to a system port and then drop privileges like a good Unix process. |
| 15:12 | technomancy | true; for specialized cases it's fine |
| 15:12 | technomancy | it just sets off my "look out" pattern match |
| 15:13 | technomancy | stuartsierra: the jvm and "like a good Unix process" also sets off my "sketchy" pattern match |
| 15:13 | technomancy | but who knows; maybe it's fine |
| 15:13 | stuartsierra | haha |
| 15:15 | rlb | So 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:15 | justin_smith | yeah, it's a lot easier |
| 15:15 | justin_smith | and you want them in front of the app for security reasons too |
| 15:16 | hiredman | that is a common setup, but it is less flexible, for example if you want to be cool and do client side certificate auth |
| 15:18 | justin_smith | apache and nginx support that don't they? or are they just less flexible in their support? |
| 15:19 | rlb | hiredman: 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:19 | stuartsierra | I think the most common technique is to reverse proxy with Apache or nginx. |
| 15:19 | hiredman | justin_smith: it depends if you want to do it at the app layer |
| 15:20 | hiredman | rlb: *shrug* it is tradeoffs all the way down |
| 15:20 | justin_smith | right, of course |
| 15:22 | sveri | hi, 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:22 | sveri | any idea what is wrong there? |
| 15:22 | bitemyapp | rlb: that's not Ring, that's lein ring. |
| 15:22 | bitemyapp | rlb: that's also Jetty specific. |
| 15:23 | pbostrom | "don't use lein to run services out of a git checkout" <- what is the issue with this? |
| 15:26 | goraci | hi what the best way to refer function from other namespace ? require or use ? |
| 15:27 | stuartsierra | goraci: `require` always and forever, optionally with `:as` or `:refer` |
| 15:27 | seangrove | goraci: Always require |
| 15:27 | seangrove | sveri: Haven't used c2 at all, sorry - the code looks pretty reasonable |
| 15:28 | goraci | stuartsierra: in what case use preffered ? for what ? |
| 15:28 | bitemyapp | stuartsierra: protocols as a halfway step to ML functors. Thoughts? |
| 15:29 | coventry | goraci: use (use) for as a convenient way to grab stuff at the repl. |
| 15:29 | coventry | s/for// |
| 15:29 | stuartsierra | bitemyapp: that's basically what I Do |
| 15:30 | bitemyapp | stuartsierra: my suspicions are validated. Thanks. |
| 15:30 | bitemyapp | wanted to make certain I was seeing the bigger picture properly. |
| 15:32 | coventry | That 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:36 | jcromartie | so apparently you can have a protocol function and a defn in the same namespace with different arity? |
| 15:36 | jcromartie | could that potentially confuse things? it seems to work in my tests |
| 15:37 | stuartsierra | jcromartie: that won't work in general |
| 15:37 | jcromartie | define "in general", because in this particular case it works :) |
| 15:37 | jcromartie | (defprotocol Herp (derp [x y])) (defn derp [x] (derp x 42)) |
| 15:38 | stuartsierra | The later `defn` is overwriting the protocol function. |
| 15:38 | stuartsierra | It might seem to work in a few odd cases. |
| 15:38 | stuartsierra | But it definitely isn't intended to work that way. |
| 15:39 | jcromartie | hm |
| 15:39 | jcromartie | yeah I didn't think so (this was someone else's code) |
| 15:50 | technomancy | oh man I hadn't thought of client certs for jetty doing SSL |
| 15:50 | technomancy | I would heart that so much |
| 15:52 | sveri | seangrove: thats what i was thinking too :D |
| 15:57 | brainproxy | dnolen: have I possibly found a bug in clojurescript's range, or am I misunderstanding something: |
| 15:57 | brainproxy | https://gist.github.com/michaelsbradleyjr/7899410 |
| 16:01 | gfredericks | jcromartie: 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:01 | jcromartie | yeah but I wouldn't want to rely on that for sure |
| 16:01 | gfredericks | oh certainly; presumably any further references wouldn't work |
| 16:02 | jcromartie | somehow, it works, but I'll be refactoring it |
| 16:02 | jcromartie | the other guy on the project is a Clojure newb |
| 16:02 | jcromartie | but he picked it up amazingly well |
| 16:02 | jcromartie | nothing can phase him |
| 16:03 | jcromartie | or is that faze |
| 16:03 | jcromartie | hm, yes, it's "faze" |
| 16:03 | jcromartie | :) gotta love English |
| 16:10 | cored | hi |
| 16:10 | dnolen | brainproxy: a more informative paste that actually includes the output would be helpful :) |
| 16:10 | cored | is there a function that tells me the type of a value? |
| 16:10 | cored | something like (is-a? |
| 16:10 | dnolen | ,(type []) |
| 16:11 | clojurebot | clojure.lang.PersistentVector |
| 16:11 | brainproxy | dnolen: alright, wasn't sure if you could plop it into a repl |
| 16:11 | brainproxy | will improve it |
| 16:12 | cored | dnolen: thanks |
| 16:13 | noprompt | dnolen: this pure business is rocking my wold right now. |
| 16:13 | dnolen | noprompt: :) |
| 16:14 | dnolen | noprompt: 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:15 | noprompt | dnolen: did you see those little macros i put together around it? well, that plus a little hiccup. |
| 16:15 | cored | Applies fn f to the argument list formed by prepending intervening arguments to args. |
| 16:15 | cored | that's is kinda confusing |
| 16:15 | cored | can somebody explain it to me please |
| 16:15 | cored | I think that what is says is that I can apply a function to each element of an list, is that correct? |
| 16:16 | hiredman | it doesn't say each anywhere |
| 16:16 | noprompt | dnolen: looking forward to that new version. i'm using react.min.js right now to avoid the closure compiler complaints. :| |
| 16:16 | coventry | ,(apply (fn [& args] args) 1 2 3 4 (range 5)) |
| 16:16 | clojurebot | (1 2 3 4 0 ...) |
| 16:16 | coventry | ,(-> (apply (fn [& args] args) 1 2 3 4 (range 5)) str) |
| 16:16 | clojurebot | "(1 2 3 4 0 ...)" |
| 16:16 | coventry | ,(-> (apply (fn [& args] args) 1 2 3 4 (range 5)) pr-str) |
| 16:16 | clojurebot | "(1 2 3 4 0 ...)" |
| 16:16 | coventry | bah |
| 16:16 | cored | hm |
| 16:16 | dnolen | noprompt: yeah it's coming - just need to sort out this macro enhancement and I want to fix an issue with resolving namespaces |
| 16:17 | justin_smith | cored: also, for is-a? you may want implements? |
| 16:17 | cored | coventry: still don't get it |
| 16:17 | cored | justin_smith: thanks |
| 16:17 | dnolen | noprompt: yes the hiccup macros are pretty cool - want to get god looking api down that's just based on functions first though |
| 16:17 | justin_smith | wait, it isn't implements? |
| 16:18 | noprompt | dnolen: 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:18 | justin_smith | ,(instance? clojure.lang.ISeq ()) |
| 16:18 | clojurebot | true |
| 16:18 | justin_smith | that's the one, instance? |
| 16:18 | cored | justin_smith: oki |
| 16:18 | cored | so if I have a (range 4) |
| 16:18 | coventry | cored: (apply f a b c [d e f]) is the same as (apply f [a b c d e f]) |
| 16:18 | cored | and I want to use each value inside it |
| 16:19 | cored | I thought that I could use apply |
| 16:19 | coventry | cored: That's what that docstring means for example. |
| 16:19 | justin_smith | that helps if you want to check for protocol / interface compatibility |
| 16:19 | clojurebot | excusez-moi |
| 16:19 | noprompt | dnolen: but i'm interested to see what you come up with. |
| 16:19 | cored | but 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:20 | dnolen | CLJS feedback on this enhancement *greatly* appreciated - http://dev.clojure.org/jira/browse/CLJS-721 |
| 16:20 | coventry | ... and both forms give the same result as (f a b c d e f) |
| 16:20 | dnolen | trying to figure out what to support as far explicitly including macros stuff in one ns spec |
| 16:21 | brainproxy | dnolen: okay, I reworked my comments around the output (included in the gist) that I'm seeing in my browser's console |
| 16:21 | brainproxy | https://gist.github.com/michaelsbradleyjr/7899410 |
| 16:23 | seangrove | dnolen: This is to get away from having a (:require ...) and (:require-macros ...) when they come from the same ns? |
| 16:23 | dnolen | I'm thinking about leaving the enhancement out of :use since you really only need :require |
| 16:23 | dnolen | seangrove: yes |
| 16:23 | dnolen | so currently I'm thinking :require should support :include-macros true, and :refer-macros [...] |
| 16:23 | dnolen | and no support for this in :use |
| 16:25 | seangrove | :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:25 | noprompt | dnolen: oh that would be awesome. |
| 16:25 | dnolen | brainproxy: looks like a bug, please file a ticket, thanks |
| 16:25 | dnolen | seangrove: exactly |
| 16:26 | seangrove | dnolen: 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:27 | brainproxy | so basically you would have .cljs and .clj files side by side? |
| 16:27 | seangrove | technomancy: Was it you that had a patch to make namespace immutable with functional transformations? |
| 16:27 | brainproxy | i.e. with the same name other than the ext |
| 16:28 | dnolen | seangrove: agreed, but I think think wanting to keep the two same is very desirable because of the symbol resolution issues otherwise |
| 16:28 | dnolen | seangrove: definitely open to better ideas if anyone has them, but this seems to cover the use cases and it isn't too verbose |
| 16:29 | dnolen | and implementation is straightforward |
| 16:29 | tbaldridge | dnolen: so that would only pull in macros from that ns, or macros and fns? |
| 16:29 | technomancy | seangrove: no, but I was following up on some of the ancient discussions proposing to do so |
| 16:30 | dnolen | tbaldridge: well you can load fns from a macro file in CLJS |
| 16:30 | dnolen | s/can/can't |
| 16:31 | dnolen | tbaldridge: this is just sugar what I'm proposing will expand in to the base ns spec DSL |
| 16:36 | noprompt | dnolen: 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:37 | dnolen | noprompt: 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:38 | dnolen | so that why I'd like to see (:require [reactjs.dom :as dom :include-macros true]) for example |
| 16:38 | noprompt | dnolen: what are inlining macros? |
| 16:38 | dnolen | then all dom/foo calls inline into direct React calls, but you still get all the functional goodness |
| 16:39 | noprompt | ah |
| 16:39 | dnolen | noprompt: macros and fns can have the same name in ClojureScript unlike Clojure |
| 16:39 | dnolen | this is why you aren't paying function call overhead for basic stuff like array access, array length, arithmetic etc |
| 16:40 | noprompt | dnolen: maybe a bit off topic but has anyone come up with an idea for :refer/:rename? |
| 16:40 | noprompt | dnolen: or is that to hairy? |
| 16:40 | dnolen | noprompt: :refer is already supported, patch welcome for :rename |
| 16:42 | seangrove | technomancy: Someday, someday.... |
| 16:46 | tonie_ | 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:46 | tonie_ | trying to decide if i should write the application in clojurescript or javascript/angularjs |
| 16:48 | marcopolo2 | tonie_: I've been rewriting cryptic.io in clojurescript |
| 16:48 | noprompt | dnolen: have there been any suggestions? |
| 16:48 | dnolen | noprompt: there have not |
| 16:48 | bitemyapp | marcopolo2: this is a what? |
| 16:48 | marcopolo2 | I have to deal with webworkers, along with all the traditional worries in big client side apps |
| 16:49 | noprompt | dnolen: wow. that's surprising. seems like that'd have been a pain point for someone by now. |
| 16:49 | marcopolo2 | bitemyapp: ? |
| 16:49 | marcopolo2 | tonie_: The original prototype was built with backbone |
| 16:49 | bitemyapp | marcopolo2: what's cryptic.io? |
| 16:49 | dnolen | noprompt: I never use rename, mostly because I rely on :as |
| 16:49 | dnolen | noprompt: but rename would be nice if just to be consistent |
| 16:50 | marcopolo2 | bitemyapp: online storage, where everything is encrypted in the browser |
| 16:50 | bitemyapp | marcopolo2: client-side encryption? phew. |
| 16:50 | tonie_ | margopolo2: i'm cehcking out the site now. very interesting. did you use any frontend framework? |
| 16:51 | bitemyapp | marcopolo2: so nobody on the team has a background in cryptography? |
| 16:51 | nDuff | tonie_: 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:51 | marcopolo2 | tonie_: The site that's live is using backbone, you can find the initial work of cljs in the github repo |
| 16:51 | marcopolo2 | bitemyapp: We aren't making any new crypto schemes |
| 16:51 | nDuff | tonie_: ...but modeling state with atoms &c. made things quite pleasant; I'd do it again. |
| 16:52 | Cr8 | oh gods |
| 16:52 | marcopolo2 | bitemyapp: just using the good ol' CTR block ciper with AES-256 |
| 16:52 | Cr8 | MAC'd? |
| 16:52 | seangrove | nDuff: Did you not use advanced compilation/munging? |
| 16:52 | nDuff | seangrove: I did. |
| 16:52 | marcopolo2 | tonie_: I really like pedestal app, it makes it easy to focus on one part of the application at a time |
| 16:52 | bitemyapp | marcopolo2: but...client-side? |
| 16:52 | Cr8 | Good source of randomness for nonces? |
| 16:53 | seangrove | nDuff: How did JIRA manage to hurt your namespaces then? |
| 16:53 | bitemyapp | Cr8: /dev/urandom |
| 16:53 | seangrove | Also, how did you work around it? |
| 16:53 | Cr8 | bitemyapp: not in JS! |
| 16:53 | bitemyapp | Cr8: WHICH IS MY POINT |
| 16:53 | marcopolo2 | bitemyapp: I actually fixed Mega's own crypto :P |
| 16:53 | bitemyapp | marcopolo2: you can't fix something that doesn't have reliable access to /dev/urandom. |
| 16:53 | nDuff | seangrove: Google Closure's namespace loading appeared to look at whether an unmunged name exist and refused to load. |
| 16:53 | tonie_ | 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:53 | bitemyapp | this is why people can't even be trusted to deploy existing crypto, let alone implement new schemes. |
| 16:54 | marcopolo2 | bitemyapp: browser's have window.crypto.getRandomValues |
| 16:54 | tonie_ | nDuff: thank you for the advice. i'll keep that in mind |
| 16:54 | bitemyapp | marcopolo2: which provides insufficient entropy guarantees. |
| 16:54 | nDuff | seangrove: ...I ended up just temporarily removing their goog.string before loading the cljs-generated .js. |
| 16:55 | marcopolo2 | tonie_: 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:55 | bitemyapp | marcopolo2: did you guys consult with anybody that works in cryptography before building this? |
| 16:55 | bitemyapp | anybody credible* |
| 16:56 | tonie_ | 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:56 | marcopolo2 | bitemyapp: there is no reason we couldn't have people import their own generated private keys |
| 16:56 | marcopolo2 | bitemyapp: for the truly paranoid on the browser's random values |
| 16:57 | Apage43 | you still need a good nonce for every message you encrypt |
| 16:57 | seangrove | nDuff: Ah, that's a bit rough. Wish you could prefix the namespaces so multiple apps/versions of closure could co-exist |
| 16:57 | marcopolo2 | Apage43: that's right |
| 16:58 | seangrove | tonie_: 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:58 | Apage43 | also is the message MAC'd? |
| 16:58 | Apage43 | file body, w/e |
| 16:58 | marcopolo2 | bitemyapp: Apage43 Cryptic still has a bit to go before being open to the public, so it's free to get shaped by anyone |
| 16:58 | marcopolo2 | Apage43: uses CCM |
| 16:58 | Apage43 | ah |
| 16:59 | Apage43 | i read CTR earlier |
| 16:59 | marcopolo2 | well CTR is a part of CCM |
| 16:59 | tonie_ | seangrove: looking forward to trying it out. i'll have some free time over holiday break. i've heard good things about it |
| 16:59 | marcopolo2 | but you are right, I should have said CCM |
| 17:00 | nDuff | ...what's the status of pedestal 0.3? |
| 17:01 | marcopolo2 | tonie_: The google group for pedestal is pretty helpful, Ryan will usually answer questions daily |
| 17:01 | tonie_ | marcopolo2: good to know. will join that now |
| 17:05 | marcopolo2 | bitemyapp: 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:06 | Cr8 | if you take as given that the browser crypto is solid, we still have the issue that I *actually have to trust cryptic* |
| 17:06 | Cr8 | same 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:07 | Cr8 | there's not really a good way around that in the browser though |
| 17:07 | Cr8 | tarsnap is an example of a service I *don't have to trust* |
| 17:07 | Cr8 | because 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:08 | marcopolo2 | Cr8: 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:08 | Cr8 | but with browser stuff, I download a new copy of the client every time I visit the page |
| 17:09 | Cr8 | marcopolo2: 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:09 | marcopolo2 | Cr8: the extension would prevent code that isn't on the repo from going undetected |
| 17:10 | marcopolo2 | and if the repo has it, then we are accountable to that. But, it can't happen without someone noticing |
| 17:16 | tomjack | https://www.refheap.com/d1266cb7e64bd92b31fa8d9c9 |
| 17:17 | tomjack | I wonder if LazySeq's equals could be better about noticing identity? |
| 17:17 | tomjack | could/should |
| 17:17 | tomjack | guess you can just seq both sides |
| 17:18 | ivan | what about NaNs! |
| 17:18 | Cr8 | I'm wondering why that identical? returns true |
| 17:18 | ivan | NaNs prohibit equality optimizations everywhere |
| 17:18 | tomjack | :( |
| 17:19 | TimMc | &(map (memoize println) (repeat 32 Double/NaN)) |
| 17:19 | lazybot | ⇒ (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:20 | hyPiRion | hah, that's sort of funny |
| 17:23 | justin_smith | NaN NaN NaN NaN NaN NaN NaN NaN Batman |
| 17:24 | hyPiRion | ,(map print (conj (vec (repeat 16 (/ 0.0 0.0))) " batman ")) |
| 17:24 | clojurebot | (NaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaNNaN batman nil nil nil nil nil ...) |
| 17:24 | hyPiRion | yeah, you beat me to it |
| 17:48 | bitemyapp | marcopolo2: an indication that you worked with an actual expert |
| 17:48 | TimMc | &({Double/NaN 5} Double/NaN) |
| 17:48 | lazybot | ⇒ nil |
| 17:48 | bitemyapp | marcopolo2: instead of making the same mistakes every other non-crypto-expert makes |
| 17:48 | bitemyapp | like trusting browser entropy. |
| 17:50 | TimMc | OK, what am I missing -- how does memoize not run println over and over? |
| 17:51 | amalloy | TimMc: you're passing it a Double-wrapped version of Double/NaN, which is pointer-identical to itself |
| 17:52 | amalloy | &(let [x Double/NaN] (= x x)) |
| 17:52 | lazybot | ⇒ false |
| 17:52 | amalloy | &(let [x (Double. Double/NaN)] (= x x)) |
| 17:52 | lazybot | ⇒ true |
| 17:52 | TimMc | Oy vey. |
| 17:52 | bitemyapp | equality and identity are slip'ry |
| 17:53 | bitemyapp | TimMc: I have a fun fixed point puzzle somebody posted on Twitter if you want :D |
| 17:53 | amalloy | you could use (repeatedly (fn [] Double/NaN)) instead of (repeat Double/NaN), and then memoize wouldn't "work" |
| 17:53 | TimMc | &(find (hash-map Double/NaN 5) Double/NaN) ;; and why does wrapping not happen here? |
| 17:53 | lazybot | ⇒ nil |
| 17:53 | amalloy | TimMc: you wrapped it twice |
| 17:53 | amalloy | got two different Double instances |
| 17:53 | TimMc | Aha. |
| 17:54 | TimMc | Same NaN, different NaN. But all NaNs are different, except when they're the same. |
| 17:54 | TimMc | Very clear. |
| 17:54 | amalloy | i confess i would not have expected this behavior of memoize/NaN, but once you asked about it that was the only possible explanation |
| 17:55 | TimMc | So false is wrapped specially? |
| 17:56 | riley526 | clojurescript |
| 17:56 | riley526 | (woops, I meant to search, lol) |
| 17:57 | TimMc | Or... I guess every source of false (including the reader) is using Boolean/FALSE. |
| 17:58 | TimMc | No, wait... Boolean/FALSE is an object, Double/NaN is a primitive. |
| 18:00 | amalloy | well java the language doesn't exactly need Boolean/FALSE as a primitive, since that's a keyword already |
| 18:01 | TimMc | Yeah, that makes "sense". |
| 18:01 | amalloy | heh, exactly |
| 18:04 | TimMc | bitemyapp: Hit me. |
| 18:04 | magnars | technomancy: 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:05 | hiredman | magnars: say what? |
| 18:05 | technomancy | magnars: sure; just deploy it into file://$HOME/.m2/repository and add it to :dev :dependencies |
| 18:06 | hiredman | in what case do they behave differently? |
| 18:08 | jtoy | justin_smith: there is no navigation at http://caribou.github.io/caribou/docs/components.html |
| 18:08 | magnars | technomancy: 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:08 | technomancy | magnars: you can put your test jar on clojars |
| 18:08 | magnars | technomancy: oh, I would think that was rude somehow. :) |
| 18:09 | technomancy | there's tons of crazy stuff on clojars |
| 18:09 | musicalchair | let'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:09 | TimMc | I backup all my music to Clojars under the guise of a templating library. |
| 18:10 | musicalchair | might be easier to go the reverse way |
| 18:10 | musicalchair | or just do it manually.. hmm |
| 18:10 | justin_smith | jtoy: "Documentation" is a hyperlink, though it should make itself more clear as such |
| 18:10 | bitemyapp | TimMc: map fst $ filter snd $ zip [2..] $ map (=='"') $ fix show |
| 18:10 | justin_smith | jtoy: in fact there are many links, they just don't highlight on hover |
| 18:11 | bitemyapp | TimMc: figure out what it does without running it. |
| 18:11 | jtoy | cool |
| 18:11 | bitemyapp | TimMc: hoogling is allowed. |
| 18:11 | magnars | hiredman: 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:11 | TimMc | Oh, nope, don't know Haskell. |
| 18:11 | bitemyapp | TimMc: try! |
| 18:11 | bitemyapp | TimMc: I think you can do it :D |
| 18:12 | justin_smith | jtoy: yeah, as far as I am concerned it should be more obvious what parts of the text are links |
| 18:12 | magnars | technomancy: thanks for the help :) |
| 18:12 | TimMc | Man, I don't even know the precedence rules. |
| 18:13 | technomancy | precedence rules are the worst =( |
| 18:13 | hiredman | magnars: ah, differences in the url handlers |
| 18:14 | technomancy | the part of my brain that stores precedence rules has been re-allocated to more important tasks, please try again later |
| 18:15 | justin_smith | in the crazy mirror world of #clojure lolparens becomes lolprecedence |
| 18:15 | TimMc | bitemyapp: something like (map first (filter second (zip (range 2 Double/POSITIVE_INFINITY) (map (partial = \") (fix show)))) ? |
| 18:16 | amalloy | bitemyapp: that's weird. i tried to do it in my head but i was quite wrong about what (fix show) would return |
| 18:16 | amalloy | TimMc: yes |
| 18:19 | TimMc | bitemyapp: Got it. |
| 18:19 | technomancy | TimMc: can't you pass range a single arg? |
| 18:20 | TimMc | technomancy: Then it's an upper bound. |
| 18:20 | technomancy | oh gotcha |
| 18:21 | technomancy | (drop 2 (range)) |
| 18:21 | TimMc | hah |
| 18:21 | TimMc | Oh, I like that. |
| 18:21 | technomancy | =) |
| 18:21 | TimMc | Now you're thinking with seqs. |
| 18:22 | bitemyapp | amalloy: fix show is pretty crazy. |
| 18:22 | bitemyapp | TimMc: are you sure you have it right? |
| 18:22 | TimMc | No. |
| 18:22 | bitemyapp | nevermind, he got it. |
| 18:22 | bitemyapp | well, mostly. |
| 18:22 | TimMc | I did have to play with show a bit to find out what the hell it was. |
| 18:23 | bitemyapp | show wasn't the tricky part for me, it was fix. |
| 18:23 | bitemyapp | I understood fixed point functions but the implications for show confused me initially. |
| 18:23 | TimMc | I still don't know how fix is supposed to do that, but I just figured what it had to do. |
| 18:24 | bitemyapp | TimMc: non-strictness makes it work. |
| 18:24 | bitemyapp | non-strictness lets you get intermediate results from infinite recursion invocations |
| 18:25 | bitemyapp | almost like "reductions" |
| 18:25 | bitemyapp | infinitely recursive* |
| 18:25 | TimMc | How 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:25 | bitemyapp | TimMc: you think that's weird, you should try a strange loop like loeb! |
| 18:26 | TimMc | Hmm, this can be done in Clojure, yes? |
| 18:27 | Cr8 | is that because the result of show, being a String |
| 18:27 | Cr8 | the 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:27 | Cr8 | and so on |
| 18:27 | bitemyapp | TimMc: not properly, no. |
| 18:28 | bitemyapp | you can only imitate or fake it. |
| 18:28 | TimMc | I think it's possible. |
| 18:29 | bitemyapp | TimMc: it's a matter of mathematical possibility |
| 18:29 | bitemyapp | TimMc: anything you could come up with would be an imitation with different semantics. |
| 18:29 | bitemyapp | TimMc: non-strict and lazy languages can express things that are non-terminating infinite loops returning nothing in strict semantics. |
| 18:29 | TimMc | With show: seq -> seq, and fix (seq -> seq) -> seq |
| 18:29 | bitemyapp | ...that's not the same thing at all |
| 18:30 | bitemyapp | that's faking it with sequences. |
| 18:30 | TimMc | Fine. :-P |
| 18:30 | TimMc | I just mean within the scope of this exercise. |
| 18:31 | TimMc | I remember someone doing some knot-tying with seqs in this channel, let me dig it up. |
| 18:31 | bitemyapp | TimMc: fix of a function diverges if the function is strict in its arguments. |
| 18:32 | TimMc | ,(take 10 (let [p (promise)] @(deliver p (lazy-cat [1 1] (map + @p (rest @p)))))) ;; from hiredman |
| 18:32 | clojurebot | (1 1 2 3 5 ...) |
| 18:33 | dnolen | :include-macros and :refer-macros support in :require landed in CLJS master https://github.com/clojure/clojurescript/commit/de6ee41b3b0e26020e01b409f97e513bce87456d |
| 18:34 | bitemyapp | TimMc: that's not the same thing and you know it. |
| 18:34 | TimMc | Hmm, yeah, because map has to "participate" in the scheme. |
| 18:34 | bitemyapp | when you distort the semantics that much you might as well be writing C. |
| 18:35 | bitemyapp | nifty though. |
| 19:19 | rkneufeld | nDuff: slow going. There has been little movement as we became very scattered after Conj and leading into holidays |
| 19:28 | ztellman | does anyone know how to make the cider repl history persist between sessions? |
| 19:31 | justin_smith | ztellman: set the file name |
| 19:31 | ztellman | justin_smith: ah, it's unconfigured by default |
| 19:31 | justin_smith | (setq nrepl-history-file "~/.emacs.d/nrepl-history.eld") ; the nrepl version |
| 19:31 | justin_smith | I assume s/nrepl/cider and all is golden |
| 19:40 | amalloy | ztellman: finally giving up swank? |
| 19:41 | ztellman | amalloy: I switched away while I was feverish and weak |
| 19:41 | ztellman | I regret it already |
| 19:49 | amalloy | i'm kinda disappointed snackoverflow.com doesn't exist |
| 19:50 | hiredman | are you familiar with guthub.com? |
| 19:50 | amalloy | i have been there many times |
| 19:51 | hiredman | well, it is one of hte possible results from a snackoverflow |
| 19:54 | pjstadig | ah |
| 19:54 | pjstadig | snackoverflow |
| 19:54 | pjstadig | now there's a startup idea |
| 19:59 | justin_smith | snackernews |
| 20:03 | justin_smith | http://on.aol.com/video/snackoverflow-demo-at-hackathon-sf-2013-517925738 |
| 20:11 | bitemyapp | swank :( |
| 20:11 | bitemyapp | the cider stuff really just makes me more mad about having given up swank. |
| 20:14 | Bronsa | bitemyapp: I tried twice to transition from slime to nrepl.el/cider but after a couple of hours I had to switch back :/ |
| 20:15 | ddellacosta | bitemyapp: why? what's bad about cider comparatively? I never got familiar with swank, which is why I ask |
| 20:16 | coventry | ddellacosta: Debugging facilities worked a little better in swank. |
| 20:22 | bitemyapp | "a little" |
| 20:22 | Raynes | bitemyapp: Down boy. |
| 20:23 | bitemyapp | Raynes knows my pet peeves. |
| 20:23 | arrdem | bitemyapp: oi. do you know of a reasonable lambda calculus monads paper? |
| 20:23 | Raynes | I'm all up in your psyche. |
| 20:24 | bitemyapp | arrdem: closer to type theory, algebra, and category theory. |
| 20:24 | bitemyapp | arrdem: I don't think that's something you want to build up to from scratch from typed lambda calculus. |
| 20:25 | justin_smith | bitemyapp: how about a peano numbers based matrix algorithm? |
| 20:25 | justin_smith | lol |
| 20:25 | arrdem | bitemyapp: meh ok. |
| 20:25 | bitemyapp | arrdem: do you want to understand monads themselves or their relationship to other concepts? |
| 20:26 | arrdem | bitemyapp: I've been cramming typed lambda calculus all afternoon and I was hoping there was a reasonable mapping between the two |
| 20:26 | bitemyapp | arrdem: untyped or typed lambda calculus? |
| 20:26 | bitemyapp | arrdem: practical use of monads is built on type deduction if you're not fucking insane. |
| 20:26 | arrdem | bitemyapp: typed. I said that. |
| 20:27 | bitemyapp | sorry, my eyes skipped it |
| 20:27 | bitemyapp | arrdem: how close are you to something like System F or dependent types? |
| 20:27 | coventry | This 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:27 | coventry | It's a very accessible paper, though. |
| 20:27 | bitemyapp | arrdem: monads are higher-kinded types. |
| 20:27 | clojurebot | Titim gan éirí ort. |
| 20:27 | arrdem | coventry: okay yeah that's one of the things i'm reading. |
| 20:29 | bitemyapp | arrdem: 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:29 | bitemyapp | or algebraic types |
| 20:31 | coventry | When you say cramming, do you mean for an exam? |
| 20:31 | arrdem | coventry: finals man |
| 20:31 | bitemyapp | arrdem: you can't possibly need monads for finals? |
| 20:32 | arrdem | bitemyapp: I'm in a programming languages class. false. |
| 20:32 | bitemyapp | you're not at the university of glasgow though |
| 20:32 | arrdem | UT Austin wishes it was UGlasgow |
| 20:32 | bitemyapp | arrdem: the most thorough-going way to comprehend is to just write code. |
| 20:32 | bitemyapp | arrdem: or at least look at the monad laws |
| 20:32 | bitemyapp | and understand them algebraically. |
| 20:32 | bitemyapp | identity, bind, return. |
| 20:32 | bitemyapp | arrdem: http://www.haskell.org/haskellwiki/Monad_laws |
| 20:35 | coventry | Good luck! |
| 20:35 | bitemyapp | arrdem: good luck. I'm available tonight if you need any help with monads. |
| 20:38 | arrdem | thanks guys. |
| 20:49 | Raynes | arrdem: They're mostly just burritos. |
| 20:49 | Raynes | And monoids in the category of endofunctors (what's the problem?). |
| 20:50 | hyPiRion | arrdem: I know your pain, man. Good luck! |
| 20:50 | coventry | I 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:51 | coventry | Wadler says in that paper that category theory is completely unnecessary to understand monads-as-programming-construct. |
| 20:52 | coventry | But it might be necessary to the exam, I guess. |
| 20:54 | bitemyapp | monads are really simple... |
| 20:54 | bitemyapp | just write the code |
| 20:59 | talios | coventry - is it wrong that in reading that post, my only question is - whats a rabbit? :p |
| 21:01 | talios | and no, I don't really want an answer :) |
| 21:02 | arrdem | fukkit I'm just gonna get this to compile (http://www.haskell.org/pipermail/haskell-cafe/2006-November/019190.html) |
| 21:03 | coventry | talios: 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:03 | talios | heh |
| 21:04 | talios | I wonder if an Applicative is analogous to a butt-plug. |
| 21:05 | talios | No wait, I'm not wondering. no no no no no |
| 21:21 | dfuenzalida | Hi everyone |
| 21:22 | Shiro-Ichida | Hello. |
| 21:22 | dfuenzalida | can somebody help me with a ClojureScript and regex question? |
| 21:22 | TimMc | coventry: That's a pretty good blog post. |
| 21:24 | dfuenzalida | ...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:26 | TimMc | dfuenzalida: Regular expressions are different on different platforms. Maybe that's causing problems for you? |
| 21:26 | TimMc | s/platforms/hosts/ or whatever |
| 21:27 | arrdem | Raynes: you aren't helping here mate |
| 21:27 | Raynes | arrdem: I'm doing my best. |
| 21:27 | Raynes | <3 |
| 21:27 | dfuenzalida | TimMc: It seems I'll switch to .exec instead, thanks! |
| 21:28 | arrdem | bitemyapp: associativity is just m >>= a >>= b === m >>= b >>= a, right? |
| 21:29 | arrdem | bitemyapp: but that doesn't make any sense if you're going to overload >>= to achieve control flow |
| 21:29 | arrdem | *control flow manipulation |
| 21:29 | coventry | TimMc: justin_smith linked it here a couple of days ago. |
| 21:31 | amalloy | arrdem: that's not associativity, that's commutativity (which monads don't have) |
| 21:32 | arrdem | amalloy: that makes sense... I guess I'm reading the associativity law wrong. |
| 21:33 | amalloy | ((m >>= f) >>= g) = (m >>= \x -> ((f x) >>= g)) is associativity, i think |
| 21:35 | coventry | I think there are friendlier pages to look at regarding the monad laws than the one bitemyapp linked. |
| 21:35 | coventry | In 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:41 | talios | without 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:42 | ToxicFrog | Does clojure have a convenient wrapper around the Java sockets aPI? |
| 21:42 | talios | probably start with a Protocol with an implementation that uses concat-map tho |
| 21:42 | bitemyapp | arrdem: you can have commutative monoids! then they're abelian groups :D |
| 21:42 | bitemyapp | ToxicFrog: the Java API is convenient. |
| 21:43 | bitemyapp | talios: I brought #haskell to #clojure |
| 21:43 | bitemyapp | talios: I'm infecting the minds here |
| 21:43 | arrdem | ~bitemyapp |
| 21:43 | clojurebot | bitemyapp is it amuses me to mock other peoples' gods |
| 21:43 | talios | bitemyapp - hah, Frege or die :) |
| 21:43 | ToxicFrog | bitemyapp: 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:43 | brehaut | bitemyapp: sorry to disappoint, but konrad hinsen and jim duey were doing it years ago |
| 21:43 | brehaut | :P |
| 21:43 | talios | well, I'm playing with idris and its java backend currently |
| 21:43 | bitemyapp | talios: Frege is really neat, but if the choice is "or die", I'd go with Idris :P |
| 21:43 | talios | 'lo brehaut |
| 21:44 | brehaut | hi talios |
| 21:44 | talios | bitemyapp - I already have a fork of idris where I'm tinkering with improving its maven support |
| 21:44 | bitemyapp | brehaut: I'm fine with being the third wave. That's the one that usually wins right? |
| 21:44 | bitemyapp | talios: why maven? |
| 21:44 | brehaut | bitemyapp: i just recalled third wave ska and third wave punk. i dunno about that ;) |
| 21:44 | brehaut | bitemyapp: whoa careful, talios is a maven zealot |
| 21:45 | bitemyapp | brehaut: http://i.imgur.com/ONGuFw7.jpg |
| 21:48 | bitemyapp | brehaut: kooky. maybe even a little bit ooky? |
| 21:48 | brehaut | bitemyapp: mostly im giving talios crap :P |
| 21:48 | bitemyapp | brehaut: you should tease smalltalk users instead |
| 21:49 | arrdem | bitemyapp: those still exist? |
| 21:49 | brehaut | its hard to say; they arent seen outside of their image |
| 21:49 | bitemyapp | arrdem: dude, my twitter is a fucking wasteland the last 48 hours |
| 21:49 | bitemyapp | arrdem: of people using cockamamie dynamic languages defending their gods |
| 21:57 | Bronsa | tools.analyzer.jvm succesfully analyzed the whole core.async source+tests |
| 22:03 | gdev | Has anyone used Clojure in a game jam? Chris Granger's component entity system looks promising but I'm targeting the UDOO |
| 22:04 | marcopolo2 | gdev: UDOO? |
| 22:06 | ToxicFrog | Argh death to this entire API forever |
| 22:06 | gdev | Linux and arduino http://www.udoo.org/ |
| 22:07 | ToxicFrog | I 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:07 | gdev | marcopolo2, basically need to target ubuntu 12 |
| 22:13 | arrdem | Bronsa: friggin awesome! |
| 22:16 | gdev | ibdknox, for Chromashift you only had to write the system in pure javascript right? everything else was pretty clojurey |
| 22:26 | talios | bitemyapp - hah, I'm an ex smalltalk lover, frege lover, and maven zealot :) |
| 22:27 | talios | bitemyapp - hah, clojure isn't a cockamamie dynamic language? :) |
| 22:28 | bitemyapp | talios: one of the few well thought out ones. |
| 22:29 | talios | true, tho a few places could do with some more thought. it still has its fair share of wtf's in spots |
| 22:29 | talios | few and fare between, but they're still there a bit |
| 22:41 | bitemyapp | talios: I'm genuinely curious, where does the passion for maven come from? |
| 22:41 | bitemyapp | talios: I take it for granted, like running water and working indoor plumbing. |
| 22:43 | talios | bitemyapp - 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:43 | talios | leon, sbt, gradle, all seem to fail on that front. or at least have n number of 1/2 baked custom solutions |
| 22:49 | talios | lein even |
| 22:49 | talios | mmm, ironically I just got asked to install leon on the build server so we can get some lein projects building |
| 22:50 | talios | how does one install leon? :) |
| 22:50 | talios | lein |
| 22:50 | talios | stupid autocompleting irc client |
| 22:50 | talios | correcting even |
| 22:51 | arrdem | bitemyapp: so after much pondering, several papers and some heated arguments with classmates monads are friggin easy. |
| 22:55 | bitemyapp | arrdem: good, now explain them to me. |
| 22:56 | bitemyapp | talios: script |
| 22:56 | talios | well I just wget'd it and chmod+d it. now to work out how to get jenkins to use it |
| 22:56 | dsrx | a monad is like a burrito that doesn't leak its contents |
| 22:57 | Cr8 | autocomplect |
| 22:58 | bitemyapp | dsrx: fuck off with the innuendo. |
| 22:58 | arrdem | bitemyapp: 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:58 | dsrx | now i'm craving a burrito... |
| 22:58 | arrdem | getting not scared of >>= was the hardest part :P |
| 22:59 | dsrx | the thing i still struggle with with monads in haskell is using the *M (filterM, foldM, mapM) functions |
| 22:59 | bitemyapp | arrdem: cool. and you see the parallels to inversion of control right? |
| 22:59 | bitemyapp | arrdem: this is why Async in OCaml is built on monads, they're inversion of control callbacks for the async semantics. |
| 23:00 | bitemyapp | arrdem: also, monads don't need to have side effects |
| 23:00 | bitemyapp | arrdem: they can just be a way to box up non-determinism in general. |
| 23:01 | dsrx | the identity monad is a trivial example of that |
| 23:02 | arrdem | I mean it really isn't a callback at that point, it's a >>= chained call forwards over Maybe or something else, right? |
| 23:03 | bitemyapp | arrdem: no, it's basically a callback. |
| 23:03 | bitemyapp | arrdem: 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:03 | bitemyapp | arrdem: they're not callbacks in the sense that you manually do CPS, but the monad is definitely hollywood style. |
| 23:04 | bitemyapp | an event loop is managing the registered handlers in the monads |
| 23:04 | talios | does leiningen have any form of lifecycle? |
| 23:07 | bitemyapp | talios: waddat? |
| 23:08 | talios | a set of standard tasks to run, i.e. clean -> compile -> test -> install |
| 23:08 | bitemyapp | talios: it understands tasks dependency. |
| 23:09 | talios | it may - but what task to run :) that can change at whim per project |
| 23:09 | talios | i.e. test vs expectations |
| 23:09 | talios | "test" only runs some tests |
| 23:09 | talios | I like expectations as a framework, but f***k - running your tests in the VM shutdown hook? what idiot dreamed up that idea |
| 23:09 | talios | cockamamie I tell you :) |
| 23:10 | bitemyapp | yeah that's kinda dumb. |
| 23:11 | talios | took 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:11 | talios | gah |
| 23:27 | bellkev | Is 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:30 | technomancy | talios: the shutdown hook is pretty nutty; I think that's a ruby "innovation" |
| 23:30 | talios | go ruby! |
| 23:31 | arrdem | yeah ruby! eat that paint! |
| 23:31 | technomancy | you can add to lein's :prep-tasks, which all get called in sequence before any code gets eval'd |
| 23:31 | talios | weird - wonder why I disconnected there |
| 23:31 | technomancy | and you can shadow existing tasks with aliases to chains that include the original task |
| 23:31 | talios | technomancy - is that like a "default task set" that gets called if I just call "lein" |
| 23:32 | talios | or, usable as |
| 23:32 | technomancy | talios: no; `lein` -> `lein help` |
| 23:32 | technomancy | :prep-tasks is just "stuff that must run before the project is ready to eval any other code" |
| 23:33 | technomancy | we're working on programmatic manipulation of project.clj for 2.4.0 but were blocked for a long time on a lossless reader |
| 23:34 | arrdem | technomancy: don't we have that in tools.reader? it seems like writing metadata selectively would be the harder problem. |
| 23:35 | xeqi | bellkev: does using the :dev profile do what you want? |
| 23:35 | technomancy | arrdem: AFAIK tools.reader does not preserve comments |
| 23:35 | arrdem | technomancy: I believe you are correct. or whitespace. interesting point. |
| 23:35 | technomancy | but we have sleight now |
| 23:35 | technomancy | err |
| 23:35 | technomancy | sjacket |
| 23:35 | technomancy | eh |
| 23:35 | technomancy | screw whitespace |
| 23:36 | arrdem | yes... but no. the indentation of comments is meaningful sometimes. |
| 23:36 | arrdem | some MFST people I talked to had interesting comments about whitespace and comment preservation with automated refactoring. |
| 23:37 | coventry | 4clojure and Clojure Programming are still the best resources for complete beginners, right? |
| 23:37 | technomancy | arrdem: that's what ;; is for |
| 23:38 | arrdem | I think I've seem three codebases that used the ;+ convention... |
| 23:39 | arrdem | most just used ;; or ; in isolation |
| 23:39 | technomancy | maybe you'll see it more once we start to see code-rewriting tools |
| 23:40 | alandipert | technomancy: https://github.com/adereth/leiningherk/blob/master/lein.gk :-) |
| 23:40 | bellkev | xeqi: 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:40 | technomancy | alandipert: whaaaaaaaa |
| 23:40 | arrdem | alandipert: whatrudoing |
| 23:40 | technomancy | oh, bin/lein |
| 23:40 | technomancy | niiiice |
| 23:42 | amalloy | technomancy: i bet you feel dumb, now that there's a ;;;; port of lein ;;;; followed by only a hundred LOC |
| 23:46 | bellkev | xeqi: 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:48 | talios | right - enough of this lein malarky - lein != supported for now. contractor can suffer |
| 23:53 | cljr | hi, 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:54 | arrdem | ,(.toInt (first "\xff")) |
| 23:54 | clojurebot | #<RuntimeException java.lang.RuntimeException: Unsupported escape character: \x> |
| 23:55 | arrdem | $google java string hex literal |
| 23:55 | lazybot | [hex - \x Escape in Java? - Stack Overflow] http://stackoverflow.com/questions/3613759/ |
| 23:55 | cljr | arrdem: yeah i actually found "\u00ff" from that, but again it isn't the exact same and i dont know enough to continue |
| 23:57 | dcolish | 0xFF |
| 23:58 | arrdem | cljr: &&(= 0xff 0xFF) |
| 23:58 | arrdem | lazybot: HOW DO I USE YOU |
| 23:58 | TEttinger | ,"\0ff" |
| 23:58 | clojurebot | #<IllegalArgumentException java.lang.IllegalArgumentException: Invalid digit: f> |
| 23:59 | TEttinger | arrdem: ##(= 0xff 0xFF) |
| 23:59 | lazybot | ⇒ true |
| 23:59 | arrdem | (inc TEttinger) |
| 23:59 | lazybot | ⇒ 7 |
| 23:59 | arrdem | ~botsmack |
| 23:59 | clojurebot | clojurebot evades successfully! |
| 23:59 | arrdem | (dec clojurebot) |
| 23:59 | lazybot | ⇒ 31 |