#clojure logs

2011-11-06

00:00tensorpuddinggod, i fell for it again
00:00tensorpuddingi published my gist anonymously for the dozenth time
00:00brehautcemerick: mostly lazy san arial is much nicer
00:00cemerickbrehaut: san arial?
00:00brehautsans
00:00brehautwithout
00:00TeXnomancyibdknox: fallback nick
00:00cemerickoh, using the lambda
00:00cemerickyeah
00:01brehautcemerick: sorry, i fail at typing
00:01ibdknoxTeXnomancy: that's awesome lol
00:01TeXnomancyI'm copying 4GB of photos across the wifi on my home network and my poor consumer-grade router is having fits
00:03tensorpuddingoh man, how did that happen
00:03tensorpuddingmy saved password for github doesn't work
00:03tensorpuddingnot being able to change your password while logged in without the old password is really aggravating
00:04tensorpuddingi need to extricate the old password from chrome
00:05tensorpuddingthe downside of using randomized passwords in a password manager
00:09tensorpuddingand when i logged in, the gist i made was gone
00:10tensorpuddingwhy gist requires you to login separately i have no idea
00:12tensorpuddingibdknox, https://gist.github.com/1342462
00:12tensorpuddingthere
00:15ibdknoxtensorpudding: when you start your server are you just passing it main-routes?
00:15tensorpuddingyes
00:16ibdknoxtensorpudding: then as amalloy suggested, you never add the middleware that makes sure you get params. You just need to use compojure.handler/site: https://github.com/weavejester/compojure/blob/master/src/compojure/handler.clj#L27
00:16tensorpuddingsure wish the api docs, tutorials or examples mentioned that you need that in order to get params
00:17tensorpuddingwell
00:17ibdknoxtensorpudding: so when you start your server, do (jetty-start (handler/site main-routes) ...
00:17ibdknoxtensorpudding: that's why I wrote Noir
00:19tensorpuddingah, that works like a charm now
00:19tensorpuddingwhy isn't that default?
00:19ibdknoxtensorpudding: because compojure is low level
00:19amalloyfor the same reason not every program opens a window with a "Click Here To Start" button. you don't always want it
00:20tensorpuddingwell
00:20tensorpuddingi went for what i saw first
00:20tensorpuddingthere's a ton of libraries out there
00:21ibdknoxcemerick: well it's as low as you want it, I guess is the better thing to say
00:21cemerickibdknox: I'm just being obnoxious :-P
00:21brehauttensorpudding: theres 3 core libs for web apps in clojure (on top of ring, and not including things like templates or forms) and they each have a different focus
00:21tensorpuddingwhat are they?
00:21brehauttensorpudding: moustache, compojure, noir
00:21tensorpuddingmoustache?
00:21clojurebotmoustache is http://github.com/cgrand/moustache
00:22ibdknoxlol
00:22brehauttensorpudding: and thats in order of close to ring -> abstracted from ring
00:22tensorpuddingthat's templating
00:22tensorpuddingisn't it?
00:22ibdknox~botsnack
00:22clojurebotThanks, but I prefer chocolate
00:22Raynesmustache != moustache
00:22tensorpuddingbah
00:22tensorpuddinglame
00:22tensorpuddingname collisions
00:22brehautmoustache is basically glue for ring handlers
00:22tensorpuddingi would be happy if there was one that had a big sign saying "you should use me!"
00:22ibdknoxthere is
00:23brehauttensorpudding: if you dont know about ring, or dont care to learn, its noir
00:23cemericknot everyone wants the same thing
00:23amalloytensorpudding: www.webnoir.com ?
00:23ibdknoxhttp://webnoir.org/
00:23ibdknoxlol
00:23amalloyibdknox: oh, org?
00:23ibdknoxyeah
00:23cemericktensorpudding: this is a year old, so grain of salt, but: http://web.archive.org/web/20110218134955/http://www.glenstampoultzis.net/blog/clojure-web-infrastructure/
00:24Raynesamalloy: Click on the .com link for tons of fun.
00:24amalloyRaynes: yeah, i did that
00:24tensorpuddingi do need a database i think
00:24tensorpuddingto make a proper app
00:24cemerickibdknox: what do you use to find fonts?
00:25ibdknoxtensorpudding: then you might like one of my other projects: http://www.sqlkorma.com
00:25RaynesFont Book. :p
00:25tensorpuddingi want a backend for sqlite
00:25ibdknoxcemerick: dafont is good, but you have to have patience
00:25brehautibdknox: caveat that its WIP ;)
00:25cemerickRaynes: you have a mac?
00:25tensorpuddingsince i'm too lazy to deploy postgres
00:25Raynescemerick: Yes.
00:25cemerick:-O
00:25RaynesFor a long time now.
00:25ibdknoxtensorpudding: it'll work with sqllite too
00:25tensorpuddingi was going to dive right into the database thing
00:26tensorpuddingbut the first one i saw looked scary, starting talking about a jdbc or something
00:26ibdknoxtensorpudding: both noir and korma have plenty of docs
00:26Raynesibdknox: I'd like to hire you to market my next product.
00:26ibdknoxRaynes: lol
00:26RaynesBecause you're obviously top notch.
00:26amalloytensorpudding: if the letters JDBC terrify you, you probably shouldn't try to Connect to a DB in Java
00:27tensorpuddingi don't use java
00:27RaynesWont stop you from getting a NewFactorySocketConnectionSQLDatabaseWithStuffInItForYou object.
00:28amalloytensorpudding: s/Java/JVM if you prefer. you're in the java ecosystem, even if you prefer to pretend you're not
00:28tensorpuddingi don't delude myself by it
00:28tensorpuddingit grates me though
00:28tensorpuddingjava gets up in your face with a million exception backtraces whenever you make it angry
00:29ibdknoxtensorpudding: I did my best to ease that
00:29ibdknoxtensorpudding: in all of the things I've written for others to use
00:29tensorpuddingi don't suppose you make a templating library either
00:29ibdknoxtensorpudding: I <3 hiccup
00:30tensorpuddingi want to actually write html though
00:30cemerickgaaah! :-)
00:30cemericktensorpudding: try enlive. Top notch.
00:30tensorpuddingenlive is what i'm using
00:30tensorpuddingbut it's heavy-duty
00:30cemerickheavy-duty?
00:30tensorpuddingwell
00:30tensorpuddingi've used a few templating engines before
00:30brehauti second the enlive suggestion
00:31ibdknoxit has a fairly high cognitive density that doesn't *have* to exist
00:31tensorpuddingmustache, the one in django, the one in google go
00:31tensorpuddingand they're all very simple
00:31amalloys/simple/easy ?
00:31tensorpuddingenlive is high-level composable transformations
00:31tensorpuddingnot "cut out a tag here and replace it with text"
00:32cemericknot sure if that's "heavy", but I know what you mean
00:32cemerickMy favorite templating engine prior to enlive was ZPT :-P
00:32amalloyi think the problem with enlive is that it's a mess of macros, right?
00:32ibdknoxit's definitely more complicated than that.
00:32brehautcemerick: Z = Zope ?
00:32cemerickamalloy: it's no longer macro-heavy
00:32brehautamalloy: most of the operations are functions
00:33amalloyoh, that's good to hear
00:33amalloyi love hiccup but feel confident if i were a good person i would prefer enlive
00:33cemerickamalloy: cgrand's talk at the conj last year was rooted in his transforming enlive from macros to fns
00:34cemerickbrehaut: draped with plone, but yeah
00:34Raynesamalloy wasn't at the conj last year.
00:34cemericklifetimes ago
00:34brehautcemerick: did anyone ever use zope without plone?
00:34cemerickRaynes: I know :-)
00:34cemerickamalloy: going this year?
00:34RaynesYes.
00:34cemerickbrehaut: frighteningly, yes :-(
00:34amalloycemerick: it would take some kind of zombie apocalypse to stop me
00:34brehautcemerick: im sorry to hear
00:35cemerickBetter to ask, "did anyone ever use zope, in any shape whatsoever?"
00:35cemerickamalloy: was there one last year? ;-)
00:35brehautcemerick, amalloy: PHP is a zombie apoc?
00:35brehautcause i wouldnt be surprised
00:36amalloybrehaut: have you seen the hordes flocking to the latest hot things? their droning "nooooode" sounds about the same
00:36brehautamalloy: rimshot
00:36ibdknox~rimshot
00:36clojurebotBadum, *ching*
00:37brehautyes please, id like to bring all the horrors of client side programming to the server
00:37ibdknoxbest thing *ever*
00:37cemerick"I heard you like acquisition, so I put it in *everything*."
00:37cemerickOnly I could make a bad yo dawg joke about zope.
00:38amalloycemerick: acquisition? i guess i'm glad not to get it
00:38cemerickNoooo, don't google that. Save yourself!
00:38brehautamalloy: its "an important topic for Zope developers"
00:38cemerickLOL
00:38brehautthere are _way_ too many grocer quotes in this page
00:39amalloyi had literally never even heard of zope
00:39amalloybut it sounds like googling for it would be practically nsfw
00:39cemerickYou can blame me later.
00:39brehautamalloy: its why python sucked for the web for years :P 
00:39amalloywith all the blood & gore
00:39brehaut(wsgi is the new reason python sucks for the web ;)
00:39cemerickIronically, pylons really made web dev pleasant for the first time for me, so it's a wash.
00:39cemerickouch!
00:40brehautit had good intentions
00:40brehautbut it optimsed for old use cases just in time to make the new use cases awkward
00:40cemerickit's just a ring spec for python…
00:40cemerick(roughly)
00:40brehautcemerick: roughly.
00:40cemerick*shrug* hard to argue with it too badly, then
00:41cemerickvs. zope / servlets / CGI
00:41brehauthaha fair
00:41cemerickMy first web programming was using CGI via webstar on Mac OS 8, so…
00:41cemerickhrm
00:42cemerickprobably 7.5.1, now that I think of it.
00:42tensorpuddingwriting this clojure app took longer than writing a similar one in django
00:42brehautCGIs in C was mine. that was a mistake
00:42tensorpuddingi knew python a good bit better at the time though
00:42amalloytensorpudding: are you counting the time you've spent learning python and learning clojure?
00:42cemerickbrehaut: as much as CGIs in RealBASIC? :-P
00:42brehautcemerick: ouch
00:42tensorpuddingwell, i spent a few months with clojure back in 2009
00:43tensorpuddingi got sidetracked with learning c, and python, and google go
00:43ibdknoxtensorpudding: I'll race you ;)
00:43cemerickI paid for my first year of college doing consulting projects with RB, so I can't complain.
00:43cemerickCross-compiling *way* before its time, AFAIK.
00:45tensorpuddingi had the notion i would try writing a webapp in go and clojure
00:45tensorpuddingand see which one took less effort
00:45ibdknoxtensorpudding: use Noir for that
00:46cemericktensorpudding: are hello-world webapps really what will make or break things for you?
00:46amalloyand also watch out for the difference between writing your first app and writing a real one
00:46tensorpuddingno?
00:46tensorpuddingi mean
00:46cemerick(sorry, didn't mean for that to sound so sarcastic)
00:46tensorpuddingi want to get a feel for how fun the language is to use
00:46cemerickah, fair enough
00:46tensorpuddingand how good the project tools are
00:47tensorpuddingand library support
00:47brehautdjango: the ORM + admin let you write a stupidly simple site really fast. and then your domain model grows larger than the intersection of objects and tables and you are in pain
00:47tensorpuddingi dislike lein, not going to lie
00:47brehautwhat‽
00:47tensorpuddingbeing able to get deps through jars is nice
00:47tensorpuddingbut it's slow
00:47brehautlein is one of the major factors for me prefering clojure to python for web programming
00:48cemerickI think we can all agree that all build tools will always suck, forever.
00:48tensorpuddingmaybe it's just me coming off of go
00:48brehautcemerick: hah true
00:48tensorpuddingwhich has trivial build time
00:48ibdknoxthe key is to not build
00:48cemericks/build/startup
00:49ibdknoxtensorpudding: I'm telling you Noir is a very, very different experience
00:49ibdknoxtensorpudding: refresh and you see your change
00:49tensorpuddingokay
00:49tensorpuddingi might
00:49cemerickibdknox: noir autoloads all the time, I take it?
00:49ibdknoxcemerick: watches for changes, yep
00:49tensorpuddingi don't know where the slowness came from
00:50tensorpuddingwhat does "lein run" have to do that takes so long?
00:50cemerickThere's an option for that in lein-ring, isn't there?
00:50ibdknoxstart the jvm
00:50ibdknoxcemerick: yessir
00:50tensorpuddingstarting the jvm takes ten seconds no matter what?
00:50cemerickno, jvm startup is actually ~1.5s
00:51tensorpuddingmaybe it's just jetty taking a long time to start
00:51cemerickThen there's load Clojure, load lein bits, start jetty, etc
00:51amalloycemerick: that's going to differ a lot by platform etc though. on my c64 it's like 15s
00:51tensorpuddingit's not that shocking once you realize it's jvm
00:51cemerickamalloy: screenshots or it didn't happen
00:51tensorpuddingi've not met a java apps that didn't have a slow startup
00:52cemerick:-D
00:53tensorpuddingbut anyway
00:53cemerickamalloy: http://www.mts.net/~kbagnall/commodore/java.html !!
00:53tensorpuddingthe slow startup is really putting a damper on my dev experience
00:53brehauttensorpudding: once you stop starting up constantly, its not a problem
00:54cemericktensorpudding: regardless of approach, no one restarts their jvm regularly
00:54tensorpuddingi'd *like* to be able to test my app in slime
00:54tensorpuddingbut i assumed that you can't have jetty running at the same time
00:54brehauttensorpudding: what is stopping you?
00:54RaynesYou just need to stop the server.
00:55brehauttensorpudding: (start-jetty #'handler {:join? false}) ?
00:55tensorpuddingwhat does that do
00:55ibdknoxtensorpudding: tensorpudding I did a demo of writing a noir app completely in the REPL
00:55brehautjetty doesnt take over your repl thread
00:55ibdknoxit can definitely work
00:55tensorpuddingi don't write in repls
00:55tensorpuddingi test in repls
00:55ibdknox..
00:55cemerickYou can send any arbitrary code through a REPL connection.
00:56cemerick*or* your web framework (noir or ring) can reload code for you automatically
00:56tensorpuddingreload code?
00:56brehauttensorpudding: this is like saying 'i tried driving car A in reverse, and it wasnt as easy as driving car B forward'
00:57brehauttensorpudding: you used django right?
00:57tensorpuddingtwo years ago or so
00:57tensorpuddingi remember it
00:57brehauttensorpudding: did you use the manage.py runserver ?
00:57tensorpuddingyes
00:57brehautand it reloads your code on change right?
00:57tensorpuddingif it did i didn't notice
00:58brehautwell that analogy fails
00:58tensorpuddingwhat do you mean by "writing in the repl" anyway
00:58tensorpuddingyou still have to put your code into files
00:59amalloytensorpudding: no you don't
00:59tensorpuddingif you don't, how does it persist?
00:59amalloyi haven't watched his video, but you can do anything you want in a repl, and start up a jetty server from there
00:59amalloyit doesn't
00:59tensorpuddingoh, of course you can write anything you want in a repl
00:59tensorpuddingi know that
00:59tensorpuddingi've done it
01:00tensorpuddingwhile writing python code
01:00tensorpuddingi'd go and open up python, type a half dozen lines
01:00tensorpuddingbut you can't save your program
01:00tensorpuddingonce you exit the interpreter your work is gone
01:02tensorpuddingi guess we're not arguing
01:02tensorpuddingi thought you were saying something like do all your programming in a repl
01:02amalloyi do my programming *connected to* a repl
01:03tali713but if your repl is attached to a running image and the running image isn't exited then the prgram persists. (not that this is a good idea, but it works)
01:03amalloyediting files, repl open. "i'm done with this code, send it to the repl"
01:03cemerickThe effective use of the REPL in clojure goes *way* beyond what you'd do in python.
01:03tensorpuddingthat's what i do, for the most part
01:03tensorpuddingcemerick, how is that
01:03amalloytensorpudding: so stop typing lein run
01:03tali713amalloy: now that /is/ a good idea.
01:04tensorpuddingit's easier to type lein run than (require 'blog.core) (blog.core/-main), then having to kill slime when i want to stop jetty from running
01:04amalloytensorpudding: like five times someone here has told you how to stop jetty from slime
01:04tensorpuddingthey never explained what it actually did
01:05tensorpuddingand someone else said something else and it the topic was avoided
01:06brehaut(def j (start-jetty #'myhandler {:join? false})) … some time later (stop-jetty j)
01:06ibdknox(noir.server/stop server)
01:06amalloygoodness. you mean, irc didn't go into exactly the level of detail you wanted without you asking for it?
01:06ibdknoxlol
01:07tensorpuddingi did ask
01:07tensorpuddingi can't find where i said it in my log
01:09ibdknoxdamn
01:09ibdknoxwhere is technomancy when I need him
01:09tensorpuddingnot letting me connect to swank this time
01:09tensorpuddinghe's never around when you need him!
01:11tensorpuddingwhere is start-jetty?
01:11brehauttensorpudding: you arent a regular here are you?
01:11tensorpuddingisn't it run-jetty
01:11tensorpuddingbrehaut, #emacs
01:11brehautring.adapter.jetty
01:11cemericktensorpudding: just about any clojure live-coding video will demonstrate reasonable usage of the REPL, modification of code in long-running processes, etc.
01:12tensorpuddingi have run-jetty
01:12brehautand its probably because its called run-jetty and i screwed up
01:13tensorpuddingokay
01:14tensorpuddingthat seems to work
01:14tensorpuddingbut stop-jetty doesn't
01:14tensorpuddingwhere is that
01:15Raynes(.stop j)
01:15RaynesDon't know where he got stop-jetty from.
01:15amalloythough you usually don't have to stop the jetty server at all, if you're careful ahead of time
01:16tensorpuddingi don't see how
01:16brehautRaynes: not a place for polite conversation apparently
01:16amalloytensorpudding: we'll save that for later
01:17tensorpuddingi tried changing my .html files while jetty was running, it had cached old templates or something
01:17amalloyshort version: instead of giving jetty your actual code, you give it a pointer to your code and change what that points to when you want to update
01:18Raynesbrehaut: <3
01:20tensorpuddingstill disappointed that doc needs to be imported
01:21tensorpuddingis there a way to configure slime so that it'll do that for me every time it starts
01:21RaynesAt least it exists.
01:21cemerickwhat version of clojure are you using?
01:21tensorpudding1.3
01:21RaynesI'd kill for doc in Haskell *period*. Don't care where they put it.
01:21tensorpuddinghaskell has hayoo
01:21tensorpuddingwhich is pretty sweet
01:22brehautRaynes: they put it in the internet; its called hoggle
01:22RaynesClojure has clojuredocs.
01:22tensorpuddingerr, hoogle
01:22tensorpuddinghayoo is a thing too
01:22tensorpuddingbut i was actually thinking of hoogle
01:22RaynesI know about hoogle and hayoo, but that doesn't replace doc.
01:22cemerickhrmph, that's slime/swank then. `doc` is always referred to in the REPL in 1.3 by default.
01:22tensorpuddinghmm
01:22tensorpuddingi copy-pasted the version of swank-clojure i use
01:22tensorpudding1.3.3
01:22tensorpuddingno idea if that's new or not
01:22RaynesHowever, the APIs for those tools could probably be used to create something similar to doc.
01:23tensorpuddingi somewhat dislike how i have to hardcode library version names into the project.clj
01:23tensorpuddingdocstrings in python are one thing i rather like about it
01:23tensorpuddingdoc in clojure is as good
01:23RaynesOh what a mess it would be if you didn't.
01:24tensorpuddingexcept when the docs themselves are bad
01:24amalloy$findfn 1 7 8 ;; not as good as hoogle, but still cool
01:24lazybot[clojure.core/+ clojure.core/unchecked-add clojure.core/+' clojure.core/unchecked-add-int]
01:24tensorpuddingpygobject is really funny, because its docs are all autogenerated from c
01:25tensorpuddingwell, hoogle leverages the fact that haskell is statically typed
01:25amalloyyes, i realize why we can't have hoogle
01:25tensorpuddinga badly worded clojure doc makes it totally unclear what the inputs and outputs are supposed to be like
01:26amalloyc'mon, it takes obj, m, coll, and xs! what else could it possibly mean! :)
01:27tensorpuddingheh
01:27tensorpuddingcoll is suggestive
01:27tensorpuddingwhat's xs?
01:27tensorpuddinga list?
01:27amalloyprobably
01:27RaynesEr, xs is used in Haskell.
01:27amalloysomething you're going to treat as a sequence, anyway
01:28tensorpuddingyes
01:34tensorpuddingokay
01:34tensorpuddingi changed my .html file, but the change isn't propagating to the app
01:05RaynesClojure source files can't have periods in the name, can they?
01:05RaynesPlease say no.
01:06cemerickRaynes: load/load-file won't mind. require will.
01:06RaynesThat's good enough.
01:07ibdknoxI took webnoir.org down for a minute
01:09ibdknoxand we're back
01:17brehautibdknox: you can reload that sort of thing‽
01:17ibdknoxbrehaut: hm?
01:18brehautpoor joke
01:18ibdknoxlol
01:18amalloybrehaut: he didn't write it in a repl
01:18ibdknox~rimshot
01:18clojurebotBadum, *ching*
01:19amalloybrehaut: you have some kind of hotkey for that interrobang, right?
01:27ibdknoxNoir 1.2.1 released with a small breaking change: https://groups.google.com/forum/#!topic/clj-noir/llDUdYILGsw
01:28cemericklinks to new-style google groups are a form of rickroll IMO
01:29ibdknoxhaha
01:30cemerickibdknox: breaking changes on a patch release? You dare not use semantic versioning?
01:30cemerick~guards
01:30clojurebotSEIZE HIM!
01:30cemerick;-)
01:31ibdknoxcemerick: I know, I know... but really? I need to release noir 2.0 for that change?
01:31ibdknoxI'll be on noir 3453467.0.0 in 6 months ;)
01:31cemerickupdate releases are the new major release, it seems
01:31ibdknoxactually, I think this is the first breaking change Noir has had
01:32cemerickballsy then that you're > 1.0
01:32ibdknoxwell
01:32ibdknoxI tried to be semver
01:32ibdknoxwhich states once in prod = 1
01:32cemerickshould have at least 42 breaking changes before 1.0 ;-)
01:32brehautamalloy: re: ‽ i setup a system wide text replacement for it
01:32cemerickonce in prod, 1.0? o.0
01:33ibdknoxyessir
01:33brehautand new google interface style is like looking through a big white letter box
01:33ibdknoxHow do I know when to release 1.0.0?
01:33ibdknoxIf your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you're worrying a lot about backwards compatibility, you should probably already be 1.0.0.
01:33cemerickeh, that's silly
01:34cemerickI'll go register semver2.org and fix that
01:34ibdknoxthat being said, I'm comfortable with the API.. that change was the result of something that was introduced really recently
01:34ibdknoxlol
01:34brehautif you accidentally release 1.0.0 because you forgot to change the lein defaults, you should probably be 1.0.0
01:34ibdknoxcemerick: FORK
01:34cemerickFORK IT, FORK IT NOW
01:34cemerickclojurebot: fork is FORK IT, FORK IT NOW!
01:34clojurebotOk.
01:34cemerickbrehaut: LOL
01:35brehautcemerick: not that that happened with necessary-evil in any way…
01:35ibdknoxhaha
01:35brehautdinner time
01:36djanatynnoir is pretty cool!
01:36djanatynI had no idea that clojure was so mature and usable.
01:37cemerickA widget toolkit for cljs that doesn't suck would be nice.
01:37ibdknoxwidget in what sense?
01:37ibdknoxI mean I have pinot
01:37cemerickextjs / dojo / etc -style
01:38cemericktoolkit wrapper, perhaps, in that case
01:38ibdknoxah components are for wusses, not us awesome picture slinging interactive website builders ;)
01:38djanatynalso, clojuredocs.org is awesome
01:38cemerickibdknox: I need palettes next to my picture slinging! :-D
01:39ibdknoxhaha
01:47amalloyibdknox: i think if you claim to be semver you can't really release breaking changes in a patch release. i prefer to ignore the "1.0 if you're in production anywhere" rule instead, which seems a lot less useful
01:47amalloyand if you go 1.0 too soon and wind up at 59.0, then...well, i guess you're probably apache
02:04tensorpuddinghow does one keep track of all the special syntax in clojure
02:04amalloyi was going to point out that cassandra is *still* at 0.x, but i guess that's not true
02:04ibdknoxlol
02:05amalloytensorpudding: you probably don't mean "syntax" there
02:05tensorpuddingi mean those weird bracket/brace things
02:06amalloysince clojure has very few syntactic rules. unlike, say, python, which has special syntactic rules for everything, like (for example) list-comprehensions
02:06tensorpuddingand the, for lack of a better term, "sigils" used for quoting, unquoting, keyword, atom, etc
02:07tensorpuddingit's not that there's a lot of it
02:07tensorpuddingbut that they all look about the same
02:08tensorpuddingvarying combinations of punctuation
02:11amalloythat much, at least, is a fair point
02:11amalloybut for all of them except unquote (i think) you can omit the shorthand if you want
02:11amalloy(quote foo) instead of 'foo
02:11tensorpuddingyeah, it's syntactic sugar
02:12cemerickyou don't *need* to use unquote; just don't use syntax-quote
02:13tensorpuddingi'm staying away from the macro stuff
02:13amalloycemerick: oh, of course
02:13amalloybut it does lead to a pretty terrible mess if you're writing any macros
02:14cemerickNature of the beast, unless you have syntax-rules or somesuch
02:14cemericki.e. it's just templating, which is a pretty terrible mess
02:14amalloysee patch 3 on my recent compiler issue at http://dev.clojure.org/jira/browse/CLJ-865
02:14amalloytrying to improve a macro at a point in bootstrapping before we have `
02:16cemericktensorpudding: Compared to Java, python, ruby, any shell scripting, or regular expressions, you'll find no more syntactic cognitive load in Clojure than in other environments — and usually much, much less.
02:16cemerick"look about the same" == simple unfamiliarity, not inherent difficulty
02:18tensorpuddingi don't think clojure will ever look pretty to my eye
02:18ibdknoxreally?
02:19cemerick:-|
02:19ibdknoxI always thought clojure was pretty
02:19tensorpuddingwhy do people think clojure looks pretty?
02:20ibdknoxlook at the first block of code here:
02:20ibdknoxhttp://sqlkorma.com/
02:21ibdknoxwithout compiler level changes, I've never seen something that can match that level of succinctness and cohesion
02:21tensorpuddingthe parenthesis make it less like natural language
02:22cemerickNo programming language is like natural language
02:22amalloytensorpudding: would you say (in your experience) that natural language has no parens? or that it's filled with this.that.the_other hierarchies?
02:22cemerickAnd those that try are horrible (viz. applescript, various ruby/scala DSLs)
02:22ibdknoxexcept this one of course! http://shakespearelang.sourceforge.net/report/shakespeare/
02:22tensorpuddingno
02:23tensorpuddingruby does give the feeling of them sometimes
02:23tensorpuddingthese examples ignore the grievous complexities of the multitude of functions that clojure has
02:23ibdknoxno they don't
02:24cemerickgrievous complexities?
02:24tensorpuddinghow many different variations on function declaration are there?
02:24ibdknoxtwo?
02:24amalloyi'll never know how python, ruby, and haskell manage to get by with only two functions in the whole language
02:24tensorpuddingerr, declaration in general
02:24tensorpuddingthere's fn
02:24tensorpuddingand defn
02:24tensorpuddingand def
02:24cemerickfn creates a function
02:24tensorpuddingand i thought i saw a defn-?
02:24cemerickdef defines a var
02:25tensorpuddingprinting was a bigger culprit
02:25tensorpuddingthere's were like six different functions which handled printing strings
02:25tensorpuddingall variations on the word print
02:25cemericktensorpudding: how many methods are there in all of the classes and modules in python?
02:26tensorpuddingi don't see how that's comparable
02:26cemerickwhy not?
02:26cemerick,(count (ns-publics 'clojure.core)) ;; just FWIW
02:26clojurebot573
02:26tensorpuddingare there six different print functions in python?
02:27tensorpuddingthat vary in name by a few letters?
02:27ibdknoxI think you're the first person I've ever heard complain about not finding "print" and "println" intuitive
02:27alexbaranoskypython, yawn
02:28cemerickwell, you were talking about the complexities of the multitude of functions
02:28cemerickthe naming of those functions hadn't come up yet :-)
02:28tensorpuddingi'm only considering clojure.main, anyway
02:28cemerickinsofar as we have a variety of ways to print things in different ways that are composable, that seems like a good thing
02:29cemerickprint "foo" is not the only useful thing in the world
02:29tensorpuddingerr, clojure.core!
02:29cemerickright
02:29cemerick,(count (ns-publics 'clojure.core))
02:29clojurebot573
02:29cemerickI think the method/function count in all modules and all classes in python is a perfectly analogous measure.
02:30tensorpudding573 functions in one namespace actually seems like too many
02:30tensorpuddingmaybe they could split that up
02:30tensorpuddingwell, functions and vars
02:31amalloy573 is too many, but remember that's including a bunch of things that other languages would consider "language constructs" like `for`
02:32tensorpuddinglanguage constructs aren't that numerous are they?
02:32amalloytensorpudding: go read the language grammar for python, then come back and say that :P
02:32tensorpuddingi'm sure clojure is easier for machines to parse
02:33tensorpuddingi like python's syntax better
02:33tensorpuddingi find it easier for me to parse
02:33cemericksyntax != language constructs
02:33amalloyso use python, bro. we like clojure, but it sounds like you don't want to learn it
02:33tensorpuddingi like haskell's better too, it's not me disliking functional languages
02:33tensorpuddingi want to give it a try
02:33cemerickyou like haskell?!
02:34ibdknoxhah
02:34ibdknoxyeah
02:34amalloy~salespitch
02:34clojurebotHuh?
02:34ibdknoxI'm confused
02:34tensorpuddingwhat's weird about me liking haskell?
02:34cemerickliking haskell and worrying about "sigils" is…striking
02:35amalloyclojurebot: salespitch is <reply> We aren't gonna lie. Clojure sucks. Some of us tolerate it, but we can't tell you if YOU'LL be able to. Try it and make up your own mind.
02:35clojurebotc'est bon!
02:35cemerickwhere'd that come from?
02:35tensorpuddingi don't know what haskell has to do with sigils
02:36amalloycemerick: the salespitch in #emacs
02:37cemericklet pgen (p:xs) = p : pgen [x|x <- xs, x `mod` p > 0]
02:37cemerickright-o!
02:37alexbaranoskyClojure's awesome features are all hidden by its simplistic, weird syntax
02:37tensorpuddingthere is no sigil in that
02:38alexbaranoskyyou can't appreciate Clojure until you've learned a lot about why the design decisions were made OR you already know a ton about Lisps
02:38tensorpuddingthere's (:), which is a special-cased infix type constructor, and the special [ | ] syntax for comprehensions
02:38ibdknoxalexbaranosky: eh, I dunno about that
02:38ibdknoxalexbaranosky: I had never used a lisp until clojure
02:38tensorpuddingi want to eventually appreciate why people care about lisp
02:39alexbaranoskyibdknox: well maybe its different strokes for different folks
02:39alexbaranosky:)
02:39tensorpuddingi always assumed it had to do with code-as-data
02:39cemericktensorpudding: right; so it seems odd that you're concerned with '
02:39tensorpuddingi don't mind '
02:39alexbaranoskyAll I'm saying is tensorpudding should probe deeper into the whys behind Clojure before deciding it is too weird/complicated
02:39tensorpuddingi was more worried about the weird ones that other lisps don't use
02:40cemerickweird ones
02:40tensorpuddinglike @
02:40cemerickequivalent to `deref`
02:40alexbaranosky#, @, #{}, {}
02:40cemerick,(read-string "@d")
02:40clojurebot(clojure.core/deref d)
02:40alexbaranoskyoops... last one's pretty common ;)
02:40tensorpuddingi think it was ~@
02:40tensorpuddinglet me find it
02:41tensorpuddingsomething in the compojure source
02:41alexbaranosky,(read-string #"\w+")
02:41clojurebot#<ClassCastException java.lang.ClassCastException: java.util.regex.Pattern cannot be cast to java.lang.String>
02:41cemerick,(read-string "`(apply + ~@numbers)")
02:41clojurebot(clojure.core/seq (clojure.core/concat (clojure.core/list (quote clojure.core/apply)) (clojure.core/list (quote clojure.core/+)) numbers))
02:41tensorpuddingyeah, it was ~@
02:41tensorpuddingand `
02:42tensorpuddingwhich i know has to do with macro splicing or something
02:43amalloycemerick: might be more convincing to point out that `(apply + ~@numbers) is the same as (list* 'apply '+ numbers)
02:43amalloyrather than the horrific nonsense spewed by `
02:43tensorpuddingi wish you could get documentation on everything from clojure.repl/doc
02:43alexbaranoskyI'd say that the macro stuff is in fact funky
02:43ibdknoxit is
02:44alexbaranoskyjust ignore macros for now
02:44tensorpuddinginstead of everything except special forms and such
02:44ibdknoxwith power comes some level of weirdness
02:44tensorpuddingwhich are usually the things that are not easy to grok
02:44ibdknoxclojure.org
02:44tensorpuddinghaving to pull out language specs is boring
02:44ibdknoxlol
02:44tensorpuddingoh
02:44tensorpuddingi don't like clojure.org either
02:45alexbaranoskythe fact that you don't immediately grok them, though, doesn't necessarily mean they're a bad approach... it could just mean that they are very foreign to you
02:45tensorpuddingokay, that's harsh
02:45alexbaranoskyfor what its worth: Python is hot garbage compared to the power of Clojure, imho :)
02:45amalloy!?
02:45clojurebotCLABANGO!
02:45tensorpuddingi don't like using it to find out how to do things
02:46ibdknoxhuh?
02:46amalloyoh, saying you don't like clojure.org is harsh?
02:46ibdknoxlet me get this straight
02:46tensorpuddingno
02:46amalloyi thought you were upset with alexbaranosky's assessment
02:46amalloywhich would be crazy
02:46tensorpuddingwait, yes amalloy
02:46alexbaranoskyClojureDocs is very nice for looking up functions
02:46ibdknoxyou won't take the time to RTFM and then complain that you don't understand how it works?
02:47alexbaranoskyhehe
02:47tensorpuddingit's hard to find things in the reference
02:47ibdknoxthis trolling is getting a bit ridiculous
02:47tensorpuddingthis isn't trolling
02:47tensorpuddingthis is me ranting
02:47tensorpuddingi guess that's not better
02:48alexbaranoskytensorpudding: you've got to bite the bullet and learn Chinese, only then can you complain about the syntax :)
02:48brehauti dont understand the complexitities of modern medicine. man do i hate that shit!
02:48ibdknoxlol
02:48tensorpuddingi'm looking at http://clojuredocs.org/clojure_core
02:48alexbaranoskyI hate Chinese too, what with all of those characters, I can't even use my keyboard
02:48ibdknoxtensorpudding: why?
02:49tensorpuddingbecause alex brought it up
02:49tensorpuddingit's more condensed than clojure.core's api docs on clojure.org
02:49tensorpuddingneed to turn up the font though
02:49alexbaranoskyI love the example usages for each function/macro at that site
02:50tensorpuddingthis is better than clojure.org, def.
02:54amalloy,(doc .)
02:54clojurebotGabh mo leithscéal?
02:54amalloy,(use '[clojure.repl :only [doc]])
02:54clojurebotnil
02:54amalloy,(doc .)
02:54clojurebotCool story bro.
02:54amalloyman. i thought you could do that in 1.3?
02:55tensorpuddingis this irish
02:55brehautamalloy: im sure theres heaps of code in c.r for special forms too
02:55alexbaranoskyc.r. ?
02:55brehautclojure.repl
02:56amalloybrehaut: i've read the source of c.r.doc, and it has a lot of code aimed at special forms
02:56amalloyi don't really understand what version clojurebot is running if this doesn't work
02:56brehaut&(doc .)
02:56lazybot⇒ "Special: .; The instance member form works for both fields and methods.\n They all expand into calls to the dot operator at macroexpansion time."
02:58amalloynot actually a very helpful doc though
02:59brehautno especially eh
03:09amalloybtw can i get some upvotes on http://dev.clojure.org/jira/browse/CLJ-865 if anyone's around? patch has been there for a week or two and it fixes an issue i've run into a couple times
03:11ibdknoxamalloy: done
03:17amalloythanks
04:53bOR_small question, if anyone knows. Decided while developing to use clojure 1.4.0-master-SNAPSHOT
04:53bOR_but that seems to lose me the ability to use doc in a repl (doc map) for example.
04:54raekbOR_: (use 'clojure.repl)
04:54bOR_thanks
04:54bOR_will that also get me to use (source ...)?
04:55bOR_great.
04:55bOR_yep!
04:55bOR_gracias.
08:21goodieboyI'm using the contrib.duck-streams lib, trying to append to a file but getting this: Can't dynamically bind non-dynamic var: clojure.contrib.duck-streams/*append-to-writer*
08:22goodieboyi think it's because i'm using clojure 1.3 ?
08:23duck1123goodieboy: yes, in 1.3 you can no longer re-bind vars that aren't markes as dynamic. You don't want to use duck-streams anymore
08:23duck1123most of the stuff has moved to new libs
08:23goodieboyduck1123: ahh ok that's what i thought. Do you know what I could use for appending to a file?
08:24duck1123spit takes an append option
08:25duck1123(spit "event.log" "test 1\n" :append true)
08:25goodieboyperfect thanks!
09:14mbac did (use 'clojure.contrib.io) the other day and someone told me unqualified use is bad, but they're asleep so i can't ask them what to do instead
09:17mbacoh, (use '[clojure.contrib.io :only (murders executions)]) must be what they meant
09:17cemerickexactly right
09:17cemerickThere are still some sane usages of unqualified use, but they're rare.
09:20mbacalso is there a name for the -> and ->> combinators?
09:21cemerickThey're not actually combinators, they're macros.
09:21cemerickUsually called threading macros.
09:21cemerickmbac: fogus has this one: http://blog.fogus.me/2010/09/28/thrush-in-clojure-redux/
09:22mbacyeah, saw
09:22mbacthat's what lead me to ask about the threading macros
09:22cemerick,(doc ->)
09:23clojurebot"([x] [x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."
09:23cemerickI think people take their cue from the verb at the start.
09:23cemerickI think I've heard them called "chaining" macros too. *shrug*
09:28leo2007hi
09:31gtrak``why doesn't this work?
09:31gtrak``, (javax.xml.bind.DataTypeConverter/parseBoolean "t")
09:31clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.ClassNotFoundException: javax.xml.bind.DataTypeConverter>
09:33gtrak``oh, damn, spelling error :-)
09:35mindbender1When I clojure-jack-in to a project from emacs and get an
09:35mindbender1 repl.. I've been having troubles switching to a files namespace
09:35mindbender1 with (in-ns "foo.bar"). I keep getting
09:35mindbender1 ..lang.ClassNotFoundException
09:36gtrak``you have to compile the file
09:36mindbender1oops*
09:36gtrak``or use require
09:36gtrak``otherwise it won't know what to do
09:36gtrak``but compiling a top-level file will compile all the referenced ns's as well
09:36mindbender1gtrak: can I compile from the repl?
09:36gtrak``require
09:37gtrak``but you can also just use emacs C-c C-k I think
09:38gtrak``which has the advantage of letting you navigate buffers by symbols
09:40TimMcmbac: Only use :use with :only. :-)
09:40TimMccemerick: I like to call them stitching macros, personally.
09:40TimMcclojurebot: use?
09:40clojurebotchouser is ruthless about breaking other people's code
09:40TimMcheh
09:40TimMc~use
09:40clojurebotI want to go to there
09:40TimMcwtf
09:41TimMcclojurebot: use is |reply| Only use :use with :only.
09:41clojurebot'Sea, mhuise.
09:42TimMcWell, pretty sure I screwed up that factoid, but oh well.
09:47gfredericksclojurebot made sure to reply with a phrase that included "use" as a subsequence.
10:00TimMcgfredericks: Oh, wow... you can't spell "chouser" without "use".
10:01TimMcand I bet the second one was *said* by chouser
10:01TimMc~use
10:01clojurebotuse is |reply| Only use :use with :only.
10:01TimMcugh
10:02TimMcneed brokets
10:03TimMcclojurebot: use |is| <reply> Only use :use with :only.
10:03clojurebotAlles klar
10:03TimMc~use
10:03clojurebotOnly use :use with :only.
10:45svjsonIs there anyone around who can answer a basic ClojureScript/goog.dom question?
11:15bsteubersvjson: just ask and we'll see :)
11:16svjsonbsteuber: I sort of solved it, I think....
11:16svjsonIt's about rendering of the dom
11:17svjsonI kept getting nothing back from my (.getElementsByClass goog.dom "...")
11:17svjsonI then resorted to put the script stuff at the bottom of the page inside a div, and now it sort of works
11:18bsteuberso you tried to access an element before it was created?
11:18svjsonBut It'd be preferrable, to me at least, to wait for the dom to be properly rendered, á la jQuery's $(document).ready(..)
11:19svjsonI'm guessing that's the case, yes
12:25tensorpuddingobnoxious swank problems...
12:33tensorpuddingand korma connections aren't working
12:38tensorpuddingpsql works, but korma times out
12:39ibdknoxhm?
12:41tensorpuddingi have a database blog, role blog (with login) and a password 'blog'
12:41tensorpuddingi configured korma to connect to it
12:41leo2007any idea why C-c C-d C-d in slime does not show any doc for special forms?
12:41tensorpuddingbut when i do a select the connection times out
12:42ibdknoxwell, it can definitely connect to psql
12:42ibdknoxdo you have the psql driver on your path?
12:43tensorpuddingthe which now?
12:43Vinzent,def
12:43clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: def in this context, compiling:(NO_SOURCE_PATH:0)>
12:44ibdknoxtensorpudding: ah k, just one sec
12:44tensorpuddingif you mean the psql program, yes
12:45ibdknoxnope, JDBC requires the specific driver for your database, I never told you to do that in the docs so I will fix that shortly.
12:45ibdknoxtensorpudding: you'll need to add a dependency for [postgresql "9.0-801.jdbc4"]
12:45Vinzentleo2007, doc shows docs for special forms because it's hardcoded there, but special forms don't have corresponding var with meta
12:45ibdknoxthat is what allows JDBC to talk to psql
12:47tensorpuddinghmm
12:50tensorpuddingmuch improved
12:51ibdknoxgreat. Sorry about that, I'm adding to the docs now
12:52leo2007Vinzent: but swank.commands.basic/print-doc* seems to have code for special forms.
13:02scottjleo2007: I don't think that code ever gets run, perhaps it never worked, or perhaps it did on an older version of clojure
13:02leo2007scottj: thanks.
13:06tensorpuddingis there any way to force reloading of code with slime?
13:36simardI get this error when doing M-x clojure-jack-in (emacs 23.3 under Windows 7): error in process filter: clojure-eval-bootstrap-region: Non-hex digit used for Unicode escape
13:37simardis there a fix for that ?
14:19przemek_any idea why this:
14:19przemek_(defn job [x] (println "hello" x) 1)
14:19przemek_(def sched (Executors/newSingleThreadScheduledExecutor))
14:19przemek_(.scheduleAtFixedRate sched (job 1) (long 0) (long 100) TimeUnit/MILLISECONDS)
14:19przemek_gives me #<ClassCastException java.lang.ClassCastException: Cannot cast java.lang.Long to java.lang.Runnable> in REPL ?
14:20przemek_shouldn't each function implement Runnable ?
14:20brehautprzemek_: (job 1) evaluates the function job with the argment one (returning a long) and passes that as the first argument to the .scheduleAt… method
14:21brehautprzemek_: try #(job 1) or (fn [] (job 1))
14:21przemek_:)
14:22przemek_my bad
14:22przemek_thanks a lot
14:51djanatynI want to dedicate today entirely to Clojure :D
14:57tomoj.ui sai
14:58tomojdjanatyn: you still using emacs?
15:02djanatyntomoj: Yep.
15:03djanatynI've got it set up with swank and lein and everything, thanks to help from #clojure.
15:03tomojoh, nice
15:03tomojwas going to recommend ignoring the getting started instructions in that article :)
15:04chouserSeriously. Bullet points. Now.
15:04chouserNo more messing around in 4clojure or #clojure.
15:04chouserOh, whoops.
15:04djanatynI was so confused for a second :)
15:04chouserI'm still confused, if that's any help
15:04cemerickchouser: daily affirmations? ;-)
15:09chouserheh
16:19drguildowhy doesn't "(filter Character/isUpperCase "TeStINg")" work?
16:19mdeboardHm how do I search for a jar on Clojars & Maven via Leiningen? I'm trying to find Korma
16:20brehautdrguildo: Character/isUpperCase is not a function, its a (static) method
16:20mdeboardSometimes I ask stupid questions
16:20brehaut,(filter #(Character/isUpperCase %) "TeStInG")
16:20clojurebot(\T \S \I \G)
16:21drguildoshould the distinction be obvious? i can call isUpperCase as a function, can't i?
16:21Raynesmdeboard: 'lein search korma'
16:21drguildo,(Character/isUpperCase \X)
16:21clojurebottrue
16:21mdeboardRaynes: Yeah, hence my "Sometimes I ask stupid questions" comment :P
16:21brehautdrguildo: theres sugar in place there
16:22brehaut,'(Character/isUpperCase \X)
16:22clojurebot(Character/isUpperCase \X)
16:22brehautdamnit
16:22brehaut,(macroexpand '(Character/isUpperCase \X))
16:22clojurebot(. Character isUpperCase \X)
16:22drguildobrehaut: do you have any pointers to where i can learn about the distinction?
16:22drguildohrmm, ok
16:22brehautdrguildo: http://clojure.org/interop ?
16:23brehautdrguildo: sorry http://clojure.org/java_interop
16:23drguildothanks
16:24brehautdrguildo: basicly, if its a java method, you cant use it as a function. you can tell because either its bound to a class (which ussually has a CapitalCamel name) and has a slash in it, or it is preceeded by a dot eg .toUpperCase
16:25icefoxIs there a specific room for Clojure-conj?
16:25RaynesNope.
16:26RaynesNobody will string you up for talking about it here. We're all very excited.
16:27icefoxJust arrived in raleigh
16:28drguildobrehaut: ok, thanks
16:28amalloyicefox: dude, i think you're early
16:29icefoxgoing to the training too
16:29brehautRaynes: remember to check under your seat at the keynote for your early beta reader macros
16:29Raynesbrehaut: Heh
16:30icefoxThe person at the desk said there was some sort of get together this evening at the bar, but don't know anything more
16:38jliI don't understand the difference between next and rest
16:39amalloy&((juxt next rest) [1])
16:39lazybot⇒ [nil ()]
16:40amalloyjli: ^
16:40jliis that .. all?
16:40amalloyyes
16:40jlihuh. cool. thanks.
16:41brehautfor some reason i though one is slightly more lazy than the other too
16:41amalloybrehaut: that's the same thing, really
16:42brehauti guess so, although if you arent looking for it, that implication might be missed
16:42amalloy*nod*
16:42amalloynext has to realize the next element to decide whether to return nil or not, whereas rest always returns a lazy sequence and doesn't have to realize anything
16:57gfredericksso (= next (comp seq rest))?
16:58NocabIm reading "the joy of clojure" and I'm at the chapter about macros
16:58gfredericksdon't write macros
16:58Nocaband there I see some code using assoc on an empty map
16:58Nocabassoc {} key val
16:58Nocabas opposed to just {key val}
16:58Nocabwhat on earth is the point of that?
16:59Chousukecan't say much without context, but probably no point :P
16:59Nocabits a good book and the authors seem to grok clojure and idiomatic clojure pretty well
17:00gfredericksI can imagine every once in a while that might make an expression more readable...
17:00NocabI'm going to assume it's not 100% pointless
17:00brehautNocab: whats the page number?
17:00Nocab174
17:00Nocabfrom lining 8.11
17:00Nocablisting
17:01brehautoh yeah, the pre post stuff
17:01brehauttheres no obvious reason from the context
17:01Chousukeyeah looks like it would be just fine with a literal map
17:02Nocabok
17:02Chousukemight just be a habit from writing lots of (into {} ...) :P
17:02Nocabso there is no hidden clojurism or idomaticism over this
17:02Nocabheh
17:02TimMcYeah, send a pull request to the authors... :-P
17:02Nocabthanks
17:03Nocab:P
17:03Nocabok
17:03TimMc(Which reminds me, I have a huge typo list to send to the author of a book I've been reading...)
17:04djanatynheh, I never realized that mutable state was an oxymoron
17:04Nocabdepends on your definition of "state"
17:05Nocabif you -mutate- the definition of state into fitting your argument, then yes, mutable state is an oxymoron :P
17:05photexSo at first glance, I thought that Korma was along the lines of an ORM... but I would still need to setup a database and whatever schema by other means correct?
17:05Nocabphotex: from what Ive seen, yes
17:06photexok cool
17:07photexI'm still new to Clojure, coming from Python
17:09tolstoySeems like korma is something that allows you to model verbs for your data access, whereas other ORMs model nouns. (Looking for a pithy description.)
17:10brehautkorma lets you a) describe the relationships between entities, and b) write SQL using composable primatives
17:10photexthat makes perfect sense
17:11tolstoyWhat's the value of composable primitives?
17:12brehautthe value is that you can write your wheres, froms, aggregates etc as seperate functions
17:12amalloytolstoy: that's basically what programming is, right?
17:12brehautand trivially reuse them
17:12tolstoyamalloy: Yep.
17:12Nocabtolstoy: from what I read korma should be "composable", but I have no idea how composable it is
17:13gfredericksI got a lot of good use out of clojureql for its composability vs c.c.sql
17:13brehauttolstoy: i have some korma that looks like this: (def chronology (-> (select* fragments) (with timestamps) (mod-dates) (live-only)))
17:13tolstoyI've seen some nasty PHP code where there were lots of if/ands/buts for crafting up a query based on customer configuration. I could see korma really helping with that.
17:14tolstoybrehaut: Could you say that it allows you to craft up a DSL for your particular problem set?
17:14brehautjust a word of caution, korma is still very new, and theres some bugs
17:14brehauttolstoy: if i were a hipster yeah
17:14brehautid just call it programming
17:15brehauttolstoy: do you call writing functions and using them 'crafting a DSL' ?
17:15gfredericksjust the phrase "DSL" reminds me of ruby and that "data as code" thing
17:15Nocabbrehaut: what a perfectly troll like response with an actual point :P
17:15amalloybrehaut: a hipster *or an advertiser*
17:16tolstoyWell, no, but now that I think of it, it sort of is. Building your primitives up into a language that lets you solve a problem.
17:16brehautsorry, didnt mean to be snarky
17:16amalloyNocab: you seem to be the only one who found it trollish
17:16chouserNocab: The assoc is most likely left over from a previous version of that code that may have been building up a map rather than returning a new one.
17:16Nocabchouser: thanks
17:16tolstoybrehaut: I was trying to think of a way to describe it to (say) colleagues who might know the value of an ORM, but who might see Korma as no different than raw strings.
17:17Nocabwhen I said troll-like, it was meant in a positive way. finely crafted to provoke attention, but with an actual point attached ;)
17:17brehauttolstoy: the parralell in the python world is probably SQL Alchemy
17:17amalloytolstoy: i like the comparison of verbs vs nouns, personally
17:18tolstoyamalloy: I'm normally one of those "just use SQL and shut up" kind of people, so I'm trying to find the real value in this. (I don't use SQL in my day job these days.)
17:19brehauttolstoy: korma is only a slight level above 'just use SQL'
17:19brehautall its operations are SQL operations
17:19tolstoySo, yeah, brehaut, if I can keep a "hipster" slogan in mind, I might be able to then unpack it if I need to. ;)
17:19brehautrather than some set of operations of its own, or something more abstract like clojureql's use of relational algebra
17:20gfredericksI imagine that with korma half your typos will get caught by the compiler rather than silently sitting in your string literals
17:20brehautthe biggest abstraction korma provides is the has-many request
17:21brehautwhere it will choose to do a second query to get related table data
17:21photexyeah, that is pretty cool
17:21photexbut what about many-to-many?
17:21photexdoesn't that always require a separate table?
17:21brehautphotex: i believe many-to-many is currently just two has-many's to a many-to-many table
17:21photexwould I still just be more or less manually putting that query together
17:22photexah o
17:22brehautyou are 'manually' creating a query, but you dont need to repeat yourself as much as in SQL
17:22photexbut it's automatically (potentially) executed
17:23photexwith connections handled for you
17:23photexwhich is the other aspect I was attracted by
17:23photexok, well, I'm going to noodle with it a bit
17:24tolstoyBTW, is it known that when you C-c C-k a file in slime-clojure, mismatched parents in commented-out code cause errors?
17:25tolstoyEr, parens. This mac autocorrects. ;)
17:25photexare there any sources of information about input sanitation when working with Clojure and a dbms?
17:25brehauttolstoy: system preferences > language & text > correct spelling automattically
17:26tolstoybrehaut: Generally, I like it. Wish I could turn it off for just this app.
17:26photexColloqyu?
17:26raektolstoy: yes.
17:26brehauttolstoy: you can temporarily turn it off for a particular field by rightclicking
17:26photexhas it's own setting
17:26photexoh nm
17:26raektolstoy: 'comment' is implemented as a macro, so the stuff between the parens has to be valid syntax
17:27photexit'll "check" spelling
17:27tolstoybrehaut: Without using a fancy plist setting.
17:27photexthe correction is a lion thing
17:27tolstoyAh, cool. Didn't know about the right-click thing.
17:27tolstoyraek: No, I mean commented out with semi-colons.
17:27brehauttolstoy: right click in the text entry field > spelling & … > correct spelling automatically
17:34gfredericksI'm getting a zip exception for some reason; the sort you'd get for a corrupt jarfile. But I blew away all my jars (including ~/.m2) and it's still happening. Anybody know any other cause?
17:35brehauttolstoy: the reason i was objecting to 'DSL' etc is that in clojure its prefered that things are just functions and data rather than magical mystic special stuff. clojure (being a lisp) supports the magic stuff with macros, but in general it hurts reuse etc so they are used as a seasoning on functions and data.
17:35brehauttolstoy: in korma the root operations for select, update etc have a macro form for convenience, and a function that you can also use. eg select and select*
17:36tolstoybrehaut: Yeah, I get you. What I was thinking was this: with korma, you can build up a set of more abstract functions on top of the SQL stuff (which you've composed together) such that your app can be large grained rather than fine grained.
17:36tolstoyThis is indeed "programming".
17:37tolstoyBut maybe korma influences the kinds of more-abstract functions you might do than an ORM style tool.
17:37brehautrelated: http://vrac.cgrand.net/DSL.pdf
17:37amalloytolstoy: it is not known, and indeed is untrue in any config i've ever used
17:38amalloythat is, ;; ())((( compiles just fine
17:38tolstoyI'm probably using DSL in a more general sense, or maybe just completely wrong. ;)
17:38tolstoyamalloy: Okay, good to know. I'll have to pay attention and craft up a use case when (if) it happens next, and submit it if I can reproduce it.
17:38brehauttolstoy: that presentation is the result of cgrand converting some DSLy libs into more idiomatic, macro free clojure
17:41tolstoyamalloy: Seemed to happen when I'd commend out some code (using ;;) and then compiling that form. Very surprising. I really hope I just messed something up somewhere.
17:41amalloytolstoy: that can happen if you've done it incorrectly, causing the actual un-commented code to be unbalanced
17:42amalloyeg, by commenting out an open-paren but not its matching close
17:42amalloythough emacs does its best to stop you from doing that accidentally
17:42tolstoyRight. I spent a lot of time looking for that, watching the flashing paren matchers, etc. Tabbing to see indent levels. Then I added a paren to the commented-out code, and it worked! So strange! ;)
17:43tolstoyIf no one else has seen this, then that's good to know. I'll chalk it up to User Error. ;)
17:43brehauti think whacking a mark is the way i typically find myself break paredit
17:43hugodI've seen unbalanced parens in comments cause issues
18:01seancorfieldring question... i'm trying to use wrap-resource and i figured out how to get favicon.ico found
18:02seancorfieldbut now it's matching "/" and returning the URI of a directory so the home page of my app is not being executed
18:04brehautseancorfield: i believe that wrap resources intercepts your request prior to it reaching your ring handler and returns a resource if it finds an equivalent relative to the root-path map you provide to the wrapper function
18:05seancorfieldyes, but it shouldn't return a directory request which is what seems to be happening
18:05brehautlooking at the code that would be my expectation too
18:06seancorfieldit's returning a :body of a File for which .isDirectory returns true... i just checked
18:06photexIs korma compatible with Clojure 1.3.0?
18:07brehautseancorfield: thats surprising; resource-response explicitly checks for directors and doesnt return them
18:07brehauthttps://github.com/mmcgrana/ring/blob/master/ring-core/src/ring/util/response.clj#L77
18:08seancorfieldyup, that's what i'm looking at
18:08seancorfieldand if i run the code myself in the repl, i still get the directory back...
18:09brehautit must be coming back with a "file" protocol…
18:09brehauterr not
18:10brehautseancorfield: try (.getProtocol (io/resource path)) in your repl?
18:11seancorfieldfile
18:12photexok, actually, didn't mean to single out korma, but when trying to (require) a module in the repl, which itself only uses clojure.contrib.sql and korma.db; I was getting a stacktrace
18:12photexbut going back to 1.2.1 I can load it just fine
18:12seancorfieldspecifically (.isDirectory (:body (resource-response "" {:root "example/"}))) is true - which should not happen
18:13seancorfieldphotex: monolithic contrib (1.2.0) does not fully work with clojure 1.3.0
18:13photexah
18:13brehautseancorfield: the middleware unwraps the {:root …} map
18:13photexthanks seancorfield
18:13seancorfielduse the new modular contrib libraries instead (specifically clojure.java.jdbc instead of clojure.contrib.sql)
18:13brehautseancorfield: oh. my bad, it does the reverse
18:14photexok, man so much information now is just incorrect for new folks like me
18:14seancorfieldbrehaut: yeah, that caught me out at first
18:15seancorfieldresource-response expects a map with a key :root (for some odd reason)
18:15seancorfieldwrap-resource takes the path (string) and passes it in a map {:root path}
18:16seancorfieldanything except a request for / correctly goes thru my app
18:19seancorfieldvery weird (and frustrating)
18:20brehautseancorfield: what routing / app lib are you using?
18:22djanatynhmm
18:22djanatynin clojure, (= x/y (/ x y))?
18:22brehautseancorfield: because you could always put a fallback handler in place in moustache or compojure and call resource-response explicitly
18:23djanatynah, rational numbers are simplified if possible
18:23seancorfieldi noticed that the isDirectory code is recent, since october 9th
18:23seancorfieldbut i'm using 1.0.0-RC1 so i should have that code
18:24seancorfieldah, my lib folder has an old version of ring!
18:24seancorfield*facepalm*
18:24brehautaha!
18:24brehaut:(
18:24cemerickseancorfield: I found I had to depend upon ring-core 1.0.0-RCx to get the fix
18:25cemerickbecause other libs were depending upon older ring revs
18:25cemerick(could use "[1.0.0-RCx,)" instead, I suppose)
18:26seancorfieldi forgot to run lein deps on my desktop since i switched back to it after working on my netbook most of yesterday
18:26seancorfieldi had updated from ring 0.3.8 to 1.0.0-RC1 yesterday to pick up other fixes...
18:28seancorfieldoh well, only an hour wasted :(
18:28seancorfieldnow i can get back to expanding FW/1 :)
18:28cemerickseancorfield: is that your re-invigoration of the enlive frontend?
18:29seancorfieldit's a port of my MVC from CFML
18:29cemerickright…but you were hung up on enlive at some point, right?
18:29cemerick(may be mis-remembering strangeloop conversations)
18:30seancorfieldyeah, but chatting with you at strange loop got me past that :)
18:30cemerickfabulous
18:30seancorfieldhttp://corfield.org/blog/post.cfm/real-world-clojure-html-email-generation -- you get a credit there for helping me out!
18:31seancorfieldhttps://github.com/seancorfield/fw1 -- CFML version -- https://github.com/seancorfield/fw1-clj -- Clojure version (work-in-progress)
18:31cemericknice :-)
18:31seancorfieldconvention-based... auto-discovers controllers, views, layouts...
18:33seancorfieldi have enough working that i think i can port one of the sample apps from cfml to clojure and start to demo it :)
18:34cemerickhow would this sit with your frontend guys?
18:39tolstoybrehaut: I like that pdf presentation you liked to. ;) Sorry for using the world DSL. Lots of good sense in there.
18:39mdeboardBleh, I shouldn't have tried to use postgres for this project where I'm also trying to learn Korma :|
18:40tolstoybrehaut: Er, I mean, "linked" to.
18:40brandelis the best approach for dom manipulation in clojurescript to build up a lib like dom-helpers.cljs in the twitterbuzz sample or is does clojurescript have it's own dom functions?
18:40brandel^or does
18:42brandeljust note that r.hickey has wrapped most of the dom/* functions in his own
18:43brandelah, it's a js library - dom/foo is from google closure
18:44mdeboardAnyone here have any experience with Korma yet?
18:45mdeboardI'm using (sql-only) on an (insert) call, but it's returning `VALUES (?, ?, ?)` (literally the "?" marks) instead of the values I've actually set in the map.
18:48brandelit would be nice to have these defined in something along the lines of clojure.script.dom, but perhaps I'm failing to understand something fundamental here :)
18:49mdeboardHere, a more general question: Has anyone had success connecting to a PG db with Clojure?
18:49brandeldoesn't clojure just use jdbc?
18:50mdeboardbrandel: Yeah.
18:50brehautyes and yes i believe
18:50technomancymdeboard: https://github.com/abedra/shouter and https://github.com/technomancy/clojars-web/tree/heroku both use it
18:51mdeboardtechnomancy: Thanks
18:51technomancyhaha
18:51mdeboardor a tatoo.
18:51mdeboardttoo*
18:52mdeboardtechnomancy: by "it" do you mean jdbc or korma? I thought you meant the latter bu tnow that I think for a sec you must mean the former
18:52cemericktechnomancy: an addition for your cafepress store
18:53technomancymdeboard: oh sorry, that all predates korma
18:53mdeboardtechnomancy: Yar, no worries
18:59brandelok, now I'm confused clojure.browser.dom exists alonside goog.dom :|
19:11mdeboardWhat's data type is ^{} ?
19:11mdeboards/What's/What
19:11seancorfieldcemerick: "how would this sit with your frontend guys?" -- our team know FW/1 in its CFML form and the pure HTML views / layouts in the Clojure version of FW/1 would work better with our UI guys...
19:11seancorfieldmdeboard: ^{} is a map of metadata
19:11seancorfieldlike ^{:doc "docstring"}
19:11mdeboardah
19:20Raynestechnomancy: Is there a way I can check to see how much memory tryclj is consuming on Heroku?
19:21archaici need to create dynamic? cond statement https://gist.github.com/1343842 can someone look at that please - the function seems to work but i don't like it at all
19:22brehautarchaic: a cond statement is inherently closed for extension. the most obvious choice for an open for extension choice is multimethods
19:23brehautarchaic: and using eval is a code smell
19:23archaicyeah, thats why i asked
19:23brehautarchaic: what problem are you trying to solve?
19:25archaicI have temperature data I want to group by different ranges -> i'm passing the above function to group-by to generate frequency distributions for different ranges
19:29brehautarchaic: how about you use math?
19:30brehautarchaic: http://gist.github.com/1343875
19:31brehautarchaic: i used an anonymous function to closure over the bounds you wanted, and then just calculate the new keyword (which btw is a bit horrible) on request
19:32archaicbrehaut: thanks .. what was i thinking jesus
19:32archaicway to overcomlicate things
19:33brehautarchaic: the ability to create functions inline is an extremely powerful mechanism for enabling polymorphic behaviour
19:33RaynesI don't think brehaut was trying to overcomplicate things or be condescending.
19:33cemerickbrehaut: reminded me of http://xkcd.com/208/ — just s/regular expressions/math
19:33archaicno i mean't i overcomplicated things not him
19:33archaicmeant
19:34brehautcemerick: lol :)
19:34RaynesOh.
19:34brehauti lvoe how 'perl!' is onomatopoeia
19:35cemerickelectronic communication has set back interpersonal relations by a century
19:35brehautat least
19:35brehautunfiltered stupidity broadcast in nanoseconds
19:35brehautand typically in 7pt verdana
19:36brehautarchaic: instead of the keyword in your code, i would probably use either a vector or map
19:37brehautarchaic: either [lower upper] or {:lower lower :upper upper} or similar (depending on the usecase for the function
19:37mdeboardwhoa.
19:38brehautmdeboard has just seen the matrix
19:38mdeboardbrehaut: emacs just crashed while trying to connect to a db :(
19:38brehautmdeboard: slime + swank ?
19:38archaicbrehaut: probably good idea, only was using that form since a display function im using takes keywords
19:38mdeboardbrehaut: Yeah. Trying to troubleshoot this problem with Korma being unable to connect to a db
19:39mdeboardso I tried doing it with jdbc, crash
19:39brehautmdeboard: i found that if i tried to use bare select on an existing DB that the resulting data would swamp swank or slime and something would die
19:39mdeboard"whoa"-worthy because I've never had emacs crash randomly without having some issue with recursion
19:40brehautalthough, only some scripts in emacs rather than emacs itself
19:41sritchie_hey all -- is there a way to view the class path at the clojurescript browser repl?
19:44sritchie_I'm running (load-file "…"), but entering the wrong thing causes the repl to exit back to clojure 1.3
19:44amalloyi should answer more questions with "try using math"
19:44brehautamalloy: in hindsight i realised that i could have used math _and_ juxt
19:45amalloybrehaut: pretty sure you could work partial and comp in there, no problem
19:45brehautamalloy: definately a partial. (defn temp-range [start by end x] …)
19:46amalloybrehaut: btw, i finally added *** to useful: https://github.com/flatland/useful/blob/develop/src/useful/fn.clj#L66 - dunno why it took me so long to stop whining about its absence and just add it
19:46brehauthaha awesome :)
19:47brehautlooks good
19:47brehautname is as good as any
19:48amalloybrehaut: ninjudd and lancepantz spent like five to ten minutes making up names for it cause they hated collude so bad
19:48brehauthehe
19:48brehautand apparently grok was not accepted
19:48amalloyin fairness i didn't like grok either
19:49brehautrats
19:49brehauthaha (def ! complement)
19:50amalloythat one's surprisingly handy
19:50brehautyeah im sure it is
19:52amalloybrehaut: see https://github.com/flatland/useful/blob/develop/src/useful/map.clj#L173 for a bit of magic that made ibdknox laugh when i linked to it
19:53brehautamalloy: please hold. taking brain out of neutral
19:54brehautwhat does to-fix do?
19:55amalloy(to-fix foo bar) => (fn [x] (if (foo x) (bar x) x))
19:55amalloyimpl is in useful/fn.clj, but it's a bit messy
19:55brehautcare to enlightment on the name? also huh
19:56amalloybrehaut: well, it's paired with (defn fix), which actually does the fixing. to-fix returns a function which, "to fix" things which aren't sets, calls hash-set on them
19:56brehautoh right
19:56brehauti was having trouble getting past 'fixed point' in my head
19:56amalloyah
19:58brehautthats clever
19:59amalloythanks. it's really nice having useful around to dump all the neat ideas i/we come up with for reuse
19:59brehautyeah
19:59brehauti need to remember to use it
20:00Raynesamalloy: That describes it well. idea.dump/fix
20:01mdeboardI am having a very damn hard time creating a connection to a database with Clojure. Very frustrating. I am tryinig to use the examples here http://en.wikibooks.org/wiki/Clojure_Programming/Examples/JDBC_Examples#MySQL but am getting the error, "SQLException No suitable driver found for jdbc:mysql://localhost:3306/cljshrink java.sql.DriverManager.getConnection (DriverManager.java:640)". Can anyone shed some light on
20:01mdeboardthis?
20:01clojurebotThis is a test.
20:01mdeboardhhe
20:01mdeboardheh*
20:01amalloymdeboard: you need to declare a dependency on the mysql jdbc driver
20:02mdeboardHm, ok
20:02amalloy$google jdbc maven driver mysql
20:02lazybot[Maven Repository: mysql » mysql-connector-java » 5.1.6] http://mvnrepository.com/artifact/mysql/mysql-connector-java/5.1.6
20:03amalloyso, that, i guess. [mysql/mysql-connector-java "5.1.6"]?
20:03mdeboardyeah I was about to ask if I needed the version in there.
20:03mdeboardguess so
20:03brehautim using 5.1.13
20:03amalloyyeah, you always need a version
20:05mdeboardamalloy: boom.
20:05mdeboardBOOM
20:05mdeboardshakalaka
20:05brehautmdeboard: i believe correct incantation is
20:05brehaut(inc amalloy)
20:05lazybot⇒ 20
20:05amalloyhah
20:06mdeboardbrehaut: I was told I am not allowed to inc anyone except technomancy
20:06sritchie_dnolen, I think I might have found a bug in the clojurescript repl
20:06dnolensritchie_: what's the problem your seeing?
20:06mdeboardamalloy: That did it, my god thank you so much.
20:07sritchie_dnolen: I've got index.html working, which is great -- if I move the <script src="path/to/bootstrap.js"></script> up into the header, the repl stops working
20:08sritchie_here's the difference more clearly: https://gist.github.com/1343942
20:08sritchie_sorry, that's backwards
20:08sritchie_okay, there we go
20:11alexbaranoskyuseful looks to be filled with.... useful stuff
20:11dnolensritchie_: what's in bootstrap?
20:11RaynesUseful and thoughtful and horrible and vague. These are some of my favorite things.
20:11sritchie_dnolen: compilation from cljs-watch
20:11dnolensritchie_: you're not waiting for document ready right?
20:12sritchie_ah, true
20:12sritchie_https://github.com/ibdknox/cljs-watch/blob/master/cljs-watch#L28
20:12dnolensritchie_: yeah, interacting with Google Closure means putting all your scripts into the body.
20:13sritchie_got it
20:14sritchie_okay, I'll move it down in the enlive template
20:15sritchie_the one other question I had was about how to use load-file properly in the browser repl
20:15sritchie_to access files on my classpath
20:15sritchie_(load-file "clojure/string.clj") worked fine, but attempting to load my namespaces was causing a failure
20:17dnolensritchie_: I haven't tried load-file, but are you sure the classpath includes the dirs for your project?
20:19sritchie_oh, you know what, (load-namespace 'my.ns) actually works out
20:20sritchie_dnolen: it'd be interesting to use enlive to embed a call to repl/connect in every page when working in dev-mode
20:21dnolensritchie_: that would be neat.
20:21sritchie_dnolen: thanks for the help -- I'm off to absorb some reasoned schemer before the conj
20:25tensorpuddinghow does korma handle data types?
20:29brehauttensorpudding: from mucking about, it leaves that all to clojure's jdbc layer
20:30tensorpuddingapparently java datetime or whatever don't get marshalled into sql date types
20:30brehautindeed. i believe there is an sql time object that inherits from the java datetime or something
20:31brehauthave a look at prepare and transform to handle marshalling
20:31mdeboardSELECT to_timestamp("11/06/11 17:55:54", "MM/DD/YY HH24:MM:SS"); for MySQL anyway
20:31tensorpuddingi don't know how marshalling would work
20:31mdeboardthen you use--
20:31mdeboardyeah
20:31dukeofmexicodoes anyone know what the clj/java equivalents to scipi/sage/natural language toolkit are?
20:31tensorpuddingi just grabbed clj-time
20:31clojurebotHuh?
20:31brehautclj-time is jodatime based
20:32tensorpuddingyes
20:32brehautit has a namespace full of coercion stuff
20:32tensorpuddingwhich does, clj-time?
20:32mdeboardtensorpudding: Yes
20:32mdeboarduh
20:33amalloyoh god, brehaut, it doesn't actually inherit from juDate, does it?
20:33mdeboardtensorpudding: https://github.com/ibdknox/Noir-blog/blob/master/src/noir_blog/models/post.clj#L13
20:33brehautamalloy: http://download.oracle.com/javase/6/docs/api/java/sql/Date.html tears before bedtime
20:33mdeboardtensorpudding: http://p.mattdeboard.net/ctime.html writes a timestamp value fine
20:34mdeboardadmittedly my code is probably clunky but.
20:35brehautmdeboard: i think you can skip the strings and use to-long and from-date
20:36brehaut(java.sql.Date. #^Long (coerce/to-long jodaDatetime))
20:36brehautand i think from-date should accept a java.sql.Date directly from the DB
20:37mdeboardhttp://p.mattdeboard.net/insert.html seems to write properly
20:37mdeboardbased off my exhaustive testing
20:37mdeboardwhcih includes (select link)
20:39mdeboardMan that's pretty exciting.
20:42amalloywhoa, #^Long. let's stick with ^Long (or really, ^long) in new code
20:42brehautyikes my bad
20:42brehauti copied unthinkingly from clj-time
20:44mdeboard(dec brehaut)
20:44lazybot⇒ 4
20:44brehautdamnit
20:44mdeboardlol
20:44alexbaranoskylol
20:44alexbaranosky(inc mdeboard)
20:44lazybot⇒ 2
20:44tensorpuddingi don't get it
20:44tensorpuddingwhat format does korma expect?
20:44mdeboardtensorpudding: It doesn't expect any format
20:45brehautmdeboard: you are banned from decrementing karma on anyone except technomancy too
20:45tensorpuddingi did roughly what you said
20:45mdeboardbrehaut: Sorry only technomancy can tell me to whom I'm restricted in dec/inc'ing
20:45brehautmdeboard: rats
20:45tensorpuddingit complains that the database uses type timestamp, but i sent it a character varying
20:45tensorpuddingi used a built-in formatter for the date
20:46amalloy,(symbol "(inc brehaut)")
20:46clojurebot(inc brehaut)
20:46lazybot⇒ 5
20:46brehautlol
20:51gfredericks,(list 'inc 'gfredericks)
20:51clojurebot(inc gfredericks)
20:51lazybot⇒ 4
20:51gfredericksthat felt immoral
20:52amalloypretty sure i know why, buddy
21:00mdeboardhahaha
21:02mdeboard:o
21:02brehautibdknox has been fixing a bunch of bugs today
21:02mdeboardwell thank god
21:03mdeboardj/k I can't program
21:04amalloybrehaut: you can only tell he's releasing new versions. probably adding bugs
21:04brehautamalloy: ive also watched my issues get closed
21:04mdeboardcackle
21:05tensorpuddingit doesn't matter what i do, it keeps complaining about a type mismatch
21:05tensorpuddingmdeboard, what sql date type were you using for the date in that example
21:05mdeboardtensorpudding: Weird, what's the data type of your column?
21:05mdeboardtimestamp
21:05tensorpuddingtimestamp
21:05mdeboard:O
21:05tolstoyIs someone here the moderator for the clojure mailing list?
21:05tensorpuddingin postgres
21:06mdeboardtensorpudding: You might have to do like `SELECT to_timestamp("<your timestamp>", "<time format string>")`?
21:06tolstoyI accidentally pressed space (or something) and now my very poor post has gone to "review".
21:06mdeboardtensorpudding: I was using pgsql earlier but gave up.
21:06amalloytolstoy: probably better off just posting another one with a "sorry for the last one"
21:07brehauttolstoy: due to changes in google groups, nobody will actually be able to read it even if it makes it through review, so dont sweat it
21:07tolstoyamalloy: Argh! ;) If I could get the text back, I would.
21:07mdeboardbrehaut: Do you get weird indentation with (insert) e.g. http://p.mattdeboard.net/indentation.html ?
21:08brehauthuh?
21:08amalloymdeboard: that's the correct, default indentation
21:08mdeboardamalloy: Why is (values) aligned under `link`?
21:08mdeboardthat's the only place that happens in mein clojure-mode
21:08amalloyyou are way wrong, bro
21:09mdeboardI see
21:09mdeboardUsually in like `(<fn> <arg> <opts>)` opts gets indented two spaces, under <fn>
21:09amalloyif you have one or more arguments, followed by a newline, then more arguments, they should line up with the first one
21:10mdeboardOh, well that explains that.
21:10moogatronicnoob question: is there some clojure style guide that will help someone new to both clojure and LISPs in general know when to "press enter" when writing s-expressions?
21:10amalloythe indentation you mention is "defun-style" indentation, intended for things that are kinda like defns
21:10mdeboardmoogatronic: Yes!
21:10amalloyor with-macros
21:10mdeboardmoogatronic: Oh my god hold on
21:10moogatronicmdeboard: excitement! =)
21:10amalloy$google mumble scheme style
21:10lazybot[Riastradh's Lisp Style Rules - mumble.net main page] http://mumble.net/~campbell/scheme/style.txt
21:10mdeboardmoogatronic: http://mumble.net/~campbell/scheme/style.txt
21:10mdeboardmoogatronic: AND
21:11mdeboardhttp://dev.clojure.org/display/design/Library+Coding+Standards
21:11amalloythough i'm not sure this guy actually covers when to press enter. he's more about making sure you press the right number of spaces after each enter
21:12moogatronicis it a personal pref? like, jazz musicians who leave lots of space Miles Davis, vs someone who's very noty (John Coltrane) ?
21:12amalloymore or less
21:12mdeboardA foolish consistency is the hobgoblin of little minds
21:12mdeboard- Michael Scott
21:13moogatronicfor me, since i have to concentrate to even read lisp - more "air" around the sexps makes them eaisier to read.
21:13amalloymoogatronic: go for it
21:13moogatronici will read these links though, thanks amalloy and mdeboard
21:14moogatronici'm still a bit in shock at my Lindenmayer System implementation. it's like one line. feels wrong. =)
21:15amalloy$google Lindenmayer System
21:15lazybot[L-system - Wikipedia, the free encyclopedia] http://en.wikipedia.org/wiki/L-system
21:15brehautmoogatronic: you can write extremely simple L-System in functional languages
21:15moogatronicyeah, i have a map of maps, and a looping flatten maper
21:15moogatronic=)
21:16moogatronicultimately, i need more than what I have, i just implemented a context-free version, very easy as you say.
21:17brehautmoogatronic: is it just generate the expressions, or is it also doing the drawing?
21:17moogatronicbrehaut: just generating the expressions. I'm converting this to music at some point.
21:17moogatronicnot going to do the turtle graphics.
21:17brehautoh hey thats cool
21:18moogatronicbut maybe to actually learn clojure, i should implement a simple turtle graphics version too.
21:18brehautthe turtle is pretty straight forward to write
21:20brehautmoogatronic: http://media.brehaut.net/files/tmp/lsystem.html the javascript is embeded
21:22moogatronicnice!
21:22brehautmoogatronic: its a bit ugly because its JS ;)
21:23moogatronicyeah, but it's also cool that it's JS. most examples out there are java applets..
21:23moogatronicdid you make it just 'cause? or part of some other project?
21:23brehautmdeboard: btw that quote is ralph waldo emerson http://en.wikiquote.org/wiki/Consistency
21:23brehautmoogatronic: just for fun one day
21:24mdeboardbrehaut: Yeah, the "- Michael Scott" thing is just a joke from The Office
21:24brehautmdeboard: i am not familar with the american office
21:24mdeboardbrehaut: It used to be funny
21:24mdeboardthe end
21:24brehautlol
21:24brehauti think you are thinking of the UK office ;)
21:24moogatronicmdeboard: sometimes it's still funny…
21:25gfredericksthe UK office used to be funny and then it was over. the US office used to be funny.
21:25moogatronicbut there are better 'candy' shows on the major networks.
21:25moogatroniccommunity… i think for a network show, it's pretty hilarious and creative.
21:26moogatronicbrehaut: i just realized I've had one of your blog posts as a tab in my browser for like 3 weeks or so now..
21:26moogatronici should read it. =)(
21:26moogatronic"a brief overview of the clojure web stack"
21:26brehautmoogatronic: aha :)
21:28cemerickgood grief, what happens if one wants to go to all of the conj unconference sessions? :-P
21:29moogatroniccemerick: has a schedule emerged for all of those?
21:29cemerickno schedule
21:29cemerickit'll get worked out once people are on-site, I suspect
21:30moogatronicyeah, there are a few i'm not signed up for that I want to check out, but I figured i'd just do it there, rather than post a "add me to X" message.
21:30brehautmoogatronic: (defn l-system [transforms d s] (if (zero? d) s (mapcat (comp (partial l-system transforms (dec d)) transforms) s)))
21:31cemerickmoogatronic: make sure the ones you're interested in have a quorum; otherwise, the organizer might bail
21:31brehautmoogatronic: is that roughly what you had?
21:34moogatronicbasically - i used loop and recur… and stored my l-system definition as a map of maps.
21:34moogatronicand used a lot more CR's
21:34moogatronic=)
21:35brehautmoogatronic: ah, my lsystem definition is a map of vectors
21:35moogatronicmy familarity with the language is low. I am looking at how you did yours… lots of C-c C-d d
21:36brehautmoogatronic: (ls {:a [:a :a :b] :b [:a]} 2 [:a]) ; => (:a :a :b :a :a :b :a)
21:37brehautmoogatronic: the core if it is that mapcat is appied recursively; i use some point free in the middle
21:38brehautmoogatronic: you could rewrite the first argument to mapcat as #(ls transforms (dec d) (transforms %))
21:39amalloybrehaut: seems nicer to capture the transforms in a closure somewhere instead of passing them through over and over
21:39brehaut,(map {:a [:a :a b] :b [:b]} [:a :b])
21:39clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:0)>
21:39moogatronicah, mapcat seems to do the same as (flatten (map …))
21:40brehaut,(map {:a [:a :a :b] :b [:b]} [:a :b])
21:40clojurebot([:a :a :b] [:b])
21:40ibdknoxlol
21:40brehautmoogatronic: exactly
21:40amalloynooooo, it does better than that flatten. never use flatten
21:40ibdknox~flatten
21:40clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
21:40brehaut,(mapcat {:a [:a :a b] :b [:b]} [:a :b])
21:40clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: b in this context, compiling:(NO_SOURCE_PATH:0)>
21:40brehautfark
21:40brehaut,(mapcat {:a [:a :a :b] :b [:b]} [:a :b])
21:40amalloythanks ibdknox. i forgot that already
21:40moogatronicis IRC the way a noob finds out to never use flatten? =)
21:40ibdknoxyes
21:40amalloymoogatronic: mentioning it in my presence, mostly
21:40brehautmoogatronic: among many other functions ;)
21:40amalloybut i spend a lot of time in
21:40moogatronicwell, then i should keep chat open all the time then. =)
21:41amalloyirc, so...
21:41ibdknoxjust try to use records... see what happens ;)
21:41amalloyhaha
21:41brehautmoogatronic: once you are more familiar with functional programming, you might want to learn about the mapcat / for equivalence
21:41clojurebot(:a :a :b :b)
21:41moogatronicbrehaut: ok. yeah, currently, i'm at the point where i just use the first thing that sounds like it will give me the right results, from random googling
21:42tomojthe mapcat/for equivalence?
21:42brehautmoogatronic: for sure, thats how you start out :)
21:42cemerickamalloy: no worries, this is a pretty decent hang :-)
21:42amalloycemerick: "hang"?
21:42ibdknoxhang out
21:42cemerick"place to spend time"?
21:42brehautamalloy: thats not the queens english either :P
21:42amalloytomoj: brehaut likes to remind people that for and mapcat are the same thing
21:43brehautamalloy, tomoj: its my soap box
21:43danlarkinyeah but western mass
21:43ibdknoxamalloy: no no, cemerick is just stuck in yester-year
21:43danlarkinso c'mon
21:44amalloycemerick: i don't think it's possible for anyone who says "vernacular curve" to be ahead of it
21:44tomojI don't see it, isn't mapcat like (apply concat (for ...))?
21:44ibdknoxamalloy: the cool kids have moved way past things like "hang"
21:44moogatronicamalloy: lol!
21:44cemerickibdknox: it goes round and round :-P
21:44brehautibdknox: i hear that things are now 'off the shelf' or something
21:44cemerickamalloy: I am decidedly baroque.
21:44amalloy&(mapcat (fn [x] [x (inc x)]) (range 5))
21:44lazybot⇒ (0 1 1 2 2 3 3 4 4 5)
21:45alexbaranoskymapcats the same as for, like binds the same as do
21:45alexbaranoskyin Haskell
21:45alexbaranoskysorta
21:45amalloy&(for [x (range 5), elt [x (inc x)]] elt)
21:45lazybot⇒ (0 1 1 2 2 3 3 4 4 5)
21:45brehautmapcat is monadic bind with the arguments reversed
21:45alexbaranoskybut it only works for seqs
21:45brehaut(monadic bind in the sequence monad)
21:46brehautalexbaranosky: if you use clojure.algo.monad/domonad then you can have comprehensions for other monads too
21:46ibdknoxcemerick: only 60bpm Overtures, Minuets and Fugues then?
21:46tomojhuh, I think I almost never use more than one binding for for
21:46amalloytomoj: it is super-dang-awesome. do it more often
21:46ibdknoxlol
21:46ibdknoxsuper-dang-awesome
21:47ibdknox(dec amalloy) :p
21:47amalloyibdknox: all the cool kids are saying it
21:47brehauttomoj: the addition of :when and :let make for amazingly powerful
21:47ibdknoxhuh
21:47ibdknox(dec amalloy)
21:47lazybot⇒ 19
21:47ibdknoxinteresting
21:47alexbaranoskydomonad is the expanded `for` right?
21:47brehautalexbaranosky: its comprehension notation thats actually implemented in terms of monadic operations; for is not
21:47alexbaranoskyits used in the bowels of Midje for error-handling so I've seen a little of it
21:47brehaut(neither is let for that matter)
21:48alexbaranoskybrehaut: right
21:48ibdknoxspeaking of for
21:48ibdknoxI've never seen a piece of documentation that tells you about :let :when and so on
21:48cemerickibdknox: I am doubly baroque in that I prefer non-Baroque-period stuffs. :-P
21:48amalloy&(doc for)
21:48lazybot⇒ "Macro ([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost... https://gist.github.com/1344081
21:48ibdknoxhm
21:49cemerickibdknox: (mostly I'm just overtired :-)
21:49brehautone of my friends wrote a soluction to http://en.wikipedia.org/wiki/Magic_square entirely in one for ;)
21:49amalloybrehaut: he's my friend too, now
21:50brehautamalloy: wha?
21:50amalloyjust for doing that
21:50brehautoh right
21:50brehauthah
21:52ibdknoxbtw
21:52ibdknoxsomeone asked why Korma used maps too and not just (and (< :blah ...
21:53amalloyeasy assoc/dissoc to modify the maps, i imagine?
21:53ibdknoxhttp://groups.google.com/group/sqlkorma/browse_thread/thread/bcc9f7488653a9f1/d907301789a5b89a#d907301789a5b89a
21:53ibdknoxeh
21:53ibdknoxjust the last message in the thread by me
21:54danlarkincemerick: when are you coming down to raleigh?
21:55cemerickWednesday
21:55cemerickgood grief, @ 9:30
21:55ibdknoxamalloy: yeah, basically very easily composed where statements
21:56brehautthe boss is always an idiot when you are self employed
21:56brehautand a cheapskate
21:56cemerickbrehaut: right on
21:56cemerickdanlarkin: why, what's up?
21:56ibdknoxsrsly.
21:57ibdknoxactually, I think it was chouser who asked about korma maps
21:57moogatronichow do people in NC pronounce Raleigh?
21:57ibdknoxRaw-lee
21:57ibdknoxwell
21:57ibdknoxsort of
21:57ibdknoxRawl-ee
21:57moogatronicgood to know. In my mind it's encoded as "Ralley"
21:57danlarkincemerick: just wondering, sonian's already down here, plus relevance and the trainees
21:58danlarkinrahl-ee
21:58cemerickSounds like the setup to a horror movie.
21:58danlarkinthere's gonna be a rumble
21:58cemerick"The trainees just went nuts."
21:58ibdknoxit's kind of ironic that I flew across the country to just end up being involved with something that is based in NC again
21:58cemerick"There were experiments. I have the files."
21:59cemerickibdknox: hold your tongue! http://clojurewest.org :-D
21:59brehautthere needs to be clojureincrediblysouth.org
21:59ibdknoxtrue! I'll be doing training there it sounds like
21:59amalloybrehaut: clojureunderworld
21:59cemerickCool. I was going to suggest something to Alex, better get on that.
22:01brehautamalloy: down here lisps are postfix languages
22:01ibdknoxand they mostly just look like ssssssss
22:13goodieboyanyone know how to convert a java.util.Date to a joda date?
22:13brehautgoodieboy: look in clj-time.coerce
22:14brehautgoodieboy: https://github.com/getwoven/clj-time/blob/master/src/clj_time/coerce.clj#L43-47
22:14hugodswank became a binary protocol today: http://lists.common-lisp.net/pipermail/slime-devel/2011-November/018290.html
22:15ibdknoxhugod: practical implication for those of us who are not swank users?
22:15brehaut"Third party backends, for Clojure etc., are obviously broken now." vs previously, when they were subtly broken?
22:15ibdknox:(
22:15goodieboybrehaut: awesome that's perfect, thanks
22:15hugodibdknox: none really
22:16hugodI have a local branch of ritz that seems to work with the changed protocol
22:16ibdknoxsweet
22:17ibdknoxhugod: I just realized that was a really bad phrasing for my question, it should've been what's the partical implication (since I don't use swank)
22:18ibdknoxand thus wouldn't know
22:19hugodibdknox: that makes more sense - still, no implication for swank-clojure users
22:19dnolenok I have the beginnings of a proper ClojureScript Node.js REPL
22:19ibdknoxah, good, that thread made it sound like the world just blew up
22:20tensorpuddingwhat's clojurescript
22:20tensorpuddingis that like coffeescript but with lisp syntax?
22:20ibdknoxeh
22:20ibdknoxkind of
22:20dnolentensorpudding: Clojure that compiles to JS
22:20ibdknoxit's an implementation of Clojure that happens to compile to JS
22:20tensorpuddingmeh
22:21ibdknoxwhich means all the datastructures/fns etc are there
22:25tintohi. I'm trying to get into clojure and thought the best way would be to try using a few of the libraries out there. I read up on Lein and included a library I found on clojars in my dependencies. I now have the jar file for the library, but were can I find documentation or the README for the library? Or, failing that, even just being able to see the source would be good, but all I seem to have is a .jar file.
22:26tintoI'm pretty new to the JVM so sorry for what is probably a stupid question
22:27brehauttinto: what was the library? some libs are better than others for source or docs
22:27amalloytinto: source for most libs is on github, and a quick google search will find them
22:27tintoI just chose one at random that didn't sound like it would be too big, or too intimidating.
22:27tintoI chose "pirate"
22:27tintohard to google that!
22:27tinto:)
22:28brehautgithub.com/simonhicks/pirate
22:29brehauti just googled github clojure pirate
22:29amalloyhttps://github.com/simonhicks/pirate
22:29amalloyi see brehaut wins
22:29tintoright on, thanks! but there's nowhere on clojars or anything that is a standard place for docs for the libs or anything?
22:29amalloyafraid not
22:30tomojthat pom on clojars does happen to link to the github page, though.. http://clojars.org/repo/pirate/pirate/0.0.1-SNAPSHOT/pirate-0.0.1-20110104.084027-2.pom
22:30brehautthis library is pretty blunt about its purpose :P
22:31tintoha. so it is.
22:40goodieboycould someone recommend a library for dealing with directories (mkdir -p) etc.?
22:40flognikrgreetings -- I am still trying to make my new GNU emacs 24 install work with Leiningen/swank. Now the error message I get when I execute "M-x clojure-jack-in" is "That's not a task. Use \"lein help\" to list all tasks.
22:40flognikr")
22:40flognikr signal(error ("Could not start swank server […snip…snap…]
22:40flognikr clojure-jack-in-sentinel(#<process swank> "exited abnormally with code 1\n")
22:41flognikrany thoughts are highly appreciated.
22:41mdeboardWhat is the `{:as user}` bit here on the noir docs? I'm trying to figure out how to pass form data to a [:post] controller.
22:41alexbaranoskygoodieboy: fs ?
22:41alexbaranoskyhttps://bitbucket.org/tebeka/fs/src/b9ca3df74f55/src/fs.clj
22:42mdeboardflognikr: Did you run `lein deps` and `lein plugin install swank 1.3.0` (or whatever the latest version is, then restart emacs?
22:42goodieboyalexbaranosky: nice :) thanks
22:42mdeboardflognikr: Also where is your lein script (e.g. `which lein`), and what happens when you do M-x shell-command lein run
22:45flognikrmdeboard: thanks -- yes, I installed swank 1.3.3, did leon deps...
22:46flognikrmdeboard: ~/opt/bin/lein
22:46mdeboardflognikr: Is that the mac equivalent of like /home/flogniker/bin ?
22:46technomancyflognikr: probably the $PATH for emacs doesn't match the $PATH of your shell
22:47technomancyhappens a _lot_ on Macs when you launch from a GUI
22:47mdeboardtechnomancy: There wer ea couple other folks like that in here last night
22:47flognikrmdeboard: I have "(setenv "PATH" (shell-command-to-string "echo $PATH"))" in my init.el
22:47mdeboardtechnomancy: (plus me last week)... is it possible something changed path-wise in emacs 24?
22:48technomancymdeboard: not that I know of; it's just a stupid mac bug
22:48technomancysorry, "quirk"
22:48amalloyanythin is possible, of course
22:48mdeboardtechnomancy: shrug i'm on ubuntu 11.10 and the guy last night was as well afaik
22:48technomancyhuh
22:48tensorpuddingisn't ~ in mac /Users/<username>/ or something
22:49technomancywell there are plenty of ways to screw up environment variables on any OS
22:49moogatronicMy lein/swank/24/mac setup seemed to work first try, but I have an alias that I launch from zsh to start emacs…: emacs='open /usr/local/Cellar/emacs/HEAD/Emacs.app'
22:49flognikrI am certainly able to screw up environments ;-)
22:49leo2007technomancy: Can C-c C-d C-d work on special forms?
22:49technomancyflognikr: actually this could be a different bug though; there's an issue in the latest release of lein where duplicate plugins in ~/.lein/plugins get ignored; maybe make sure you only have one copy of swank
22:50technomancyleo2007: I think it needs an actual var to attach to
22:51tensorpuddingswank fails about 75% of the time i start it
22:51flognikrtechnomancy: I'll give it a try, thanks!
22:51tensorpuddingthe error was related to fontifying or something
22:51tensorpuddingeventually it works after trying to start it often enough
22:52flognikrtechnomancy: ok, one step forward: now it says "Couldn't find project.clj, which is needed …"
22:53moogatronicflognikr: do you have a clojure source file open in your buffer from the same dir as your project?
22:53flognikr(I executed the jack-in command while editing the project.clj file)
22:56flognikrmoogatronic: well, I had the project.clj file open. When I load a .clj file from down in the src path, I get the same result.
22:56flognikrI must be doing something very simple very wrong ...
22:56moogatronicdoes lein swank work from the prj dir?
22:56tensorpuddingwhat does the jack in function actually do?
22:57moogatronicif you just need to get going, you could run lein swank, and then M-x slime-connect from your buffer
22:57tensorpuddingdoes it just load all the .jar files in the libraries into the class path?
22:57moogatronicafaik, it run lein swank and slime-connect for the current path you're editing files in. =)
22:57technomancytensorpudding: it bootstraps the known-compatible version of slime.el from inside the swank jar into the Emacs process, starts a swank server, and connects emacs to it
22:58flognikrwell, when I do "leon swank" from the project dir, I get "> lein swank
22:58flognikruser=> Connection opened on local port 4005
22:58flognikr#<ServerSocket ServerSocket[addr=localhost/127.0.0.1,port=0,localport=4005]>" and then it hangs…
22:58moogatronicok, thats good. =)
22:58tensorpuddinghow does it know the classpath?
22:58flognikrhmm … not feeling it :-)
22:58moogatronicnow switch to your emacs buffer and do M-x slime-connect
22:58moogatronici mean, clojure-jack-in is much nicer, but this way you can at least verify your system is working…. at some leve
22:59tensorpuddingi don't claim to understand how java does libraries, but i know that swank would need to know how to find the .jar files in the project
22:59technomancytensorpudding: leiningen calculates it from project.clj
22:59flognikrnow emacs doesn't find the slime-connect command ...
22:59tensorpuddingi didn't know swank clojure depended on lein
23:00moogatronicflognikr: do you have slime installed?
23:00flognikrso there must still be sth fishy with my emacs install. yet, I used marmalade to install clojure-mode. thought that would bring in slime and swank.
23:01moogatronicflognikr: i'm not really sure, i'm probably only a couple of steps ahead of you on my setup. =)
23:01flognikrinstalling slime manually now ...
23:01technomancytensorpudding: well technically you could launch it various ways, but M-x clojure-jack-in uses leiningen by default
23:01tensorpuddingreally?
23:01tensorpuddingi thought clojure-jack-in was from clojure-mode
23:01moogatronicI got it working one night and was like hells yeah, not f'ing with the config anymore.
23:02technomancytensorpudding: yeah, the elisp invokes lein as a shell command
23:02Raynesclojure-jack-in *is* in clojure-mode, but it isn't the only way to launch slime. Furthermore, clojure-jack-in is in no way tied to Leiningen. I recently added an interface for it to cake.
23:02technomancy(it's insane the hoops you have to go through when you can't modify the classpath at runtime)
23:02tensorpuddingi like things that work
23:02tensorpuddingand for that i thank you
23:03technomancyheh
23:03tensorpuddingwell
23:03technomancystill about 20% of the troubleshooting in here is about slime
23:03tensorpuddingit works like 75% of the time
23:03technomancybut before jack-in, it was at least 45%
23:03tensorpuddingi had issues with slime when i experimented with sbcl
23:03tensorpuddinga few years ago
23:04tensorpuddingnot quite the same as the ones with clojure but still annoying
23:04tensorpuddingthe hate part of the love-hate relationship with slim
23:04tensorpuddinge
23:05flognikrso after manual slime install it still says it can't find the project.clj...
23:05moogatronicM-x slime-connect, does that work now?
23:06flognikrIt says "Connected. Your hacking starts… NOW!"
23:07flognikrthat sounds good.
23:07moogatronicso , you should have a slime-repl buffer
23:07moogatronicmaybe yuo should try "turning it off and on again"..
23:07moogatronic)
23:09flognikrmoogatronic: I have a *slime-events* buffer, but no *slime-repl* buffer… wait, let me check the dev-dependencies.
23:12flognikrok, I removed swank from the dev-dependencies, but that results in no luck either.
23:13moogatronici'll restart my sessions and see if i can replicate
23:19moogatronicflognikr: i'm using the following packages, not sure if our setups are similar: starter-kit starter-kit-lisp starter-kit-bindings clojure-mode
23:19moogatronicthen some other unrelated stuff...
23:20moogatronici'm not /really/ sure what's in all of those pacakges, but that seemed to be the minimal set to get mysetup working, iirc.
23:21flognikrmoogatronic: thanks for your help on this -- I tried to no use starter kits, and just follow the procedures specced for leiningen, clojure-mode and swank-clojure in technomancy's github :-)
23:21flognikrbut I'll try again tomorrow with your setup...
23:21moogatronici don't think the starter kit is probalby necessary, but I didn't try without.
23:22moogatronicyour lein setup seems to be working
23:24flognikrI think it does. when I do "leon swank", and then "slime-connect" from within emacs, I'd expect that a C-x C-e would interact with my slime REPL. however, it still tries to veal elisp.
23:24flognikrthere is some broken connection between emacs and the slime/swank-clojure setup that I haven't traced down yet.
23:30sritchie_dnolen, that browser repl script is great -- I wonder if there's a clean way to get the project's lib/*.jar files onto the browser-repl classpath
23:31sritchie_otherwise, namespaces referenced in :require-macros don't get picked up
23:31flognikrmoogatronic: victory! I have followed your list of startup kits, and have successfully connected via slime-connect! thanks very much!
23:32moogatronicmust be something in the starter-kit-lisp
23:32moogatronicat least you can have fun and figure out what you want to remove later. =)
23:33flognikryes -- clojure-jack-in still refuses to cooperate.
23:33moogatronicoh really? weird.
23:33flognikrbut this at least gets me forward -- so thanks again
23:33dnolensritchie_: yeah, something to bring up at the conj, there's a couple annoyances like that which should get sorted out asap.
23:33dnolensritchie_: lack of js literal is frustrating
23:34sritchie_yup
23:34sritchie_no real complaints, I've been looking forward to getting set up like this for some time now
23:35sritchie_the only other one I found had to do with the browser repl not liking the metadata carat: (defn ^:export greet [n] (str "Hello " n))
23:39dnolensritchie_: yeah all around CLJS is pretty great.
23:43flognikrtechnomancy: is Leiningen 1.6.1.1 the most recent version (just checking to rule out an obvious error source)
23:53amalloyhe's probably tinkering away in his lab, working on 1.6.1.1.1.1
23:53flognikrlikey -- don't want to disturb that process :-)
23:54tensorpudding1.6.1.1 is the most recent tagged version, i'd guess so
23:55flognikrtensorpudding: thanks!
23:58flognikrok -- clojure-jack-in won't budge -- I'll have to tackle it another day. Thanks to all of you for your help and advice.