Re: How to structure a Clojure day for noobs?

2012-12-20 Thread Brian Marick
On Dec 20, 2012, at 8:55 PM, Seth Chandler wrote: > but in dealing with file locations, dependency management, projects, > Leiningen, all of which are -- with due respect -- very difficult, > particularly for people not coming from an Eclipse or similar background. In my book, I decided to ha

Re: Meaning of "="

2012-12-11 Thread Brian Marick
On Dec 11, 2012, at 5:42 PM, Phil Hagelberg wrote: > Henry Baker's "Equal Rights for Functional Objects" paper: > http://home.pipeline.com/~hbaker1/ObjectIdentity.html Henry Baker was/is a brilliantly just-outside-of-the-box thinker. Many of the papers at http://home.pipeline.com/~hbaker1 are

Re: when is a zipper better than get-in ?

2012-12-11 Thread Brian Marick
On Dec 11, 2012, at 4:45 PM, Nando wrote: > Thanks! I bought and started reading your book. Seems excellent so far, and > wanted to say that I particularly appreciate your stated willingness to help > those of us with no experience in functional programming. I'm pleased to hear that. --

Re: when is a zipper better than get-in ?

2012-12-11 Thread Brian Marick
On Dec 11, 2012, at 1:04 PM, Brian Marick wrote: > If you want to "edit" trees, using zippers is often much much easier than > collection functions. I find the code easier to understand, too. I almost forgot to make a shameless plug for /Functional Programming for the

Re: when is a zipper better than get-in ?

2012-12-11 Thread Brian Marick
On Dec 11, 2012, at 12:48 PM, larry google groups wrote: > > I am sorry for the dumb question, but zippers are for looping over nested > collections, yes? Why can't I just use get-in for that? When would I need a > zipper? If you want to "edit" trees, using zippers is often much much easier

Re: Autotest for Clojure/Midje?

2012-12-11 Thread Brian Marick
On Dec 11, 2012, at 12:38 PM, Timothy Baldridge wrote: > For a project I'm working on it would be awesome to have my tests auto-rerun > after every file change. I know lazy test exists, but it doesn't work with > Lein2 it seems. (defproject ... :profiles {:dev {:dependencies [[midje "1.4.0

Re: [ANN] Dibble - A new way to seed databases

2012-12-10 Thread Brian Marick
sed to adjust > that value to something else. > > https://github.com/MichaelDrogalis/zombie > > In any case, drop the link here when you find the talk. We should take a stab > at merging these two concepts. > > On Sunday, November 11, 2012 6:23:24 PM UTC-5, Brian M

Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
(Actually, previous was wrong. The `in-ns` calls seem to have to be at the top level, as in: (in-ns 'clojure.core) (if-not (resolve 'ex-info) (defn ex-info ...) (in-ns 'midje.repl) ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clo

Re: "Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
On Dec 6, 2012, at 10:41 AM, Brian Marick wrote: >(ns midje.repl > (:require ... >midje.util.backwards-compatible-utils >[leiningen.core.project :as project] > It worked to remove the modification to core from `m.u.backwards-compatible

"Injecting" new clojure.core functions into third-party libraries

2012-12-06 Thread Brian Marick
e.project :as project] ... when `m.u.backwards-compatible-utils` contains: (when (ecosystem/clojure-1-3?) (in-ns 'clojure.core) (defn ex-info ...) (in-ns 'midje.util.backwards-compatible-utils)) Why not? What should I do instead? - Brian Marick, Arti

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-20 Thread Brian Marick
multimethods only vectors work if you want to have a type hierarchy. I wish sets worked, but then you'd have to also have some sort of destructuring mechanism to bind the parameters. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-19 Thread Brian Marick
of a taxonomy. A ::gaussjammer is a subtype of a ::spaceship. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- You received this messa

Re: Idiomatic equivalent for double dispatch in clojure?

2012-11-19 Thread Brian Marick
starships))] (map (partial with-speed speed) starships - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- You received thi

Re: Coding Standard - ns usage

2012-11-11 Thread Brian Marick
; I'll be looking for people who can share (general purpose tricks of the aging trade). Contact me if interested. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer

Re: [ANN] Dibble - A new way to seed databases

2012-11-11 Thread Brian Marick
ogic to generate structured (hierarchical) test data that satisfies constraints. I could imagine the two code bases being complementary. Mine is at: https://github.com/marick/peano I gave a talk on the idea at Software Craftsmanship North America (yesterday). I believe it was recorded. ----- Brian M

Re: monads

2012-10-26 Thread Brian Marick
rtain structured problems, especially ones that lend themselves to combinations of predefined rules that apply to every step, monads are just The Right Thing. Even if you don't use them, I'm inclined to think monads are a useful example of how to think about functions in a functional l

Re: Midje popularity?

2012-10-23 Thread Brian Marick
I merged your pull request, and I'm now getting up to speed with nrepl, leiningen 2, etc. Do you want to be a committer to midje-mode? I'll have to get dnaumov to set you up, since it's his repo. ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clo

Re: Midje popularity?

2012-10-18 Thread Brian Marick
On Oct 17, 2012, at 2:35 PM, Andreas Liljeqvist wrote: > Just to clear something up: Are you maintaining midje-mode? > I thought it was Dmitri? > That's where I left my pull request anyway. I'm a committer for `midje-mode`. - Brian Marick, Artisanal Labrador Contract prog

Re: Midje popularity?

2012-10-17 Thread Brian Marick
soon, because I want to start using nrepl myself. Again: sorry. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- You received this

Re: Rouge: Ruby + Clojure

2012-10-16 Thread Brian Marick
ntents of the object to be immutable. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- You received this message because you are subs

Multiple matching dispatch values (multimethods)

2012-09-14 Thread Brian Marick
ammer ::thing] [::starship ::starship]) Why? In what cases would a programmer prefer something like the second match? - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Progr

Re: redefining multimethods at the repl

2012-09-05 Thread Brian Marick
oo/blob/master/sources/generic.clj https://github.com/marick/fp-oo/blob/master/test/sources/t_generic.clj I've already discovered changes I need to make. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Program

Re: Fund raiser for our projects

2012-09-05 Thread Brian Marick
learning it will inform their documentation), are quick studies, and are skilled explainers. ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com

Re: redefining multimethods at the repl

2012-09-05 Thread Brian Marick
ail 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 group at > http://groups.google.com/group/c

redefining multimethods at the repl

2012-09-04 Thread Brian Marick
: user=> (collide (ship "Space Beagle") (asteroid "Malse")) IllegalArgumentException No method in multimethod 'collide' for dispatch value: [:ship :asteroid] clojure.lang.MultiFn.getFn (MultiFn.java:121) ;;; The redefinition didn't take - Brian Marick, Ar

Re: Clojure Practice?

2012-09-01 Thread Brian Marick
to Clojure.) https://leanpub.com/fp-oo - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

Re: (merge) => nil

2012-08-29 Thread Brian Marick
t nil to represent failure and {} to represent a success that establishes no bindings. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" gr

(merge) => nil

2012-08-29 Thread Brian Marick
Why does `(merge)` return nil? I would have expected it to return the unit ({}) by analogy with things like this: (+) => 0 (*) => 1 - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because y

Re: Is this a bug in core.match?

2012-08-28 Thread Brian Marick
ure.lang.Numbers.ops (Numbers.java:942) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to cloj

Is this a bug in core.match?

2012-08-28 Thread Brian Marick
er=> (defn count-sequence [& seq] (match [seq] [([so-far [x & xs]] :seq)] (str "1:" so-far x xs) [([[& sequence]] :seq)] (str "2:" sequence))) user=> (count-sequence [1 2 3]) nil This is a bug? Please? (Note: the same thing happens without a &am

Re: Attractive examples of function-generating functions

2012-08-08 Thread Brian Marick
))) > I actually have a whole chapter on this. (Arguably, the whole first part of the book leads up to that chapter.) I even use Point as an example! But "it's functions all the way down!" is not what I'm looking for in this section. Because you wouldn't use such a

Attractive examples of function-generating functions

2012-08-08 Thread Brian Marick
osures to avoid the need to have some particular argument passed from function to function (which looks like the `this` in an instance method). Note: please put the flamethrower down. I'm not saying that "looking like objects" is the point of higher-order functions. I'

Re: What concurrency models to document?

2012-08-02 Thread Brian Marick
.com/2011/07/11/results-of-the-2011-state-of-clojure-survey/ - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

What concurrency models to document?

2012-08-01 Thread Brian Marick
t to have a chapter on concurrency. Of the various types of concurrency Clojure offers, which do you think would be most useful to explain? My inclination is: auto-concurrency due to immutability, futures (I love futures), and atoms. What do you think would be the right set? - Brian Marick

Re: RFC: Functional programming conference?

2012-07-26 Thread Brian Marick
f I'm > wrong, no one will come and I'll stop doing it. :) If Gabriel is still the driving force behind Splash, he'd *like* it to be the kind of meeting ground for industry and academia that the earlier OOPSLAs were. - Brian Marick, Artisanal Labrador Contract programmin

idempotency

2012-06-30 Thread Brian Marick
imagine it doing that for built-ins (or just primitives?), but not for user-defined functions (given the existence of atoms, etc.) I can also imagine it not bothering for any calls. ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile

Re: verify that a fn throws an exception via testing?

2012-06-25 Thread Brian Marick
to handle an exception. That exception is hard to generate. So this is a way to artificially create and throw one. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you

Re: meta-questions - [clojure] in front of Subject line

2012-06-17 Thread Brian Marick
se phones as their main, workaday interface, and how much an extra inconvenience 9 characters is when they're already trying to view the world through a keyhole. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on

Re: meta-questions - [clojure] in front of Subject line

2012-06-17 Thread Brian Marick
to Google Groups is ~3-click (I've done it numerous times), which makes more sense: * that 1 person adjust the group settings * that N>>1 list recipients adjust their clients - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Cloj

Re: meta-questions - [clojure] in front of Subject line

2012-06-17 Thread Brian Marick
On Jun 17, 2012, at 1:45 PM, Andy Coolware wrote: > I have been subscribed to a couple of groups as well as other stuff > and find it useful to have a Subject line prefix indicating the source > of conversation. +1 ----- Brian Marick, Artisanal Labrador Now working at http://path11.com

Re: [PATCH] RFC: Add Functions `tabify` And `untabify`

2012-06-08 Thread Brian Marick
On Jun 8, 2012, at 8:49 AM, Jay Fields wrote: > I wouldn't mind seeing more in clojure.string. e.g. daserize, underscore, > pascal-case, camel-case +1 - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.e

Re: clojure.core.unify and exceptions

2012-06-07 Thread Brian Marick
7;[clojure.core.logic :as l]) user=> (l/unifier '[1 ?two 3 4] '[1 2 ?three 4]) [1 2 3 4] user=> (l/unifier '[1 ?two 3 4] '[1 2 ?three NOT-FOUR]) nil user=> (l/binding-map '[1 ?two 3 4] '[1 2 ?three 4]) {?three 3, ?two 2} - Brian Marick, Artisanal Labrador

Peano: a proof of concept using core.logic for test data generation

2012-06-04 Thread Brian Marick
ichael Feathers: it's one that doesn't try to be *so* universal that it's too hard to learn and too fiddly to work with, but that also doesn't require so much coding that it doesn't save you enough work. http://www.artima.com/weblogs/viewpost.jsp?thread=8826 - Bria

Midje 1.4 released

2012-05-23 Thread Brian Marick
. Changes: https://github.com/marick/Midje/wiki/New-in-1.4 User documentation: https://github.com/marick/Midje/wiki Repo: https://github.com/marick/Midje - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com

Re: Core.logic, dynamically generated goals

2012-05-20 Thread Brian Marick
mal) ~setter))] ----- Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: clojure-1.4.0.jar missing in ~/.m2

2012-05-05 Thread Brian Marick
ou have to run it another time to find which next thing to exclude. None of this makes any sense to me, and I hope I never really need to understand it. I accept this pain as an offering to the Java gods. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in

Re: clojure-1.4.0.jar missing in ~/.m2

2012-05-05 Thread Brian Marick
removing all other dependencies first and try again. Note that Midje 1.4 (beta-2 just pushed today) has fixed this problem. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message

Re: Convention for configuration files?

2012-04-26 Thread Brian Marick
On Apr 26, 2012, at 12:09 PM, Laurent PETIT wrote: > Le 26 avr. 2012 à 02:15, Brian Marick a écrit : > >> Midje is getting to the point where it probably wants some sort of >> configuration/customization file. Is there any sort of emerging idiom for >> those in Cloju

Convention for configuration files?

2012-04-25 Thread Brian Marick
y, will we force him to put that in his Java classpath? [Speaking as a Unix guy for 30 years: ick.] - Etc. ----- Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are

Re: Polymorphic namespaces?

2012-03-28 Thread Brian Marick
t; namespace and its implementation. Does this make sense? Is there a better way > to dependency injection in Clojure? To what end are you injecting dependencies? (If it's for testing, I have something useful to say; if not, not.) - Brian Marick, Artisanal Labrador Now working

Re: Clojure 1.3 updated cheatsheet with links to clojuredocs.org

2012-02-27 Thread Brian Marick
l to put 1.3 in the title. (I see that it's there way down in the bottom.) - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Go

Re: Controlling the test environment

2012-01-17 Thread Brian Marick
rpose: https://github.com/marick/Midje/wiki/Setup%2C-Teardown%2C-and-State Note that you can mix and match Midje tests and clojure.test tests, even wrap Midje tests inside deftest, so using `background` doesn't commit you to a wholesale rewrite of existing tests. - Brian Marick,

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
or something) be changed so that inadvertent use of a Long doesn't blow up? Or maybe Haskellishly have a line number be some sort of wrapped type? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
at the metadata > swizzling is happening during expansion. Yes. I was just adding 1.4 to the backwards-compatibility suite and noticed a bug. The change-clojure-version script wasn't changing part of the suite - the part I put the Long->Int regression test in. Sigh. - Brian Marick,

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-20 Thread Brian Marick
On Dec 20, 2011, at 11:44 AM, David Nolen wrote: > Are you attaching line metadata yourself? Yes... What type should it be? ----- Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received t

Re: Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-19 Thread Brian Marick
On Dec 19, 2011, at 7:34 PM, Brian Marick wrote: > I have tried for two days to figure out what is causing the compiler to throw > the following when compiling a macro: > > Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to > java.lang.Int

Compiler: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer

2011-12-19 Thread Brian Marick
> (midje.semi-sweet/data-fake ..service.. =contains=> {:status 200} :position > (midje.internal-ideas.file-position/line-number-known 17))) > (midje.util.report/fact-checks-out?)) That compiles perfectly fine. - Brian Marick, Artisanal Labrador Now working at http://path11.com

Re: want to make a 'debug' function, how to get current source and line number?

2011-12-16 Thread Brian Marick
7;re in https://github.com/marick/Midje/blob/master/src/midje/internal_ideas/file_position.clj The other two are fairly specific to Midje, so they're probably harder to understand, but they may be of use. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby

ANN: Midje 1.3.0

2011-12-12 Thread Brian Marick
sites More here: https://github.com/marick/Midje/blob/master/HISTORY.md Thanks especially to Alex Baranosky, who did a lot of work on this release. Enjoy. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on

Re: TDD with Leiningen

2011-12-08 Thread Brian Marick
oup, 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 group at > http://groups.go

Re: Rich Hickey: "Simple Made Easy" from Strange Loop 2011

2011-11-12 Thread Brian Marick
e-ey, and (arguably) harder to understand. It was a masterpiece of snark. I've never been able to find it since. If anyone has a copy, I'd love to get one. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting

Re: Idiomatic clojure for decorating graph

2011-11-11 Thread Brian Marick
e-with-clojurezip/ - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send

Re: NullPointerException in c.l.Compiler.lookupVar after aot compilation: means what?

2011-11-09 Thread Brian Marick
at NPE. It's all better now. Alan Malloy's fix worked fine on Clojure 1.2.1 and 1.3. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to

Re: NullPointerException in c.l.Compiler.lookupVar after aot compilation: means what?

2011-11-09 Thread Brian Marick
eems to have the same effect as the defonce in some simple testing. > > Of course it's silly to use intern the second time: (.setRoot the-var > clojure.test/report) would have been simpler. Thank you. You've made a user happy. (You meant .bindRoot rather than .setRoot, right?)

Re: NullPointerException in c.l.Compiler.lookupVar after aot compilation: means what?

2011-11-09 Thread Brian Marick
o Clojure, and I didn't understand it. I think it was a workaround for something in Clojure 1.1. I bet I can figure it out now. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You receive

Re: Dynamic test creation?

2011-11-09 Thread Brian Marick
rd. More discussion should probably happen at http://groups.google.com/group/midje - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups &

NullPointerException in c.l.Compiler.lookupVar after aot compilation: means what?

2011-11-08 Thread Brian Marick
llPointerException clojure.lang.Compiler.lookupVar (Compiler.java:6780) What could that exception mean? What's a starting point for debugging? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile

Re: with-redefs and inlined functions

2011-11-01 Thread Brian Marick
> On Nov 1, 2011, at 11:17 AM, Chas Emerick wrote: > >> FWIW, it doesn't look like `every?` has any inlining: Ah, I see what's actually going on. My mistake. It's good to hear about how to do the inline check. Thanks! - Brian Marick, Artisanal Labrador Now w

with-redefs and inlined functions

2011-11-01 Thread Brian Marick
x27;s already been ruled out.) - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: Should intern work within a try block?

2011-10-12 Thread Brian Marick
de, which I then threw away. But it must be the case that the problem was a stray var reference at the top level. Thanks! (It's hard to get used to declare-before-use when you're an old dog like me.) - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract prog

Re: Should intern obey :dynamic?

2011-10-12 Thread Brian Marick
))` idiom and *not* want isDynamic-ness to be copied? Seems to me that if you're going to use metadata to communicate intention about dynamic binding in *one* way of creating a new var, you should do it with *all* ways of creating a new var. - Brian Marick, Artisanal Labrador Now working a

Should intern work within a try block?

2011-10-12 Thread Brian Marick
ion: Unable to resolve symbol: *copy2* in this context, compiling:(midje/t_m.clj:26) `def` does work. Bug? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are s

Should intern obey :dynamic?

2011-10-12 Thread Brian Marick
a #'*copy*) {:ns #, :name *copy*, :dynamic true, :line 1, :file ...} But you can't rebind: user=> (binding [*copy* "new value"] *copy*) IllegalStateException Can't dynamically bind non-dynamic var: user/*copy* clojure.lang.Var.pushThreadBindings (Var.j

Re: Libraries supporting 1.3&1.2 and bignums

2011-10-12 Thread Brian Marick
e are overflow exceptions, they won't come from Midje code. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "

Re: metadata on function objects

2011-10-11 Thread Brian Marick
> course. How about putting the information back on the function? Who would be harmed by reverting back to old behavior? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this mes

Re: metadata on function objects

2011-10-11 Thread Brian Marick
> "clojure/core.clj"} I understand that. Useful code is sometimes given a function object to work with, not a Var. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this me

metadata on function objects

2011-10-11 Thread Brian Marick
etadata is missing: user=> (meta odd?) nil The previous behavior was useful. I made use of it. Is it a bug that it's gone away? If not, what's the reasoning behind the change? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Cl

Re: Libraries supporting 1.3&1.2 and bignums

2011-10-11 Thread Brian Marick
their time screwing around with arithmetic boundaries. An unlikely case, to be sure, but I believe this kind of fit-and-finish is important. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You rec

Re: Libraries supporting 1.3&1.2 and bignums

2011-10-11 Thread Brian Marick
st [+' 1])) seems like it should work in both versions? That is outrageously clever. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the G

Libraries supporting 1.3&1.2 and bignums

2011-10-10 Thread Brian Marick
library writer who wants to honor the choices of his users do? - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: suggestion for clojure development

2011-09-27 Thread Brian Marick
ot;Why, yes!". That answer shouldn't depend on historical details like who first wrote a library. People matter less than code. - Brian Marick, Artisanal Labrador Now working at http://path11.com Contract programming in Ruby and Clojure Occasional consulting on Agile -- You re

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-26 Thread Brian Marick
eally interesting. https://github.com/marick/Midje has a DSL for expressing tests (called "facts"). Although the DSL is pretty simple, the code behind them isn't. But you could see some interesting things if you macroexpanded facts, and I'd be glad to answer questions pos

Re: Swarming experiment at Conj?

2011-09-21 Thread Brian Marick
Chris. Not enough people (2) said they were interested for this to go forward. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Go

Re: Is there a reason that def- isn't part of the core lib?

2011-09-18 Thread Brian Marick
human negotiation and communication works. I really think `def-` would be a good gesture, a minor but emblematic step on the way to widespread acceptance of Clojure, which (for my sake) I really, really, really hope for. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure

Re: Is there a reason that def- isn't part of the core lib?

2011-09-18 Thread Brian Marick
weighs the burden of moving a def- macro from a contrib file to a core file. It even outweighs the aesthetic concerns (which I confess I don't understand). - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.

Swarming experiment at Conj?

2011-09-08 Thread Brian Marick
us power, should suffice.) What say you? - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups "Clojure" g

Re: New to Clojure -- Errors Are Frustrating

2011-08-03 Thread Brian Marick
as DWWTWHM ("Do What Warren Teitelman Would Have Meant"). It is a hard problem. It's also an important problem. (In Midje, I've tried to be good about checking for user errors. It's surprising how often a misparenthesization can't be reported because there'

deftypes that implement IPersistentCollection#equiv: argument order

2011-08-03 Thread Brian Marick
taconstant? equiv is called with midje.ideas.t-m.Metaconstant clojure.lang.Symbol true = metaconstant symbol? equiv is called with midje.ideas.t-m.Metaconstant clojure.lang.Symbol true Why is .equiv called with reordered arguments? And can I depend on that behavior going forward? I

What information does (:key x) convey?

2011-08-03 Thread Brian Marick
le'? (:start voyage) eliminates the possibility of that confusion, saving me some mental name-picking anguish." I'm interested in what you think when you see a keyword, and what it would mean if you didn't. (Sorry for the long note, but this way I get to use some of my B.A 19

Re: ClojureQL: debugging generated SQL / Dates

2011-07-28 Thread Brian Marick
On Jul 27, 2011, at 7:26 PM, Brian Marick wrote: > How *does* one provide dates to ClojureQL for transmission to Postgres? I > want to do something like this: > > (ql/conj! (ql/table :animals) {:official_name "fred" :added_to_service > <<>>}) Boy I was

ClojureQL: debugging generated SQL / Dates

2011-07-27 Thread Brian Marick
stgres? I want to do something like this: (ql/conj! (ql/table :animals) {:official_name "fred" :added_to_service <<>>}) - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick

Re: Exception testing with clojure.test

2011-07-19 Thread Brian Marick
(f) => (throws NullPointerException)) true - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Enlive (HTML templating library) tutorial

2011-07-15 Thread Brian Marick
grand/enlive/wiki/Table-and-Layout-Tutorial,-Part-1:-The-Goal - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups "Cloj

Re: Results from 2011 State of Clojure survey

2011-07-13 Thread Brian Marick
On Jul 13, 2011, at 6:03 AM, Ambrose Bonnaire-Sergeant wrote: > I've found that (some of) Clojure's advanced features are best taught in > terms of simpler ideas > that most programmers would be familiar with. +1 - Brian Marick, Artisanal Labrador Contract programming

Re: Clojure for large programs

2011-07-03 Thread Brian Marick
thing to do would be to implement a feature and narrate how you decide where to put things, where existing things must be, and so forth. [I spend a fair amount of time parachuting into projects and learning the code structure by pairing. Works pretty nicely.] - Brian Marick, Artisanal Labra

Re: Clojure for large programs

2011-07-02 Thread Brian Marick
inadvertent preparatory work done by people like Pragmatic Dave Thomas, Chad Fowler, Nathaniel Talbott, and Jim Weirich. We'd do well to learn from their oral histories of the early days of Ruby. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional con

Re: Any ways to prevent protocol functions from being hardcoded in?

2011-06-30 Thread Brian Marick
t;protocols" except when I care about efficiency or Java interop? - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups

Re: Russ olsen's Clojure Book

2011-06-30 Thread Brian Marick
al style. I remember the explanation of Visitor is nothing like any other I'd ever seen. http://www.amazon.com/Little-Java-Few-Patterns/dp/0262561158/ref=ntt_at_ep_dpt_4 ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile

Re: Any ways to prevent protocol functions from being hardcoded in?

2011-06-28 Thread Brian Marick
around that does essentially that. It suffices. ----- Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile www.exampler.com, www.twitter.com/marick -- You received this message because you are subscribed to the Google Groups "Clojure&qu

Re: Mocking framework

2011-06-28 Thread Brian Marick
ion" is deferring decisions about data structures. In the above, we don't have to know anything about what a "movie" is except that `critic-rating` and `actors` work with it, which is saying something like what `defprotocol` says.] - Brian Marick, Artisanal La

<    1   2   3   >