I think I would use a macro:
(defn with-bloomy-fn [bloomy body]
(try
(body)
(finally
(shut-down bloomy
(defmacro with-bloomy [bloomy & body]
`(with-bloomy-fn ~bloomy (fn [] ~@body)))
(deftest my-test
(with-bloomy (create-a-bloomy)
(...))
FYI code is untested, typing str
Sqlite is worth a look. Never used it with the JVM, but I assume there is a
JDBC driver for it.
On Mon, May 27, 2013 at 1:01 AM, Zack Maril wrote:
> Use postgres. If it makes sense later on, then try a nosql solution. Until
> then, postgres will probably do 95% of what you want out of the box.
The 'parse-args' function needs to be inside of the 'core.clj' file, not
the 'core_test.clj' file - is that the case? (The reason it is failing is
the first usage of 'parse-args' is before it has been defined).
On Fri, May 31, 2013 at 1:31 AM, Adam Getchell wrote:
>
>
> On Tuesday, March 19, 201
You could look at the impl:
https://github.com/weavejester/hiccup/blob/master/src/hiccup/def.clj
On Mon, Jun 3, 2013 at 12:22 PM, Alice wrote:
> I often need to do this when writing hiccup helper functions:
>
> (defn my-widget
> [& args]
> (let [attrs(if (map? (first args)) (first args
This may help:
http://clojure-doc.org/articles/tutorials/parsing_xml_with_zippers.html
On Wed, Jun 5, 2013 at 9:54 AM, Ryan Moore wrote:
> Hi, I've read http://nakkaya.com/2009/12/07/zipping-xml-with-clojure/ and
> http://stackoverflow.com/questions/1194044/clojure-xml-parsing/9595315#comment2
Just to check - you have set ":join? false" so the thread will not block
until the server ends - are you doing this intentionally and blocking the
thread elsewhere?
On Fri, Jul 12, 2013 at 8:45 PM, Daniel Higginbotham wrote:
> I'm trying to start a jetty server on a virtualbox vm (ubuntu 12.04
Instead of using the var #'web/app in run-jetty, use a function that takes
your main-db as an argument and returns the routes for your app. You can
use the compojure.core/routes to build your app routes rather than using a
global var.
On Fri, Jul 19, 2013 at 3:42 AM, Tarik Ansari wrote:
> Hello
Hey, i am the current maintainer of tools.cli - i have very little time to
make any changes to it at the moment (kids :) ). I'm not sure what the
process is for adding you as a developer or transferring ownership etc but
if I'm happy to do so as I have no further plans for working on it.
Thanks,
G
Here is a toy app that downloads nzbs from usenet:
https://github.com/gar3thjon3s/leacher
It's not documented, but it works. The component stuff is hooked up here:
https://github.com/gar3thjon3s/leacher/blob/master/src/clj/leacher/main.clj#L53
On 7 October 2014 12:33, JPatrick Davenport wrot
A technique I use whenever I need to learn a new language is to write the
same application I already have in another language. I generally choose
downloading nzbs from usenet as it can involve a number of interesting
programming techniques, at least enough to give you a pretty good idea of
how a l
Martin Odersky gave a keynote at Strangeloop this year called "The Trouble
With Types" (https://thestrangeloop.com/sessions/the-trouble-with-types)
which made me never want to use a type system again (probably the exact
opposite of his intention). The video should be coming out on infoq at some
poi
There is no reason not to consider using a combination of both
technologies. I have found Clojure is excellent for writing http services
(for example sending/receiving JSON), but is a bit weak in comparison to
say the combination of ruby and haml for building UIs quickly.
On Thu, Nov 14, 2013 at
If you're account had a picture like his, YES.
On Mon, Nov 18, 2013 at 5:45 PM, Tony Tam wrote:
> Hi,
>
> I'm always curious about remarks like this:
>
>
> A link to your Github profile counts for much more than a stellar resume.
>> Doesn't have to be in Clojure.
>>
>
> If I sent you a like to
*your :)
On Mon, Nov 18, 2013 at 9:46 PM, gaz jones wrote:
> If you're account had a picture like his, YES.
>
>
> On Mon, Nov 18, 2013 at 5:45 PM, Tony Tam wrote:
>
>> Hi,
>>
>> I'm always curious about remarks like this:
>>
>>
>&
"Because there is no patch for human stupidity"?
On Tue, Nov 19, 2013 at 1:35 PM, Sean Corfield wrote:
> On Sun, Nov 17, 2013 at 1:57 AM, Andrey Antukh wrote:
> > Additionally I have
> > copied some useful functions like parsing dbspec to URI or a map of
> > protocol->cases
> > and the rest are
Whoops, sorry looks like my intended light-hearted sarcasm based on one of
the email signatures in the thread got mis-interpreted. Hard to express in
an email, perhaps a cheeky :P after would have let you know I wasn't being
particularly serious!
No offense intended, or taken :)
On Tue, Nov 19,
Hey guns,
Yeah sounds good, I don't have admin access to add you as a developer so
will ask on the clojure-dev mailing list to see who can do it and cc you on
that.
Cheers,
Gaz
On Wed, Nov 20, 2013 at 6:40 PM, guns wrote:
> On Wed 20 Nov 2013 at 06:32:49PM -0600, guns wrote:
> > The formattin
This shirt appears to be complecting fashion, programming, AND advertising.
On Mon, Nov 25, 2013 at 11:17 AM, Laurent PETIT wrote:
> Hey Bruce,
>
> 2013/11/25 Bruce Durling :
> > Yay! Thanks Rich!
> >
> > Good picture of you. Have you been working out before taking those
> > shots in the t-shirt
There are at least some keyboard shortcuts you should be familiar with for
loading / compiling namespaces. Look a the "Using the REPL" section of
this: http://clojure-doc.org/articles/tutorials/emacs.html
On Sat, Dec 28, 2013 at 7:38 PM, larry google groups <
lawrencecloj...@gmail.com> wrote:
>
Why not just use Ruby or (my preference) Python? Both are great for quick
CLI apps / scripts. Best tool for the job, and all that?
On Sat, Jan 4, 2014 at 8:43 AM, gvim wrote:
> I have recently moved most of my work to Clojure and Clojurescript but
> neither of these implementations seem suitabl
I'm starting to miss Ken Wesson.
On Mon, Mar 25, 2013 at 4:08 PM, Gary Trakhman wrote:
> I've volunteered on the pycon AV team, in 2009, it's 1000x more work than
> what you described further up in the thread, a minimum wage worker holding
> something steady. It requires a lot of coordination,
There seems to be some rule that given sufficient time and enough
participants, all threads deteriorate into an argument about the current
state of clojure documentation and a huge post from Tim Daly regarding
literate programming in 3...2...1...
On Thu, Apr 25, 2013 at 2:23 PM, Gary Trakhman wro
>> Does the projects look like the work of someone that is an utter moron
... your response certainly is.
On Thu, May 2, 2013 at 10:28 AM, Jay Fields wrote:
> On Thursday, May 2, 2013 10:19:51 AM UTC-4, David Toomey wrote:
>
>>
>> [snipped]
>
>
> If you want help in the future, I'd recommend s
hi,
apologies if this is a long question, i would appreciate some guidance here.
i am creating a clojure wrapper around a rather verbose low latency
messaging framework. the main things you can do are publish messages,
receive messages, initialize sources and receivers etc. all are done
through a
thanks for the lengthy reply! i will play around with these
suggestions. like the fact there are less parameters to pass around.
On Tue, Sep 28, 2010 at 1:10 AM, Meikel Brandmeyer wrote:
> Hi,
>
> I'm not sure my solution is 100% idiomatic, but has some advantages.
> General strategy: minimise ma
thanks for the reply, you are right! and in fact my real
implementation is more like this, i thought that by showing them both
as macros in the post it would be easier for people to just skim read
the post and compare them side by side. probably just confused the
issue, sorry.
the thing im really
coincidentally, me and my brother wrote this while on the train to
rubyconf last year:
https://github.com/mikejones/mississippi
havent put any docs or anything on there (its only a couple of
functions), but is essentially a validation function that take a map
(the thing to validate) and another m
the easiest way (i find) to test if something occurring on another
thread has completed is using a latch:
(deftest mohanr
(let [latch (CountDownLatch. 1)
service (Executors/newFixedThreadPool 10)]
(doseq [x (range 1)
:let [f (.submit service
(
this looks awesome, tried it out on a project i have but sadly got the
exception below. i'll try and figure it out later when i have more
time to see if its something specific to my project, but thought i
would let you know in case it is something obvious (it failed from
both slime and lein)
Excep
i highly recommend taking a look at Phil Hagelberg's emacs-starter-kit :
https://github.com/technomancy/emacs-starter-kit.git
it helped me a LOT when getting started with emacs in general, and
emacs and clojure together. i also put together a couple of blog posts
on my experience of using it whic
i wrote a command line arg library after wanting a bit more than the
one in contrib gave me:
https://github.com/gar3thjon3s/clargon
i think you could do what you want using it...
On Fri, Apr 29, 2011 at 12:26 PM, Sean Corfield wrote:
> Just an FYI. As part of the 1.3.0 release, the contrib libr
you can set the source path in leiningen to be whatever you like. the
sample file is quite useful for finding these things out:
https://github.com/technomancy/leiningen/blob/master/sample.project.clj
they key is :source-path. there is also a :java-source-path. cant say
i have ever used that, but
compojure is often put forward as an example of good idiomatic clojure code:
https://github.com/weavejester/compojure
On Mon, May 9, 2011 at 10:55 AM, Meikel Brandmeyer wrote:
> Hi,
>
> Am 09.05.2011 um 17:36 schrieb Jonathan Fischer Friberg:
>
>> I'm interested!
>>
>> The clojure source code is
query string params appear in the params of the request:
(GET "/math" {params :params} []
(get params :a) ;; 1
(get params :b) ;; 2
... etc
they will be keywords as above if you are using the
wrap-keyword-params handler, otherwise strings.
the syntax you are using above is for pulling valu
if i was writing the java i would probably do a "tell dont ask"
refactoring so that the operations had an applyTo method:
List items = initialItems ();
for (Op op : operations)
{
op.applyTo(items);
}
not sure what your op data structure is, but i would image you could
translate that to the clo
this page explains a bunch of ways of calling jruby from java:
https://github.com/jruby/jruby/wiki/RedBridge
think i would have to have pretty good reason before doing this (like
wanting to use jruby as a user scripting language in a clojure app
maybe)...
On Fri, Jun 17, 2011 at 11:08 AM, Phil H
this is really great, thanks for putting this together.
i have a (possibly daft) question -- is there a neat way to
kill/restart the underlying process. i have looked for a *ahem*
clojure-jack-off function or equivalent but couldnt find one in the
source. i am just killing it from the terminal at
2011 at 11:20 AM, gaz jones
> wrote:
>>
>> this is really great, thanks for putting this together.
>>
>> i have a (possibly daft) question -- is there a neat way to
>> kill/restart the underlying process. i have looked for a *ahem*
>> clojure-jack-off functio
jay fields has a good blog post on this:
http://blog.jayfields.com/2010/09/clojure-mocking.html
On Tue, Jun 28, 2011 at 2:52 AM, Ola Ellnestam wrote:
> Hi Erik,
>
> Take a closer look at Midje, especially
> https://github.com/marick/Midje/wiki/Metaconstants
>
> I'm not an subject matter expert b
are you trying to turn something into a json string? if so, the
json-str function is probably what you are looking for:
user> (json/json-str {:a "b"})
"{\"a\":\"b\"}"
by the way, the nil in your previous email is not being suffixed to
the string, its simply the return of the function getting writ
this made me lol :D
a big will smith fan??? not that i know you at all other than reading
your posts here, but i really didnt see that coming...
On Tue, Jul 19, 2011 at 9:11 AM, Ken Wesson wrote:
> An hour of Will Smith blasting aliens "flies by". An hour of a talking
> head is better presented a
i would agree with all that if i were writing plain java (a lib dir
for dependencies and a couple of shell scripts for building etc), but
leiningen makes it so easy for clojure that its more work _not_ to use
it... at least that has been my experience.
On Thu, Jul 28, 2011 at 4:23 PM, Michal B wr
;s it.
>
> I think most JVM users know or can quickly figure out how to take jars and
> put them in their project's classpath. It's simple to do with all IDEs (or
> without one) and there is no need to learn or install additional software or
> edit configuration files. Starter s
are there any scenarios in particular you feel need more
documentation? im happy to add more if it is lacking. hopefully the
README on the project page and tests provide a pretty good idea of
what options are available:
https://github.com/clojure/tools.cli
https://github.com/clojure/tools.cli/blob
it lives on github: http://github.com/clojure/tools.cli
like all the new contrib libs, to use it in a project you need to add
it to your dependencies:
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/tools.cli "0.1.0"]]
On Fri, Jul 29, 2011 at 7:56 AM, octopusgrabb
> Well, README and tests are very good.
> I withdrew into REPL and overlooked them stupidly. I'm very sorry.
>
no worries, glad they help.
> BTW some functions seems not to be public API though they are public.
> Why they are not separated by defn- or specific namespace like
> clojure.tools.cli.i
Are you Ken Wesson with a new account?
On Fri, Feb 24, 2012 at 1:00 PM, Cedric Greevey wrote:
> On Fri, Feb 24, 2012 at 1:29 PM, Damien Lepage wrote:
>> Hi Everyone,
>>
>> You may have seen this already, if not I believe it's worth investing 1h of
>> your life:
>> http://vimeo.com/36579366
>>
>>
IF IT WASNT FOR THOSE MEDDLING KIDS!!
On Fri, Feb 24, 2012 at 1:12 PM, Cedric Greevey wrote:
> On Fri, Feb 24, 2012 at 2:06 PM, gaz jones wrote:
>> Are you Ken Wesson with a new account?
>
> Who?
>
> Wait. Surely you don't think that it's not possible for more than
argh i come back to paste in my answer and you beat me to it :(
i was gonna say:
(let [s ""@key1 this is a value @another-key and another value
@test1 and other value""]
(reduce (fn [m [_ k v]] (assoc m k (string/trim v))) {} (re-seq
#"(@[\w-]+)([^@]*)" s)))
much the same...
On Sun, Mar 18
I would ask why you would want to do dependency injection? If it is to
swap out functions for testing, just use 'with-redefs'. I have
personally found it (DI) completely unnecessary...
On Wed, Mar 28, 2012 at 1:13 PM, Chris McBride wrote:
> I was wondering how dependency injection is done in Cloj
Hey,
Both myself and my brother do a fair amount of validating maps of data
in our day jobs (EXCITE!) so we put together a library a while ago to
help out. We just got round to releasing 1.0.0 recently so thought I
would announce it here in case anyone else is interested:
https://github.com/mikej
to answer your question directly, you would need to do something like
this to make it work the way your example is set up:
(defn new-game []
(let [board (atom (into [] (repeat 9 nil)))]
(fn [n & [i]]
(cond
(= n :x) (swap! board assoc i 'x)
(= n :o) (swap! board assoc i 'o
Hey,
I use the expectations testing framework a fair amount at work, so
created an emacs minor mode for running the tests ala
clojure-test-mode. It is based on clojure-test-mode so has many of the
same keybindings:
https://github.com/gar3thjon3s/expectations-mode/tree/0.0.2
I had to update expec
this page is amazing:
http://himera.herokuapp.com/synonym.html
this should be part of the standard docs for clojurescript - or am i
just blind and cannot find it? it would have saved me so much time
*sob*
On Mon, Apr 23, 2012 at 3:45 PM, David Nolen wrote:
> http://himera.herokuapp.com/synonym.
cheers! :D
On Mon, Apr 23, 2012 at 4:20 PM, David Nolen wrote:
> I've added links to Himera in the ClojureScript GitHub README
>
> On Mon, Apr 23, 2012 at 5:18 PM, gaz jones wrote:
>>
>> this page is amazing:
>>
>> http://himera.herokuapp.com/synonym
https://github.com/mikejones/mississippi
again, not specific to web forms. works on clojure maps and is extensible.
On Sun, Jul 22, 2012 at 6:46 PM, larry google groups
wrote:
> Since 2000 I've been doing web development, first with PHP and then with
> Ruby On Rails. In the world of PHP, there a
Wow, that's pretty nice.
On Tue, Jul 31, 2012 at 8:07 AM, David Nolen wrote:
> Ever since I read Norvig's cool Python solution,
> http://norvig.com/sudoku.html, I've been wanting to see if this could be
> done in core.logic without sacrificing generality. Now that we have cKanren
> extensions in
The library was originally based on Clargon (a library I wrote) which
had the interface you are describing (optional and required
functions). Various changes were made after getting feedback on the
clojure-dev mailing list, which you can read about here if you're
interested:
https://groups.google.
I've been playing with Go a lot recently, and I have found the
documentation / new user experience very good:
http://golang.org/
On Mon, Sep 3, 2012 at 2:19 PM, Denis Labaye wrote:
>
>
> On Mon, Sep 3, 2012 at 5:40 PM, Softaddicts
> wrote:
>>
>> Btwy, using leiningen's repl hides all these i
We do all of the things you mention (minus the replay, but that would
be trivial) in Clojure where I work, and it is remarkably easy. We
use:
* ring + compojure and an embedded jetty server to create lightweight webservers
* the Cheshire JSON encoding/decoding library for all JSON purposes
(https:
I find myself having to make similar choices quite often in my own
Clojure code - do I create perhaps a map of things that represent some
kind of 'state' and pass that around to each function that needs it,
or do I do what has been done above and create some vars in a ns where
most (all?) the funct
You may find this useful:
http://blog.fogus.me/2010/01/22/de-chunkifying-sequences-in-clojure/
loop-recur might be the best way to do it.
On Tue, Sep 11, 2012 at 11:16 PM, Geo wrote:
> Hello,
>
> I am just getting started with Clojure and I had a question. I have to
> following code:
>
> (get-r
you might find this useful:
https://github.com/dakrone/cheshire
you can pretty much swap it in for data.json IIRC and it has nice
support for custom encodings, amongst other things.
On Wed, Sep 26, 2012 at 12:39 PM, Robert Beaupre
wrote:
> Hi there,
> I am wondering what the best/recommended wa
Couple of initial things, Clojure has immutable data structures so
when you call for example 'assoc' it will return you a new map with
the new values assoc'd. It will not mutate the original, so:
(let [foo {}]
(assoc foo :a 1)
(assoc foo :b 2)
foo)
Will return {}. You need to do something l
You appear to be running over the map purely for side-effects,
therefore off the top of my head something like:
(defn my-func
[data]
(doseq [area data
warehouse (:warehouses area)
container (:containers warehouse)
box (:boxes container)]
(if-not (empty? (:item
You do not need noir to create a simple json api, just use compojure.
I find the Cheshire json library to also be useful:
https://github.com/dakrone/cheshire. Authentication and authorization
libs were pretty much up to you until
https://github.com/cemerick/friend was released fairly recently, so
y
It seems to be using cheshire under the covers, did you add an encoder
for your class? e.g:
(add-encoder java.awt.Color
(fn [c jsonGenerator]
(.writeString jsonGenerator (str c
On Thu, Oct 4, 2012 at 12:04 PM, arekanderu wrote:
> Hello,
>
> I am not sure if i am supposed to ask a
http://clojure.github.com/clojure/clojure.stacktrace-api.html
On Fri, Oct 5, 2012 at 12:06 PM, Matt wrote:
> Hi,
>
> Sorry to anyone who read the original post.
> Apparently I had malformed the try block encompassing the create-table in a
> very non-clojure-ish way.
> So my problem wasn't with cl
While on this topic, is it possible for someone with admin privileges
to disable the "Issues" tabs in the contrib projects? There is a
consistent drip of people sending pull requests or opening bugs which
have to be redirected to JIRA. All of the contrib projects now point
to JIRA in the README for
Can you not simply:
(jdbc/with-connection db2
(jdbc/with-query-results results
query
{:result-type :forward-only
:fetch-size 1000}
(jdbc/with-connection db1
;; read and write?
)))
?
On Tue, Oct 9, 2012 at 2:53 PM, Brian Craft wrote:
>
> On Tuesday, Oc
the old API will be
> rewritten in terms of the new one for compatibility).
>
> Sean
>
>
> On Tue, Oct 9, 2012 at 2:44 PM, gaz jones wrote:
>>
>> Can you not simply:
>>
>> (jdbc/with-connection db2
>> (jdbc/with-query-results results
>>
I have 3 blog posts I wrote to help some colleagues get up to speed
with clojure / emacs:
http://blog.gaz-jones.com/2012/02/01/setting_up_emacs_for_clojure_development.html
http://blog.gaz-jones.com/2012/02/02/clojure_development_cycle.html
http://blog.gaz-jones.com/2012/02/03/clojure_command_line
Alright, I'll convert the appropriate ones and send you a pull request
when I'm done. I'm happy to pick up writing a tools.cli tutorial too
when I get some spare time. Thanks for kickstarting the effort, it's
shaping up to be a great resource.
--
You received this message because you are subscrib
Hi,
expectations-mode is an Emacs mode for running tests written using the
expectations library: https://github.com/jaycfields/expectations. I
have just released expectations-mode 0.0.3 which now runs under nrepl
(no longer supports swank-clojure). It is in marmalade:
http://marmalade-repo.org/pac
Look in who-is-logged-in.core for errors
On Thu, Oct 25, 2012 at 1:36 PM, larry google groups
wrote:
> who-is-logged-in.core
--
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 post
As of Clojure 1.3 you need to mark things you with to re-bind
explicitly as dynamic:
(defn ^:dynamic twice [x]
...)
On Tue, Oct 30, 2012 at 7:42 PM, Satoru Logic wrote:
> Hi, all.
>
> I am reading Clojure in Action.
>
> In the "scope" section of Chapter3, there are examples like this:
>
> def
you could try using contracts to specify what keys are supposed to be
in the map, or just use pre/post conditions built in to clojure?
https://github.com/fogus/trammel
On Wed, Oct 31, 2012 at 1:01 PM, Jason Bennett wrote:
> Over the last month, I've been learning clojure for my new job, and taki
Looking at the source of clojure.data.zip, it looks like something like:
(xml-> x :a (seq-test [(tag= :b1) (tag= :b3)]) :c)
(untested) might work?
http://clojure.github.com/data.zip/
On Mon, Nov 5, 2012 at 10:38 AM, Stefan Kamphausen wrote:
> Hi,
>
> AFAIK the currently supposed way of parsin
you're right, my bad. should have read it more carefully :)
On Mon, Nov 5, 2012 at 2:32 PM, Stefan Kamphausen wrote:
> Hi,
>
> if I am doing this right, then your supposed approach does not work. From
> looking at the code of seq-test (to which the alternative form using just a
> vector in xml->
the oracle jdbc adapter returns a whole host of strange datatypes. for
instance, it returns bigdecimals for numbers you have mapped to be
numbers (with a precision, without a scale) in the table. it also
returns its own custom time classes. these generally have a toJdbc()
method to convert them to
do you know about the re-groups function, or are you just doing this
for an exercise?
On Fri, Aug 26, 2011 at 6:57 PM, Michael Jaaka
wrote:
> Hi!
>
> I have got
>
> (def *g)
> (def *g1)
> (def *g2)
> (def *g3)
> (def *g4)
> (def *g5)
> (def *g6)
>
> (defmacro grep[ pat in & body ]
> `(do (
M-{ and M-} in emacs go forward/backwards a paragraph. when in code,
this often translates well to moving around between
fragments/functions etc. you also have C-v and M-v for
forward/backward a page and then C-l for centering on the current
line. i use all of those a lot...
On Thu, Sep 15, 2011 a
some kind soul gave me this on the mailing list a while ago, works for me:
;; fix the PATH variable
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-fr
thanks for sharing, this looks extremely useful.
On Mon, Oct 31, 2011 at 11:43 AM, dennis wrote:
> Clojure-control is a clojure DSL for system admin and deployment with
> many remote machines via ssh/rsync.It is on github:
> https://github.com/killme2008/clojure-control
>
> 0.2.1 has been release
Hi,
I have made some changes to tools.cli to fix an annoying bug arround
boolean flags and the inability to collect 'trailing arguments'.
Whilst gathering opinions on these changes, a few other suggestions
were made such as removing all magic functions and System/exit calls.
The update is therefor
Hey dude, as I mentioned in the git link you pointed at there...
apologies for any confusion. The intent was always to make an
announcement WRT the breaking changes. I think you just caught me in
the middle of the "merging the changes into master and getting a
release cut" process. I am not making
Just to clarify.. no I'm not.
On Tue, Nov 1, 2011 at 2:52 PM, gaz jones wrote:
> Hey dude, as I mentioned in the git link you pointed at there...
> apologies for any confusion. The intent was always to make an
> announcement WRT the breaking changes. I think you just caught me in
&
Changes in 0.2.1 (should make it to maven central soon):
* :required option no longer supported, caused issues when trying to
provide your own --help and you have other parameters that are
"required".
You must now validate your own required parameters, eg:
(let [[options args banner] (cli [] ["-
could you not just use a map?
(def sources {:bbc "bbc.co.uk" :google "google.com" ...})
On Sat, Nov 5, 2011 at 6:14 AM, Mark Derricutt wrote:
> Would something like:
> (def ^:dynamic *SOURCES* (ref []))
> (defrecord Source [name url])
> (defmacro defsource [name url]
> `(dosync (alter *SOURCE
off top of my head i would probably do something like:
1. (-> some-var
(assoc :foo "bar")
other-operation
and-another)
(see threading macros)
2. (update-in some-map [:entry] #(or % (get-new-value)))
in particular, im not sure if there is a more idiomatic way
On Mon,
what about just re-defing the function inside the tests to the
instrumented version?
something like:
(ns one.http)
(defn get [] ...)
(ns one.http-instrumented)
(defn get [] ...)
(ns one.test.blah)
(with-redefs [one.http/get one.http-instrumented/get]
...)
guess you could put the redefs into
Hey Bill, I would have thought you would have to have a pretty good
reason for not using an executor for this?
(let [executor (Executors/newSingleThreadScheduledExecutor)]
(.scheduleAtFixedRate executor your-func 0 3 TimeUnit/SECONDS))
On Thu, Dec 1, 2011 at 11:17 AM, Bill Caputo wrote:
> Hi A
are you sure you're not just seeing the result of the function call in
the repl? for example this:
(ns filter.core
(:require [clojure.string :as string])
(:gen-class))
(defn -main
[& args]
(loop []
(when-let [line (read-line)]
(println (string/upper-case line))
(recur
> Yes - I do get the result of the print function in the repl (i.e. nil), and
> I'm trying to see how I can somehow prevent that nil from printing to stdout.
Yeah, the point I was making is that you are always going to see that
'nil' printed at the repl because it always evaluates and prints the
I believe this might be what close to what you are looking for:
https://github.com/technomancy/slamhound
On Sun, Jan 1, 2012 at 1:03 PM, Daniel Glauser wrote:
> Hello folks,
>
> Does anyone know a way with Emacs/Leiningen/Slime/Swank to ask the
> system to optimize the imports? I'm looking for
i had a similar problem recently. the only way i could find around it
was to create a class that extends the class with the problematic
method in question and create a new method that delegates to the
method you actually want to call. i would love to hear a better
solution...
On Fri, Oct 15, 2010
you could do something like:
(map str ["hello1" "hello2" "hello3"] (repeat "world"))
there is also a time macro:
(time (println "oh hi"))
On Fri, Oct 22, 2010 at 5:48 AM, Marc von Bihl wrote:
> Hello, I am new to fucntional programming and have 2 questions:
>
> How can I apply a function to e
you could use format or cl-format?
http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/format
http://clojure.github.com/clojure-contrib/pprint-api.html#clojure.contrib.pprint/cl-format
On Sat, Nov 20, 2010 at 5:00 PM, HiHeelHottie wrote:
>
> I think ruby has nice string interpo
oh hi,
i needed (well, wanted) a command line parser more like opt parser in
ruby so i threw one together:
https://github.com/gar3thjon3s/clargon
thought i would share in case anyone else finds it useful. im aware of
with-command-line but it didnt quite do what i wanted as i needed
functions tha
brew install emacs --cocoa
worked pretty well for me. and then my fork of emacs-starter-kit if
that is useful to anyone:
https://github.com/gar3thjon3s/emacs-starter-kit
my default-profile.el has a few settings for making the brew installed
emacs work better with os x.
by the way thanks for the
1 - 100 of 123 matches
Mail list logo