Why do the languages running on the CLR (ironRuby, ironPython, ironScheme,
ScalaCLR) do not get to live long enough in the sunshine, whereas same
languages get embraced by the Java runtime, and live in the limelight?
Chas did a survey in 2012, which gave very negative results for clojureCLR,
w
On Wednesday, June 5, 2013 10:34:35 AM UTC-4, Laurent PETIT wrote:
>
> tl;dr: when should I prefer LGPL over EPL for a Clojure lib ?
>
Have a look at the brief summary at
http://docs.python-guide.org/en/latest/writing/license.html . If you care
more about item #2 on that 2-item list, then you
edn-java [1] is a parser and printer for edn [2].
This release fixes issue31 [3] "single quote in a string is incorrectly
escaped".
It is available on Maven Central [4].
// Ben
[1] http://edn-java.bpsm.us
[2] https://github.com/edn-format/edn
[3] https://github.com/bpsm/edn-java/issues/31
[4]
h
My setup is usually:
- Eclipse with Counterclockwise plugin
- Keep an open, running REPL at all times
- Reload namespaces when necessary (Ctrl+Alt+L)
- Run tests with clojure.test from the REPL
This avoids the startup overhead most of the time - I usually only use the
Maven / leiningen comma
On Jun 4, 2013, at 11:16 PM, Kevin Downey wrote:
> midje makes each test a top level form, so test runs happen as a side effect
> of code loading, which means you cannot really run tests in a good way from
> the repl without doing some kind of ridiculous forced code reloading. I would
> defin
On Jun 4, 2013, at 11:16 PM, Kevin Downey wrote:
> midje makes each test a top level form, so test runs happen as a side effect
> of code loading, which means you cannot really run tests in a good way from
> the repl without doing some kind of ridiculous forced code reloading. I would
> defin
On Jun 4, 2013, at 3:51 PM, David Pollak wrote:
> * Is there a faster cycle than to change code, change tests and type "lein
> test" to see the results?
I use Midje in a repl. That looks like this:
% lein repl
(use 'midje.repl)
(autotest)
When I save a source or test file, the relevant
On Jun 5, 2:54 pm, Mark Engelberg wrote:
> So. is this a new change that puts it into the "provided" subdirectory of
> target? If so, what's the easiest way to get "lein push" working again?
Yeah, you can set :target-path in project.clj to just "target" to get
the old behaviour.
AFAIK `lein pus
Legal but comparable to a hidden side effect with all the pitfalls that can
derive
from this.
It's not a compiler issue, more a discipline issue.
Having a helper macro like Stuart suggest is acceptable to me
if it's called at top level, it's always done. There's less ambiguity.
Using def/defn i
On Wed, Jun 5, 2013 at 7:35 PM, Colin Fleming
wrote:
> Given this, are there any forms that are genuinely top-level from the
> compiler's point of view?
It's never explicitly enforced, just a consequence of how the compiler
creates and loads Java classes. Generally, the things which compile
dir
*`defprotocol` is a top-level form...*
This is interesting, and it's something I've wondered about. As far as I
can tell, there's really no distinction between top-level forms and other
forms, for example this is legal and works:
(defn define-my-functions []
(defn test-1 []
1)
(defn test-
Interesting, I think I like this presentation better, I found the explicit
boxes in the OP a little distracting. I guess this then becomes more like
Python-style significant indentation, which might be an interesting
approach too.
On 5 June 2013 12:15, Matthew Chadwick wrote:
> hehe looks simil
Right, FWIW in my previous company we disallowed LGPL libraries because of
the clause that explicitly allows reverse engineering to substitute
different versions of the library. Of course, it's unlikely that anyone
would ever do this but it would be a support nightmare if they did, so it
was just e
This thread came up right around the time I was considering adding a
dependency on rhizome to instaparse to make it easy to visualize the parse
trees. Based on the discussion here, I decided it would be a bad idea to
include rhizome directly in instaparse's dependencies. Nevertheless, it
made sen
Ahh, so if the var refers to the root that would explain why specifying the
root never returns anything. Thanks.
On Wednesday, June 5, 2013 11:54:49 AM UTC-4, Stefan Kamphausen wrote:
>
> AFAIK your var myxml already refers to the root node of your XML
> document.
>
> So your first example sea
Hi Vincent,
`defprotocol` is a top-level form, not really meant to be mixed with
value-returning expressions like `fn`. Protocols are always global because
of how they compile into Java interfaces.
Here's one way to make it work, by defining a symbol instead of returning a
function:
(defmacro
I've been using the lein clojars plugin to deploy to clojars with the "lein
push" command. It's been working great for me, but today, it's not
working. I recently upgraded to the newest version of leiningen, and
that's the only major change I can think of since my last deployment, so
I'm speculat
On Jun 4, 2013, at 4:13 PM, Andrea Chiavazza wrote:
> Alpacas is an application that displays Clojure source code with forms shown
> as nested boxes, doing away with parenthesis altogether.
FWIW somewhat related ideas go back a couple of decades. Some pointers can be
found at http://www.cs.umd
"Jim - FooBar();" writes:
> Now, the first time I (load-file "xxx.core.clj") everything is
> perfectly fine. The minute I make a change and re-load I get:
>
> NoClassDefFoundError Could not initialize class yyy.Foo
This confuses me, because the JVM should only be loading and
initializing the Jav
Nice summary on the blog. Might I suggest one small improvement? How
about:
(do (use 'plugh.file-test :reload-all) (run-tests) )
Then, just a single sequence. :)
Alan Thompson
P.S. I'm still working on getting GVIM+fireplace set up, which should
allow me to do everything from within the ed
The other alternative is to extend the class loader to add a trap.
I do not have the code handy but you might find it using a search on google.
Luc
> One problem with doing this in a static initializer is that you lose the
> relevant exception. I would try moving this to a constructor or lazy-
On 05/06/13 18:40, Gary Trakhman wrote:
One problem with doing this in a static initializer is that you lose
the relevant exception. I would try moving this to a constructor or
lazy-load it, and you might get a better error message.
doing what you suggested seems to alleviate the problem! I'm
One problem with doing this in a static initializer is that you lose the
relevant exception. I would try moving this to a constructor or lazy-load
it, and you might get a better error message.
On Wed, Jun 5, 2013 at 1:28 PM, Jim - FooBar(); wrote:
> Hello everyone,
>
> weirdness strikes again!
Hello everyone,
weirdness strikes again!
I've got the following situation:
- a namespace core.clj which imports a java class, let's call it Foo.java
- Foo.java requires core.clj in the usual way :
private static IFn requireFn = RT.var("clojure.core",
"require").fn();
static { req
AFAIK your var myxml already refers to the root node of your XML document.
So your first example searches for a tag called "level1" inside the root
tag (which is "level1"). Obviously, there is no such node and the text is
empty.
Your second example extracts a textual representation of the ch
Personally, I think there is too much guesswork involved in understanding
what the LGPL means re Java.
For example, from http://jtds.sourceforge.net/license.html, a Java library:
Using jTDS is considered to be dynamic linking; hence our interpretation of
> the LGPL is that the use of the unmodifi
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
My 2 cents:
it´s ture that the Emacs features are not discoverable and that the
learning curve is mean.
But it also true that once you´ve done it, it brings you a great value.
My suggestions about Emacs:
1) Start with the footage by Peepcode. It´ll save you tons of time,
especially if you´re no
On 6/4/13 10:16 PM, Kevin Downey wrote:
midje makes each test a top level form, so test runs happen as a side
effect of code loading, which means you cannot really run tests in a
good way from the repl without doing some kind of ridiculous forced
code reloading. I would definitely recommend sta
Hi, I've read http://nakkaya.com/2009/12/07/zipping-xml-with-clojure/ and
http://stackoverflow.com/questions/1194044/clojure-xml-parsing/9595315#comment24442712_9595315
,
but the usage of (xml->) is still mysterious to me.
If I have this for my xml file...
(def myxml (zip-str "
Hello,
2013/6/5 John Gabriele :
> On Tuesday, June 4, 2013 4:24:49 PM UTC-4, Gary Trakhman wrote:
>>
>> Just fyi, most clojure libs are published under EPL or Apache licenses, of
>> course the choice is up to you :-). GPL has some restrictions that would
>> prevent the lib from being used in many
On Tuesday, June 4, 2013 4:24:49 PM UTC-4, Gary Trakhman wrote:
>
> Just fyi, most clojure libs are published under EPL or Apache licenses, of
> course the choice is up to you :-). GPL has some restrictions that would
> prevent the lib from being used in many projects.
>
> from the EPL wikipedia
I’m trying to write a macro that defines a protocol and a function that,
when called, returns an implementation of that protocol.
I’ve reduced the code to the following example:
(defmacro create-protocol [protocol implementation]
(let [[protocol-name signature] protocol]
`(do
(defpro
I think this approach , no matter how decoupled it may be, HotSpot will
have a hard time (if not impossible) inlining these fn-calls.
The protocol approach you described will give you the best performance,
especially if you type-hint your reify block.
That said, for plugin type situations I prefe
A map seems enough, unless there is a need for naming the set of functions,
in which case the protocol could serve this purpose. But would that be the
best way?
I'm also curious to know what solutions the community has come up with
about this. In the case of dynamic discovery of available plugin
What's wrong with midje's (autotest) in the REPL? I save code or test and
the tests relevant to the namespace are automatically run.
On Wednesday, 5 June 2013 05:16:39 UTC+1, red...@gmail.com wrote:
>
> midje makes each test a top level form, so test runs happen as a side
> effect of code loadin
It was recently discussed at
https://groups.google.com/group/clojure/browse_thread/thread/f1a3bb6563fecf1c?hl=en
See also
http://blog.goodstuff.im/clojure_workflow
Angel "Java" Lopez
@ajlopez
On Wed, Jun 5, 2013 at 8:21 AM, Julian wrote:
> Stuart Sierra has written a fantastic article on hi
Stuart Sierra has written a fantastic article on his particular pattern for
writing and testing Clojure code:
http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-reloaded
There is some commentary on Hacker News about it here:
https://news.ycombinator.com/item?id=5819487
I'll include some
yes that seems to me, that this better expresses that I'm plugging in a
set of functions.
thanks
Am Mittwoch, 5. Juni 2013 12:55:16 UTC+2 schrieb Moritz Ulrich:
>
> If you want to keep this style, why not use a simple map of function
> instead of reifying a protocol? Something like:
>
> (defn
If you want to keep this style, why not use a simple map of function
instead of reifying a protocol? Something like:
(defn calc-multiply [data] ...)
(defn calc-add [data] ...)
(defn make-calc [] {:calc-add #'calc-add, :calc-multiply #'calc-multiply})
Looks simpler and cleaner for me.
On Wed, Jun
Hi,
I recently wrote some code for which I have 2 alternative implementations.
So what I did is write a protocol:
(defprotocol Calculator
(calc-add [this data])
(calc-multiply [this data]))
I then created two namespaces for my two implementations:
which each had a function:
(defn make-
Hi David,
It's odd/interesting that you're finding yourself restarting the JVM regularly.
For many years, I've developed Clojure with very rare restarts; especially if
my baseline project configuration is stable, I often have REPL sessions that
last days.
(Random thought: it'd be cute if vari
David Pollak writes:
Hi David,
> * Is there a faster cycle than to change code, change tests and type
> "lein test" to see the results?
Obviously, you can run the tests from the already running REPL. FWIW,
when I change something in using Emacs/nrepl.el/clojure-mode in a
namespace, I do
C-c
43 matches
Mail list logo