Re: Generalizing -> & ->>
On Sat, Dec 05, 2009 at 01:38:36AM +0300, Ivan Sagalaev wrote: >Cliff Wells wrote: >> I am >> unable to see why someone shouldn't be able to receive a signed PDF via >> email and achieve a similar level of confidence that the signor was >> legitimate. > >BTW Canonical does exactly that[1]. I've just recently signed their CCA >which consisted of downloading a PDF from the site and sending it back >to them with the words like "I agree with this". It's going to depend a lot on who is interpreting the laws and what decisions they make. I've done contributor agreements via scanned documents and via fax. I don't think I've yet actually mailed one (although that may change if I contribute something to Clojure). 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: ClojureCLR questions
On Dec 4, 1:35 am, mac wrote: > Apologies if this has been answered, did a quick search but found only > pieces of info. > Is it possible to run ClojureCLR on Mono yet? > There was an issue with the BigDecimal dependency from J#? > > /Markus I don't know if anyone has tried running on Mono yet. ClojureCLR now has its own implementation of BigDecimal. There is no reliance on vjslib. I hope someone will give it a try and report back. -- 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: ClojureCLR questions
Mike K, > 1. IronPython needs to be syntactically compatible with Python, so > there were struggles over an attribute syntax that would be valid > Python syntax > > 2. Python class (type) semantics are more flexible than .net type > semantics, so classes in IronPython are not real .net types. > > I would suspect that point 1 would not be much of an issue for > ClojureCLR. I have no idea about point 2 but would like to hear your > take. Regarding (1), we have a lot more flexibility in how to hack syntax, but where it goes and how it looks are still going to require some thought. A careful analysis of where Clojure defines new JVM/CLR classes, such as proxy, is required. It is probably best to defer this until deftype/reify and other goodies in the 'new' branch settle down. Regarding (2). Clojure-defined types, as in proxy/deftype/etc. exist directly as JVM/CLR types, unlike IronPython, so this should not be a problem for us. Thanks for the links to the IronPython/attributes material. > > 2. Performance goals: Clojure:Java::ClojureCLR:C#. Not there yet, > > but no reason why this is not achievable. If you look at the IL > > generated,ClojureCLRis almost identical to ClojureJVM. > > This comes as a pleasant surprise to me. I know very little about > Clojure, but based on my naive understanding that it's a dynamic > language implemented on top of the DLR, I would have thought that C#- > like performance would be a bridge too far. Isn't there a significant > cost to be paid for the late binding and runtime checks > (notwithstanding partial amelioration of the issues via the DLR's > support for caching the results of method binding, etc.)? Nobody > really talks about C#-like performance goals for IronPython or > IronRuby. Is Clojure in any sense "less dynamic" than those > languages? My proportionality equattion (Clojure:Java::ClojureCLR:C#) was an attempt to say that I hope to make ClojureCLR performance relative to the more static languages on the CLR close to the performance of Clojure relative to Java. Note that I'm making no statement about the actual perf of Clojure relative to Java. Look around this group's archives and you will find plenty of discussion of that topic. ClojureCLR will pay pretty much the same price as ClojureJVM for late binding and runtime checks. The implementations are pretty much identical. I am about to put in code to take advantange of the DLR's call sites and the caching that comes with that for host expressions (CLR interop).I may get some avoidance of reflection that ClojureJVM *currently* does not enjoy. The most significant difference I know of in the implementations is an extra indirection through a static field that takes place during Clojure function invocation. It could well be that that can be inlined by the CLR optimizer, but I haven't had time to check it. (This difference is caused by a limitation of the DLR--it can only generate static methods into AOT-compiled code.) My equations was also designed to sidestep any issues of JVM versus CLR performance. > Also, while I have your attention, another question: I think the CLR > provides support for optimized tail calls. Does / will ClojureCLR > take advantage of this capability? Not in a direct way. When you write Clojure code, you will still want to use recur properly. That sidesteps the issue. (There may be some effect on some very internal implementation details, but nothing that would effect the Clojure application programmer.) -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: Generalizing -> & ->>
Cliff Wells wrote: > I am > unable to see why someone shouldn't be able to receive a signed PDF via > email and achieve a similar level of confidence that the signor was > legitimate. BTW Canonical does exactly that[1]. I've just recently signed their CCA which consisted of downloading a PDF from the site and sending it back to them with the words like "I agree with this". [1]: http://www.canonical.com/contributors -- 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: Modeling a relation: maps or vectors, one ref or many refs
Ah, yes, I could use Datalog, but I need a couple of other things it doesn't do right now—namely, cached derived relations. But in any case, Datalog is a good example of the second choices for both the first and second questions. What I'm interested in, though, are the relative merits of both approaches to both questions—what would be the best/fastest/most- efficient/elegant/idiomatic/Clojure-y ways: vectors or maps, one ref or many little refs. For those people who use the Contrib's Datalog, how is its performance? (Come to think of it, there's also a third way to manage relations' data internally: instead of a set of tuples/maps, a map of indexes to tuples/maps. It'd probably be the fastest, but perhaps harder to edit?) On Dec 4, 4:37 pm, "Alex Osborne" wrote: > samppi writes: > > I want to create a little Clojure library that creates cached > > relational systems in the style of Ben Moseley's "Out of the Tar > > Pit" (http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf), which is > > something that I think would serve me better than just nested maps for > > something. > > You may already know about it, but if you don't, you might also like to > take a look at clojure.contrib.datalog. There's some documentation here: > > http://code.google.com/p/clojure-contrib/wiki/DatalogOverview -- 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: Getting Started in Mac OS X Snow Leopard
That was the same problem it gave me. When I follow those steps. Since you already install some stuff, what I did was erase the ~/.emcas.d/ folder (rm -r ~/.emacs.d) and the ~/src/ folder (I don't remember what, but something got installed there form clojure, and that was the only thing I had there, that's why I could just erase the whole folder), and ~/.emacs. So basically to install it, I un-install all the stuff that did work how I expected. After this I follow this steps: 1. Install emacs from here: http://emacsformacosx.com/ 2. Install Elpa in emacs, following the instructions from: http://tromey.com/elpa/install.html 3. Install swank-clojure using ELPA: M-x package-list-packages, typing i next to swank-clojure (http://technomancy.us/swank-clojure) 4. Than just do M-x slime. At this point it will say that clojure is not install, and ask if you want to install it, just say yes. This will do the rest. It will download and install for you all you need. Slime, Clojure, etc. Once you do this it should work. It worked for me. Once you do the installation using steps 1, 2 and 3, you'll have a new ~/.emacs, ~/.emacs.d. Notice that if you have Aquamacs install your ~/ Library/Preferences/Aquamacs\ Emacs/Preferences.el will not work, since you have a ~/.emacs, so in order to use Aquamacs and use it with out problems, you have to edit your ~/.emacs file, just put ";" at the beginning of each line you don't want to be consider. By the way, your ~/Library/Preferences/Aquamacs\ Emacs/customizations.el might be change, and have some lines that say that where included by Elpa, I erase those lines as well, so I would suggest to do that. Hope this helps. Good luck Andreas. Guido On Dec 3, 9:35 am, Andreas Pauley wrote: > Hi all, > > I followed the above swank-clojure instructions using bothAquamacs > and the plain emacs for Mac OS X on my Leopard Macbook. > I also tried it on an Ubuntu (Hardy) desktop. > > In all of these cases the process fails when slime tries to connect to > the Lisp interpreter. > > Just to be explicit, here are the steps I followed (using Linux this > time): > 1. Install ELPA usinghttp://tromey.com/elpa/install.html(No > problems) > 2. Install clojure-mode using M-x package-list-packages, typing i next > to clojure-mode, and then x > There were a few warnings with this step, but clojure-mode seems to be > working afterwards. > > 3. Install swank-clojure using M-x package-list-packages, typing i > next to swank-clojure, and then x > There were quite a few warnings with this step. > (If I don't install clojure-mode explicitly before swank-clojure, this > step ends with an error) > > 4. M-x slime, answer yes when asking to install Clojure. This ends > with an error: > > It looks like Clojure is not installed. Install now? (y or n) > Loading url...done > Loading url-auth...done > Contacting host: repo.technomancy.us:80 > Loading url-cache...done > Loading mail-utils...done > Reading [text/plain]... 571k of 571k (100%) > Loading arc-mode...done > Parsing archive file...done. > Saving file /home/andreas/.swank-clojure/swank-clojure-1.0.jar... > Wrote /home/andreas/.swank-clojure/swank-clojure-1.0.jar > byte-code: Wrong number of arguments: delete-directory, 2 > > Further attempts at M-x slime produces the following error, which is > probably expected since there is no clojure jar in my home dir, just > the swank clojure jar. > The error: > (require > 'swank.swank) > > (swank.swank/ignore-protocol-version > nil) > > (swank.swank/start-server "/tmp/slime.31171" :encoding "iso-latin-1- > unix") > > Exception in thread "main" java.lang.NoClassDefFoundError: clojure/ > main > Caused by: java.lang.ClassNotFoundException: > clojure.main > at java.net.URLClassLoader$1.run(URLClassLoader.java: > 217) > at java.security.AccessController.doPrivileged(Native > Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java: > 205) > at java.lang.ClassLoader.loadClass(ClassLoader.java: > 323) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java: > 294) > at java.lang.ClassLoader.loadClass(ClassLoader.java: > 268) > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java: > 336) > Could not find the main class: clojure.main. Program will > exit. > > Process inferior-lisp exited abnormally with code > 1 > > On my mac I have a working clojure which I can play with using jline. > I've just never been able to get slime and Clojure going. > > Any tips? > > Thanks, > Andreas -- 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: simple journal-based persistenсe for Clojure
I was about to say that. There's no need for the id's to be "contiguous", only to get them to grow to preserve ordering. If you can find a way in your design to increment the atom each time a transaction is retried then you would preserve ordering. The last value would be the one used in the "final" attempt. Replaying of transaction should be based on the sort order of ids, not on sequentially incrementing the id value. I lack time to look how it would be expressed in Clojure however... It's not obvious to me yet that you can increment the atom within a dosync without getting also the atom change rolled back before the next attempt if STM decides to retry the transaction. If this is not possible then you could just use a simple Java object with a synchronized function to obtain different growing values. That would be a mutable object out of the STM scope so any retry would obtain a new value. When you reload transactions from existing persisted data, you just create the Java object with a seed number that does not conflict with the biggest value. (I assume here that you can add stuff to your journal-based persistence after a reload). Luc On Fri, 2009-12-04 at 08:06 -0800, David Brown wrote: > On Fri, Dec 04, 2009 at 03:15:28PM +0200, Sergey Didenko wrote: > > >However it looks interesting, "(dosync (alter myref inc))" takes much longer > > If your var is independent, how about using an atom? > >(swap! myatom inc) > > seems to be about 5-10 times faster than a dosync/ref on my Linux machine. > > 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: Modeling a relation: maps or vectors, one ref or many refs
samppi writes: > I want to create a little Clojure library that creates cached > relational systems in the style of Ben Moseley's "Out of the Tar > Pit" (http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf), which is > something that I think would serve me better than just nested maps for > something. You may already know about it, but if you don't, you might also like to take a look at clojure.contrib.datalog. There's some documentation here: http://code.google.com/p/clojure-contrib/wiki/DatalogOverview -- 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: Generalizing -> & ->>
On Fri, 2009-12-04 at 11:49 -0800, Richard Newman wrote: > > The problem is that it is an unreasonably high barrier to entry. > > There MUST be an electronic-only way (and it must not require a cell > > phone, CC#, &c.) if the full potential of this community is to be > > unleashed upon clojure-contrib. In particular, there should be a way > > to participate pseudonymously for those people that (unlike myself) > > value their privacy sufficiently not to want to even post here under > > their real names. > > Raising the barrier to entry stops people pseudonymously contributing > code they don't own. If you're not even willing to stand behind it > with your own name, and someone sues Rich, he has little recourse. > "Yeah, some dude named Gecko45 contributed this library. I don't know > his real name or where he lives, sorry.". > > I'm sure Rich would be happy to avoid posting a contributor's name if > they didn't want it public. > > Yes, this makes it more difficult for someone to just email a fix for > a small bug. However, I quite understand Rich's reasons for doing it. > I don't think it creates an unreasonably high barrier to entry, and I > don't see why there MUST be an electronic-only way. If people don't > want to submit a CA, they're welcome to put their libraries on GitHub > like everyone else. > What isn't clear to me is exactly what a piece of paper provides that an electronic form doesn't (aside from inconvenience). I don't see any requirement for notarization, registered mail, etc, so the paper is simply worth a bit less than it was before it was printed on. Any contributor in fear of culpability could resort to simple denial. I am unable to see why someone shouldn't be able to receive a signed PDF via email and achieve a similar level of confidence that the signor was legitimate. Regards, Cliff -- 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: Generalizing -> & ->>
> I'm not in Germany. I presume the concern isn't about you, but rather about the Germans who can't consider the code as free to use. I imagine the idea is to make the source truly open, everywhere. > The problem is that it is an unreasonably high barrier to entry. There MUST > be an electronic-only way (and it must not require a cell phone, CC#, &c.) > if the full potential of this community is to be unleashed upon > clojure-contrib. In particular, there should be a way to participate > pseudonymously for those people that (unlike myself) value their privacy > sufficiently not to want to even post here under their real names. You have to weigh your desire for ease and privacy against your desire for the source to be open everywhere. I'd bet that some countries don't honor electronic signatures as legally binding. Similarly, I'd doubt that a pseudonymous entity can be considered a copyright holder. Again, this falls back on the public domain issue. Naturally, I'm not a lawyer. I just like to throw around theories. -- 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
Modeling a relation: maps or vectors, one ref or many refs
I want to create a little Clojure library that creates cached relational systems in the style of Ben Moseley's "Out of the Tar Pit" (http://web.mac.com/ben_moseley/frp/paper-v1_01.pdf), which is something that I think would serve me better than just nested maps for something. I'm at the planning stage right now, and I'm pondering two questions: - Should a relation's data be internally represented by: - A set of vector tuples, plus a vector of the tuples' attribute names - A set of array maps - A set of struct maps (which may be replaced by deftyped maps) - (Each have their pros and cons for performance and elegance.) - (I've read http://groups.google.com/group/clojure/browse_thread/thread/e0823e1caaff3eed which is may be related to this, but the relations' guts are meant to be off-limits by the API, so it doesn't really apply.) - I also want to be able to use these relational systems as both immutable data and mutable data. Should a mutable relational system be: - A single ref containing the entire relational system data structure - A modified relational system data structure containing refs containing single relations What do you think? -- 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: Generalizing -> & ->>
> The problem is that it is an unreasonably high barrier to entry. > There MUST be an electronic-only way (and it must not require a cell > phone, CC#, &c.) if the full potential of this community is to be > unleashed upon clojure-contrib. In particular, there should be a way > to participate pseudonymously for those people that (unlike myself) > value their privacy sufficiently not to want to even post here under > their real names. Raising the barrier to entry stops people pseudonymously contributing code they don't own. If you're not even willing to stand behind it with your own name, and someone sues Rich, he has little recourse. "Yeah, some dude named Gecko45 contributed this library. I don't know his real name or where he lives, sorry.". I'm sure Rich would be happy to avoid posting a contributor's name if they didn't want it public. Yes, this makes it more difficult for someone to just email a fix for a small bug. However, I quite understand Rich's reasons for doing it. I don't think it creates an unreasonably high barrier to entry, and I don't see why there MUST be an electronic-only way. If people don't want to submit a CA, they're welcome to put their libraries on GitHub like everyone else. -- 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: WebDriver wrapper
Hello All, A wrapper for WebDriver (http://code.google.com/p/selenium/) can be found at http://github.com/mikitebeka/webdriver-clj. Have fun testing your web site. Since I'm both a Clojure newbie and a WebDriver newbie I'm expecting a lot of enlightenment in the near future :) Thanks, -- Miki -- 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: Clojure development environments
+1 for Waterfront I was hoping it would be what IDLE is to Python. On Fri, Dec 4, 2009 at 8:43 AM, Wilson MacGyver wrote: > I want to add another vote for using La Clojure plugin for IntelliJ. > > I use it on both OSX and windows. works pretty well for me. > > -- > Omnem crede diem tibi diluxisse supremum. > > -- > 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 > -- John -- 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: Clojure development environments
I want to add another vote for using La Clojure plugin for IntelliJ. I use it on both OSX and windows. works pretty well for me. -- Omnem crede diem tibi diluxisse supremum. -- 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: book
At the least, there will be a document describing the changes from 1.0 to 1.1. -SS On Dec 4, 9:27 am, ".Bill Smith" wrote: > I haven't been tracking all the changes in Clojure since the 1.0 > release. Will there be a 1.1 version of the Clojure book? It's one > thing to read the API documentation, and something else to have enough > context to know why a function or macro exists and when it is > appropriate to use it. -- 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: simple journal-based persist enсe for Clojure
On Fri, Dec 04, 2009 at 03:15:28PM +0200, Sergey Didenko wrote: >However it looks interesting, "(dosync (alter myref inc))" takes much longer If your var is independent, how about using an atom? (swap! myatom inc) seems to be about 5-10 times faster than a dosync/ref on my Linux machine. 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: Clojure development environments
I'm using LaClojure with IntelliJ IDEA Community Edition on a Vista box without problems. Not sure about before, but it works now 8) Also I just tried Clojure Box as mentioned above on an XP box and it works like a charm. On Dec 4, 10:30 am, David Hilton wrote: > Last I checked (2-3 months ago) LaClojure didn't work with Windows - > due to the way it handles some paths, I believe? -- 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: Clojure development environments
On Dec 4, 6:00 am, Vaclav Pech wrote: > You might also consider IntelliJ IDEA with its LaClojure plugin. I guess the > open-source Community Edition (http://www.jetbrains.org) could be worth your > looking at. Last I checked (2-3 months ago) LaClojure didn't work with Windows - due to the way it handles some paths, I believe? -- 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: Generalizing -> & ->>
On Fri, Dec 4, 2009 at 8:57 AM, Miron Brezuleanu wrote: > On Fri, Dec 4, 2009 at 2:33 PM, John Harrop wrote: > > The problem is that it is an unreasonably high barrier to entry. There > MUST > > be an electronic-only way (and it must not require a cell phone, CC#, > &c.) > > if the full potential of this community is to be unleashed upon > > clojure-contrib. In particular, there should be a way to participate > > pseudonymously for those people that (unlike myself) value their privacy > > sufficiently not to want to even post here under their real names. > > Remember SCO & IBM & Novell & Linux & many others? I assume this is > why many open source projects today require CAs. > Interesting, but does not address the needs mentioned in the quoted paragraph. -- 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: insert-rows
Hey mark I guess that you are using ClojureQL, can you post your function call? Ronen On Nov 25, 6:39 pm, Mark Stang wrote: > Hi, > I am working on reading a pipe delimited file into a SQL database. > > I can read the lines using > (doseq [line (read-lines "myfile.csv")] > > and format the lines using > > (map #(format "\"%s\"" %) (re-split #"\|" line)) > > This results in list for each line. > > I have created a table that has one column for each value in the list. > The values are like ("mark" "stang" "employee"). > > What I can figure out is how to "convert" the list into something that > can be passed to insert-rows. > > The error I get is that "insert into mytable values ()" I have tried > converting the row into a vector > > (vec (map #(format "\"%s\"" %) (re-split #"\|" line))) > > Which when I print it, it looks like ["mark" "stang" "employee"] but the > insert-rows function isn't seeing it. I have tried doing a let for each > line and passing the name, but no such luck. > > It seems that I could get it to work with insert-values, but that seems > like a lot of overhead. > > I would think I should be able to call insert-rows with the results of > reading the entire file. > > Thoughts? > > Thanks, > > Mark -- 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
book
I haven't been tracking all the changes in Clojure since the 1.0 release. Will there be a 1.1 version of the Clojure book? It's one thing to read the API documentation, and something else to have enough context to know why a function or macro exists and when it is appropriate to use it. -- 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: Generalizing -> & ->>
Hello, On Fri, Dec 4, 2009 at 2:33 PM, John Harrop wrote: > > > On Fri, Dec 4, 2009 at 6:51 AM, Meikel Brandmeyer wrote: >> >> Hi, >> >> On 4 Dez., 05:17, John Harrop wrote: >> > > The rules on contrib are that the work must be original to the author. >> > > Even >> > > with Andrew's disclaimer that it be considered public domain, he would >> > > still >> > > need a contributor agreement in place to get this incorporated into >> > > contrib. >> > >> > Why? >> > >> > (Having to use paper mail is especially a high hurdle for what is >> > otherwise >> > a purely online activity.) >> >> Because that are the rules. > > Circular argument. Those are the rules because those are the rules? That > doesn't satisfy me any more than it does my three-year-old. > >> >> Eg. in Germany > > I'm not in Germany. > >> >> Rich wants to be sure, that there will not be any legal >> issues later on. Understandable, I think. (And a good idea, BTW) > > The problem is that it is an unreasonably high barrier to entry. There MUST > be an electronic-only way (and it must not require a cell phone, CC#, &c.) > if the full potential of this community is to be unleashed upon > clojure-contrib. In particular, there should be a way to participate > pseudonymously for those people that (unlike myself) value their privacy > sufficiently not to want to even post here under their real names. Remember SCO & IBM & Novell & Linux & many others? I assume this is why many open source projects today require CAs. -- Miron Brezuleanu -- 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: simple journal-based persistenсe for Clojure
That was for Windows and client JVM. On my Linux server JVM sometimes even 100 of "(dosync (alter myref inc))" has the same nanoTimes. So it's rather dangerous approach, unless your program follows the condition. > "(dosync (alter myref inc))" takes much longer than timer granularity on my > Windows -- 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: simple journal-based persistenсe for Clojure
Unfortunately: "No guarantees are made about how frequently values change." "Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger." (see System nanoTime, currentTimeMillis javadoc) However it looks interesting, "(dosync (alter myref inc))" takes much longer than timer granularity on my Windows. Also for "transaction B" to depend on "transaction A" from another thread it usually need to read A results first,so the effective interval is even longer. (and much longer for a web application transactions for example) This is not suitable for general case, but can be implemented to be run under condition that any dependable transactions are split in time further than OS timer granularity. The locking is unnecessary at all in that case. But IMHO the cleaner approach is to somehow return global transaction id from Clojure STM if it's possible. On Fri, Dec 4, 2009 at 2:16 PM, John Harrop wrote: > On Fri, Dec 4, 2009 at 6:50 AM, Sergey Didenko > wrote: > >> Without the global transaction counter another problem arises. >> >> Suppose transaction B depends on ( results of ) transaction A. And they >> are executed from different threads. However they have the right order when >> executing the first time. >> >> How to guarantee that the execution order is the same when transactions >> are replayed? >> > > Use System/currentTimeMillis as a component in the transaction ID, along > with a thread-local component, perhaps. > > -- > 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 > -- 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: Clojure development environments
You might also consider IntelliJ IDEA with its LaClojure plugin. I guess the open-source Community Edition (http://www.jetbrains.org) could be worth your looking at. Regards, Vaclav On Fri, Dec 4, 2009 at 1:27 PM, abhi wrote: > Forgot to mention. 'socks' sets up slime, clojure and bunch of other > modes for emacs. You will have to install emacs by yourself in order > for it to work. > > On Fri, Dec 4, 2009 at 5:48 PM, abhi wrote: > > I don't know which OS you are running on, but if you are using windows > > you can checkout clojurebox. > > It setups emacs, clojure, and sets up slime. It works out of the box. > > You can find it here: http://clojure.bighugh.com/ > > > > If you want to setup clojure on linux you could use a system called > > Boots. This is what I use. The installation is pretty simple. This > > sets up only clojure though. The author has one more project called > > socks but this seems to be broken because of the latest changes to > > swank-clojure. > > > > > > n Fri, Dec 4, 2009 at 3:48 PM, balln...@googlemail.com > > wrote: > >> At present the biggest problem Clojure has, is the lack of an easily > >> accessible development environment. > >> If the language is a masterpiece but has no complete, integrated and > >> convenient development environment to offer it his like having a new > >> Porsche but no keys to open the doors. > >> This is what is missing to give the language more momentum and > >> popularity. > >> > >> It does not have to be as complete and comfortable as Allegro from > >> Franz (Common Lisp) or Lispworks from the start. If you think of IDLE > >> for Python for example, it comes with the distribution and works out > >> of the box. This is easy access! > >> > > > >> Emacs / clojure-mode: > >> You need to install git to pull down the latest sources! > >> You need Clojure and Clojure-contrib (usually you cannot dowload > >> contrib but have to build it) > >> You need to have ant / maven to build contrib > > > >> You need to download Emacs > >> You need to download clojure-mode > >> You need to modify .el startup files for Emacs > >> and then - how do I get to the REPL? how does this all work? Is there > >> any doc or help? - no > >> Sorry but Emacs is unfamiliar to regular developers > >> > >> VimClojure: > >> similar to clojure-mode setup ... separate downloads, builds, > >> configs ... > >> and then it does not work out of the box or you need to read forums > >> for hours to assemble you base knowledge on how things work > >> > >> Textmate / Clojure bundle: > >> The Clojure bundle requires Ruby. > >> Nothing against Ruby, but I have to install another entire language > >> just to give me some limited IDE features. > >> At least Textmate is a very convenient Editor for non-geeks > >> > >> Eclipse / counterclockwise > >> You need to download and install this giant block of "can do > >> everything" infrastructure - Eclipse > >> You need to install the plugin that is good an evolving but still > >> limited > >> If you consider the disk- and memory-space- / feature-ratio ... > >> > >> Netbeans / Enclojure > >> worked relatively well so far ... needs time to grow further > >> > >> Waterfront > >> I like the idea very much > >> lightweight > >> Clojure specific (in contrast to Eclipse, Netbeans, Idea) > >> configurable in Clojure! > >> unfortunately it keeps crashing > >> > >> If a more evolved / robust waterfront would be a part of the contrib, > >> it would be a big step towards approachability > >> > > > > > > > > -- > > Queer little twists and quirks go into the making of an individual. > > To suppress them all and follow clock and calendar and creed until the > > individual is lost in the neutral gray of the host is to be less than > > true to our inheritance. > > Life, that gorgeous quality of life, is not accomplished by following > > another man's rules. > > It is true we have the same hungers and same thirsts, but they are for > > different things and in different ways and in different seasons. > > Lay down your own day, follow it to its noon, or you will sit in an > > outer hall listening to the chimes but never reaching high enough to > > strike your own. > > > > > > -- > Queer little twists and quirks go into the making of an individual. > To suppress them all and follow clock and calendar and creed until the > individual is lost in the neutral gray of the host is to be less than > true to our inheritance. > Life, that gorgeous quality of life, is not accomplished by following > another man's rules. > It is true we have the same hungers and same thirsts, but they are for > different things and in different ways and in different seasons. > Lay down your own day, follow it to its noon, or you will sit in an > outer hall listening to the chimes but never reaching high enough to > strike your own. > > -- > 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 > Not
Re: Generalizing -> & ->>
On Fri, Dec 4, 2009 at 6:51 AM, Meikel Brandmeyer wrote: > Hi, > > On 4 Dez., 05:17, John Harrop wrote: > > > The rules on contrib are that the work must be original to the author. > Even > > > with Andrew's disclaimer that it be considered public domain, he would > still > > > need a contributor agreement in place to get this incorporated into > contrib. > > > > Why? > > > > (Having to use paper mail is especially a high hurdle for what is > otherwise > > a purely online activity.) > > Because that are the rules. Circular argument. Those are the rules because those are the rules? That doesn't satisfy me any more than it does my three-year-old. > Eg. in Germany I'm not in Germany. > Rich wants to be sure, that there will not be any legal > issues later on. Understandable, I think. (And a good idea, BTW) The problem is that it is an unreasonably high barrier to entry. There MUST be an electronic-only way (and it must not require a cell phone, CC#, &c.) if the full potential of this community is to be unleashed upon clojure-contrib. In particular, there should be a way to participate pseudonymously for those people that (unlike myself) value their privacy sufficiently not to want to even post here under their real names. -- 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: Clojure development environments
Forgot to mention. 'socks' sets up slime, clojure and bunch of other modes for emacs. You will have to install emacs by yourself in order for it to work. On Fri, Dec 4, 2009 at 5:48 PM, abhi wrote: > I don't know which OS you are running on, but if you are using windows > you can checkout clojurebox. > It setups emacs, clojure, and sets up slime. It works out of the box. > You can find it here: http://clojure.bighugh.com/ > > If you want to setup clojure on linux you could use a system called > Boots. This is what I use. The installation is pretty simple. This > sets up only clojure though. The author has one more project called > socks but this seems to be broken because of the latest changes to > swank-clojure. > > > n Fri, Dec 4, 2009 at 3:48 PM, balln...@googlemail.com > wrote: >> At present the biggest problem Clojure has, is the lack of an easily >> accessible development environment. >> If the language is a masterpiece but has no complete, integrated and >> convenient development environment to offer it his like having a new >> Porsche but no keys to open the doors. >> This is what is missing to give the language more momentum and >> popularity. >> >> It does not have to be as complete and comfortable as Allegro from >> Franz (Common Lisp) or Lispworks from the start. If you think of IDLE >> for Python for example, it comes with the distribution and works out >> of the box. This is easy access! >> > >> Emacs / clojure-mode: >> You need to install git to pull down the latest sources! >> You need Clojure and Clojure-contrib (usually you cannot dowload >> contrib but have to build it) >> You need to have ant / maven to build contrib > >> You need to download Emacs >> You need to download clojure-mode >> You need to modify .el startup files for Emacs >> and then - how do I get to the REPL? how does this all work? Is there >> any doc or help? - no >> Sorry but Emacs is unfamiliar to regular developers >> >> VimClojure: >> similar to clojure-mode setup ... separate downloads, builds, >> configs ... >> and then it does not work out of the box or you need to read forums >> for hours to assemble you base knowledge on how things work >> >> Textmate / Clojure bundle: >> The Clojure bundle requires Ruby. >> Nothing against Ruby, but I have to install another entire language >> just to give me some limited IDE features. >> At least Textmate is a very convenient Editor for non-geeks >> >> Eclipse / counterclockwise >> You need to download and install this giant block of "can do >> everything" infrastructure - Eclipse >> You need to install the plugin that is good an evolving but still >> limited >> If you consider the disk- and memory-space- / feature-ratio ... >> >> Netbeans / Enclojure >> worked relatively well so far ... needs time to grow further >> >> Waterfront >> I like the idea very much >> lightweight >> Clojure specific (in contrast to Eclipse, Netbeans, Idea) >> configurable in Clojure! >> unfortunately it keeps crashing >> >> If a more evolved / robust waterfront would be a part of the contrib, >> it would be a big step towards approachability >> > > > > -- > Queer little twists and quirks go into the making of an individual. > To suppress them all and follow clock and calendar and creed until the > individual is lost in the neutral gray of the host is to be less than > true to our inheritance. > Life, that gorgeous quality of life, is not accomplished by following > another man's rules. > It is true we have the same hungers and same thirsts, but they are for > different things and in different ways and in different seasons. > Lay down your own day, follow it to its noon, or you will sit in an > outer hall listening to the chimes but never reaching high enough to > strike your own. > -- Queer little twists and quirks go into the making of an individual. To suppress them all and follow clock and calendar and creed until the individual is lost in the neutral gray of the host is to be less than true to our inheritance. Life, that gorgeous quality of life, is not accomplished by following another man's rules. It is true we have the same hungers and same thirsts, but they are for different things and in different ways and in different seasons. Lay down your own day, follow it to its noon, or you will sit in an outer hall listening to the chimes but never reaching high enough to strike your own. -- 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: simple journal-based persistenсe for Clojure
On Fri, Dec 4, 2009 at 6:50 AM, Sergey Didenko wrote: > Without the global transaction counter another problem arises. > > Suppose transaction B depends on ( results of ) transaction A. And they are > executed from different threads. However they have the right order when > executing the first time. > > How to guarantee that the execution order is the same when transactions are > replayed? > Use System/currentTimeMillis as a component in the transaction ID, along with a thread-local component, perhaps. -- 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: Clojure development environments
I don't know which OS you are running on, but if you are using windows you can checkout clojurebox. It setups emacs, clojure, and sets up slime. It works out of the box. You can find it here: http://clojure.bighugh.com/ If you want to setup clojure on linux you could use a system called Boots. This is what I use. The installation is pretty simple. This sets up only clojure though. The author has one more project called socks but this seems to be broken because of the latest changes to swank-clojure. n Fri, Dec 4, 2009 at 3:48 PM, balln...@googlemail.com wrote: > At present the biggest problem Clojure has, is the lack of an easily > accessible development environment. > If the language is a masterpiece but has no complete, integrated and > convenient development environment to offer it his like having a new > Porsche but no keys to open the doors. > This is what is missing to give the language more momentum and > popularity. > > It does not have to be as complete and comfortable as Allegro from > Franz (Common Lisp) or Lispworks from the start. If you think of IDLE > for Python for example, it comes with the distribution and works out > of the box. This is easy access! > > Emacs / clojure-mode: > You need to install git to pull down the latest sources! > You need Clojure and Clojure-contrib (usually you cannot dowload > contrib but have to build it) > You need to have ant / maven to build contrib > You need to download Emacs > You need to download clojure-mode > You need to modify .el startup files for Emacs > and then - how do I get to the REPL? how does this all work? Is there > any doc or help? - no > Sorry but Emacs is unfamiliar to regular developers > > VimClojure: > similar to clojure-mode setup ... separate downloads, builds, > configs ... > and then it does not work out of the box or you need to read forums > for hours to assemble you base knowledge on how things work > > Textmate / Clojure bundle: > The Clojure bundle requires Ruby. > Nothing against Ruby, but I have to install another entire language > just to give me some limited IDE features. > At least Textmate is a very convenient Editor for non-geeks > > Eclipse / counterclockwise > You need to download and install this giant block of "can do > everything" infrastructure - Eclipse > You need to install the plugin that is good an evolving but still > limited > If you consider the disk- and memory-space- / feature-ratio ... > > Netbeans / Enclojure > worked relatively well so far ... needs time to grow further > > Waterfront > I like the idea very much > lightweight > Clojure specific (in contrast to Eclipse, Netbeans, Idea) > configurable in Clojure! > unfortunately it keeps crashing > > If a more evolved / robust waterfront would be a part of the contrib, > it would be a big step towards approachability > -- Queer little twists and quirks go into the making of an individual. To suppress them all and follow clock and calendar and creed until the individual is lost in the neutral gray of the host is to be less than true to our inheritance. Life, that gorgeous quality of life, is not accomplished by following another man's rules. It is true we have the same hungers and same thirsts, but they are for different things and in different ways and in different seasons. Lay down your own day, follow it to its noon, or you will sit in an outer hall listening to the chimes but never reaching high enough to strike your own. -- 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: Clojure development environments
On 4 Dec 2009, at 10:18, balln...@googlemail.com wrote: > Emacs / clojure-mode: > [...] > Sorry but Emacs is unfamiliar to regular developers > > VimClojure: > similar to clojure-mode setup ... separate downloads, builds, > configs ... > and then it does not work out of the box or you need to read forums > for hours to assemble you base knowledge on how things work > > Textmate / Clojure bundle: > The Clojure bundle requires Ruby. > Nothing against Ruby, but I have to install another entire language > just to give me some limited IDE features. > At least Textmate is a very convenient Editor for non-geeks > > Eclipse / counterclockwise > You need to download and install this giant block of "can do > everything" infrastructure - Eclipse > You need to install the plugin that is good an evolving but still > limited > If you consider the disk- and memory-space- / feature-ratio ... > > Netbeans / Enclojure > worked relatively well so far ... needs time to grow further So, in summary, you'd like a full-featured editor which is accessible to non-geeks, doesn't require the installation of much additional software or any additional supporting languages, but that has mature Clojure support almost out of the box. That's a tall order! :-) I guess a Clojure version of LispBox (http://www.gigamonkeys.com/lispbox/) would be nice to have. In the meantime, Netbeans + Enclojure is probably the closest you'll get. -Steve -- 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: Generalizing -> & ->>
Hi, On 4 Dez., 05:17, John Harrop wrote: > > The rules on contrib are that the work must be original to the author. Even > > with Andrew's disclaimer that it be considered public domain, he would still > > need a contributor agreement in place to get this incorporated into contrib. > > Why? > > (Having to use paper mail is especially a high hurdle for what is otherwise > a purely online activity.) Because that are the rules. Eg. in Germany there is no public domain (not allowed by the law). So "public domain" should not be an argument. Rich wants to be sure, that there will not be any legal issues later on. Understandable, I think. (And a good idea, BTW) Sincerely Meikel -- 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: Creating a matrix mirrored around it's main diagonal
On 04.12.2009, at 11:27, Tiemo Kieft wrote: > So transposing it is not enough. I need the part above the main > diagonal to be 'transposed' and put underneath the main diagonal. > Maybe I wasn't as clear as I hoped. Let me restate the issue. So you want to symmetrize your matrix, right? If possible, I'd construct it symmetric right from the start, e.g.: (defn matrix-element [i j] (cond (= i j) 0 (< i j) (- j i) :else(matrix-element j i))) (def matrix (vec (for [i (range 5)] (vec (for [j (range 5)] (matrix-element i j)) 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
Re: Getting Started in Mac OS X Snow Leopard
On Dec 3, 7:45 pm, christophe mckeon gonzalez de leon wrote: > you might want to try watching peepcode's emacs video. > he suggests using the carbon emacs port. i'm not sure > if i'll be going with that or with the plain terminal version, > i'm just getting acquainted with emacs myself. Thanks, I just bought both the Emacs and Clojure screencasts :-) Andreas -- 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: simple journal-based persistenсe for Clojure
Without the global transaction counter another problem arises. Suppose transaction B depends on ( results of ) transaction A. And they are executed from different threads. However they have the right order when executing the first time. How to guarantee that the execution order is the same when transactions are replayed? On Fri, Dec 4, 2009 at 6:40 AM, John Harrop wrote: > On Thu, Dec 3, 2009 at 6:31 PM, Sergey Didenko > wrote: > >> >> In comparison with Prevayler, the persister does not block the reads, >> because it relies on Clojure STM. However it blocks the writes as >> Prevayler, because currently there is no way to reliably get/ generate a >> transaction id without locking. >> > > What about thread-local allocation blocks of IDs? This reduces the locking > to when one of those blocks is exhausted. > > -- 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: simple journal-based persistenсe for Clojure
Here is the GitHub project: http://github.com/SergeyDidenko/Simple-Persistence-for-Clojure -- 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: Getting Started in Mac OS X Snow Leopard
On 4 Dec 2009, at 09:41, Lauri Pesonen wrote: > How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK > keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a > mode where option-3 is interpreted as '#' rather than a meta-3 which > takes care of my problem, but I haven't figured out how to do the same > thing in the Cocoa build. Here's what I do (in Cocoa Emacs 23) to make 'option' work the same in Emacs as in other OS X apps: (setq mac-command-modifier 'meta) (setq mac-option-modifier 'none) (setq default-input-method "MacOSX") With those settings, option-3 should give you '#' on your UK keyboard, and "option-e-e" would give you "é", for example. (My full emacs config tree is here: http://github.com/purcell/emacs.d) -Steve -- 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: Getting Started in Mac OS X Snow Leopard
On Dec 4, 3:37 am, Phil Hagelberg wrote: > So this is a problem with the auto-download of Clojure jars that > swank-clojure attempts. It looks like it's having trouble downloading > and is unable to clean up after itself, but I can't reproduce it. What > version of Emacs are you using? GNU Emacs 22.1.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2008-05-02 on king, modified by Ubuntu However, I've managed to get it working on my Mac using both: GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2009-08-16 on black.local and GNU Emacs 22.3.2 (i386-apple-darwin9.5.0, Carbon Version 1.6.0) of 2008-09-22 on plume.sr.unh.edu - Aquamacs Distribution 1.5 I deleted the .swank-clojure/ dir in my home directory and tried M-x slime again. It seems that this error occurs if the download fails and the .swank- clojure directory has already been created. To reproduce, create an empty .swank-clojure and do M-x slime again. The error "Wrong number of arguments: delete-directory, 2" occured only on my Ubuntu Hardy desktop. Maybe because it has the oldest version of the 3 emacsen. > > Note that this method of using slime is really only intended for quick > experimentation. The other methods (#2 and #3) of using slime detailed > athttp://technomancy.us/swank-clojureshould still work fine and are > generally more commonly used. Thanks, I think I'll try method 2. Regards, Andreas Pauley -- 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: Getting Started in Mac OS X Snow Leopard
On Fri, Dec 4, 2009 at 4:41 AM, Lauri Pesonen wrote: > 2009/12/2 Matthew Williams : > > Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I > > was able to get up and running extremely quickly with Technomancy's > > swank-clojure install. > > This is very much off-topic, but... > > How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK > keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a > mode where option-3 is interpreted as '#' rather than a meta-3 which > takes care of my problem, but I haven't figured out how to do the same > thing in the Cocoa build. > I don't suppose binding meta-3 to self-insert works? If not, find out if there's an elisp way to get a character by ASCII code or similarly. The # symbol is ASCII 35. Then find what elisp code is used to insert a specific character by ASCII code, and bind meta-3 to something you code up that inserts ASCII 35. -- 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: Creating a matrix mirrored around it's main diagonal
This is what it should look like: >>| 1 | 2 | 3 | >> >> 1 | 0 | A | B | >> >> 2 | A | 0 | C | >> >> 3 | B | C | 0 | >> > > Perhaps I'm misapprehending the issue, but why isn't the following > sufficient: > > (defn transpose [matrix] > (vec (apply map vector m))) > > (transpose > [[1 2] > [3 4]]) > > [[1 3] > [2 4]] So transposing it is not enough. I need the part above the main diagonal to be 'transposed' and put underneath the main diagonal. Maybe I wasn't as clear as I hoped. Let me restate the issue. Currently I'm doing this in 2 stages, basically generating a matrix of refs, then copying the upper half into the lower half. The problem is that I want to do this in 1 function, but the code that I posted earlier can't do this, because the map basically has to refer to the matrix that it's trying to build up. I tried doing it like this: (apply vector (map (fn [i] (apply vector (map (fn [j] (cond (= i j) nil (< i j) (ref somevalue) (> i j) (nth (nth matrix j) i))) n))) n)) But as you'd expect all values under the main diagonal get set to nil, because those 2 nth's are referring to positions in the matrix that hasn't been set yet. So currently I got it working by basically repeating the above code. It's ugly and inefficient, and I'm wondering whether it can be done more efficiently. As for performance, I don't actually intend do do any matrix operations on it, just lookups. - Tiemo. -- 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
Clojure development environments
At present the biggest problem Clojure has, is the lack of an easily accessible development environment. If the language is a masterpiece but has no complete, integrated and convenient development environment to offer it his like having a new Porsche but no keys to open the doors. This is what is missing to give the language more momentum and popularity. It does not have to be as complete and comfortable as Allegro from Franz (Common Lisp) or Lispworks from the start. If you think of IDLE for Python for example, it comes with the distribution and works out of the box. This is easy access! So far I have tested: Emacs / clojure-mode VimClojure Textmate / Clojure bundle Eclipse / counterclockwise Netbeans / Enclojure Waterfront One thing up front - please don't get me wrong, I'm not bashing on these tools, they provide value for the expert! (But unfortunately not for the beginner.) Emacs / clojure-mode: You need to install git to pull down the latest sources! You need Clojure and Clojure-contrib (usually you cannot dowload contrib but have to build it) You need to have ant / maven to build contrib You need to download Emacs You need to download clojure-mode You need to modify .el startup files for Emacs and then - how do I get to the REPL? how does this all work? Is there any doc or help? - no Sorry but Emacs is unfamiliar to regular developers VimClojure: similar to clojure-mode setup ... separate downloads, builds, configs ... and then it does not work out of the box or you need to read forums for hours to assemble you base knowledge on how things work Textmate / Clojure bundle: The Clojure bundle requires Ruby. Nothing against Ruby, but I have to install another entire language just to give me some limited IDE features. At least Textmate is a very convenient Editor for non-geeks Eclipse / counterclockwise You need to download and install this giant block of "can do everything" infrastructure - Eclipse You need to install the plugin that is good an evolving but still limited If you consider the disk- and memory-space- / feature-ratio ... Netbeans / Enclojure worked relatively well so far ... needs time to grow further Waterfront I like the idea very much lightweight Clojure specific (in contrast to Eclipse, Netbeans, Idea) configurable in Clojure! unfortunately it keeps crashing If a more evolved / robust waterfront would be a part of the contrib, it would be a big step towards approachability -- 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: simple journal-based persistenсe for Clojure
On Thu, Dec 3, 2009 at 6:31 PM, Sergey Didenko wrote: > Well, I'm not fluent with git yet. I'll create the github project, that can > not be hard. > > In comparison with Prevayler, the persister does not block the reads, > because it relies on Clojure STM. However it blocks the writes as > Prevayler, because currently there is no way to reliably get/ generate a > transaction id without locking. > What about thread-local allocation blocks of IDs? This reduces the locking to when one of those blocks is exhausted. -- 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: Generalizing -> & ->>
On Thu, Dec 3, 2009 at 10:41 AM, Stephen C. Gilardi wrote: > > On Dec 3, 2009, at 10:31 AM, Roman Roelofsen wrote: > > Are there any plans to add -$> to core or contrib? > > The rules on contrib are that the work must be original to the author. Even > with Andrew's disclaimer that it be considered public domain, he would still > need a contributor agreement in place to get this incorporated into contrib. > Why? (Having to use paper mail is especially a high hurdle for what is otherwise a purely online activity.) -- 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: Getting Started in Mac OS X Snow Leopard
use the u.s. keyboard map. #/£ is the only difference [i've yet discovered] Lauri Pesonen wrote: > 2009/12/2 Matthew Williams: >> Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I >> was able to get up and running extremely quickly with Technomancy's >> swank-clojure install. > > This is very much off-topic, but... > > How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK > keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a > mode where option-3 is interpreted as '#' rather than a meta-3 which > takes care of my problem, but I haven't figured out how to do the same > thing in the Cocoa build. > > So at the moment I'm using Aquamacs because of this, but I'd really > like to use the Cocoa build, because it's "plain old emacs" without > all the customisations that Aquamacs has. > > Oh, and another nice Aquamacs feature that I haven't found on the > Cocoa build is fullscreen editing (shift-cmd-enter). > -- 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: Getting Started in Mac OS X Snow Leopard
2009/12/2 Matthew Williams : > Using the Cocoa build of Emacs 23 (http://www.emacsformacosx.com) I > was able to get up and running extremely quickly with Technomancy's > swank-clojure install. This is very much off-topic, but... How do you type ''#' in the Cocoa build of Emacs 23 (I'm on a UK keyboard and in OS X apps I type option-3 to get'#')? Aquamacs has a mode where option-3 is interpreted as '#' rather than a meta-3 which takes care of my problem, but I haven't figured out how to do the same thing in the Cocoa build. So at the moment I'm using Aquamacs because of this, but I'd really like to use the Cocoa build, because it's "plain old emacs" without all the customisations that Aquamacs has. Oh, and another nice Aquamacs feature that I haven't found on the Cocoa build is fullscreen editing (shift-cmd-enter). -- ! Lauri -- 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