Re: [Video] Game development in Clojure (with play-clj)

2015-10-18 Thread Zach Oakes
That function was renamed to `key-pressed?`.

On Saturday, October 17, 2015 at 7:32:44 PM UTC-4, amirteymuri wrote:
>
> Dear James,
> is-pressed? can not be resolved for me. Is this a version matter? Is there 
> still a is-pressed? function?
> Greetings
>
> Am Donnerstag, 27. März 2014 18:07:21 UTC+1 schrieb James Trunk:
>>
>> Hi everyone,
>>
>> I thought some of you might be interested to watch my screencast about game 
>> development in Clojure with play-clj 
>> .
>>
>> Cheers,
>> James
>>
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ClojureCLR setup guide/examples?

2015-10-18 Thread Rui Carmo
Hello guys,

I'm re-investing in the .NET ecosystem, and decided to try my hand at 
adding ClojureCLR to the mix given my very positive experience with the JVM 
version.

However, I'm having trouble with two basic things:

- I can't find a comprehensive guide regarding setting up a working 
ClojureCLR environment under Windows (8 or 10), so it took me three tries 
to get a moderately usable REPL
- the vsClojure extension doesn't support Visual Studio 2015 (I've found a 
fork that seems to have been updated, but haven't managed to rebuild it yet)

That and the lack of documentation regarding deployments (is there a 
recommended way to deploy a web service written in ClojureCLR? examples of 
working with a database?) have prevented me from making any significant 
headway, so I'd appreciate any pointers, especially from people who are 
currently using ClojureCLR successfully.

(and I apologise for saying this, but I don't want to use the JVM version 
under Windows - I'm perfectly happy with using it on Linux, including ARM 
servers, but the purpose of this exercise is to glue together existing C# 
assemblies).

Regards,

R.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


lazyseq?

2015-10-18 Thread Brian Marick
Is there a way to tell if `v` is a lazyseq other than `(instance? 
clojure.lang.LazySeq v)`? Seems like there should be, but I'm not seeing it.


[Preparing to say "duh!"]

--
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: lazyseq?

2015-10-18 Thread Timothy Baldridge
Often if you want to know if something is a lazy seq, you really want to
know if it is a delayed computation. If that's the case, realized? may
help.

But I also wonder what you are trying to accomplish. There are many seqs in
Clojure that are not lazy, and so could have interesting results if you
expect a seq to be a lazy seq. Also, there are some really weird rules
around chunked seqs, lazy seqs, and cons cells. Overall testing for a
LazySeq is probably more trouble than it's worth.

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Calling object members with symbols

2015-10-18 Thread Timur
Hi all,

Is there anyway to call an object member using its symbol? 

For instance we have an object o, we get the symbol of a method, e.g., 
toString, of our object o using clojure.reflect/reflect and and I want to 
execute this method on this object through the symbol. 

For instance *(. obj sym)* throws an exception. Here symbol for instance 
contains toString

Any ideas about how I can do this? 

Regards,

Timur

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Calling object members with symbols

2015-10-18 Thread dennis zhuang
You may have to use macro:

user=> (defmacro invoke [obj sym] `(. ~obj ~sym))
#'user/invoke
user=> (invoke 1 toString)
"1"

2015-10-19 6:54 GMT+08:00 Timur :

> Hi all,
>
> Is there anyway to call an object member using its symbol?
>
> For instance we have an object o, we get the symbol of a method, e.g.,
> toString, of our object o using clojure.reflect/reflect and and I want to
> execute this method on this object through the symbol.
>
> For instance *(. obj sym)* throws an exception. Here symbol for instance
> contains toString
>
> Any ideas about how I can do this?
>
> Regards,
>
> Timur
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
庄晓丹
Email:killme2...@gmail.com xzhu...@avos.com
Site:   http://fnil.net
Twitter:  @killme2008

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Calling object members with symbols

2015-10-18 Thread Michael Blume
Nope, still won't work.

(let [s 'toString] (invoke 1 s))

java.lang.IllegalArgumentException: No matching field found: s for class
java.lang.Long



On Sun, Oct 18, 2015 at 5:51 PM dennis zhuang  wrote:

> You may have to use macro:
>
> user=> (defmacro invoke [obj sym] `(. ~obj ~sym))
> #'user/invoke
> user=> (invoke 1 toString)
> "1"
>
> 2015-10-19 6:54 GMT+08:00 Timur :
>
>> Hi all,
>>
>> Is there anyway to call an object member using its symbol?
>>
>> For instance we have an object o, we get the symbol of a method, e.g.,
>> toString, of our object o using clojure.reflect/reflect and and I want to
>> execute this method on this object through the symbol.
>>
>> For instance *(. obj sym)* throws an exception. Here symbol for instance
>> contains toString
>>
>> Any ideas about how I can do this?
>>
>> Regards,
>>
>> Timur
>>
>> --
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to clojure+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> 庄晓丹
> Email:killme2...@gmail.com xzhu...@avos.com
> Site:   http://fnil.net
> Twitter:  @killme2008
>
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Calling object members with symbols

2015-10-18 Thread James Reeves
On 18 October 2015 at 23:54, Timur  wrote:

> Hi all,
>
> Is there anyway to call an object member using its symbol?
>
> For instance we have an object o, we get the symbol of a method, e.g.,
> toString, of our object o using clojure.reflect/reflect and and I want to
> execute this method on this object through the symbol.
>
> For instance *(. obj sym)* throws an exception. Here symbol for instance
> contains toString
>
> Any ideas about how I can do this?
>

eval is probably the most straightforward way to achieve this:

(eval `(. ~obj ~sym))

I'm uncertain of the performance of this compared to using the Java
reflection API, but it's a lot easier to write.

- James

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Calling object members with symbols

2015-10-18 Thread dennis zhuang
In such case you have to use `eval`, another post

https://groups.google.com/forum/#!topic/clojure/YJNRnGXLr2I

2015-10-19 9:10 GMT+08:00 James Reeves :

> On 18 October 2015 at 23:54, Timur  wrote:
>
>> Hi all,
>>
>> Is there anyway to call an object member using its symbol?
>>
>> For instance we have an object o, we get the symbol of a method, e.g.,
>> toString, of our object o using clojure.reflect/reflect and and I want to
>> execute this method on this object through the symbol.
>>
>> For instance *(. obj sym)* throws an exception. Here symbol for instance
>> contains toString
>>
>> Any ideas about how I can do this?
>>
>
> eval is probably the most straightforward way to achieve this:
>
> (eval `(. ~obj ~sym))
>
> I'm uncertain of the performance of this compared to using the Java
> reflection API, but it's a lot easier to write.
>
> - James
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
庄晓丹
Email:killme2...@gmail.com xzhu...@avos.com
Site:   http://fnil.net
Twitter:  @killme2008

-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.