Re: How to model a rectangle?

2015-03-05 Thread Felix E. Klee
Looks interesting, thanks! On Thu, Mar 5, 2015 at 4:43 PM, Leon Grapenthin grapenthinl...@gmail.com wrote: (defn rect2 [x y width height] (let [lr [(+ width x) (+ width y)]] (reify Rect (upper-left [_] [x y]) (lower-right [_] lr) (area [_] (* width height) Just

How to model a rectangle?

2015-03-05 Thread Felix E. Klee
Disclaimer: I’ve never done *any* Clojure programming, but I’m curious. Here’s how I may model an on-screen rectangle in JavaScript, a classless object oriented language: let createRectangle = function (x, y, width, height) { return { get upperLeft() {

Re: edn

2012-09-08 Thread Steven E. Harris
, again without a clear basis for his decision. As an appeal to prior art, Rivest's S-Expressions Internet-Draft¹ used only a single list structure, though it does define three different encodings for that structure. Footnotes: ¹ http://people.csail.mit.edu/rivest/Sexp.txt -- Steven E. Harris

Re: edn

2012-09-08 Thread Steven E. Harris
-- Steven E. Harris -- 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

Re: edn

2012-09-08 Thread Steven E. Harris
you've ignored the thrust of my concern rather than settling it. sexp's only have a list notation because that's all lisp had, and even then, some people got it all for free. That tail did not wag that dog. -- Steven E. Harris -- You received this message because you are subscribed

Re: Tail-recursive lazy sequence construction by appending to the end of accumulator problem.

2012-07-14 Thread Steven E. Harris
/31818 Note that I wrote it about a year and a half ago. I hope the references to the Java classes are still correct. -- Steven E. Harris -- 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

Re: Leiningen2 + lein-midje + lazytest question

2012-06-12 Thread Daniel E. Renfer
On 06/12/2012 12:05 PM, Phil Hagelberg wrote: On Mon, Jun 11, 2012 at 1:46 PM, Phil Hagelbergp...@hagelb.org wrote: On Mon, Jun 11, 2012 at 12:52 PM, Cédric Pineaucedric.pin...@gmail.com wrote: My question is with the lazy-test dependency. Do I really have to put it as a project dependency ?

A question of technique: clojure-hadoop's patching of methods

2012-03-06 Thread Steven E. Harris
://github.com/stuartsierra/clojure-hadoop/blob/master/src/main/clojure/clojure_hadoop/gen.clj#L5 º https://github.com/stuartsierra/clojure-hadoop/blob/master/src/main/clojure/clojure_hadoop/job.clj#L31 -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure

Re: A question of technique: clojure-hadoop's patching of methods

2012-03-06 Thread Steven E. Harris
a distinct class for each. -- Steven E. Harris -- 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

Re: defmulti and defmethods in separate namespaces without circular references?

2012-03-02 Thread Daniel E. Renfer
I use a lot of multimethods with my framework, Ciste[0] and it can work, the only thing is you have to be very careful about what you put where, and it helps to have a lot of namespaces. What I do is try to keep all of my defmulti's in one namespace and have only defmethod's in another namespace.

Re: Bret Victor - Inventing on Principle

2012-02-24 Thread Daniel E. Renfer
On 02/24/2012 02:42 PM, Cedric Greevey wrote: On Fri, Feb 24, 2012 at 2:25 PM, Jay Fields j...@jayfields.com wrote: On Fri, Feb 24, 2012 at 2:12 PM, Cedric Greevey cgree...@gmail.com wrote: On Fri, Feb 24, 2012 at 2:06 PM, gaz jones gareth.e.jo...@gmail.com wrote: Are you Ken Wesson with a new

Re: Controlling the test environment

2012-01-20 Thread Daniel E. Renfer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/15/2012 06:18 PM, Matt Stump wrote: Is there a way to set different values for global vars when running tests as opposed to the development or production environment? I need to control which database my tests for a noir project connect

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
needs to keep the R, E, and P steps clearly separate. Working backward: the P (Print) prints things in a way that they can be read back, where possible: (read-string [1 2 3 4]) = [1 2 3 4] (read-string (1 2 3 4)) = (1 2 3 4) (read-string #{1 2 3 4}) = #{1 2 3 4} (read-string {1 2 3 4

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
the reading. Using syntaxic sugar for vector, on the contrary help the reading. On 27 oct, 01:08, e evier...@gmail.com wrote: not necessarily. [1 2 3] is a vector that is not evaluated. Since there is no overload with things that are, there's no need for a special mark. '(1 2 3

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
On Thu, Oct 27, 2011 at 7:42 PM, Stephen C. Gilardi squee...@mac.comwrote: On Oct 26, 2011, at 7:08 PM, e wrote: [1 2 3] is a vector that is not evaluated. Since there is no overload with things that are, there's no need for a special mark. If you type [1 2 3] into the REPL

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
) that *that* data is a list. Broken. On Thu, Oct 27, 2011 at 6:58 PM, e evier...@gmail.com wrote: On Oct 26, 2011 7:15 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: checking out the Try Clojure: if you type the following, you get output that matches what you typed in every case

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-27 Thread e
I think I understand more now though, everyone. Thanks. clojure chose lists for the data structure for code so lists sort of have a special place in the language. Thanks again. On Fri, Oct 28, 2011 at 1:13 AM, e evier...@gmail.com wrote: On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell

repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread e
long long time since I last looked a clojure, but I've never lost interest and I'm trying to find the time again. for the short version see *INCONSISTENT*, in the example at the end. I know what the answer will be here. Something like you will get used to it. or it's not important. or no one

Re: repl output for list seems inconsistent and a holdover from yesteryear

2011-10-26 Thread e
with a quote in the repl output? To me that would be more confusing. On Wed, Oct 26, 2011 at 5:34 PM, e evier...@gmail.com wrote: long long time since I last looked a clojure, but I've never lost interest and I'm trying to find the time again. for the short version see *INCONSISTENT

Re: How to read project.clj file.

2011-08-09 Thread Daniel E. Renfer
On 08/09/2011 05:35 AM, Shantanu Kumar wrote: On Aug 9, 12:22 pm, mmwaikar mmwai...@gmail.com wrote: Hi, Assuming there are some DB credentials specified in a project.clj file as a map, how should I read those credentials in my clojure code - 1) should I use slurp and then parse that

Re: Efficient queue types for Clojure.

2011-06-25 Thread e
interesting. maybe I can change my interface in this thing I abandoned a while back: http://code.google.com/p/jc-pheap/ to match that of the contrib, priority map. I had gotten stuck figuring out the right interface/usage/idioms for clojure and kinda messed the whole thing up in later checkins.

Re: Idiomatic way to document defn's

2011-05-13 Thread Steven E. Harris
in the `doc' function (and `print-doc'). It's weird that a continuation line starting at column zero doesn't print as being left-aligned with the first line. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

Re: Chunking is making my life more difficult.

2010-12-31 Thread Steven E. Harris
. What's responsible for this difference in behavior? -- Steven E. Harris -- 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: Regarding The Implementation of 'merge-with'

2010-11-26 Thread Steven E. Harris
or not. -- Steven E. Harris -- 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

Re: Idiomatic Way to Keep a Variable Private to a Namespace

2010-10-16 Thread Steven E. Harris
ataggart alex.tagg...@gmail.com writes: It's fairly common to let over a function, e.g.: So common, in fact, that Doug Hoyte wrote a book about it: Let Over Lambda http://www.letoverlambda.com/ -- Steven E. Harris -- You received this message because you are subscribed to the Google

Re: precise numbers

2010-10-16 Thread Steven E. Harris
/documentation/HyperSpec/Body/f_dec_fl.htm#decode-float http://www.lispworks.com/documentation/HyperSpec/Body/f_dec_fl.htm#scale-float -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Idiomatic Way to Build String or Simply Use StringBuilder

2010-09-30 Thread Steven E. Harris
E. Harris -- 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

Re: Literal collection of numbers - prefer list or vector?

2010-09-26 Thread Steven E. Harris
: , | user (list (+ 1 2) (+ 3 4)) | (3 7) | user (vector (+ 1 2) (+ 3 4)) | [3 7] ` -- Steven E. Harris -- 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

Re: Literal collection of numbers - prefer list or vector?

2010-09-26 Thread Steven E. Harris
)) ` [...] The reader silently converts 'pung to (quote pung) prior to evaluation, so you have to come at it in a roundabout way: That's not conspiring; that's read-time macroexpansion working as intended. -- Steven E. Harris -- You received this message because you are subscribed to the Google

Re: Why so?

2010-09-03 Thread Steven E. Harris
David Nolen dnolen.li...@gmail.com writes: Clojure functions categorized: http://clojuredocs.org/quickref/Clojure%20Core Wow, that is very nice -- especially the expandable view of the implementation source. -- Steven E. Harris -- You received this message because you are subscribed

Re: What is the reason Lisp code is not written with closing parenthesis on new lines?

2010-08-18 Thread Daniel E. Renfer
On 8/18/10 1:32 PM, Brian Goslinga wrote: Putting them on separate lines put the focus on the wrong element of the code. You do not want to be focusing on the parentheses, you want to be focusing on the structure of the code. The idiomatic lisp formatting style uses indentation to reveal the

Re: Protocols and default method implementations

2010-08-14 Thread Steven E. Harris
the normal function `pretty-print' I wrote above and the function defined in the `extend-type' form quoted above? -- Steven E. Harris -- 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

Re: Idea for personal Clojure project

2010-07-28 Thread Daniel E. Renfer
On 7/28/10 5:34 PM, Mark Engelberg wrote: Wordnet is the main existing thing that comes to mind as related to your idea. You might also want to look into Freebase. Here's a Clojure client you can use to query their data. http://github.com/rnewman/clj-mql signature.asc Description: OpenPGP

Re: persistent LRU cache (request for input)

2010-07-18 Thread Steven E. Harris
://www.dinkumware.com/manuals/default.aspx?manual=compleatpage=stack.html#stack ² http://www.dinkumware.com/manuals/default.aspx?manual=compleatpage=queue.html#queue ³ http://www.dinkumware.com/manuals/default.aspx?manual=compleatpage=vector.html#vector -- Steven E. Harris -- You received this message because

Re: persistent LRU cache (request for input)

2010-07-17 Thread Steven E. Harris
: promise only that it returns the value mapped to the given key, if any. This data structure doesn't seem like a good fit for a functional-style interface. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: auto-indent in Counterclockwise

2010-07-08 Thread Steven E. Harris
paredit.el library available for download. Or you saw a deficiency in counterclockwise ? No, I wasn't complaining about Counterclockwise. Rather, I was noting that the /complete/ behavior of `move-past-close-and-reindent' is hard to mimic. -- Steven E. Harris -- You received this message

Re: auto-indent in Counterclockwise

2010-07-07 Thread Steven E. Harris
'[' and ']') is disappointing, and I have found the paredit package to be not much better on that front (having difficulty with balancing '{' and '}'). It has its own set of oddities. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group

Re: auto-indent in Counterclockwise

2010-07-06 Thread Steven E. Harris
`insert-paretheses'.¹ Footnotes: ¹ http://www.cliki.net/Editing%20Lisp%20Code%20with%20Emacs -- Steven E. Harris -- 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

Re: Enhanced Primitive Support

2010-06-20 Thread Steven E. Harris
? -- Steven E. Harris -- 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

Re: Mac Emacs users: which version do you prefer (Aquamacs, Carbon Emacs, other?)

2010-06-12 Thread Steven E. Harris
-file-read-only) -- Steven E. Harris -- 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

Re: review the clojure.string code

2010-05-30 Thread Steven E. Harris
Java code poisons its string manipulation efficiency by always promising to return String rather than CharSequence. You've done better in your signatures here, so I'm just encouraging you to avoid String and the extra copies it forces. -- Steven E. Harris -- You received this message because you

Re: Clojure Concurrency Screencast Available

2010-05-01 Thread e
interesting so far. the format I first tried didn't work on my droid, but no big deal. one, kind-of Eureka moment I just had, which is somewhat blasphemous, I guess: Craig is going through how a vector is [1 2 3] but a list has to be '(1 2 3)? Well, that may be one of the turn-offs people have

Re: Clojure Concurrency Screencast Available

2010-05-01 Thread e
, like 1 2 3, but I guess that would have looked a little too much like templates or html (more blasphemy). On Sat, May 1, 2010 at 11:30 AM, e evier...@gmail.com wrote: interesting so far. the format I first tried didn't work on my droid, but no big deal. one, kind-of Eureka moment I just had

Re: Clojure Concurrency Screencast Available

2010-05-01 Thread e
in javascript, at least. But they only have two types, arrays and objects (dictionaries). On Sat, May 1, 2010 at 11:06 PM, Alex Osborne a...@meshy.org wrote: e evier...@gmail.com writes: Can you imagine how disruptive it would be at this point to do it the other way around? If you were starting

Re: clojure 1.2 seq fn enhancement FAQ

2010-04-30 Thread Steven E. Harris
comparison view (being something less than the value itself) is necessary. -- Steven E. Harris -- 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

Re: Why I have chosen not to employ clojure

2010-03-23 Thread e
I'm starring that post. Still haven't gotten Aquamacs working with clojure. will try yet again tonight. On Tue, Mar 23, 2010 at 3:28 PM, Carson c.sci.b...@gmail.com wrote: I second Lee's thought -- my work as a grad student is AI research, not application development. I'm glad I discovered

Re: Why I have chosen not to employ clojure

2010-03-22 Thread e
think about the difference between putting flash or python on a machine compared to clojure. there's more of a system-level path feel to those things (even though each user can have their own environment). I mean, you can add a clj script to your path and get the same effect, but that's what's

Re: Why I have chosen not to employ clojure

2010-03-22 Thread e
On Mon, Mar 22, 2010 at 1:26 AM, cej38 junkerme...@gmail.com wrote: I am a physicist by training and practice, this means that I am an expert on Fortran 95. To say my exposure to Java is minimal would be generous. And until last year when I heard about Clojure from a friend, I thought LISP

Re: Why I have chosen not to employ clojure

2010-03-21 Thread e
there's a positive reason to say all that stuff as if to say, and it's not that I'm a slouch. I have been able to succeed with other technology. I've personally had tons of trouble getting going with clojure, and I use java all the time. I think the ideas in clojure are awesome, and I like the

Why do functions in the state monad only accept one value?

2010-03-16 Thread Steven E. Harris
://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf ² http://www.haskell.org/all_about_monads/html/statemonad.html -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Why do functions in the state monad only accept one value?

2010-03-16 Thread Steven E. Harris
. -- Steven E. Harris -- 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

Re: Why do functions in the state monad only accept one value?

2010-03-16 Thread Steven E. Harris
mental process. More examples on this topic would be welcome. -- Steven E. Harris -- 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

Re: Writing a put-if-absent operation a la Java's ConcurrentMap

2010-03-05 Thread Steven E. Harris
be repeated upon conflict at the end of the transaction and wind up succeeding, albeit with a different resulting value than the one observed within the transaction, right? -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Steven E. Harris
ataggart alex.tagg...@gmail.com writes: You can use *agent* from inside an agent thread to obtain the current agent. Is this documented? -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Writing a put-if-absent operation a la Java's ConcurrentMap

2010-03-02 Thread Steven E. Harris
against the target ref at the would-be commit point. I think alter is exactly the right tool. Good. I can understand `alter'. I'd still like to understand more about `commute'. I appreciate the discussion. -- Steven E. Harris -- You received this message because you are subscribed

Writing a put-if-absent operation a la Java's ConcurrentMap

2010-03-01 Thread Steven E. Harris
one of those values wind up conflicting with a competing transaction, does the whole transaction fail and restart? Again, how do `alter' and `commute' differ in such a case? Footnotes: ¹ http://java.sun.com/javase/7/docs/api/java/util/concurrent/ConcurrentMap.html -- Steven E. Harris -- You

Re: Question about how to write efficient code in functional style

2010-02-28 Thread e
Someone will have an elegant solution, but what comes to my mind is a (somewhat) brute force loop-recur ... not not that much different from what you suggested. It would pass the under construction return lists to itself and a dwindling amount (rest) of the original list. Add first from the

Re: difference between if/when

2010-02-28 Thread Steven E. Harris
: , | (defmacro unless [pred body] | `(when-not ~pred ~...@body)) ` -- Steven E. Harris -- 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

Re: difference between if/when

2010-02-28 Thread Steven E. Harris
the core API documentation. Finding `when-not' was nice, but the name still doesn't work for me. Per your/our macro above, it's not really different enough from `when' and `not' to warrant another name. -- Steven E. Harris -- You received this message because you are subscribed to the Google

Re: My first use of cells: hashing

2010-02-27 Thread Steven E. Harris
functions defined? There's the dataflow library in Clojure contrib¹, but it doesn't have an `update-cell' function or form `'. Where are you finding these? Is there public documentation available? Footnotes: ¹ http://richhickey.github.com/clojure-contrib/dataflow-api.html -- Steven E. Harris

Re: Code Review: how can I make this socket code more functional?

2010-02-16 Thread e
i'm interested in seeing how this progresses ... like how you'd spawn handlers asynchronously to service the requests. was thinking about doing this exercise myself at some point. On Tue, Feb 16, 2010 at 4:30 PM, Alan Dipert alan.dip...@gmail.com wrote: Hi Matt, I think what you're looking

Re: Emacs/Slime -- Slime wont eval but *inferior-lisp* will (Help a newbie out)

2010-02-15 Thread Steven E. Harris
/gmane.comp.java.clojure.user/24894/focus=24956 In the *inferior-lisp* buffer, try evaluating the following form: (.. java.lang.management.ManagementFactory (getRuntimeMXBean) (getName)) Does that cause SLIME's REPL to finally connect to Swank? -- Steven E. Harris -- You received this message

Re: processing two collections

2010-02-14 Thread Steven E. Harris
one. -- Steven E. Harris -- 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

Re: Clojure Dev Environment

2010-02-13 Thread Steven E. Harris
fails when loaded for the REPL, and hence it can't find the required class (clojure.main), even though IDEA can load the same Jar file for other reasons. It's strange and frustrating. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group

Re: Request for Feedback: Improve VimClojure's documentation

2010-02-11 Thread e
i can echo that last reply. I wanted to use clojure and may return to it ... awesome idea. But haven't had ANY luck with dev environments ... VC, included. gone down many blind alleys. It was almost a year ago that I tried, though. perhaps I should try again. On Thu, Feb 11, 2010 at 12:44

Re: Inheriting from IDeref - good idea or bad practise?

2010-02-08 Thread Steven E. Harris
James Reeves weavejes...@googlemail.com writes: Would those more knowledgable about Clojure care to weigh in on whether it be a good idea to create a custom class inheriting from IDeref? That's how promise is implemented, but that's supposed to be an internal detail. -- Steven E. Harris

Re: Clojure for system administration

2010-02-05 Thread e
On Fri, Feb 5, 2010 at 12:56 AM, Greg g...@kinostudios.com wrote: A much easier solution is to go with a lisp designed for exactly the task of scripting. Woah! Seems like an understatement. This newLISP looks POWERFUL. Lot's of new stuff to read. Thank you, thank you. I whole-heartedly

Re: Heap implementation in Clojure

2010-02-02 Thread e
i was messing around a while back with this: http://code.google.com/p/jc-pheap/ the algorithms work, but it's probably in a between-state. I wasn't sure what the interface should look like exactly, and I was recently adding support for duplicate keys (but I wasn't sure if I should have two

Re: Trouble implementing Dijkstra algorithm in Clojure

2010-02-02 Thread e
folks may be interested in this thing I was working on a while back for Dijkstra and Branch and Bound problems: http://code.google.com/p/jc-pheap/. ... I know this was a while ago :) On Tue, Dec 8, 2009 at 11:26 PM, David Brown cloj...@davidb.org wrote: On Tue, Dec 08, 2009 at 03:22:47PM

Re: Promise/Deliver use cases

2010-01-30 Thread Steven E. Harris
could expose timed waits on it, but I got hung up with lack of access to protected methods in the `proxy' macro. -- Steven E. Harris -- 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

Re: Clojure Conference Poll

2010-01-26 Thread e
I didn't know this was a vote for location. If it is, DC would work for me. I thought it was more about weekend vs week. I'd agree weekend is better. On Tue, Jan 26, 2010 at 4:09 PM, Joseph Smith j...@uwcreations.com wrote: +1 Lincoln/Omaha Nebraska. :) --- Joseph Smith

Re: newbie question about ns and :require

2010-01-26 Thread Steven E. Harris
of options and whichever one you think sounds appropriate is probably the wrong choice. Be prepared to try several times. -- Steven E. Harris -- 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

Re: newbie question about ns and :require

2010-01-25 Thread Steven E. Harris
. -- Steven E. Harris -- 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

Re: Debugging in Clojure

2010-01-24 Thread e
It has confused me since the day I tried to mess around with clojure that this topic isn't brought up more (not that I follow clj regularly) ... so I'm happy to learn that someone added trace capabilities. That said (and I'm not trying to make this a charged statement ... just a way to learn

Re: Debugging in Clojure

2010-01-24 Thread e
interesting. thanks for the thoughtful reply. On Sun, Jan 24, 2010 at 2:08 PM, Richard Newman holyg...@gmail.com wrote: That said (and I'm not trying to make this a charged statement ... just a way to learn more) I had always thought that one of the key things that made lisp so complete was

Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
protected methods and calling on protected methods. -- Steven E. Harris -- 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: Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
no influence over /other/ instances of the same Method. Changing the accessibility doesn't seem to have global effect throughout the program. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Promise/Deliver use cases

2010-01-23 Thread Steven E. Harris
seems like way too much work just to get a timeout-based wait on the promise's delivery arriving. Footnotes: ¹ http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/deref -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure

Re: Promise/Deliver use cases

2010-01-22 Thread Steven E. Harris
asynchronous work (or not) while still retaining the block-on-a-latching-result capability. -- Steven E. Harris -- 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

Re: Suggest slime-redirect-inferior-output be default for Swank clojure

2010-01-22 Thread Steven E. Harris
/documentation/HyperSpec/Body/f_wr_pr.htm http://www.lispworks.com/documentation/HyperSpec/Body/f_format.htm ² http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_s.htm#stream_designator -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure

Re: Lift and bind

2010-01-12 Thread Steven E. Harris
tremendously helpful. -- Steven E. Harris -- 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

Lift and bind (was: Understanding the continuation monad's bind operator)

2010-01-11 Thread Steven E. Harris
` but it looks too simple. Footnotes: ¹ http://intensivesystems.net/tutorials/monads_201.html -- Steven E. Harris -- 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

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-09 Thread Steven E. Harris
Phil Hagelberg p...@hagelb.org writes: There was some discussion about it a couple months ago: I picked up the torch today, in hope that others will try again for a better resolution: http://thread.gmane.org/gmane.lisp.slime.devel/9178/focus=9383 -- Steven E. Harris -- You received

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-08 Thread Steven E. Harris
Phil Hagelberg p...@hagelb.org writes: If someone would volunteer to fix it, I'd be thrilled. Nobody who is interested in using CL and Clojure at the same time has stepped forward so far, which is why it's currently broken. Can you characterize what needs to be fixed? -- Steven E. Harris

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-07 Thread Steven E. Harris
of this with the git version and found the exact same behavior as with the CVS version. -- Steven E. Harris -- 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

Re: Understanding the continuation monad's bind operator

2010-01-07 Thread Steven E. Harris
Thank you, Konrad. Your explanation was perfect. -- Steven E. Harris -- 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: Understanding the continuation monad's bind operator

2010-01-07 Thread Steven E. Harris
of the computational steps. Can you recommend a book that covers aspects of monads like these? I'd like to learn more about the abstract concepts than their implementation in a particular language. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups

Re: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
to actually perform computation on the spot, but rather to compose a delayed computation, or is this delaying particular to the continuation monad? -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
to delaying evaluation of the monadic function provided to bind. -- Steven E. Harris -- 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

Re: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
and returns a monadic value. That's the wrong argument type to be used with bind -- which wants to call on a monadic function with a basic value -- so I don't understand when one would want to use lift. When would one be able to call on a lifted function? A simple example would help. -- Steven E

Understanding the continuation monad's bind operator

2010-01-04 Thread Steven E. Harris
as a return value from `m-bind'. In short, why is this not an acceptable implementation? , | (fn m-bind-cont [mv f] | (mv (fn [v] (f v ` -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-03 Thread Steven E. Harris
) without the aforementioned prodding. -- Steven E. Harris -- 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

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
://git.boinkor.net/slime.git head behave the same way, as the offending calls are in swank-clojure. o Clojure 1.1.0 Downloaded Jar from code.google.com. o GNU Emacs 23.1.1 o Windows XP 32-bit -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
Steven E. Harris s...@panix.com writes: it takes calling RuntimeMXBean#get() -- actually using the RuntimeMXBean instance -- to unblock the other thread. I meant RuntimeMXBean#getName() there. My typing is poor this morning. -- Steven E. Harris -- You received this message because you

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
Steven E. Harris s...@panix.com writes: In the meantime, I'll continue the investigation. Here are two thread dumps of the Java process running Clojure and Swank, which, at this time, has a live Clojure REPL, but the Swank call to `connection-info' hasn't completed yet. This first one comes

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
Steven E. Harris s...@panix.com writes: In the meantime, I'll continue the investigation. And yet more information: Apparently it's not critical to call on the RuntimeMXBean#getName() method specifically to kick the Swank thread out of its blocking call; just about /any call on a Java method

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
Rich Hickey richhic...@gmail.com writes: Perhaps it would be best to paste such dumps somewhere, rather than mail to the entire list? I'll do that next time. Sorry for the noise. -- Steven E. Harris -- You received this message because you are subscribed to the Google Groups Clojure group

Re: SLIME/Swank problem with swank.util.sys/get-pid and RuntimeMXBean

2010-01-02 Thread Steven E. Harris
Steven E. Harris s...@panix.com writes: Now get this: Right before the SLIME-Swank connection completes, Emacs beeps and prints the following two lines in the *Messages* buffer: , | error in process filter: cond: etypecase failed: defun, (number cons string) | error in process filter

Re: Clojure/SLIME/Emacs questions

2010-01-01 Thread Steven E. Harris
. But presentations still don't work. -- Steven E. Harris -- 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

Re: Clojure/SLIME/Emacs questions

2010-01-01 Thread Steven E. Harris
Steven E. Harris s...@panix.com writes: This morning, doing so makes things work much better. Still I see this in the *inferior-lisp* buffer when starting slime: , | (require 'swank.swank) | | (swank.swank/ignore-protocol-version 2009-12-23) | | (swank.swank/start-server c:/DOCUME~1/seh

  1   2   3   >