Re: ClojureScript: how to call a js method when you have the method-string?
It seems you're refering to CLJS-353 - besides supporting a possible Lua backend, it also feels semantically cleaner not to overload array and object access - I'd vote for an additional oget/oset or obj-get/set. Also, the aget and aset interface have this multi-dimensional support thru the signature: ([array i idxs] …), and it's hard to imagine multi-dimensional property access on an object… (btw, unless I'm mistaken, the multi-dimensional array support hasn't been implemented yet for make-array and therefor the aget ([array i idxs] …) implementation doesn't work - can't find a JIRA issue for that) -FrankS. On Oct 16, 2012, at 9:53 PM, David Nolen dnolen.li...@gmail.com wrote: It may be worth considering adding an oget to complement aget as was suggesting during ClojureScript/Lua development. David On Tue, Oct 16, 2012 at 11:30 PM, Evan Mezeske emeze...@gmail.com wrote: Hmm after reading that docstring, /me hopes he didn't just recommend something for its not-intended purpose :) On Tuesday, October 16, 2012 8:29:47 PM UTC-7, FrankS wrote: Thanks - that works - that was too easy ;-) I looked at the docstring before of aget because I remembered vaguely that that was how it used to work before .- : cljs.core/aget - Function ([array i] [array i idxs]) Returns the value at the index. Dismissed it for object-access after reading that… guess we can improve on the clarity of the docstring a little. -FS. On Oct 16, 2012, at 8:20 PM, Evan Mezeske emez...@gmail.com wrote: I think the easiest solution is to use aget and aset. There may be a better way, but if so I'm not aware of it. http://stackoverflow.com/questions/9861485/clojurescript-interop On Tuesday, October 16, 2012 6:21:45 PM UTC-7, FrankS wrote: I understand that you can call js-methods and get properties thru: (.a-method some-js-object param) and (.-a-prop some-js-object) respectively, but how do you invoke either when you have the method/property as a string? The following doesn't seem to work: (let [m a-method dot-m (symbol (str . m)] (dot-m some-js-object)) or (let [m a-prop dot--m (symbol (str .- m)] (dot--m some-js-object)) And I cannot find any simple function interface for this. I must be overlooking something - please… Thanks, FrankS. -- 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 -- 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: A/B testing in Clojure?
I was thinking of something along the lines of django-lean ( https://bitbucket.org/akoha/django-lean/wiki/Home) - clean perhaps :) I haven't implemented any A/B testing yet so I just wanted to get a feel for what other people are doing. The silence seems to indicate that people aren't! Having seen recent discussions about Rails, I can see that that the framework approach is not popular in the community so a library seems to be the way to go. I'd definitely be interested in putting something together. Time is a bit tight over the next month but I can do some then things free up. Have you any experience in implementing A/B testing? I've been doing some reading and can pass on some pointers to resources if that would be helpful. Simon On Tuesday, 16 October 2012 23:31:01 UTC+2, millettjon wrote: I haven't but will be needing to do so in the next month or two. I'd be interested to hear if you made any progress and possibly in collaborating. Jon On Monday, October 8, 2012 11:04:10 AM UTC-3, Simon Holgate wrote: Hi, Is anyone doing split (A/B) testing in Clojure? What are you using? Any pointers on things to consider if I'm implementing it myself? Thanks, Simon -- 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: Hiccup - HTML - PNG
Hi Nick, I used Flying Saucer to convert XHTML to PDF and was very happy with it. It can apparently render to PNG as well: http://flyingsaucerproject.github.com/flyingsaucer/r8/guide/users-guide-R8.html#xil_29 Cheers, Pablo On Wednesday, October 17, 2012 1:29:57 AM UTC+2, nchurch wrote: Has anyone generated PNGs (or any image) from Hiccup in Clojure? I see an older Java library for this: http://code.google.com/p/java-html2image/ Curious to hear about any experience with this library, or if there is a better solution out there. Thanks, Nick. -- 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 turns 5
Thanks Rich for having bring such a great gift to us. 在 2012年10月17日星期三,Rich Hickey 写道: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:; 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 javascript:; 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 turns 5
Thanks Rich and Happy Birthday Clojure! cheers, Bruce On Wed, Oct 17, 2012 at 2:54 AM, Rich Hickey richhic...@gmail.com wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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 -- @otfrom | CTO co-founder @MastodonC | mastodonc.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure turns 5
Thanks Rich, the community too! Happy birthday Clojure May the repl be with you :D Antoine 2012/10/17 Bruce Durling b...@otfrom.com Thanks Rich and Happy Birthday Clojure! cheers, Bruce On Wed, Oct 17, 2012 at 2:54 AM, Rich Hickey richhic...@gmail.com wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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 -- @otfrom | CTO co-founder @MastodonC | mastodonc.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- 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: Correct usage of data-readers
when I wrote a tag out, I did the same as Justin in his ordered lib, (defmethod print-method OrderedSet [o ^java.io.Writer w] (.write w #ordered/set ) (print-method (seq o) w)) so the tag is defined by this library and has specific meaning in the data written by this lib. A matched reader is a probably a good idea. This definition of print-method already causes possible conflict or loss of information it another lib uses the same tag. Library writers need to be aware of this and namespace appropriately. Alternatively, library writers must not implement print methods or must implement them in a way that can use an end-application developer defined tag. I suppose that there is no reason why you could not read the tag above into a different type or implementation as long as you understood and honoured the semantics intended. In this sense, the tag is not dissimilar to a named contract (or interface). The more common case would probably be to re-read what had been written. Perhaps this should be the default. With an option to change if you really wanted to. I wasn't aware of the namespace possibility so the idea of library tags does not seem unreasonable. Dave -- 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: Correct usage of data-readers
I had assumed that including data-readers.clj in a library was ok... I hadn't considered the issue of clashes with an application. Maybe some tags are intended to be concrete, and some abstractions. If you are defining a concrete tag, then including data-readers is ok, and clients just have to get used to only being able to redef them at runtime. If your tag is designed for read-time redefinition in an application, then perhaps you shouldn't include data-readers? I agree that some guidance would be welcome. -- Dave -- 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: ClojureScript: how to call a js method when you have the method-string?
Correct me if I am wrong but, string lookup will cause problems with advanced compilation - if you are not also setting the property or method by string name. On Wednesday, 17 October 2012 18:01:56 UTC+11, FrankS wrote: It seems you're refering to CLJS-353 - besides supporting a possible Lua backend, it also feels semantically cleaner not to overload array and object access - I'd vote for an additional oget/oset or obj-get/set. Also, the aget and aset interface have this multi-dimensional support thru the signature: ([array i idxs] …), and it's hard to imagine multi-dimensional property access on an object… (btw, unless I'm mistaken, the multi-dimensional array support hasn't been implemented yet for make-array and therefor the aget ([array i idxs] …) implementation doesn't work - can't find a JIRA issue for that) -FrankS. On Oct 16, 2012, at 9:53 PM, David Nolen dnolen...@gmail.comjavascript: wrote: It may be worth considering adding an oget to complement aget as was suggesting during ClojureScript/Lua development. David On Tue, Oct 16, 2012 at 11:30 PM, Evan Mezeske emez...@gmail.comjavascript: wrote: Hmm after reading that docstring, /me hopes he didn't just recommend something for its not-intended purpose :) On Tuesday, October 16, 2012 8:29:47 PM UTC-7, FrankS wrote: Thanks - that works - that was too easy ;-) I looked at the docstring before of aget because I remembered vaguely that that was how it used to work before .- : cljs.core/aget - Function ([array i] [array i idxs]) Returns the value at the index. Dismissed it for object-access after reading that… guess we can improve on the clarity of the docstring a little. -FS. On Oct 16, 2012, at 8:20 PM, Evan Mezeske emez...@gmail.com wrote: I think the easiest solution is to use aget and aset. There may be a better way, but if so I'm not aware of it. http://stackoverflow.com/questions/9861485/clojurescript-interop On Tuesday, October 16, 2012 6:21:45 PM UTC-7, FrankS wrote: I understand that you can call js-methods and get properties thru: (.a-method some-js-object param) and (.-a-prop some-js-object) respectively, but how do you invoke either when you have the method/property as a string? The following doesn't seem to work: (let [m a-method dot-m (symbol (str . m)] (dot-m some-js-object)) or (let [m a-prop dot--m (symbol (str .- m)] (dot--m some-js-object)) And I cannot find any simple function interface for this. I must be overlooking something - please… Thanks, FrankS. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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 clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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 turns 5
Happy birthday Clojure! Big thanks to Rich and the whole community! -- 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 turns 5
WOW! Has it been 5 years already? Thanks a lot Rich for this beautiful gift to all of us...You rock and Clojure rules!!! Jim On 17/10/12 02:54, Rich Hickey wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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: Hiccup - HTML - PNG
I'm using PhantomJS http://phantomjs.org/ It is a headless WebKit build that can render webpages as png or pdf, amongst other stuff. It isn't a java lib though - it is a command-line executable. Not HTML, but possibly useful, I also use Batik http://xmlgraphics.apache.org/batik/ to render svg generated in clojure to png. -- Dave -- 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 turns 5
I remember having lunch discussing what a great world it would be if we could earn a living coding in a lisp. You not only made that happen but started something that I could never have imagined at the time. Thanks for Clojure and thanks to the incredible community that continues to inspire me every day. Eric On Tuesday, October 16, 2012 9:53:55 PM UTC-4, Rich Hickey wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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 turns 5
(take 5 (range)) Many happy return values, Rich ! On Wednesday, October 17, 2012 3:53:55 AM UTC+2, Rich Hickey wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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
Midje popularity?
Hi. A couple of weeks ago I ported midje-mode over to nrepl. I did a post on the midje-group and made a pullrequest to the Midje-mode maintainer. Since I haven't got any response either on the mailinglist or the pullrequest I will ask here. Does anyone use Midje currently? Is there any other framework is should take a look at? I am thinking about doing more changes to midje-mode, so I would like to know If anyone except me and Chapmanb would use it. nrepl-branch https://github.com/bonega/midje-mode/tree/nrepl -- 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: Midje popularity?
Does anyone use Midje currently? I most definitely do! And thanks for porting midje-mode to nrepl. I've recently been migrating to nrepl and friends and I was missing my midje-mode! U -- 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 turns 5
On Tue, Oct 16, 2012 at 10:02 PM, XPherior madrush...@gmail.com wrote: Thanks to everyone. This community is transforming software engineering in a great way. I was just thinking that the other day. Language of course is a tool that helps us humans communicate with each other, and describe the world around us. The same applies with math or music notation, letting us describe and manipulate logic and sound. In fact, the whole domain of Linguistics got turned on its head with Chomsky in the 50s. With computing, so many people get caught up in the OO vs. Functional vs. Declarative vs. etc. debates. But those are the wrong questions in my opinion. I want to know when I need to express in a general purpose manner vs domain specific vs logic, etc. And that's the fascinating thing. From what I can tell, Rich Hickey has actually advanced the science of information and computing, even beyond a general purpose, functional language. It's really intriguing to watch in real time !! Thanks Rich. And thanks to the wonderful community that's advancing the craft of Computer Science. Tim -- 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: Interest in Scribble for Clojure?
Gary Johnson gwjohnso at uvm.edu writes: I see. After taking a closer look, I can see that you could do LP in Scribble (Yeah, but again -- that's really not its main goal.) as well as also outputting some different kinds of documentation formats, such as Javadocs or standalone documents. The downside I'm seeing is that this all has to be programmed in Scheme Um, it is very intentionally a documentation system that is built on a proper langugae -- like latex and N other such language, only using a general langugae instead of the usual half-baked things... (I know that some people would consider that a disadvantage, and in that case you should definitely go with some non-language tool like markdown, (raw) markup, or some WYSIWYG thing.) and that you may have to do some IMO less than attractive backquoting to get at the underlying LaTeX if you want PDF outputs which use some of the existing LaTeX packages (math libs come to mind). That's almost never needed -- and when it is, it's generally an indication that some rendering feature should be added. At the scribble syntax level, the syntax is very lightweight, so that there's no issues of bad backquoting. I describe all of that in http://barzilay.org/misc/scribble-reader.pdf, and it's applicable to other languages -- not even sexpr-ish ones. My hope is that this can easily provide a proper language syntax for having lots of text. Markdown is another approach, but IME it suffers greatly when you get to unexpected corner cases (eg, non-trivial and non-uniform rules when you want to write some texts), and in other cases it starts simple and end up being horribly complicated (as in wikipedia source files, which started as a simple markdown thing, and now have a ton of conventions as well as a templating systems that require a wikipedia black belt if you get close to it.) I suggested Org-mode on this thread for these reasons: [...] That's all valid -- I'm just pointing out that there is a way to have a real language instead of relying on a generic tool that inevitably gets complicated when people discover that they want more out of it. But of course YMMV -- I'm just trying to convey the huge benefits we got by using such an in-language tool. -- ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay: http://barzilay.org/ Maze is Life! -- 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: LispIndent, jEdit plugin that indents lisp code
Hi, As I were unable to find a way to indent lisp code in jEdit, I decided to write a plugin for this purpose. It's called LispIndent and can be found here: https://github.com/odyssomay/LispIndent Please report if you have any problems! Jonathan -- 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 turns 5
You have made my dissertation not only bearable but an absolute blast, Rich. Thank you for your pioneering spirit, endless calls for incorporating higher principles in programming, and just being that awesome, humble guy with the crazy hair. ~Gary On Tuesday, October 16, 2012 9:53:55 PM UTC-4, Rich Hickey wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- 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 turns 5
The one thing that has excited me the most about Clojure, is how it blends old and new ideas so well. Clojure is a language based ideas originally created in 1958. It runs on a VM created in 1990. It has a concurrency model never seen before, and it's data structures are based on concepts created in 2000. Clojure really is the best of the last 54 years of computing crammed into one language that's so small that a person can read through the entire source code in a few weekends. When I hear the word abstraction I think of Clojure. When I think of simplicity, I think of Clojure. When I think of concurrency, I think of Clojure. So thank you Rich...thank you for ruining all other languages for me. Timothy -- 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: ClojureScript: how to call a js method when you have the method-string?
On Wed, Oct 17, 2012 at 6:14 AM, Dave Sann daves...@gmail.com wrote: Correct me if I am wrong but, string lookup will cause problems with advanced compilation - if you are not also setting the property or method by string name. That is correct. Doing so would only make sense in the context of interop. There are a couple interop-y places in core.cljs - ObjMap is one of them I believe, where we rely on this property of aget. 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 turns 5
On 17/10/12 15:41, Timothy Baldridge wrote: So thank you Rich...thank you for ruining all other languages for me. +1 very well put... Jim -- 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: Midje popularity?
Does anyone use Midje currently? I do; and expect to use more of its features. -- 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: Midje popularity?
On 10/17/12 7:31 AM, Andreas Liljeqvist wrote: Hi. A couple of weeks ago I ported midje-mode over to nrepl. I did a post on the midje-group and made a pullrequest to the Midje-mode maintainer. Since I haven't got any response either on the mailinglist or the pullrequest I will ask here. Does anyone use Midje currently? Is there any other framework is should take a look at? I am thinking about doing more changes to midje-mode, so I would like to know If anyone except me and Chapmanb would use it. nrepl-branch https://github.com/bonega/midje-mode/tree/nrepl I use midje and think it is fantastic. I would say midje has a fair amount of mindshare in the community based the number of dependents (423) listed on clojuresphere: http://www.clojuresphere.com/midje/midje What you are really asking though is how many people are interested in midje AND emacs AND nrepl. :) I use emacs and use midje-mode daily but I have not yet made the jump to nrepl.el. I expect to do so sometime soon and so I am appreciative for the work you are doing on making midje-mode work with nrepl. Thanks, Ben -- 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: Midje popularity?
Are you implying that some people doesn't use Emacs? Heretic! Seems like there are a bunch of people interested. The features I am considering at the moment is: Making check-fact refer to actual linenumbers instead of [no-source]:3 or whatever. Migrating from comments to some other sort of marker.(raise your hand if you have commited test results...) Doing a buffer for check all tests in project and show the result. Probably with rerun when watched files changes. It might end up in a total rewrite. Or me working too much at my daytime job... We will see. Thanks On Wed, Oct 17, 2012 at 5:15 PM, Ben Mabey b...@benmabey.com wrote: On 10/17/12 7:31 AM, Andreas Liljeqvist wrote: Hi. A couple of weeks ago I ported midje-mode over to nrepl. I did a post on the midje-group and made a pullrequest to the Midje-mode maintainer. Since I haven't got any response either on the mailinglist or the pullrequest I will ask here. Does anyone use Midje currently? Is there any other framework is should take a look at? I am thinking about doing more changes to midje-mode, so I would like to know If anyone except me and Chapmanb would use it. nrepl-branch https://github.com/bonega/midje-mode/tree/nrepl I use midje and think it is fantastic. I would say midje has a fair amount of mindshare in the community based the number of dependents (423) listed on clojuresphere: http://www.clojuresphere.com/midje/midje What you are really asking though is how many people are interested in midje AND emacs AND nrepl. :) I use emacs and use midje-mode daily but I have not yet made the jump to nrepl.el. I expect to do so sometime soon and so I am appreciative for the work you are doing on making midje-mode work with nrepl. Thanks, Ben -- 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: Midje popularity?
Andreas, On Wed, Oct 17, 2012 at 4:26 PM, Andreas Liljeqvist bon...@gmail.com wrote: The features I am considering at the moment is: Making check-fact refer to actual linenumbers instead of [no-source]:3 or whatever. Migrating from comments to some other sort of marker.(raise your hand if you have commited test results...) Doing a buffer for check all tests in project and show the result. Probably with rerun when watched files changes. I'd quite like it to work like clojure-test-mode if possible. That would cover most of what you have outlined above. cheers, Bruce -- @otfrom | CTO co-founder @MastodonC | mastodonc.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Correct usage of data-readers
Is #db/id defined in datomic library? -- 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: Midje popularity?
On Oct 17, 2012, at 8:31 AM, Andreas Liljeqvist wrote: Since I haven't got any response either on the mailinglist or the pullrequest I will ask here. I apologize. I've been single-tasking on my book for the past months (monomaniacal about it, to be honest). The good news is that I'm now double-checking the changes for the next release. When that's done (probably tomorrow), I'm setting the book aside until I can reread it with a fresher eye. Then I'll be spending about a quarter of my time on Midje. I'll definitely get to your pull request soon, because I want to start using nrepl myself. Again: sorry. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: Minderbinder v0.2.0
Very nice, thanks. Is the intent for this to eventually be as complete as Frink [1] or are you going to keep its scope to time, length and information? Thanks, Stathis [1] http://futureboy.us/frinkdocs/ On Tuesday, 16 October 2012 16:50:34 UTC+1, Fogus wrote: Minderbinder is a Clojure library for defining unit conversions available at read, compile and run time. More information is available on the [Minderbinder source repo]( https://github.com/fogus/minderbinder). Use Include the following in your [Leiningen]( https://github.com/technomancy/leiningen) project.clj file: [fogus/minderbinder 0.2.0] Or include the following in your pom.xml file in the `dependencies` section: dependency groupIdfogus/groupId artifactIdminderbinder/artifactId version0.2.0/version /dependency Examples Minderbinder includes unit conversions for the following units of measure: * [Time][t]: via `#unit/time`, base is `:milliseconds`, ns is `minderbinder.time` * [Length][l]: via `#unit/length`, base is `:meters`, ns is `minderbinder.length` * [Information][i]: via `#unit/info`, base is `:byte`, ns is `minderbinder.information` [t]: https://github.com/fogus/minderbinder/blob/master/src/minderbinder/time.clj [l]: https://github.com/fogus/minderbinder/blob/master/src/minderbinder/length.clj [i]: https://github.com/fogus/minderbinder/blob/master/src/minderbinder/information.clj Using Minderbinder's unit reader form -- (ns minderbinder.test.core (:require minderbinder.time)) (== #unit/time [1 :second] #unit/time [1000 :ms]) ;;= true (== #unit/time [1 :minute 30 :seconds] #unit/time [90 :seconds]) ;;= true Using Minderbinder's unit parse functions - (ns minderbinder.test.core (:require [minderbinder.length :as mbr])) (mbr/parse-length-unit [1 :km]) ;;= 1000 (mbr/parse-length-unit [1 :ramsden-link]) ;;= 381/1250 Defining custom conversion rules Defining a unit conversion is accomplished via Minderbinder's `defunits-of` macro. The body of the macro expects the following structure: (defunits-of *unit-name* *base-unit-tag* *docstring* *conversion-spec*) The *conversion spec* part of the body currently allows pairs of mappings defined in reletive terms. The pairs always start with a keyword used as the unit tag. However, the right-hand side of the pair can be one of the following: 1. Number - defines the value of the unit relative to the base unit 2. Vector - defines the value of the unit relative to another contained unit 3. Keyword - defines a single alias for a unit 4. Set - defined one or more aliases for a unit A simplified version of Minderbinder's length conversion definition serves as an example: (defunits-of length :meter The meter is the length of the path traveled by light in vacuum during a time interval of 1/299,792,458 of a second. :m :meter ;; an alias for the base unit :km 1000 ;; a larger value relative to the base unit :km #{kilometer kilometers} ;; multiple aliases for a unit :cm 1/100;; a smaller value relative to the base :mm [1/10 :cm]) ;; a value relative to another unit ### Generated vars The `defunits-of` macro will define three things in the namespace where the `defunits-of` macro appears: 1. `parse-XXX-unit` - a function that parses the unit vector according to the conversion spec, returning the total value relative to the base. 2. `unit-of-XXX`- a macro that allows the for `(unit-of-XXX 1 :foo)` that returns the total value relative to the base. 3. `XXX-table` - a map describing the unit conversion rules. Contributions welcomed! -- 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
core.logic : facts and functions with same name
I'd like to be able to define facts and functions in a single relation. For example: (defrel friends x y) (facts friends [['Kaylen 'Holly] ['John 'Jim]]) ;; Here I want to put something that says friends(x,y) == friends(y,x) ;; Or perhaps Jack is everyone's friend ;; How would I do that? -- 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: core.logic : facts and functions with same name
On Wed, Oct 17, 2012 at 12:59 PM, JvJ kfjwhee...@gmail.com wrote: I'd like to be able to define facts and functions in a single relation. For example: (defrel friends x y) (facts friends [['Kaylen 'Holly] ['John 'Jim]]) ;; Here I want to put something that says friends(x,y) == friends(y,x) ;; Or perhaps Jack is everyone's friend ;; How would I do that? Without breaking the interface of defrel something like: (defrel friends x y :facts [['Kaylen 'Holly] ['John 'Jim]]) Could work. Patch welcome. 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: Core.logic performance of looping over a list with tabling
On Mon, Oct 8, 2012 at 10:00 AM, Reinout Stevens reste...@vub.ac.be wrote: Another question: is it possible to manually reset the contents of the tables? Thanks a lot Reinout After some more thinking, I agree that the current behavior is not only counter intuitive, but simply awful :) http://dev.clojure.org/jira/browse/LOGIC-59 I'd like to address this issue before taking 0.8.0 out of beta. 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: ANN: LispIndent, jEdit plugin that indents lisp code
On Wednesday, October 17, 2012 10:26:01 AM UTC-4, Jonathan Fischer Friberg wrote: Hi, As I were unable to find a way to indent lisp code in jEdit, I decided to write a plugin for this purpose. It's called LispIndent and can be found here: https://github.com/odyssomay/LispIndent Please report if you have any problems! Very cool! Thanks, Jonathan. Particularly good install/setup instructions. :) Though I typically use Emacs, this made me go and install the latest jEdit (5.0pre1) to try it out. :) One thing I notice right off the bat though is that it doesn't properly vertically align function args. That is, if I type (foo bar and hit Enter, I expect the next character I type to go right under that b in bar. But LispIndent gives me a 2-space indent instead. Is there a way to configure LispIndent to vertically align args? Thanks, ---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 turns 5
Whoa, five years?! So awesome. Congrats! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: LispIndent, jEdit plugin that indents lisp code
Not currently, no. I'm not really sure how to detect when to use 2 spaces, and when to align arguments. I also feel that no editor really has nailed it, when it comes to deciding that. (it's also personal preference) For example, I personally think that do, - and - should use vertically aligned arguments, but I don't think any editor does this (disclaimer: I have not tried emacs). Maybe I should just make it completely configurable with regexes? Jonathan P.S. I'm really happy that you tried it! :) On Wed, Oct 17, 2012 at 7:33 PM, John Gabriele jmg3...@gmail.com wrote: On Wednesday, October 17, 2012 10:26:01 AM UTC-4, Jonathan Fischer Friberg wrote: Hi, As I were unable to find a way to indent lisp code in jEdit, I decided to write a plugin for this purpose. It's called LispIndent and can be found here: https://github.com/odyssomay/**LispIndenthttps://github.com/odyssomay/LispIndent Please report if you have any problems! Very cool! Thanks, Jonathan. Particularly good install/setup instructions. :) Though I typically use Emacs, this made me go and install the latest jEdit (5.0pre1) to try it out. :) One thing I notice right off the bat though is that it doesn't properly vertically align function args. That is, if I type (foo bar and hit Enter, I expect the next character I type to go right under that b in bar. But LispIndent gives me a 2-space indent instead. Is there a way to configure LispIndent to vertically align args? Thanks, ---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 -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: Minderbinder v0.2.0
Very nice, thanks. Is the intent for this to eventually be as complete as Frink [1] or are you going to keep its scope to time, length and information? Frink is a general purpose programming language, so by default I get that for free via Clojure. ;-) Seriously though, this is in no way meant to replicate the Frink experience of first-class units of measure. Instead the ultimate goal is to allow unit-aware syntax with tools to ensure a common reference base. I will likely add (and will accept patches for) more unit types as time goes on. I wanted to get the core solidified before I went too far on that in the beginning. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: LispIndent, jEdit plugin that indents lisp code
On Wednesday, October 17, 2012 2:17:50 PM UTC-4, Jonathan Fischer Friberg wrote: Not currently, no. I'm not really sure how to detect when to use 2 spaces, and when to align arguments. I also feel that no editor really has nailed it, when it comes to deciding that. (it's also personal preference) My first guess is that it should by default align arguments, but then have some special cases where it doesn't, such as with `defn`. Though, I can see that if you add special cases, the plug-in would probably be better named ClojureIndent rather than LispIndent (which may imply Common Lisp, for that matter). Maybe I should just make it completely configurable with regexes? I don't know if the Emacs clojure-mode is user-configurable in that way. I haven't needed to change it. Most Clojure users seem to indent in pretty much the same way, fwict, which is probably pretty close to how Emacs does it automatically. I haven't tried Eclipse. If you want to try out Emacs to see how it does indentation (for comparison to LispIndent), I wrote a quick guide that might be useful for you: http://www.unexpected-vortices.com/clojure/10-minute-emacs-for-clojure.html . ---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: Cdr car
Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) On Tuesday, October 16, 2012 5:08:26 PM UTC-7, Baishampayan Ghose wrote: `car` is called `first` here and `cdr` could mean either `rest` or `next` depending on what you mean/need. And oh, `cons` is not exactly the same one from Common Lisp, etc. Regards, BG On Tue, Oct 16, 2012 at 3:40 PM, Curtis cur...@ram9.cc wrote: Hello - I was familar with lisp years ago and am very new to clojure. I am having a hard time understanding how to find 'car' and 'cdr'. The nice thing about these functions is they always seem to be a part of lisp. I would like to use the little lisper to teach lisp to my co-workers so that we can adopt Clojure. How can i import cdr or car? I know i can write these manually or alias them to 'first' and 'rest' - are they a part of the language? Cons appears to be around. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Baishampayan Ghose b.ghose at gmail.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Coming from Common Lisp to Clojure
I do hope this is an appropriate topic. I am very excited by the power and capability in clojure and amazed at the rapid quality of tooling that exists so early in the projects life. I would like to admit that i am feeling like the simplicity and elegance that I experienced writing in lisp seems to be bypassed in certain areas in favor of extra syntax [] and what seems to be local variable declarations as well as 'many ways' to do something around looping and recursion. I am wondering how others feel about this and if there are any style guides that i could be exposed to so that I can enjoy the poetry that I may be missing. Could some one help me with this please? Thank you! Curtis -- 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: Cdr car
On Tuesday, October 16, 2012 5:09:02 PM UTC-7, Andy Fingerhut wrote: Curtis: You can do this if you want: (def car first) (def cdr rest) but most people accustomed to Clojure would be much more familiar with first and rest. The Content of the Address and Data Registers haven't been applicable for a long time, but it wasn't only the names that are changed -- first and rest work on all kinds of data structures besides lists, and return implementations of a sequence abstraction, not necessarily pointers to cons cells. thank you - I expect some changes - but am coming from ruby where the 'principle of least surprise' has been kind to me. Andy On Oct 16, 2012, at 3:40 PM, Curtis wrote: Hello - I was familar with lisp years ago and am very new to clojure. I am having a hard time understanding how to find 'car' and 'cdr'. The nice thing about these functions is they always seem to be a part of lisp. I would like to use the little lisper to teach lisp to my co-workers so that we can adopt Clojure. How can i import cdr or car? I know i can write these manually or alias them to 'first' and 'rest' - are they a part of the language? Cons appears to be around. -- 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: Cdr car
On Tuesday, October 16, 2012 5:40:54 PM UTC-7, kovasb wrote: A number of classic lisp books have been translated to clojure, for instance http://juliangamble.com/blog/2012/07/20/the-little-schemer-in-clojure/ Thank you for the link! Personally I felt relieved when I saw that clojure had abandoned the anachronistic car/cdr stuff; the sequence abstraction is a lot nicer. There are also a number of excellent clojure books you might want to check out as well, which might appeal to the more practical minded among the coworkers. On Tue, Oct 16, 2012 at 6:40 PM, Curtis cur...@ram9.cc wrote: Hello - I was familar with lisp years ago and am very new to clojure. I am having a hard time understanding how to find 'car' and 'cdr'. The nice thing about these functions is they always seem to be a part of lisp. I would like to use the little lisper to teach lisp to my co-workers so that we can adopt Clojure. How can i import cdr or car? I know i can write these manually or alias them to 'first' and 'rest' - are they a part of the language? Cons appears to be around. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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 turns 5
HAPPY BIRTHDAY!! thank you Rich for the fyi! On Tuesday, October 16, 2012 6:53:55 PM UTC-7, Rich Hickey wrote: I released Clojure 5 years ago today. It's been a terrific ride so far. Thanks to everyone who contributes to making Clojure, and its community, great. Rich -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: LispIndent, jEdit plugin that indents lisp code
I don't know if the Emacs clojure-mode is user-configurable in that way. I haven't needed to change it. Most Clojure users seem to indent in pretty much the same way, fwict, which is probably pretty close to how Emacs does it automatically. I haven't tried Eclipse. All the lisp and scheme modes in Emacs are configurable in this way. Here's the relevant variable from clojure-mode: https://github.com/technomancy/clojure-mode/blob/master/clojure-mode.el#L771-845 jack. -- 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: Cdr car
This works just fine, and as you would expect from Common Lisp: user= (cons 1 '()) (1) Clojure does not have improper lists as Scheme and Common Lisp allow. You can't have a cons pair of arbitrary pairs of things, but you can create vectors of 2 arbitrary things if you want such a pair. There aren't cons cells in Clojure. There are lists, and while some are implemented via things that look a lot like cons pairs under the covers, some are not (e.g. chunked sequences are implemented differently, I think). They still act like ordered sequences using the functions available to access them, and most of the time there isn't much reason to care how it is implemented under the covers. There is no mutation on the lists, either. That is a much bigger difference from Common Lisp and Scheme to Clojure. Most Clojure data structures are immutable. No (setf (car my-list) ...). No setf. Instead you make new data structures that are like existing ones, but with changes to them (like a new first/last element, or a new key/value pair in a map). Andy On Oct 17, 2012, at 11:16 AM, Curtis wrote: Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) On Tuesday, October 16, 2012 5:08:26 PM UTC-7, Baishampayan Ghose wrote: `car` is called `first` here and `cdr` could mean either `rest` or `next` depending on what you mean/need. And oh, `cons` is not exactly the same one from Common Lisp, etc. Regards, BG On Tue, Oct 16, 2012 at 3:40 PM, Curtis cur...@ram9.cc wrote: Hello - I was familar with lisp years ago and am very new to clojure. I am having a hard time understanding how to find 'car' and 'cdr'. The nice thing about these functions is they always seem to be a part of lisp. I would like to use the little lisper to teach lisp to my co-workers so that we can adopt Clojure. How can i import cdr or car? I know i can write these manually or alias them to 'first' and 'rest' - are they a part of the language? Cons appears to be around. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@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+u...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Baishampayan Ghose b.ghose at gmail.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- 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: Coming from Common Lisp to Clojure
Hi I don't know about style guides, but I can recommend to look to 2 books: The Joy of Clojure Clojure Programming - they provide a lot of interesting information, including tips on writing idiomatic Clojure code On Wed, Oct 17, 2012 at 8:14 PM, Curtis cur...@ram9.cc wrote: I do hope this is an appropriate topic. I am very excited by the power and capability in clojure and amazed at the rapid quality of tooling that exists so early in the projects life. I would like to admit that i am feeling like the simplicity and elegance that I experienced writing in lisp seems to be bypassed in certain areas in favor of extra syntax [] and what seems to be local variable declarations as well as 'many ways' to do something around looping and recursion. I am wondering how others feel about this and if there are any style guides that i could be exposed to so that I can enjoy the poetry that I may be missing. Could some one help me with this please? Thank you! Curtis -- 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 -- With best wishes,Alex Ott http://alexott.net/ Twitter: alexott_en (English), alexott (Russian) Skype: alex.ott -- 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: Cdr car
If I may suggest the following presentation: http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721 http://blip.tv/clojure/clojure-for-lisp-programmers-part-2-1319826 There used to a transcript available on the newsgroup until Google decided to remove all files from newsgroup 8) On Wednesday, October 17, 2012 2:16:01 PM UTC-4, Curtis wrote: Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) -- 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: Cdr car
Thank you so much! On Tuesday, October 16, 2012 5:08:26 PM UTC-7, Baishampayan Ghose wrote: `car` is called `first` here and `cdr` could mean either `rest` or `next` depending on what you mean/need. And oh, `cons` is not exactly the same one from Common Lisp, etc. Regards, BG On Tue, Oct 16, 2012 at 3:40 PM, Curtis cur...@ram9.cc wrote: Hello - I was familar with lisp years ago and am very new to clojure. I am having a hard time understanding how to find 'car' and 'cdr'. The nice thing about these functions is they always seem to be a part of lisp. I would like to use the little lisper to teach lisp to my co-workers so that we can adopt Clojure. How can i import cdr or car? I know i can write these manually or alias them to 'first' and 'rest' - are they a part of the language? Cons appears to be around. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Baishampayan Ghose b.ghose at gmail.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Midje popularity?
Hi Brian. No need to apologize, you are doing this in your free time. It's highly appreciated whatever we can get. Just to clear something up: Are you maintaining midje-mode? I thought it was Dmitri? That's where I left my pull request anyway. Bruce: I haven't actually used clojure-test-mode, but it certainly seems to fit my requirements. Will see what I can do about that. On Wed, Oct 17, 2012 at 6:28 PM, Brian Marick mar...@exampler.com wrote: On Oct 17, 2012, at 8:31 AM, Andreas Liljeqvist wrote: Since I haven't got any response either on the mailinglist or the pullrequest I will ask here. I apologize. I've been single-tasking on my book for the past months (monomaniacal about it, to be honest). The good news is that I'm now double-checking the changes for the next release. When that's done (probably tomorrow), I'm setting the book aside until I can reread it with a fresher eye. Then I'll be spending about a quarter of my time on Midje. I'll definitely get to your pull request soon, because I want to start using nrepl myself. Again: sorry. - Brian Marick, Artisanal Labrador Contract programming in Ruby and Clojure Occasional consulting on Agile Writing /Functional Programming for the Object-Oriented Programmer/: https://leanpub.com/fp-oo -- 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: Cdr car
I came to Clojure from a similar background and posted my thoughts of car, cdr, and cons here http://software-ninja-ninja.blogspot.com/2011/08/clojure-patterns-cons-car-and-cdr.html On Wednesday, October 17, 2012 1:10:15 PM UTC-6, Jeff Heon wrote: If I may suggest the following presentation: http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721 http://blip.tv/clojure/clojure-for-lisp-programmers-part-2-1319826 There used to a transcript available on the newsgroup until Google decided to remove all files from newsgroup 8) On Wednesday, October 17, 2012 2:16:01 PM UTC-4, Curtis wrote: Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) -- 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: Cdr car
My first lisp was UCI lisp in the 80s. There were not many data structures available aside from linked lists and trees. Of course a computer as powerful as today's pocket calculators would have required an entire building if built with the available technology in these years. I used common lisp later in the late 90s and at the turn of the new millennium which was better but linked lists were still heavily used. Clos never really tempted me and today my immune system is very sensitive when the OO level increase too much in my surroundings :) Too much exposure to Java possibly, it's like being allergic, everything goes fine and one day your immune system decides that this stuff you have been immersed in for years is now an enemy to fight. I never missed the cons cell and it's neighboring fns, car,cdr,cadr,caddr, ... when I started toying with Clojure. There are much more interesting data structures available to make use of. I reluctantly use defrecord and avoid deftype these days. My data world today is made of vectors, maps, sets and a bit of lists, all persistent of course. No nostalgia of the linked list in my case :) Luc I came to Clojure from a similar background and posted my thoughts of car, cdr, and cons here http://software-ninja-ninja.blogspot.com/2011/08/clojure-patterns-cons-car-and-cdr.html On Wednesday, October 17, 2012 1:10:15 PM UTC-6, Jeff Heon wrote: If I may suggest the following presentation: http://blip.tv/clojure/clojure-for-lisp-programmers-part-1-1319721 http://blip.tv/clojure/clojure-for-lisp-programmers-part-2-1319826 There used to a transcript available on the newsgroup until Google decided to remove all files from newsgroup 8) On Wednesday, October 17, 2012 2:16:01 PM UTC-4, Curtis wrote: Cons seems to be strange How do i use Cons with an atom to make a list? (cons 1 1) -- 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 -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: LispIndent, jEdit plugin that indents lisp code
The plugin has been updated to support function argument indenting. It is configurable in the plugin options. Next, I think I will implement presets. The idea is that each preset corresponds to one language. That way, LispIndent can still be language-independent. Users will also be spared of implementing their own regexes. :) What do you think about this? Jonathan On Wed, Oct 17, 2012 at 8:54 PM, Jack Moffitt j...@metajack.im wrote: I don't know if the Emacs clojure-mode is user-configurable in that way. I haven't needed to change it. Most Clojure users seem to indent in pretty much the same way, fwict, which is probably pretty close to how Emacs does it automatically. I haven't tried Eclipse. All the lisp and scheme modes in Emacs are configurable in this way. Here's the relevant variable from clojure-mode: https://github.com/technomancy/clojure-mode/blob/master/clojure-mode.el#L771-845 jack. -- 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: Intern a var from outside namespace
I can see the potential problems with this pattern, but it also seems like a nice way to metaprogram things like controllers or models in a web app. (In non-web Clojure dev, I haven't ever run into this issue.) Will have to think about this some more... On Friday, October 12, 2012 at 11:33 AM, Stuart Sierra wrote: Sounds like a load-order issue. Make sure the code *creating* the namespaces/vars is loaded before the code *using* them. But better yet, just don't do it. :) -S -- 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 (mailto: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 (mailto: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
code design in clojure
I'm finding the books on clojure to be very focused on low-level language features. Are there any good references for how to design code in clojure (or perhaps in functional languages more generally)? For example, knowing when to use a data type or a protocol, knowing when and how to separate purely functional code from code with side effects, making use of monads, queues, and the other forms that one hears about in the forums, etc. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: ANN: LispIndent, jEdit plugin that indents lisp code
On Wednesday, October 17, 2012 7:39:26 PM UTC-4, Jonathan Fischer Friberg wrote: The plugin has been updated to support function argument indenting. It is configurable in the plugin options. Oooh, this is nice. :) I selected the indent to function arguments by default radio button, checked the box to indent if operator matches and filled in defn, and indenting works wonderfully so far. Will try this out some more. Next, I think I will implement presets. The idea is that each preset corresponds to one language. That way, LispIndent can still be language-independent. Users will also be spared of implementing their own regexes. :) What do you think about this? Oh, do you mean having that indent two spaces if operator matches text box pre-filled when selecting a given lisp-like language? That would be great, and would save users a lot of time having to figure out what should go in there while they're learning the language. :) Great stuff here. Particularly for those new to Clojure who'd like an easy GUI editor. ---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