That's great news that you got it to work. I can't make any sense of the
stack trace you're seeing with "lein deps", though, unfortunately.
Other than installation, does the plugin seem to work (e.g. "lein cljsbuild
once", etc)? I haven't tested it under Windows myself, and people have had
tr
Yes, I've only tested "lein cljsbuild once", but it worked just fine once I
figured out the alternative way to get the plugin installed.
On Thu, Apr 19, 2012 at 12:03 AM, Evan Mezeske wrote:
> That's great news that you got it to work. I can't make any sense of the
> stack trace you're seeing w
Hi all,
Does anyone know whether I can run ClojureCLR on .net compact?
Specifically I would need to run it on Windows CE. Currently the
application is written in C# which works ok, but I need to rewrite it
and I'm deciding between C#, F# and ClojureCLR.
Thanks,
David
--
David Jagoe
davidja...@
Unfortunately, "lein trampoline cljsbuild repl-rhino" (and all the
trampoline tasks)
generates the same error that I got when I tried to run lein deps.
On Thu, Apr 19, 2012 at 12:18 AM, Mark Engelberg
wrote:
> Yes, I've only tested "lein cljsbuild once", but it worked just fine once
> I figured
Hi Dmitri,
This is great, thanks!
I have a system where I need to render web reports to nicely formatted
PDFs. Currently I maintain separate HTML and TeX templates for this
purpose (in a Python system) but wanted to have a system that allows
me to write hiccup once and have it output HTML & PDF r
I'm trying to get some Clojure code to compile to javascript.
So I've got a clojurescript repl up and running, and I was hoping it would
be a straightforward iterative process of:
Compile code.
Test code.
Get detailed bug (or at least a line number) if I used a feature not
available in clojurescri
On Thursday, April 19, 2012 3:03:53 AM UTC-4, Evan Mezeske wrote:
>
> That's great news that you got it to work. I can't make any sense of the
> stack trace you're seeing with "lein deps", though, unfortunately.
>
> Other than installation, does the plugin seem to work (e.g. "lein
> cljsbuild on
clojurescript is still pretty young. Error reporting is not where I expect
most people would like to see it. This is a problem for all languages
complied to js at the moment.
That said - you can get used to the situation pretty quickly, with a little
patience and the occasional challenge.
If y
It should be pretty easy to map some basic Hiccup tags to this,
headings, paragraphs, lists, and tables, etc. I suspect it's probably
easier to go the hiccup->pdf route, as you could simply ignore the
html tags that aren't applicable.
On Apr 19, 4:45 am, David Jagoe wrote:
> Hi Dmitri,
>
> This
Additionally, if you are using the repl to experiment, you may benefit from
defining and testing each bit as you go.
On Thursday, 19 April 2012 21:59:03 UTC+10, Dave Sann wrote:
>
> clojurescript is still pretty young. Error reporting is not where I expect
> most people would like to see it. Thi
Eastwood[1] is a Clojure lint tool which uses the analyze[2] library to
inspect
namespaces and report possible problems. Currently it should work
with projects running Clojure 1.3.0 and newer.
Currently eastwood warns when it finds
- deprecated java instance methods, static fields, static method
inc for the name! :-)
--
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.
To unsubscribe from this gro
Did I do something wrong?
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein plugin install
jonase/eastwood 0.0.1
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein version
Leiningen 1.7.1 on Java 1.6.0_23 OpenJDK Client VM
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ le
On Thu, Apr 19, 2012 at 6:34 PM, Jonas wrote:
> Eastwood[1] is a Clojure lint tool which uses the analyze[2] library to
> inspect
> namespaces and report possible problems. Currently it should work
> with projects running Clojure 1.3.0 and newer.
>
> Currently eastwood warns when it finds
> - depr
I got exactly the same error.
Regards,
BG
On Thu, Apr 19, 2012 at 6:54 PM, Ambrose Bonnaire-Sergeant
wrote:
> Did I do something wrong?
>
> ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein plugin install
> jonase/eastwood 0.0.1
>
> ambrose@ambrose-VirtualBox:~/Projects/typed-clojur
same outcome for me.
On Thu, Apr 19, 2012 at 9:24 AM, Ambrose Bonnaire-Sergeant
wrote:
> Did I do something wrong?
>
> ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein plugin install
> jonase/eastwood 0.0.1
>
> ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein version
> Lein
On Thursday, April 19, 2012 4:24:16 PM UTC+3, Ambrose Bonnaire-Sergeant
wrote:
>
> Did I do something wrong?
>
Sorry, I only tested in with lein2. I'll try to make it work with both in
the next release.
--
You received this message because you are subscribed to the Google
Groups "Clojure"
I believe that Reflection.Emit is not available in .Net Compact Framework.
This is essential for the ClojureCLR. This also prevents DLR-based
languages such as IronPython from running on .Net CF.
-David
On Thursday, April 19, 2012 3:11:02 AM UTC-5, David Jagoe wrote:
>
> Hi all,
>
> Does any
Ok, thanks David.
On 19 April 2012 15:53, dmiller wrote:
> I believe that Reflection.Emit is not available in .Net Compact Framework.
> This is essential for the ClojureCLR. This also prevents DLR-based
> languages such as IronPython from running on .Net CF.
>
> -David
>
>
> On Thursday, April
If you AOT compile the ClojureCLR code, will it still depend on Reflection.Emit?
Timothy
On Thu, Apr 19, 2012 at 11:10 AM, David Jagoe wrote:
> Ok, thanks David.
>
> On 19 April 2012 15:53, dmiller wrote:
>> I believe that Reflection.Emit is not available in .Net Compact Framework.
>> This is
On Thu, Apr 19, 2012 at 4:59 AM, Dave Sann wrote:
> If I have errors, I use the stacktrace which you can access easily in
> chrome for example to get my bearing and figure out what is going on.
>
Can you elaborate on this? Right now, I'm using a rhino repl as per the
getting started instruction
If you are running in a browser - the console log will show a stacktrace
that you can use.
As you are using Rhino, sorry I don't use this. Others may be able to help.
(I think that *e and .printStackTrace are clojure repl and jvm interop
respectively - not available in cljs)
If you are porting
I released 0.0.2 to clojars. It should now (hopefully) be possible to use
eastwood with lein1. Note that eastwood will only work with projects that
use Clojure version 1.3 and newer. This means that if you want to lint for
example a leiningen plugin project you better use lein2 because lein1 run
Still not working with lein1.
ambrose@ambrose-VirtualBox:~/Projects/typed-clojure$ lein plugin install
jonase/eastwood 0.0.2
[INFO] Unable to find resource 'jonase:eastwood:jar:0.0.2' in repository
central (http://repo1.maven.org/maven2)
Copying 4 files to /tmp/lein-cc995082-fa11-4245-8f7a-88d6c5a
On Thu, Apr 19, 2012 at 10:01 AM, Dave Sann wrote:
> The error that you showed originally does not look like a compile error -
> but an execution error. I may be wrong.
>
Agreed. The error happens only when I execute the code, not when I compile
it. Since the code works fine in Clojure, my bes
How are you compiling the code?
David
On Thu, Apr 19, 2012 at 5:55 AM, Mark Engelberg wrote:
> I'm trying to get some Clojure code to compile to javascript.
>
> So I've got a clojurescript repl up and running, and I was hoping it would
> be a straightforward iterative process of:
> Compile code.
On Thu, Apr 19, 2012 at 10:56 AM, David Nolen wrote:
> How are you compiling the code?
>
> David
>
>
In the REPL, using (ns test (:require [namespace-of-file-I-want-to-compile
:as s]))
and then invoking the functions using (s/function item).
--
You received this message because you are subscribe
How are you starting the REPL? What version of ClojureScript? Are you using
lein-cljsbuild?
On Thu, Apr 19, 2012 at 2:09 PM, Mark Engelberg wrote:
> On Thu, Apr 19, 2012 at 10:56 AM, David Nolen wrote:
>
>> How are you compiling the code?
>>
>> David
>>
>>
> In the REPL, using (ns test (:require
lein-cljsbuild's trampoline tasks for starting REPLs are not working for me
(I reported this in another thread). Seems to be a problem with lein's
batch file for Windows not properly handling spaces in directories that
relate to plugins.
So I do lein repl (I've configured the project file with ad
Then you need construct your REPL with:
(repl/repl env :warn-on-undeclared true)
David
On Thu, Apr 19, 2012 at 2:27 PM, Mark Engelberg wrote:
> lein-cljsbuild's trampoline tasks for starting REPLs are not working for
> me (I reported this in another thread). Seems to be a problem with lein's
>
Hi,
I've been doing some thinking about the treatment of nil in a
statically typed version of Clojure.
It occurs to me that nil is significantly different to Java's null
reference, which
is almost a Bottom type.
Java's null is a subtype of any reference type.
Clojure's nil is just nil, subtype t
On Thu, Apr 19, 2012 at 2:46 PM, Ambrose Bonnaire-Sergeant
wrote:
> Hi,
>
> I've been doing some thinking about the treatment of nil in a
> statically typed version of Clojure.
>
> It occurs to me that nil is significantly different to Java's null
> reference, which
> is almost a Bottom type.
>
>
On Thursday, April 19, 2012 11:20:05 AM UTC-5, tbc++ wrote:
>
> If you AOT compile the ClojureCLR code, will it still depend on
> Reflection.Emit?
>
> Timothy
>
Yes, it will still depend on Reflection.Emit. If you eval, you need it.
Also, any place where ClojureJVM does runtime reflection, Clo
OK, this was very helpful advice. Using these warnings I was able to
identify several problems:
Clojurescript didn't like my use of defstruct
Clojurescript didn't like my throwing of a RuntimeException
Clojurescript doesn't understand the format function (is there a
substitute in Clojurescript-la
On 19 April 2012 19:46, Ambrose Bonnaire-Sergeant
wrote:
> I've been doing some thinking about the treatment of nil in a
> statically typed version of Clojure.
Statically typed in what way? Java's type system doesn't seem
particularly suited to a functional programming language like Clojure.
- J
yes.
because this would be interpreted as a function/var that was expected to be
defined in the current namespace - you will see this in generated code.
my.namespace.function_I_thought_was_in_core
David's :warn-on-undefined should pick this up for code compiled via the
repl.
--
You received
I've found that by completely exiting and restarting the REPL, it is
working now. Woo hoo!
Way, way, way slower though. 16 seconds to produce an answer that takes 6
milliseconds in Java.
I have a suspicion that part of the time difference may have something to
do with Clojurescript's treatment
I am working on an optional type system for Clojure. It looks more like
Scala's type system, ie. working on top of existing Java types.
I'm inspired by Typed Racket, which include recursive types, unions,
singleton types, the ability to type complex variable arity functions, and
other cool stuff.
Is the 16 seconds figure from running your code in Rhino? From what I've
heard, the V8 engine is much, much faster (like, order(s) of magnitude)
than Rhino.
I'm not really sure what the best way to interactively run code on V8 is.
You could compile with node.js as the platform, and I think Da
Mark,
There's a format-like function in the Closure library.
Add to your namespace
(:require [goog.string :as gstring]
[goog.string.format :as gformat])
and call it like
(gstring/format "%02.0f" (inc 8)) ;;or whatever.
On Apr 19, 4:46 pm, Evan Mezeske wrote:
> Is the 16 seconds fi
I finally started take take a look at this.
Apologies are due - it does work. I had errors in my tests.
I have a question though.
Ideally, I don't really want to have .crossover. or .generic. in my
namespaces.
Is it possible to put crossover/generic files in a completely separate src
directo
Yeah, you should be able to avoid having a .crossover or .generic or
whatever in your namespaces; those are just examples based on my personal
way of organizing things.
You can put the crossover files wherever you want, as long as they're in
the classpath (even in a JAR). They don't need to be
On Thu, Apr 19, 2012 at 4:46 PM, Evan Mezeske wrote:
> Is the 16 seconds figure from running your code in Rhino?
>
Yes, Rhino. I'm also not doing any optimizations, although my
understanding is that advanced optimizations is more about pruning code and
reducing file size than reducing execution
On Apr 19, 4:06 pm, James Reeves wrote:
> On 19 April 2012 19:46, Ambrose Bonnaire-Sergeant
>
> wrote:
> > I've been doing some thinking about the treatment of nil in a
> > statically typed version of Clojure.
>
> Statically typed in what way? Java's type system doesn't seem
> particularly suited
On Thu, Apr 19, 2012 at 4:38 PM, Ambrose Bonnaire-Sergeant <
abonnaireserge...@gmail.com> wrote:
> I am working on an optional type system for Clojure. It looks more like
> Scala's type system, ie. working on top of existing Java types.
>
>
I saw Gilad Bracha speak a couple weeks ago about the des
Rhino is slow. If you want to see performance anywhere near the JVM you to
have to use a modern JavaScript engine - JavaScriptCore, SpiderMonkey, or
Google V8.
David
On Thu, Apr 19, 2012 at 7:31 PM, Mark Engelberg wrote:
> I've found that by completely exiting and restarting the REPL, it is
> wo
On Thu, Apr 19, 2012 at 8:43 PM, Mark Engelberg wrote:
> On Thu, Apr 19, 2012 at 4:46 PM, Evan Mezeske wrote:
>
>> Is the 16 seconds figure from running your code in Rhino?
>>
>
> Yes, Rhino. I'm also not doing any optimizations, although my
> understanding is that advanced optimizations is more
Great.
Do I need to be explicit in naming crossover files.
what If I have for example
crossover/a/b/x.clj
crossover/a/y.clj
can I do [crossover] and get all of these?
my test says
- yes in the main project - but only to the level immediately below. i.e
picking up crossover/*.clj
- no in ch
OK, I ran the same test directly in the browser with optimizations. I
wasn't doing it in a REPL, so I couldn't use the time function, but Firefox
appeared to take about 2 seconds, and Chrome was definitely under a
second. So yes, there does seem to be a world of difference from Rhino.
I'm still
This is basically my approach. I'm performing static analysis a la carte.
Right now I have a "check-namespace" function that performs type checking
transitively for a given namespace. You could imagine performing this at
the REPL, lein plugin, or via an editor shortcut.
And adding types has zero e
Your testing revealed accurate information. The general rule is that if a
namespace is from one of the cljsbuild :source-path entries, it will be
followed recursively. Unfortunately, for namespaces coming out of the
classpath, it's not always possible to recurse (e.g. there's no way to list
a
(binding [*print-fn* #(.log js/console)] (time ...))
works in the browser
On Friday, 20 April 2012 11:25:31 UTC+10, puzzler wrote:
>
> OK, I ran the same test directly in the browser with optimizations. I
> wasn't doing it in a REPL, so I couldn't use the time function, but Firefox
> appeared
On Thu, Apr 19, 2012 at 9:25 PM, Mark Engelberg wrote:
> OK, I ran the same test directly in the browser with optimizations. I
> wasn't doing it in a REPL, so I couldn't use the time function, but Firefox
> appeared to take about 2 seconds, and Chrome was definitely under a
> second. So yes, the
That looks promising, good work!
I read through the docs and browsed the sources, and (admittedly without trying
to code an example myself) it's not immediately obvious to me how Friend would
handle the following use case:
Given:
- three users: alice, bob, and admin. Alice and Bob have a "user"
Hello,
<< As a disclaimer I know very little about this topic or about Clojure;
please be kind. >>
Background:
I'm interested in implementing a small term rewriting system for a specific
application. I'm willing to spend some time learning a new language/system
in order to do this cleanly. I'
Hi,
I'd like to write a macro which transforms
(my-macro SomeClass. a b [x y] c [e f])
into
(SomeClass. a b x y c e f)
(the order of collections and single values in the arguments should be
arbitrary)
The closest I came was
(defmacro my-macro [func & args]
`(~func ~@(flatten args)))
This
Hi,
I'd like to write a macro which transforms
(my-macro SomeClass. a b [x y] c [e f])
into
(SomeClass. a b x y c e f)
(the order of collections and single values in the arguments should be
arbitrary)
The closest I came was
(defmacro my-macro [func & args]
`(~func ~@(flatten args)))
Th
Ok, I've read that what I want to do is a no no. But this is the sort of
thing I did in Scheme about 20 years ago (and because of that I'm probably
misremembering ;-)).
Basically I'm learning clojure and thought I'd write a tic tac toe game.
But not any tic tac toe, I want to write one where
Paredit mode is a structural editor for Clojure code in Vim. It allows
you to edit your code while keeping parenthesis matched, and providing
shortcuts to manipulate (), {}, [], and "" easily. Use :help paredit
for details.
I just implemented support for VimClojure repls and {} syntax. Please
repo
What don't you like about Maude?
On Wed, Apr 18, 2012 at 10:05 PM, Matthew Rocklin wrote:
> Hello,
>
> << As a disclaimer I know very little about this topic or about Clojure;
> please be kind. >>
>
> Background:
> I'm interested in implementing a small term rewriting system for a
> specific appl
You could keep the board in an atom so it can mutate; then try to find
maybe two good places for mutation to happen, your move and the program's.
With the rest being functional you'll avoid the problems of global state
while not being forced to fit your logic into a loop of some re-binding
that
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
Flatten isn't the problem. You can't put together a special form with
apply. Try taking the class name as a symbol or string and use reflection.
On Wednesday, April 18, 2012 1:57:27 PM UTC-7, Thomas wrote:
>
> Hi,
>
> I'd like to write a macro which transforms
>
> (my-macro SomeClass. a b [x y] c
I've always liked the way assoc and dissoc return the original map instance
when there's no change to be made. But this is not apparently true of
records. e.g.:
> (def m {:a 1})
> (identical? m (dissoc m :x))
; true
> (def r <>)
> (identical? r (dissoc r :x))
; false
Does anyone know if there'
On 20 April 2012 07:08, Matthew Phillips wrote:
> I've always liked the way assoc and dissoc return the original map
> instance when there's no change to be made. But this is not apparently
> true of records. e.g.:
Out of curiosity, why is this useful to you?
I would imagine that the fact that
On Thu, Apr 19, 2012 at 11:31 PM, David Jagoe wrote:
>
> Out of curiosity, why is this useful to you?
>
It certainly has performance benefits.
When things are tested for equality (e.g., to test against keys in a hash
map), identical things are the fastest to recognize as equal. Also, saves
on
66 matches
Mail list logo