Re: Leiningen-noobie question

2012-04-28 Thread Larry Travis

Neale:
Indeed, that's exactly the dependency vector I needed.  I'm impressed by 
your expertise. Thanks very much to both you and Sean.

  --Larry


On 4/28/12 7:01 PM, Neale Swinnerton wrote:

leiningen relies on maven dependency resolution...

the dependency entry is of the form

[groupId/artifactId "version"]

You have the groupId and the artifactId both set to prjctOne. You can 
tell this from the path it's installed into your local repo. I believe 
this is default behaviour if you specify a simple project name in 
project.clj (i.e one without a /)


This is the key entry in your logging:

[INFO] Installing 
/Users/larrytravis/prjctOne/prjctOne-1.0.0-SNAPSHOT.jar to 
/Users/larrytravis/.m2/repository/prjctOne/prjctOne/1.0.0-SNAPSHOT/prjctOne-1.0.0-SNAPSHOT.jar


So you need...

[prjctOne/prjctOne "1.0.0-SNAPSHOT"]

Neale
{t: @sw1nn , w: sw1nn.com 
 }




On Sun, Apr 29, 2012 at 12:42 AM, Larry Travis > wrote:


Sean:
Your suggestion doesn't work.  The Slime REPL comes up fine when I
use the dependency vector you suggest (some of the vectors I have
tried prevent the Swank server from starting), but the REPL
doesn't know anything about the functions defined in prjctOne or
about the name-space in which they exist.

So I guess for the nonce I'll just use load-file commands in the
Slime REPL to make use of my local stash of clj files, and I'll
worry some time later about getting Leiningen to construct
dependencies on those files.  I'd rather spend my time on getting
my programs to work than on getting my programming environment to
work.

If you get any more ideas about how I might try to solve my
problem, let me know.  Thanks.
 --Larry


On 4/28/12 5:07 PM, Sean Corfield wrote:

On Sat, Apr 28, 2012 at 2:41 PM, Larry
Travismailto:tra...@cs.wisc.edu>>  wrote:

 That is, what would correspond to the [utilities

"0.0.1-SNAPSHOT"] vector in your example?

Try [prjctOne "1.0.0-SNAPSHOT"]


-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en





--
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Any IObj implementation for deftype that doesn't take meta via ctor?

2012-04-28 Thread Shantanu Kumar
Hi,

Can somebody point me to an example that implements the IObj interface
on deftype without needing to pass in meta via constructor? defrecord
seems to be doing this by storing meta on the tag, but I don't
completely understand it yet.

Shantanu

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen-noobie question

2012-04-28 Thread Neale Swinnerton
leiningen relies on maven dependency resolution...

the dependency entry is of the form

[groupId/artifactId "version"]

You have the groupId and the artifactId both set to prjctOne. You can tell
this from the path it's installed into your local repo. I believe this is
default behaviour if you specify a simple project name in project.clj (i.e
one without a /)

This is the key entry in your logging:

[INFO] Installing /Users/larrytravis/prjctOne/**prjctOne-1.0.0-SNAPSHOT.jar
to /Users/larrytravis/.m2/**repository/prjctOne/prjctOne/**1.0.0-
SNAPSHOT/prjctOne-1.0.0-**SNAPSHOT.jar

So you need...

[prjctOne/prjctOne "1.0.0-SNAPSHOT"]

Neale
{t: @sw1nn , w: sw1nn.com }



On Sun, Apr 29, 2012 at 12:42 AM, Larry Travis  wrote:

> Sean:
> Your suggestion doesn't work.  The Slime REPL comes up fine when I use the
> dependency vector you suggest (some of the vectors I have tried prevent the
> Swank server from starting), but the REPL doesn't know anything about the
> functions defined in prjctOne or about the name-space in which they exist.
>
> So I guess for the nonce I'll just use load-file commands in the Slime
> REPL to make use of my local stash of clj files, and I'll worry some time
> later about getting Leiningen to construct dependencies on those files.
>  I'd rather spend my time on getting my programs to work than on getting my
> programming environment to work.
>
> If you get any more ideas about how I might try to solve my problem, let
> me know.  Thanks.
>  --Larry
>
>
> On 4/28/12 5:07 PM, Sean Corfield wrote:
>
>> On Sat, Apr 28, 2012 at 2:41 PM, Larry Travis  wrote:
>>
>>>  That is, what would correspond to the [utilities
>>>
>>> "0.0.1-SNAPSHOT"] vector in your example?
>>>
>> Try [prjctOne "1.0.0-SNAPSHOT"]
>>
>
> --
> 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 group, send email to
> clojure+unsubscribe@**googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Leiningen-noobie question

2012-04-28 Thread Larry Travis

Sean:
Your suggestion doesn't work.  The Slime REPL comes up fine when I use 
the dependency vector you suggest (some of the vectors I have tried 
prevent the Swank server from starting), but the REPL doesn't know 
anything about the functions defined in prjctOne or about the name-space 
in which they exist.


So I guess for the nonce I'll just use load-file commands in the Slime 
REPL to make use of my local stash of clj files, and I'll worry some 
time later about getting Leiningen to construct dependencies on those 
files.  I'd rather spend my time on getting my programs to work than on 
getting my programming environment to work.


If you get any more ideas about how I might try to solve my problem, let 
me know.  Thanks.

  --Larry

On 4/28/12 5:07 PM, Sean Corfield wrote:

On Sat, Apr 28, 2012 at 2:41 PM, Larry Travis  wrote:

  That is, what would correspond to the [utilities
"0.0.1-SNAPSHOT"] vector in your example?

Try [prjctOne "1.0.0-SNAPSHOT"]


--
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: simple script using Autodoc to generate a static docs site

2012-04-28 Thread Jim - FooBar();

On 28/04/12 23:41, John Gabriele wrote:

On Apr 28, 5:37 pm, "Jim.foobar"  wrote:

github says 404 this is not the page you are looking for 


Weird. I double-checked the link, and it works. Is it still 404'ing
for you?




No its just fine from my desktop...for some reason my phone does not 
like github!!!

sorry for the alert.

Jim

--
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: simple script using Autodoc to generate a static docs site

2012-04-28 Thread John Gabriele
On Apr 28, 5:37 pm, "Jim.foobar"  wrote:
>
> github says 404 this is not the page you are looking for 
>

Weird. I double-checked the link, and it works. Is it still 404'ing
for you?

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen-noobie question

2012-04-28 Thread Sean Corfield
On Sat, Apr 28, 2012 at 2:41 PM, Larry Travis  wrote:
> Created /Users/larrytravis/prjctOne/prjctOne-1.0.0-SNAPSHOT.jar
...
> prjctOne.  That is, what would correspond to the [utilities
> "0.0.1-SNAPSHOT"] vector in your example?

Try [prjctOne "1.0.0-SNAPSHOT"]
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Leiningen-noobie question

2012-04-28 Thread Larry Travis

Sean,
Your advice makes good sense, but I can't make it work. Per that advice, 
I paste some of my function definitions into the core.clj file of the 
project "prjctOne" and proceed thusly:


larrytravis$ lein install
Copying 1 file to /Users/larrytravis/prjctOne/lib
No namespaces to :aot compile listed in project.clj.
Created /Users/larrytravis/prjctOne/prjctOne-1.0.0-SNAPSHOT.jar
Wrote pom.xml
[INFO] Installing 
/Users/larrytravis/prjctOne/prjctOne-1.0.0-SNAPSHOT.jar to 
/Users/larrytravis/.m2/repository/prjctOne/prjctOne/1.0.0-SNAPSHOT/prjctOne-1.0.0-SNAPSHOT.jar


But when I create a new project prjctTwo, I can't figure out what 
dependency declaration for it gives a prjctTwo Slime REPL access to the 
functions in prjctOne.  That is, what would correspond to the [utilities 
"0.0.1-SNAPSHOT"] vector in your example?

  --Larry

On 4/28/12 4:46 AM, Sean Corfield wrote:

On Sat, Apr 28, 2012 at 12:21 AM, Larry Travis  wrote:

I have installed Leiningen not so much to manage projects but to enable use
of clojure-jack-in as a means of getting Swank and Slime to work.  And they
do work for me.  But now I have a question that I can't find an answer for
in any  Leiningen documentation I know about. I have a largish, previously
created group of clj local files that exist on my system and whose function
definitions I want to use in my further work.  Is there a way to specify
such local files in a project :dependencies declaration -- or do I have to
do a load-file on each of them once I get a Slime REPL running for the
project (or maybe insert them all into the src/core.clj file of the project
and do a single load-file on it)?

Once possibility is to put all those files into a project together,
let's called it utilities and assume it has a 0.0.1-SNAPSHOT version.

Then you can run 'lein install' and it'll package them up and put them
in your local repository.

Then, wherever you want to use them in another project, just declare a
dependency on [utilities "0.0.1-SNAPSHOT"] and Leiningen will
automatically pull them in (from your local repo).

Then you just use/require the namespace(s) containing the relevant functions.

Does that help?


--
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: simple script using Autodoc to generate a static docs site

2012-04-28 Thread Jim.foobar

github says 404 this is not the page you are looking for 

Jim 

Sent from my mobile...

John Gabriele  wrote:

Hi,

I  was thinking how nice it would be if you could view the docs for a
given package at clojars.org — similar to how Perl 5's
 works.

So, I wrote a short little script to grab a project from github,
Autodoc it, copy some files around, and then generate a little index
file linking to the generated docs.

It's located here:  (screenshot included)

It's a bit crude, but seems to work fine.

Let me know what you think. :)

Thanks,
---John

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

simple script using Autodoc to generate a static docs site

2012-04-28 Thread John Gabriele
Hi,

I  was thinking how nice it would be if you could view the docs for a
given package at clojars.org — similar to how Perl 5's
 works.

So, I wrote a short little script to grab a project from github,
Autodoc it, copy some files around, and then generate a little index
file linking to the generated docs.

It's located here:  (screenshot included)

It's a bit crude, but seems to work fine.

Let me know what you think. :)

Thanks,
---John

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New release of Domina (now with reworked eventing)

2012-04-28 Thread David Nolen
It's definitely something about reify, though it seems hard for me to
reproduce in a single file w/ lein-cljsbuild.

David

On Sat, Apr 28, 2012 at 3:26 PM, Luke VanderHart
wrote:

> Yep, still happens against master.
>
> Trying to reduce it to a simpler test case now (and also see if it still
> happens when I take lein-cljsbuild out of the equation).
>
>
> On Saturday, April 28, 2012 1:29:07 PM UTC-4, David Nolen wrote:
>>
>> Which version of ClojurScript? Have you tried building against master?
>>
>> David
>>
>> On Sat, Apr 28, 2012 at 1:19 PM, Luke VanderHart <
>> luke.vanderh...@gmail.com> wrote:
>>
>>> David,
>>>
>>> Yes. I've been looking at that today. Something is going on that is not
>>> so straightforward, though - I think there might be a compiler issue (or
>>> else I'm misunderstanding some aspect of the compiler).
>>>
>>> For example, I'm getting the warning on compiler-generated vars. e.g:
>>>
>>> WARNING: Use of undeclared Var domina.css/t7256 at line 14
>>>
>>> Still investigating (though if you happen to know what's going on,
>>> please let me know)
>>>
>>>
>>> On Friday, April 27, 2012 3:26:43 PM UTC-4, David Nolen wrote:
>>>
 lein-cljsbuild is now becoming the tool of choice for many CLJS devs.
 One thing I've noticed about domina is that it's not particularly careful
 about declaration order. This results in a spew of compiler warnings when
 building your project with domina. It would be nice to sprinkle the code
 with the necessary declares to eliminate these warnings.

 David

 On Fri, Apr 27, 2012 at 10:47 AM, Luke VanderHart wrote:

 Some of you may already be aware of of Domina, a jQuery-inspired DOM
> manipulation library I've been working on. It's been out there for a 
> while,
> but I just finished up a round of changes that I think bring it to a
> certain degree of completion for basic use (although there's definitely a
> lot of cool stuff that still remains to be added).
>
> Most notable is a new set of eventing functions; I hope they'll
> provide an easy-to-use, low-level foundation for building more complex
> data- and event-driven web applications.
>
> Please check it out: 
> https://github.com/levand/**domi**na/
>
> Feedback, pull request, etc. are welcome.
>
> Thanks!
>
> -Luke
>
> --
> 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 group, send email to
> clojure+unsubscribe@**googlegrou**ps.com
> For more options, visit this group at
> http://groups.google.com/**group**/clojure?hl=en


  --
>>> 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 group, send email to
>>> clojure+unsubscribe@**googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/clojure?hl=en
>>>
>>
>>  --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: New release of Domina (now with reworked eventing)

2012-04-28 Thread Luke VanderHart
Yep, still happens against master.

Trying to reduce it to a simpler test case now (and also see if it still 
happens when I take lein-cljsbuild out of the equation).

On Saturday, April 28, 2012 1:29:07 PM UTC-4, David Nolen wrote:
>
> Which version of ClojurScript? Have you tried building against master?
>
> David
>
> On Sat, Apr 28, 2012 at 1:19 PM, Luke VanderHart <
> luke.vanderh...@gmail.com> wrote:
>
>> David,
>>
>> Yes. I've been looking at that today. Something is going on that is not 
>> so straightforward, though - I think there might be a compiler issue (or 
>> else I'm misunderstanding some aspect of the compiler).
>>
>> For example, I'm getting the warning on compiler-generated vars. e.g:
>>
>> WARNING: Use of undeclared Var domina.css/t7256 at line 14
>>
>> Still investigating (though if you happen to know what's going on, please 
>> let me know)
>>
>>
>> On Friday, April 27, 2012 3:26:43 PM UTC-4, David Nolen wrote:
>>
>>> lein-cljsbuild is now becoming the tool of choice for many CLJS devs. 
>>> One thing I've noticed about domina is that it's not particularly careful 
>>> about declaration order. This results in a spew of compiler warnings when 
>>> building your project with domina. It would be nice to sprinkle the code 
>>> with the necessary declares to eliminate these warnings.
>>>
>>> David
>>>
>>> On Fri, Apr 27, 2012 at 10:47 AM, Luke VanderHart wrote:
>>>
>>> Some of you may already be aware of of Domina, a jQuery-inspired DOM 
 manipulation library I've been working on. It's been out there for a 
 while, 
 but I just finished up a round of changes that I think bring it to a 
 certain degree of completion for basic use (although there's definitely a 
 lot of cool stuff that still remains to be added).

 Most notable is a new set of eventing functions; I hope they'll provide 
 an easy-to-use, low-level foundation for building more complex data- and 
 event-driven web applications.

 Please check it out: 
 https://github.com/levand/**domina/

 Feedback, pull request, etc. are welcome.

 Thanks!

 -Luke  

 -- 
 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 group, send email to
 clojure+unsubscribe@**googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/clojure?hl=en
>>>
>>>
>>>  -- 
>> 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 group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>>
>
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Macros and deftype – usage question

2012-04-28 Thread Shantanu Kumar


On Apr 28, 9:32 pm, Armando Blancas  wrote:
> Seems like the expansion is trying to put the function's value in there,
> and this has already been compiled. If the function' code is expanded
> in-place it works.

True. Thanks for confirming this.

Shantanu

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Tagged literals: undefined tags blow up reader

2012-04-28 Thread Steve Miner
Fogus filed a bug about this a while back:

http://dev.clojure.org/jira/browse/CLJ-927

My suggestion is that an unknown tag should be read as a map with a couple of 
well-defined keys (such as :unknown-literal and :value) so that the program has 
a way to support data that it doesn't understand.  This way the program has a 
chance to recreate the literal representation of the data so it can be passed 
on to some other process.

#unknown [1 2]
;=>   {:unknown-literal unknown :value [1 2]}

Maybe the unknown tag should go on the metadata instead of in the returned 
value, but I was thinking that I actually want different unknown tags to be 
unequal.  #unk1 [1 2] and #unk2 [1 2] should not accidentally be considered the 
same data value if the tags are unknown.

Steve Miner
stevemi...@gmail.com





On Apr 27, 2012, at 8:04 PM, kovas boguta wrote:

> Thanks everyone involved for the 1.4 release. One issue:
> 
> In 1.4, tagged literals need to be defined, otherwise the reader blows up:
> 
> user=> [:a #foo/bar :b]
> RuntimeException No reader function for tag foo/bar
> clojure.lang.LispReader$CtorReader.readTagged (LispReader.java:1164)
> RuntimeException Unmatched delimiter: ]
> clojure.lang.Util.runtimeException (Util.java:170)
> 
> This is a show-stopper for using tagged literals as a data interchange format.
> 
> Its impossible to pass data through your system without every step
> knowing about what it is.
> 
> I don't know what the best solution is, so I'm bringing this up here.
> 
> But however it looks, it would be great if undefined literals were
> read into some kind of wrapper, and then the reader could go on with
> its job.
> 
> -- 
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New release of Domina (now with reworked eventing)

2012-04-28 Thread David Nolen
Which version of ClojurScript? Have you tried building against master?

David

On Sat, Apr 28, 2012 at 1:19 PM, Luke VanderHart
wrote:

> David,
>
> Yes. I've been looking at that today. Something is going on that is not so
> straightforward, though - I think there might be a compiler issue (or else
> I'm misunderstanding some aspect of the compiler).
>
> For example, I'm getting the warning on compiler-generated vars. e.g:
>
> WARNING: Use of undeclared Var domina.css/t7256 at line 14
>
> Still investigating (though if you happen to know what's going on, please
> let me know)
>
>
> On Friday, April 27, 2012 3:26:43 PM UTC-4, David Nolen wrote:
>
>> lein-cljsbuild is now becoming the tool of choice for many CLJS devs. One
>> thing I've noticed about domina is that it's not particularly careful about
>> declaration order. This results in a spew of compiler warnings when
>> building your project with domina. It would be nice to sprinkle the code
>> with the necessary declares to eliminate these warnings.
>>
>> David
>>
>> On Fri, Apr 27, 2012 at 10:47 AM, Luke VanderHart wrote:
>>
>> Some of you may already be aware of of Domina, a jQuery-inspired DOM
>>> manipulation library I've been working on. It's been out there for a while,
>>> but I just finished up a round of changes that I think bring it to a
>>> certain degree of completion for basic use (although there's definitely a
>>> lot of cool stuff that still remains to be added).
>>>
>>> Most notable is a new set of eventing functions; I hope they'll provide
>>> an easy-to-use, low-level foundation for building more complex data- and
>>> event-driven web applications.
>>>
>>> Please check it out: 
>>> https://github.com/levand/**domina/
>>>
>>> Feedback, pull request, etc. are welcome.
>>>
>>> Thanks!
>>>
>>> -Luke
>>>
>>> --
>>> 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 group, send email to
>>> clojure+unsubscribe@**googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/clojure?hl=en
>>
>>
>>  --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: New release of Domina (now with reworked eventing)

2012-04-28 Thread Luke VanderHart
David,

Yes. I've been looking at that today. Something is going on that is not so 
straightforward, though - I think there might be a compiler issue (or else 
I'm misunderstanding some aspect of the compiler).

For example, I'm getting the warning on compiler-generated vars. e.g:

WARNING: Use of undeclared Var domina.css/t7256 at line 14

Still investigating (though if you happen to know what's going on, please 
let me know)


On Friday, April 27, 2012 3:26:43 PM UTC-4, David Nolen wrote:
>
> lein-cljsbuild is now becoming the tool of choice for many CLJS devs. One 
> thing I've noticed about domina is that it's not particularly careful about 
> declaration order. This results in a spew of compiler warnings when 
> building your project with domina. It would be nice to sprinkle the code 
> with the necessary declares to eliminate these warnings.
>
> David
>
> On Fri, Apr 27, 2012 at 10:47 AM, Luke VanderHart wrote:
>
>> Some of you may already be aware of of Domina, a jQuery-inspired DOM 
>> manipulation library I've been working on. It's been out there for a while, 
>> but I just finished up a round of changes that I think bring it to a 
>> certain degree of completion for basic use (although there's definitely a 
>> lot of cool stuff that still remains to be added).
>>
>> Most notable is a new set of eventing functions; I hope they'll provide 
>> an easy-to-use, low-level foundation for building more complex data- and 
>> event-driven web applications.
>>
>> Please check it out: https://github.com/levand/domina/
>>
>> Feedback, pull request, etc. are welcome.
>>
>> Thanks!
>>
>> -Luke  
>>
>> -- 
>> 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 group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
>

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

[ANN] WabbitMQ update v0.2.1

2012-04-28 Thread Allen Johnson
This update should fix all reflection warnings.

Leiningen:
[com.mefesto/wabbitmq "0.2.1"]

Github:
https://github.com/mefesto/wabbitmq

Thanks,
Allen

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Macros and deftype – usage question

2012-04-28 Thread Armando Blancas
Seems like the expansion is trying to put the function's value in there, 
and this has already been compiled. If the function' code is expanded 
in-place it works.

user=> (defmacro bar 
  [a] 
  (let [b (keyword a) 
f `(fn [& args#] ~b)] 
`(deftype ~a [] 
   clojure.lang.ILookup 
   (valAt [this# k#] (~f this# k#)) 
   (valAt [this# k# d#] (~f this# k# d#) 
#'user/bar
user=> (bar alex)
user.alex
user=> (def a (alex.))  
#'user/a
user=> (:foo a :bar)
:alex


On Saturday, April 28, 2012 8:43:21 AM UTC-7, Shantanu Kumar wrote:
>
> Hi, 
>
> I am running into error when using macros with deftype. For example, 
> when I use the macro `foo` it works fine: 
>
> (defmacro foo 
>   [a] 
>   (let [b (keyword a)] 
> `(do ~b))) 
>
> (foo alex) 
> => :b 
> whereas, when I use the macro `bar`: 
>
> (defmacro bar 
>   [a] 
>   (let [b (keyword a) 
> f (fn [& args] b)] 
> `(deftype ~a [] 
>clojure.lang.ILookup 
>(valAt [this# k#] (~f this# k#)) 
>(valAt [this# k# d#] (~f this# k# d#) 
>
> (bar alex) 
>
> I get the following error: 
> CompilerException java.lang.ExceptionInInitializerError, compiling: 
> (NO_SOURCE_PATH:87) 
>
> Can somebody help me understand what am I doing wrong here. 
>
> Shantanu

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Macros and deftype – usage question

2012-04-28 Thread Alex Baranosky
This macroexpansion looks fine to me... but still gives an error when you
try to call (bar alex).

(defmacro bar
  [a]
  (let [b (keyword a)
f-gensym (gensym "f")]
`(let [~f-gensym (fn [& args#] ~b)]
   (deftype ~a []
 clojure.lang.ILookup
 (valAt [this# k#] (~f-gensym this# k#))
 (valAt [this# k# d#] (~f-gensym this# k# d#))

user=> (macroexpand-1 `(bar alex)) (pp)
...
(clojure.core/let
  [f174 (clojure.core/fn [& args__160__auto__] :user/alex)]
  (clojure.core/deftype
user/alex
[]
clojure.lang.ILookup
(user/valAt
  [this__161__auto__ k__162__auto__]
  (f174 this__161__auto__ k__162__auto__))
(user/valAt
  [this__161__auto__ k__162__auto__ d__163__auto__]
  (f174 this__161__auto__ k__162__auto__ d__163__auto__

Error when you call it:
user=> (bar alex)
CompilerException java.lang.RuntimeException: Unable to resolve symbol:
f177 in this context, compiling:(NO_SOURCE_PATH:85)

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Macros and deftype – usage question

2012-04-28 Thread Shantanu Kumar
> I had to play with this because it seemed like for some reason you were
> trying to call it on my name :)

I appreciate you chimed in, though the mention of your name was purely
coincidental. :)

> So far one thing I've isolated is that if you cut out the function calls it
> will compile the macro:

I noticed it breaks only when i try to refer a local var outside the
syntax-quote, which happens to be f here.

Shantanu

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Macros and deftype – usage question

2012-04-28 Thread Alex Baranosky
Hi Shantanu,

I had to play with this because it seemed like for some reason you were
trying to call it on my name :)

So far one thing I've isolated is that if you cut out the function calls it
will compile the macro:

(defmacro bar
  [a]
  (let [b (keyword a)
f (fn [& args] b)]
`(deftype ~b []
   clojure.lang.ILookup
   (valAt [this# k#] )
   (valAt [this# k# d#] 

user=> (bar alex)
user.alex


On Sat, Apr 28, 2012 at 11:43 AM, Shantanu Kumar
wrote:

> Hi,
>
> I am running into error when using macros with deftype. For example,
> when I use the macro `foo` it works fine:
>
> (defmacro foo
>  [a]
>  (let [b (keyword a)]
>`(do ~b)))
>
> (foo alex)
> => :b
> whereas, when I use the macro `bar`:
>
> (defmacro bar
>  [a]
>  (let [b (keyword a)
>f (fn [& args] b)]
>`(deftype ~a []
>   clojure.lang.ILookup
>   (valAt [this# k#] (~f this# k#))
>   (valAt [this# k# d#] (~f this# k# d#)
>
> (bar alex)
>
> I get the following error:
> CompilerException java.lang.ExceptionInInitializerError, compiling:
> (NO_SOURCE_PATH:87)
>
> Can somebody help me understand what am I doing wrong here.
>
> Shantanu
>
> --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Macros and deftype – usage question

2012-04-28 Thread Shantanu Kumar
Hi,

I am running into error when using macros with deftype. For example,
when I use the macro `foo` it works fine:

(defmacro foo
  [a]
  (let [b (keyword a)]
`(do ~b)))

(foo alex)
=> :b
whereas, when I use the macro `bar`:

(defmacro bar
  [a]
  (let [b (keyword a)
f (fn [& args] b)]
`(deftype ~a []
   clojure.lang.ILookup
   (valAt [this# k#] (~f this# k#))
   (valAt [this# k# d#] (~f this# k# d#)

(bar alex)

I get the following error:
CompilerException java.lang.ExceptionInInitializerError, compiling:
(NO_SOURCE_PATH:87)

Can somebody help me understand what am I doing wrong here.

Shantanu

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Tagged literals: undefined tags blow up reader

2012-04-28 Thread Stuart Sierra
Yes, I've been considering this.

Unknown tags could return some kind of "tagged object" that has the tag in 
its metadata. I don't know is what the interface to that object should be.

-S

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Boolean

2012-04-28 Thread James Richardson
This seems to be a question on whether clojure supports java auto-boxing. 

What java is doing here:
if (new Boolean(false)) {
  // true
}
is calling .booleanValue on the Boolean object (as mentioned above).

And here:
int x = new Integer(6) + 4;
intValue is being called on the Integer object.

Into the world of clojure, when I do:
user=> (+ (java.lang.Integer. 6) 4)
10
it looks like clojure is doing something similar to java auto-boxing.
but when I do:
(if (java.lang.Boolean. false) "t" "f")
"t"
It looks like clojure isn't doing anything like auto-boxing.

I can see how this would be a little confusing for people coming from the 
Java world.

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Leiningen-noobie question

2012-04-28 Thread Sean Corfield
On Sat, Apr 28, 2012 at 12:21 AM, Larry Travis  wrote:
> I have installed Leiningen not so much to manage projects but to enable use
> of clojure-jack-in as a means of getting Swank and Slime to work.  And they
> do work for me.  But now I have a question that I can't find an answer for
> in any  Leiningen documentation I know about. I have a largish, previously
> created group of clj local files that exist on my system and whose function
> definitions I want to use in my further work.  Is there a way to specify
> such local files in a project :dependencies declaration -- or do I have to
> do a load-file on each of them once I get a Slime REPL running for the
> project (or maybe insert them all into the src/core.clj file of the project
> and do a single load-file on it)?

Once possibility is to put all those files into a project together,
let's called it utilities and assume it has a 0.0.1-SNAPSHOT version.

Then you can run 'lein install' and it'll package them up and put them
in your local repository.

Then, wherever you want to use them in another project, just declare a
dependency on [utilities "0.0.1-SNAPSHOT"] and Leiningen will
automatically pull them in (from your local repo).

Then you just use/require the namespace(s) containing the relevant functions.

Does that help?
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: New paper based on clojure + source code out in plos comp biol :-)

2012-04-28 Thread Baishampayan Ghose
That's awesome! Congratulations and thank you!

Regards,
BG

On Sat, Apr 28, 2012 at 1:49 PM, Boris V. Schmid  wrote:
> Hi Clojurans,
>
> For those interested, I finally got my second scientific paper using the
> Clojure language published (the first came out in 2010). The nice thing is
> that plos comp biol requested if I could also publish the source code, which
> I did, and is listed as supplemental materials "protocols 1".
>
> Here it is. Behind the rather dry title lies a paper describing a simulation
> model of the sexual network of the netherlands :-).
> http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002470
>
> Being able to work in a repl, and adjust and inspect the model on the fly
> has been pretty instrumental in exploring the different models for sexual
> networks. Clojure was excellent for this purpose. I'll try to get as much of
> my code out there as possible as a scientist (somewhat dependent on
> coauthors and future papers planned), as per:
> http://www.nature.com/news/2010/101013/full/467753a.html "publish your code,
> it is good enough". Thanks for putting this language together!
>
> --
> 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 group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
Baishampayan Ghose
b.ghose at gmail.com

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


New paper based on clojure + source code out in plos comp biol :-)

2012-04-28 Thread Boris V. Schmid
Hi Clojurans,

For those interested, I finally got my second scientific paper using the 
Clojure language published (the first came out in 2010). The nice thing is 
that plos comp biol requested if I could also publish the source code, 
which I did, and is listed as supplemental materials "protocols 1".

Here it is. Behind the rather dry title lies a paper describing a 
simulation model of the sexual network of the netherlands :-).
http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002470

Being able to work in a repl, and adjust and inspect the model on the fly 
has been pretty instrumental in exploring the different models for sexual 
networks. Clojure was excellent for this purpose. I'll try to get as much 
of my code out there as possible as a scientist (somewhat dependent on 
coauthors and future papers planned), as per: h
ttp://www.nature.com/news/2010/101013/full/467753a.html
 "publish 
your code, it is good enough". Thanks for putting this language together!

-- 
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Leiningen-noobie question

2012-04-28 Thread Larry Travis
I have installed Leiningen not so much to manage projects but to enable 
use of /clojure-jack-in/ as a means of getting Swank and Slime to work.  
And they do work for me.  But now I have a question that I can't find an 
answer for in any  Leiningen documentation I know about. I have a 
largish, previously created group of /clj/ local files that exist on my 
system and whose function definitions I want to use in my further work.  
Is there a way to specify such local files in a project :dependencies 
declaration -- or do I have to do a /load-file/ on each of them once I 
get a Slime REPL running for the project (or maybe insert them all into 
the /src/core.clj/ file of the project and do a single /load-file/ on it)?


That question is surely complicated enough to indicate how badly 
confused I am! Thanks for help.

  --Larry


--
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 group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en