Hi. I have a java class that has 2 methods with same but different arities
(one take no arguments, other takes 1 argument). I create a proxy that
overrides both this methods. The problem is that if no-arg method is called
from this java class - base implementation is called instead of proxie's.
Hi,
I am very new to Clojure and functional programming in general. I am game
development enthusiast(although did nothing more than a tetris clone in
python and C). As far as i've seen OpenGL, it's mostly state manipulation
and seems to me like completely against Clojure's philosophy. Could
Titon,
Not Clojure, but this blog series will give you an idea about how to
implement games of the Tetris sort in a FP language -
http://prog21.dadgum.com/23.html
Regards,
BG
On Tue, Oct 30, 2012 at 12:00 AM, titon barua titani...@gmail.com wrote:
Hi,
I am very new to Clojure and functional
The usual approach to this kind of things is to have a Functional
representation of the world, that contains the game logic. To have
pure functions that modifies the world with the time and inputs of
players.
And everytime you want to render a frame to call a render function
that does all the
Hi,
Am Dienstag, 30. Oktober 2012 08:14:22 UTC+1 schrieb Nikita Beloglazov:
Hi. I have a java class that has 2 methods with same but different arities
(one take no arguments, other takes 1 argument). I create a proxy that
overrides both this methods. The problem is that if no-arg method is
In a few lines:
Monads are a common framework to represent any sequential computation.
What is a sequential computation?
- either no computation at all.
return :: a - m a
does that.
- or I have already a computation and want to go on with my computation.
But then, I need to be able to look
Thank you, Meikel. Seem I'll need to move to gen-class instead :(
Nikita
On Tuesday, October 30, 2012 12:41:41 PM UTC+3, Meikel Brandmeyer (kotarak)
wrote:
Hi,
Am Dienstag, 30. Oktober 2012 08:14:22 UTC+1 schrieb Nikita Beloglazov:
Hi. I have a java class that has 2 methods with same but
Is someone using clj-soap? I tried and it fails with the same error.
On Friday, July 13, 2012 4:35:39 AM UTC+2, Sean Corfield wrote:
On Thu, Jul 12, 2012 at 7:34 PM, Sean Corfield
seanco...@gmail.comjavascript:
wrote:
When I looked at (soap/client-proxy
I find this behaviour quite unfortunate because I now have to explicitly
test
for nil? and ensure consistent behaviour.
Yes, especially unfortunate considering that Rich said the reducers lib
could be used as a drop in replacement for core to speed up programs, or
something along the
I cannot say for sure whether this is something that would interest you
but I'm currently writing a library just for this reason...That is,
developing games in Clojure. I am sort of giving emphasis to board games
but I don't see why one could not build tetris or sudoku or monopoly etc
etc...My
I've also run into this. Maybe this is just an oversight, since clojure
handles nils gracefully almost everywhere else.
Should CollFold and IKVReduce be extended to nil, or is there some
rationale against it?
--
You received this message because you are subscribed to the Google
Groups Clojure
Hello Clojurians.
Normally by some IEEE floating-point standard, division by 0.0 should
give Infinity (or NaN if the divisor is also 0.0). This is the case
when using primitive doubles in clojure:
(/ 1.0 0.0)
= Infinity
And even when using boxed Doubles in java:
public class
On Tue, Oct 30, 2012 at 2:41 AM, nicolas.o...@gmail.com
nicolas.o...@gmail.com wrote:
It is not clear whether you can have maximal performance with this
approach, in Clojure, on the JVM, but you can surely do something
decent.
btw, i think some folks have mentioned these trade-offs before:
Thanks for checking - I confirmed that it seems to work when you use the repl
in the out-of-the-box lein-cljsbuild environment with a browser.
However, I've moved to a single server set-up with noir/ring running on the
repl-server, and there the printing doesn't work… but it does when I assign
FWIW, since I said I had made some progress in this thread, I
eventually gave up and went with raw Java SOAP API calls (Axis 1.x)
and Java classes generated by wsdl2java since I really only needed a
one-off solution. I stopped looking at clj-soap in late July...
Sean
On Tue, Oct 30, 2012 at 3:00
I'm playing around with core.logic, and have this code so far:
https://gist.github.com/3981557
There are 2 people and 3 tasks. Each task has a start time (you can't start
the task until this time or later), and end time (you must finish the task
by this time), and a duration (how long it takes
On Tuesday, October 30, 2012 3:00:07 AM UTC-4, titon barua wrote:
I for one would like some good and maintained wrappers for input and
graphics in Clojure - like SDL and OpenGL.
For graphics, you might have a look at [quil]. It makes use of the
[Processing] graphics environment.
[quil]:
On Tue, Oct 30, 2012 at 1:11 PM, Anthony Rosequist
anthony.rosequ...@gmail.com wrote:
I'm playing around with core.logic, and have this code so far:
https://gist.github.com/3981557
There are 2 people and 3 tasks. Each task has a start time (you can't
start the task until this time or
Check out Penumbra : https://github.com/ztellman/penumbra
I'm currently working on a side-project that integrates Penumbra and
JBox2D. It's really just in its beginning phases, but I'm trying to find
functional ways of updating the game state. However, I still end up using
atoms for global
Thanks for this. I think I'm getting somewhere, but I'm still having some
problems.
I'm trying to use lein-localdeps. I seem to have been able to install the
jar to my local repository, but when I run lein deps it says it can't find
it.
Also, I have some native dependencies that aren't being
I executed the same test in java and got infinity as a result. What
version of the JDK are you using? I'm using 1.7
On Tuesday, 30 October 2012 11:10:17 UTC-4, Tim Olsen wrote:
Hello Clojurians.
Normally by some IEEE floating-point standard, division by 0.0 should
give Infinity (or NaN
+1 for clojure-doc.org. As a beginner, i greatly appreciate your efforts
and think this solves the 'lack of beginner friendly documentation' problem
very well. Keep up the good work. :)
On Monday, October 29, 2012 3:57:36 AM UTC+6, Michael Klishin wrote:
## TL;DR
The Clojure documentation
Very interesting read. Thanks for pointing out. :)
On Tuesday, October 30, 2012 2:04:39 PM UTC+6, Baishampayan Ghose wrote:
Titon,
Not Clojure, but this blog series will give you an idea about how to
implement games of the Tetris sort in a FP language -
http://prog21.dadgum.com/23.html
I take it you are referring to the difference in capitalization. I am
using java 1.7.0_07 on Mac OS X 10.7.5.
$ java -version
java version 1.7.0_07
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
On Tue, Oct 30, 2012 at 2:35
As I tested, looks like when either of the args are double ie. 1.0 instead
of 1
then the code that checks for and shows divide by zero is not reached,
which is this code:
static public Number divide(Object x, Object y){
Ops yops = ops(y);
if(yops.isZero((Number)y))
throw new
Upon further research looks like:
= *(/ 1 0.0)*
Infinity
triggers this method: clojure.lang.Numbers.*divide(long, double)*
*static public double divide(long x, double y){
return x / y;
}*
=* (/ 1.0 0)*
Infinity
triggers this method: clojure.lang.Numbers.*divide(double, long)*
*static public
I've resorted to explicitly calling compile from the REPLin CCW projects.
It's not the best system, but it works.
On Tuesday, 30 October 2012 14:17:47 UTC-4, JvJ wrote:
Thanks for this. I think I'm getting somewhere, but I'm still having some
problems.
I'm trying to use lein-localdeps.
i'm trying to get a graph database running on my machine, and when i run
lein deps (after rm -rf ~/.m2 and $PROJECT_DIR/lib ) i keep seeing this:
[INFO] Unable to find resource 'com.sun.xml.bind:jaxb-impl:jar:2.1.12' in
repository ghelmling.testing (http://people.apache.org/~garyh/mvn/)
This article might be of interest:
http://clojurefun.wordpress.com/2012/09/03/ironclad-steam-legions-clojure-game-development-battle-report/
I haven't had much experience with game development in Clojure myself,
although one of the first real projects I made with Clojure was a simple
Tetris
Maybe try creating ~/.m2
On Tue, Oct 30, 2012 at 9:23 PM, Mark Neyer mne...@gmail.com wrote:
i'm trying to get a graph database running on my machine, and when i run
lein deps (after rm -rf ~/.m2 and $PROJECT_DIR/lib ) i keep seeing this:
[INFO] Unable to find resource
nope, same problem. i didn't post the entire console log spam before it
crashes; it successfully gets a bunch of libraries, but seems to get stuck
on jetty/servlet-api - and it always appears to get stuck there.
is there any way i can see what zip file it was trying to open?
On Tuesday,
I cannot access http://m1.dev.java.net/ I'm getting server not found.
Maybe it's unrelated.
But the zip file is a .jar file, it's possible it's either 0 bytes or
incomplete - my guess.
you can set env var DEBUG to y so lein will spit more info
On Tue, Oct 30, 2012 at 9:55 PM, Mark Neyer
On Tue, Oct 30, 2012 at 9:57 PM, AtKaaZ atk...@gmail.com wrote:
I cannot access http://m1.dev.java.net/ I'm getting server not found.
Maybe it's unrelated.
oh i see that this is the repo name, my bad.
But the zip file is a .jar file, it's possible it's either 0 bytes or
incomplete - my
Someone said this
I solved this by clearing the jboss-x.y.z/server[config]/tmp and
jboss-x.y.z/server/[config]/work directories.
Not sure if this at all applies to you
On Tue, Oct 30, 2012 at 9:58 PM, AtKaaZ atk...@gmail.com wrote:
On Tue, Oct 30, 2012 at 9:57 PM, AtKaaZ
Using your provided project.clj
and lein2 from master
I was able to successfully run lein deps
Here's a part of the output:
...
Retrieving org/mortbay/jetty/jsp-api-2.1/6.1.14/jsp-api-2.1-6.1.14.jar
(132k) fr
om central
Retrieving
How come you got this message?
*Copying 91 files to /home/mark/gc/src/titan-test-**case/lib*
Did you use a different project.clj which has
:native-path
?
Because it seems it's happening when trying to extract the native deps from
a jar into the lib folder in your project.
I tried adding
Extremely new to clojure, so most of what I write feels really cumbersome.
Was curious is I'm allowed to post code to get opinions on.
--
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
I would think so.
But to maximise your chances of getting useful help, it is often
better to post small pieces of codes and explain what
you are trying to achieve with them.
Best,
Nicolas.
--
You received this message because you are subscribed to the Google
Groups Clojure group.
To post to
i haven't set nativepath
it looks like aptitude installed lein 1.7
i downloaded lein2, and it works. thanks so much man! 3
On Tuesday, October 30, 2012 2:38:53 PM UTC-7, AtKaaZ wrote:
How come you got this message?
*Copying 91 files to /home/mark/gc/src/titan-test-**case/lib*
Did you use a
In addition to suggestion by Nicolas, you should also feel free to pop on
IRC and join #clojure.
Posting a question and gist in IRC is a great way to get quick feedback,
advice, and general help.
Paul
On Tuesday, October 30, 2012 2:50:27 PM UTC-7, Sean S wrote:
Extremely new to clojure, so
The concept of selection bias is only applicable when you are trying to get a
representative sample of a population.
I don't think the idea of the discussion is to go by majority vote. It is to
find a process that meets the criteria decided upon by the Clojure/core
members. I'm not one of
2012/10/31 Andy Fingerhut andy.finger...@gmail.com
I don't think the idea of the discussion is to go by majority vote
It's not about making decisions by majority vote, Andy. It is about
making sure many members of the community can *participate* or even
simple be aware of important
On Oct 30, 2012, at 3:58 PM, Michael Klishin wrote:
2012/10/31 Andy Fingerhut andy.finger...@gmail.com
I don't think the idea of the discussion is to go by majority vote
It's not about making decisions by majority vote, Andy. It is about
making sure many members of the community can
Code from Team 2
https://gist.github.com/3983804
Thanks for another fun dojo...
Andrew
On Monday, 22 October 2012 12:20:35 UTC+1, Bruce Durling wrote:
Roll up! Roll up!
On Tuesday 30 October we'll be having another clojure dojo, this time
hosted by ThoughtWorks. Details and sign up
On Tue, Oct 30, 2012 at 1:11 PM, Anthony Rosequist
anthony.rosequ...@gmail.com wrote:
I'm playing around with core.logic, and have this code so far:
https://gist.github.com/3981557
It might help to understand exactly what kind of output were you expecting.
David
--
You received this
MVC / Observer in Immutable Data
Can You please explain what are analogues of MVC / Observer techniques in
two cases:
1. Immutable Objects (OOP style)
2. Immutable Data (functional style)
For example let's consider following simple GUI example (You can try it
live here
I also happened to read an interesting
articlehttp://www.altdevblogaday.com/2012/04/26/functional-programming-in-c/recently
about functional programming by John
Carmack http://en.wikipedia.org/wiki/John_D._Carmack.
On Tuesday, October 30, 2012 9:00:07 AM UTC+2, titon barua wrote:
Hi,
I am
Hello all,
I have the following code:
(def my-hash {1 {:a-key {:value a value} :another-key another value
:a-third-key []}
2 {:a-key {:value a value} :another-key another
value :a-third-key []}}
In the following example i get the following result:
user= (doseq [[id
Hi, all.
I am reading Clojure in Action.
In the scope section of Chapter3, there are examples like this:
defn twice [x]
(println original function)
(* 2 x))
(defn call-twice [y]
(twice y))
(defn with-log [function-to-call log-statement]
(fn [ args]
On Tuesday, October 30, 2012 6:48:28 PM UTC-5, David Nolen wrote:
On Tue, Oct 30, 2012 at 1:11 PM, Anthony Rosequist
anthony@gmail.comjavascript:
wrote:
I'm playing around with core.logic, and have this code so far:
https://gist.github.com/3981557
It might help to understand
As of Clojure 1.3 you need to mark things you with to re-bind
explicitly as dynamic:
(defn ^:dynamic twice [x]
...)
On Tue, Oct 30, 2012 at 7:42 PM, Satoru Logic satorulo...@gmail.com wrote:
Hi, all.
I am reading Clojure in Action.
In the scope section of Chapter3, there are examples
The code works as written in Clojure 1.2 and 1.2.1.
It doesn't in 1.3 and later, unless you change the definition of twice to
annotate that it is a dynamic var, like so:
(defn ^:dynamic twice [x]
(println original function)
(* 2 x))
With that change, it works in Clojure 1.3 and later.
Please use prn insteadof println. By default, pr and prn print in a way
that objects can be read by the reader,but print and println produce output
for human consumption.
2012/10/31 arekanderu arekand...@gmail.com
Hello all,
I have the following code:
(def my-hash {1 {:a-key {:value a
On Tue, Oct 30, 2012 at 8:58 PM, Anthony Rosequist
anthony.rosequ...@gmail.com wrote:
(conde
[(!= person1 person2)]
[(=fd start2 start1) (=fd end2 start1)]
[(=fd end1 start2) (=fd end1 end2)])
Here's a version that at least guarantees that people aren't appearing in
the task list
On Tuesday, October 30, 2012 9:26:25 PM UTC-5, David Nolen wrote:
Even so I don't really understand the time conditions you've described at
all. Can you please clarify or draw a simple picture with text what results
you are expecting? I'm a bit confused by your task facts in particular, for
Yes, it's very unfortunate that Manning released Clojure in Action
without a final pass to make it Clojure 1.3 compatible. I talked to
them about it when they still had time to make changes but they
decided to go ahead and publish a book that is tightly wedded to
Clojure 1.2 after Clojure 1.3 had
Could you please recommend a book that's more up-to-date?
On Wednesday, October 31, 2012 11:26:48 AM UTC+8, Sean Corfield wrote:
Yes, it's very unfortunate that Manning released Clojure in Action
without a final pass to make it Clojure 1.3 compatible. I talked to
them about it when they
Does this mean vars are dynamic by default prior to Clojure1.3, and lexical
afterwards?
On Wednesday, October 31, 2012 9:36:47 AM UTC+8, Andy Fingerhut wrote:
The code works as written in Clojure 1.2 and 1.2.1.
It doesn't in 1.3 and later, unless you change the definition of twice to
I updated my gist with a solution that's working:
https://gist.github.com/3981557
Unfortunately, I had to copy my conde expression 3 times (to cover all
combinations of the three tasks). So, what I really need to know is if
there's a way for me to write those three condes as one goal that
On Tue, Oct 30, 2012 at 8:38 PM, Satoru Logic satorulo...@gmail.com wrote:
Could you please recommend a book that's more up-to-date?
Clojure Programming http://www.clojurebook.com/ would be my first choice.
Programming Clojure 2nd Edition
http://pragprog.com/book/shcloj2/programming-clojure
Thanks
On Wednesday, October 31, 2012 12:41:24 PM UTC+8, Sean Corfield wrote:
On Tue, Oct 30, 2012 at 8:38 PM, Satoru Logic
sator...@gmail.comjavascript:
wrote:
Could you please recommend a book that's more up-to-date?
Clojure Programming http://www.clojurebook.com/ would be my first
61 matches
Mail list logo