Re: Is Slick feasible in Clojure?

2012-10-01 Thread Alessio Stalla
that feature and a good type inference engine, it would be possible for a macro to generate code depending on the static type of one or more of its arguments, because you could query the environment for the type of each variable. Alessio Stalla -- You received this message because you are s

Re: Any other italian Clojure users?

2012-03-23 Thread Alessio Stalla
On Mar 23, 9:01 am, Giorgio Valoti wrote: > Il giorno 22/mar/2012, alle ore 10:21, Marco Dalla Stella ha scritto: > > > Hi, > > > I just want to know if there are any other italian Clojure users in > > the ml, maybe for open an Italian Clojure User Group and organize some > > meetings... > > Here’

Re: Clojure-in-CommonLisp?

2011-11-16 Thread Alessio Stalla
On 15 Nov, 16:58, Konrad Hinsen wrote: > On 15 Nov, 2011, at 15:46 , Doug South wrote: > > > I know a little CL and even less of Clojure, but wouldn't Clojure in CL be > > fairly trivial? Just a DSL in CL? > > All of Clojure's persistent data structures would have to be implemented in > CL. Plus

Re: JVM 7 support (invokedynamic)

2011-08-25 Thread Alessio Stalla
On 25 Ago, 20:21, Nick Zbinden wrote: > @Aaron: Could you go into why this is the case? What does jruby do > that it needs it so much and clojure does not. > > @Tal Liron: You seem to differ in your opinion with Aaron (pretty sure > you would not be investing your time otherwise). What exactlly ar

Re: clooj, a lightweight IDE for clojure

2011-07-19 Thread Alessio Stalla
On 18 Lug, 18:40, Arthur Edelstein wrote: > Hi Tamreen, > > On Jul 18, 5:38 am, Tamreen Khan wrote: > > > It's a little confusing to see what's normally the text for the prompt, > > "user=>", be in the window that shows the result. Why can't both the prompt > > and the results be shown in the sam

Re: Build tool for mixed Clojure/Java projects

2011-07-11 Thread Alessio Stalla
On 11 Lug, 13:51, Ken Wesson wrote: > On Sun, Jul 10, 2011 at 2:01 AM, mike.w.me...@gmail.com > wrote: > > [snip most of post whose sole purpose seems to be to gainsay anything I write] > > > The only source control system I know that uses an ACID database doesn't > > need a back end server. > >

Re: Unknown constant tag 32 in class file error

2011-07-06 Thread Alessio Stalla
On 6 Lug, 09:07, Ken Wesson wrote: > On Tue, Jul 5, 2011 at 4:32 PM, Alessio Stalla > wrote: > > On 5 Lug, 18:49, Ken Wesson wrote: > >> 1. A too-large string literal should have a specific error message, > >> rather than generate a misleading one suggesting a

Re: Unknown constant tag 32 in class file error

2011-07-05 Thread Alessio Stalla
On 5 Lug, 18:49, Ken Wesson wrote: > On Tue, Jul 5, 2011 at 11:22 AM, Patrick Houk wrote: > > Does the file you are evaluating have more than 65535 characters?  As > > far as I can tell, that is the maximum length of a String literal in > > Java (see the CONSTANT_Utf8_info struct in > >http://jav

Re: Question about data structures and encapsulation

2011-06-16 Thread Alessio Stalla
On Jun 16, 2:59 am, Colin Yates wrote: > Thanks for all the help, all of you.  The Clojure community has a reputation > for being helpful :) > > The example of age as a property which might change from a value to a > function was indeed a strawman, but it was just an example.  So the > consensus s

Re: Closures in macros

2011-05-04 Thread Alessio Stalla
On 4 Mag, 16:29, "Marshall T. Vandegrift" wrote: > André Thieme writes: > > Please try this minimal example in your REPL: > > (defn f [x] (fn [] x)) ; the closure factory > > (def foo (f 0)) ; a useful instance > > (defmacro bar [] `(let [a# ~foo])) > > and then call (bar) > > I'm new to Clojure

Re: Closures in macros

2011-05-04 Thread Alessio Stalla
On 4 Mag, 01:34, Chris Perkins wrote: > On May 3, 5:22 pm, André Thieme wrote: > > > Some of the limitations: > > 1. (defmacro x [] `(let [a# ~(atom 0)])) > > > 2. (defmacro y [] `(let [a# ~(comp inc inc)])) ; from that link > > > 3. (defmacro z [] `(let [a# ~((fn [x#] (fn [] x#)) 0)])) > > > All

Re: ANN: Java dependency injection in Clojure

2011-05-04 Thread Alessio Stalla
On 4 Mag, 06:53, Luc Prefontaine wrote: > Hi, > > being tired of wandering through a few thousand lines of XML Spring bean > definitions, I finally wrote a library > to start moving away from Spring/XML. It's definitively nicer doing > dependency injection/auto-wiring using Clojure. > > This is

Re: Jesus, how the heck to do anything?

2011-03-25 Thread Alessio Stalla
On Thursday, March 24, 2011 2:34:02 PM UTC+1, tbc++ wrote: > > > I didn't have much trouble getting things running. Is > > the CLASSPATH really so much different to the PYTHONPATH, > > LD_LIBRARY_PATH or even the plain old PATH itself? > > No, it's not that much different, except python is a bit mo

Re: Java Interop - Generics - Hmmm...

2011-03-24 Thread Alessio Stalla
On 24 Mar, 17:54, Alan wrote: > On Mar 24, 9:47 am, Alessio Stalla wrote: > > > Reflection is aware of generic type > > variables:http://download.oracle.com/javase/6/docs/api/java/lang/reflect/Generi... > > > What is lost at runtime is information about *instantiat

Re: Java Interop - Generics - Hmmm...

2011-03-24 Thread Alessio Stalla
On Thursday, March 24, 2011 5:29:56 PM UTC+1, Jules wrote: > > Thanks Andy, > > I agree that there is no practical remnant of generics in the runtime as I > have poked around with reflection as well, but I think there might be in the > bytecode, otherwise if I compiled a generic interface, stuck

Re: Jesus, how the heck to do anything?

2011-03-23 Thread Alessio Stalla
On 23 Mar, 23:55, ultranewb wrote: > On Mar 24, 1:11 am, Mike Meyer wrote: > > > > Long version:  Okay, I'm very new to Clojure.  But I'm not a Java > > > programmer (don't want to be). > > > I don't think you can get very far in Clojure without having to come > > to grips with the Java infrastru

Re: Serialising functions...

2011-03-03 Thread Alessio Stalla
On Thursday, March 3, 2011 11:46:03 AM UTC+1, Jules wrote: > > > > Thanks, Alessio, > > I did know this, but it is a welcome addition to the thread. > Ok. Classloaders are a tricky matter and many people don't have clear ideas about them - sorry for assuming you were one of those people :) >

Re: Serialising functions...

2011-03-03 Thread Alessio Stalla
On Wednesday, March 2, 2011 2:54:07 PM UTC+1, Jules wrote: [snip] > I don't have time to look at this any further today, but I think it is > looking promising if I can find a way to avoid class name collisions - > more hacking of clojure.lang I'm afraid :-( > > Apologies for posting all the sou

Re: Ordering of defn's?

2011-02-23 Thread Alessio Stalla
On 23 Feb, 19:51, Ken Wesson wrote: > Java has a lack of this top-down processing, That's not true, what do you mean? class Foo { void bar() { baz(); } void baz() {} } compiles fine, as well as class Foo { void bar() { new Baz(); } } class Baz {} > and it sometimes causes > problems be

Re: Ordering of defn's?

2011-02-23 Thread Alessio Stalla
On 23 Feb, 01:28, Mark Engelberg wrote: > I'm not crazy about this behavior either, but my understanding is that > this is an intentional design decision that is a direct consequence of > two things: > 1.  In Clojure IDEs, people want to be able to feed the compiler > single functions and expressi

Re: ignore-errors

2011-02-21 Thread Alessio Stalla
On 21 Feb, 14:27, Lee Spector wrote: > On Feb 20, 2011, at 5:27 AM, FD wrote: > > > > > Is there something similar to the lisp macro ignore-errors (http:// > >www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/mac_ignore...) > > I use this: > > (defmacro ignore-errors >   "Returns the resu

Re: Java namespaces, Cobol, and Hierarchical file systems

2011-01-14 Thread Alessio Stalla
On Thursday, January 13, 2011 5:54:17 PM UTC+1, TimDaly wrote: [snip] > In sum, I'm suggesting that it isn't very lispy to use > hierarchical namespace naming conventions. > I think all you said is very true... *if* the user of a namespace is allowed to change its name (i.e. Common Lisp's RENAME-

Re: Compiling dynamically created namespaces, without on-disk source code?

2011-01-13 Thread Alessio Stalla
On Thursday, January 13, 2011 11:26:16 AM UTC+1, Robert McIntyre wrote: > > On a related note, is there any way to completely clear all the > bytecode that's being stored internally by the jvm, forcing it to fall > back to the hard-disk version of the classfiles available on the > classpath? No,

Re: if-let bug

2011-01-05 Thread Alessio Stalla
On Wednesday, January 5, 2011 11:06:34 AM UTC+1, David wrote: > > Consider the two definitions: > > (defn if-let-good [str] > (if-let [rest (seq (drop-while (partial = \a) str))] > (first rest) > "empty")) > > (defn if-let-bad [seq] > (if-let [rest (seq (drop-while (partial = \a)

Re: Native Clojure

2010-12-21 Thread Alessio Stalla
On Tuesday, December 21, 2010 2:55:58 PM UTC+1, Santosh Rajan wrote: > > On Tue, Dec 21, 2010 at 3:26 PM, Alessio Stalla > wrote: > > > > > It could be written on top of Common Lisp. There are natively compiled, > > multithreaded, cross-platform implementations of

Re: Native Clojure

2010-12-21 Thread Alessio Stalla
On Monday, December 20, 2010 8:54:14 PM UTC+1, kaveh_shahbazian wrote: > > I understand hosting on a VM has it's own (huge) advantages: GC, > libraries, proved practices and vast amount of research and community > effort already available; no doubt on that part. > > It is just having a mature an

Re: Incorrect behaviour for large s-expressions :(

2010-11-15 Thread Alessio Stalla
On 15 Nov, 19:34, Brian Goslinga wrote: > Well, assuming the memory is available, at least Clojure is guaranteed > to support vectors with more than 1024 elements... Unfair comparison. Clojure is not a standard, it's an implementation. SBCL is guaranteed to support vectors with >> 1024 elements t

Re: Incorrect behaviour for large s-expressions :(

2010-11-15 Thread Alessio Stalla
On Nov 14, 6:48 am, Robert McIntyre wrote: > So my friend and I were screwing around, battling versions of LISP as > nerds are wont to do, when I came across this: > > (eval `(clojure.core/+ ~@(take 1e4 (iterate inc 1 > Invalid method Code length 89884 in class file user$eval13607 > > This is

Re: Keyword names and namespaces

2010-10-19 Thread Alessio Stalla
On Oct 19, 8:18 am, Rob Lachlan wrote: > I see, thank you for linking to the ticket, Phil that really clarifies > things.  I suppose that I would tend more to Chas Emerick's view in > his sept 28 comment (on the ticket), questioning whether there is a > need to validate Keywords (and possibly symb

Re: why the big difference in speed?

2010-09-19 Thread Alessio Stalla
On 19 Set, 19:34, Tim Daly wrote: >   In common lisp I use the (disassemble) function which generally > gives back an assembler listing of the code that would be executed. > Is there a Java function which will return the byte codes that get > executed? In general there isn't. In the particular si

Re: Feature idea: meta-macros

2010-09-17 Thread Alessio Stalla
On 17 Set, 17:34, Doug Philips wrote: > On Fri, Sep 17, 2010 at 08:50, Alessio Stalla wrote: > > On Sep 16, 4:10 pm, Nicolas Oury wrote: > > Note also that the OP's original example does not require anything > > more than what defmacro already provides. And turning fun

Re: Feature idea: meta-macros

2010-09-17 Thread Alessio Stalla
On Sep 16, 4:10 pm, Nicolas Oury wrote: > The logged function would have to be already a generic method, no? Yes, and in idiomatic Common Lisp that's not particularly common (pardon the pun). Generic functions are typically only used when dynamic dispatch is actually needed. However, you can achi

Re: Simple things should be simple

2010-09-10 Thread Alessio Stalla
On Sep 9, 6:06 pm, Phil Hagelberg wrote: > On Thu, Sep 9, 2010 at 8:38 AM, Mike Meyer > > wrote: > > And two tools - lein and clojure itself. > > I'm not sure Clojure should be counted separately since you're not > installing it yourself. > > > So we go from 3, 0, 1 to 6, 4, 2. I'm not sure that

Re: A difficult Metaphor for Macros (especially for Java people)

2010-09-09 Thread Alessio Stalla
On Sep 8, 5:41 pm, lprefonta...@softaddicts.ca wrote: > Writing tons of XML lines to control behavior of frameworks was also a turn > off. We use Spring to create low-level Java beans but the XML describing > these beans did not change much over time. That is acceptable. I think Lisp is very well

Re: agents, await and Swing thread

2010-09-07 Thread Alessio Stalla
On Sep 6, 5:48 pm, "K." wrote: > Hello, > > I've got a concurrency problem and it's not really clear to me how to > solve it. I have a Swing GUI doing a search in background with agents > and the results are displayed one after the other, also in background. > > Here is, largely simplified, how I

Re: Managing the classpath

2010-07-02 Thread Alessio Stalla
On Jul 2, 5:20 am, Brian Schlining wrote: > > > There's URLClassLoader for loading classes at runtime. Javadocs are > > athttp://java.sun.com/javase/6/docs/api/java/net/URLClassLoader.html. > > There's > > > an old thread about using it athttp:// > > forums.sun.com/thread.jspa?threadID=300557&star

Re: Managing the classpath

2010-07-01 Thread Alessio Stalla
On 1 Lug, 17:47, Brian Schlining wrote: > > Where I struggle is with the practicalities of managing the classpath. > > From what I can tell, there is no way of modifying the classpath from > > a running Java/Clojure program (barring use of a custom classloader > > which sounds like deep magic). >

Re: Clojure's n00b attraction problem

2010-07-01 Thread Alessio Stalla
On Jun 30, 10:41 pm, Phil Hagelberg wrote: > I wasn't complaining about what you said; I was just glad someone else > was recognizing that talk is cheap and effort is not. Ok, sorry, I misinterpreted your words. Peace, Alessio -- You received this message because you are subscribed to the Goog

Re: Clojure's n00b attraction problem

2010-06-30 Thread Alessio Stalla
On 30 Giu, 18:35, Phil Hagelberg wrote: > On Wed, Jun 30, 2010 at 9:27 AM, Phil Hagelberg wrote: > > On Wed, Jun 30, 2010 at 12:24 AM, Alessio Stalla > > wrote: > >> That doesn't mean that a one- > >> click-install for a Lisp with an IDE and some popula

Re: Clojure's n00b attraction problem

2010-06-30 Thread Alessio Stalla
On Jun 30, 5:19 am, Michael Richter wrote: > On 30 June 2010 11:15, cageface wrote: > > > On Jun 29, 6:25 pm, Michael Richter wrote: > > > Are you *trying* to evoke the "Smug Lisp Weenie" vibe, cageface, or is > > this > > > just a natural byproduct of being a burgeoning Smug Clojure Weenie? > >

Re: Clojure / Common Lisp Question

2010-06-28 Thread Alessio Stalla
On 26 Giu, 07:53, rob levy wrote: > > It can (but its startup is slow, currently). May I ask you why you > > wouldn't want to use it? > > One reason is that from what little I know about ABCL it seems more > straightforward working with Java libraries in Clojure, but also there is a > huge amount

Re: Clojure / Common Lisp Question

2010-06-22 Thread Alessio Stalla
On 18 Giu, 16:52, rob levy wrote: > As an informal survey of people who use both Clojure and Common Lisp for > different projects, what do you see as the main determining factors behind > your choice to use either Clojure or Common Lisp for a project, given the > present state of Clojure.  Let's o