Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-21 Thread Stefan Kamphausen
On Saturday, March 22, 2014 12:41:55 AM UTC+1, Andy Fingerhut wrote: > > That is odd. This is a shot in the dark, and probably unhelpful because I > do not know a good way to verify whether my guess is true, but perhaps the > seqFrom method went from being small enough to be inlined by your JI

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-22 Thread Stefan Kamphausen
Hi, On Saturday, March 22, 2014 3:52:00 AM UTC+1, Alex Miller wrote: > > That's pretty weird. > > that's pretty true. > 1.6.0-RC2 is out now - I would really appreciate it if you could give it a > shot. > Sure. Tried with Oracle JDK 7 and 8, each run two times and took the average. Each

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Stefan Kamphausen
On Sunday, March 23, 2014 6:02:26 PM UTC+1, Alex Miller wrote: > > Stefan, how do these numbers compare to RC1? Is RC2 better than RC1? > If my tests can be trusted, there is an improvement between RC1 and RC2, but it is still worse than 1.5.1. *Version* *Java Version* *User time(s)* *Sys t

Re: Clojure 1.6.0-RC1 - LAST CHANCE, PLEASE TEST

2014-03-23 Thread Stefan Kamphausen
Hi, Additionally differences in -XX:+PrintCompilation ouput might be > interesting. > > first, I tested with -XX:+PrintInlining and there actually is a difference for seqFrom: in 1.5.1 there are more occurrences of this function in the output (see data at the end of this post). Since the fun

Re: [ANN] Clojure 1.6.0-RC4 is now available

2014-03-24 Thread Stefan Kamphausen
RC4 works well for me. Thanks for all the effort you put into this. stefan -- 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 patie

Re: Books for learning Clojure

2014-04-23 Thread Stefan Kamphausen
Would German be an option for you? Just curious stefan -- 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

Re: PersistentVector & PersistentHashMap - internal implementation

2014-06-03 Thread Stefan Kamphausen
Hi, On Tuesday, June 3, 2014 4:02:45 PM UTC+2, sorin cristea wrote: > > Hi all, > >I don't know if this question was already asked by someone here but can > you tell me(explain) or guide me to a properly documentation about how is > internal implemented PersistenVector and PersistentHashMap

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Stefan Kamphausen
Hi, FWIW... On Wednesday, June 18, 2014 5:06:09 AM UTC+2, Sean Corfield wrote: > > "works for me"... > Does *not* work for me. I see the same error inside and outside of projects: $ java -version java version "1.7.0_11" Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM)

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-18 Thread Stefan Kamphausen
Oh, great, yes, that helped. Unexpected. Thanks, stefan On Wednesday, June 18, 2014 11:09:52 AM UTC+2, Ambrose Bonnaire-Sergeant wrote: > > Rather upgrading *from* 0.1.2 fixes. > > Thanks, > Ambrose > > > On Wed, Jun 18, 2014 at 5:08 PM, Ambrose Bonnaire-Sergeant < > abonnair...@gmail.com > wr

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-19 Thread Stefan Kamphausen
Hi, On Wednesday, June 18, 2014 6:13:02 PM UTC+2, Sean Corfield wrote: > > I am using Eastwood 0.1.2 without problems with Leiningen 2.4.2 but > perhaps Stefan and others are seeing conflicts because of other stuff in > ~/.lein/profiles.clj with Eastwood? > > That file is rather small on my mach

Re: Leiningen 2.4.2 upgrade causing problems

2014-06-19 Thread Stefan Kamphausen
Hi Andy, On Thursday, June 19, 2014 3:39:41 PM UTC+2, Andy Fingerhut wrote: > > Stefan, with the ~/.lein/profiles.clj you pasted: > > {:user {:plugins [[jonase/eastwood "0.1.4"] > [cider/cider-nrepl "0.7.0-SNAPSHOT"]] }} > > I do not see the problem. If I change "0.1.4" to "0.1

Re: doseq vs dorun

2013-10-17 Thread Stefan Kamphausen
Hi, What is the idiomatic way of parallelizing a computation on a lazy seq? > > > keep in mind, that pmap lazily processes the seq with a moving window the size of which depends on the available cores on your machine. If the processing of one element takes a long time, the parallel work will wa

Re: doseq vs dorun

2013-10-18 Thread Stefan Kamphausen
Hi, On Friday, October 18, 2013 12:12:31 AM UTC+2, Brian Craft wrote: > > I briefly tried working with the reducers library, which generally made > things 2-3 times slower, presumably because I'm using it incorrectly. I > would really like to see more reducers examples, e.g. for this case: > re

Re: Step by step debugging

2013-11-08 Thread Stefan Kamphausen
On Thursday, November 7, 2013 6:32:29 PM UTC+1, Lee wrote: > > > In Common Lisp when you hit an error you're thrown into a break loop REPL > in which you can view locals, move up and down the stack, and do lots of > other fancier things (re-binding things, restarting...) that are probably > us

Re: StackOverflowError

2013-11-08 Thread Stefan Kamphausen
On Friday, November 8, 2013 11:11:14 AM UTC+1, ru wrote: > > Hi Jim, > > I forget to say that call to count have been done in not a bare repl, but > inside a quite complex program after it did a lot of work on a quite big > data. But, after long and profound analysis of source code I did not fo

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-20 Thread Stefan Kamphausen
Hi, you would only want to use Refs when you need to update at least two of them with transaction semantics. When you need to read only one of them, you can just deref them any time you want, if you need a consistent snapshot of two refs, you need to read them inside a transaction, i.e. insi

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Stefan Kamphausen
Hi, I may be missing something here, since this thread leaves me a bit confused. 1. Why are you using a Ref for the bank in the first place? It is a single identity and thus should be an atom, because you do not need to coordinate changes of at least two identities. If I am not mistaken, the

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-22 Thread Stefan Kamphausen
On Friday, November 22, 2013 12:29:25 AM UTC+1, Jim foo.bar wrote: > > apart from the generate-keys fn which is intentionally simplistic and > predictable so I can test somehow, I will admit that these are very good > points indeed. > How about (defn get-key-generator [] (let [i (atom 0)

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-21 Thread Stefan Kamphausen
Hi, On Thursday, November 21, 2013 11:58:31 AM UTC+1, Jim foo.bar wrote: > > [...] 1. [...] Since there is a single > identity, perhaps STM is an overkill... > If I read your example correctly, it is not a typical use-case for STM. > > 2. can you ellaborate why you think this is debatable?

Re: preferred way to dereference a ref: outside or inside dosync?

2013-11-23 Thread Stefan Kamphausen
On Saturday, November 23, 2013 3:17:07 PM UTC+1, Justin Smith wrote: > > Of course in a real app the key should be serialized to a persistent, > consistent, and shared data store. > > Which of course depends on the app in question. The code above was taken from a 'real app', if 'an app that is

Spit seems to use incorrect line terminator on Windoze

2013-11-24 Thread Stefan Kamphausen
I agree with Alex. I would not want any magic to happen to my string. Best, Stefan -- -- 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 - plea

Re: println / for unexpected behaviour

2013-11-25 Thread Stefan Kamphausen
Hi Edward, you are being hit by laziness here. Clojure's 'for' is not like the 'for' you may know from other programming languages. It is made for list comprehensions, that is it is building new list-y things. It does not do this instantly, the items may be realized only when the caller ask

Best Practice For Logging vs. Functional (and Elegant)

2013-11-26 Thread Stefan Kamphausen
Hi, logging is a side-effect and I try to keep it out of the functional parts of my code. But even for the parts where I want to introduce logging I find that it renders code less readable. As an example, say you've got an 'if-let' somewhere (if-let [a (do-something-non-trivial-with-some-lo

Re: [ANN] Optimus - a Ring middleware for frontend performance optimization.

2013-11-26 Thread Stefan Kamphausen
Hi, I'd be very interested in learning, how Twixt[1] compares to Optimus and the other solutions cited. [1] https://github.com/AvisoNovate/twixt/ Regards, stefan -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send emai

Re: Best Practice For Logging vs. Functional (and Elegant)

2013-11-26 Thread Stefan Kamphausen
On Tuesday, November 26, 2013 8:56:11 PM UTC+1, Gary Verhaegen wrote: > > I haven't had time to really investigate it, but I was planning to delve > into dire for exactly that problem. > > https://github.com/MichaelDrogalis/dire > > That looks interesting. Thanks for pointing out. Best, stefan

Re: [ANN] Optimus - a Ring middleware for frontend performance optimization.

2013-11-27 Thread Stefan Kamphausen
On Wednesday, November 27, 2013 11:11:27 AM UTC+1, Magnar Sveen wrote: > > I think it would be best if the author chimed in, > me too > but it looks like there has been done some good work on optimizing the > development workflow when you're working with languages that need to be > transpil

Re: contains? and transient set

2013-12-04 Thread Stefan Kamphausen
It looks like you're onto something here get works with transient maps: (get (transient {:a 1 :b 2}) :a) ;=> 1 and with transient vectors, too: (get (transient [1 2 3]) 0) ;=> 1 but not with transient sets: (get (transient #{1 2 3}) 2) ;=> nil And using contains? in a reduce with a transient

Inconsistent Ref Values

2014-01-02 Thread Stefan Kamphausen
Hi, I've probably been staring at this for too long to see, what I am doing wrong. I have a Ref which contains a vector similar to the following (def data [{:a {:b 1 :c 0}} {:a {:d 1 :g 0}} {:a {:e 1 :h 0}} {:a {:f 1 :i 0}}]) There is a second ref, which is similar but without the :

Re: Inconsistent Ref Values

2014-01-02 Thread Stefan Kamphausen
OK, got it. The get-in is stupid and is always returning 0. Please excuse the noise stefan -- -- 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 moderat

How to indent clojure code in Emacs

2014-01-03 Thread Stefan Kamphausen
Hi, FWIW, I prefer M-C-q with the cursor on the opening paren of a form. Cheers, Stefan -- -- 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 moderate

Re: Managing role-based permissions in Ring apps

2014-01-12 Thread Stefan Kamphausen
On Monday, January 13, 2014 3:53:43 AM UTC+1, Sam Ritchie wrote: > > cemerick's Friend library is the way to do this: > > https://github.com/cemerick/friend > > I'm writing up a post on how to combine Friend with Liberator, for easy > ACL management for RESTful APIs. Take a look and let us know

Re: Managing role-based permissions in Ring apps

2014-01-18 Thread Stefan Kamphausen
On Friday, January 17, 2014 8:29:21 PM UTC+1, Sam Ritchie wrote: > > Okay, here's my post: > http://sritchie.github.io/2014/01/17/api-authentication-with-liberator-and-friend/ > Gee, that's way more complicated than I expected. Thanks for sharing anyway! stefan -- -- You received this me

Re: side-effect only function with map-like syntax (again)

2014-01-28 Thread Stefan Kamphausen
Does wrapping your map expression in a dorun do what you want? Stefan -- -- 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

Re: Clojure - Python Style suggestion

2013-02-05 Thread Stefan Kamphausen
> > A simple workaround I've considered, but haven't gotten around to doing > anything about in e.g. Emacs, is to simply tone down the parens visually in > the editor. Hierarchy of color, size, contrast, etc. matters a lot in > perception, and by making the parens slightly less obvious visual

Create map from vector of keywords and other items

2013-02-20 Thread Stefan Kamphausen
Hi, given a vector of the form [:key1 1 2 3 :key2 4 :key3 5 6 7] I wand to create a map collecting the items behind each keyword as a vector like this: {:key1 [1 2 3] :key2 [4] :key3 [5 6 7]} I have already written two functions which achieve this, but neither of them "feels good"

Re: Create map from vector of keywords and other items

2013-02-21 Thread Stefan Kamphausen
Thank you all for your valuable input. I'll look into these soon. take-nthis definitely a function to keep in mind. Stefan -- -- 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

Re: Raw strings

2013-03-18 Thread Stefan Kamphausen
Hi, On Monday, March 18, 2013 12:50:13 PM UTC+1, Marko Topolnik wrote: > > Dynamic regex building is a standard technique. Unfortunately, once you > leave the regex literal world, you are back to escaping everything. this works pretty well, at least better than I expected, e.g.: user=> (def r

Re: Raw strings

2013-03-18 Thread Stefan Kamphausen
On Monday, March 18, 2013 12:25:07 PM UTC+1, Maik Schünemann wrote: > > http://dev.clojure.org/display/design/Alternate+string+quote+syntaxes > > It would have been nice to still have #" available for this and #// for regexes. That's probably my Perl heritage leaking through, though :) -- --

Re: Beginners question - emacs & compiling tests

2013-03-20 Thread Stefan Kamphausen
If you have a valid ns-form and still encounter that error, it may help to compile the file once using C-c C-k. I still need to do that (sometimes?) when I open a file in Emacs although I'd thought, that the complete project should have been loaded at REPL start. After that compilation of singl

Re: Beginners question - emacs & compiling tests

2013-03-20 Thread Stefan Kamphausen
Hi, On Wednesday, March 20, 2013 9:44:19 AM UTC+1, Marko Topolnik wrote: > > This problem was cross-posted over here from > StackOverflow, > > where it has already been marked as solved. oh, sorry, didn't kn

Re: Beginners question - emacs & compiling tests

2013-03-20 Thread Stefan Kamphausen
On Wednesday, March 20, 2013 10:44:15 AM UTC+1, Marko Topolnik wrote: > > > Because you usually don't want to wait the eternity it takes to compile > and load absolutely everything. Even loading just the main namespace can be > painfully slow, even if your project is just a few lines, due to th

Re: Clojure/West 2013 videos?

2013-04-02 Thread Stefan Kamphausen
It may well be that I'll never get to the US in my whole life, who knows. Nevertheless, I get to watch fine recordings from interesting talks developed and given by people way smarter than me. And I get those for free. What an opportunity.. Patience is something I'm trying to teach my kids

Re: Customize clojure-mode (emacs) question

2013-04-24 Thread Stefan Kamphausen
Take a look at the bottom of jason.clj: https://github.com/clojure/data.json/blob/master/src/main/clojure/clojure/data/json.clj -- -- 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 th

Re: Question about code style

2013-04-25 Thread Stefan Kamphausen
You might want to consider adding it to https://github.com/bbatsov/clojure-style-guide :-) -- -- 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 modera

Exception when using an error-handler for an agent

2010-06-11 Thread Stefan Kamphausen
Hi, I am trying to understand the new 1.2 error handling of agents. For this I created a minimal example which shows a strange behavior, at least for my understanding (def ag (agent 1)) (defn handler-fn [a e] (println "state of agent:" @a) (println "error:" e)) (defn raise-except-action [s

Re: Exception when using an error-handler for an agent

2010-06-11 Thread Stefan Kamphausen
Hi, On Jun 11, 1:38 pm, Meikel Brandmeyer wrote: > > ;; Why is raise-except-action called? > > I don't understand what you mean. It is called because you send it as > an action, no? Or did you mean: Why is the handler called, although > the mode is :continue? (However, I'm not familiar with the n

Re: Exception when using an error-handler for an agent

2010-06-11 Thread Stefan Kamphausen
Hi Meikel, On Jun 11, 1:46 pm, Meikel Brandmeyer wrote: > Hi, > > On Jun 11, 1:41 pm, Stefan Kamphausen wrote: > > > sorry, the comments at the end of my post were not supposed to show > > up.  The problem is, that the action is called with just one argument. > &g

Re: basic help with netbeans/enclojure installation

2010-06-16 Thread Stefan Kamphausen
Hi, On Jun 17, 12:29 am, Lee Spector wrote: > - Go to the 'Avalilable Plugins' tab and select the "Enclojure Clojure Plugin > and click Install > > When I do it fails with the following messages: > > - > Some plugins require plugin Common Scripting Language API (new) to be > installed. I h

Re: cond formatting

2010-06-22 Thread Stefan Kamphausen
Hi, On 22 Jun., 22:27, cageface wrote: > Picky syntax question: >[...] I don't consider this picky. Many of Clojures differences to older lisps are well-grounded. To me the removal of extra parens in cond is not. During my time with Clojure I experienced this as a little nuisance. Little bec

Re: Enhanced primitive support - redux

2010-06-26 Thread Stefan Kamphausen
Hi, On 25 Jun., 21:04, Rich Hickey wrote: > equiv, the revenge of num [...] > Feedback welcome, sorry, no feedback, but one question which is rather important to me: will this make it into Clojure 1.2? Kind regards, Stefan -- You received this message because you are subscribed to the Google

Re: Clojure 1.2 Beta 1

2010-07-16 Thread Stefan Kamphausen
Hi, I think I found a minor problem. It appears with the error handling of agents and actually is just a minor glitch in the output. Consider the following session, copied from a terminal: shell> java -cp clojure.jar clojure.main Clojure 1.2.0-beta1 user=> (def agt1 (agent "One")) #'user/agt1 u

Re: Clojure 1.2 Beta 1

2010-07-16 Thread Stefan Kamphausen
Hi Stu, On 16 Jul., 19:54, Stuart Halloway wrote: > Hi Stefan, > > The behavior you are seeing is not a problem, and understanding why may be > helpful to using agents correctly. > > The thread that sends to an agent has no guarantee that it will (or will not) > see the result of its action a t

Re: Clojure 1.2 Beta 1

2010-07-16 Thread Stefan Kamphausen
Hi, FWIW... I've delayed this work for ages, but now that 1.2 is just around the corner I have no reason to wait any longer. So I went through all [1] examples from our forthcoming book [2] and tested them with the current beta. The result of this is encouraging: everything works fine. Until n

Re: ANN: Emacs auto-complete plugin for slime users

2010-08-17 Thread Stefan Kamphausen
Hi, just yesterday I took a first look at auto-complete together with your slime auto completion sources. I'm encountering some Exceptions, though, If I'm in a .clj-buffer and start typing (clojure. and then wait for the auto completion to popup I see a list of possible completions like, e.g

Re: Clojure 1.2 Release

2010-08-19 Thread Stefan Kamphausen
Hi, On 19 Aug., 17:25, Rich Hickey wrote: > I'm pleased to announce today the release of Clojure 1.2. this is a great achievement. Congratulations to all involved and thank you! For us it the release is just on time. We will finish our book / tomorrow/ and I had been hoping for weeks now, tha

Re: Making Clojure really work with Google App Engine

2010-09-20 Thread Stefan Kamphausen
Hi, just a few days ago I started considering GAE for a (pet-)project. Being able to develop in Clojure on GAE seems like a valuable goal to me. For example, take a look at http://the-deadline.appspot.com which was written that way. So it might be a good idea to avoid creating threads automatica

[ANN] German Clojure Book Available

2010-09-24 Thread Stefan Kamphausen
Fellow Clojurians, the book that was announced in march[1] is now available. As far as I know it is the first German book on Clojure. If you're interested, take a look at: http://www.clojure-buch.de We, the authors, are particularly happy that for every book sold 0.50EUR will be used to support

Re: German Clojure Book Available

2010-09-25 Thread Stefan Kamphausen
On Sep 24, 10:33 am, Thomas Wagner wrote: > I've just ordered my copy. :-) Hope, you'll like it. Best regards, Stefan -- 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 f

Gosling on Clojure

2010-09-29 Thread Stefan Kamphausen
Hi, anybody seen this already? http://www.basementcoders.com/transcripts/James_Gosling_Transcript.html (Transcript from http://basementcoders.com/?p=721) When being asked about other languages he says: "Clojure. Clojure's got a lot of coolness about it but it's not for everyone." Kind regards,

Re: A newbie's summary - what worked, what didn't

2011-03-28 Thread Stefan Kamphausen
Hi, please let me humbly add my 2ct to this discussion... If you want to learn something new, you'll just have to jump through some hoops. As soon as you do a little more than the basics you'll have to learn the specific way to do it. Somewhere in this thread it says, that in some language yo

Aw: Re: Emacs 23 issues.

2011-04-23 Thread Stefan Kamphausen
Hi, the problem is, that Clojure does not accept the symbol name "%cursor-marker%" while common lisp does. The autodoc feature of slime uses that symbol to tell the backend where the cursor was when the user asked for completion or documentation. There was a long discussion on the SLIME maili

Aw: Ok, so code is data...

2011-05-10 Thread Stefan Kamphausen
Hi, from what you write I get the feeling, that you may be doing things in a too complicated manner. Maybe I am wrong. In any case, although it may not be Clojure but Common Lisp, you might want to take a look at the HTML generation in Peter Seibels excellent Practical Common Lisp: See chapte

Re: interest in STM, where can I start to get knowing well about it?

2011-05-18 Thread Stefan Kamphausen
Hi, I don't think, there is any way around reading LockingTransaction.java in the source-code of Clojure. But it's just around 500 LoC, so it's not too bad. Regards, Stefan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: Why should I use emacs instead of netbeans?

2011-06-18 Thread Stefan Kamphausen
Hi, these modern IDEs really do a tremendous job at organizing projects and providing additional information at programming time. It's just, their text-editor components suck. If you are a Java developer, it's probably better to stay away from Emacs. Should you ever get used to it, you're doo

Re: Why should I use emacs instead of netbeans?

2011-06-20 Thread Stefan Kamphausen
Hi, On Monday, June 20, 2011 5:47:58 PM UTC+2, Gregg Reynolds wrote: > > On Sun, Jun 19, 2011 at 8:57 AM, James Keats wrote: > > Minor correction: if you get used to Emacs, you'll never want to use > anything else. that's precisely what I meant. IIRC I am using Emacs since 1995/96 or som

Re: struct sharing same key?

2011-06-28 Thread Stefan Kamphausen
Hi, maybe Ken's solution needs some clarification 1. Use a map, not a struct. defstruct is kinda deprecated. 2. Use a keyword (preceded by a colon) to code the nationality. A keyword is created only once and won't consume any more memory if you use it repeatedly. I'm not sure whether you wan

Re: Russ olsen's Clojure Book

2011-06-30 Thread Stefan Kamphausen
Hi, did you notice that Fogus and Houser do talk about Design Patterns at the end of their book? Cheers, Stefan -- 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 m

Re: Please stand firm against Steve Yegge's "yes language" push

2011-07-02 Thread Stefan Kamphausen
FWIW, I've been enjoying the Yegge posts for years. I definitely like his kind of humor and there are posts which made me laughing til the tears were running (*Settling the OS X focus-follows-mouse* debate comes to mind). Some posts deliver some insight, which at times may be well hidden. H

Re: Please stand firm against Steve Yegge's "yes language" push

2011-07-02 Thread Stefan Kamphausen
James, On Saturday, July 2, 2011 9:59:12 PM UTC+2, James Keats wrote: > > > > On Jul 2, 6:41 pm, Stefan Kamphausen wrote: > I would draw a thick line between the community's response to someone > who'd ask an utterly dumb question - I don't me specifically,

Re: Multiple slime instances in Emacs

2011-07-08 Thread Stefan Kamphausen
Hi, I don't know of any way to have different SLIMEs in one Emacs. In the past I used to call Emacs with different init-files for that, but it's not nice. However, given the differences between Clojure and CL an 'official' fork of SLIME ('JIME', 'SLJME'? ;-) for Clojure might be the way to go.

Re: Clojure Books

2011-07-23 Thread Stefan Kamphausen
Is this post only asking for English books? cheers, stefan -- 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 fir

Re: ClojureScript mailing list?

2011-07-28 Thread Stefan Kamphausen
dec I'd like to follow all that in one place and it's not that much, yet. Maybe that will change with time. When the subject lines don't tell which dialect is meant, it may be time to create a dedicated list. But even then, some questions will clearly regard both dialects. Regards, Stefan

Re: better community docs: getting started

2011-07-28 Thread Stefan Kamphausen
Hi, may I humbly suggest to come up with the most common user stories and put links to pages for those users right after the introductory paragraph. The typical scenarios will probably combine a few things, e.g. setting up maven and CCW. Further down the page the links to the detailed topics

Re: better community docs: getting started

2011-07-29 Thread Stefan Kamphausen
inc IMHO there are three types of people coming to Clojure 1. Java Programmers 2. Old-school lispers 3. all the other, who just want to try (and possibly follow the examples in a tutorial or book) For the first two groups the obstacles and interest can probably be sorted out and t

Re: Libraries and build management hell

2011-07-29 Thread Stefan Kamphausen
Hi, On Thursday, July 28, 2011 11:23:58 PM UTC+2, Michal B wrote: > > Why does it have to be so complicated to use libraries? > because it is a complicated topic. Maybe I can compare it to other ecosystems. * CPAN for Perl is a paradise for functionality. However, trying to use CPAN together

Re: Predicate problem

2011-08-02 Thread Stefan Kamphausen
Hi, can't you just use the set itself as the function determining whether the items contains the ID. The following example uses just a vector of maps for the new-states and thus uses -> instead of .. but it seems to work user=> (def pinned-ids #{200, 210}) #'user/pinned-ids user=> (def new-

Re: What information does (:key x) convey?

2011-08-03 Thread Stefan Kamphausen
inc Functions in Lisps are (usually) verbs, to my eye the colon looks just like 'get', doesn't it? :-) Stefan -- 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 m

Re: better community docs: getting started

2011-08-04 Thread Stefan Kamphausen
Hi Devin, On Thursday, August 4, 2011 5:14:19 AM UTC+2, Devin Walters (devn) wrote: > > > On Jul 29, 2011, at 7:30 PM, Stefan Kamphausen wrote: > > inc > > IMHO there are three types of people coming to Clojure > > >1. Java Programmers >2. Old-school l

Re: Argslist of fn?

2011-08-09 Thread Stefan Kamphausen
Hi, On Tuesday, August 9, 2011 12:09:58 PM UTC+2, Sunil Nandihalli wrote: > > > would associate the source of the function with the function as its meta > data you are defining > actually I really do think that it would be great to have the orignal defn add the source to the metadata. Then on

Re: Bret Victor - Inventing on Principle

2012-02-24 Thread Stefan Kamphausen
Hi, this video showed up on my G+ stream about a week ago and it was /fun/ to watch. I think most of the people around here will be more intrigued by the first half, which has a focus on programming. Side-note: this is one of the (few) video presentations that just can't be translated to text

Re: Slime hack for REPL testing

2012-02-27 Thread Stefan Kamphausen
Hi, On Monday, February 27, 2012 2:52:56 PM UTC+1, Nils Bertschinger wrote: > > Hi everyone, > > just finished a small hack for swank-clojure (see my fork on github: > github.com/bertschi/swank-clojure) > [...] > Now, hit M-x slime-extract-test and this gets transformed into an > expression

Re: Need help to find a bug in a genetic algorithm

2012-03-26 Thread Stefan Kamphausen
Hi, > For my little project I wanted to reprogramm the gentic algorithm from > the book "Clojure" written by Stefan Kamphausen and Tim Oliver Kaiser. quickly glancing at the code, it looks like a valid translation into English. Did you try to tune number-of-domiciles? D

Re: using marginalia for training material

2012-03-27 Thread Stefan Kamphausen
Hi, I did that in my last Clojure talks and I enjoyed it. Usually I create one project (lein new) for each talk and in that I have one namespace, but not the default core.clj that is created by lein. After that I develop the talk (code plus comments) in Emacs (lein swank on the shell, M-x slim

Re: Need help to find a bug in a genetic algorithm

2012-04-03 Thread Stefan Kamphausen
Hi, sorry to be late to the party... Please let me try to answer some of your questions in one post. 1. The main purpose for the code was to show how many threads could work on one shared data-structure and how the introduction of concurrent programming can change the algorithms: in this case

Re: Need help to find a bug in a genetic algorithm

2012-04-08 Thread Stefan Kamphausen
Hi, Am Freitag, 6. April 2012 11:33:25 UTC+2 schrieb Goldritter: > > I am a littlebit puzzeled about the chosen structure. > First we have the functions for the algorithm and the agents which > performs the function. There are the creator agents in the domicilems, > which adds new tested indivi

Re: Boolean

2012-04-08 Thread Stefan Kamphausen
Hi, (= (Boolean. false) false) ;=> true > now, that is really weird. By all means (at least those, I can come up with ;-) it looks like false and (Boolean. false) are the same: user=> (Boolean. false) false user=> (type (Boolean. false)) java.lang.Boolean user=> (type false) java.lang.Boolean

Re: Need help to find a bug in a genetic algorithm

2012-04-11 Thread Stefan Kamphausen
Hi, On Wednesday, April 11, 2012 8:27:26 PM UTC+2, Goldritter wrote: > > > Another thing about the posted code here. > When the alogrithm is stopped, the start-stop-agent became the state > "stopped". Because this agent has not the state "running" anymore, there > is no send for any other agent

Re: Boolean

2012-04-13 Thread Stefan Kamphausen
> Hope I've made my point clear now. > Maybe helping here... To anyone with some understanding of programming and a basic understanding how `if' looks like in lisps the following lines would be at least astonishing user=> (if some-thing "then" "else") "then" user=> (if (= some-thing fals

Re: Boolean

2012-04-13 Thread Stefan Kamphausen
According to e.g. http://nathanmarz.com/blog/fun-with-equality-in-clojure.html it's a speed trade-off. Something one can live with, but a wart nevertheless. Best, Stefan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, sen

Re: [ANN] Eastwood - A Clojure lint tool

2012-04-19 Thread Stefan Kamphausen
inc for the 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 gro

Re: ...regarding Clojure's STM performance and scalability

2012-05-09 Thread Stefan Kamphausen
Hi, if he was talking about the things, Joe Duffy describes on [1], those were way more general purpose. Clojure carefully combines several features, (i.e. immutable data, persistent datastructures, reference types) to allow the current implementation of STM. For example Clojure does not con

Re: defstruct defrecord metadata

2012-05-15 Thread Stefan Kamphausen
Hi, I am not sure whether I fully understand your question. However, when you create a record, a second constructor will be created for you which also expects a meta-data map: user=> (defrecord Foo (bar baz)) user=> (meta (Foo. 2 3 {:foo "meta"} nil)) {:foo "meta"} Hope that helps. Stefan -

Re: Let over Lambda

2012-05-18 Thread Stefan Kamphausen
Hi, it is quite an advanced book, IMHO you should be familiar with macros before readings this. But there is amazing stuff in there. If you are looking for introduction material I suggest reading Peter Seibel's Practical Common Lisp. Peter smoothly introduces macros in one of the first chapt

Re: Map literal with keys generated by function cause "Duplicate key" exception

2012-09-12 Thread Stefan Kamphausen
Hi, On Thursday, September 13, 2012 7:37:09 AM UTC+2, bsmith.occs wrote: > > > Consider a simpler example with a vector, which doesn't produce an > error since it's allowed to have duplicates: > > (def k (atom 0)) > (defn generate-id [] (swap! k inc)) > > Now when the reader reads this: > > [

Find union of nodes with data.zip

2012-11-05 Thread Stefan Kamphausen
Hi, AFAIK the currently supposed way of parsing XML with Clojure is to use a combination of clojure.xml, clojure.zip, data.zip and data.zip.xml. Please correct me if I'm wrong. I am trying to extract the equivalent of a union of nodesets from an XML file (speaking in XPath terms). Example:

Re: Find union of nodes with data.zip

2012-11-05 Thread Stefan Kamphausen
Hi, if I am doing this right, then your supposed approach does not work. From looking at the code of seq-test (to which the alternative form using just a vector in xml-> boils down, too) it seems to be more like a look ahead within the current node. See e.g. the test code at https://github.c

Re: Find union of nodes with data.zip

2012-11-05 Thread Stefan Kamphausen
FWIW I found a solution by mimicking the original tag=: With data.zip as dz and clojure.zip as zip the following predicate can be used inside of xml-> (defn tag-is-one-of [tagnames] (fn [loc] (filter (fn [l] (and (zip/branch? l) (some #(= % (:tag (zip/node l)))

Re: Coding Standard - ns usage

2012-11-08 Thread Stefan Kamphausen
Am Donnerstag, 8. November 2012 19:42:26 UTC+1 schrieb Luc: > > I am pragmatic and quite lazy, I use require with an alias > inc An explicit call to use every now and then on the REPL, but no :use in ns. IMHO use and :use can be removed from the language. -- You received this message because

Re: Clojure 1.5.0 RC 1

2013-01-02 Thread Stefan Kamphausen
Hi, On Saturday, December 22, 2012 5:09:07 PM UTC+1, Stuart Halloway wrote: > > > Please test it. > my current projects work fine with this RC. Some even seem to be a little bit faster, but I didn't profile it thoroughly. Kind regards, Stefan -- You received this message because you are su

Re: emacs - how to wean me off the family of Java IDEs

2013-01-16 Thread Stefan Kamphausen
Just a few things, you might find interesting * anything/helm: http://www.emacswiki.org/Anything * speedbar (used that in my early years; got rid of it eventually) * mtorus: http://www.emacswiki.org/emacs/MTorus (shameless self-plug) * M-. on functions * M-x ffap * iswitchb-buffer (just keep the b

<    1   2   3   >