See http://dev.clojure.org/jira/browse/MATCH-63 for details.
Paudi
On 15 October 2012 23:21, David Nolen dnolen.li...@gmail.com wrote:
On Mon, Oct 15, 2012 at 5:09 PM, Paudi Moriarty
pmoria...@annadaletech.com wrote:
It's broken since alpha10, alpha9 works fine.
Paudi
That's useful to
Dave,
Your first attempt looks OK to me.
(require '(clojure [zip :as z]))
(def zipper (z/vector-zip [:A [:B [:D :E]] [:C [:F :G]]]))
(defn pre-order [loc]
(when-not (z/end? loc)
(when-not (z/branch? loc)
(println (z/node loc)))
(recur (z/next loc
user= (pre-order zipper)
On 16/10/12 03:50, Michael Gardner wrote:
On Oct 15, 2012, at 7:45 PM, Andy Fingerhut wrote:
For the case of arithmetic on compile-time constants, I believe that many C,
Java, etc. compilers already perform the arithmetic at compile time.
Known as constant folding, yes.
so you're saying
Ok that were good examples thanks
Final variant
add to project.clj
[clj-http 0.5.6]
add ref to lib in ns
(ns myapp.app
*(:require [clj-http.client :as client] ))*
function
(defn write-file [url]
(with-open [w (clojure.java.io/output-stream img.jpg )] ; output file
(.write w (:body
Great work guys!
This is a great gift to the community.
On Mon, Oct 15, 2012 at 7:01 PM, Wes Freeman freeman@gmail.com wrote:
I've been watching the repo. Thanks for all the effort on this, guys.
Wes
On Mon, Oct 15, 2012 at 12:07 PM, Michael Klishin
michael.s.klis...@gmail.com wrote:
Jim - FooBar(); jimpil1...@gmail.com writes:
You add the numbers at compile time, and then time how long it takes
to...do nothing to them, at runtime. You are comparing N to zero, not
to some smaller factor of N.
yes but this seems almost unbelievable...i mean for simple numeric
operations
On 16/10/12 11:49, Tassilo Horn wrote:
One example that does things like constant-folding like macrology is the
unit conversion macro in Let Over Lambda that compiles to constants if
both value and unit are given literally (recursively).
unit conversion! this is exactly what i had in mind!!!
Jim foo.bar jimpil1...@gmail.com writes:
Hi Jim,
One example that does things like constant-folding like macrology is
the unit conversion macro in Let Over Lambda that compiles to
constants if both value and unit are given literally (recursively).
unit conversion! this is exactly what i had
2012/10/16 David Nolen dnolen.li...@gmail.com
Yep I think there are quite a few things like this. But I don't think we
need an optimization pass for this paticular case (and I'm not saying
that's not a good idea - see below). Hopefully we can a direct patch for
this issue around top level
On Oct 16, 2012, at 5:16 AM, Jim foo.bar wrote:
so you're saying that if I write a for-loop in Java that populates an array
with constants from 1-1 and then a 2nd loop to add them up, it would
happen at compile-time and i would get the same timing-result?
Maybe, maybe not. Compilers are
another way to solve this, from
http://users.utu.fi/machra/posts/2011-08-24-2-reddit-clojure.html
(ns myapp.app
(:require [clojure.java.io :as io]))
(defn copy [uri file]
(with-open [in (io/input-stream uri)
out (io/output-stream file)]
(io/copy in
On Tue, Oct 16, 2012 at 7:19 AM, Herwig Hochleitner
hhochleit...@gmail.comwrote:
Certainly, such a simple optimization (omitting var reads in a statement
context) could live in the emitter.
The next stumbling block to a smaller clojurescript, however, is the
global-hierarchy var, which
On 16/10/12 13:20, Michael Gardner wrote:
On Oct 16, 2012, at 5:16 AM, Jim foo.bar wrote:
so you're saying that if I write a for-loop in Java that populates an array
with constants from 1-1 and then a 2nd loop to add them up, it would happen
at compile-time and i would get the same
On 16/10/12 13:25, Zhitong He wrote:
another way to solve this, from
http://users.utu.fi/machra/posts/2011-08-24-2-reddit-clojure.html
(ns myapp.app
(:require [clojure.java.io :as io]))
(defn copy [uri file]
(with-open [in (io/input-stream uri)
out
- is it appropriate to include data_readers.clj in a library - given that
file is in the root?
No. data_readers.clj is intended for application developers. Libraries may
define data reader functions and suggest tags for consumers of that library.
-S
--
You received this message because you
#FileNotFoundException java.io.FileNotFoundException: Could not locate
clojure/tools/namespace__init.class or *clojure/tools/namespace.clj* on
classpath:
Now, somewhere in the code, something is looking for
clojure.tools.namespace.clj. But that's just a directory in the
I noticed that the PDF downloads seems a bit off. At least in my case, the
standard
PDFhttps://github.com/jafingerhut/clojure-cheatsheets/blob/master/pdf/cheatsheet-usletter-color.pdf?raw=trueleaves
alot of whitespace.
--
You received this message because you are subscribed to the Google
On Tuesday, October 16, 2012 9:07:49 AM UTC-4, Stuart Sierra wrote:
- is it appropriate to include data_readers.clj in a library - given that
file is in the root?
No. data_readers.clj is intended for application developers. Libraries may
define data reader functions and suggest tags for
Yes, the PDF versions of the cheat sheet used to fit into 2 A4 or US letter
sized pages quite nicely, before I started adding more things to it.
Now I'm sure they can fit into 3 such pages quite nicely, but to fit into 2
would require reducing the font size. Since it no longer fit into 2, I
I tracked down the problem. Funny thing is that tools.namespace is failing
when trying to reload the ring component inside of noir. Looking at *
nrepl-ritz.el* (0.5.0), which uses *nrepl.el* (0.1.4), there are a few
references to namespace. But I don't think that has anything to do with
Finally came around to install a recent Ruby build and ran a little test
script just to get a feel for the startup time. Looks good, though the
faster the merrier.
~ $ ruby --version
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin10.8.0]
~/dev/tools/rouge $ cat test.clj
(defn square
Minderbinder is a Clojure library for defining unit conversions available
at read, compile and run time.
More information is available on the [Minderbinder source
repo](https://github.com/fogus/minderbinder).
Use
Include the following in your
One data_readers.clj file can't override another: it's an error if they
contain the same tags with different functions. So if a library defines its
data reader tags, you can't override them *at read-time* in your app.
You can always override readers dynamically at run-time by binding
2012/10/16 David Nolen dnolen.li...@gmail.com
I'm aware of this one as well. But again I think we can and should do a
quick fix in the compiler for this. Either the user used multimethods or
they did not.
I don't see how such a quick fix could be done, without the compiler
gaining a concept
On Tue, Oct 16, 2012 at 12:27 PM, Herwig Hochleitner hhochleit...@gmail.com
wrote:
2012/10/16 David Nolen dnolen.li...@gmail.com
I'm aware of this one as well. But again I think we can and should do a
quick fix in the compiler for this. Either the user used multimethods or
they did not.
On Fri, Oct 12, 2012 at 4:40 AM, Arlen Christian Mart Cuss a...@len.me wrote:
I'd like to announce Rouge, which is an implementation of Clojure on Ruby.
Interesting project.
What are you planning on doing about the fact that Ruby has mutable
strings? Seems like that would be a deal-breaker for
2012/10/16 David Nolen dnolen.li...@gmail.com
ClojureScript programmers benefit from the assumption of whole program
optimization for production code. Also remember we have analyze-file.
They most certainly do, but in my mind this assumption is only made in the
google closure compiler, right
None of the invocation optimizations make any sense for anything other that
advanced optimization. They hard code static assumptions that might get
invalidated in any compilation unit other than whole program.
We don't need to look at the whole program at once. Think about why we need
declare and
Hi everyone,
I'm pretty sure i'm using trampoline the right way but still I get this
exception:
ClassCastException Clondie24.lib.search$search$minimize__3075$fn__3076
cannot be cast to java.lang.Number
Clondie24.lib.search/search/minimize--3075 (search.clj:47)
here is the code:
(defn
you are declaring the functions return doubles, but in fact returning
functions or doubles
On Tue, Oct 16, 2012 at 11:06 AM, Jim - FooBar(); jimpil1...@gmail.com wrote:
Hi everyone,
I'm pretty sure i'm using trampoline the right way but still I get this
exception:
ClassCastException
On 16/10/12 19:15, Kevin Downey wrote:
you are declaring the functions return doubles, but in fact returning
functions or doubles
yes you're right (my bad) but the same thing happens without the
type-hinting - albeit in a different place and different originating
function:
ClassCastException
Hi Phil,
On Wednesday, 17 October 2012 at 4:11 AM, Phil Hagelberg wrote:
Interesting project.
Thanks!
What are you planning on doing about the fact that Ruby has mutable
strings? Seems like that would be a deal-breaker for implementing
Clojure's equality semantics.
2012/10/16 David Nolen dnolen.li...@gmail.com
None of the invocation optimizations make any sense for anything other
that advanced optimization.
But the invokations in javascript output work even when not using google
closure at all, e.g. the REPL.
They hard code static assumptions that
On Tue, Oct 16, 2012 at 2:41 PM, Herwig Hochleitner
hhochleit...@gmail.comwrote:
2012/10/16 David Nolen dnolen.li...@gmail.com
None of the invocation optimizations make any sense for anything other
that advanced optimization.
But the invokations in javascript output work even when not
if you look further down the stacktrace (where it refers to your code
instead of clojure.lang.Numbers.lt) it will give you line numbers in
your code to look at.
you are calling these trampolined functions without trampoline.
On Tue, Oct 16, 2012 at 11:24 AM, Jim - FooBar(); jimpil1...@gmail.com
'ring-devel' depends on 'ns-tracker', which uses tools.namespace 0.1.3:
https://github.com/weavejester/ns-tracker/blob/master/project.clj
Dependency resolution will only allow one version of the library, so your
project gets tools.namespace 0.2.0, not 0.1.3. The two releases are not
compatible,
'my-min' and 'my-max' simply wrap core/min core/max. You mean i have to
trampoline these calls as well? return something like this? :
#(r/reduce (trampoline my-max) ;;was my-max
(r/map (fn [child] (minimize (:tree
child) (dec d))) (:children tree)))
Jim
We released Immutant 0.5.0 today, with a few bugfixes and some new features.
Some notable changes:
* You can now easily run your tests inside the Immutant container via `lein
immutant test`
* We expose the Quartz job schedulers for each app, allowing you to use
Quartzite instead of the
Timothy Washington twash...@gmail.com writes:
2) Running emacs with nrepl.el. I fire up *M-x nrepl-ritz-jack-in*
ritz-repl-utils includes a namespace dependency graph in
ritz.repl-utils.namespaces. It doesn't yet include a refresh type
function, but that would be straightforward to add on top
Zombie is a Clojure framework for semantic transformations of map-based
data.
It's often useful in testing to abstractly state how two pieces of data are
different, rather
than explicitly conjure up concrete values. I hope this helps to capture
the essence of tests
better, especially for tests
After watching this presentation[1] by Brian Goetz, in which he
discusses the fork-join framework and how it is intended to be used I
was left with a major question. Around the end of the talk he said and I
quote
...fork-join can be used for game-tree exploration...
while the slides actually
It looks great, well done...
waiting for the 1.0...
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
Reducers don't enter into the picture at all: this code is just as
broken with clojure.core/reduce and clojure.core/map. The immediate
problem that Kevin is trying to draw your attention to is that you are
calling (reduce max (map my-fn coll)), where my-fn sometimes returns a
number, and sometimes
You will get better results from a game-programming forum, or indeed
from a google search for parallel alpha beta than from a bunch of
clojure guys with no particular experience in your problem domain.
On Oct 16, 1:27 pm, Jim - FooBar(); jimpil1...@gmail.com wrote:
After watching this
On 16/10/12 21:48, Alan Malloy wrote:
You will get better results from a game-programming forum, or indeed
from a google search for parallel alpha beta than from a bunch of
clojure guys with no particular experience in your problem domain.
The question is more around JDK7 and reducers. Google
scenario. The minute forking occurs however you lose coordination
capabilities (at least this is my understanding). He said it very casually
in the video that is why this has been bugging me so much...
Fork/Join is just threads, so I'm not sure why you'd lose coordination
capabilities. You
So the time had come to make a library version of my Tetris-project.
[libtetris 0.1.0]
github: https://github.com/bonega/libtetrishttps://github.com/bonega/libtetris
There is even some
documentationhttp://bonega.github.com/libtetris/index.htmlthanks to
Marginalia.
I have ported my
I have a problem where I am trying to do an isa? or instance? check on an
object of a record type which is defined in an AOT-compiled namespace. The
isa? check fails because -- under circumstances which I do not yet well
understand -- the object I actually have is an instance of its class in a
2012/10/16 David Nolen dnolen.li...@gmail.com
But the invokations in javascript output work even when not using google
closure at all, e.g. the REPL.
Yes because we don't try to optimize them.
And suppose one tried to optimize them: With an established concept of
compilation units, it's
On Tue, Oct 16, 2012 at 5:38 PM, Herwig Hochleitner
hhochleit...@gmail.comwrote:
The emitter still can not look ahead in its single pass, but thinking
about it, it seems to me your proposal could be implemented by lazily
initializing global-hierachy in derive.
Sounds good!
Please also
I haven't but will be needing to do so in the next month or two. I'd be
interested to hear if you made any progress and possibly in collaborating.
Jon
On Monday, October 8, 2012 11:04:10 AM UTC-3, Simon Holgate wrote:
Hi,
Is anyone doing split (A/B) testing in Clojure? What are you using?
Has anyone generated PNGs (or any image) from Hiccup in Clojure? I
see an older Java library for this:
http://code.google.com/p/java-html2image/
Curious to hear about any experience with this library, or if there is
a better solution out there.
Thanks,
Nick.
--
You received this message
I would probably look at the work that Robert Hyatt has done around
parallel search in Crafty. He's published his findings far and wide and may
still be active online. He's a wealth of information and fairly nice guy.
--
-- http://blog.fogus.me
-- http://github.com/fogus
--
--
You received
Hi,
I'm trying to create a class, instances of which need to access protected
fields of the superclass's superclass. But, I am failing so far. Is this a
bug or am I doing something wrong:
java:
package com.example;
public class Example {
protected static String PROTECTED_FIELD = this is
Hello - I was familar with lisp years ago and am very new to clojure.
I am having a hard time understanding how to find 'car' and 'cdr'.
The nice thing about these functions is they always seem to be a part of
lisp.
I would like to use the little lisper to teach lisp to my co-workers so
that
`car` is called `first` here and `cdr` could mean either `rest` or
`next` depending on what you mean/need.
And oh, `cons` is not exactly the same one from Common Lisp, etc.
Regards,
BG
On Tue, Oct 16, 2012 at 3:40 PM, Curtis cur...@ram9.cc wrote:
Hello - I was familar with lisp years ago and
Curtis:
You can do this if you want:
(def car first)
(def cdr rest)
but most people accustomed to Clojure would be much more familiar with first
and rest. The Content of the Address and Data Registers haven't been
applicable for a long time, but it wasn't only the names that are changed --
A number of classic lisp books have been translated to clojure, for instance
http://juliangamble.com/blog/2012/07/20/the-little-schemer-in-clojure/
Personally I felt relieved when I saw that clojure had abandoned the
anachronistic car/cdr stuff; the sequence abstraction is a lot nicer.
There
2012/10/16 Toby Crawley t...@tcrawley.org
* We expose the Quartz job schedulers for each app, allowing you to use
Quartzite instead of the Immutant job api,
while still taking advantage of singleton jobs within a cluster
Nice, thank you!
--
MK
http://github.com/michaelklishin
I understand that you can call js-methods and get properties thru:
(.a-method some-js-object param)
and
(.-a-prop some-js-object)
respectively, but how do you invoke either when you have the method/property as
a string?
The following doesn't seem to work:
(let [m a-method
have you cleaned out the classes/ directory recently? AOT'ing,
deftypes/defrecords, and lein when combined can exhibit issues with
stale generate classes for deftypes/defrecords. I would also try
adding (:gen-class) to your ns form. AOT compilation is effectively a
nop for the namespace without
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone who contributes to making Clojure, and its community, great.
Rich
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Happy Birthday Clojure.
And thanks Rich!
On 16 October 2012 18:54, Rich Hickey richhic...@gmail.com wrote:
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone who contributes to making Clojure, and its community,
great.
Rich
--
You received this
That's huge! Time flies. Happy Birthday Clojure and thank you very
much Rich for creating Clojure and fostering this amazing community.
Regards,
BG
On Tue, Oct 16, 2012 at 6:54 PM, Rich Hickey richhic...@gmail.com wrote:
I released Clojure 5 years ago today. It's been a terrific ride so far.
Whoo hoo!! Party!!!
Thanks to everyone, especially Rich, for creating and contributing to Clojure.
:)
---
Joseph Smith
j...@uwcreations.com
@solussd
On Oct 16, 2012, at 8:54 PM, Rich Hickey richhic...@gmail.com wrote:
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone. This community is transforming software engineering in
a great way.
On Tuesday, October 16, 2012 10:01:29 PM UTC-4, solussd wrote:
Whoo hoo!! Party!!!
Thanks to everyone, especially Rich, for creating and contributing to
Clojure. :)
---
Joseph Smith
Thank you for clojure.
Using clojure has exposed me to new ideas and made be a better programmer.
I consider myself lucky to be able to use it every day at work.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to
Congratulations Rich,
http://3.bp.blogspot.com/_F0yEiHzEaRc/S1NUOQ1kNeI/C14/cAUqKY8nISk/s1600-h/HappyBdayFiveCandles.jpg
You can try to blow the candles :)
Happy birthday !
Luc
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone who
Congrats!
On Tuesday, October 16, 2012, Rich Hickey wrote:
I released Clojure 5 years ago today. It's been a terrific ride so far.
Thanks to everyone who contributes to making Clojure, and its community,
great.
Rich
--
You received this message because you are subscribed to the Google
On Oct 16, 2012, at 1:19 PM, Arlen Cuss wrote:
My initial solution is to freeze all strings in the reader. This prevents
the most obvious issues, as it means any string read in from the Rouge code
itself is immutable.
A problem with `freeze` in Ruby is that it both prevents changing the
I think the easiest solution is to use aget and aset. There may be a
better way, but if so I'm not aware of it.
http://stackoverflow.com/questions/9861485/clojurescript-interop
On Tuesday, October 16, 2012 6:21:45 PM UTC-7, FrankS wrote:
I understand that you can call js-methods and get
Thanks - that works - that was too easy ;-)
I looked at the docstring before of aget because I remembered vaguely that that
was how it used to work before .- :
cljs.core/aget - Function
([array i] [array i idxs])
Returns the value at the index.
Dismissed it for object-access after
Hmm after reading that docstring, /me hopes he didn't just recommend
something for its not-intended purpose :)
On Tuesday, October 16, 2012 8:29:47 PM UTC-7, FrankS wrote:
Thanks - that works - that was too easy ;-)
I looked at the docstring before of aget because I remembered vaguely
Looking at the source of cljs.core/js-clj,
I see that aget is also used to access the object properties by name-string…
So please tell /me not to worry ;-)
-FS.
On Oct 16, 2012, at 8:30 PM, Evan Mezeske emeze...@gmail.com wrote:
Hmm after reading that docstring, /me hopes he didn't just
Congrats!
The output coming out of Rich and Clojure/core lately is coming at an
unbelievable pace. Keep up the good work :)
On Tue, Oct 16, 2012 at 11:15 PM, David Nolen dnolen.li...@gmail.com wrote:
Congrats!
On Tuesday, October 16, 2012, Rich Hickey wrote:
I released Clojure 5 years ago
I have a zipper and here's the code I'm trying to execute:
1) search through all nodes until a match for a predicate is found
2) starting at that node go up to its parent then mark all children of the
parent with extra info
3) the parent has the option to go to it's parent and perform step 2 as
On Wednesday, 17 October 2012 at 4:11 AM, Phil Hagelberg wrote:
http://home.pipeline.com/~hbaker1/ObjectIdentity.html
Thanks for the link, too—I'm working through it with interest.
As for mutability in Rouge, I had another thought—freezing (or possibly duping
then freezing) Ruby String objects
Other than the PDF being colorful, no. :)
It does make a beautiful setting on my wall next to my computer, though.
-Nick
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to this group, send email to clojure@googlegroups.com
Note that posts
That's *a lot* of hard work. I am amazed of how much work goes into making
such great software with the studying and the many years spent training
yourself(generally speaking, not just Rich, but certainly I myself am not
part of that list) before the project even started. Sometimes it just
boggles
Compile compliance level: 1.6
Generated class files compatibility: 1.6
Source compatibility: 1.6
I think regardless of what jdk you use to run/compile them, these 3 (or at
least the first 2) are affecting what you said. I got those from eclipse
(but there should be command line equivalents of
It was an incredible language, five years with clojure is an incredible
journey, helping me understand programming better, and do programming
better. Thanks Rich!
On Wednesday, October 17, 2012 9:53:55 AM UTC+8, Rich Hickey wrote:
I released Clojure 5 years ago today. It's been a terrific
It may be worth considering adding an oget to complement aget as was
suggesting during ClojureScript/Lua development.
David
On Tue, Oct 16, 2012 at 11:30 PM, Evan Mezeske emeze...@gmail.com wrote:
Hmm after reading that docstring, /me hopes he didn't just recommend
something for its
Clojure is the gift that keep giving. I, for one, really appreciate what
you've done Rich, and can't wait to work with it more and take part in the
community as it grows.
Alex
On Tue, Oct 16, 2012 at 9:39 PM, Robert Luo l...@basecity.com wrote:
It was an incredible language, five years with
83 matches
Mail list logo