Re: auto-indent in Counterclockwise

2010-07-08 Thread Laurent PETIT
2010/7/9 B Smith-Mannschott > On Thu, Jul 8, 2010 at 17:13, Laurent PETIT > wrote: > > > > 2010/7/8 Lee Spector > >> > >> On Jul 8, 2010, at 10:31 AM, Laurent PETIT wrote: > >> > What you first describe is odd. Is this a Mac particularity ? > >> > On Windows/Linux, Hitting Ctrl+Space_bar result

Re: Amap vs Map performance

2010-07-08 Thread nickikt
Hi all, I'm running Clojure 1.1 (def an-array (int-array 25000 (int 0))) (time (amap an-array idx ret (+ (int 1) (aget an-array idx "Elapsed time: 50.83188 msecs" (def a-vec (vec (int-array 25000 (int 0 (time (dorun (map #(+ % (int 1)) a-vec))) "Elapsed time: 17.392434 msecs" So arrays

Re: auto-indent in Counterclockwise

2010-07-08 Thread Chas Emerick
On Jul 9, 2010, at 12:55 AM, B Smith-Mannschott wrote: command-space on the mac is used by the system to open the spotlight search field from the menu bar. It would be best not to bind it in Eclipse as this will mean the user must either rebind the spotlight shortcut, or your eclipse shortcut

Re: auto-indent in Counterclockwise

2010-07-08 Thread B Smith-Mannschott
On Thu, Jul 8, 2010 at 17:13, Laurent PETIT wrote: > > 2010/7/8 Lee Spector >> >> On Jul 8, 2010, at 10:31 AM, Laurent PETIT wrote: >> > What you first describe is odd. Is this a Mac particularity ? >> > On Windows/Linux, Hitting Ctrl+Space_bar results in showing a popup with >> > all the possibl

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
"Armando Blancas" wrote: >> So they wouldn't object if I wanted to use my wordpress or sourceforge >> domains? > >If I understand this correctly, they wouldn't: > >http://maven.apache.org/guides/mini/guide-central-repository-upload.html By my reading, they would. A wordpress domain is simply ou

Re: Amap vs Map performance

2010-07-08 Thread Harvey Hirst
With 1.2: (set! *warn-on-reflection* true) (time (amap an-array idx ret (+ (int 1) (aget an-array idx Reflection warning, NO_SOURCE_PATH:52 - call to aclone can't be resolved. Reflection warning, NO_SOURCE_PATH:52 - call to alength can't be resolved. Reflection warning, NO_SOURCE_PATH:52 - cal

Re: Clojure version in Eclipse/Counterclockwise projects

2010-07-08 Thread Lee Spector
On Jul 8, 2010, at 7:49 PM, Laurent PETIT wrote: > >> 2010/7/9 Lee Spector >> >> How is the Clojure version set in Eclipse/Counterclockwise projects? I'm >> still wanting to work in 1.1.0, and while my older projects are using 1.1.0 >> my newer ones -- I guess maybe this changed after upgradi

Re: auto-indent in Counterclockwise

2010-07-08 Thread Steven E. Harris
Laurent PETIT writes: > When you say "that it's hard ... '[' and ']' ...", you're talking > about the original paredit.el in emacs? Actually, I was talking both about the current Emacs Lisp editing library (where `move-past-close-and-reindent' is defined) and the most recent paredit.el library a

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
> So they wouldn't object if I wanted to use my wordpress or sourceforge > domains? If I understand this correctly, they wouldn't: http://maven.apache.org/guides/mini/guide-central-repository-upload.html -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
"Armando Blancas" wrote: >> Personally, I trust the inventors of the convention more than people >> running a single project. But that begs two questions: how do they >> define "ownership" of a domain, > >Sounds like common usage; e.g. as the owner of mired.org you get to >use it as groupId. So

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
> Personally, I trust the inventors of the convention more than people > running a single project. But that begs two questions: how do they > define "ownership" of a domain, Sounds like common usage; e.g. as the owner of mired.org you get to use it as groupId. and (the question that launched the

Re: Clojure version in Eclipse/Counterclockwise projects

2010-07-08 Thread Laurent PETIT
2010/7/9 Lee Spector > > How is the Clojure version set in Eclipse/Counterclockwise projects? I'm > still wanting to work in 1.1.0, and while my older projects are using 1.1.0 > my newer ones -- I guess maybe this changed after upgrading to > Counterclockwise 0.0.59.RC2 -- are running with 1.2.0-

Re: DSL with a grammar

2010-07-08 Thread joshua-choi
Consider using FnParse (http://github.com/joshua-choi/fnparse/tree/ develop). It's a pure Clojure parser combiner that is flexible in what tokens it accepts. You can use it to parse the symbol/list/etc. structures given to your macros into other forms. FnParse 3, the latest version, is currently a

Clojure version in Eclipse/Counterclockwise projects

2010-07-08 Thread Lee Spector
How is the Clojure version set in Eclipse/Counterclockwise projects? I'm still wanting to work in 1.1.0, and while my older projects are using 1.1.0 my newer ones -- I guess maybe this changed after upgrading to Counterclockwise 0.0.59.RC2 -- are running with 1.2.0-master-SNAPSHOT. I don't see

Re: Request for comments: DefaultMap

2010-07-08 Thread Stuart Halloway
Hi Dave, Yes, merge-reduce is the name I like too. Stu > Hi Michal, > I needed to change your containsKey implementation to always return > true in order to support the merge-with use case. > > Hi Stu, > merge-with* seems like a useful addition, though its semantics differ > slightly from merge

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Greg
Whoops. s/Raoul/Peter Schuller/. On Jul 8, 2010, at 7:03 PM, Greg wrote: > I hope it didn't sound like I was saying threads are *always* bad, as I > definitely don't think that. :-p > > Your link to the epoll + threads document is probably the best way to go > (that I'm aware of), to address

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Greg
I hope it didn't sound like I was saying threads are *always* bad, as I definitely don't think that. :-p Your link to the epoll + threads document is probably the best way to go (that I'm aware of), to address any of the issues that Raoul brought up w.r.t. long operations in between the events

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Greg
Interesting link! Unfortunately the link to the PDF was broken, here's one that works: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.101.7987&rep=rep1&type=pdf On Jul 8, 2010, at 6:48 PM, Raoul Duke wrote: > can't we all just get along? > > http://lambda-the-ultimate.org/node/1435 >

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Raoul Duke
On Thu, Jul 8, 2010 at 2:36 PM, Greg wrote: > A fundamental understanding of the difference between threads and > kqueue/epoll (which power NIO) should clear up anyone's misgivings about > evented servers. They are clearly more scalable, it is no contest. oh Erlang, were art thou? -- You rece

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Greg
Great response Antoni. A fundamental understanding of the difference between threads and kqueue/epoll (which power NIO) should clear up anyone's misgivings about evented servers. They are clearly more scalable, it is no contest. - Greg On Jul 8, 2010, at 5:26 PM, Antoni Batchelli wrote: > On

Re: DSL with a grammar

2010-07-08 Thread Richard Lyman
On Thu, Jul 8, 2010 at 1:34 PM, Nicolas Oury wrote: > Sorry, that's why I had quote around my parse. > I meant, use clojure reader to take a sequence in a macro and then "parse" > it for my own DSL. > So I shouldn't need any help from the reader (even if having some metas with > line and character

New version of ClojureTab plug-in to Protege announcement

2010-07-08 Thread ru
Hello all, New version ClojureTab-1.2 published on: http://protegewiki.stanford.edu/wiki/ClojureTab Change log: 1. Added slot plug-in "ClojureActionButton" that can be used to create GUI Clojure applications using Protege forms. 2. Added API for using Clojure without configuring ClojureTab on a

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Raoul Duke
can't we all just get along? http://lambda-the-ultimate.org/node/1435 -- 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 wit

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Peter Schuller
> Under heavy load, this can be quite costly, especially if each request > requires non-trivial processing (ie, enough to make time-slicing kick > in). This doesn't really jive with reality as far as I can tell; if anything it is the exact opposite of reality. If you're doing significant work in b

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Antoni Batchelli
On Jul 7, 2010, at 8:47 PM, gary b wrote: > This blog post presents data showing that threading is faster than > NIO: > http://mailinator.blogspot.com/2008/02/kill-myth-please-nio-is-not-faster-than.html > I would not consider this article to be the definitive answer to the question of NIO vs th

Re: Request for comments: DefaultMap

2010-07-08 Thread Dave Jack
Hi Michal, I needed to change your containsKey implementation to always return true in order to support the merge-with use case. Hi Stu, merge-with* seems like a useful addition, though its semantics differ slightly from merge-with's. The original merge-with modifies the vals only if there are du

Re: DSL with a grammar

2010-07-08 Thread Michael Gardner
On Jul 8, 2010, at 2:34 PM, Nicolas Oury wrote: > Sorry, that's why I had quote around my parse. > > I meant, use clojure reader to take a sequence in a macro and then "parse" it > for my own DSL. > So I shouldn't need any help from the reader (even if having some metas with > line and characte

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 21:29:56 +0200 Meikel Brandmeyer wrote: > Hi, > > Am 08.07.2010 um 18:52 schrieb Mike Meyer: > > > People seem to be confused by the Java namespace convention deriving > > names from DNS. They think that the names actually have something to > > do with the domains in question

Re: Any Clojure2js Libraries?

2010-07-08 Thread Scott Jaderholm
Clojurescript is the only thing I know of like scheme2js. There are a couple parenscript like programs, the best being http://github.com/arohner/scriptjure Scott On Thu, Jul 8, 2010 at 1:17 PM, Tim Robinson wrote: > All I got from google was Clojurescript, but I'm wondering what > options are

Re: examples (like doc)

2010-07-08 Thread Justin Kramer
Ah yes, I misread, thanks for clarifying. One advantage to the semi-freeform approach of the Wiki is that the writer can take liberties with the arrangement of prose and examples -- like in a book. Right now most of the examples are "Description: [code] [result]" but not all. An example could cons

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Laurent PETIT
My opinion: no need to create problems when there already are accepted solutions. In the java world, there are conventions for naming things. Stick with them. -> You want to fly under the radar in your enterprise with jars full of clojure sources ? Don't get catched because your lib risks a clash

Re: DSL with a grammar

2010-07-08 Thread Nicolas Oury
Sorry, that's why I had quote around my parse. I meant, use clojure reader to take a sequence in a macro and then "parse" it for my own DSL. So I shouldn't need any help from the reader (even if having some metas with line and character attached to thing would help) I do not want to go the parser

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Meikel Brandmeyer
Hi, Am 08.07.2010 um 18:52 schrieb Mike Meyer: > People seem to be confused by the Java namespace convention deriving > names from DNS. They think that the names actually have something to > do with the domains in question. This isn't the case. Quoting the > Java Language Specification "The sugg

Any Clojure2js Libraries?

2010-07-08 Thread Tim Robinson
All I got from google was Clojurescript, but I'm wondering what options are out there. I was looking for something like scheme2js[1] only in Clojure. Thanks, Tim [1] http://www-sop.inria.fr/mimosa/scheme2js/ -- You received this message because you are subscribed to the Google Groups "Clojur

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Wilson MacGyver
thank you! On Thu, Jul 8, 2010 at 3:09 PM, David Nolen wrote: > On Thu, Jul 8, 2010 at 3:02 PM, Wilson MacGyver wrote: >> >> for the hello world test, you are using the helloworld from >> front page of node.js at http://nodejs.org/ >> right? >> >> how did you setup the clojure one? >> >> was it

Re: Request for comments: DefaultMap

2010-07-08 Thread Stuart Halloway
Hi Michał, The underlying problem (using merge-with plus an accumulating fn) has come up before on the list. One proposal was a variant of merge-with that always applies the merge function [1]. I think the underlying issue needs to be solved at merge-with, not at the map data structure. In oth

Re: DSL with a grammar

2010-07-08 Thread Michael Gardner
On Jul 8, 2010, at 1:52 PM, Nicolas Oury wrote: > I am trying to write a small Domain Specific Language using macro, and I want > the syntax of the args of the macro to be somehow "parsed" and transformed. > > So, I have two questions: > > - Does anybody else does that? (except the infix calcul

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread David Nolen
On Thu, Jul 8, 2010 at 12:55 PM, Miki wrote: > Hello David, > > > while aleph (via Netty) is easily getting 600-700 rq/s > > even if I'm writing to a database (CouchDB). > Can you share the code for this? > > All the best, > -- > Miki > I don't have a standalone example at the moment. I might tr

Re: examples (like doc)

2010-07-08 Thread cej38
I think that the examples should be part of the function definition. I wouldn't think it wouldn't noticeably slow down running code (as it would be ignored at run time). Having the examples in the definition would be the easiest way of having access at all times (say programming on a laptop withou

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread David Nolen
On Thu, Jul 8, 2010 at 3:02 PM, Wilson MacGyver wrote: > for the hello world test, you are using the helloworld from > front page of node.js at http://nodejs.org/ > right? > > how did you setup the clojure one? > > was it what you posted before? > I wrote a blog post about it here with the code

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Dan Kersten
There are more rasons to want to avoid using threads than memory. Besides the obvious cost of creating and destroying threads (which is reduced or removed by using thread pools), you also have the cost of time slicing once you have more software threads than hardware threads: there is the obvious c

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Wilson MacGyver
for the hello world test, you are using the helloworld from front page of node.js at http://nodejs.org/ right? how did you setup the clojure one? was it what you posted before? (defn hello-world [request] (future (Thread/sleep 1) (respond! request {:status 200

Re: examples (like doc)

2010-07-08 Thread Mark Fredrickson
On Jul 7, 2:05 pm, John Cromartie wrote: > I've whipped up a proof-of-concept of how to implement built-in > examples for functions and macros. I've been poking at something similar: http://github.com/markmfredrickson/postdoc In my version, examples can be either strings or quoted code. If you

DSL with a grammar

2010-07-08 Thread Nicolas Oury
Dear all, I am trying to write a small Domain Specific Language using macro, and I want the syntax of the args of the macro to be somehow "parsed" and transformed. So, I have two questions: - Does anybody else does that? (except the infix calculus) Is there a generic method for doing it? Or even

Re: examples (like doc)

2010-07-08 Thread Moritz Ulrich
I think Chas Emerick is suggesting something like the following: http://gist.github.com/468401 It is hard to implement on the server-side, as you store the raw markdown-text in the datastore. However, in this form, it's not really useful for ide developers, as they have to parse the html their se

Re: Amap vs Map performance

2010-07-08 Thread Nicolas Oury
It seems to be a problem with 1.2. I have 28ms in 1.1 and 4000ms in 1.2. On Thu, Jul 8, 2010 at 5:12 PM, Rubén Béjar wrote: > Hi all, > > I have found again some time for Clojure, so I am back trying > to solve my problems with the perfomance of my toy cellular > automata. I have been trying t

Re: Idiomatic Clojure namespace names5

2010-07-08 Thread Jim Blomo
On Wednesday, July 7, 2010, Mike Meyer wrote: > Given that Sun is using javax, something like > "clojure.(author).(project)" would seem to be appropriate. That should > be safe from the DNS namespace (unless it means something when > transliterated into a foreign language) nor is a project in a la

Request for comments: DefaultMap

2010-07-08 Thread Michał Marczyk
Hi Group, I've just written an implementation of a persistent map which provides a default value -- fixed at creation time the way it's currently implemented -- and claims that it .containsKey every key thrown at it. The code is here: http://gist.github.com/468332 As mentioned in a comment, the

Re: examples (like doc)

2010-07-08 Thread Justin Kramer
Oh: it probably would have helped if I had said the API returns JSON, not straight text/HTML. Justin On Jul 8, 1:44 pm, Justin Kramer wrote: > They are separated: in the HTML version ("html-content" JSON > property), code is wrapped in , results in class="output">, and verbiage in . For the Mar

Re: examples (like doc)

2010-07-08 Thread Justin Kramer
They are separated: in the HTML version ("html-content" JSON property), code is wrapped in , results in , and verbiage in . For the Markdown version ("raw- content"), there are plain-text delineations. I will change the mime-type, though... Justin On Jul 8, 1:31 pm, Chas Emerick wrote: > That's

Re: examples (like doc)

2010-07-08 Thread Chas Emerick
That's nifty. Suggestion though: if you really want to have tools pull those examples so that they could be used systematically, the json should really be structured to clearly separate code, expected results, and verbiage -- linebreaks aren't enough, as I could imagine many functions havi

Re: json-str in Clojure 1.1

2010-07-08 Thread Stuart Halloway
Scratch my earlier response! You are right, and this is a known bug. It is fixed in 1.2. Stu > Macintosh:clojurefun wojtek$ ./runfile.sh > Clojure 1.1.0 > user=> (use 'clojure.contrib.json.write) > nil > user=> (json-str (for [a [1 2 3]] (do (print "a") "b"))) > "[aaa\"b\",\"b\",\"b\"]" > > >

Re: examples (like doc)

2010-07-08 Thread Justin Kramer
One use case I was thinking of for the Wiki is that IDEs could make API requests for individual functions on-the-fly, or do a mass export periodically. A basic version of the former exists now: http://clojure-examples.appspot.com/clojure.core/conj?format=json The result could be displayed plain t

Re: json-str in Clojure 1.1

2010-07-08 Thread Moritz Ulrich
json-str isn't capturing the printed 'a's. The 'a's just got printed after the '[' got, and before the rest of the string got printed. On Thu, Jul 8, 2010 at 5:35 PM, vibrant wrote: > Macintosh:clojurefun wojtek$ ./runfile.sh > Clojure 1.1.0 > user=> (use 'clojure.contrib.json.write) > nil > user

Re: json-str in Clojure 1.1

2010-07-08 Thread Stuart Halloway
You can use the doc function to find out what json-str does: (doc json-str) - clojure.contrib.json.write/json-str ([x]) Converts x to a JSON-formatted string. nil json-str is a function of its arguments, and it does not do anthing side-effecty like capturing stdout. Pu

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread Miki
Hello David, > while aleph (via Netty) is easily getting 600-700 rq/s > even if I'm writing to a database (CouchDB). Can you share the code for this? All the best, -- Miki -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 09:22:01 -0700 Phil Hagelberg wrote: > On Thu, Jul 8, 2010 at 7:15 AM, Meikel Brandmeyer wrote: > >> So maybe it's best to use the Java convention after all? > >> It has been proven to scale, is widely used and plays well with > >> whatever else is running on the JVM, which ar

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Armando Blancas
I'll do the simple thing when I can, so in those cases I use foo. On Jul 7, 9:13 am, James Reeves wrote: > I've kinda asked this question before, but I framed in the context of > a suggestion, and the discussion got bogged down with no real answer. > > So this time, let me keep it simple: if I ha

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Phil Hagelberg
On Thu, Jul 8, 2010 at 7:15 AM, Meikel Brandmeyer wrote: >> So maybe it's best to use the Java convention after all? >> It has been proven to scale, is widely used and plays well with >> whatever else is running on the JVM, which are strong points in its >> favor. > > I still don't buy it. The com

json-str in Clojure 1.1

2010-07-08 Thread vibrant
Macintosh:clojurefun wojtek$ ./runfile.sh Clojure 1.1.0 user=> (use 'clojure.contrib.json.write) nil user=> (json-str (for [a [1 2 3]] (do (print "a") "b"))) "[aaa\"b\",\"b\",\"b\"]" I think json-str shouldn't capture the printed a's, should it? -- You received this message because you are subs

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Pedro Henriques dos Santos Teixeira
On Thu, Jul 8, 2010 at 2:25 AM, j-g-faustus wrote: > On Jul 8, 5:21 am, Mike Meyer 620...@mired.org> wrote: > > So maybe it's best to use the Java convention after all? > It has been proven to scale, is widely used and plays well with > whatever else is running on the JVM, which are strong points

Amap vs Map performance

2010-07-08 Thread Rubén Béjar
Hi all, I have found again some time for Clojure, so I am back trying to solve my problems with the perfomance of my toy cellular automata. I have been trying to use Java arrays and type hints, with a small success, but I have found that amap for arrays seems terribly slower than map for vectors,

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Chas Emerick
On Jul 8, 2010, at 10:15 AM, Meikel Brandmeyer wrote: What happens with the prefix-with-your-domain prefix can be seen on clojars at the moment. People upload stuff under names they don't own. There are several vimclojure packages. Not a single of these are projects on their own right. Just var

Re: examples (like doc)

2010-07-08 Thread Chas Emerick
I think there's a lot of value to having good documentation and examples available directly in your development environment. I'm not sure what a reasonable alternative would be for that context other than having the examples and docs included (or at least, adjacent, as set-examples! allows

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Mike Meyer
On Thu, 8 Jul 2010 07:15:45 -0700 (PDT) Meikel Brandmeyer wrote: > Hi, > > On Jul 8, 7:25 am, j-g-faustus wrote: > > > So maybe it's best to use the Java convention after all? > > It has been proven to scale, is widely used and plays well with > > whatever else is running on the JVM, which are

Re: Why is there a transient for a set, but not for a sorted-set

2010-07-08 Thread Sean Devlin
Rich has said that there isn't a speed advantage to making sorted versions of transients, so that's why they don't exist. Your example wasn't instantly converted because sorting is a key property of tree maps, and blindly converting might lose real information. I'd recommending building a transie

Re: auto-indent in Counterclockwise

2010-07-08 Thread Laurent PETIT
2010/7/8 Lee Spector > > On Jul 8, 2010, at 10:31 AM, Laurent PETIT wrote: > > What you first describe is odd. Is this a Mac particularity ? > > On Windows/Linux, Hitting Ctrl+Space_bar results in showing a popup with > all the possible completions. > > If there is only one completion that ccw is

Re: auto-indent in Counterclockwise

2010-07-08 Thread Lee Spector
On Jul 8, 2010, at 10:31 AM, Laurent PETIT wrote: > What you first describe is odd. Is this a Mac particularity ? > On Windows/Linux, Hitting Ctrl+Space_bar results in showing a popup with all > the possible completions. > If there is only one completion that ccw is aware of, then no popup is >

Re: Ordering of messages to agents

2010-07-08 Thread Meikel Brandmeyer
Hi, On Jul 8, 4:53 pm, Brian Hurt wrote: > A better API for this particular use suggested itself to me: simply allow > the state to be nil, and require the functions that are sent initialize the > state if necessary.  Code like: > > (defn my_f [ state ] >     (let [ state (or state (init-functio

Re: Ordering of messages to agents

2010-07-08 Thread Brian Hurt
A better API for this particular use suggested itself to me: simply allow the state to be nil, and require the functions that are sent initialize the state if necessary. Code like: (defn my_f [ state ] (let [ state (or state (init-function)) ] ... In this case, it doesn't matter whic

Re: Ordering of messages to agents

2010-07-08 Thread Laurent PETIT
2010/7/8 Brian Hurt > > > On Wed, Jul 7, 2010 at 5:46 PM, Ryan Waters wrote: > >> On Wed, Jul 7, 2010 at 4:32 PM, Meikel Brandmeyer wrote: >> > Hi, >> > >> > Am 07.07.2010 um 23:11 schrieb Ryan Waters: >> > >> >>> (send a init-function) >> >>> (send a f)) >> >> >

Re: Ordering of messages to agents

2010-07-08 Thread Brian Hurt
On Wed, Jul 7, 2010 at 5:46 PM, Ryan Waters wrote: > On Wed, Jul 7, 2010 at 4:32 PM, Meikel Brandmeyer wrote: > > Hi, > > > > Am 07.07.2010 um 23:11 schrieb Ryan Waters: > > > >>> (send a init-function) > >>> (send a f)) > >> > >> It's not guaranteed the init-func

Re: auto-indent in Counterclockwise

2010-07-08 Thread Laurent PETIT
2010/7/8 Lee Spector > > Laurent, > > Thanks for all of the helpful replies. Just one clarification: > > On Jul 8, 2010, at 3:37 AM, Laurent PETIT wrote: > >> BTW, is there a way to get a popup menu of the options, or some other > listing of them without going through them one by one? > > > > The

Re: auto-indent in Counterclockwise

2010-07-08 Thread Lee Spector
Laurent, Thanks for all of the helpful replies. Just one clarification: On Jul 8, 2010, at 3:37 AM, Laurent PETIT wrote: >> BTW, is there a way to get a popup menu of the options, or some other >> listing of them without going through them one by one? > > There is already a "Clojure" menu and

Re: Idiomatic Clojure namespace names

2010-07-08 Thread Meikel Brandmeyer
Hi, On Jul 8, 7:25 am, j-g-faustus wrote: > So maybe it's best to use the Java convention after all? > It has been proven to scale, is widely used and plays well with > whatever else is running on the JVM, which are strong points in its > favor. I still don't buy it. The company I work for chan

Re: Idiomatic Clojure namespace names

2010-07-08 Thread j-g-faustus
On Jul 8, 5:21 am, Mike Meyer wrote: > You're overlooking that one of the major benefits of Clojure is that > it interoperates with other JVM languages. So any idiom it uses needs > to have some assurance that it won't clash with an idiom used by those > other languages. It's a good point. > Tha

Re: ANN: Aleph, an asynchronous web server

2010-07-08 Thread gary b
re: memory use If the number of concurrent requests is small, then the memory used by thread per request is usually not an issue. When implementing long polling, the number of concurrent requests can be very large. Sharing threads between requests in a long polling server can result in significa

Re: examples (like doc)

2010-07-08 Thread Meikel Brandmeyer
Hi, On Jul 8, 1:52 pm, Moritz Ulrich wrote: > No offense, but I don't really like the way the project > athttp://getclojure.org:8080/examples/does it. The examples doesn't > help, as they are no explanations, the results aren't shown and many > of them are overly complicated. Yes. They show th

Re: examples (like doc)

2010-07-08 Thread Moritz Ulrich
No offense, but I don't really like the way the project at http://getclojure.org:8080/examples/ does it. The examples doesn't help, as they are no explanations, the results aren't shown and many of them are overly complicated. On Thu, Jul 8, 2010 at 7:18 AM, Heinz N. Gies wrote: > > On Jul 7, 201

Why is there a transient for a set, but not for a sorted-set

2010-07-08 Thread Moritz Ulrich
Why does (transient #{}) works, but transient (sorted-set []) fails with an exception: clojure.lang.PersistentTreeSet cannot be cast to clojure.lang.IEditableCollection [Thrown class java.lang.ClassCastException] -- Moritz Ulrich Programmer, Student, Almost normal Guy http://www.google.com/pr

Re: auto-indent in Counterclockwise

2010-07-08 Thread Laurent PETIT
Hi Lee, Again, thanks for a thourough and constructive feedback ! 2010/7/8 Lee Spector > > I spent a bunch of time today in CCW 0.0.59.RC2, in "default" mode, and > thought I'd report my experience: > > - Lots of very nice features and I really appreciate having this -- please > don't take my c

Re: Variadic arguments and macros

2010-07-08 Thread Michael Wood
On 8 July 2010 07:47, Laurent PETIT wrote: > > > 2010/7/8 Pedro Teixeira >> >> What's the idiomatic way to handle cases where one has a macro rather >> than a function? >> >> For example: >> >> intent is as follows but does not work: >> (def args [false true false]) >> (apply or args) >> >> >> al