Re: Polymorphic protocols and containers....

2010-11-04 Thread Christophe Grand
On Fri, Nov 5, 2010 at 1:39 AM, Mike Meyer < mwm-keyword-googlegroups.620...@mired.org> wrote: > It seems like the polymorphism of protocols breaks inside the > methods. This is a problem for having a function that's polymorphic > between an object and a container of the same objects. > > For inst

Re: Reloading java classes

2010-11-04 Thread Christophe Grand
If you launched your repl as a debug process in an IDE code hotswap may work to some extent too. Christophe On Friday, November 5, 2010, Dave Newton wrote: > JRebel is still the best answer. Loading a class at runtime is non- trivial. > I don't know how it deals with handling existing instances

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
Not to discourage discussion here, but in case anybody missed it in the blog post, we have a google group now if anybody wants to discuss what they're doing, considering doing, or any ideas. http://groups.google.com/group/tryclojure -- You received this message because you are subscribed to the G

clojure-mini kanren implementation of nonvar

2010-11-04 Thread Sunil S Nandihalli
Hello everybody, I know that mini-kanren does not have "nonvar" I was trying to emulate its effect by using (cond-u ((& x :unassigned) fail) (succeed)) The idea is if x is not assigned it would successfully unify with :unassigned (ofcourse I am assuming that none of the valid values can be

Re: Some questions about Clojure Protocols

2010-11-04 Thread David Nolen
On Thu, Nov 4, 2010 at 10:17 PM, ka wrote: > > May I ask a heretic question: Why don't you specify the contract in the > docstring of the protocol? > > (defprotocol Coolness > "Yadddayaddablablablubber. > Cool things have to be Comparable and Serializable." > (x .. "Since 'this' is cool i ass

Re: Tryclojure - A Call To Action

2010-11-04 Thread Vilson Vieira
2010/11/4 Rayne : > There is lots to do! If you're decent with web design, then check out > the current design and see if you can make it better. I'm sure the > HTML is a mess, and heaven knows the CSS is probably a disaster, so > maybe you can help out with that. Making tryclojure look good is > i

Re: Reloading java classes

2010-11-04 Thread Dave Newton
JRebel is still the best answer. Loading a class at runtime is non- trivial. I don't know how it deals with handling existing instances of the class, though; I still think CLOS got that right. Dave On Nov 4, 2010 10:03 PM, "Seth" wrote: > All i need to do is a function to reload a class I specif

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
It's currently hosted on Heinz's (Licenser's) server, which runs apache. On Nov 4, 9:22 pm, pete mcquain wrote: > Ok, sounds good (branch).  What stack/host is it being hosted on now?I've > got a couple crazy AppEngine ideas that have been floating around for the > past week or so.  Could be a go

Re: Reloading java classes

2010-11-04 Thread Seth
All i need to do is a function to reload a class I specify, nothing fancy. Surely there is some way? -- 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 mod

Re: Meta-circular STM for teaching purposes

2010-11-04 Thread ka
Hi Tom, I might not be even remotely qualified but since I'm interested and find the idea cool, so here's my take: > - has anyone already experimented with a toy STM in Clojure for didactic > purposes? No idea :) > - what would be a good resource to start such a design from? (my current plan

Re: Tryclojure - A Call To Action

2010-11-04 Thread Vilson Vieira
Rayne I loved try clojure! Congrats! I really want to help but running out of time for now. I'll take my hands on that as soon as possible. Cheers. 2010/11/4 Rayne : > Right. One of the most important aspects of a site like this is it's > tutorial. The tutorial should be interactive, much like tr

Re: A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread David Nolen
On Thu, Nov 4, 2010 at 7:09 PM, Jacek Laskowski wrote: > > It begs a question then, why would I do that? Where would that be of use? The behavior has changed, for some context: http://clojure-log.n01se.net/date/2010-10-18.html#12:12c -- You received this message because you are subscribed to

Re: Bug with instance? inside deftypes

2010-11-04 Thread ka
Christophe, Is it reasonable to assume that atleast the documentation should be modified to reflect the situation? -- 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 m

Re: Tryclojure - A Call To Action

2010-11-04 Thread pete mcquain
Ok, sounds good (branch). What stack/host is it being hosted on now?I've got a couple crazy AppEngine ideas that have been floating around for the past week or so. Could be a good dogfooding example in itself. -Pete - On Nov 4, 2010 9:39 PM, "Rayne" wrote: > I'd like to remind you guys that if y

Re: Some questions about Clojure Protocols

2010-11-04 Thread ka
> May I ask a heretic question: Why don't you specify the contract in the > docstring of the protocol? Yes Meikel that is exactly what I have right now. Just trying to learn and stir up a discussion here :) Most times you'll just do fine by passing 'something' to Coolness functions and expect th

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
I'd like to remind you guys that if you plan to work on something, please create an issue for it on Github and let me know, so that I can assign your name to it with a tag and we can avoid duplicating work. -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Tryclojure - A Call To Action

2010-11-04 Thread pete mcquain
Sounds good to me. I'll start looking into it. On Nov 4, 2010 9:15 PM, "Eric Lavigne" wrote: > Pete, > > Would you feel comfortable working on the jquery-console upgrade? > That's entirely a Javascript issue, and I'd be happy to find another > piece to work on. I actually prefer working in Clojure

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
I'm not sure, but I think I might have convinced Chris Done to allow pasting into the REPL. In any case, all tutorial examples are clickable (they are thrown into the REPL), which was my way of trying to work around those issues. Anybody is welcome to patch tryclojure's version of jquery-console (a

Re: Tryclojure - A Call To Action

2010-11-04 Thread Eric Lavigne
Pete, Would you feel comfortable working on the jquery-console upgrade? That's entirely a Javascript issue, and I'd be happy to find another piece to work on. I actually prefer working in Clojure, and only took on the jquery-console upgrade task because it seemed important. Let me know if you're

Re: Tryclojure - A Call To Action

2010-11-04 Thread pete mcquain
I would love to help out. I'm new to closure, but I'm a web dev by day. What can I do? On Nov 4, 2010 5:49 PM, "Rayne" wrote: > http://blog.acidrayne.net/?p=25 > > I wrote this blog post in the hopes that I can motivate people to > contribute to tryclojure. http://try-clojure.org is a relatively

Re: Tryclojure - A Call To Action

2010-11-04 Thread Ken Wesson
On Thu, Nov 4, 2010 at 8:58 PM, Rayne wrote: > That would be great. Any sort of problems with the console are very > likely to be related to jquery-console, so updating it might fix them. > > I actually hadn't heard of that bug. Probably not a good sign, since > it might mean that people spend ver

Re: Polymorphic protocols and containers....

2010-11-04 Thread Ken Wesson
user=> (defn tweek* [knob] (tweek knob)) #'user/tweek* user=> (tweek* base) Tweeked base nil user=> (deftype Box [& knobs] Tune (tweek [this] (for [knob knobs] (tweek* knob user.Box user=> (tweek (Box. base treble)) # Not lexical scope, then -- it's not the deftype macro redefining it lexicall

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
That would be great. Any sort of problems with the console are very likely to be related to jquery-console, so updating it might fix them. I actually hadn't heard of that bug. Probably not a good sign, since it might mean that people spend very little time with tryclojure. ;) On Nov 4, 7:40 pm, E

Re: Tryclojure - A Call To Action

2010-11-04 Thread Eric Lavigne
Last time I introduced someone to Clojure via try-clojure.org, he came back later and said that the console ignored him after a while, and he wasn't sure what he did wrong. We tried it together, and after a couple minutes it stopped evaluating expressions. Does this bug sound familiar? Unfortunatel

Polymorphic protocols and containers....

2010-11-04 Thread Mike Meyer
It seems like the polymorphism of protocols breaks inside the methods. This is a problem for having a function that's polymorphic between an object and a container of the same objects. For instance: user=> (defprotocol Tune (tweek [this])) Tune user=> (deftype Knob [name] Tune (tweek [this] (prin

Re: Tryclojure - A Call To Action

2010-11-04 Thread Rayne
Right. One of the most important aspects of a site like this is it's tutorial. The tutorial should be interactive, much like tryhaskell's tutorial. That's one of the biggest things that needs to be done. Beyond that, tutorial authors would be great as well. If somebody feels like writing a tutoria

Re: Tryclojure - A Call To Action

2010-11-04 Thread box
really like the site. i like the tutorial section. it would be nice if the site would focus more on examples. On Nov 4, 5:49 pm, Rayne wrote: > http://blog.acidrayne.net/?p=25 > > I wrote this blog post in the hopes that I can motivate people to > contribute to tryclojure.http://try-clojure.orgis

Re: A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread Jacek Laskowski
On Thu, Nov 4, 2010 at 8:39 PM, Laurent PETIT wrote: > c has the value "Unbound". The semantic has not changed, the way to > carry the semantic has. > > Now if you try to really "use" c, for example use it in call position, > then since Unbound implements IFn, you'll have the appropriate > except

using swig in clojure

2010-11-04 Thread Seth
Ive recently had troubles using swig in clojure getting a 'unsatisfied link exception' even though using the swig generated library worked in regular java code. I believe there was a post on this somewhere in these google groups. Anyways, I have figured out that if I place the following code in a

Re: Resources on optimizing Clojure code

2010-11-04 Thread Gary Poster
On Nov 4, 2010, at 1:32 PM, cej38 wrote: > It is wonderful that people are so willing to help with a specific > problem, and I encourage you to continue doing so, but I don't think > anyone has answered the real question. Is there material out there > that describes some of the mechanisms, tools,

Re: Python is way faster than Clojure on this task

2010-11-04 Thread Andrew Gwozdziewycz
On Thu, Nov 4, 2010 at 5:43 PM, Mike Meyer wrote: > On Thu, 4 Nov 2010 22:28:12 +0100 > Pepijn de Vos wrote: > >> Hi all, >> >> I have written a Python script to analyze Minecraft levels and render a >> graph. Then I did the same with Clojure. It takes Python 10 seconds to >> analyze a map, whi

Tryclojure - A Call To Action

2010-11-04 Thread Rayne
http://blog.acidrayne.net/?p=25 I wrote this blog post in the hopes that I can motivate people to contribute to tryclojure. http://try-clojure.org is a relatively important website that is unfortunately subpar. I hope that with the community's help, we can turn it into something spectacular. --

Re: Python is way faster than Clojure on this task

2010-11-04 Thread Mike Meyer
On Thu, 4 Nov 2010 22:28:12 +0100 Pepijn de Vos wrote: > Hi all, > > I have written a Python script to analyze Minecraft levels and render a > graph. Then I did the same with Clojure. It takes Python 10 seconds to > analyze a map, while it takes Clojure over a minute. > > After having tried d

Python is way faster than Clojure on this task

2010-11-04 Thread Pepijn de Vos
Hi all, I have written a Python script to analyze Minecraft levels and render a graph. Then I did the same with Clojure. It takes Python 10 seconds to analyze a map, while it takes Clojure over a minute. After having tried different options without any significant improvement, I am lost as to

Re: A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread Laurent PETIT
Luc is right. As to explain the behavior, see below: 2010/11/4 Jacek Laskowski : > Hi, > > Is it intended in 1.3-alpha2? I think the error message in 1.2 is way > better (although not as user friendly as I wish to). Shall I report > it? Where? How? > > devmac:~ jacek$ clj -13 > CLOJURE_DIR:  /Use

Documentation lacking for ns macro

2010-11-04 Thread Ken Wesson
The ns macro seems to be poorly documented as yet. The Namespaces page at the main Clojure site does not go into detail about its syntax; "doc ns" comes closer, with: (ns foo.bar (:refer-clojure :exclude [ancestors printf]) (:require (clojure.contrib sql sql.tests)) (:use (my.lib thi

Re: Is this bug in Google AppEngine, appengine-clj or Clojure itself?

2010-11-04 Thread Miki
FYI: 0.4.1-SNAPSHOT has this fix On Nov 3, 11:07 am, Miki wrote: > Does anybody know if this fix made it to the released jar? > > On Oct 17, 12:18 am, Mike Hinchey wrote: > > > I think it is caused by those 2 clojure bugs (which seem to be the same > > thing).  You may be able to work around tha

Re: Resources on optimizing Clojure code

2010-11-04 Thread cej38
It is wonderful that people are so willing to help with a specific problem, and I encourage you to continue doing so, but I don't think anyone has answered the real question. Is there material out there that describes some of the mechanisms, tools, ideas, etc. that will allow the average clojure u

Re: A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread lprefontaine
Rich at the Conj explained that he wanted to remove a bunch of verifications each time a value was referenced to gain some speed. The basis was of his reasoning was that an unbound value is an exception more than a common thing and all these verifications at run time were really slowing things si

Re: Some questions about Clojure Protocols

2010-11-04 Thread Meikel Brandmeyer
Hi, On 4 Nov., 08:50, Paul Hobbs wrote: > Strong type systems make programming in the large easier.  It would be nice > if I didn't have to walk on eggshells when using a library.  Written > agreements are also known as "gotchas". I'm not sure what you mean with "strong" type systems. Clojure's

Re: Some questions about Clojure Protocols

2010-11-04 Thread Mike Meyer
On Thu, 4 Nov 2010 00:50:35 -0700 Paul Hobbs wrote: > Strong type systems make programming in the large easier. Paul, "Strong typing" has so many definitions that your statement is nearly meaningless. See http://www.wordiq.com/definition/Strong_typing for a few. Now, if you have some prove t

Re: Some questions about Clojure Protocols

2010-11-04 Thread Laurent PETIT
Well, I'm not totally sure about what I'll write below, but I'll still try to make a decent job of sharing my current thoughts: * first, when I see calls to (instance?) (satisifies?), it rings a bell in my head. "design problem". * second, it seems like you're trying to "fix in the concrete"

Re: Some questions about Clojure Protocols

2010-11-04 Thread Paul Hobbs
Meikel, Strong type systems make programming in the large easier. It would be nice if I didn't have to walk on eggshells when using a library. Written agreements are also known as "gotchas". -- Paul Hobbs On Wed, Nov 3, 2010 at 11:30 PM, Meikel Brandmeyer wrote: > Hi, > > On 4 Nov., 04:58,

Re: clojure-backtracking-monads .. can it emulate prolog?

2010-11-04 Thread David Nolen
On Thu, Nov 4, 2010 at 6:16 AM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote: > Thanks David. > I am reading it .. it has nice description of mini-kanren. > I was wondering if there is predicate corresponding to prologs "nonvar" in > mini-kanren. > Sunil. > Again, I don't know enough ab

Re: A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread Ken Wesson
On Thu, Nov 4, 2010 at 3:41 AM, Jacek Laskowski wrote: > Hi, > > Is it intended in 1.3-alpha2? I think the error message in 1.2 is way > better (although not as user friendly as I wish to). Shall I report > it? Where? How? > > devmac:~ jacek$ clj -13 > CLOJURE_DIR:  /Users/jacek/apps/clojure > CLO

Re: Bug with instance? inside deftypes

2010-11-04 Thread Christophe Grand
To me its an implementation wart which is dictated by the use of the reflection API in the compiler. There is some work done by Stu to create a clojure reflection API with several backends (eg ASM or Java Reflection). However I won't bet on the *current* compiler being fixed. my 2 cents Christoph

Re: Supporting 1.2 and 1.3

2010-11-04 Thread Shantanu Kumar
Ring has a 1.3 branch to deal with the new version, for example. Maybe that's one solution. Regards, Shantanu On Nov 4, 12:44 pm, Saul Hazledine wrote: > Hello, >   I've put some small libraries on github. At the moment they > specifically depend on Clojure 1.2 and contrib (since its the release

Re: clojure-backtracking-monads .. can it emulate prolog?

2010-11-04 Thread Sunil S Nandihalli
Thanks David. I am reading it .. it has nice description of mini-kanren. I was wondering if there is predicate corresponding to prologs "nonvar" in mini-kanren. Sunil. On Wed, Nov 3, 2010 at 10:13 PM, David Nolen wrote: > On Wed, Nov 3, 2010 at 12:38 PM, David Nolen wrote: > >> On Wed, Nov 3, 20

Re: Some questions about Clojure Protocols

2010-11-04 Thread Shantanu Kumar
For complex cases, you may like to fall back on multi-methods and abstraction types. I blogged about typed abstractions few days ago here: http://bitumenframework.blogspot.com/2010/10/typed-abstractions-in-clojure.html Regards, Shantanu On Nov 4, 1:25 pm, "nicolas.o...@gmail.com" wrote: > I see

Re: Some questions about Clojure Protocols

2010-11-04 Thread nicolas.o...@gmail.com
I see your point. Somehow, it is annoying to have to manipulate a set of protocols that always go together. And it would be nice to have a shorthand. I have a very small prototype here: git://nicolasoury.repositoryhosting.com/nicolasoury/type-classes.git of some code to allow "type-classes" like

Supporting 1.2 and 1.3

2010-11-04 Thread Saul Hazledine
Hello, I've put some small libraries on github. At the moment they specifically depend on Clojure 1.2 and contrib (since its the released version). However, I have had requests to take out the dependencies on clojure and contrib so that they don't infect projects that use them. Is this standard p

A bug? Unbound Unbound in 1.3-alpha2 when a symbol is not set

2010-11-04 Thread Jacek Laskowski
Hi, Is it intended in 1.3-alpha2? I think the error message in 1.2 is way better (although not as user friendly as I wish to). Shall I report it? Where? How? devmac:~ jacek$ clj -13 CLOJURE_DIR: /Users/jacek/apps/clojure CLOJURE_CONTRIB_JAR: /Users/jacek/apps/clojure-contrib-1.3.0-alpha2.jar Cl