il we have thorough reference documentation.
There has been a lot of change because we really do care about this and
want to get it right. We will continue to do this until we as a team
believe that we have got it right.
Brenton
--
--
You received this message because you are subscribed to the G
ojure from the command line and from emacs. I don't want to
have to configure each in a different way.
I will try SLIME but if I can't do something like this then I may not
use it (unless there are other clear advantages).
Thank you Phil for providing clojure-mode.
Brenton
On Sep 7
and no longer using the
basic interaction.
If anyone is interested in how I did this or seeing my Clojure startup
script I wrote it down here.
http://formpluslogic.blogspot.com/2009/09/my-clojure-setup.html
Brenton
--~--~-~--~~~---~--~~
You received this
ople do that I don't know
about.
I had a look at clj-record to see how associations where handled. It
looks like nested maps are avoided here. Instead functions are created
to retrieve the associated data. Is the correct way of this this?
Thank you,
Brenton
--~--~-~--~~---
;y" :holder 2 :vehicle
12}}))
(def vehicles (ref #{{:id 11 :make "Audi" :driver 7}
{:id 12 :make "Toyota" :driver 2}}))
(def people (ref #{{:id 7 :name "Brenton"}
{:id 2 :name "John"}}))
(def
Java does get a bad rap these days and it can be difficult to spend
time learning something that you are not excited about. Here is a
little more encouragement.
I was recently working on a Project Euler problem involving prime
number generation. My initial pure Clojure implementation took about
1
Stuart,
Can't make it to New York. It would be great if these talks could be
recorded and made available later. I am very interested in what you
are doing with Hadoop and also the part about "Storage options for
Clojure data structures".
Thank you,
Brenton
On Sep 28, 9:20 am
I use. I hope you find it helpful.
Brenton
On Dec 2, 1:59 pm, Raoul Duke wrote:
> hi,
>
> i've seen some blog posts / code about using agents to use up
> cores/hyper-threading and speed up testing cycles. how might one do
> that with clojure.test{.tap}? like if somebody alr
meone
else in the community to take up if you think it is a good idea. I may
be willing...
Brenton
On Dec 14, 6:33 am, Rich Hickey wrote:
> Funding Clojure 2010
>
> Background
> --
>
> It is important when using open source software that you consider who
> is paying
. A lot of the apps that I write end up getting
deployed using Oracle and SQL Server. If you plan for CQL to be widely
used I think you will need to take backends into account. You don't
need to implement them all yourself, but you should provide a way so
that others can implement them when they need
tations
as separate projects so that they don't even need to be included in
ClojureQL.
I'm sure you will come up with something on par with the rest of
ClojureQL.
Great work! I didn't like the first ClojureQL but I love it now. Now I
have to figure out how what to do with Carte.
Bre
roach will get the job done as
quickly as possible. Of course there is a lot more code to read than
your very impressive ten lines.
Cheers,
Brenton
On Feb 15, 2:38 pm, Laurent PETIT wrote:
> Hi,
>
> Was playing with levenshtein (argh, where do I place the h -sorry mister
> levensh
Laurent,
When I have some time, I will take another look at my code to see if I
can get an accurate levenshtein distance without adding significant
complexity. I am optimistic.
I'll let you know what I find.
Thanks again for sharing your code.
Brenton
On Feb 16, 2:12 am, Laurent PETIT
. Let's do it
right and call it the backward incompatible version 2.0 that it is.
Maybe it will inspire other projects to do the same.
Brenton
On Feb 22, 6:27 pm, Christopher Redinger
wrote:
> As you can see on the Release.Next Planning page [1], there is an open
> question about whe
You may also consider using java interop here.
(defn round [s n]
(.setScale (bigdec n) s java.math.RoundingMode/HALF_EVEN))
=> (round 3 78.37898794)
=> 78.379
see
http://download.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html
Brenton
On Mar 23, 11:08 am, JDuPreez wrote:
Great work Chas!
I can't wait to try it out (and pay for it).
On Apr 19, 9:19 am, Chas Emerick wrote:
> Today, I’m opening up a “preview” site for Clojure Atlas [1], a new side
> project of mine that I’m particularly excited about.
>
> Clojure Atlas is an experiment in visualizing a programming
Stu,
Just a quick thought, you can use Java2D for the images and then iText
to create the PDFs.
Brenton
On Apr 29, 9:26 pm, stu wrote:
> Hi,
>
> I'm developing a Clojure project that loads and creates a bunch of
> simple 2D geometry (lines, polygons, beziers, text etc). I need
by then.
Here is one small application that shows how to use both styles in one
app. I hope you find this helpful.
http://github.com/brentonashworth/sandbar/blob/master/src/examples/sessions/session_with_reload.clj
Brenton
On May 9, 11:24 pm, Shree Mulay wrote:
> For the life of me, I can
number of requests and the amount of data that is transferred over a
network.
Imbedding HTML templates in JavaScript means that those templates are only
transferred over the network once.
I hope this helps,
Brenton
On Friday, August 10, 2012 6:21:00 AM UTC-4, john wrote:
>
> Hello,
>
> generated JS has path problems on windows
Until this gets fixed you can work around this particular problem by
using one of the available optimizations.
cljsc src {:optimizations :simple} > twitterbuzz.js
You may also use :whitespace or :advanced in place of :simple above.
This will produce o
That clojure.jar file is clojure 1.3.
Something is wrong with the classpath.
Here are a couple of things to try:
- when using a batch file the classpath must be delimited with
semicolons instead of colons
- try replacing lib/* with an explicit list everything that is in lib
- something like lib/
Jack,
You can use the :libs key in the options which are passed to build.
For example, there is a directory of third party libraries in "closure/
library/third_party/closure" which may be pulled in like this:
cljsc src {:libs ["closure/library/third_party/closure"] ...other
options...} > ouptput
g
other than ClojureScript and are welcome to pursue it.
Brenton
On Jul 25, 5:54 am, James Keats wrote:
> Right, Rich, please allow me to reply to the points you mentioned; I
> declined from doing so last night as I sensed some unintentionally
> irritated feelings, which I hope have eas
Anthony,
Did you try deleting the output directory where generated JavaScript
files are stored? If core lib JavaScript files exist in this directory
they will not be re-compiled.
On Jul 27, 10:59 pm, Anthony Grimes wrote:
> I guess I should have added that it's not just rand that isn't being
> i
> This is an ongoing source of problems and should probably work
> differently (date/time check?)
>
> Rich
There is now an issue for this. CLJS-41.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googleg
The problems with paths on Windows have been fixed and ClojureScript
now has batch files for cljsc, repl, and repljs. There is also a page
in the wiki to help Windows users get started.
https://github.com/clojure/clojurescript/wiki/Windows-Setup
Support for Windows will come from the community so
Any Google Closure compliant JavaScript can be pulled into the build
process by using the :libs option.
For example:
(build src {:libs ["/foo/bar"]})
would include any JavaScript files under /foo/bar in the build
process.
On Jul 30, 7:02 am, David Powell wrote:
> The closure-template tools let
The problem existed from Friday at about 10AM until Saturday morning
when it was found and fixed. It only occurred when compiling something
in advanced mode for the first time, which is probably why it was
missed. There are some tests in place but we haven't yet got to the
point where everything is
Sorry. I didn't notice that you were compiling a single file. That is
a different problem from the one I was referring to.
You were right about the cause as well. That particular problem is now
fixed.
Thank you for reporting it.
On Aug 7, 11:52 am, ataggart wrote:
> Alas, the current bug is in
Those warnings have been around for a couple of weeks now. In that
sense they are expected. I will see what I can find out about them.
On Aug 7, 3:19 pm, ataggart wrote:
> Great.
>
> BTW, are these warnings expected:
>
> $ cat > hello.cljs
> (ns hello)
> (defn ^:export greet [n]
> (str "Hello "
> WARNING - dangerous use of the global this object
These warnings should now be gone (thanks to Fogus).
On Aug 7, 3:19 pm, ataggart wrote:
> Great.
>
> BTW, are these warnings expected:
>
> $ cat > hello.cljs
> (ns hello)
> (defn ^:export greet [n]
> (str "Hello " n))
> $ bin/cljsc hello.cljs
> load('out/goog/base.js');
> load('bkeeping.js');
This should be:
load('out/goog/base.js');
load('out/goog/deps.js');
load('bkeeping.js');
On Aug 8, 11:05 pm, Timothy Washington wrote:
> Sorry, I should have been clearer.
>
> In a JS shell (v8, for example), after running... *load('bkeeping.j
There isn't an official way to do this now but you can package a
ClojureScript library (of .cljs files) into a jar and add it to the
classpath. Once on the classpath, the namespaces in the library can
then be required and used just as you would currently use clojure.set
or clojure.string.
ClojureS
thing automatically is out. I think it will either be a macro or a
reader-macro and will only create js objects out of literals or
expressions which can be evaluated to a literal.
Brenton
On Aug 10, 9:04 pm, Kevin Lynagh wrote:
> What is the best way to pass Clojure vectors and maps to JavaScript
>
Several improvements have been made to the ClojureScript REPL.
In ClojureScript, the method of printing output will be different for
each evaluation environment. There is now a var named *print-fn* in
cljs.core which will need to be explicitly set to a function that can
print in the target environ
If you have been having problems the ClojureScript and OpenJDK, please
try the current master branch of ClojureScript.
I would be interested to know what problems still remain, if any,
after these changes.
On Oct 2, 11:07 pm, db wrote:
> Here's what the patch looks like for openjdk-6 with the la
Today we are releasing ClojureScript One. A project to help you get
started writing single-page applications in ClojureScript.
http://clojure.com/blog/2012/01/11/announcing-clojurescript-one.html
http://clojurescriptone.com/
https://github.com/brentonashworth/one
This project is the result of a
We cannot share that information because it was a client project. It
wasn't really a translation process. We simply attempted to solve the
same problem with different tools. I do realize that seeing them side-
by-side would be interesting but we just can't do it.
Issue 22 is not related to this.
This can also be solved by not hard-coding "localhost" in
one.sample.core as it is now.
There are functions in goog.uri.utils to help with this.
This is on our list of things to do.
Brenton
On Jan 12, 2:30 pm, Ryan Waters wrote:
> I ran into an issue with remote development and
Yes.
On Jan 12, 3:24 pm, Stan Dyck wrote:
> On 01/12/2012 11:44 AM, Brenton wrote:
>
> > This can also be solved by not hard-coding "localhost" in
> > one.sample.core as it is now.
>
> > There are functions in goog.uri.utils to help with this.
>
It looks like you don't have Clojure. Did you run script/deps? Do you
have anything in the lib directory?
Try running it again.
Brenton
On Jan 12, 4:28 pm, abaitam wrote:
> I am dying to try this. However, the script/run script (on MAC) gives
> me this error message:
>
> Ex
You are trying to evaluate ClojureScript in a Clojure REPL.
The easiest way to get a ClojureScript REPL is to run:
script/cljs-repl
If you start a ClojureScript REPL manually then you always need to
load/reload the development page afterwords to establish the
connection.
On Jan 12, 5:07 pm, ute
described here:
https://github.com/brentonashworth/one/wiki/Quick-Start
Brenton
On Jan 13, 9:51 am, Huft wrote:
> Ah - RTFM - difference between Clojure- and Clojurescript- REPLs -
> thanks
>
> So now I have the Clojurescript REPL running; but entering '(js/alert
> "hello&q
I can't reproduce this problem. What you are showing here should work.
The following steps work for me:
script/cljs-repl
ClojureScript:cljs.user> (in-ns 'one.sample.view)
ClojureScript:one.sample.view> (def fiv 5)
(def fiv 5)
5
On Jan 13, 9:36 am, László Török wrote:
> Hi,
>
> first of thank yo
with the steps to reproduce.
Thanks,
Brenton
On Jan 15, 6:57 am, Takahiro Hozumi wrote:
> Hi,
> In my browser repl, which follows the ClojureScript wiki[1], I must
> specify variables with namespace even if `in-ns` is used, but I
> noticed that I don't have to do in the repl of Cl
The event-id can be any Clojure value. When you fire an event, you
need to make sure that there is enough information in this value to
properly dispatch to a reactor.
react-to takes an event predicate function which is called with the
event-id. If the function returns true then the reactor will ha
We have released a new version of ClojureScript One.
The most significant changes are:
No more scripts! Everything now works through Leiningen. We have added
support for retrieveing git dependencies via Leiningen.
Allow connections to the REPL form remote machines.
See the change log:
https://
With the recent update, we no longer have a script/cljs-repl.
You would now use:
lein repl
(go)
to accomplish the same thing.
In your case, you can use:
lein repl
(binding [*open-url-script* x]
(go))
Brenton
On Jan 25, 3:19 pm, Raju Bitter wrote:
> clojure.java.browse/open-url
th/one/wiki/Dependencies.
You rock!
Brenton
On Jan 25, 4:15 pm, Sam Aaron wrote:
> Very nice :-) I've got some quality code reading ahead of me...
>
> One quick question - why do you still rely on git checkouts of ClojureScript
> and Domina - especially now ClojureScript is
This is not an issue with One but with Leiningen. Others have run into
the same problem:
https://github.com/technomancy/leiningen/issues/375
https://github.com/dakrone/clojuredocs-client/issues/6
Another work-around is to make sure you have clojure-1.2.1 in your
local maven repository.
On Jan 2
sue will be fixed in Leiningen soon.
Brenton
On Jan 27, 1:05 pm, Christofer Jennings wrote:
> I get the error below when I run ClojureScript One's 'lein bootsrap'. Any
> ideas?
>
> I'm pretty new to Clojure. This is my first time using Leiningen and first
> attempt
t environment in which to
evaluation things. In case 1 this is created for you. In case 2 you
have to manually set it up. In case 3 it uses the active ClojureScript
REPL's environment.
This is all very experimental. I hope it gives you some good ideas for
where to start.
Thanks,
Brenton
On Fe
Thanks Stuart,
Looks like the problem might be here:
https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/repl.clj#L117
I'll dig into this this weekend.
On Mar 2, 6:30 pm, Stuart Campbell wrote:
> Done!http://dev.clojure.org/jira/browse/CLJS-157
>
> On 3 March 2012 01:15, David No
f the included libraries out into separate
projects.
Thanks for your interest.
Brenton
On Saturday, June 2, 2012 5:09:11 PM UTC-4, Murtaza Husain wrote:
>
> Hi,
>
> Are there any plans to release further milestones of ClojureScriptOne, its
> an awesome project, and a great learning too
)
(stream-map - (pi-summands (+ n 2)
I would hope so. I don't want to get Scheme envy.
Thanks for your help,
Brenton
On Jan 26, 6:17 am, Nebojsa Stricevic
wrote:
> Greetings,
>
> I'm new to Clojure and working my way through Project Euler problems
> for learning
only use Clojure for admin
stuff when the startup time is not a factor. But this clj script takes
away a lot of the pain of launching Clojure from the command line.
I hope this has more signal than noise.
Brenton
On Feb 4, 9:35 am, Phil Hagelberg wrote:
> On Thu, Feb 4, 2010 at 8:33 AM, St
al feeling about defs inside of functions?
Brenton
--
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
letfn is exactly what I was looking for.
Thank you.
On Feb 8, 12:15 pm, Michał Marczyk wrote:
> Use let:
>
> (defn foo [...]
> (let [helper (fn [...] ...)]
> (helper ...)))
>
> or letfn:
>
> (defn foo [...]
> (letfn [(helper [...] ...)]
> (helper ...)))
>
> The latter allows you to i
ons.
Good luck,
Brenton
On Feb 10, 7:13 am, Aviad Reich wrote:
> thank you.
> I have "-server" and "-Xmx1024m" set in my 'swank-clojure-extra-vm-args, but
> the problem remains.
>
> Aviad
>
> On 10 February 2010 15:57, Joop Kiefte wrote:
>
> >
chaosprophet,
Clojure wants you to think in terms of sequences instead to loops.
Instead to looping through cat-all and keeping track of the sum, you
want to use map and reduce.
(reduce + (map #(probability-of-category-given-document % tokens) cat-
all))
Brenton
On Feb 10, 7:14 am
lling the underlying function and just returns the results.
If you really wanted to use memoize here then you use it on the vl
function.
Brenton
On Feb 10, 9:54 am, Aviad Reich wrote:
> Thank you all!
>
> your advice were indeed very helpful!
>
> I eventually solved it using mem
ind myself doing this all the time.
Brenton
On Feb 11, 9:19 am, Martin Hauner wrote:
> Hi,
>
> I'm doing my first steps in Clojure and I would like to get some
> feedback on my implementation of the Bowling Game Kata. The code is
> herehttp://softnoise.wordpress.com/2010/02/
You can also you #_ to comment out a line of code
#_(.vm detach)
so that you don't have to put )) on the next line.
Brenton
On Feb 11, 10:39 am, Greg Bowyer wrote:
> Hi all, long time lurker first time irritant.
>
> I have been playing with clojure for a little while, and f
Sorry, you are not commenting out a line of code but ignoring the next
form.
On Feb 11, 12:49 pm, Brenton wrote:
> You can also you #_ to comment out a line of code
>
> #_(.vm detach)
>
> so that you don't have to put )) on the next line.
>
> Brenton
>
> On Feb
give me if you already knew all of this.
Kind Regards,
Brenton
On Mar 27, 2:55 pm, Glen Rubin wrote:
> I want to start graphing some data i am woking with. I found and
> downloaded a library called dejcartes for this
> purposehttp://www.markmfredrickson.com/code/
>
> I am abso
elloJoe.))
user> (say-hello hello)
"Hello Joe"
Before today (def hello (HelloJoe)) would not cause an error.
Is this a bug or a new feature of deftype?
Thanks,
Brenton
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to
think I am on the right track? If not, what would that look like?
What would Rich do?
This project is being developing for my own immediate needs but I
would be interested in improving it outside of the scope of my work
based on your feedback.
Thank you,
Brenton
--
You received this message
macro for queries that
would allow table names to be written as symbols instead of keywords.
My main concern is to ensure that queries behave in the same way as
the rest of Clojure.
Thanks again,
Brenton
On Jun 20, 9:36 am, rb wrote:
> Hi Brenton:
>
> I think it would be nice if ra
1. Have you written, or are you writing, a web application that uses
Clojure? What does it do?
I am an independent contractor and do a lot of corporate intranet web
applications. All of my clients support Java. Each year I write a few
new applications and spend a lot of time maintaining old Java
a
Nicolas,
Check out error-kit in contrib.
Brenton
On Jun 29, 7:26 am, Nicolas Oury wrote:
> Dear all,
>
> Is there a high level facility in Clojure to create your own exceptions?
> I know you can use genclass/proxies and extend Throwable/Exception but it
> seems very (too?) cl
://formpluslogic.blogspot.com/2010/07/better-clojure-test-results-with-deview.html
The project: http://github.com/brentonashworth/deview
Brenton
--
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
ect to the same test server; or would it be better to just have a
Leiningen plugin that runs tests and formats the results with difform
and clj-stacktrace? Either would we fairly easy given the work I have
already done.
Brenton
On Jul 13, 9:40 pm, Phil Hagelberg wrote:
> On Tue, Jul 13, 2010 at
en so that this would
be the default behavior of "lein test"?
Brenton
--
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
On Jul 14, 2:59 pm, Brian Carper wrote:
> For peons like myself who still run tests from a REPL and want to see
> plaintext diffed output, apparently you can use this library and do
> (difftest.core/run-tests 'some-ns) instead of (clojure.test/run-test
> 'some-ns) and it seems to work well.
>
>
44f8e3370a...
>
> --Brian
Thank you Brian,
I fixed this problem. The new version, 1.1.1, is now on Clojars and
GitHub.
Please let me know if you have any more problems.
Brenton
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
his is an improvement.
Thanks for the input.
Brenton
--
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
ffs.
In summary: In some cases it is obvious, in others we only know by
intention and in call cases we can abuse Clojure and make every
function impure.
Brenton
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send ema
to do
this?
I'm in the middle of writing blog post about protocols (in order to
improve my own understanding of them) where I try to illustrate the
point that you can code against maps then switch to protocols and
records without changing the caller's contract.
Thanks for your hel
/sandbar/tree/master/src/sandbar/example/.
Finally, I have just created a user group for Sandbar in order to
field questions like this: http://groups.google.com/group/sandbar-library
Brenton
On Aug 20, 2:13 am, Nebojsa Stricevic
wrote:
> I'm building a Clojure web app that I would
nd we will all write less code
and be able to focus on solving the problems unique to our business.
We will be able to do this using only libraries, without resorting to
frameworks, patterns or code generation.
Brenton
On Sep 4, 8:44 am, HB wrote:
> Hey,
> If Compojure is micro web framew
ishes your ability to solve problems in
the best possible way. When starting to solve a new problem, I want to
start thinking at the lowest level that I am willing to work, then add
libraries for the things that I want to make easy. We need to have a
common base, best practices and good libraries.
Br
://weavejester.github.com/compojure/
Examples can also be very helpful.
Very simple examples
http://github.com/abedra/clojure-web
http://github.com/brentonashworth/sandbar-examples
Larger example
http://github.com/briancarper/cow-blog
Brenton
On Sep 4, 7:30 pm, HB wrote:
> Thank you all guys,
n install. Then in your project
remember to do lein clean && lein deps. This will get what you want
working in development and is still compatible when you go to
production.
Brenton
On Sep 8, 5:32 pm, Rob McBride wrote:
> Hi,
>
> It seems that when using ring's wrap-reload
to write is actually quite amazing. And when you
start that way, the answer to the question "What if I wanted to do X?"
is usually much simpler.
And I agree with everything Zach said above.
Brenton
On Sep 9, 9:22 am, Mike Meyer wrote:
> On Thu, 9 Sep 2010 09:03:38 -0700 (PDT)
>
&
hy all of this other stuff is so simple, someone built it.
Brenton
On Sep 9, 10:40 am, Mike Meyer wrote:
> On Thu, 9 Sep 2010 09:41:09 -0700 (PDT)
>
> Brenton wrote:
> > Mike,
>
> > Your point has been made, simple things are simple. When you need to
> > print &quo
rd to using this.
Brenton
On Sep 22, 11:11 am, Stuart Halloway
wrote:
> Mycroft is a generic JVM browser written in Clojure. Version 0.0.2 is now
> available on clojars, and the project is
> athttp://github.com/relevance/mycrofton Github.
>
> Mycroft can be embedded as a dev de
ar/example/
Specifically, here is one for creating forms with defform:
http://github.com/brentonashworth/sandbar/blob/master/src/sandbar/example/forms/complex.clj
Hope this helps,
Brenton
On Oct 20, 3:38 pm, nickikt wrote:
> I want to make a little Webstuff with Clojure. Wanted to use Sandbar
ther on clojars. I would rather work with the new versions (not
> start a poject with outdated dependencies). Witch of the jars do I
> need to do something like your defform example in the new version?
>
> On Oct 21, 2:23 am, Brenton wrote:
>
> > Nickikt ,
>
> &
88 matches
Mail list logo