Re: Newbie question on OO/records

2011-11-06 Thread Alan Malloy
On Nov 5, 10:43 pm, Baishampayan Ghose wrote: > > Okay, I'm trying to understand records. I read this article: > >http://freegeek.in/blog/2010/05/clojure-protocols-datatypes-a-sneak-p... > > (Clojure Protocols & Datatypes - A sneak peek by Baishampayan Ghose. I > > found it helpful, but the usage

Re: Newbie question on OO/records

2011-11-06 Thread Baishampayan Ghose
>> Records & Protocols are indeed a way of achieving polymorphism and is >> quite similar to class-based single dispatch found in Java, etc. Thus >> the calling conventions can look quite familiar. >> >> Having said that, records & protocols are fundamentally different from >> class based OO since

appengine-magic + servlets

2011-11-06 Thread Razvan Rotaru
Hi, appengine-magic (https://github.com/gcv/appengine-magic) uses ring- handlers to turn into servlets that are accepted by GAE. Does anybody know how to use servlets directly with appengine-magic? I'm not using ring, I have a servlet which I need to feed to appengine-magic. Thanks, Razvan -- Y

Re: anyone interested in a small game?

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 30.10.2011 19:32, schrieb Dennis Haupt: > hi community, > > i decided to create a (small) game in clojure to get a bit of > non-theoretical experience. i'm pretty much a clojure noob (only > did a few experiments) but have done a few real things i

Re: problems of a newbie

2011-11-06 Thread Razvan Rotaru
I remember having the same frustrations some time ago. Not that they are gone now. :) It obviously depends on the tool, and these code analysis you describe you get only in IDEs. I don't know what tool you are using now, but you have them all described in the Getting Started page (http:// dev.cloju

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 06.11.2011 11:33, schrieb Razvan Rotaru: > I remember having the same frustrations some time ago. Not that > they are gone now. :) It obviously depends on the tool, and these > code analysis you describe you get only in IDEs. I don't know what > too

Re: problems of a newbie

2011-11-06 Thread Colin Yates
I have a hunch (as oppose to IME as I don't have any yet :)) that Clojure doesn't require as much due to at least the following points: - there is much less incidental complexity and ceremony required to manage (and therefore refactor) - implementations in Clojure require more thought and are m

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 06.11.2011 13:44, schrieb Colin Yates: > I have a hunch (as oppose to IME as I don't have any yet :)) that > Clojure doesn't require as much due to at least the following > points: > > - there is much less incidental complexity and ceremony requir

Re: problems of a newbie

2011-11-06 Thread Colin Yates
But aren't the "edge cases" fewer given the notion that functions should be entirely defined by their inputs as oppose to being dependant on mutable state external to he function, in the most part. I am agreeing with you, and find these real world experiences incredibly useful. Sent from my iPad

Re: Question:Multi-Core processor affinity for load balancing Clojure Web apps

2011-11-06 Thread Gary Trakhman
it seems like the only difference would be 4 garbage collectors working on smaller heaps, however there would be much more memory overhead that way. I assume if you can load-balance your app like that, that it is stateless, and won't use a whole bunch of static memory. You might do better wit

ClojureScript and CouchDB?

2011-11-06 Thread Antonio Recio
I would like to use ClojureScript to interact with databases. Which is the database engine that you recommend me to use with ClojureScript? Is CouchDB most recommendable than PostgreSQL? Do you know some project using ClojureScript to interact with databases? -- You received this message beca

Re: appengine-magic + servlets

2011-11-06 Thread Mark Rathwell
> I'm not using > ring, I have a servlet which I need to feed to appengine-magic. Not sure what you mean by this, could you expand on it a little more? You have an existing Java servlet that you want to handle some url pattern, and you want to integrate that into your appengine-magic app? On Sun,

Re: ClojureScript and CouchDB?

2011-11-06 Thread Chas Emerick
On Nov 6, 2011, at 9:24 AM, Antonio Recio wrote: > I would like to use ClojureScript to interact with databases. > Which is the database engine that you recommend me to use with ClojureScript? > Is CouchDB most recommendable than PostgreSQL? > Do you know some project using ClojureScript to in

Re: appengine-magic + servlets

2011-11-06 Thread Razvan Rotaru
I want integration of servlet in appengine-magic. Documentation describes that you use a ring handler to call def- appengine-app: (appengine-magic.core/def-appengine-app my-app #'my-ring-handler) I have a servlet and want to build an application, something like: (appengine-magic.core/def-appeng

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 "special cases" that depend on mutable state are evil. i avoid mutable states as much as possible, no matter which language i am using. what i meant were cases where i roughly think about 3/4 of all cases, start coding and along the way i notice that i

Re: problems of a newbie

2011-11-06 Thread Colin Yates
I suspect programming in clojure effectively is as much about changing the *way* you develop as much as it is about about the shape of the solution. It sounds as if you are suggesting this is so. I am about to start my first clojure project tomorrow which is to replace an existing web app which i

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 06.11.2011 18:11, schrieb Colin Yates: > I suspect programming in clojure effectively is as much about > changing the *way* you develop as much as it is about about the > shape of the solution. It sounds as if you are suggesting this is > so. yes.

Re: appengine-magic + servlets

2011-11-06 Thread Mark Rathwell
I'm still not quite following. What appengine-magic does is provides Clojure wrappers for many of the App Engine for Java service APIs, and from a ring handler creates a servlet suitable for deployment to App Engine. If you already have the servlet, I'm not sure why you need appengine-magic. Whe

Re: Korma - cannot acquire connections

2011-11-06 Thread AndyK
My mistake in the original post - that should've read (sql/defenity mytable) Two seprate forms - the defentity + the select. On Nov 4, 3:21 pm, Base wrote: > Did you mean to define the select within the defentity? > > (sql/defentity mytable    (sql/select mytable (sql/fields :id) (sql/ > where {:

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sunday, November 6, 2011, Dennis Haupt wrote: > this is a double edged sword. you *do* get it right *if* you think it > through, but reality is often more complex than you assume. if you > suddenly see that you forgot to handle special case x, you are > punished harder than in . I'll go a litt

Re: Solving this with logic programing

2011-11-06 Thread Michael Jaaka
Well, despite of fact that core.logic is fine tool and is worth of study, I have implemented own solution to my problem. Here is a full implementation: http://pastebin.com/Z5BETZd3 And the idea is to index each value in record perserving the record and meaning of values. Then search by these va

Stanford ai-class

2011-11-06 Thread finbeu
Hi who is taking the Stanford ai-class with Peter Norvig and Sebastian Thrun? I remember there was a thread on this group in august. I'm doing now the advanced track and it is a lot of fun although we have no programming assignments (was dropped because of mass enrollment of 140K students). The

Re: ClojureScript and CouchDB?

2011-11-06 Thread David Nolen
If you want to have a lot of database options you could target Node.js. David On Sunday, November 6, 2011, Antonio Recio wrote: > I would like to use ClojureScript to interact with databases. > Which is the database engine that you recommend me to use with ClojureScript? > Is CouchDB most recomm

Re: problems of a newbie

2011-11-06 Thread finbeu
I second your comment regarding the PGP sig. -- 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 un

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 19:06, schrieb Sean Corfield: > On Sunday, November 6, 2011, Dennis Haupt > wrote: >> this is a double edged sword. you *do* get it right *if* you think it >> through, but reality is often more complex than you assume. if you >> suddenly see that you

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 11:12 AM, Dennis Haupt wrote: > let me guess: you had some classes that were used more than they should > have been because they were the best match and introducing a better one > would have taken more time - and since they could do so much, they were > just used at more and

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 20:56, schrieb Sean Corfield: > On Sun, Nov 6, 2011 at 11:12 AM, Dennis Haupt > wrote: >> let me guess: you had some classes that were used more than they should >> have been because they were the best match and introducing a better one >> would have taken more time - and since they

Re: appengine-magic + servlets

2011-11-06 Thread Razvan Rotaru
The servlet is coming from an external jar, which is written in Java. I need appengine-magic for the other services, like datastore. Razvan On Nov 6, 7:45 pm, Mark Rathwell wrote: > I'm still not quite following.  What appengine-magic does is provides > Clojure wrappers for many of the App Engin

Re: appengine-magic + servlets

2011-11-06 Thread Mark Rathwell
I'm still having trouble figuring out what it is you are wanting to do, but if you have an existing Java servlet that will handle some url pattern, and you want to write an appengine-magic app that will create a servlet to handle some other url pattern, and use both servlets in one app engine app,

Re: problems of a newbie

2011-11-06 Thread Alex Baranosky
The problem with Java is you can write a ton of it easily with Intellij (my facorite IDE), but Intellij cant read that code for you, so now you have a novel to wade through when the code is revisited. On Nov 6, 2011 11:49 AM, "Dennis Haupt" wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1

Re: problems of a newbie

2011-11-06 Thread Dennis Haupt
Am 06.11.2011 22:00, schrieb Alex Baranosky: > The problem with Java is you can write a ton of it easily with Intellij > (my facorite IDE), but Intellij cant read that code for you, so now you > have a novel to wade through when the code is revisited. after some time, your brain will filter the cl

Re: clojure-test-mode

2011-11-06 Thread Chris Jenkins
Did you ever figure out what was causing this? I'm on clojure-mode 1.11.2 with Clojure 1.3. When I run clojure-test-run-tests from within emacs, I see "error in process filter: Invalid read syntax: "#"" in the status mini buffer. The tests do seem to run ok but I'm curious what is going on. On 19

Re: A question on deftest- macro.

2011-11-06 Thread Young Kim
Thanks a lot, Phil! I agree with you because your soultion can be a good workaround. But I want to know the reason why the deftest- macro is not working as intended. Could you tell me why? Did the developer of the deftest- macro write a incorrect code or am I wrong in understanding the prupose o

Another newbie question

2011-11-06 Thread pron
Hi. I'm new to Clojure, and enjoy using it very much. It's been years since I learned Scheme back in college, and it's a pleasure going back to lisp. I do, however, have a question regarding real-world Clojure use in large teams. While I clearly understand the pros of common data access/manipul

Re: problems of a newbie

2011-11-06 Thread Milton Silva
On Nov 5, 12:16 pm, Dennis Haupt wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > hi, > > i'm half done with my asteroids clone. i stumbled over a few problems > and wanted to know how others already solved them :) > > i am used to "less concrete programming". i ask my tools to do the

Twitterbuzz Clojurescript sample

2011-11-06 Thread Bayard Randel
The following is more an observation than a problem. While investigating Clojurescript my first port of call after reading the initial documentation was to read through the sample code provided. Naturally one of the first questions a beginner is going to ask when looking at Clojurescript is, how d

Re: problems of a newbie

2011-11-06 Thread aboy021
In terms of Clojure refactoring tools the ones that looks most promising to me are Emacs with Paredit, Swank, and Slime and, hopefully as it matures, Clojure-refactoring (https://github.com/ joodie/clojure-refactoring). Chas Emerick did a blog post last year that talks about what he would want in

Re: Korma - cannot acquire connections

2011-11-06 Thread David Cabana
This worked for me, with mysql 5.1 on Ubuntu Natty. The clojure_test library and fruit table already existed. (ns foo.core (use [korma.db]) (use [korma.core])) (defdb mydb {:subprotocol "mysql" :subname "//127.0.0.1:3306/clojure_test" :user "clojure_test"

Re: Clojure Conj extracurricular activities spreadsheet

2011-11-06 Thread Christopher Maier
I'm interested in attending the core.logic, overtone, literate programming, web, and clojurescript sessions. Thanks! -Chris -- 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 post

Speculative Execution

2011-11-06 Thread daly
One of the benefits of immutable data structures is the ability to do speculative execution. You can compute an answer and if you don't like it you can just abandon it. This is useful for techniques like backtracking. I don't see this idea mentioned anywhere in Clojure but I think it would make

Re: Speculative Execution

2011-11-06 Thread David Nolen
Yup. core.logic uses persistent hash maps to store logic variable bindings. David On Sun, Nov 6, 2011 at 10:32 PM, daly wrote: > One of the benefits of immutable data structures is the > ability to do speculative execution. You can compute an > answer and if you don't like it you can just aband

Re: problems of a newbie

2011-11-06 Thread Scott Jaderholm
On Sun, Nov 6, 2011 at 11:33 AM, Milton Silva wrote: > On Nov 5, 12:16 pm, Dennis Haupt wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > hi, > > > > i'm half done with my asteroids clone. i stumbled over a few problems > > and wanted to know how others already solved them :)

Re: Another newbie question

2011-11-06 Thread Daniel Pittman
On Sun, Nov 6, 2011 at 03:56, pron wrote: > Hi. I'm new to Clojure, and enjoy using it very much. It's been years since > I learned Scheme back in college, and it's a pleasure going back to lisp. > I do, however, have a question regarding real-world Clojure use in large > teams. While I clearly u

cljr install makes .cjr directory

2011-11-06 Thread jayvandal
Whay does cljr-installer.jar make directories with .(period) in front of the dir name as .cljr and .lein and m2. -- 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 me

Re: Another newbie question

2011-11-06 Thread Phlex
On 6/11/2011 12:56, pron wrote: E.g., one developer may add a keyword to a map for one purpose, and another, use the same keyword for a different purpose. With classes, all data manipulation for a single type is located in one place, so such clashes can easily be prevented, let alone the fact t

Clojurescript browser repl woes

2011-11-06 Thread Praki
Hi, I have a clojurescript app which connects to a repl server. But it never worked, always hanging in evaluating the expression. As the repl sample app which comes with clojurescript worked, I soon managed to establish that my browser repl works as expected if I don't run my application code (whi

Re: problems of a newbie

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 12:15 PM, Dennis Haupt wrote: > if by compatible you mean "has a specific set of functions and fields", > then scala can do that without sacrificing static type safety: Yes, I started working with Scala in 2009 and it's certainly much better than Java but it still forces yo

Re: Another newbie question

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 3:56 AM, pron wrote: > I realize there are always tradeoffs, and perhaps the pros outweigh the > cons, but I would like to know how you deal with such problems, that > invariably arise in large-team development. Why do you think this sort of problem is invariably going to a

Re: cljr install makes .cjr directory

2011-11-06 Thread Sean Corfield
On Sun, Nov 6, 2011 at 8:51 PM, jayvandal wrote: > Whay does cljr-installer.jar make directories  with .(period) in front > of the dir name as .cljr and .lein and m2. .(program-name) is fairly standard for programs to store configuration. .m2 is the local repository cache for Maven 2. .lein is