On Thu, Nov 21, 2013 at 4:08 AM, Zhemin Lin lin.zhe...@gmail.com wrote:
Hi.
I'm quite annoyed by the ugly smell of (first (vals (first ... )). Is there
any better way to do it?
user= (- {:key1 {:cf {:cq 0,1,2,3}}} vals first vals first vals first
(clojure.string/split #,))
[0 1 2 3]
I
On Thu, Nov 21, 2013 at 4:32 AM, Zhemin Lin lin.zhe...@gmail.com wrote:
Thanks, John Jernau.
What if :cf, :cq are not fixed, and I don't really care about the keys, but
only the value of the value of the value ...?
You might want to consider tree-seq to get at the innermost string:
(last
On Wed, Aug 7, 2013 at 11:53 AM, guns s...@sungpae.com wrote:
Hello,
I'd like to announce optparse-clj, a command line options parser that
supports GNU option parsing conventions:
https://github.com/guns/optparse-clj
[guns.cli/optparse 1.0.0]
The interface is modelled after
On Fri, Nov 22, 2013 at 8:30 PM, guns s...@sungpae.com wrote:
On Fri 22 Nov 2013 at 07:22:20PM -0500, John Szakmeister wrote:
This looks very nice. Have you considered something along the lines
of Python's argparse?
http://docs.python.org/dev/library/argparse.html
Thank you. I am
On Thu, Jan 23, 2014 at 9:17 PM, Cedric Greevey cgree...@gmail.com wrote:
[meta, but about something apparently triggered by the message, from this
thread, that I'm quoting]
Why did reading this post cause gmail to go bonkers? I saw this thread had
new articles since earlier today, brought it
On Wed, Mar 27, 2013 at 5:21 PM, Timothy Baldridge tbaldri...@gmail.com wrote:
What use-case do you have for such an implementation? Is there something
that Clojure on LLVM will give you that Clojure on the JVM or on V8 won't
allow you to do?
Clojure on C would likely allow me to use Clojure
On Thu, Mar 28, 2013 at 9:26 PM, Mikera mike.r.anderson...@gmail.com wrote:
On Friday, 29 March 2013 05:45:53 UTC+8, Laurent PETIT wrote:
2013/3/28 Marko Topolnik marko.t...@gmail.com:
Or you may have just a trivial requirement for a program that both
starts
and executes quickly.
To
On Fri, Mar 29, 2013 at 5:28 AM, Marko Topolnik
marko.topol...@gmail.com wrote:
I certainly don't see that. I've measured this more than a few times,
and it's several seconds for a simple Hello World Java application
on any machine that I can touch. Additionally, on an embedded system,
I'm
On Fri, Mar 29, 2013 at 5:49 AM, Mikera mike.r.anderson...@gmail.com wrote:
I decided to benchmark JVM startup again, in case of any doubt, and because
I see plenty of FUD on this issue.
Sorry, I don't mean to spread any FUD. I'm just being loose with the
phrase start-up time. You're right, I
On Mon, Oct 31, 2011 at 4:25 PM, Sean Corfield seancorfi...@gmail.com wrote:
On Mon, Oct 31, 2011 at 8:06 AM, Timothy Baldridge tbaldri...@gmail.com
wrote:
I'd like to second what Bill said...I don't really have the time to
setup a clojure build process to test out the 1.4 Alphas/Betas, but
On Wed, Nov 2, 2011 at 10:00 AM, Chas Emerick cemer...@snowtide.com wrote:
[snip]
Yes; this is called locking snapshots in the Maven world, and there are
commands there that can lock any snapshot dependencies to the current
snapshot.
If you are using Leiningen, there are no corollary
On Fri, Dec 10, 2010 at 3:30 PM, Tim Visher tim.vis...@gmail.com wrote:
Because posting the link would make some modicum of sense…
http://blog.twonegatives.com/post/2168030248/kata
^_^
Awesome Tim! Thanks for taking the time to put that together!
-John
--
You received this message
I was looking at a commit that updated a docstring for str/join, which
enticed me to take a look at the implementation. I was kind of
surprised to see that it wasn't:
(apply str (interpose sep coll))
I'm just curious about the developer was thinking. Here's a link to the code:
overhead?
-John
On Jan 5, 12:18 am, John Szakmeister j...@szakmeister.net wrote:
I was looking at a commit that updated a docstring for str/join, which
enticed me to take a look at the implementation. I was kind of
surprised to see that it wasn't:
(apply str (interpose sep coll))
I'm just
On Tue, Jan 4, 2011 at 8:22 PM, Stuart Halloway
stuart.hallo...@gmail.com wrote:
Several people had hands in that code, and the final result is all about
perf. Do not treat string.clj as a reference for idiomatic code. :-)
That's what I suspected. :-) Thanks Stuart!
-John
--
You received
On Tue, Jan 4, 2011 at 8:29 PM, MiltondSilva shadowtr...@gmail.com wrote:
Again from inspection it seems the way it's implemented in contrib,
the code makes one pass. With (apply str (interpose sep coll)) you
make two, one to interpose the other to convert (seq-str).
Well, interpose does
On Thu, Jan 20, 2011 at 3:34 AM, Stefan Rohlfing
stefan.rohlf...@gmail.com wrote:
Hi John,
Thank you very much for your correction of my code! my-merge-with is working
perfectly now.
There is just one thing: I always want to understand my errors so that I can
learn from them. However, I still
On Thu, Jan 20, 2011 at 5:38 AM, Baishampayan Ghose b.gh...@gmail.com wrote:
when we give an empty vector of seq-exprs to doseq it returns the value of
the last s-expression.. but returns nil when the
vector-of-seq-exprs is not empty.. may be this is the expected behaviour ..
but the
I've been working on a web app, and it was using leiningen-war. The
author of that suggest moving to the lein-ring plugin on his github
site... so, I did that. However, when I run lein ring server I get
a traceback, which I show below. Two lines stand out to me:
at
On Tue, Mar 8, 2011 at 4:04 PM, Michael Ossareh ossa...@gmail.com wrote:
[snip]
90% of the time I find that:
lein clean rm -rf lib lein deps
solves this type of issue.
Yeah... I've done that a few times. :-) I should say that I'm using
the 1.3.0-master-snapshot of Clojure. I did find that
On Wed, Mar 9, 2011 at 1:29 PM, John Szakmeister j...@szakmeister.net wrote:
On Tue, Mar 8, 2011 at 4:04 PM, Michael Ossareh ossa...@gmail.com wrote:
[snip]
90% of the time I find that:
lein clean rm -rf lib lein deps
solves this type of issue.
Yeah... I've done that a few times. :-) I
On Wed, Mar 9, 2011 at 3:29 AM, Saul Hazledine shaz...@gmail.com wrote:
On Mar 8, 8:31 pm, John Szakmeister j...@szakmeister.net wrote:
I've been working on a web app, and it was using leiningen-war. The
author of that suggest moving to the lein-ring plugin on his github
site... so, I did
On Wed, Jul 11, 2012 at 7:47 PM, Eric in San Diego eric.sc...@acm.org wrote:
It's very application specific, but it's Object 'test' does not have a
field named 'test1' c:/path/to/importTest, suggesting that it's not
inferring the value of an 'I' parameter which should indicate a directory
On Tue, Jul 24, 2012 at 6:05 PM, Trent Ogren m...@trentogren.com wrote:
https://github.com/weavejester/valip
The approach of that project is interesting. Not only does it decouple
validation from any notion of web form (it just works on maps like many of
the others in this thread), it
On Fri, Jul 27, 2012 at 12:02 PM, Kyle R. Burton kyle.bur...@gmail.com wrote:
I encountered a deadlock on one of our production systems (one out of
3) last night. Looking at a thread dump of the JVM, there are several
(over 200) threads that are all waiting on a
On Sat, Feb 11, 2012 at 10:15 PM, Sean Corfield seancorfi...@gmail.com wrote:
On Sat, Feb 11, 2012 at 6:30 PM, Michał Marczyk
michal.marc...@gmail.com wrote:
print-table expects a sequence of maps, e.g.
(print-table (:members (reflect Math)))
Wow! I had no idea how useful that could be...
It appears that when executing 'lein run' that it's examining
dependencies and/or contacting Maven repositories. This overhead is
adding a considerable amount of time to lein run. Firing things up
from the command line takes *significantly* less time (30s vs 4-5s).
Has anyone else seen this
On Fri, Feb 17, 2012 at 5:50 AM, John Szakmeister j...@szakmeister.net wrote:
It appears that when executing 'lein run' that it's examining
dependencies and/or contacting Maven repositories. This overhead is
adding a considerable amount of time to lein run. Firing things up
from the command
On Mon, Feb 27, 2012 at 3:14 PM, Chris Granger ibdk...@gmail.com wrote:
Hey folks,
In reference to the previous thread on Inventing On Principle, I
built a ClojureScript example of his live editable game :)
http://www.chris-granger.com/2012/02/26/connecting-to-your-creation/
Enjoy!
Nice!
On Sun, Apr 22, 2012 at 3:28 PM, Evan Mezeske emeze...@gmail.com wrote:
Version 0.9.3 does indeed support balanced map literals.
I believe that the bitbucket repository is the official home of slimv (from
which paredit.vim comes): https://bitbucket.org/kovisoft/slimv/ .
Just an FYI, but
On Fri, May 4, 2012 at 2:30 PM, Phil Hagelberg p...@hagelb.org wrote:
Hello folks.
I just posted an article yesterday on using cemerick's drawbridge
library for live-debugging a Ring application over HTTP:
https://devcenter.heroku.com/articles/debugging-clojure
You may find it
On Fri, May 18, 2012 at 8:46 AM, Alexsandro Soares
prof.asoa...@gmail.com wrote:
Hi,
I'm trying to build a compiler using Clojure. Is there any tools
like flex and bison generating Clojure code?
I'm interested in a lexer/parser in pure Clojure because I think
in use the same code
On Wed, May 23, 2012 at 7:58 PM, Cedric Greevey cgree...@gmail.com wrote:
(defn f [^java.awt.image.BufferedImage bi x]
(.setSample (.getRaster bi) 0 0 0 (double x)))
#CompilerException java.lang.IllegalArgumentException: More than one
matching method found: setSample,
On Thu, May 24, 2012 at 2:15 AM, Sean Corfield seancorfi...@gmail.com wrote:
First off, the code you posted can't actually be right: you have
(println n) but the for binding was for i.
Second, given your macro, try (range 100) instead of (range 10) and
see what you get...
Can you explain
On Thu, May 24, 2012 at 7:46 AM, Chris Perkins chrisperkin...@gmail.com wrote:
[snip]
Also, pmap is not broken; the problem with the code you pasted is simply an
errant closing paren. You had (do (doall (pmap ...) nil)), where you meant
(do (doall (pmap ...)) nil). Apparently doall has a
On Wed, Jun 13, 2012 at 5:47 AM, Chas Emerick c...@cemerick.com wrote:
On Jun 12, 2012, at 7:12 PM, Phil Hagelberg wrote:
On Mon, Jun 11, 2012 at 1:48 PM, Phil Hagelberg p...@hagelb.org wrote:
On Mon, Jun 11, 2012 at 9:36 AM, Phil Hagelberg p...@hagelb.org wrote:
These will be removed once
I'm not sure what the protocol is for this, but I'd like to attach a
patch to one of the issues in Assembla. Unfortunately, it won't let
me. Do I have to get added to the project in some way? Or should I
just hang out until Jira comes online?
BTW, I did send in my CA. Rich should hopefully
On Tue, Nov 2, 2010 at 4:49 PM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
Am 02.11.2010 um 12:58 schrieb Pepijn de Vos:
The one-liner:
http://gist.github.com/659491
I would expect this is because you pile lazy seq on lazy seq, which then get
realised, unfolding the whole thing resulting
On Wed, Nov 3, 2010 at 2:35 AM, Meikel Brandmeyer m...@kotka.de wrote:
Hi,
On 3 Nov., 00:40, Rasmus Svensson r...@lysator.liu.se wrote:
I think the problem is that this reduction will build an expression like
this:
(map + ... (map + ... (map + ... (map + ... one million nesting
On Sun, Oct 20, 2013 at 4:24 PM, Korny Sietsma ko...@sietsma.com wrote:
Note you can do the same thing in midje :
https://github.com/marick/Midje/wiki/Auto test - it works quite nicely.
Looks like a space made it in between Auto and test. The link should be:
On Fri, Nov 8, 2013 at 5:11 AM, ru soro...@oogis.ru wrote:
Hi Jim,
I forget to say that call to count have been done in not a bare repl, but
inside a quite complex program after it did a lot of work on a quite big
data. But, after long and profound analysis of source code I did not found
any
On Fri, Nov 8, 2013 at 8:51 AM, ru soro...@oogis.ru wrote:
Solution have found:
(remove ...) = (doall (remove ...))
Be careful with this technique. It can easily make your O(n)
algorithm O(n^2). It may be better to use data structures that you
can use with conj and disj if you need to
Sorry for pestering the list about this, but despite trying to follow
several different blog posts about this, I seem unable to get a
working ClojureScript REPL that connects to the browser. Ideally, I'd
like to start from a clean project using lein new om-start
project_name and get the right
On Tue, Aug 5, 2014 at 3:08 AM, Colin Fleming
colin.mailingl...@gmail.com wrote:
Hi John,
[snip]
Here's what Wilker Lúcio wrote:
This is how I got it done (and I'm using it on node-webkit project):
Add this plugin to your project (plugins, not dependencies):
[jarohen/simple-brepl 0.1.0]
I'm very much a fan of bailing out early in imperative
programming as it helps to avoid a bunch of nested if conditions
that are to follow and read. This typically comes up when
checking arguments to ensure that they're valid (in range, of
acceptable values, etc). One of the major stumbling
On Thu, May 26, 2016 at 10:55 AM, Gary Trakhman wrote:
> I think the idiomatic way to handle this in clojure is to do all your
> validation upfront on a single descriptive data structure, perhaps in a
> single function, then bail early. That has the added advantage of
On Thu, May 26, 2016 at 7:09 PM, Mark Engelberg
<mark.engelb...@gmail.com> wrote:
> On Thu, May 26, 2016 at 1:29 PM, John Szakmeister <j...@szakmeister.net>
> wrote:
>>
>>
>> Yeah, cond is definitely useful here, but not in general.
>>
>
> cond is us
On Thu, May 26, 2016 at 5:41 PM, Erik Assum wrote:
> Not being good at reading other peoples mind, I’ll give my guess as to what
> Timothy was trying to suggest:
>
> If you define your input as a map with keys such as:
>
> {:type :switched ; can be :switched :dual or :something
>
(sorry for the repeat Nathan, this was meant to go to the list too)
On Thu, May 26, 2016 at 1:43 PM, Nathan Davis
wrote:
> First off, I should say that you should first consider alternative
> approaches before considering the options below. For example, cond
On Thu, May 26, 2016 at 1:47 PM, Sean Corfield wrote:
[snip]
> A pattern that I’ve also started using is something like this:
>
> (defn guarded-process [data]
> (some-> data
> first-guard
> second-guard
> (another-guard :with “parameters”)
>
On Thu, May 26, 2016 at 2:12 PM, Timothy Baldridge wrote:
> I would suggest reviewing your data model a bit. One of the problems you
> are experiencing is that you are overloading the inputs to your function.
> And since they are overloaded you have to create a state
On Wed, Jul 13, 2016 at 7:20 AM, Cecil Westerhof wrote:
> After a long time I want to start with Clojure again. As I understand it, it
> is best to use:
> lein repl
>
> But then I work with 1.5.1. Is there a way to work default with the latest
> stable version of
On Wed, Jul 13, 2016 at 9:59 AM, Cecil Westerhof wrote:
[snip]
> I already tried that, but this gives:
> WARNING: You're currently running as root; probably by accident.
> Press control-C to abort or Enter to continue as root.
> Set LEIN_ROOT to disable this warning.
>
>
On Wed, Feb 1, 2017 at 5:35 PM, Mark Reed wrote:
> Trying to write a CLI that will prompt for a password, and it's failing
> because (System/console) always returns nil (whether in a compiled app or
> inside the REPL).
It works for me in a compiled app (it's non-nil), but
It looks like the v0.4.0 and v0.3.6 tags point to the same thing in
the gorilla-repl repo, so the v0.4.0 tag isn't picking up the new
commits.
-John
On Mon, Jan 30, 2017 at 1:58 PM, Jony Hudson wrote:
> Hi All,
>
> it's a pleasure to announce a new release of Gorilla
Fantastic! Thank you!
-John
On Tue, Oct 18, 2016 at 11:49 PM, David Nolen <dnolen.li...@gmail.com> wrote:
> This issue is fixed in master now thanks to Thomas Heller. The performance
> hit is negligible.
>
> Thank you for the report.
>
> David
>
> On Tue,
On Tue, Oct 18, 2016 at 2:59 AM, Thomas Heller wrote:
[snip]
> While this issue can be very confusing you will hardly ever run into it when
> following best practices. As David suggested using a custom js->clj here
> would prevent the issue and is probably the best course of
Yes, you could do that, but it could also do Bad Things. Namely if
you have strings that match some of the format, it could be
misinterpreted as Transit data rather than JSON, so I don't consider
it a particularly useful solution either. It just moves where the
problem can happen. :-( If there
On Tue, Oct 18, 2016 at 5:59 AM, Thomas Heller wrote:
> Don't think there is a best practice for your case in particular.
Okay. Earlier in the thread you said "while this issue can be very
confusing you will hardly ever run into it when following best
practices." So it
On Mon, Oct 31, 2016 at 5:57 PM, Alex Miller wrote:
> You can create instances that implement multiple Java interfaces using
> `reify` or by declaring them inline of a `defrecord` or a `deftype`. (See
> http://clojure.org/reference/datatypes for more.)
Thank you Alex. I
I'm looking at using Clojure in an application where we make
fine-grained use of interfaces that help describe the capabilities of
an object. We need to take several interfaces and bring them
together, not necessarily in an implementation, but to help define
what the overall interface for the
On Sat, Oct 15, 2016 at 2:49 PM, David Nolen wrote:
> This issue is somewhat to be expected if you're going to use `js->clj`. This
> issue has nothing to do with ClojureScript compiler versions - you just got
> lucky before. Google Closure will collapse properties, but
I've been using ClojureScript rather successfully for a year now, but
ran into an interesting issue recently.
I've discovered that js->clj isn't quite working as expected. After
quite a bit of tearing things down and apart, I discovered it was one
of the keys in some JSON data coming back from
63 matches
Mail list logo