Re: WebSockets server for broadcasting log events

2011-03-01 Thread Zach Tellman
Using Aleph (https://github.com/ztellman/aleph), you can create a server that broadcasts messages from any client to all other clients very easily: (use 'aleph.http 'lamina.core) (def broadcast-channel (permanent-channel)) (start-http-server (fn [ch _] (siphon broadcast-channel ch) (si

Re: better error messages > smaller stack traces

2011-03-01 Thread Mark
I found the problem: ('apply + 1 1) I understand why this won't work if I tried to eval the list, but I don't understand why I can't create a list of these symbols. On Feb 28, 9:06 am, Brian Marick wrote: > On Feb 27, 2011, at 2:33 PM, Mark wrote: > > > With a fresh brain (and a fresh cup of cof

Re: [ANN]VTD-XML 2.10

2011-03-01 Thread rob levy
FWIW tagsoup is not bad for that. Nekohtml is alright as well. On Tue, Mar 1, 2011 at 8:03 PM, Kasim wrote: > Hi, > I was just wondering if I can use it for cleaning up not well formed html > files. > > Thanks > > -- > You received this message because you are subscribed to the Google > Groups

Re: unchecked-divide etc being replaced in 1.3 - no more support for longs?

2011-03-01 Thread Jason Wolfe
> But I don't know what the plan is if you really do want truncating > arithmetic on longs. On 1.3 alpha 4: user=> (+ Long/MAX_VALUE Long/MAX_VALUE) ArithmeticException integer overflow clojure.lang.Numbers.throwIntOverflow (Numbers.java:1581) user=> (set! *unchecked-math* true) true user=> (+

Re: [ANN]VTD-XML 2.10

2011-03-01 Thread Kasim
Hi, I was just wondering if I can use it for cleaning up not well formed html files. Thanks -- 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

Re: Arithmetic operations on custom types

2011-03-01 Thread Stuart Sierra
No, because the arithmetic functions compile down to primitive arithmetic operations. You can define your own generic math functions, but you can't make them as fast as primitives. -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure

Re: unchecked-divide etc being replaced in 1.3 - no more support for longs?

2011-03-01 Thread Stuart Sierra
The plan is that normal arithmetic functions +-*/ will be fast on longs, and longs will be the default. But I don't know what the plan is if you really do want truncating arithmetic on longs. -S -- You received this message because you are subscribed to the Google Groups "Clojure" group. To p

Re: ANN: Clojure Libraries

2011-03-01 Thread Glen Stampoultzis
Changed. Thanks. On 2 March 2011 08:52, Sergey Didenko wrote: > Thanks, Glen. > > A correction: "calx" does not belong to the GUI category. > > May be "Utility" is better? > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this grou

Re: ANN: Clojure Libraries

2011-03-01 Thread Sergey Didenko
Thanks, Glen. A correction: "calx" does not belong to the GUI category. May be "Utility" is better? -- 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 mo

Re: Serialising functions...

2011-03-01 Thread Alan
Can we arrange for richhickey.github.com/* and/or github.com/ richhickey/* to issue a 301 moved permanently to the appropriate clojure page? That seems to describe our scenario exactly and would make search engines stop giving people disastrously outdated content. On Mar 1, 7:53 am, Michael Wood

Clojure Conj 2011, save the date! Nov 10-12 in Durham

2011-03-01 Thread Christopher Redinger
Clojure/core is pleased to announce that we will once again be hosting the Clojure Conj in Durham, NC. Mark it on your calendar for November 10-12. You can sign up at http://clojure-conj.org to be notified when registrations open. More information to follow. Looking forward to seeing you all ag

Re: Master worker pattern

2011-03-01 Thread Daniel Werner
On Feb 28, 3:34 pm, Zlaja wrote: > How I can achieve master worker pattern in clojure with agents. > For example I have components that write messages to a queue. > I would like to process messages parallel by agents. Is it posible? This use case sounds like a job for Lamina: https://github.com/

Re: Arithmetic operations on custom types

2011-03-01 Thread Daniel Werner
On Feb 28, 9:31 pm, Seth wrote: > Or, if you dont feel like doing refer-clojure every time, you might be > interested in this:http://planet-clojure.org/page28.html > under "Computing with Units and Dimension" Your link only gives me a 404, unfortunately, but Google's cached text- only version wor

User defined extensions with Xpath

2011-03-01 Thread Trastabuga
Hi I am eager to try out Clojure for my new web site. But for that I need XSLT support, like I used to have on Common Lisp (Xuriella XSLT) and also XPath support (like Plexippus XPath). I saw the saxon wrapper among the Clojure libraries but in its docs I couldn't find how they define user extensio

load-file, and new function definitions not catching at the REPL

2011-03-01 Thread Sam Ritchie
Hey all -- quick question on the REPL. I'm an emacs user, but my two teammates have been working with the excellent textmate-clojure, and it's exposed an issue that I'm not sure how to deal with. The bundle provides a command to load the current file active in textmate, by run

Re: Serialising functions...

2011-03-01 Thread Michael Wood
On 1 March 2011 16:40, Seth wrote: [...] > In Compiler.java > https://github.com/richhickey/clojure/blob/master/src/jvm/clojure/lang/Compiler.java Sorry to butt in here, but don't use github.com/richhickey/... anymore. The current home of Clojure on github is github.com/clojure/... Not that it

Re: Anyone using the sdb library?

2011-03-01 Thread Mark Rathwell
> > - How to account for nil / blank values > > That's a tough one. As you might have seen, I'm strongly leaning towards > eliminating the type tags in formatted values, which would make representing > nil pretty difficult. > > Is this really a desired feature to begin with? As it stands, > dist

Re: Serialising functions...

2011-03-01 Thread Seth
Now reflecting on it, and without looking exactly at source code, i think it is clear that functions are implemented as classes (which extend RestFn, etc). and the body are methods of the classes - so, one couldnt force function class names to be the same. And of course they need to be random enou

Re: Serialising functions...

2011-03-01 Thread Jules
On Mar 1, 2:40 pm, Seth wrote: > > So, combine the ClassLoader hackery with slapping "implements > > Serializable" on clojure.lang.IFn? > > Actually, I just looked at the implementation code -and this is not > true. Actually, a variadic function is of type RestFn and otherwise it > is of type AFun

Re: Serialising functions...

2011-03-01 Thread Seth
> So, combine the ClassLoader hackery with slapping "implements > Serializable" on clojure.lang.IFn? Actually, I just looked at the implementation code -and this is not true. Actually, a variadic function is of type RestFn and otherwise it is of type AFunction. Restfn extends AFunction, and AFunct

Clojure (1.3.0alpha4) & Spring/Aspectj Load Time Weaving...

2011-03-01 Thread Jules
In trying to resolve another issue (see thread on Serialising Functions) by trying to aspect some clojure.lang internals (DynamicClassLoader.defineClass()). I have a working Java/JUnit TestCase (run with various xml config and - javaagent vm flag), but when I transport the same code to the repl (w

[ANN]VTD-XML 2.10

2011-03-01 Thread dontcare
VTD-XML 2.10 is now released. It can be downloaded at https://sourceforge.net/projects/vtd-xml/files/vtd-xml/ximpleware_2.10/. This release includes a number of new features and enhancement. * The core API of VTD-XML has been expanded. Users can now perform cut/paste/insert on an empty element. *

Re: Serialising functions...

2011-03-01 Thread Jules
On Mar 1, 12:03 am, Phil Hagelberg wrote: > On Feb 25, 7:45 am, Jules wrote: > > > I want to include functions in my metadata - e.g. I might want to > > specify a version comparator function to allow tables to decide > > whether a new version that they are presented with is actually more > > re

Re: Serialising functions...

2011-03-01 Thread Jules
On Feb 28, 4:03 pm, Ken Wesson wrote: > On Mon, Feb 28, 2011 at 9:25 AM, Jules wrote: > > This is actualy my preferred route - however I've just revisited some > > test code I wrote a while back, that I thought I had working... - I > > only had it half working :-( - and in having another go at