#clojure logs

2012-12-26

00:27RaynesHere #clojure, have some markdown https://github.com/Raynes/cegdown
00:28FrozenlockEven if I prefer org-mode, I thank you for this :)
00:28Raynestechnomancy: Christmas is the time for miracles and miraculous libraries.
00:28philr"You can use the with to-html" s/the/them/
00:28technomancyRaynes: I was basically about to say that in my announcement tweet.
00:28Raynesphilr: Fixed.
00:29philrpedants can sleep easy once more.
00:29technomancyRaynes: now that you maintain an .md library may we look forward to future rants about how horrible the state of markdown is?
00:30Raynestechnomancy: It is a pretty thin wrapper. I don't have the right to rant.
00:30RaynesBut for your sake, I agree with you on every point.
00:31technomancycompletely bats
00:34bbloom,()
00:34clojurebot()
00:34bbloomwow. i find that surprising....
00:34bbloomi'd have expected an error, but i guess () wouldn't possibly mean anything else but an empty list
00:34technomancyhttps://github.com/technomancy/slamhound <- it's out; 1.3.0 doesn't suck for :require :as and will not tell you to use :use
00:34technomancythanks primarily to alex baranosky
00:34Raynestechnomancy: That sentence could have been worded so much better.
00:35Raynestechnomancy: "it's out; 1.3.0 doesn't suck for :require :as and will tell you not to :use"
00:35RaynesLike drugs. Get it?
00:35Raynestechnomancy: So what is slamhound useful again?
00:35technomancyRaynes: I live in Washington; things are different here.
00:35Raynesuseful for*
00:35RaynesI can't envision a usage right this second.
00:36technomancyRaynes: it will clear all the leftover crud out of your ns forms that has accumulated over time
00:36technomancyplus it'll organize/alphabetize them
00:36RaynesI have a dream of integrating tools like this and kibit (or whatever) with refheap.
00:36RaynesThat does sound cool.
00:36technomancyand pprint
00:36RaynesWouldn't it be cool to have a "slamhound" button on refheap that gave you a namespace form from your pasted code?
00:36RaynesWould you like this? Because I can make this happen.
00:37technomancyweeeeell
00:37technomancyit's basically impossible to sandbox
00:37technomancybecause it's all just compile over and over
00:37RaynesOh, it actually runs code?
00:37technomancyayup
00:37RaynesYuck
00:37RaynesI mean, i get why
00:37RaynesBut yuck for me.
00:37technomancyyeah
00:37technomancyoh, but also you can use it for other coolness
00:37RaynesOh well, was a fun idea.
00:38technomancyif you want to start using a var but you can't be arsed to look up what the ns is and add it to your :require clause, you can just run slamhound on it, and it'll do it for you
00:38technomancyliek magicks
00:38RaynesHaha
00:38RaynesNice
00:39technomancyalthough slamhound.el still uses slime; dang.
00:39technomancyneeds a refresh
00:39technomancystill, it's rad
00:39RaynesRad.
00:39RaynesYou're old.
00:41RaynesFrozenlock: Sorry man, but I ain't doing corg-mode.
00:41RaynesI wonder how many repos I have now.
00:42RaynesNice, I guess they don't give you an easy way to count them now.
00:42RaynesTo the tentaclemobile!
00:44Raynes85
00:44RaynesNot bad.
00:44RaynesI wonder if that translates to epeen inches.
00:46Raynestechnomancy: You have 145 public repositories.
00:46RaynesI just thought you should know.
00:47Raynestechnomancy: Didn't amalloy_ have some kind of github epeenometer somewhere?
00:48technomancyRaynes: yeah but it only measures when you joined =)
00:48RaynesAw.
00:48technomancyhttp://github-percentile.herokuapp.com
00:48Raynesamalloy_: Let's do a github epeenometer with number of repos.
00:48technomancyheh
00:49RaynesI'll provide the laser and the tentacles, you provide the web.
00:50technomancyit's been done a bunch of times
00:50technomancythough yours might distinguish itself by being honest about being an epeen-contest
01:06FrozenlockCljs in cljs awoke an old desire of mine... something like emacs/konkeror in clojure. Is there such a thing yet?
01:07RaynesNo.
01:16RaynesOkay guys. I've given you laser and cegdown. Now I need to play video games and whatnot. Merry Christmas.
03:29callenI've been reading the docs, feeling a little silly asking this, but how does one go about embedding a lein task/plugin in a project?
03:29callenlike for running scripts.
03:58dsantiagocallen: Are you trying to add a plugin to a project?
04:10callendsantiago: sorrrta. I'm actually on to a different problem now.
04:11callenNo suitable driver found for jdbc:postgresql://localhost/dbname when I try to run a migration.
04:11callenBeen flipping around my database url and deps for a bit now.
04:11callendsantiago: was I was thinking of is less of a proper plugin, and more of a way to run one-off scripts.
04:11callenwhat I*
04:11callendsantiago: but that's far more tractable than this damnable JDBC URL thing I'm somehow futzing u.
04:11dsantiagoDid you add the postgres jdbc jar to your deps?
04:12calleno' course, [postgresql/postgresql "9.1-901.jdbc4"]
04:12callendeps and dev-deps
04:12dsantiagoHuh, I dunno on that one then.
04:12callenlive is hell :(
04:12callenlife*
04:12callendsantiago: how have you been?
04:13dsantiagoGood, good. Holidays.
04:14callendsantiago: fantastic. I ended up coming to terms with Hiccup, using that until or unless somebody comes up with something better :)
04:15dsantiagoI'm still working on it, I am. Had so much family in town this past week.
04:15dsantiagoHaven't gotten anything done.
04:15callenI didna expect nuthin.
04:16callenthat's why I went with Hiccup for now. There's no pressure or anything, I'm happy with it for now.
04:16dsantiagoGood, good.
04:17callendsantiago: I'm only getting away with it because frontend guy wants to learn ClojureScript anyway
04:17callenso I told him he'd be getting tossed off the dock into the lake and told to learn to swim.
04:19dsantiagoWell, if he can handle JS coding, then surely he can write HTML in hiccup, I'd think.
04:20callendsantiago: people are more persnickety about syntax and attached to familiarity than you might generally suspect.
04:20callenI for one, rather like Hiccup now simply because of how *compact* it is.
04:20callendsantiago: you wouldn't happen to know how to reset the dependencies and force a re-download in a leiningen project would you?
04:21callenlein clean && lein deps doesn't seem to have done it.
04:21callenmeh. nuked ~/.m2
04:21callenthat kinda sucked though.
04:23callenno dice. jfc.
04:24callenhow do I always have these errors?
04:24Anderkentcallen what's the error you're getting?
04:27callenAnderkent: No suitable driver found for jdbc:postgresql://localhost/dbname when I try to run a migration.
04:27callenand yes, I have the postgres jdbc dep in my :deps
04:27callenand yes, I tried nuking my m2
04:28callenand yes, I'm getting to the point where I'm going to close my laptop and polish off that bottle of Russian vodka instead.
04:28dsantiagoWe might be at the point where you should paste some code and/or project.clj somewhere.
04:29callenoh yay, refheap is back up.
04:29callenhttps://www.refheap.com/paste/7861
04:30callendsantiago: ^^
04:30callendsantiago: nevermind...figured it out...
04:31callendsantiago: let me know if you can detect from that paste what an utter pillock I am.
04:31dsantiagoWell, you trying to splice the url in from getenv?
04:32callendsantiago: that wasn't the problem and I tested that the getenv thing was working earlier.
04:32callendsantiago: notice the profiles.clj? it runs in a different context than the project
04:32callendsantiago: project has the jdbc dep...my ~/.lein/profiles.clj did not...
04:33callenthis is how much the gods hate me.
04:33dsantiagoAh, OK.
04:33callennow to find out why it's not detecting my migration.
04:33callendsantiago: right? see. SOY ESTUPIDO.
04:34dsantiagoIf only you were talking right this moment to the guy who advocated for the addition of profiles to lein, and tell him off.
04:36callendsantiago: I'm bad at detecting sarcasm, I take it that was you?
04:37callendsantiago: so uh, I'm cool with profiles. I mean it caused me some pain when I had to move from lein v1 to lein v2, but a big fat warning about how the context for the ~/.lein/profiles.clj vs. ./project.clj woulda been cool.
04:37callendsantiago: try to have some mercy for the intellectual Tiny Tims of the world such as myself.
04:39dsantiagoHeh, yeah, I overstate it a bit. I wrote the original profile support back in cake, but Phil did all the work in lein 2.
04:39callendsantiago: either way, that was an unpleasant lesson with no clear GooglePath to wisdom. :P
04:40callenat least I had the brainwave myself
04:40callenFeel proud o' me self for that much.
04:42callenthat lying son of a bitch
05:00callenpjstadig: you wouldn't happen to be 'round, wouldya?
05:36callenyogthos: how much experience do you have wrangling leiningen profiles, plugins and/or migratus?
05:44callenis anyone here using Migratus?
05:51pjstadigi am now
05:52pjstadigcallen: ^
05:53callenpjstadig: I'm having a huge problem with migratus. I beg of you, please help me.
05:53pjstadigi shall try
05:53callenpjstadig: I've actually had a bit of a journey up to this point, but I'll tell you what's happening right now
05:53callenpjstadig: migratus doesn't seem to have my project's classpath when it runs, so it says it cannot find any migrations
05:53callenmy migrations are under src/migrations
05:53callenwith the appropriate filename
05:53callenI double-checked that it matches the exact regex and splitting code that migratus uses
05:54callenI injected classpath dumping code into the migratus jar to verify, it doesn't have my project's classpath at runtime.
05:54callenpjstadig: it tells me to go fly a kite here: https://github.com/pjstadig/migratus/blob/master/src/migratus/cli.clj#L40
05:54pjstadighow are you configuring migratus?
05:54callenboy lemme tell you.
05:55callenpjstadig: first question, are you using lein v2.0?
05:55pjstadigno
05:55pjstadignot yet
05:55callenthen I am likely totally fucked
05:55callenhttps://www.refheap.com/paste/7863
05:55callenI've been using 2.0 for some time now, and it's been 100% loss of my time, no gain at all.
05:55callensadly it's where things are going
05:55callenso I don't really have a choice.
05:56bawrIs it just me, or are all Clojure introduction / environment setup guides like a year old or more?
05:56callenbawr: yes
05:56callen2.0 broke a lot of stuff.
05:56bawrThat's... suboptimal.
05:56callenpjstadig: I've been assuming so far that I need to see /Users/callen/code/garbwell/test:/Users/callen/code/garbwell/src in my classpath
05:56callenfor it to see src/migrations
05:57callenif we assume that's correct, only my dependencies from my .m2/ are in my classpath when migratus is running.
05:57callenbawr: yes it is. I'll do a write-up if and when I can get all this shit working
05:57pjstadigcallen: moving migratus to 2.0 means i have to split out the lein part into a separated plugin project, which i've wanted to do anyway
05:57callenbawr: until then my hair is falling out and I'm alternating between drinking vodka and gulping coffee
05:57pjstadigbut i haven't worked it all out yet
05:57callenpjstadig: so it's totally broken?
05:57callenand I'm boned?
05:58pjstadigcallen: you are correct that only our dependencies from your .m2 would be in your classpath when running
05:58pjstadigif you want src/migrations to be on the classpath, then you need to run your app from a jar
05:58pjstadiglein package first or something
05:58callenvut. then how does migratus work?
05:58callen`lein migratus migrate` should just work.
05:58Anderkentls
05:58lazybotbin data dev home lost+found media opt sbin selinux src swap tmp usr
05:59Anderkentoups
05:59callenthere's a Rails hacker laughing at me somewhere.
05:59Anderkentwrong window
05:59pjstadigcallen: that works in your dev environment because generally src is on the classpath
05:59callenAnderkent: I'm still working on that problem btw.
05:59callenpjstadig: er, false, doesn't work in my dev environment.
05:59Anderkentsorry, I asked you about it then my laptop hung
05:59Anderkentand i rageleft to have breakfast
05:59callenAnderkent: I'm about to ragequit life.
05:59Anderkentso I didn't actually get your response or look at your problem :(
06:00callenpjstadig: I'm sitting here on my laptop, running it in my terminal on my thingy and it's "dev" insofar as the project running on my laptop locally is dev.
06:00callenpjstadig: and it's not working.
06:00Anderkentlet me look at the logs
06:00bawrcallen: looks like starting with the new leiningen at least makes one pull less hair
06:00pjstadignot deployed to production?
06:00pjstadigbut in a git checkout on your machine?
06:00callenpjstadig: no, I'm just trying to use your library for the first time ever
06:00callenpjstadig: I added migratus as a dependency, I'm trying to run my first migration ever locally
06:00callento a local postgres instance
06:01callenit's a little .sql file named in the way your system defines
06:01bawrcallen: although I already had to patch it up to have sane repl (up/down arrows not working in Windows, switched to cygwin, and needed to patch lain even then).
06:01callenI just need the goddamn migrations directory to be on the classpath
06:01callenbawr: that's weird, nrepl has always been fine for me in that respect.
06:01pjstadigwhat is the exact path of the file you're trying to run as a migration?
06:01Anderkentcallen: lein or mvn?
06:01callenbawr: my issues usually concern the classpath and the stuff 2.0 changed
06:01callenAnderkent: lein
06:01callen$ ls ./src/migrations/
06:01callen20121226014541-create-user-table.up.sql
06:02callen$ pwd
06:02callen/Users/callen/code/garbwell
06:02callenpjstadig: and don't tell me the file is mis-named, I checked it against your code with the regex personally.
06:02callenand I saw it gets split and destructured
06:02callenand that all worked fine
06:02pjstadigno the same looks right
06:02pjstadigs/same/name/
06:02Anderkentand if you do lein repl, go to the migrations namespace and try to open a resource called '2012....sql', does it give you null?
06:02callenAnderkent: the REPL has the right classpath
06:03callenAnderkent: I'd said that earlier
06:03pjstadigyeah so i think this is a lein 2.0 issue
06:03Anderkentsorry, wasn't here
06:03callenAnderkent: but when I dump the classpath in the migratus runtime it doesn't have it because it's a leiningen plugin that doesn't know about the project.
06:03bawrcallen: if you get the newest lein and do "lein repl", do up and down arrows work on windows?
06:03Anderkentah!
06:03callenpjstadig: I've established as much, I really just want to know how to fix it.
06:03pjstadigbecause when you are running `lein migratus migrate` it is using the plugin classpath, and your src dir is not on the class path
06:03bawrCould be some weird locale issue, I guess.
06:03callenbawr: I don't use windows
06:03callenbawr: sorry, might've misunderstood.
06:03Anderkentshouldn't the plugin do eval-in-project then?
06:03bawrYeah, normally neither do I. :)
06:03callenwhat Anderkent said. how do I do eval-in-project?
06:04pjstadigcallen: unless there's a way to get lein2 to add a specific directory to the classpath, then there's no way at the moment
06:04pjstadigmigratus needs to be upgraded to work with lein2 and have its lein plugin split into a separate project
06:04pjstadigit's been on my todo, and i should probably just do it
06:04callenso I'm fucked until then.
06:05pjstadiglet me check though, cause we just upgraded to lein2 at work and migratus is still working for us
06:05callenwat.
06:05callenhow is it...
06:05callenAnderkent: I see eval-in-project. Seems to be what's needed. Not sure what's required to port migratus though.
06:06pjstadigcallen: yeah, we just have migratus as a dependency in our dev and "normal" profiles
06:07Anderkentyeah, that seems too specific to this particular plugin that i've never used.
06:07pjstadignot in the plugin list
06:07callenpjstadig: I tried defining it in my profiles.clj, under :plugins, but it didn't work
06:07callenpjstadig: could you please explain?
06:07Anderkentare you tied to this migration library? I used drift without much issue
06:08callenAnderkent: it seemed lower friction than drift/ragtime/lobos
06:08callenin particular I wanted something I could use from the command line
06:08Anderkentdrift has a lein plugin
06:08callendrift and ragtime, IIRC, are too generic
06:08callenand require that you define everything
06:08callenI really just wanted something to execute some SQL and let get back to work.
06:08pjstadigcallen: something like this https://gist.github.com/4379615
06:09pjstadigAnderkent: drift requires you to use a DSL to describe migrations, which i specifically wanted to avoid with migratus
06:09pjstadigSQL is already a DSL
06:09callenwhat pjstadig said. I just wanted .sql files.
06:09pjstadigplus drift doesn't work with git
06:10callenpjstadig: I did that. 'migratus' is not a task.
06:10pjstadigit assumes a single global version for your database
06:11AnderkentI don't see how that claches with using git?
06:11callenAnderkent: try using feature branches sometime with an incrementing global version
06:11callenAnderkent: let me know how well that works for you.
06:11callenAnderkent: the workflow git encourages (non-linear) doesn't work with linear migration schema
06:11pjstadigif you have a git branch that has a migration named 15-something that gets merged after a branch that has a migration 17-something, then 15-something will never run
06:11Anderkentoh, I'd scratch and rebuild the database on dev when you switch branches
06:11Anderkentoh
06:11Anderkentuse dates
06:11Anderkent:)
06:12callenthat's kinda the point
06:12callendrift doesn't work like that.
06:12callendrift uses a global incrementing version
06:12pjstadigrails fixed this by using dates for migrations and allowing migrations to execute independently
06:12Anderkentno, drift allows you to use timestamp-based versioning
06:12pjstadiginstead of assuming "17 has run...oh then i can ignore anything less than that"
06:12callenit doesn't run the migrations independentlly
06:13callenwith or without timestamps
06:13pjstadigcallen: what does your project.clj look like now?
06:13callenjust because you change your global incrementing version to a timestamp doesn't change how it works
06:13callenpjstadig: https://www.refheap.com/paste/7864
06:13callenAnderkent: you have to have independent migrations for it to work.
06:13AnderkentI don't see the problem, yes you have to pay more attentnion when merging two branches that both did migrations, but you have to do it anyway with any migration framework...
06:14Anderkentwhat do you mean by independent migrations?
06:14callenpjstadig: what am I doing wrong?
06:14pjstadigcallen: oh, you know what, we don't use the lein plugin at work, which is why we don't have this problem
06:14callenwat.
06:14Anderkenthah
06:15callendfkohjosrjoighjogiorsethrdopjkgh AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGH
06:15pjstadigthe dev classpath is separate from the plugin classpath so that's why you don't see the migratus task when you have migratus in the dev classpath
06:15pjstadigwe have fixtures in our test suite that run the migrations for us
06:15callenI just want to run the migrations from the commandline.
06:15callenthat's all I want.
06:15pjstadigand we don't generally need to run our app apart from the tests
06:15Anderkentyou can try just making an alias for lein run -m leiningen.migratus
06:15pjstadigcallen: yeah your screwed by lein2
06:16Anderkentoh nvm that wouldn't work
06:16pjstadigi'll take this as a vote to work out the lein2 upgrade more post hastily
06:16callenpjstadig: that would be nice, but I'm kinda fucked until then.
06:16pjstadigcallen: you can't use lein1?
06:16Ralthi
06:17pjstadigthere's really no reason to upgrade except peer pressure
06:17Raltwhat's the difference between + and +' ?
06:17callenpjstadig: I'm not downgrading my leiningen for a migrations library.
06:17pjstadigsuit yourself :)
06:17callencemerick: migrations library: go.
06:17Anderkentyou can make a trivial plugin that just adds the migratus libraries to a projects runtime and then eval-in-project's the leiningen.migratus/migratus call
06:18callennope. fuck it, running the SQL myself with psql
06:18pjstadigcallen: you could actually install a lein1 executable and run them concurrently
06:18callenpjstadig: fuck that, I'm done.
06:18Anderkentcallen: see https://github.com/JacekLach/cloverage/blob/master/cloverage-lein-plugin/src/leiningen/cloverage.clj
06:18callenI have work to do.
06:18Anderkentit's 9 lines :P
06:18callenthis has sucked off the last like 3 fucking hours
06:18callenI'm done.
06:18Anderkentwell, guess that's a solution as well
06:19pjstadigsorry it hasn't worked out for you
06:19callenpjstadig: so is my sanity.
06:20pjstadigit's too bad that the whole clojure community seems to think they need to move to lein2 before it's actually released
06:20pjstadiglein1 works perfectly well
06:20callenpjstadig: the project I'm working on is partly a proof of concept of me trying to demonstrate that Clojure can be a practical choice to some colleagues.
06:20callenpjstadig: this isn't helping.
06:20pjstadighaha
06:21Anderkentso, coming back to running migrations independently, do you assume all migrations are idempotent and can be ran in any order?
06:21callendoes anyone here have any opinions for managing scripts in a Clojure/Leiningen project?
06:21Anderkentor do you sillently take any migrations with n > x down if you notice x wasn't ran, and then redo them?
06:22callenI'd like to not just start adding a bunch .sh files to my project with some semblance of structure
06:22Anderkentboth of these look like asking for trouble to me
06:22Raltwhere can I get the list of attribute maps?
06:23cemerick_callen: what are you trying to do?
06:23RaltI'm trying to understand the difference between + and +', and I see the only difference is in the attribute maps. Specifically, the inline attribute not being the same. But I can't find anything about this attribute...
06:23pjstadigAnderkent: no there is a table in the database that keeps track of each migration that has run, instead of just a single integer that represents all migrations that have run
06:23Anderkentpjstadig: so if you have migrations 1 2 and 4 ran, and you see migration 3 was not ran, what do you do?
06:24pjstadigcemerick_: i suck, so he wants you to write a migration library
06:24pjstadigAnderkent: run 3
06:24cemerick_pjstadig: what, for RDBMS?
06:25Anderkentpjstadig: I don't think that's correct though, running 3 then 4 and running 4 then 3 might have different results...
06:25pjstadigcemerick_: yes
06:25callencemerick_: yes
06:25cemerickgtfo
06:25pjstadigAnderkent: then don't do that
06:25cemerick:-P
06:25callencemerick: hatred for RDBMS? 4rlz?
06:25callencemerick: what should I use instead, MangoDB?
06:25Anderkentwell that's my point, you always want to run migrations in a well defined order, so tracking which one was most recent is sufficient
06:25cemerickcallen: no hatred, just no interest
06:26pjstadigAnderkent: if you want to merge git branches in unpredictable order, then you have to consider migrations independently
06:26cemerickI should have saved my gtfo for the mongo question.
06:26Anderkentif you add migrations in the 'middle', then you just have to roll back to state 0 and run all migrations
06:26pjstadigAnderkent: they always run in non-monotonically increasing order, but it only runs the migrations that are: on your branch, and haven't been run yet
06:27Anderkentobvlsy you don't want to ever push out something like that to production, but I suppose reordering migrations in dev is fine
06:27pjstadigregardless of what other migrations have run
06:28cemerickcallen: I've enjoyed couch (Cloudant, actually). Nothing wrong with RDBMS (I've abused pg occasionally, and some things you just need to use oracle or teradata for), but they're often just a PITA.
06:28cemerickmigrations being one aspect, of course
06:28bawrpjstadig: uh, "increasing" is a subset of "monotonic"
06:28callencemerick: I *hate* Couch
06:28callencemerick: sorry, I was being sarcastic earlier. I actually spend more time with NoSQL at work than I do RDBMS
06:29bawrpjstadig: I think you wanted "unevenly" or something
06:29callencemerick: which is partly why I don't have an established choice in migrations.
06:29callenI'm pretty close to saying fuggit and using MangoDB
06:29callenparticularly since psql is bitching about my .sql now.
06:31ziltiIs clj-sandbox the only whitelist sandbox for clojure?
06:33echo-areaIs it possible to write java files, that depends back on clojure, in leiningen?
06:34echo-areaI feel like I'm messing up leiningen, I make some clojure modules depend on java, and some java modules depend on clojure
06:37callenpjstadig: thanks for taking the time to investigate my issues with me
06:37callenpjstadig: I really appreciate it.
06:40pjstadigcallen: sure, sorry it wasn't a better experience, but like I said I'll prioritize upgrading to lein2
06:40pjstadigi've been avoiding it
06:41callenpjstadig: I'd love it so I can stop futzing around with my executing my SQL files manually :)
06:41callenalso, word to the wise, user is a reserved word in postgresql.
06:41callenderp.
06:47augustlcallen: if you're gonna say fuggit, you should consider datomic imo :) Been porting a mongo system to datomic over the weekend, works great
06:48augustland yes, we're yet another item in the set of "chose mongodb because it's easy to get started with but it wasn't really a good choice for the system"
06:48ziltiIs there some thing like full-text search in Datomic?
06:49augustlzilti: there is, it comes with lucene
06:49augustlzilti: I use elasticsearch though
06:51callenaugustl: not on your life
06:51ziltiaugustl: I'm almost sold. Don't need those fancy http-search-stuff things though, so lucene'll just be fine
06:51callenI'm not letting somebody else hold me hsotage for my data.
06:51augustlcallen: and fyi, we use the free version, seems to me that you only really need to pay when you need to scale a lot
06:51augustlcallen: because you can't access the source code you mean?
06:51callenaugustl: I don't care if it's free unless you're colored purple
06:51callenaugustl: I am not letting somebody else have control over my data
06:52callenperiod, end of story.
06:52ziltiThe only thing I can't find are the docs of Datomic. That just gives me a page header "Development Resources" without content.
06:52augustlcallen: and you're saying that because of source code access?
06:52callenaugustl: I'm not really in the mood to discuss it.
06:52augustlzilti: http://docs.datomic.com/
06:52callenaugustl: it's 100% out of the question though.
06:52augustlcallen: heh, you shouldn't throw out bombshells then :)
06:52augustlyou tickled my curiousity!
06:52callenaugustl: It hardly takes a genius to see that Datomic's setup is no different from Oracle's
06:52RaynesDatomic smells like dirty sumo underwear to me too, callen. Don't feel bad.
06:52ziltiaugustl: Just checked it, the page is broken for Opera.
06:53augustlzilti: it took me a while to understand the basics though, the docs are kind of abstract
06:53callenCompilerException java.lang.RuntimeException: Unable to find static field: getenv in class java.lang.System, compiling:(garbwell/utils.clj:4)
06:53callenhttps://www.refheap.com/paste/7866
06:53augustlzilti: hopefully this will help you: your schema defines attributes. In transactions, you create entities that gets IDs. You can associate any attribute with any entity (there's no tables/documents/etc)
06:53callenseriously? what am I doing wrong.
06:54callenRaynes: speaking of refheap, I noticed it's back up. Did heroku come back up or did you flip it around?
06:54augustlcallen: so is this still about source code? Not sure what you mean with setup.
06:54ziltiaugustl: So it's some kind of "semantic database"?
06:54augustlcallen: (System/getenv key)
06:54callenaugustl: business model, licensing, source access are all identical to Oracle
06:54callenaw shit.
06:54callenI see it now.
06:54Raynescallen: Heroku came back up at like 11AM yesterday or something.
06:54augustlor does System/getenv return a map when given no args? If so it should work
06:55callenaugustl: it returns a map given no args
06:55callenaugustl: but your suggestion told me what I did wrong anyway.
06:55Raynescallen: I'm strongly considering moving it back to amalloy_'s and my linode.
06:55augustlcallen: ah, (get (System/getenv) key) :)
06:55callenaugustl: da.
06:55augustlzilti: not sure what that means :)
06:56RaynesI pay $20 a month for something I can get for free with better uptime on Heroku, and I think my original reasons for moving to Heroku were silly anyways. I'll probably set up some sort of git-based deployment though, because I've grown attached to that part.
06:56ziltiaugustl: I probably don't, either :)
06:56Rayneson linode*
06:56augustlzilti: the other stuff is pretty clear in talks, that queries are on the client, transactor only does writes, etc. But the part I Just explained wasn't that evident to me at least
06:56callenRaynes: I've done a lot of automation of deployment at my day job, let me know if you want any pointers.
06:57callenRaynes: pity you weren't here earlier. I was bashing my head against the wall for a solid 3-4 hours. It's 0348 here and I've been awake since yesterday
06:57Raynescallen: Will do, and I appreciate the offer.
06:57RaynesIt's 5:48AM here and I've been awake since yesterday.
06:57RaynesYou and I are like two peas in a stay-awake pill commerical.
06:57Raynescommercial*
06:57ziltiaugustl: I'll definitely will check it out for my next project, but for my current one it's too late (I don't like changing things so deep down in a project, it might screw up everything)
06:58callenRaynes: heroku, MongoHQ, Datomic, they all tickle my spidey sense for various reasons. I don't really like being directly dependent on third party entities like that. Amusingly, technomancy had the same problem with grove.io admittedly of a less serious sort.
06:58augustlzilti: we're 6 months in and changed from mongo to datomic over a weekend, pretty happy with the modularity we achieved
06:59augustlcallen: I'm not sure why I don't mind datomic being closed source.. Guess I'm too much of a fanboy or something, normally I resent proprietary stuff in my systems.
06:59Raynescallen: I moved to Heroku because a bunch of pastebins shut down one after the other over DDOS attacks and I don't have any experience handling anything like that. AFAICT, 'handling' a ddos attack appears to mostly mean just shutting it off until it is over and crying.
06:59callenaugustl: if you normally resent proprietary stuff and you're okay with Datomic, then you're being irrational and fanboyism is a plausible explanation.
07:00callenRaynes: there are ways to mitigate DDOS, but if you're a small operation, it's rough.
07:01ziltiToo bad fleet db is dead. I really liked the way it works.
07:01callenaugustl: I cannot in good conscience allow anything I make, side project or in my day job, be unduly controlled by a third party entity like that.
07:02callenit's bad enough I'm subject to the whims of technomancy via lein ;)
07:02augustlcallen: datomic hasn't caused any problems for me yet though, unlike proprietary blobs on Linux desktop setups that breaks when I update the kernel etc.
07:02callenYou're really missing the point.
07:02callenaugustl: listen, I used to be a Microsoft .NET developer for a living.
07:03callenaugustl: I've heard every excuse on the planet for explaining away how it doesn't matter if it's not proprietary.
07:03callenaugustl: it matters and I'm not allowing it anything I build.
07:03callenif it's proprietary*
07:03RaynesDeep breaths
07:04callenRaynes: how was your Christmas anyway?
07:04RaynesWell, there was a tornado outbreak so I monitored meteorological data all day, but we escaped danger.
07:05RaynesI wrote https://github.com/Raynes/cegdown and did some laser stuff.
07:05callendoes anyone here know how to override/shutoff that obnoxious log4j shit in Korma?
07:05RaynesAte leftovers from Christmas eve.
07:05RaynesPlayed Far Cry 2 and Snapshot.
07:05RaynesIt was a good day.
07:05callenRaynes: ah, you like indie games too?
07:05callenRaynes: HIB?
07:06RaynesAll the time
07:06Anderkentcallen: log4j is usually controlled from a config file like src/log4j.xml
07:07RaynesOr resources/log4j.xml if you don't hate yourself.
07:07Anderkentyeah ment that but forgot the canonical place :)
07:08Anderkentthe readme for korma says to set logger "com.mchange" to WARN
07:09callenI know, I just resent being forced to use log4j.
07:13RaynesI wish somebody would take over Korma.
07:13RaynesIt's sad that so many people use it yet are unwilling to manage it.
07:14callenI couldn't get log4j to stop breaking
07:14callenI'm getting a little frustrated.
07:14callenNo appenders could be found for logger <--- despite having made that example xml
07:15callenguess I now need to learn how to configure log4j
07:15callenwhich I don't even want to use
07:15callenbut am forced to because of korma.
07:18callenRaynes: do you have a project that uses log4j that i can reference?
07:18RaynesNot sure if I have any open source ones. Might be one. Let me check
07:19callenI hate editing XMl.
07:19Anderkentwell, i think it's c3p0 actually, not korma. And unfortunately it seems it uses log4j directly, not slf4j, so yeah you've got no choice
07:19Anderkentyou can configure log4j with properties instead of xml if you prefer
07:19callenthat doesn't change much for me.
07:19callenit's still awful java shit leaking into my clojure
07:20Raynescallen: https://github.com/geni/geni-gedcom with the caveat that I do not remember if I ever got logging to actually work (I had to consult with a co-worker, but it was a while ago).
07:20RaynesI think I did.
07:20borkdudeRaynes read the README of laser, it looks nice
07:21dbushenkohi all
07:21dbushenkocan you please point me any presentations showing best of the clojure? some clojure propaganda
07:21callengot it working now.
07:21Raynesborkdude: It does lots more than what is in the README. I've just been working on it so fast that I haven't kept the README up to date. I'm changing things as I discover problems/things that need to be added while I rewrite refheap's views to use it.
07:22Raynescallen: Did my stuff help?
07:22RaynesI bet just my talking about it helped.
07:22RaynesI have that effect on you.
07:23callenRaynes: I googled the appender syntax for XML, put it in resources/ as you suggested, eventually got it working after futzing around
07:23callenmy database layer seems to be working now for pathological definitions of working
07:24callenI might go grab my vodka and have myself a good cry now, having spent 5+ hours just getting migrations and database access working
07:24Raynescallen: I've got some hard lemonade if you need.
07:26callenRaynes: 'ppreciate the offer. I'll just dump out my tea and coffee, switch to vodka, and call it a night. At least I'm close to implementing actual stuff now.
07:26callenthings were a lot easier when it was all lein1, Noir, and Mongo. I'll say that much.
07:26Raynescallen: Have a nice ... whatever time it is now.
07:26callenmoving to lein2, postgres/korma, ring/compojure all in one shot was not a great idea.
07:27RaynesI've made that mistake before.
07:27callenRaynes: 0418, cheers.
07:27RaynesI do one thing at a time now.
07:27RaynesCheers.
07:27callenRaynes: yeah, lesson learned.
07:27callenI should really know better, too.
07:33dbushenkois it possible to aot-compile records?
07:33jmlI'm working on a clojure project w/ a lein project.clj and nrepl-jack-in in my emacs. How do I do the equiv of 'lein run' from emacs?
07:33callenjml: M-x shell?
07:36Raynescallen, jml: M-& RET lein run
07:38jmlthanks.
07:39abaranoskyRaynes: what's the issue I hear about Korma not having a maintainer?
07:40abaranoskyRaynes: If needed I could consider maintaining it
07:41abaranoskyits pretty nice software, that I've been using happily.
08:18jmlwith incanter, how do you tell it that one of the columns of a dataset is a categorical variable? I've found categorical-var, but don't know how to actually use it to do what I want.
08:28degUsing nrepl in emacs, what's the best way to switch between multiple leiningen projects?
08:56pjstadigcallen: if you would be willing to give it a try, i think i may have something that works with lein2
08:56pjstadigcallen: set up your project.clj something like this https://github.com/pjstadig/migratus-lein/blob/master/test-project/project.clj
09:06ferdpjstadig: Thanks... migratus looks interesting. Could you give us a quick comparisson with other options? like ragtime ?
09:06ferdhttps://github.com/weavejester/ragtime/
09:11ziltiadd-watch is described as "alpha - subject to change". How high is the possibility that it gets severly altered or removed? Is it still there in 1.5?
09:12pjstadigferd: ragtime it a bit more complicated IMO, with conflict resolution strategies, and originally didn't use straight sql
09:13pjstadigferd: it also does not wrap a transaction around the entire transaction, which doesn't matter for mysql, but for databases with transactional DDL it does
09:14pjstadigdrift is nice, but it doesn't work with our git workflow where topic branches can be merged in different order that they were created
09:14pjstadigdrift also has a DSL, and I prefer to just use SQL, since it's already a DSL, and generally applications don't need data base independence (if that is even possible)
09:15pjstadiglibraries might, but applications usually don't
09:16pjstadigalso, if you're doing migrations in a library... God help you
09:17Anderkentwell, it's nice not to have to install postgres on every dev machine, seeing how much pain setting it up is
09:19pjstadigi've always found postgres very easy to setup if you use ident-based authentication
09:19AnderkentI still don't get the git issue, seems like you need to modify your migrations on merge anyway if you had both branches create some
09:19Anderkentsince you have to choose the canonical order to run them and handle any conflicts ..
09:20pjstadigyou don't need to modify migrations
09:20pjstadigif i create a branch and add a create table migration, why should i have to rename the file on a merge
09:20pjstadigand what about people that may have already run it with the old name
09:20Anderkentwell you still need to inspect for conflicts
09:21pjstadigif you have dependencies between your migrations, then you start your branch on a commit that contains the migrations you need to depend on
09:21pjstadigotherwise they have no business caring about each other
09:21pjstadigAnderkent: rails used to use a single global version for dbs like you are saying, but after they switched from svn to git they realized that that doesn't work so well with git workflows
09:21pjstadigand they changed to the way migratus does it
09:24AnderkentI always had a lot of issues with merging in migrations because of that, as they would run in wrong order instead of just scrapping the db and running everything in the right order
09:24Anderkentf.e. say you have two parallel branches and both add a column to a table
09:24Anderkentif you run them in different orders the order of columns will be different, which may matter
09:24Anderkenteven though the migrations do not really depend on each other
09:32ferdthanks pjstadig. I've run into the problem of merging from multiple branches... but as Anderkent points out, you still must pay close attention not to incur in "semantic" conflicts
09:33pjstadigAnderkent: yeah, i mean if other migration libraries work for you, that's cool, they weren't working for me
09:34ferdregarding the use of an internal DSL or plain SQL, I also prefer plain SQL. However, it'd be great if you could run arbitrary Clojure code as part of the migration steps... I found that need more than once
09:34Anderkentmhm, I kinda am thinking I'd like one that explicitly checks if all migrations < current state were ran and *fails* when they weren't
09:34Anderkentferd: drift on its own just runs your clojure code, you can use a dsl (drift-db) with it, but you can just directly send SQL to whatever db you want
09:39ferdlooks like ragtime follows a similar approach
10:05ziltiI have that very strange stacktrace here from running lein midje. It does not tell me what line of code in my program threw that exception nor could I find that out by uncommenting pretty much everything in my program: https://www.refheap.com/paste/7867
10:06ziltiException in thread "main" java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword
10:08ferdmay be your namespace definition ?
10:08ferdzilti: ^^^
10:11ziltiferd: Thanks! I forgot a pair of braces...
10:11gfredericks&(doc take-while)
10:11lazybot⇒ ------------------------- clojure.core/take-while ([pred coll]) Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects. nil
10:11gfredericks^ "returns true" is misleading
10:12gfredericksI guess once you're assuming it's a predicate...
10:13ferdzilti: I don't know why, but error checks on the (ns ...) macro is pretty weak (non-existent actually)
10:13Anderkentwhat else did you have in mind?
10:16ziltiferd: pff, why should there? I mean, who would make mistakes at such a simple thing as namespace declaration?
10:39zilti&(apply #(%) [{}])
10:39lazybotclojure.lang.ArityException: Wrong number of args (0) passed to: PersistentArrayMap
10:40gfredericks&({})
10:40lazybotclojure.lang.ArityException: Wrong number of args (0) passed to: PersistentArrayMap
10:41zilti&(apply #(identity %) [{}])
10:41lazybot⇒ {}
11:08degUsing emacs with nrepl, I just typed something in a .clj buffer that caused emacs to switch to a *nrepl-error* buffer and forcibly go back there each time I tried returning to the source file. Acts like something was erring at read-time or some such. But, I didn't type anything that unusual. Anyone ever see this before? Where do I report it (assuming I can reproduce it)?
11:09chouserI guess you'd report that to the nrepl.el author
11:10chouserLooks like he uses github issues: https://github.com/kingtim/nrepl.el/issues
11:11degchouser: thanks. Trying to reproduce the problem now. So far, no luck. (after restarting emacs)
11:13chouserI much prefer nrepl.el with nrepl-popup-stacktraces off
11:15degchouser: Hmm, I've never heard of nrepl-popup-stacktraces. From the name, sounds like it might be very nice. thx.
11:18degchouser: Ah, I see. looks nice.
11:19chouser*e still gets you the exception, and (pst) prints in the repl window
11:20degAlso, do you know how I can switch between multiple projects? (I don't really need both active concurrently, thought that would be nice too. My workflow is to spend a few hours on one project,then shift gears. And, I'd rather not have to restart emacs in between)
11:22chouserI think you can close the nrepl buffers and jack in again
11:24degok
11:40degIn nrepl, is *1 not bound to the last value returned?
11:41tpopeit is
12:02degtpope: Hmm, then something is faking me out or misconfigured.
12:04degin a cmdline lein repl, if I do (+ 3 4), then *1 is bound to 7. In the emacs *nrepl* buffer, it is bound to ().
12:10dimovichhello ppl
12:10dimovichcould someone drop me some code using edn?
12:22technomancycallen: did you see the clojars migration code?
12:23technomancycallen: a lein plugin to run migrations is silly IMO; it should just be an alias to lein run -m ...
12:23technomancyrun is how you expose in-project code on the command line
12:25technomancydeg: what version of nrepl.el? works for me on 1.5
12:40degtechnomancy: 1.6-preview
12:43technomancymust be a regression
12:46yedido you guys end up using SQL or noSQL more often?
12:47gtrakyedi: http://news.ycombinator.com/item?id=2416566
12:52ziltiyedi: I always use SQL because I'm too lazy to start with one of those NoSQL DBs.
12:53konr_trabWhat's the best way to implement in clojure a timer thing that calls a function every N seconds?
12:54technomancykonr_trab: executors!
12:55zilti,(loop [counter] (do (Thread/sleep 5000) (if-not (< counter 10) nil (recur (inc counter)))))
12:55clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: loop requires an even number of forms in binding vector in sandbox:>
12:56zilti,(loop [counter 0] (do (Thread/sleep 5000) (if-not (< counter 10) nil
12:56zilti (recur (inc counter))))) ;; Always wanted to try this on here followed by...
12:56clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
12:56gfredericksdoes `lein test` do something weird when looking up code? My test helper namespace is getting eval'd twice
12:56ziltiwhatever
12:58technomancygfredericks: it does require :reload
12:58technomancyin order to support interactive things
12:58gfredericksI see.
12:58gfrederickshokay.
12:59zilti,(loop [counter 0] (if (< counter 10) (do (Thread/sleep 5000) (println "still didn't timeout") (recur (inc counter))) nil))
12:59clojurebotExecution Timed Out
12:59zilti&(loop [counter 0] (if (< counter 10) (do (Thread/sleep 5000) (println "still didn't timeout") (recur (inc counter))) nil))
13:00lazybotExecution Timed Out!
13:00gfrederickszilti: the bots accept PMs as well
13:00ziltigfredericks: Sorry for spamming the channel, forgot about that...
13:33Anderkenttechnomancy: can i somehow stop leins test from calling System/exit when running them with clojure.test/run-tests? I wanted to try my code coverage tool on it, but it dies on some compilation tests.
13:34technomancyAnderkent: you should be able to bind leiningen.core.main/*exit-process?* to false
13:36Anderkentmhm, hoped for something that I could do without lein-specific code, guess I'll have to work with that
13:36technomancyAnderkent: oh, lein will never call System/exit just from run-tests
13:37Anderkentit does on its own tests (one of the compilation tests has compilation fail, which then triggers death)
13:37Anderkenteither that or i'm doing something wrong :)
13:37technomancyoh, for its own tests; I see
13:38technomancyyeah, you would have to rebind that var if you want to keep its own tests going after a failure
13:40degIs there some way to compare two regex's to see if they are the same. (I need this for tests, not production code, so no comments about why this is stupid or generally not a well-formed question)
13:40deg,[(= "A." "A." ) (= #"A." #"A." )]
13:40clojurebot[true false]
13:41technomancydeg: I think you have to str them first
13:41technomancyor prn maybe
13:41degtechnomancy: str does the trick, thank. I hadn't realized it worked on regexes.
13:41technomancystr works on anything =)
13:42degTries str on his pet dog. .... nope, not everything. :-)
13:43technomancywait till 1.5 is out; I think they added reader literals for mammals
13:43Anderkentyou just need to thread it through the interpreter
13:43technomancyonly slightly less useful than reader literals for UUIDs
13:44ziltiAnderkent: I see problems with the animal protection
13:44degGood thing it's not an OO language. I'd hate to see the standard newbie OO code of dogs barking written with reader macros.
13:45Anderkentzilti: you can work around that with reflection
13:46ziltideg: Nothing prevents you from implementing an object system for Clojure ;) Except your sanity.
13:46degoh god
13:46p_l... isn't there an object system already?
13:46Anderkentokay, different question. Can I somehow give file/line numbers for evalled statements?
13:46p_lin fact, isn't Clojure full of object, in the "old" style?
13:46p_l(before OOP became synonymous with inheritance, an orthogonal concept)
13:47ziltip_l: It is, but you'll have to use all those java-interop-things and a weird notation.
13:47ziltiI would not want to use it as it is now
13:47p_lzilti: I'm not talking about the java interop stuff :)
13:47p_lJava's stilted, limited OOP is not everything :)
13:48ziltip_l: You mean those protocol & friends macros?
13:49p_lyes. As well as multimethods etc.
13:49ziltiFor me that feels like interop stuff
13:49p_ljust because some were taught that OOP means inheritance and "methods in classes" doesn't mean it's 100% true :)
13:50technomancyclojure doesn't implement message-passing OO either though
13:50p_ltechnomancy: It does implement enough of "generic function" variant of OOP for me
13:51technomancyerlang is a lot closer to the original definition
13:52p_ltechnomancy: yes, though they don't like to hear that :)
13:54Anderkenti take the silence to mean there's no way to tell clojure which file/line to put in stacktrace when evalling forms?
13:54Anderkent(well, not silence exactly :P)
13:54technomancyAnderkent: have you tried attaching metadata to the form?
13:55technomancyI'm not sure exactly how, but I think that's where trace data is read from
13:56Anderkenthm. Now that I think about it I tried setting lines, but not the file name, should try it i guess
13:56Anderkenthard to debug stack traces where every other line says 'leiningen.core.project/fn (NO_SOURCE_FILE:1)' :P
13:57eggheadcan I use the standard -Darg=whatever on lein invocation?
13:57eggheadlike `lein run -Dhttp.port=1234` or something?
13:59yogthosAnderkent: you can also just restart the REPL it'll actually tell you what file/line it's dying in that way
13:59yogthosor is this something more sinister than that?
14:00Anderkentyogthos: alas it's not in the repl - I'm instrumenting source code and evaling the produced forms instead of original source
14:00yogthosahh
14:01technomancyegghead: you can set :jvm-opts in project.clj
14:02eggheadthanks technomancy
14:02eggheadtechnomancy: hashmap of keys/vals ?
14:03technomancyegghead: vector of strings
14:03eggheadkk, thanks
14:10Anderkentah-ha, `def` can have a docstring as well... How does it differentiate between a (def mystring "stringvalue") and (def my-unitialized-value "docstring") ? I suppose the latter is not possible?
14:14Anderkentbtw, how do you guys format (cond) statements? https://www.refheap.com/paste/7871 is fairly readable but shifts the code so far right you have to split even a simple statement over 3-4 lines
14:15technomancythere is no good way to format cond =(
14:16technomancyAnderkent: that paste actually looks like a good fit for pattern matching
14:17Anderkentremind me how do I do that in clojure?
14:17technomancyAnderkent: you have to pull in core.match: https://github.com/clojure/core.match
14:18Anderkentthanks, will look into it someday
14:22dnolenAnderkent: these days I usually format large cond's like this http://www.refheap.com/paste/7872
14:24Anderkentyeah I don't like it either but don't see a better way :P
14:27chouserwe need to teach clojure-mode about forms with pairs that should be indented extra for the second item of each pair
14:27chouserbindings (let, fn, etc.), cond
14:27technomancyit's like three pages long, state threaded throughout, no comments
14:28technomancyas a single defun =(
14:28chouserheh, yeah, I've looked at it. haven't touched it.
14:28technomancyI don't want to change the logic for let/fn though
14:28chouserI wanted to do the new syntax threading macros too, but those are extra tricky
14:29Anderkenthm. Can removing type hints break java interop code?
14:29technomancymostly cond just sits there taunting me for not switching to core.match
14:30technomancyI'm OK with that
14:32chouserAnderkent: I think it's possible.
14:32technomancyoh, clojure's indent is actually commented; nice. I was thinking of ruby-mode as the pit of nameless horrors.
14:34pjstadigAnderkent: depends on what you mean by break
14:35koikhttp://www.carolinaherrera.com/212/es/areyouonthelist?share=NVq56AQ2vxgECOtvW_3-cC_MeqWSEVkU2vlXs7SL5zHkz4rz3EUUdzs6j6FXsjB4447F-isvxjqkXd4Qey2GHw#teaser
14:35degJust wondering ... why did Clojure choose top-level pairs for forms like cond and let, rather than copying the Common Lisp idea of an extra level of parens?
14:36technomancydeg: Clojure reserves parens for calls with a few exceptions. it leads to much more regularity
14:37Anderkentpjstadig: code that used to work throws exceptions (i think a different java method is called, they dispatch on type, but the error message is rather terrible)
14:37ppppauli would like to use double quotes in my doc strings
14:37ppppaulany suggestions?
14:37Anderkenti suppose it's much more likely my macroexpansion is broken somewhere
14:37technomancyAnderkent: certainly possible. the main condition that would trigger that would be nil arguments. there might be others.
14:38technomancyppppaul: paredit will automatically escape them for you
14:38degtechnomancy: Yup, that makes sense. But, why not [] braces for each cond term and each pair of let bindings?
14:38Anderkenttechnomancy: can you expand on the nil arguments bit?
14:38ppppaulbut when they are escaped i can't evaluate my doc code
14:39technomancydeg: because that further dilutes the meaning of braces
14:39degtechnomancy: Is there a doc anywhere that disusses the historical decisions that shaped clojure?
14:39Anderkentppppaul: read-string on the doc string then eval that?
14:39chouserdeg: you're reading it
14:39ppppaulok
14:39technomancyAnderkent: for non-nil arguments, reflection can be used to find the "proper" method call at runtime. but that doesn't work when the arg is nil; it has to guess or something. bit fuzzy on the details.
14:39chouserdeg: historical notes at http://clojure-log.n01se.net/ :-)
14:40degchouser: Sigh. Besides the intense length of years of chat, is it even archived anywhere?
14:40Anderkentthat makes sense, thanks
14:40ppppaulread-string isn't doing anything different
14:40chouserdeg: so in short, no not really.
14:40ppppauli get errors when trying to eval the \"
14:40chouserdeg: the archive exists but yes, it's a lot of text.
14:41degtechnomancy: But [] is already used for the outer grouping around let bindings.
14:41technomancydeg: exactly
14:42degtechnomancy: ?? Are you saying "that was already a bad decision, so why compound it", or "it would be too confusing to overload '[' to mean both levels of bracketing"?
14:42Anderkent(let [[[[a b] & others] source]]
14:42Anderkentno thanks.
14:43technomancydeg: it would be overloaded and probably introduce ambiguity when it comes to destructuring
14:43technomancyalso, it wouldn't improve readability
14:43degYup, I forgot about destructiong. Definitely a big win of Clojure over CL.
14:43technomancyplus you can always drop commas in if you need more visual separation
14:44degBut, the nice thing about parens in CL was how well it interplayed with emacs indentation.
14:44pjstadigAnderkent: when clojure compiles code it can only dispatch on arity, so if you have a Java class with more than one overload for a single method, and each overload has the same number of arguments, but different types, then type hints are necessary and removing them can break code
14:44pjstadigbut the exception you'd get would be like method not found or something
14:44pjstadigif you're experiencing some other kind of problem, then it is probably not type hint related
14:44technomancypjstadig: that doesn't take into account runtime reflection though
14:45degtechnomancy: Do folks really use commas much? I had assumed they were mostly just thrown in as a nicety for java programmers used to them.
14:45ppppauli use commas everywhere
14:45technomancydeg: you see them sometimes when keeping multiple let bindings on a single line
14:45degBut, getting back to the original question, I wonder if commas could enhance readability in a cond form too?
14:45technomancyI usually use line breaks instead
14:45ziltiI never use them. It clutters the code
14:46zilticommas
14:46ppppaul(->> foo-array (map identity ,,,))
14:46technomancydeg: IMO newlines are better in cond, but sometimes when the test clause is long it's not feasible
14:47technomancydeg: but even then you'd put the commas at the end of the value, which is not that helpful because the ambiguity is present at the beginning of the line
14:48degAgreed. I'm not a fan of commas. I am a strong fan of proper indentation, and I want my editor to do the work for me. So, I guess the only answer that would make me happy is smarter indenting by Emacs.
14:48Anderkentwhen adding a debug log statement fixes the bug, you know you're screwed :S
14:48technomancydeg: or stop using cond =)
14:49degtechnomancy: commas at the beginning of the line would look a bit weird (especially to anyone coming from a CL macro world!), but would actually force the indentation to be more readable. I can't believe I'm suggesting this, though.
14:49pjstadigtechnomancy: even with non nil arguments there are type based overloads that are ambiguous at runtime
14:49technomancypjstadig: true; nil is just the most common case
14:50technomancydeg: yeah, it might improve readability at the expense of offending taste =)
14:51degYou just need to bring some old teco programmers into the community. They'd love it.
14:52technomancyheh
15:07dsop_hmm where did datalog.utils go?
15:07dsop_from old contrib
15:07dsop_in particular the map-values fn
15:13yedican someone link to an article that presents reasons for using clojure in the browser
15:14lucianjedi: there are quite a few. the main reason anyone would use something other than js in a browser is to avoid js
15:19kovasyedi: if u are using clojure on the backend, it makes for a sweet combination. can just pass clojure data structures. also just need to keep 1 language paradigm in your head.
15:20kovasyedi: clojurescript without clojure on back end has advantages, buts its a harder sell imho
15:22luciankovas: it's not js, that's enough for me. it's just a pain to work with because it depends on the slow-ass jvm
15:23lucianif clojurescript was self-hosting, it'd be a much easier sell
15:23yedilucian: thats what it seems like, but i like JS which makes me a bit hesitant to switch
15:23kovaslucian: I agree totally :)
15:23lucianyedi: JS is quite flawed, so pretty much anything beats it
15:23kovaslucian: still i think cljs is harder to get into for a clojure newbiew
15:24kovas(if you aren't already sold on clojure)
15:24kovas2013: the year of cljs self hosting
15:24kovasthey are getting closer
15:25bblooms/they/we/ you can help too :-)
15:25kovastrust me ill be an early adopter
15:25kovasneed that shit for session
15:26kovasbut i don't understand the core language stuff well enough
15:26kovas"vars and their discontents"
15:26bbloomkovas: i learned clojure by studying the cljs compiler. it's actually quite approachable. dig in, you might have fun!
15:26tpopesounds terrifying
15:27kovasbbloom: i will get there!
15:27kovas"twilight of the namespaces"
15:28jonasenkovas: Any reason you track changes to cljs generated js files? It's hard to read the diffs ( https://github.com/kovasb/session/commit/3cc368ba42ead84894861a6c8f8a426fe69f22a6 )
15:29kovasjonasen: the idea was so people could run session without first running cljsbuild
15:29kovasjonasen: but maybe that is a misguided idea
15:29AnderkentAH! it was indeed the nil issue technomancy, shame on me for doubting you. Now I need to make my instrumentation preserve type hints...
15:29kovasjonasen: what do you think?
15:30jonasenkovas: I don't think "lein cljsbuild once" is particularly difficult to type :)
15:30kovasjonasen: yeah, I guess I just wanted to minimize the chances of something going wrong.
15:30kovasjonasen: but at this point, better to optimize for dev happiness
15:31kovasjonasen: should I just put the output directory into .gitignore and then git rm those files?
15:32jonasenkovas: that should work. And update the README
15:32kovasok i am on it
15:43kovasjonasen: ok, purged the files. in general the clojure files come last in the diffs
15:48Anderkentanyone know how type hints work? :P
15:50bbloom~anyone
15:50bbloomeh, our bots are slow.... Anderkent: *somebody* must know. so just ask your question & maybe somebody will answer it :-)
15:52Anderkentthat was pretty much my question ^^ I'm looking for how they're parsed from the form and how to preserve them when doing modifications on source, but even a pointer to the related compiler code would help
15:53bbloomAnderkent: the keyword to grep for is :tag
15:54AnderkentI'm also rather confused by how the FN special seems to have no parser assigned in Compiler.java ..
15:54chouser,(read-string "^Foo bar")
15:54clojurebotbar
15:54chouser,(meta (read-string "^Foo bar"))
15:54clojurebot{:tag Foo}
15:54chouser,(type (:tag (meta (read-string "^Foo bar"))))
15:54clojurebotclojure.lang.Symbol
15:55Anderkenthow do I extract one for function args?
15:55Anderkent(function return is easier, just (meta #'function-symbol)
15:56chouserok, it's time to talk about compiler phases. :-)
15:56bbloomchouser: hurray! i want them in cljs :-)
15:57chousercljs has them
15:57bbloomanalyze vs emit doesn't count
15:57chouserif anything it has more, or at least better defined, phases
15:57chouserit does count! It's what Anderkent needs to know, I think.
15:57chouserbbloom: what phases are you talking about?
15:58bbloomdur, i read "phases" as "passes"
15:58bbloomi'd like to see analyze broken up into parse, expand, hinting, etc
15:58bbloomthere's lots of stuff all mixed together in analyze right now
15:59Anderkentah! so the :arglist keyword in a functions meta has its arguments, and these are tagged with types
15:59bbloomcodeq, for example, wants to be able to search over the unexpanded source code, which isn't possible currently b/c analyze expands
15:59bbloomplenty of other use cases too
16:00bbloomAnderkent: to answer your question about the FN special, grep "FnExpr.parse", it's in analyzeSeq
16:00Anderkentthanks
16:00AnderkentI think I might be able to avoid that
16:00bbloomavoid what where?
16:00Anderkentif I just make sure to keep all the meta in the right places...
16:00Anderkentavoid looking into that
16:01bbloomwon't hurt you to look (as long as you don't show hidden whitespace... *cringe*)
16:02Anderkentwell kinda want to get stuff done so looking into compiler internals is not the preferred course of action
16:10gtrakis there a way to create a top-level lexical binding for all compojure routes in a defroutes statement without resorting to a var? I'm afraid this is one of these 'macros don't compose' cases
16:12gtrakI might make a macro that wraps them all and makes the binding available
16:13jlewisis there a canonical union find implementation for clojure?
16:13jlewisand if not, is the community interested in non-persistent data structures living in clojure contrib?
16:13bbloomjlewis: "union find"? do you mean set itersection?
16:14jlewisunion find keeps track of elements that live in a bunch of disjoint sets
16:15amalloyjlewis: i have a closed-source implementation of union-find somewhere. let me see how much of it is salvageable
16:16jlewisi wrote one too, having not been able to find a nice one on the internets... but it's all ref-y, i'm not sure if people like non-persistent data structures here in clojure land :P
16:17amalloyjlewis: no, and i think it's a good exercise doing this without refs. mostly you end up passing/returning the forest around to a bunch of functions, instead of mutating it globally
16:17amalloymine doesn't have any mutation, but i'm afraid there's rather a lot of business logic mixed in, since we couldn't afford the space or time to be more general
16:18jlewisamalloy: i think you end up killing the nice time bounds if you make it persistent with path copying, though :/
16:18amalloynaw
16:19amalloythe paths are extremely shallow in unino-find, and even if they weren't log32(n) is near enough to constant
16:19amalloyeg, we ran this on a dataset of, i dunno, a few hundred million items, and were easily outpacing the speed with which we could get nodes from the database
16:21amalloyhave you read the wikipedia page on union-find? i was floored by a couple sentences in there about the complexity guarantees
16:21bbloomhm, i've done things like this before, had no idea it was called this... thanks i learned something :-)
16:21jlewisi don't think it helps that much that the paths are shallow, unless you're imagining doing it in a different way than me
16:21jlewisimagine you have 5 elements pointing at the root r
16:21jlewisand you're looking up the the 3rd element, or something
16:22jlewisif you do the path compression optimization, then i think you end up having to do a search to fix up the first couple of elements if its not mutable, right?
16:22jlewisbecause you're going to create a brand new node for the middle elements, up to the root
16:22jlewisbut then the nodes at the bottom will still be pointing at the old elements..
16:22jlewiswell that was as clear as mud, do you know what i mean though?
16:26amalloyjlewis: like i said, you need to pass and return the forest to more functions than if you were mutating. for example, the find operation can't just return a node, it has to return a new path-compressed forest, like https://gist.github.com/2df01576cd9843d34b10
16:32jlewisamalloy: i sent you a comment on that gist
16:35gtrakis there such a thing as macro-level apply?
16:36gtrakI want to make a macro that wraps a bunch of forms and returns a bunch of forms, but not as a seq
16:36amalloyno there isn't
16:36chouserA macro can return a list starting with 'do
16:36S11001001gtrak: no, macros aren't fun
16:37gtrakdamn
16:37gtrakspecifically, I want to wrap each handler in defroutes
16:37amalloygtrak: then chouser's advice is relevant
16:37gtrakhmm
16:38chouserI don't know compojure well enough to say, but if there's functionality that accessible only via macro, this is exactly the kind of pain you end up in.
16:38gtrakyea, that's the case
16:38amalloychouser: there isn't any; compojure is pretty good about that
16:38gtrakah, then I am unwise
16:38amalloyweavejester says he regrets adding defroutes, because it makes people think routes doesn't exist
16:39chouserinteresting
16:39gtrak:-)
16:39jkkramerGET and friends are macros
16:39jkkramerhowever, you can probably still do what you want with functions
16:39gtrakI can wrap an individual GET easily enough
16:39gtrakI have to use a macro for the sake of symbol-capture
16:39amalloythat's fair, jkkramer. i bet they delegate to a function pretty fast, though
16:39jkkramergtrak: are you sure? can you explain the scenario?
16:40jkkrameramalloy: yeah, and it's a sensible choice, I think - it allows easy request/param destructuring
16:40gtrakjkkramer: we (not I) don't want to use a var, but are ending up with a lot of destructuring boilerplate in every handler, so I'm going to bind a symbol to a get-in call and wrap the handler definition
16:41amalloyi guess GET uses compile-route, which does an awful lot of macro magic. i guess the good news is you never seem to need GET as a function
16:41gtrakmy first choice would be to use a middleware and a var... but hopefully this workaround is enough to make my colleagues reconsider :-)
16:44jkkramergtrak: middleware sounds like a good option but it's hard to say without seeing specifics
16:45gtrakjkkramer: yea, I hate when implementation is specified from above, but I can work around constraints, especially in a lisp :-)
16:46gtrakit's easy enough to write something that acts like a var without being a var
16:47jkkramerit's considered bad practice by some, but I often end up having handlers take a full request maps or params instead of doing elaborate destructuring in the routes
16:47jkkramerI like thin routes
16:47gtrakjkkramer: yea, I do that sometimes
16:47gtrakin particular when I want to decomplect body-params from params
16:50gtrakI agree in general with thin routes, but sometimes it gets so hairy that pulling things out into functions makes it worse
16:51gtrakI blame it on the increased likelihood of control-flow in routes over normal clojure
16:52gtraknil-punning and things are harder to deal with when they're more spread out
16:54rbxbxare there any OSS apps that demonstrate proper route/route-handling decomposition? The only larger app I've been able to reference has been 4clojure /c gtrak
16:54gtrakproper.... don't know the answer to that
16:55gtrakthe nice thing about clojure is how easy it is to avoid patterns...
16:55rbxbxProper was perhaps a poor choice of words
16:55rbxbxmaybe... "generally agreeable" :)
16:56Hodappgtrak: avoid patterns?
16:56gtrakI haven't looked at anything like that myself :-).. though our routes layer is about 1k right now
16:56gtrak1k lines
16:56amalloyhah. glad to hear 4clojure's counts as proper
16:57gtrakHodapp: yea... there's very little repetitiveness, therefore it's hard to read code and see trends
16:59Hodappgtrak: very compressed, in other words?
16:59gtrakyes
16:59Hodappgtrak: but if it's *hard* to read code, why is it a good thing that Clojure makes it easy?
16:59gtrakbecause it's more signal than noise
16:59gtrakhopefully
16:59Hodapphah
17:00gtrakit's certainly easier to read 5 lines that all look the same, in terms of lines-read per second
17:00Hodappbut repetition is certainly a red flag that something could be abstracted better
17:00gtrakyea... therefore good clojure code is really hard to read :-)
17:01gtrakbut after you understand it, you might not want to change it
17:01gtrakat least, that's what I think
17:01HodappWell... I dunno if 'hard to read' is what it is. It can be concise without being overly dense.
17:02HodappProgramming Clojure, I seem to recall, talked about how often lower-level code would be 'hiding' a pattern inside it
17:04gtrakyes..
17:04gtrakwould you rather read code via reading the leaves (java)? or be given a choice of how to traverse the tree? that's kinda how I see it.
17:06kevin_rh80Does anyone know if "lein nrepl" ignores the jvm-opts from your project.clj file?
17:07Hodappgtrak: well, my point is just that usually in the latter, it's not harder to read, it's easier because the structure is laid bare
17:08gtrakyes, I think it feels harder, but in meaning-per-time it's faster
17:10bbloomgtrak: totally. i can read java at extremely high speed. but there's just so much of it to read and i need to do so much navigating and back tracking and control flow following and playing-computer in my head that total time is far less for me to read comparable clojure functionality
17:10gtrakbut busy-work feels good!
17:10bbloomalso, functional programming & immutable data has a tendency to force complexity to the surface. you run into data dependencies quickly
17:11bbloomcombine that w/ the interactive development workflow, and suddenly you type 4 lines before you say "oh shit, i didn't think about X" and you stop typing
17:11bbloomit's discouraging for folks who are used to writing class Foo {} and then slowly evolving out a solution
17:12bbloomwhile you're busy copy/pasting to refactor, you have lots of time to think, but your brain is pre-occupied, so your thinking is lower quality and you don't realize that your net time is much greater
17:14Hodappbbloom: I have definitely run into this when trying to write things.
17:15bbloomi think it's a phenomenon that needs to be better understood and explained. would certainly help people who start to learn functional programming and then decide that they aren't smart enough for it.... right before they *get* it
17:15bbloomreally, the opposite is true: i'm not smart enough for big OO mutable balls of hair :-)
17:15yogthosthat's what I always found too
17:16yogthosoo and mutability are expert features
17:16yogthosyou can do it well if you really know what you're doing, but it's much easier to shoot yourself in the foot
17:16yogthoswith fp and immutability the language steers you to doing things properly
17:16yogthosoften when it feels more difficult it's because you're forced to consider cases you just gloss over otherwise
17:17Hodappbbloom: I need to get through "Can programming be liberated from the von Neumann style?" but I feel that this paper said something about this
17:17yogthoswrt reading speed though, I find you can understand individual lines in imperative code faster, but the overall meaning is often harder to divine
17:18bbloomyogthos: being forced to consider cases you'd otherwise gloss over requires you to *WRITE SHIT DOWN*
17:18gtrakmmm tasty Von Neumann... the funny thing is these issues of mutability and shared-state vs message-passing apply to the hardware level too
17:18bbloomwhich is why any considerable project i have has a HUUUGE scratch file
17:18Hodappyogthos: surely the meaning of an individual line is clear, but all too often this just gives you very specific implementation details
17:18bbloomw/ tons of bullshit code that doesn't actually do anything
17:18bbloomand prose
17:18yogthosexactly
17:18bbloomand random thoughts spelled out
17:18yogthosand you lose the forest for the trees
17:18bbloomthat no one on earth could make sense of
17:19yogthosthe problem is in mixing what's being done with how it's done
17:19yogthosthe code which solves your problem should be declarative
17:19Hodappwell, functional programming is really declarative, not imperative, so there is a lot less of the 'how'
17:19yogthosexactly
17:19Hodappobject-oriented, at least as in C++ and Java, tends to be imperative too
17:19Hodappas much as people try to say it's not
17:19yogthoswell the thing is objects don't protect their internal state in most langauges
17:20yogthosit's an honor system
17:20Hodappyou're giving a bunch of explicit state-manipulation commands in sequence, which looks pretty imperative to me
17:20yogthosI give you a reference and please don't modify it :)
17:20HodappSEGMENTATION FAULT'ED!
17:20yogthoslol
17:20bbloomobjects are really useful for maintaining/coordinating invariants for a collection of mutable cells
17:20yogthosif objects could only be modified through setters and guaranteed atomic transactions it would be a lot nicer :)
17:21gtrakmunge the data (values) with tools that make sense for that, do the side effects with tools that make sense for that
17:21bbloomwell it becomes your only organization strategy
17:21yogthosyou also lose the temporal aspect of your data, state is simply a view into the overall process
17:21Hodappbbloom: this annoys me a lot.
17:22yogthosand if you're dealing with concurrency there might not be one definitive view that's correct for all parties
17:22Hodappbbloom: it gets into a bunch of hand-waving... "The world is made of objects, therefore objects are the most natural organization blahblahblh"
17:22bbloomgetters and setters are silly b/c it implies that you can change any property in any order and maintain the invariant
17:22yogthosI find classes are a case of premature contextualization
17:22bbloomconsider a trivial (deftype Range [a b])
17:22bbloomwhere b >= a
17:23yogthoswhat I mean is that you might want to view the same data differently depending on the context
17:23Hodappyogthos: premature contextualization... haven't heard that one before.
17:23bbloomif a and b are mutable, then what happens if you change a to be better than b? you have to move b to equal a
17:23bbloomso the order you change a or b matters
17:23yogthosif I have a namespace with related functions and I apply those functions to the data at runtime I get the context when appropriate
17:23yogthosbut now I can take the same data and put it in a different context
17:23bbloomso setters make no sense in that context
17:24HodappI'm also getting through "How To Organize Programs Without Classes"; this is another interesting take
17:24yogthosin oo this is difficult and you see wrapper and adapter patterns as a result
17:24Hodappor is it "Organizing Programs Without Classes"? Can't remember
17:24yogthosyou can really think of namespaces as runtime version classes
17:24yogthosthe other big difference is that you don't care where data came from
17:25yogthoswith imperative you make a label for a memory location and keep referencing and poking it
17:25yogthoswith fp you call a function and get a result
17:25yogthosit's exactly same as working with services
17:25yogthosI call a service get a result now I can do whatever with it
17:25bbloomyup, services sorta == objects
17:26bbloomexcept services really == objects + latency&failure
17:26yogthosI think erlang is probably the only proper oo language :P
17:26Anderkentsmalltalk?
17:26yogthossmalltalk still has the mutability problem
17:26HodappLua and JavaScript actually do a surprisingly good job with OO... so does Python
17:26HodappC++ and Java on the other hand can go suck it
17:27reeseskay admits mutability was a design mistake
17:27yogthoswell you also have to consider the history
17:27bbloomreeses: where?
17:27yogthosresources used to be pretty expensive and architecture was predominantly single core
17:27Hodappreeses: [citation needed] on that one :)
17:27yogthosso mutability made a lot of sense
17:27Anderkentso if running something used ta break stuff, and not it stopped, does it count as fixed even if i didn't change anything? :S
17:27bbloomiirc, the smalltalk-like language that kay's viewpoints research thing uses has the ability to capture the entire world
17:27yogthosnow the overhead of having immutable data and gc is far outweighed by the benefits
17:27Hodappyogthos: but at the same time Kay conceived of objects as things that didn't even need to be on the same computer
17:28bbloomnot sure how that works tho, i assume it implies persistent data structures
17:28Hodappyogthos: he proposed, for instance, that maybe even each object would have a URL
17:28bbloomHodapp: that's basically true in erlang
17:28yogthosyeah and then they would work like erlang :P
17:28bbloomeach erlang process has a pid
17:28joevandykis there a reason to run more than one JVM process on a single machine? i'm used to running dozens of processes (web apps, background jobs, cron thingies, services). All those things could be consolidated to a single JVM process, right?
17:28yogthosit's kind of beautiful really
17:28yogthoswell erlang processes are very lightweight, it's 1 vm
17:29yogthosbut each "thread" is a green process on it
17:29bbloomjoevandyk: the JVM's isolation guarentes are pretty weak
17:29yogthosand it takes only a few bytes of overhead
17:29Hodappand I know in Self, which was very similar to Smalltalk in many ways, they were somewhat strict in their handling of OO and the way that it was always supposed to further the illusion that it was real (presumably mutable) objects you were manipulating
17:29yogthosjvm threads are system threads on the other hand
17:29Hodappand while this is still mutable, I prefer it greatly to OO as languages like C++ handle it
17:29bbloomyogthos: clojure's agents are, in many ways, similar to erlang agents
17:29joevandykbbloom: any reading on that?
17:29bbloomis there a distributed version of clojure's agents?
17:29yogthosbbloom: yup there'd definitely a lot of similarity
17:29yogthosyeah avout
17:30reeseshttp://programmers.stackexchange.com/a/81261 was where I first saw his comments implying immutability was preferred
17:30joevandykthinking of moving to jvm (with zero experience), trying to figure out how to structure things
17:30bbloomjoevandyk: what are you trying to accomplish?
17:30yogthoshttp://clojure.com/blog/2011/11/29/avout.html
17:30Hodappreeses: thanks!
17:30reesesnp
17:30bbloomyogthos: avout is awesome, but no agents afaict
17:30gtraklol, answered by Alan Kay, awesome
17:30reesesmore digging will get more usenet posts, etc.
17:30reesesyeah, I love it
17:30bbloombut holy hell are zk-atoms more pleasant to work with than zk
17:30yogthosI haven't looked at it in a little while, you might be right :)
17:31reeses"what did alan kay..."
17:31joevandykbbloom: standard web app things. multiple sites. things constantly running in background at intervals and async. emails being sent.
17:31bbloomjoevandyk: JVM apps tend to use a lot of threads
17:31yogthosyup
17:31bbloompoorly written jvm apps use a lot of locks
17:31yogthosdo you need push or pull type stuff?
17:31bbloombetter written ones use a lot of queues
17:32bbloomclojure apps tend to use agents (queues), atoms (compare-and-swap) etc
17:32Anderkentjoevandyk: multiple sites is probably one JVM hosting the servlet container (tomcat/jetty etc.) and then these handle spinning up threads to handle your sites
17:32yogthosyeah you definitely want to use an app server
17:32yogthoseach app can be packaged in a war, and then each one gets its own context
17:32bbloomjoevandyk: yeah Anderkent is right. those servlet containers are what act as the operating systems of sorts
17:33yogthosyou basically just package them up and drop them in the webapps folder
17:33joevandykah, ok
17:33yogthosI recommend glassfish personally
17:33joevandykanyone use immutant?
17:34yogthosyou might want to check this out for restful services too http://clojure-liberator.github.com/
17:34bbloomyogthos: *cringe* there's that meaningless word again: REST.
17:35yogthosI just kinda take it to mean using http methods and urls for routing
17:35yogthosin that context it's kind of a useful distinction from simply using http as a pipe and having your own separate protocol on top of it
17:36gtrakend-result: wrap-request-binding: https://gist.github.com/4383596
17:36Hodappbbloom: REST originally meant plenty, though that doesn't mean any modern usage respects that :-/
17:36joevandykfor a small amount of work that i do, i need to make a some basic CRUD forms, where 80% is operating on a single table at a time. Best library for that sort of thing?
17:36yogthosindeed
17:37bbloomjoevandyk: rails.
17:37bbloom:-P
17:37zilti,(= (true? nil) (false? nil)) ; Isn't that weird?
17:37yogthosjoevandyk: shameless plug :P http://luminus.herokuapp.com/ :P
17:38zilti&(= (true? nil) (false? nil))
17:38yogthosit's basically a compojure template with some utility libs that will build into something deployable
17:38yogthosfor actual db access I'd recommend https://github.com/clojure/java.jdbc
17:39joevandykyogthos: i've been looking at that. would be super nice to have a library that integrates bootstrap into it. it's probably pretty simple, but would be nice to have!
17:39yogthosyeah it's very much work in progress :)
17:39yogthosI'm planning on adding bootstrap and jquery in as defaults
17:40yogthosI figured I'll release something usable to start and then see what seems to be missing once it gets some usage :)
17:41joevandykone of the more annoying problems i've ran into that activerecord neatly supports is nested forms (via the accts_nested_attributes_for method, see http://railscasts.com/episodes/196-nested-model-form-part-1?view=asciicast for details).
17:42joevandyki don't think i've seen a library that does that stuff outside of activerecord
17:42ziltiIs there a reason that nil is neither false nor true? I thought it's a Lisp convention that (= nil false).
17:42joevandykaccepts_nested_attributes, i mean
17:43gtrakzilti: nil is 'falsy', it's not equal to false
17:44gtrak,[(if nil true false) (nil? false) (boolean nil) (boolean false)]
17:44gtrak&[(if nil true false) (nil? false) (boolean nil) (boolean false)]
17:44bbloomlazy bots.
17:44Hodappis 'falsy' like 'truthy' as in 'truthiness'?
17:44bbloomanyway, this is a case for.... juxt!!!
17:45ziltiSomeone killed the bots! They're still warm! Quick, the murder's probably still in this room!
17:45gtrakthe answer's [false false false false]
17:45bbloom,((juxt false? boolean) nil)
17:45gtrakHodapp: yes, anything is truthy except false and nil
17:45bbloom(map (juxt true? false? boolean) [false true nil]) ;=> ([false true false] [true false true] [false false false])
17:46ziltibbloom: => [false false]
17:46gtrakeven ##(Boolean. false) is truthy
17:46bbloomgtrak: grumble grumble java
17:46mpanclojure doesn't use java boxed booleans?
17:47gtrakit does... but it doesn't do an extra check for the pathological case
17:47joevandykbest xml processing library in clojure?
17:47ziltiHow do I check for truthyness/falsyness?
17:47mpangtrak, huh?
17:47bbloom(doc boolean)
17:47Anderkentzilti: either (boolean <sth>) or just put it in your if
17:47gtrakmpan: nothing's supposed to call the Boolean constructor
17:47gtrakunfortunately, it happens
17:48mpanseems ##(= false (Boolean. false)) is fine though
17:48mpanwhere does the problem happen?
17:49gtrakI guess in 'if'
17:49bbloommpan: = is polymorphic
17:49mpaneek
17:49mpanok ##(if (Boolean. false) 1 0) isn't giving the answer I wished it would
17:49joevandykhttps://github.com/dakrone/clj-http is the best way for interacting with http?
17:49bbloomidentical? isn't
17:49arrdemwhat do :strs ad :syms do in destructuring?
17:50bbloompolymorphism isn't free, so identical? is used where possible
17:50arrdemjoevandyk: it works nicely, that much I can say
17:50bbloomand ##identical? false (Boolean. false))
17:50bbloom(identical? false (Boolean. false)) ;=> false
17:51gtrakarrdem: it's to specify what kinds of keys you have, generally I stick to keywords or convert beforehand, so I always use :keys
17:51mpandoes this happen outside of creating Booleans?
17:51joevandykthe latest stable release is 1.4? no point releases?
17:51bbloomif-tests are evaluated as if by the java: x != null && x != Boolean.FALSE
17:51bbloomand == and != are not polymorphic like .equals in java
17:52bbloomotherwise, every if statement would be mega slow w/o type hinting :-/
17:52gtrakah, I guess it would be terribly slow to abstract over if minus the null-check
17:52arrdemgtrak: I've been using :keys blindly for some months now and just discovered the {symbol :key} syntax. I assume that :strs is the same idea of [sym key]?
17:52gtrakarrdem: unrelated
17:52callentechnomancy: fair.
17:52mpanah thanks for the explanation
17:52gtrak{sym :key} could also be {sym 'sym2}
17:53arrdemright as 'sym2 is a valid key
17:53callenpjstadig: hrm. hrm. yes.
17:53callenpjstadig: I'll try it.
17:53gtraksymbols are just objects, the difference is in how they're eval'd
17:55joevandykis there a recommended style-checker for clojure?
17:55bbloomjoevandyk: https://github.com/jonase/kibit/ can do some form-level checking for you
17:55bbloombut it's rule set is relatively limited currently
17:56bbloomthere are no popular source text level tools that i know of
17:57callenpjstadig: Exception in thread "main" java.lang.RuntimeException: Unable to resolve var: sql/get-connection in this context, compiling:(migratus/database.clj:162)
17:57joevandyk(:cookies (client/get "http://google.com&quot;)) ===> {"NID" {:domain ".google.com", :expires #inst "2013-06-27T22:48:02.000-00:00"….
17:57joevandykwhat's the #inst?
17:58callenpjstadig: (#'sql/get-connection (:db config))
17:58callenpjstadig: inside (begin [this]
17:58bbloomjoevandyk: https://github.com/edn-format/edn#tagged-elements
17:59callentechnomancy: you're a fan of interactive programming as much as I am, is there a live debugger I can trip in arbitrary Clojure code to create a REPL that can step/next etc?
17:59joevandykbbloom: so it's kind of a type indicator?
18:00bbloomjoevandyk: tag != type
18:00bbloomtypes imply implementation, behavior, protocols, etc
18:00bbloomtags are just a value that can be used to guide interpretation
18:01bbloomwhat is the type of '(+ 2 2) is it integer? or is it a list? or is it an addition expression?
18:02arrdem,(type '(+ 2 2))
18:02AimHere,(type '(+ 2 2))
18:02bbloomarrdem: of course.
18:02bbloombut i'm saying it actually depends on the context
18:02bbloomtagged values are values and some information about how to interpret that value
18:02bbloomthey don't necessarily imply type
18:02bbloom#inst can be a java.Date or a joda.Instant
18:03bbloomit's up to you to interpret it
18:03callentechnomancy: I guess swank.core/break
18:03arrdembbloom: sorry. my inner wise-ass spoke.
18:03bbloomarrdem: i don't mind. the whole tag vs type this was a pretty big epiphany i had when playing with Mathematica
18:03bbloomit's worth understanding :-)
18:08joevandykso i made a new lein project with `lein new app rooster_shipment_tracker`. using latest lein. haven't changed anything. tests are failing with "Exception in thread "main" java.lang.Exception: namespace 'rooster_shipment_tracker.core' not found after loading '/rooster_shipment_tracker/core'"
18:08joevandykcode at https://github.com/joevandyk/rooster_shipping_tracker
18:08bbloomjoevandyk: latest lein == lein 2?
18:08joevandykbbloom: yes
18:09arrdembbloom: ah so the "tag" is really just a quoted symbol being the name of a function f defining (eval) of the following expression
18:10bbloomarrdem: in the context of clojure code, yes
18:10bbloomtags are meaningless without context
18:10bbloomin fact, all symbolic anything are meaningless without context
18:10dnolencore.logic gets deep constraints, http://github.com/clojure/core.logic/commit/a48f6450f20b90a46be3b8eb7d3f110404325206
18:10bbloomand languages offer us inherent context. we can all agree: we're communicating with a base context: version 1.X of clojure, etc
18:11edlothioljoevandyk: the ns declaration says shipment, the directory name is shipping (did you change one of them?)
18:11arrdembbloom: right. I only knew tags from Lisp machine tag bits... which were really hardware types.
18:11joevandykedlothiol: yeah, the git repo should be rooster_shipment_tracker
18:11joevandykbut i don't think that would matter
18:11joevandykit's checked out on my machine as rooster_shipment_tracker
18:12jkkramerjoevandyk: https://github.com/joevandyk/rooster_shipping_tracker/blob/master/test/rooster_shipment_tracker/core_test.clj#L3 - looks like the lein template didn't convert underscores to dashes
18:12joevandykshould it have?
18:12jkkrameryes
18:12jkkrameron that line
18:13jkkramerfilenames use underscores, namespaces use dashes
18:13bbloomjoevandyk: hmmm bug? report that to technomancy or the other folks in #leiningen ?
18:13joevandyki'll do that
18:13arrdemlook and see if it's a Lein bug or just your template tho...
18:14ziltiI'm a bit worried. I've got some code here I wrote I don't dare touching.
18:15jkkramermaybe offer it some incense and gentle chanting?
18:15ziltiThat could break it.
18:16arrdemzilti: that's some awful fragile code there
18:17jkkramermaybe it will spontaneously improve if you stop looking at it
18:18ziltiI highly doubt that. And it does something wrong. And I just fixed that, but it didn't have any effect... Oh well.
18:27ziltiHow awful is that? I've got an if-clause (if reversed? ...) which no matter if reversed is true or false always evaluates the true-expression.
18:30joevandykhttps://github.com/clojure/data.xml a decent way to process xml?
18:31joevandykis there a way to get vim-style keybindings in the repl?
18:37jkkramerjoevandyk: data.xml has worked quite well for my purposes. I believe it has limitations wrt xml namespaces
18:43TimMczilti: Time to go back to your axioms, eh?
18:44ziltiTimMc: Which axioms?
18:45ziltiI think I broke "if".
18:46TimMczilti: You almost certainly haven't broken "if", which means one of your assumptions or inferences is wrong.
18:47TimMcDebugging by iterative fallback to broader and broader assumptions.
18:47TimMc...from "do I have a typo" to "did I save the file on the right machine".
18:48ziltiTimMc: I have a variable "reversed?" which is set to either true or false. Simply said, I have this now:
18:48TimMcWhat happens if you put "false" in there?
18:49zilti(println reversed?) (if reversed? (println "if said true, actual: " reversed?) (println "if said false, actual: " reversed?))
18:49joevandykHm, getting this error when using data.xml: "createXMLStreamReader for class com.sun.xml.internal.stream.XMLInputFactoryImpl"
18:49ziltiIf always says "true". If I replace it with (if (= true reversed)) or (if (true? reversed)) if always says "false".
18:50joevandykonly in repl
18:50joevandykmaybe i need to restart
18:50ziltiIf I replace it by (if true) it says false.
18:51zilti...now it always says true. luckily.
18:51TimMczilti: What about (boolean reversed?)
18:51TimMcPut that in the if statement.
18:52joevandykodd, i only get that error in the repl. all i'm doing is calling this function: (defn parse [xml] (xml/parse xml))
18:52TimMczilti: I'm voting for you having (Boolean. false) in there somewhere.
18:52ziltiTimMc: Always gives true
18:52jkkramerjoevandyk: if you're trying to parse a string, you need to use (java.io.StringReader. "<foo>bar</foo>")
18:53joevandykah, right
18:53jkkramerjoevandyk: otherwise it assumes a file path
18:53ziltiI never used (Boolean. false) in my whole life, not even when I was still programming Java
18:53joevandykwhy, btw?
18:53joevandykoh
18:53joevandykick
18:53jkkramerit probably piggybacks clojure.java.io, which does a similar thing
18:54TimMc?
18:54TimMcnvm
18:55TimMczilti: Did you try (if false ...)?
18:56ziltiTimMc: Yes.
18:56joevandykif I have (fn1 (fn2 (fn3 arg))), do i use the comp function to simplify that?
18:57TimMcjoevandyk: You could. There's also the stitching macros: -> ->>
18:57callenTimMc: winchester.
18:57TimMc(-> arg fn3 fn2 fn1), ((comp fn3 fn2 fn1) arg)
18:58ziltiTimMc: Oh goddammit the variable was in a list...
18:58TimMc?
18:59joevandykawesome. lots of neat stuff in here. so much to learn!
18:59TimMc(list reversed?)
18:59TimMczilti: My next question was going to be (println (class reversed?))
18:59ziltiTimMc: exactly. Because it's an optional argument that I just appended as "& reversed?"
18:59joevandykis there a preferred format? (println (parse (fetch url))) vs (-> url fetch parse println)
19:23abaranoskyjoevandyk: not sure if there's a community standard but I'd usually go with the latter.
19:46hyPiRionGo with the most readable one
20:46gfrederickswhen I've submitted a patch and feedback is given, is it expected that I make a new patch with just the feedback material, or a new patch with everything?
20:47bbloomclojure committers tend to prefer squashed patches
20:48bbloomi usually go with something like CLJ-1234-v002.patch
20:48bbloomuse `git rebase -i`
20:50gfrederickscoothx
20:51hyPiRiongfredericks: What issue is it?
20:53gfredericksCLJ-1121
20:53hyPiRion&'foo
20:53hyPiRionOh, that one
20:58bbloomgfredericks: pardon my for snooping, but is reduce available at that point in core.clj ?
20:58gfredericksI believe it isn't
20:58bbloomhm ok
20:58gfredericksor else it's not usable for some more subtle reason
20:59gfredericksbut I definitely tried that first :)
20:59bbloom:-)
20:59bbloomreading core makes me cringe sometimes until i remember that stuff may or may not have been defined yet, so it's better to do it the dumbest way that works
20:59hyPiRionheh
21:00amalloygfredericks: they prefer you make a new patch file with all changes, but i think whether it's squashed or a two-commit patch is up to you
21:00hyPiRionThey will probably squash it anyway though.
21:00amalloyi don't see why. afaik it just gets applied with git am
21:01bbloomamalloy: i think it more depends on the committer :-)
21:01bbloomdnolen has been pretty strict about squashed commits on cljs
21:02hyPiRionSure? I'm not sure who was talking about it, but they considered squashing doc changes at some point.
21:17tomojtwo patches :/
21:17bbloomno
21:17bbloomuse git format-patch refspec --stdout > CLJ-123-v001.patch
21:17bbloomwhere refspec is any old normal git ref spec, including ranges
21:17bbloomso for example:
21:18bbloomhead~2..
21:18bbloomgit format-patch head~2.. --stdout
21:18bbloomwill make a patch with the two most recent commits on the current branch
21:18tomojhmm, two patches, one file?
21:18bbloomtomoj: yes, git formatted patches support that
21:18hyPiRionyeah, I wouldn't be surprised if they're just catted
21:20bbloomtpope: i've basically committed cpap to muscle memory over cpp, dunno if that's still up for debate or not :-P
21:21gfredericksbbloom: cool, thanks
22:25SegFaultAXDoes paredit have something that can shift a sublist left or right in its container? Like (aaa (bbb ccc) ddd) -> ((bbb ccc) aaa ddd)
22:25SegFaultAXSorry, paredit.vim
22:31callenSegFaultAX: nothing to contribute, would just like to say that I still don't understand paredit users :)
22:31hyPiRion~paredit
22:32hyPiRionSegFaultAX: Don't think so.
22:33hyPiRionhttp://emacswiki.org/emacs/PareditCheatsheet is the cheatsheet, and I don't think any of them has it
22:35SegFaultAXhyPiRion: Thanks.
22:35SegFaultAXcallen: Why?
22:37callenSegFaultAX: brittle, requires a lot of jousting with your text editor
22:37callenSegFaultAX: OTOH, that a vim user would find such an arrangement acceptable is no surprise (bwahahahaha)
22:37SegFaultAXcallen: What's your editor of choice?
22:38SegFaultAXcallen: And for the record, I'm new to paredit. Still trying to get a feel for it to see if it's something I should integrate into my existing muscle memory.
22:39callenSegFaultAX: I use what 70% of Clojure users use. I actually technically use vim as well here and there, but just for occasional quick-dives.
22:40SegFaultAXYou're an emacs user? That doesn't use paredit?
22:40callenSegFaultAX: no, I don't use paredit.
22:40callenSegFaultAX: it's the bondage-and-discipline of text editing.
22:40SegFaultAXcallen: Haha. I'm not sure I fully understand your dislike for paredit.
22:41callenSegFaultAX: I'm an ex common lisper, I thought it was ridiculous back then too.
22:41Rich_Morincallen: have you tried VIMClojure?
22:41SegFaultAXBeing a CLer is like being a marine. There is no such thing as an "Ex-Marine", simply a "Former Marine". :D
22:41callenSegFaultAX: you've got a point there.
22:42callenRich_Morin: I'm highly unlikely to. I've used Emacs and vim both enough to know where I'm more productive.
22:42SegFaultAXcallen: No matter what language you're using, you're still using CL at heart. Greenspuns 10th and all that.
22:42callenSegFaultAX: careful with that talk of the good old days, or I might start writing reader macros for SQL.
22:44callenRich_Morin: in the end, unless you're spending a considerable amount of time doing bulk amounts of editing of one or two files, vim optimizes for the wrong things.
22:44hyPiRionOh lord, I made clojure dispatch macros in CL the other day
22:44SegFaultAXcallen: But generally, what's wrong with making your editor aware of the structure of your language?
22:44hyPiRionNow I only need to make the data structures and make them behave properly
22:44callenSegFaultAX: nothing, I just don't like the way paredit works.
22:45SegFaultAXcallen: Anything in particular?
22:45callenSegFaultAX: everything? it defaults to very restrictive circumscription of how your editor works.
22:45callenSegFaultAX: it's irreconciliable with how I work.
22:46SegFaultAXcallen: Well, I can see you're determined to be vague. Thank you for your thoughts. :D
22:47callenSegFaultAX: I don't know how else to explain it, forces your edit motions and traversal motions to be along the lines of how it structures the text
22:47callenSegFaultAX: any attempt to break from that mold or otherwise make editorial "broad strokes" gets blocked by its nagging insistence on keeping to the parens.
22:51callendoes anybody here know how to access a non-public var in another namespace?
22:51gfredericks#'foo.bar/baz
22:51callenI need to hack up some code to pierce the veil.
22:51callengfredericks: CompilerException java.lang.RuntimeException: Unable to resolve var: clojure.java.jdbc/get-connection in this context
22:51callenhttps://github.com/clojure/java.jdbc/blob/master/src/main/clojure/clojure/java/jdbc.clj#L151
22:52gfrederickscallen: you're sure you're on the same version as the github code?
22:53callengod I hope so.
22:53callenI'll check momentarily, I've been raping and pillaging the jars in my ~/.m2
22:54callengfredericks: I get your meaning. #' really should've worked.
22:54bbloomi'm watching this talk: http://channel9.msdn.com/Events/Lang-NEXT/Lang-NEXT-2012/Reflection-and-Compilers
22:54bbloomOdersky is clearly a very smart dude
22:55bbloombut man, Hickey's talks are so much more enlightening...
22:55callengfredericks: do you know how to check what version of a library leiningen is using that I'm not necessarily defining myself?
22:55callenbbloom: Odersky I see as being like Stroustrup. An integrator and peace-maker, but not much sense with regards to design.
22:56callennobody who has any design sense lets Scala's syntax get the way it did.
22:56Raynescallen: oooooh, burn
22:56callenand I say this as someone who likes Scala, in a hypothetical alternate universe.
22:56bbloomi've said it before, ill say it again: Scala is Java++
22:56callenincidentally, Stroustrup made C++
22:56callenso theres you goes.
22:58gfrederickslein still hates the idea of "running a clojure file", right? as in, without a project?
22:58RaynesYes.
22:59mpanis there a nicer way than (read-file) from lein-repl for that need?
22:59Rich_MorinHickey is awesome (and I don't use that word lightly), but there are places where I long for Matz's taste in language design.
22:59gfredericksmpan: the clojure.main class can run files
22:59callenRaynes: yes, some people like Ruby.
22:59mpanah thanks
23:00bbloomRich_Morin: matz has good taste in the absence of self control: "include everything! but make it not suck"
23:00bbloomscala says "include everything! make it statically typed!"
23:00callenI still say the finishing touch Ruby has always needed was a COME FROM statement.
23:00gfredericksman you couldn't even write a lein plugin to do that could you
23:00mpancallen: what would that do, though?
23:00Raynescallen: Yes, some people state the obvious.
23:00callenmpan: reverse of goto.
23:01callenmpan: label: blah
23:01callenmpan: COME FROM label;
23:01gfredericksruby needed...refinements?
23:01mpanas in, unconditionally?
23:01devnin some ways I think matz did something that was accidentally brilliant: He said yes so often that now it seems the serious maintainers of Ruby are stepping in to say no when appropriate
23:01callenmpan: as conditionally as your gotos.
23:01bbloomsteve yeggie had that post about clojure needing to say "yes"
23:01bbloomim quite glad rich said "no"
23:01devnplease don't go there lol
23:02callenyegge is a flake anyway.
23:02gfrederickscallen: so if you COME FROM label in two different places is that a fork of some kind?
23:02devnsteve yegge is full of sour grapes
23:02Rich_MorinYes, there is a small fracas going on in the Ruby community. See http://www.youtube.com/watch?v=BagNfTbXn3w
23:02mpanwhat happened to yegge? I used to play this game he made and then one day it just disappeared
23:02mpanand a few years later I learned his name was yegge (and not just rhialto)
23:02callengfredericks: let me consult my INTERCAL manual, h/o
23:02bbloomyegge has written a bunch of good (and a bunch of bad) articles tho
23:03bbloomit's obvious that he realizes some smart things, but has a hard time distilling them, hence the absurdly long posts
23:03bbloombut i can't point fingers, since i often write long posts too
23:03bbloom(but not that long)
23:04bbloomfor example http://steve-yegge.blogspot.com/2008/10/universal-design-pattern.html is worth reading 35% of it
23:04Rich_MorinSomething like refinements could be very useful in shared Ruby environments (eg, SketchUp plugins), but I defer to the Ruby implementors as to when and how to add them.
23:04bbloombut the 35% that is worthwhile is scattered throughout the whole post
23:04callengfredericks: I am downloading an interpreter that supports comefrom to test my hypothesis.
23:04mpancallen: that sounds like a nightmare for the compiler/interpreter
23:04callengfredericks: okay yeah, it's implementation specific
23:05wastrelp/qin 19
23:05callenit can defined invalid, exhibit non-deterministic behavior, or execute on parallel/concurrent threads.
23:05callengfredericks: so it's really up to the implementor.
23:05devnanyone here have an opinion on migration libraries for clojure?
23:06callendevn: dude.
23:06gfrederickscallen: that sounds like it would fit in ruby pretty well then
23:06devnI see drift and ragtime -- are there others I should pay attention to?
23:06devncallen: dude
23:06callendevn: the last third of my soul that drained down my bathtub was due to migration libraries.
23:06callendevn: I...am your weary soul for this one.
23:06gfredericksmy migration library is a pile of three functions that technomancy gave me
23:06callenI was battling this just 24 hours ago.
23:06devncallen: as in, migration libraries in general?
23:06callendevn: yes.
23:06callendevn: I've tried several now.
23:07devncallen: what sucked?
23:07callenI have strong opinions, weakly referenced and rapidly deallocated.
23:07mpanI'm curious, what are you migrating?
23:07devnwhat was good about what you tried?
23:07devnmpan: a database :)
23:07callendevn: ragtime's refusal to express an opinion of any sort sucked. It reminded me of Tom Sawyer.
23:08devnheh
23:08devncallen: and drift?
23:08callendevn: migratus is closest to what I wanted, being vanilla SQL files, able to be migrated independently/individually but has some serious issues with lein2 for me.
23:08callendevn: lobos generally just works but uses a bumfucked retarded DSL for the migration statements. Seems to be imitating Rails in more form and less function.
23:09callendevn: Drift is a hybrid of ragtime and lobos. I'm not very happy with the global migration version counter thingy.
23:09devni tried lobos and I didn't like it.
23:09devncallen: so... let's write a better one?
23:10devnor fix migratus?
23:10callenyeah uh, kinda working on the fix migratus thing
23:10callenI'm debugging what seems to be an invalid reference to a private var in jdbc.
23:11callendevn: pjstadig has been helpful and communicative as of yesterday (he made migratus, Sonian uses it), but there are more fixes to be made beyond his initial attempts at a 0.6.0-SNAPSHOT lein2 version.
23:11callenthat or I'm retarded. Equally plausible.
23:12devnpjstadig is helpful and communicative all the time
23:12devnjust sayin'
23:13FrozenlockIs `fetch' the commonly used library for client/server clj/cljs interaction?
23:14Frozenlockhttps://github.com/ibdknox/fetch
23:14callendevn: I was highlighting my lack of experience, not making a statement about him.
23:14callenmy lack of experience with *him* that is.
23:14devncallen: nono, wasn't trying to correct you, was just making a positive statement in general about him
23:14callenFrozenlock: I don't know if common is the word.
23:15callenFrozenlock: there's a lot of room for idioms to be defined for frontend/backend interaction in the Clojure/CLJS world right now.
23:15callendevn: anyway, I am in general fond of migratus and if I wrote my own lib, it'd just end up being a fixed up migratus anyway.
23:15callendevn: I just need uh, it to work.
23:15devncallen: heh
23:15devnthat's usually good with migration libs
23:16FrozenlockI see. Well, is there other libraries? I would like to compare.
23:16callendevn: use lein2 and [migratus "0.6.0-SNAPSHOT"], [migratus-lein "0.1.0-SNAPSHOT"] to join the fun.
23:16callenFrozenlock: it's not "libraries", it just that the alternative is usually doing your own AJAX back-n-forth.
23:16callenor websockets. whatever the cool kids use.
23:17xeqiFrozenlock: theres https://github.com/shoreleave/shoreleave-remote-ring
23:18devnhttps://github.com/thegeez/clj-browserchannel
23:18devn^-I've used that and I liked it, but it is kind of a pain to get set up.
23:19devnsee: https://github.com/thegeez/clj-browserchannel-demo
23:19FrozenlockThank you very much!
23:20devnalso this Frozenlock: http://thegeez.net/2012/04/03/why_browserchannel.html
23:20callengfredericks: the problem is the jdbc version, something wacky is happening here.
23:21devngah! I wish lein-pedantic would shut up when I'm in a hurry
23:21devn`lein deps --no-pedantry`
23:23callendevn: has it ever saved you any trouble?
23:24devncallen: it makes me sleep a bit easier I guess, but prior to using it I don't think I ever ran into an issue
23:24devnso, uh... *comments out lein-pedantic*
23:25callendevn: I avoid lein-pedantic because it reminds me of cabal.
23:25callendevn: then I break out into hives, the walls start bleeding, and people die.
23:25xeqidevn: haha, use ":pedantic :warn" in the project.clj
23:26mpananyone have particular recommendations for guides/tutorials on starting out in clojurescript?
23:26callenSON OF A BITCH
23:26callenHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA HAHAHAHAHAHA
23:26callendevn: I got migratus to work, FOR SIE FIRST TIME
23:27mpancallen: you sound quite happy, so congratulations
23:28Raynescallen: I fear you might be an alcoholic.
23:28callenmpan: Through fire and water. From the lowest dungeon to the highest peak, I fought these damn migration libraries. Until the last, I threw down my enemy and smote his ruin upon the mountainside.
23:29callenRaynes: what's to fear?
23:29mpancallen: I know that feeling of fighting one's own tools
23:30callenI've got to be winning some curse words per commit message rankings.
23:31mpanwho are these meant for? self? friends? coworkers?
23:34callenmpan: the universe.
23:55juldreHi all, getting started on clojure here. I have a CounterClockWise + Noir development question: what is the best way of quickly restarting the server to test small changes in code?
23:56juldrewhen working in pure Java, eclipse reloads the context automatically, is that possible with counter clock wise? if not, whats the next best thing ?