Re: Help Getting Sente to Work

2014-07-26 Thread Bob Hutchison
Hi Tim, I think I went through this when I was first starting with Sente. You need to setup the CSRF handling part, in the example code by including ring-anti-forgery/wrap-anti-forgery in your routes. *AND* you have to make sure that you are using one of those routes before you try to use Sent

Re: Is this behavior with recur and pre/post a bug?

2014-07-25 Thread Bob Hutchison
On Jul 25, 2014, at 12:27 AM, Michael O'Keefe wrote: > Andy, good advice and I agree. Thanks. I'll think on it then. Would you want one of your users going though this kind of thought process: I won't file a ticked because I don't think it can be fixed? It's a bug, file the ticket. At the ve

Re: unexpected behavior of clojure.core/empty

2014-07-18 Thread Bob Hutchison
On Jul 18, 2014, at 5:45 AM, Brian Craft wrote: > => (empty [:foo 5]) > [] > => (first (mapv identity {:foo 5})) > [:foo 5] > => (empty (first (mapv identity {:foo 5}))) > nil => (class (first (mapv identity {:foo 5}))) clojure.lang.MapEntry => (class (first (mapv (fn [[k v]] [k v]) {:foo 5})))

Re: Local variable

2014-07-08 Thread Bob Hutchison
On Jul 8, 2014, at 7:08 PM, Cecil Westerhof wrote: > 2014-07-08 23:11 GMT+02:00 Bob Hutchison : > > On Jul 8, 2014, at 9:40 AM, Cecil Westerhof wrote: > > > In Clojure you can define a local constant with let, but I need a variable > > (I think). > > > >

Re: Local variable

2014-07-08 Thread Bob Hutchison
On Jul 8, 2014, at 9:40 AM, Cecil Westerhof wrote: > In Clojure you can define a local constant with let, but I need a variable (I > think). > > I want to do the following. I have a function that checks several things. > Every time an error is found I want to set the variable errors to: >

Re: Workflow: cljx, cljsbuild & tdd in one process

2014-06-22 Thread Bob Hutchison
Thanks for the tip, works nicely. I was doing the same thing Michal was doing. Cheers, Bob On Jun 20, 2014, at 11:07 AM, Michael Griffiths wrote: > There's also a Leiningen plugin called lein-pdo that lets you run tasks in > parallel: https://github.com/Raynes/lein-pdo > > Example usage for

Re: Clojure:Lisp :: LSD:Meditation

2014-06-13 Thread Bob Hutchison
On Jun 13, 2014, at 6:58 AM, Jonas wrote: > I found this post from 2011 which probably is still relevant: > https://groups.google.com/d/msg/clojure/t0pGIuoyB7I/RQtuuAOhes8J And just for fun, from that thread... Rich Hickey wrote: "There will be times, yes, when the most considerate thing will

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 2:45 PM, Ben Wolfson wrote: > On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison > wrote: > > I badly miss the Maybe and Either monads, but would want the syntactic > support Haskell provides (which I can't see will ever be available in Clojure) > &

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:50 PM, Ben Wolfson wrote: > On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison > wrote: > > Haskell's STM transactions can be thought of as a form of IO action (like > reading a file is an IO action) that modify refs (there are no atoms in >

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:44 PM, Ben Wolfson wrote: > I wouldn't say that I *often* find myself reaching for monads, or the state > monad in particular, but I certainly have found them useful on occasion (and > would have sometimes refrained from using them where I'd naturally lean to > doing so

Re: "in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell"

2014-05-19 Thread Bob Hutchison
On May 16, 2014, at 8:49 PM, Julian wrote: > A quick shoutout to the Clojure Community - thanks for the way you've all > contributed to make my life (mentally) richer. > > James Reeves (author of Compojure and many other wonderful libraries) made > this interesting comment on Hacker News: >

Re: Clojure equivalent of special common lisp vars: still looking for that zen place...

2014-05-03 Thread Bob Hutchison
On May 3, 2014, at 9:45 AM, Dave Tenny wrote: > I'm still struggling with how to write the most readable, simple clojure code > to deal with dynamically bindings. > > What is the graceful clojure equivalent of common lisp special variables for > the following scenario. > > If I were writing c

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
On May 3, 2014, at 6:42 AM, Roelof Wobben wrote: > > (fn [default initial-keys] > (loop [remaining-keys initial-keys > result-map {}] > (if (empty? remaining-keys) >result-map >(let [key (first remaining-keys) > remaining-keys' (rest

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
Hi Roelof, On May 3, 2014, at 3:09 AM, Roelof Wobben wrote: > Hello, > > Im now at the last exercise of the beginners exercise of 4clojure. nice! > > I figured out that this solution works. > > (fn [default lijst1] > (loop [lijst lijst1 d {}] > (if (empty? lijst) >d >

Re: My experiments with concurrent programming

2014-04-13 Thread Bob Hutchison
Hi Cecil, On Apr 12, 2014, at 3:18 PM, Cecil Westerhof wrote: > > I just started playing with Clojure a few days ago, so I am a tabula rasa. I > attached what I have until now. If it can be improved, I like to know it. I had a look at your code and it's not clear to me what you are trying to

Re: [ANN] durable-queue: an in-process disk-backed queue

2014-02-07 Thread Bob Hutchison
On Feb 6, 2014, at 6:45 PM, Zach Tellman wrote: > At Factual we get a lot of data thrown at us, and often don't have control > over the rate at which it comes in. As such, it's preferable that our buffer > isn't bounded by the process' memory, since a temporary blip in throughput > may cause

Re: core.async count in a channel

2014-01-21 Thread Bob Hutchison
On Jan 21, 2014, at 11:56 AM, Paul Viola wrote: > I think this is all well and good for a particular use of channel. > > So perhaps I am misusing channels?? > > To repeat: in one case I have workers pulling from a channel of real work. > For various reasons this channel might get filled rat

Re: Effects of diving into Clojure

2014-01-14 Thread Bob Hutchison
On Jan 14, 2014, at 3:46 PM, gvim wrote: > No, you're probably right. It's just that there never seem to be enough hours > in a day/life :( You’re not alone there either :-) Cheers, Bob > > gvim > > > On 14/01/2014 20:26, Bob Hutchison wrote: > >&g

Re: Effects of diving into Clojure

2014-01-14 Thread Bob Hutchison
On Jan 14, 2014, at 2:01 PM, gvim wrote: > I recently took the plunge into learning Clojure and love it. Since I tend to > be single-minded/all-or-nothing about these things I'm now finding it very > difficult to switch mindset when I have to work with Ruby. Anyone else > experienced this? I

Re: library development

2013-12-20 Thread Bob Hutchison
2013 9:09:32 AM UTC-5, Bob Hutchison wrote: > Hi, > > I’m missing something. And it’s annoying me. > > Let’s say I’m working on three or four projects and there’s some code that > really should be developed as a library and used by each of the projects. A > similar thing

library development

2013-12-20 Thread Bob Hutchison
Hi, I’m missing something. And it’s annoying me. Let’s say I’m working on three or four projects and there’s some code that really should be developed as a library and used by each of the projects. A similar thing happens if I fork a library from github. I don’t want to make any of this code p

Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison
On Nov 30, 2013, at 10:59 AM, guns wrote: > On Sat 30 Nov 2013 at 09:29:30AM -0500, Bob Hutchison wrote: > >> This is a great idea… but I’m having an awful time getting it to work. > > Hello Bob, > > I'm sorry to hear that setup is problematic. If it's t

Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison
On Nov 29, 2013, at 11:14 PM, guns wrote: > Hello, > > I am happy to announce version 1.5.0 of Slamhound, technomancy's amazing > ns rewriting tool. > >;; ~/.lein/profiles.clj >{:user {:dependencies [[slamhound "1.5.0"]]}} > > This is a *major* bugfix release. If you've tried Slamhoun

Re: [ANN] overload-middleware 0.1.1

2013-11-17 Thread Bob Hutchison
Hi Rob, Nice! Thanks for releasing this. I’m not sure when I’ll use this but I can pretty much guarantee that I will give it a go sooner or later. I’ve written a few of these in the past, it’s good to see someone make a library out of it. BTW, things like AngularJS and EmberJS should/could know

Re: is PG's "imperative outside-in" advice any good?

2013-10-15 Thread Bob Hutchison
On 2013-10-15, at 8:29 AM, Daniel Higginbotham wrote: > I've been going through On Lisp by Paul Graham and on page 33 he recommends > against performing "intermediate" bindings. Does this advice hold for > Clojure? Here are a couple examples: > > ;; Common Lisp (from the book) > (defun bad (x

Re: Sequential conditional transforms of an argument

2013-07-08 Thread Bob Hutchison
On 2013-07-08, at 2:40 AM, Laurent PETIT wrote: > thank you all for your answer. > > So to go back to my original concern, there does not seem to be a way > to do this as I intended by just combining the existing features in > core. > I'm not sure what you're asking for here. Do you mean *in-

Re: What's the point of -> ?

2013-03-11 Thread Bob Hutchison
On 2013-03-11, at 6:58 AM, edw...@kenworthy.info wrote: > So I understand that: > > (-> foo bar wibble) > > is equivalent to > > (wibble (bar (foo))) > > With the advantage that the latter version is better, in the sense that it's > clearer what the final result is (the result of the call to

Re: how would you implement sending out a verification email?

2013-02-21 Thread Bob Hutchison
On 2013-02-20, at 9:46 PM, James Reichley wrote: > I can't find the reference now, but either in a screencast or a discussion I > read it was mentioned that if you have a single thing that performs > side-effects, you can perform this function last in the transaction without > worrying about

Re: how would you implement sending out a verification email?

2013-02-21 Thread Bob Hutchison
On 2013-02-20, at 9:32 AM, Balint Erdi wrote: > In the languages I come from (e.g Ruby) I'd use a library that handles the > queueing and consumption of tasks. Is this how you'd do it in Clojure or it's > one of these cases where Clojure itself suffices where other languages are > lacking? T

Re: Why is this so difficult?

2013-02-15 Thread Bob Hutchison
On 2013-02-15, at 4:16 AM, BJG145 wrote: > I don't know anything about build managers so I think my next step will be to > pick up a book on Maven to get the background…) Don't. Just don't. All you really need to know about maven, and it's role, is what you can get from wikipedia. Seriously.

Re: Clojure + Web Services + Web Sockets

2013-02-11 Thread Bob Hutchison
On 2013-02-11, at 6:12 PM, Ryan T. wrote: > Unless someone has to suggest something better, it seems that the best way to > achieve what i want is to use aleph which allows you to initialize it with a > wrapped ring handler. You might have a look at http://http-kit.org/ Cheers, Bob > > I

Re: Clojure web server benchmarks

2013-01-25 Thread Bob Hutchison
On 2013-01-25, at 6:24 AM, Peter Taoussanis wrote: > I'd consider adding a graph if folks think these numbers are sufficiently > interesting? > That would be great! This is very important information for me. And, unless things have improved markedly over that last year or so (I hope so), I t

Re: [ANN] Formative - render, parse, and validate web forms

2013-01-16 Thread Bob Hutchison
On 2013-01-16, at 11:31 AM, Justin Kramer wrote: > So I went ahead and implemented the first solution I mentioned: the default > renderer now groups fields into fieldsets, split by :heading and :submit > fields. Each fieldset has a class that you can target with css/js. You can > see the resu

Re: [ANN] Formative - render, parse, and validate web forms

2013-01-16 Thread Bob Hutchison
On 2013-01-15, at 5:00 PM, Justin Kramer wrote: > Formative is a library for dealing with web forms. Features: > Describe forms using simple data > Render forms via pluggable renderers (comes with Bootstrap and other > renderers built-in) > Parse submitted form data from Ring params > Validate

Re: [ANN] nrepl-transcript

2013-01-15 Thread Bob Hutchison
On 2013-01-14, at 3:58 PM, Jonas wrote: > Hi > > I created a middleware for nrepl that saves a transcript of your repl > interactions so you can go back and see what you did. > > https://github.com/jonase/nrepl-transcript > > Feedback welcome! Oh! Thank you! Bob > > Jonas > > > -- >

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-25 Thread Bob Hutchison
On 2012-11-25, at 12:45 AM, Anthony Grimes wrote: > I just took a shot at it. I put it in Pristine Packages as described, but it > disappears when I restart ST2 and try to use it. I imagine you tried to put it in: ~/Library/Application Support/Sublime Text 2/Pristine Packages I did that t

Re: Replacing nested let statements with assignments

2012-10-19 Thread Bob Hutchison
On 2012-10-18, at 2:11 PM, Evan Gamble wrote: > For the situation where the lets are nested because you're checking the > values in some way after each binding, I wrote a macro called let?. I find it > very useful and use it in nearly all my code. > https://github.com/egamble/let-else Hmmm,

Re: Modelling for DAG with identity map - or not?

2012-09-18 Thread Bob Hutchison
On 2012-09-16, at 3:21 PM, Patrik Sundberg wrote: > I'm asking myself though if there's a more functional design for > accomplishing the same goals? My main goals are to do things consistently so > that changing a value X propagates properly, and being able to find > dependencies of a given v

Re: Enhanced Primitive Support Syntax

2011-01-17 Thread Bob Hutchison
this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send

Re: Enhanced Primitive Support Syntax

2011-01-15 Thread Bob Hutchison
ten or twenty years about this decision. >> >> -S > On 2011-01-14, at 8:40 PM, Armando Blancas wrote: > They used to give you compile switches for that kind of stuff, not > hope and wholesome wishes. Seems like every performance improvements > makes the language mor

Re: How do I find implemented protocols in Clojure object?

2011-01-12 Thread Bob Hutchison
oup, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://xampl.com/so -- You received this message because you are

help to improve a multimethod with a vaguely interesting dispatch function

2010-11-15 Thread Bob Hutchison
nd (get method-map major) major) :default))) (defn play [] (println (can-we-not-do-better :zero :zero)) (println (can-we-not-do-better :one :two)) (println (can-we-not-do-better :one :three))) (play) default-default -> :zero:zero one-two -> :one:two one-default

Re: ANN: Programothesis screencast series on Clojure, Emacs, etc

2010-11-12 Thread Bob Hutchison
On 2010-11-12, at 4:25 PM, Scott Jaderholm wrote: > Hey Clojurians, > > I don't think there are any great new movies in the theater this weekend so > if you're looking to kick back and relax and watch the tube a bit you might > checkout the first few episodes of my new screencast series on Clo

Re: Python is way faster than Clojure on this task

2010-11-06 Thread Bob Hutchison
ot; group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this

Re: Python is way faster than Clojure on this task

2010-11-06 Thread Bob Hutchison
had serious trouble caused by the way the JVM increases the heap space. Setting min to max (and max big) pretty much took care of that issue. Cheers, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://xampl.com/so -- You received this message because you ar

Re: Clojure on Javascript

2010-10-30 Thread Bob Hutchison
t; > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
On 2010-10-05, at 3:51 PM, Phil Hagelberg wrote: > On Tue, Oct 5, 2010 at 11:57 AM, Bob Hutchison > wrote: >> What do you mean by 'switch to the repl', in fact, how do you do that? >> >> I'm using lein swank, I can connect to it, I can evaluate express

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
obody seems to think it matters. Cheers, Bob > > On Oct 5, 11:57 am, Bob Hutchison wrote: >> Hi, >> >> I've been using Clojure & Leiningen for a while, but never reliably with >> emacs. To make things worse I really don't know emacs (vi since 1978 or

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
t expression in > the evaluate region in the minibuffer. At least, that's what' it's > always done for me. > > -- > Mike Meyerhttp://www.mired.org/consulting.html > Independent Network/Unix/Perforce consultant, email for more information. B

Re: Thinking in Clojure

2010-09-03 Thread Bob Hutchison
ed. Stick with the core >> datastructures (maps, vectors, sets, lists) and fns and you'll do just fine. >> >> David > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send emai

Re: Question about 'chains' of derefs a request for better ideas

2010-04-05 Thread Bob Hutchison
unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > > To unsubscribe, reply using "remove me" as the subject. Bob Hutchison Recursive Design Inc.

Re: Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
er and ref-set that will dispatch properly, and so only alter/ref-set are needed (it's an illusion maybe, but useful) Anyway, looks like this'll work well. Cheers, Bob > > -Per > > On Sun, Apr 4, 2010 at 9:35 PM, Bob Hutchison > wrote: >> >> Hi, >>

Re: Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
of space > leaks, delayed side effects, etc. That's really interesting. Thanks so much! Now I'll go think about it some more :-) Cheers, Bob > > -Per > > On Sun, Apr 4, 2010 at 9:35 PM, Bob Hutchison > wrote: >> >> Hi, >> >> I have a sit

Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
te the ref with another delay, kind of like: (dosync (ref-set my-thing (delay my-updated-thing))) Is the the way to do it? Is there something better I could be doing? Something deref-able that I'm missing that is better suited than delay? Some kind of deref-all-the-way function? Thanks, Bo

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 4:05 PM, Meikel Brandmeyer wrote: > Hi, > > Am 07.12.2009 um 21:37 schrieb Bob Hutchison: > >>> Please note that in clojure, it's the dispatch on the class that's >>> the >>> "trick", not on the type ;-) >> >&

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 4:16 PM, ataggart wrote: > On Dec 7, 12:37 pm, Bob Hutchison wrote: >> On 7-Dec-09, at 12:17 PM, Laurent PETIT wrote: >>> 2009/12/6 Bob Hutchison >> >>>> Yes! Thanks! The dispatch on type rather than class is the trick. I >>>>

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 12:17 PM, Laurent PETIT wrote: > 2009/12/6 Bob Hutchison > >> >> On 6-Dec-09, at 3:46 PM, Meikel Brandmeyer wrote: >> >>> Hi, >>> >>> Am 06.12.2009 um 21:29 schrieb Bob Hutchison: >>> >>>> It turns out

Re: The new deftype and multimethod dispatching

2009-12-06 Thread Bob Hutchison
On 6-Dec-09, at 3:46 PM, Meikel Brandmeyer wrote: > Hi, > > Am 06.12.2009 um 21:29 schrieb Bob Hutchison: > >> It turns out that dispatching on play.foo.Foo is the only way that >> works. I was hoping ::f/Foo or f/Foo would work too (maybe my alias >> is >&

Re: The new deftype and multimethod dispatching

2009-12-06 Thread Bob Hutchison
x27;ve got a common situation where I'd like to dispatch on two arguments. In something like Ruby this requires a double dispatch, but in CL it doesn't. Cheers, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://www.recursive.ca/hutch -- You received

The new deftype and multimethod dispatching

2009-12-06 Thread Bob Hutchison
eal namespace name, not to mention making re-naming the namespace harder than it should be. If someone could help me out I'd appreciate it. Thanks, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://www.recursive.ca/hutch -- You received this mess