Re: Is this bug in Google AppEngine, appengine-clj or Clojure itself?
I think it is caused by those 2 clojure bugs (which seem to be the same thing). You may be able to work around that problem by patching appengine-clj to hint the method call to be on the public interface: DatastoreService. (defn current-transaction "Returns the current datastore transaction, or nil if not within a transaction." [] (.getCurrentTransaction ^com.google.appengine.api.datastore.DatastoreService (datastore) nil)) -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: sql and cursors
On Oct 17, 1:04 am, "Kyle R. Burton" wrote: > As far as I can tell, contrib.sql's functions do not use database > cursors (at least for PostgreSQL, again as far as I can tell). For > result sets that are larger than you'd like to load into the running > process, but rather step through the results and have them fetched on > demand from the server, I've tried creating a version of > with-query-results that does this. Somebody else had the same problem and came up a similar solution: http://groups.google.com/group/clojure-dev/browse_thread/thread/d8334759f10f3f45 https://www.assembla.com/spaces/clojure-contrib/tickets/88-clojure-contrib-sql-runs-out-of-memory-on-very-large-datasets I have no idea when this will get released though. Saul -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Traffic junctions as a metaphor for understanding the STM?
Well, there are intelligent beings with the ability to make decisions entering the traffic junction, not exactly the same as with the STM. On Oct 16, 11:07 am, Sam Aaron wrote: > This might be slightly off the wall, but I recently watched a tiny > documentary about an experimental congestion control strategy in the UK where > at a busy junction they disabled the traffic lights. Interestingly it > reminded me of Clojure's STM (except on car crashes a big robot arm would > scoop up the crashed cars, fix them up, and place them back in the traffic > queue). Coordination could be seen as attaching cars together by a rope and > treating them as one car for the purpose of the junction. Locks can be seen > as the traffic lights themselves. > > Anyway, I wondered if any of you had any opinions. I really think we could do > with some good analogies for elusive notions such as the STM. > > Video in question:http://www.wimp.com/trafficlights > > Sam > > ---http://sam.aaron.name -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
[ANN] rinzelight 0.0.2
Hi there, I've just released rinzelight 0.0.2, an image library for Clojure. It is my first clojure library, so please, comment, report bugs and ask for features. More info in the README and in here: http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/ http://github.com/Serabe/rinzelight Serabe -- http://sergio.arbeo.net http://www.serabe.com -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Traffic junctions as a metaphor for understanding the STM?
On 17 Oct 2010, at 8.54 am, michele wrote: > > Well, there are intelligent beings with the ability to make decisions > entering the traffic junction, not exactly the same as with the STM. Of course, all analogies have their limitations; I wasn't proposing this as a perfect model, just something that gave me some insight. Out of interest, what analogies do you use to conceptualise the STM? Sam --- http://sam.aaron.name -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: [ANN] rinzelight 0.0.2
Hello Sergio, this library looks very good! Many times better than working with images directly. I'll try if I have a use for it in my project. If so, you can be sure that I'll send you some pull requests on Github (I need some other effects, blitting and other stuff) Best Regards, Moritz Ulrich On Sun, Oct 17, 2010 at 2:00 PM, Sergio Arbeo wrote: > Hi there, > > I've just released rinzelight 0.0.2, an image library for Clojure. It > is my first clojure library, so please, comment, report bugs and ask > for features. > > More info in the README and in here: > http://www.serabe.com/2010/10/17/introducing-rinzelight-0-0-2/ > > http://github.com/Serabe/rinzelight > > Serabe > > -- > http://sergio.arbeo.net > http://www.serabe.com > > -- > 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 with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- Moritz Ulrich Programmer, Student, Almost normal Guy http://www.google.com/profiles/ulrich.moritz BB5F086F-C798-41D5-B742-494C1E9677E8 -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: Emacs auto-complete plugin for slime users
Same here. It seems like auto-complete-mode doesn't fire up correctly. I tried to hook it using (add-hook 'slime-repl-mode-hook (lambda () (auto-complete-mode t) but it doesn't seems to do anything. I have to open the mode manually. On Oct 16, 11:27 am, Jarl Haggerty wrote: > Should autocomplete work in the swankrepl? It works perfectly in a > clj buffer but nothing happens in therepl. > > On Aug 19, 7:46 am, Phil Hagelberg wrote: > > > On Thu, Aug 19, 2010 at 6:21 AM, Steve Purcell wrote: > > > I guess Phil's very busy, but if he can apply this patch, then the > > > regular swank-clojure 1.3.0-SNAPSHOT on clojars should end up containing > > > the fix. > > > Just applied this patch and pushed to github and clojars. Thanks! > > > -Phil -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Is this bug in Google AppEngine, appengine-clj or Clojure itself?
Adding that type hint fixed the problem. Thanks. On Oct 17, 3: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 that problem by patching > appengine-clj to hint the method call to be on the public interface: > DatastoreService. > > (defn current-transaction > "Returns the current datastore transaction, or nil if not within a > transaction." [] (.getCurrentTransaction > ^com.google.appengine.api.datastore.DatastoreService > (datastore) nil)) -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
ClojureCLR now on VS2010/.NET4 + easier to get started
ClojureCLR can now be compiled to run under either .NET 3.5 or .NET 4.0. To support this, development is now under Visual Studio 2010. The build process has been improved (thanks to Kurt Schelfthout). Among other improvements, it will be easier for those wanting to play to get started. To get started: For users: download an appropriate zip file from the Downloads area on the github site, unzip, run Clojure.Main.exe. For developers: clone the repo, pull down lib.zip from the Downloads area and unzip into your repo, open the Solution in VS 2010, pick your configuration (Debug/Release + 3.5/4.0), compile, run. We (mostly Kurt) are still working on a build step for the Clojure tests, coming soon. -David -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: generator in Clojure
I don't actually 'know' that I need a function that relies on mutable state, I'm really just trying to understand how to do what I want using the functional paradigm. I'm writing a data generator which creates CSV files to be uploaded to a test database. I'm simulating the behavior of some network objects (servers, server pools, virtual IP addresses, etc.) and I want to be able to generate traffic records randomized around an arbitrary function, like a sine wave. Currently I do something like this: (def network-object {:name "foo" :value 0}) (defn generate-data [n-timestamps network-objects f] (loop [t 0] (when (< t n-timestamps) (doseq [object network-objects] (prn t (object :name) (f (object :value (recur (inc t))) So I apply f to each object's value for each time t and I'd like that function f to modify each network-object's value in a (potentially) periodic manner. How should I structure my code to do this functionally? I could (of course) pass the timestamp to f so f is not stateful and I get effectively the nth value but that seems highly inefficient. Ideas welcome. On Oct 14, 11:56 pm, Konrad Hinsen wrote: > On 14 Oct 2010, at 21:52, clwham...@gmail.com wrote: > > > I need a function that produces the 'next' value from a lazy-seq -- > > something like a Python generator. I imagine it would have to be some > > sort of closure like: > > > (def next-sine > > (let [sines (atom (cycle (map sin (range 0 6.28 0.01] > > #(swap! sines rest))) > > > Is there a more idomatic way of doing this? I don't see a lot of use > > of closures in clojure... > > Closures are common in Clojure, but mostly they capture values rather > than storage locations. > > Could you tell us why you "need" a function that relies on mutable > state? Clojure has lots of functions to make, transform, and use > sequences in a functional style, and those are usually preferred. > > If your need comes from the wish to do stream processing without > passing the stream around explicitly among lots of functions, consider > using monads to abstract away the stream argument: > > > http://github.com/clojure/clojure-contrib/blob/master/modules/stream-... > > Konrad. -- 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 with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en