<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>code.h(oe)kje</title>
	<link>http://joost.zeekat.nl</link>
	<description>Webdevelopment en ander cools in Lisp Perl JavaScript &#38; Ruby.</description>
	<pubDate>Mon, 24 Oct 2011 21:56:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
	<language>en</language>
			<item>
		<title>Clojure-refactoring gets a little love, a new release and a new maintainer.</title>
		<link>http://joost.zeekat.nl/2011/10/24/clojure-refactoring-gets-a-new-maintainer/</link>
		<comments>http://joost.zeekat.nl/2011/10/24/clojure-refactoring-gets-a-new-maintainer/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 19:39:29 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[slime-hints]]></category>

		<category><![CDATA[refactoring]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/10/24/clojure-refactoring-gets-a-new-maintainer/</guid>
		<description><![CDATA[clojure-refactoring, the Emacs/SLIME based toolkit for doing refactoring wasn't getting enough love and attention, so I fixed a few things. Tom Crayford unfortunately doesn't have the time to work on it any further so I'm taking over as the maintainer. Inspect the code at the new "official" repository.
For now, I'm focused on fixing parsing issues [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/joodie/clojure-refactoring">clojure-refactoring</a>, the Emacs/SLIME based toolkit for doing refactoring wasn't getting enough love and attention, <a href="https://github.com/tcrayford/clojure-refactoring/pull/4">so I fixed a few things</a>. <a href="http://www.tcrayford.net/">Tom Crayford</a> unfortunately doesn't have the time to work on it any further so I'm taking over as the maintainer. <a href="https://github.com/joodie/clojure-refactoring">Inspect the code at the new "official" repository</a>.</p>
<p>For now, I'm focused on fixing parsing issues first, then installing ease (I'm thinking about packaging everything Emacs-related on marmalade but that depends on what's the easiest way to get stuff integrated for the user on the Emacs and Clojure sides). I've already removed the dependencies on out-dated libraries. Basically, everything I need to make the current functionality reliable enough for production use. Next up is support for clojure 1.3, probably, if that needs any work (I'm running 1.2 in production everywhere for now). </p>
<p>For the further future, I'd like this code to be useful for other editors/APIs/tools, so the SLIME/swank/Emacs specific stuff probably has to be separated out at some point. Some more refactorings will also be useful.</p>
<p>For now, <a href="http://clojars.org/joodie/clojure-refactoring">version 0.6.1 is on clojars.</a> Get it while it's hot.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/10/24/clojure-refactoring-gets-a-new-maintainer/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: clj-authsub - AuthSub client in clojure</title>
		<link>http://joost.zeekat.nl/2011/10/08/announcement-clj-authsub-authsub-client-in-clojure/</link>
		<comments>http://joost.zeekat.nl/2011/10/08/announcement-clj-authsub-authsub-client-in-clojure/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 16:39:26 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[401]]></category>

		<category><![CDATA[AuthSub]]></category>

		<category><![CDATA[client]]></category>

		<category><![CDATA[http]]></category>

		<category><![CDATA[httpcomponents]]></category>

		<category><![CDATA[scope]]></category>

		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/10/08/announcement-clj-authsub-authsub-client-in-clojure/</guid>
		<description><![CDATA[AuthSub is the authorization API Google uses for many of its products, meaning you can use it to ask a user to provide access to their private youtube listings, calendar entries etc without forcing them to hand over their password. The protocol is actually pretty simple and implementing it using clj-http was straight forward, except [...]]]></description>
			<content:encoded><![CDATA[<p>AuthSub is the authorization API Google uses for many of its products, meaning you can use it to ask a user to provide access to their private youtube listings, calendar entries etc without forcing them to hand over their password. The protocol is actually pretty simple and implementing it using <a href="https://github.com/dakrone/clj-http">clj-http</a> was straight forward, except for one thing: clj-http always puts the connection port number in the Host header (which by the way is completely valid according to the HTTP/1.1 spec), but some google applications (notably, youtube) do not like that, giving a crypic HTTP status 401 "AuthSub token has the wrong scope" error. Figuring out the problem took a couple of hours given that that idiosyncrasy is not documented anywhere and I had to figure it out from some comments in the Python client for AuthSub.</p>
<p>With that issue out of the way, I've released <a href="https://github.com/joodie/clj-authsub">clj-authsub</a> version 0.1.0. It's minimal and currently doesn't support signed/secure tokens, but it works.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/10/08/announcement-clj-authsub-authsub-client-in-clojure/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Relatively sane conversion of PDFs to web-ready JPGs using ImageMagick.</title>
		<link>http://joost.zeekat.nl/2011/09/15/relatively-sane-conversion-of-pdfs-to-web-ready-jpgs-using-imagemagick/</link>
		<comments>http://joost.zeekat.nl/2011/09/15/relatively-sane-conversion-of-pdfs-to-web-ready-jpgs-using-imagemagick/#comments</comments>
		<pubDate>Thu, 15 Sep 2011 13:29:08 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[color depth]]></category>

		<category><![CDATA[colorspace]]></category>

		<category><![CDATA[convert]]></category>

		<category><![CDATA[cropbox]]></category>

		<category><![CDATA[identify]]></category>

		<category><![CDATA[imagemagick]]></category>

		<category><![CDATA[jpg]]></category>

		<category><![CDATA[mediabox]]></category>

		<category><![CDATA[mogrify]]></category>

		<category><![CDATA[pdf]]></category>

		<category><![CDATA[png]]></category>

		<category><![CDATA[trimbox]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/09/15/relatively-sane-conversion-of-pdfs-to-web-ready-jpgs-using-imagemagick/</guid>
		<description><![CDATA[Some people when confronted with a problem, think “I know,
I'll use ImageMagick.”  Now they have two problems.*

For one of the sites I'm maintaining a lot of content is generated directly from (more or less print-ready) PDFs. The only free tool I've been able to find that can convert PDFs to decent quality JPGs or [...]]]></description>
			<content:encoded><![CDATA[<p><em>Some people when confronted with a problem, think “I know,<br />
I'll use ImageMagick.”  Now they have two problems.</em>*
<p>
For one of the sites I'm maintaining a lot of content is generated directly from (more or less print-ready) PDFs. The only free tool I've been able to find that <i>can</i> convert PDFs to decent quality JPGs or PNGs is <a href="http://www.imagemagick.org/script/index.php">ImageMagick</a>.</p>
<p>
But even when you've got ImageMagick's <code>convert</code> and <code>mogrify</code> commands installed, conversion of PDFs still requires some careful tuning, that is: careful selection of arguments to <code>convert</code>. Also; a sacrificial chicken and lots of patience. Anyway, here's what I ended up with. Most of this is also available in <a href="https://github.com/joodie/clj-imajine">my clj-imajine clojure library</a>.</p>
<p><h4>Color space.</h4>
<p>
Many web browsers do not support any color space other than RGB/sRGB. If your PDFs are in the CMYK color space (usual for print) or any other color space, the resulting JPGs will look "weird" in many applications and web browsers; some viewers just show a blank image and others completely mess up the colors. To make sure the end result is in sRGB, use the option "<code>-colorspace sRGB</code>".</p>
<h4>Color depth.</h4>
<p>
For much the same reasons, you want to enforce that the output color depth is 8 bits for JPGs. To do that, use the option "<code>-depth 8</code>".</p>
<h4>Crop boxes.</h4>
<p>
PDFs are pretty complex documents and one potential pitfall is that there are at least 3 different indicators of the "boundaries" of the PDF. I've run into a few where the "right" boundaries were provided by the "cropbox" instead of the "media box". <a href="http://josephscott.org/archives/2009/11/imagemagick-convert-pdf-to-jpg-partial-image-size-problem/">This post by Joseph Scott provided the solution</a>: use "<code>-define pdf:use-cropbox=true</code>".</p>
<p>
The final line becomes:</p>
<p>
<code>convert -define pdf:use-cropbox=true -colorspace sRGB -depth 8 pages.pdf pages.jpg</code></p>
<p>
Note that if your PDF contains more than one page, this will generate a JPG for each one, named pages1.jpg, pages2.jpg etc... To select a single page you can use <code>convert -define pdf:use-cropbox=true -colorspace sRGB -depth 8 pages.pdf[X] pages.jpg</code> where X is the <strong>page number minus 1</strong>. You can find the page numbers in a PDF using ImageMagick's <em>identify</em> command like this: <code>identify -density 2 -format "%p," pages.pdf</code></p>
<p>
*)  paraphrased from Jamie Zawinski's remark on regular expressions.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/09/15/relatively-sane-conversion-of-pdfs-to-web-ready-jpgs-using-imagemagick/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: pretzel - clojure predicate functions</title>
		<link>http://joost.zeekat.nl/2011/04/05/announcement-pretzel-clojure-predicate-functions/</link>
		<comments>http://joost.zeekat.nl/2011/04/05/announcement-pretzel-clojure-predicate-functions/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 13:17:19 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[decline]]></category>

		<category><![CDATA[forms]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/04/05/announcement-pretzel-clojure-predicate-functions/</guid>
		<description><![CDATA[I'm working on pretzel right now. It's a basic library that can be used to combine predicates and also holds a bunch of tests on string content.
Code and documentation is on github.
]]></description>
			<content:encoded><![CDATA[<p>I'm working on pretzel right now. It's a basic library that can be used to combine predicates and also holds a bunch of tests on string content.</p>
<p><a href="https://github.com/joodie/pretzel">Code and documentation is on github.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/04/05/announcement-pretzel-clojure-predicate-functions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: flutter-decline-demo - validation and form generation on compojure</title>
		<link>http://joost.zeekat.nl/2011/04/02/announcement-flutter-decline-demo-validation-and-form-generation-on-compojure/</link>
		<comments>http://joost.zeekat.nl/2011/04/02/announcement-flutter-decline-demo-validation-and-form-generation-on-compojure/#comments</comments>
		<pubDate>Sat, 02 Apr 2011 12:42:42 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[clj-decline]]></category>

		<category><![CDATA[flutter]]></category>

		<category><![CDATA[form-generation]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/04/02/announcement-flutter-decline-demo-validation-and-form-generation-on-compojure/</guid>
		<description><![CDATA[Some people indicated they wanted some example code for my clj-decline
(validation) and flutter (form generation) libraries. So today I wrote
a simple demo application that uses both.
Get the code at github.
]]></description>
			<content:encoded><![CDATA[<p>Some people indicated they wanted some example code for my clj-decline<br />
(validation) and flutter (form generation) libraries. So today I wrote<br />
a simple demo application that uses both.</p>
<p><a href="https://github.com/joodie/flutter-decline-demo ">Get the code at github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/04/02/announcement-flutter-decline-demo-validation-and-form-generation-on-compojure/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: flutter - clojure / hiccup form fields</title>
		<link>http://joost.zeekat.nl/2011/03/26/announcement-flutter-clojure-hiccup-form-fields/</link>
		<comments>http://joost.zeekat.nl/2011/03/26/announcement-flutter-clojure-hiccup-form-fields/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 21:44:43 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[forms]]></category>

		<category><![CDATA[hiccup]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/03/26/announcement-flutter-clojure-hiccup-form-fields/</guid>
		<description><![CDATA[I've been working on flutter, a library for saner form generation today. First (pretty basic) release was done on clojars. Still working on many details, including more-or-less full-coverage tests.
Get the code on github.

Also see the announcement on the clojure group.
]]></description>
			<content:encoded><![CDATA[<p>I've been working on flutter, a library for saner form generation today. First (pretty basic) release was done on clojars. Still working on many details, including more-or-less full-coverage tests.</p>
<p><a href="https://github.com/joodie/flutter">Get the code on github.</a><br />
<a href="http://groups.google.com/group/clojure/browse_thread/thread/7854143bf0e5f3e"><br />
Also see the announcement on the clojure group.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/03/26/announcement-flutter-clojure-hiccup-form-fields/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: ring-persistent-cookies</title>
		<link>http://joost.zeekat.nl/2011/03/12/announcement-ring-persistent-cookies/</link>
		<comments>http://joost.zeekat.nl/2011/03/12/announcement-ring-persistent-cookies/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 13:49:49 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[cookies]]></category>

		<category><![CDATA[persistent cookies]]></category>

		<category><![CDATA[ring]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/03/12/announcement-ring-persistent-cookies/</guid>
		<description><![CDATA[Just released a minimal library to generate persistent cookies for ring.middleware.cookies.
It's at github and clojars.org.
]]></description>
			<content:encoded><![CDATA[<p>Just released a minimal library to generate persistent cookies for ring.middleware.cookies.</p>
<p><a href="https://github.com/joodie/ring-persistent-cookies">It's at github</a> and <a href="http://clojars.org/ring-persistent-cookies">clojars.org</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/03/12/announcement-ring-persistent-cookies/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Announcement: clj-decline - validation sucks.</title>
		<link>http://joost.zeekat.nl/2011/03/12/announcement-clj-decline-validation-sucks/</link>
		<comments>http://joost.zeekat.nl/2011/03/12/announcement-clj-decline-validation-sucks/#comments</comments>
		<pubDate>Sat, 12 Mar 2011 11:14:40 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[macros]]></category>

		<category><![CDATA[web]]></category>

		<category><![CDATA[rant]]></category>

		<category><![CDATA[simplicity]]></category>

		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/03/12/announcement-clj-decline-validation-sucks/</guid>
		<description><![CDATA[I pushed a new validation library for clojure to github yesterday. <a href="https://github.com/joodie/clj-decline">Check out clj-decline</a>.

<h2>Why another validation library?</h2>

Well, <strong>why does validation suck so much?</strong>


Of course, dealing with user input is annoying anyway.  But validation libraries always seem to want to do things in just the wrong way for the project you're working on.

Let me count the ways:]]></description>
			<content:encoded><![CDATA[<p>I pushed a new validation library for clojure to github yesterday. <a href="https://github.com/joodie/clj-decline">Check out clj-decline</a>.</p>
<h2>Why another validation library?</h2>
<p>Well, <strong>why does validation suck so much?</strong></p>
<p>Of course, dealing with user input is annoying anyway.  But validation libraries always seem to want to do things in just the wrong way for the project you're working on.</p>
<p>Let me count the ways:</p>
<ul>
<li> They do too much. Session management? XSS detection? Javascript validation? Form definitions? Bollocks. It will never work with the code I've already got running in production and I'm not going to drag in all of it just to get the core validation functions, assuming I can even use them in my app.
<li> Also, validation does not mean "force this input into another type". That's not validation. Stick it somewhere else.
<li> They assume too much. If you can only validate a single value in a map, you're useless. I need to check if a frobniz has <em>either</em> two wheebles <em>or</em> an odd number of crinks, and don't try to stop me.
<li> I might need to validate something that <em>isn't</em> a map. Maybe I want to check two maps. Maybe I need to check a single string or a file upload.
<li> They still assume too much. This may come as a shock, but not everyone speaks English on this planet. I have to support multiple languages in the same web app. Give me more options than pre-defined strings for errors, you lousy piece of American imperialist software! People of the earth, throw off your shackles and your "reality" TV shows!
<p>  Ahem.</p>
<li> Macros, macros, macros all over the place. Yes, macros are cool, but no, I don't <em>want</em> to stick every validation in a named var. If I wanted that, I could (def some-name (make-validation ...)) so I don't <em>need</em> your macro anyway. I <em>want</em> to use closures that validate for this specific user and now you've stopped me.
<li> Don't be passive agressive. Validation is a user-centric feature. If I wanted to tell the user only their first error, I'd use exceptions. Don't force the user to submit their form twenty times until they've fixed all their mistakes. Give them as much information as possible so they know what's going on.<br />
<h2>So, how does clj-decline fix all that?</h2>
<p>It doesn't. It just stays away from most of the above. clj-decline is simple. It validates arguments and returns errors. Everything else is up to the user or some other library. It's completely functional, has no macros, no built-in predicates, nothing binds it to a web framework or anything else, and errors / messages can be anything you like. The only decision I made is that errors are grouped by key (which can also be anything you like).</p>
<p>Enjoy!</p>
<p>Joost.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/03/12/announcement-clj-decline-validation-sucks/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Talk @ amsterdam-clojurians, Wednesday March 9, 2011</title>
		<link>http://joost.zeekat.nl/2011/03/07/talk-amsterdam-clojurians-wednesday-march-9-2011/</link>
		<comments>http://joost.zeekat.nl/2011/03/07/talk-amsterdam-clojurians-wednesday-march-9-2011/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 14:01:16 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[talks]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/03/07/talk-amsterdam-clojurians-wednesday-march-9-2011/</guid>
		<description><![CDATA[
 ____________________
&#60; Functional Clojure >
 --------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
         [...]]]></description>
			<content:encoded><![CDATA[<p><code>
<pre> ____________________
&lt; Functional Clojure >
 --------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||</pre>
<p></code></p>
<p>I'll be doing a short presentation on the basic higher-order (sequence) functions in clojure.core at the <a href="http://www.meetup.com/The-Amsterdam-Clojure-Meetup-Group/events/16693789/">Amsterdam Clojurians meeting next Wednesday</a>. This talk should be understandable and useful for Clojure newbies. If you're interested, just show up around 7.</p>
<p><b>Update:</b> quite a few people showed up to the meeting. <a href="https://github.com/joodie/talk-functional-clojure-sequences">I've put the slides on github</a>, and <a href="https://github.com/joodie/emacs-simple-slides">here is the elisp code I used to present the slides</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/03/07/talk-amsterdam-clojurians-wednesday-march-9-2011/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SLIME hints #5 - slime-apropos</title>
		<link>http://joost.zeekat.nl/2011/02/10/slime-hints-5-slime-apropos/</link>
		<comments>http://joost.zeekat.nl/2011/02/10/slime-hints-5-slime-apropos/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 00:54:25 +0000</pubDate>
		<dc:creator>Joost</dc:creator>
		
		<category><![CDATA[clojure]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[english]]></category>

		<category><![CDATA[lisp]]></category>

		<category><![CDATA[slime-hints]]></category>

		<guid isPermaLink="false">http://joost.zeekat.nl/2011/02/10/slime-hints-5-slime-apropos/</guid>
		<description><![CDATA[This is part of the series on SLIME functions. See the introduction for information on what SLIME is.
Another very short post.
Now what is the name of that function again? Which namespace contains that variable?
Call slime-apropos; Default key-binding: C-c C-d C-a and type the part of the name you remember and SLIME will list all matching [...]]]></description>
			<content:encoded><![CDATA[<p>This is part of the series on SLIME functions. <a href="http://joost.zeekat.nl/2010/05/22/slime-hints-0-introduction-emacslisp-hacking-goodness/">See the introduction for information on what SLIME is.</a></p>
<p>Another very short post.</p>
<p>Now what is the name of that function again? Which namespace contains that variable?</p>
<p>Call <code>slime-apropos</code>; Default key-binding: <code>C-c C-d C-a</code> and type the part of the name you remember and SLIME will list all matching globals/symbols in the running program.</p>
]]></content:encoded>
			<wfw:commentRss>http://joost.zeekat.nl/2011/02/10/slime-hints-5-slime-apropos/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

