Patch to provide special form documentation online (doc, find-doc)

2008-09-17 Thread Stephen C. Gilardi
This patch makes clojure/doc and clojure/find-doc operate on special forms as well as vars. I'm enclosing it with this message, but if that doesn't work I'll upload it to the group's file section as "specialdocs.tgz". The .tgz file contains a patch file that patches boot.clj and a new file: src/clj

Re: Serialization Snag

2008-09-17 Thread Joubert Nel
Hello noahr, I have created a library for myself to do persistence in Clojure to Berkeley DB. I generally leverage Clojure's reader support for (de)serialization. However, in one instance I had to implement a particular interface and pass that class as parameter to the Berkeley API. At first I,

Functional style & laziness - deferred execution caught me unawares

2008-09-17 Thread Joubert Nel
I ran into an interesting situation today, and although I have realized my mistake, thought I would share as I think it is a good illustration of a scenario where one may mistakenly rely on "expected" functional "correctness" when you don't fully consider the ramifications of lazy sequences and de

Re: Generate exposers for ancestral fields

2008-09-17 Thread Matt Revelle
Posted a patch to traverse the class hierarchy looking for the specified fields, it also verifies that the field is protected. Exceptions are thrown if the field isn't found or is found but not protected. Examples: ___A.java___ package pkg; public class A { private String priv = "a p

Re: Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
Ok, concrete. Here's one mistake I made the other day. I created a ref, and then forgot to access it using @. The example code is (def my_map (ref {:a 1, :b 2})) (def map_vals (vals my_map)) $ java -cp clojure-clean.jar clojure.lang.Repl bad-ref.clj java.lang.IllegalArgumentException: Don't kno

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Rich Hickey
On Sep 17, 7:06 pm, "Raoul Duke" <[EMAIL PROTECTED]> wrote: > > It's an interesting idea, and something I tried, but the overhead was > > too great. > > i know less than nothing here, of course, but... any way to make the > default case of "nothing has changed" be somehow fast (enough), and > on

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Raoul Duke
> It's an interesting idea, and something I tried, but the overhead was > too great. i know less than nothing here, of course, but... any way to make the default case of "nothing has changed" be somehow fast (enough), and only the "oh poop things got edited" have to go into slow-mo for a second t

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Rich Hickey
On Sep 17, 3:40 pm, Stuart Sierra <[EMAIL PROTECTED]> wrote: > On Sep 17, 12:45 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > While it is possible to make a globally visible change to a var with > > def, the only appropriate scenarios for doing so are to fix a bug, or > > for scratch vars at

Re: Improved compiler error messages, part 2

2008-09-17 Thread Rich Hickey
On Sep 17, 2:55 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > > It seems to me you need to distinguish runtime errors from compilation > > errors. For runtime errors, the file and line numbers are already in > > the stack trace, as Clojure emits that information in the bytecode. > > For example,

Re: Improved compiler error messages, part 2

2008-09-17 Thread Raoul Duke
On Wed, Sep 17, 2008 at 11:55 AM, Allen Rohner <[EMAIL PROTECTED]> wrote: > I don't think that unwillingness is the only criteria here. One reason yes! +N for usability through extreme clarity. signal-to-noise is important. sincerely. --~--~-~--~~~---~--~~ You re

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Stuart Sierra
On Sep 17, 12:45 pm, Rich Hickey <[EMAIL PROTECTED]> wrote: > While it is possible to make a globally visible change to a var with > def, the only appropriate  scenarios for doing so are to fix a bug, or > for scratch vars at the repl. This brings up an idea I had a while back -- what if you want

Re: Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
> It seems to me you need to distinguish runtime errors from compilation > errors. For runtime errors, the file and line numbers are already in > the stack trace, as Clojure emits that information in the bytecode. > For example, in the above trace: > > >         at user.eval__2291.invoke(broken-a

Re: Improved compiler error messages, part 2

2008-09-17 Thread Rich Hickey
On Sep 17, 1:54 pm, Allen Rohner <[EMAIL PROTECTED]> wrote: > After feedback on my previous compiler error message patch, > I've started looking into the problem more. My goal is to have the > file and line number printed on every user-visible stack trace. > > An example of my desired output is:

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Rich Hickey
On Sep 16, 11:40 pm, falcon <[EMAIL PROTECTED]> wrote: > I work on financial software--the kind that reads streaming data and > static data from various sources, transforms these streams through > various calculations and possibly decides to send out trades. > ... > Is there a good solution to

Improved compiler error messages, part 2

2008-09-17 Thread Allen Rohner
After feedback on my previous compiler error message patch, I've started looking into the problem more. My goal is to have the file and line number printed on every user-visible stack trace. An example of my desired output is: java.lang.IllegalArgumentException: /Users/arohner/Programming/clojur

Re: vs. Erlang

2008-09-17 Thread Raoul Duke
> As far as transparent distribution, I still don't believe in it. > ...policy decisions out of applications apparently some other folks are thinking the same way; making 'coordination' languages. (even Erlang may be used as such a tool, i think.) http://lambda-the-ultimate.org/node/2940#comment

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Rich Hickey
On Sep 17, 11:30 am, Allen Rohner <[EMAIL PROTECTED]> wrote: > > I don't see how this should work. The re-defined variable has thread-local > > scope and shouldn't be viewable in other threads. > > Vars have thread-local scope. Defs are global. > Hmm... def establishes the root binding of a v

Re: Clojure Poll 09/2008

2008-09-17 Thread Tom Emerson
On Wed, Sep 10, 2008 at 2:40 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > What are you doing with Clojure? 1. Using it as a prototyping language for information extraction and NLP applications. 2. Using it to replace Python for data munging. 3. Using it to provide a REPL into a large IE system th

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Allen Rohner
> I don't see how this should work.  The re-defined variable has thread-local > scope and shouldn't be viewable in other threads. Vars have thread-local scope. Defs are global. Allen --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Alexander Kjeldaas
2008/9/17 Stuart Sierra <[EMAIL PROTECTED]> > > Brief response to: > > On Sep 16, 11:40 pm, falcon <[EMAIL PROTECTED]> wrote: > > I also notice that Clojure has the ability > > to change programs while they are running; however, I haven't been > > able to find examples of this. > > Most Lisps give

Re: Clojure Poll 09/2008

2008-09-17 Thread Alexander Kjeldaas
2008/9/16 Chouser <[EMAIL PROTECTED]> > > On Tue, Sep 16, 2008 at 4:49 AM, Alexander Kjeldaas > <[EMAIL PROTECTED]> wrote: > > > > 2. Clojure states that it has good support for list comprehensions. > > Maybe I'm misunderstanding list comprehensions, but I'm not completely > > happy. I want a way

Re: Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread Stuart Sierra
Brief response to: On Sep 16, 11:40 pm, falcon <[EMAIL PROTECTED]> wrote: > I also notice that Clojure has the ability > to change programs while they are running; however, I haven't been > able to find examples of this. Most Lisps give you this for free, since the compiler is integrated into th

Re: vs. Erlang

2008-09-17 Thread Rich Hickey
On Sep 16, 8:29 pm, "Raoul Duke" <[EMAIL PROTECTED]> wrote: > http://lambda-the-ultimate.org/node/2865#comment-42428 > > maybe an approach which would be a not-very-big-diff-to-Clojure to get > distributed computing. I like the fault streams idea mentioned in the linked-to thesis, and have been

Re: vs. Erlang

2008-09-17 Thread Rich Hickey
On Sep 16, 8:29 pm, "Raoul Duke" <[EMAIL PROTECTED]> wrote: > http://lambda-the-ultimate.org/node/2865#comment-42428 > > maybe an approach which would be a not-very-big-diff-to-Clojure to get > distributed computing. --~--~-~--~~~---~--~~ You received this message

[Newbie] Observations and questions regarding long-running, adaptable, transparent software

2008-09-17 Thread falcon
I work on financial software--the kind that reads streaming data and static data from various sources, transforms these streams through various calculations and possibly decides to send out trades. The logic inside this engine, how various decisions are made, what calculations are used, what data