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 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 a quick remark: In

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() { retu

Re: edn

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

Re: edn

2012-09-08 Thread Steven E. Harris
cumentation/HyperSpec/Body/26_glo_p.htm#potential_number ² http://www.lispworks.com/documentation/HyperSpec/Body/02_caa.htm -- 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@googlegrou

Re: edn

2012-09-08 Thread Steven E. Harris
list and a vector, 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/

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

2012-07-14 Thread Steven E. Harris
a/2214049/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@g

Re: a newbie question

2012-07-04 Thread Steven E. Harris
#x27;³, the former lacks the optional count argument accepted by the latter. Footnotes: ¹ http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/take-last ² http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/subvec ³ http://www.lispworks.com/documentation/HyperSpec/B

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 Hagelberg wrote: On Mon, Jun 11, 2012 at 12:52 PM, Cédric Pineau wrote: My question is with the lazy-test dependency. Do I really have to put it as a project dependency ? It doesn't seem to be on the lein-midj

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

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

2012-03-06 Thread Steven E. Harris
r/src/main/clojure/clojure_hadoop/job.clj ³ https://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 messa

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 wrote: >> On Fri, Feb 24, 2012 at 2:12 PM, Cedric Greevey wrote: >>> On Fri, Feb 24, 2012 at 2:06 PM, gaz jones wrote: Are you Ken Wesson with a new account? >>> Who? >>> >>> Wait. Surely you don't t

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 conne

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 wrote: > > > On Thu, Oct 27, 2011 at 8:26 PM, Mark Rathwell wrote: >

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

2011-10-27 Thread e
n for code. So why not just have a "code structure". Again, it already seems broken with respect to other structures. Here's some "data". It's a vector. Here's *more* data. It's a chunk of code. Ah but it was arbitrarily decided (more from history and evo

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 wrote: > > 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

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

2011-10-27 Thread e
re just to say > 'here is a list data structure'. > > The preference for vectors as data structure when possible is to make > code more lisible. Using a list is just adding more parens, in a > language with lot of parens. Doesn't help the reading. > > Using synta

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

2011-10-27 Thread e
t;> >> Sets: --> #{1 2 3 4} >> #{1 2 3 4} > > > This is an interesting question. Consistency is important, but consistency with what? Your mental model for what happens at the REPL needs to keep the R, E, and P steps clearly separate. > > Working backward: the P (P

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

2011-10-26 Thread e
So the question is should all unevaluated forms be preceded with a > quote in the repl output? To me that would be more confusing. > > > On Wed, Oct 26, 2011 at 5:34 PM, e wrote: > > long long time since I last looked a clojure, but I've never lost > > interest and I&

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

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 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 text?

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
to a change 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 "Clo

Re: Chunking is making my life more difficult.

2010-12-31 Thread Steven E. Harris
yielding n + 2) with four or more arguments. 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 f

Re: mapmap?

2010-12-09 Thread Steven E. Harris
ed your function, say, "fmap-values" I would not have complained. -- 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 mode

Re: Regarding The Implementation of 'merge-with'

2010-11-26 Thread Steven E. Harris
Daniel Werner writes: > (some identity maps), on the other hand, checks whether there is any > non-empty map *in the coll of maps*. By "non-empty" here, do you really mean non-nil? I don't see how the identity function would tell you whether any of the maps are empty

Re: precise numbers

2010-10-16 Thread Steven E. Harris
mware.com/manuals/?manual=compleat&page=math.html#ldexp ³ http://www.lispworks.com/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 subscr

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

2010-10-16 Thread Steven E. Harris
ataggart 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 Groups "C

Re: Idiomatic Way to Build String or Simply Use StringBuilder

2010-09-30 Thread Steven E. Harris
ng the single-integer constructor, ensuring that no reallocation and copying occurs. Some temporary allocation would still be necessary to hold the Object-to-String projection, as `str' calls Object#toString() on each argument, rather than assuming the arguments are already of type String. --

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

2010-09-26 Thread Steven E. Harris
b)) ` [...] > 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

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

2010-09-26 Thread Steven E. Harris
e vector literal reader with was the `list' function: , | 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, se

Re: Displaying source of function typed into the REPL?

2010-09-19 Thread Steven E. Harris
erSpec/Body/v_pl_plp.htm -- 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

Re: Why so?

2010-09-03 Thread Steven E. Harris
David Nolen 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 to the Google Gro

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

Re: Protocols and default method implementations

2010-08-14 Thread Steven E. Harris
`defgeneric' or `defmethod' -- if the function name is already bound to a normal function, macro, or special operator. Is there supposed to be a difference between the normal function `pretty-print' I wrote above and the function defined in the `extend-type' form quoted above? -

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: OpenPG

Re: persistent LRU cache (request for input)

2010-07-18 Thread Steven E. Harris
he LRU ordering. Footnotes: ¹ http://www.dinkumware.com/manuals/default.aspx?manual=compleat&page=stack.html#stack ² http://www.dinkumware.com/manuals/default.aspx?manual=compleat&page=queue.html#queue ³ http://www.dinkumware.com/manuals/default.aspx?manual=compleat&page=vector.html#vector

Re: persistent LRU cache (request for input)

2010-07-17 Thread Steven E. Harris
ction, I think you're better of making no claim about what "get" does beyond its normal contract: 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 -- Yo

Re: auto-indent in Counterclockwise

2010-07-08 Thread Steven E. Harris
is defined) and the most recent 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. --

Re: auto-indent in Counterclockwise

2010-07-07 Thread Steven E. Harris
with symmetric brackets (for Clojure's '[' 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 re

Re: auto-indent in Counterclockwise

2010-07-06 Thread Steven E. Harris
obvious counterpart to the function `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 clo

Re: Enhanced Primitive Support

2010-06-20 Thread Steven E. Harris
David Nolen writes: > Using loop/recur is already the beginning of code smell for anything > that is not performance sensitive. [...] In your arity-overloaded example, is there any runtime cost to figure out which of the two overloads to choose each time `recur' evaluates? -

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

2010-06-12 Thread Steven E. Harris
\C-r" 'find-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 fi

Re: review the clojure.string code

2010-05-30 Thread Steven E. Harris
ielded by CharSequence#subSequence(), as it already promises to return a CharSequence. Most 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 av

Re: Clojure Concurrency Screencast Available

2010-05-01 Thread e
t; and "function" 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 wrote: > e writes: > > > Can you imagine how disruptive it would be at this point to do it the > > other way aro

Re: Clojure Concurrency Screencast Available

2010-05-01 Thread e
ice would have been to use something else for lists, 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 wrote: > interesting so far. the format I first tried didn't work on my droid, but >

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 1.2 seq fn enhancement FAQ

2010-04-30 Thread Steven E. Harris
would instead force one to use a map in cases where such a "key 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, s

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 wrote: > I second Lee's thought -- my "work" as a grad student is AI research, > not application development. I'm glad I discovered Incanter's packag

Re: Why I have chosen not to employ clojure

2010-03-22 Thread e
On Mon, Mar 22, 2010 at 1:26 AM, cej38 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 was a speech imped

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-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 th

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

2010-03-16 Thread Steven E. Harris
n use #(partial put %) for set-state. Interesting idea. > PS. Sorry if this is a bit chaotic... I like the challenge of following your mental process. More examples on this topic would be welcome. -- Steven E. Harris -- You received this message because you are subscribed to the Google Grou

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

2010-03-16 Thread Steven E. Harris
ate monad as an argument to bind, even > though it doesn't care about the state at all. Ah, I hadn't realized that such functions -- of which I've now written several for use in the state monad -- actually say nothing about the state, and can be used in other monads as well. T

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

2010-03-16 Thread Steven E. Harris
ion until we receive the state later. What would be lost by defining Clojure bind operator like this: (fn m-bind-state [mv f] (fn [s] (let [[v ss] (mv s)] (f v ss)))) Is there more to it than, "Monadic functions must return monadic values"? Any clarifying advice would

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

2010-03-05 Thread Steven E. Harris
ou used commute, the commuted operation could 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

Re: Using deftype to define mutually recursive data inside agent

2010-03-04 Thread Steven E. Harris
ataggart 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 gr

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

2010-03-02 Thread Steven E. Harris
esn't have to run again. It's not clear whether `commute' /always/ invokes the provided function twice, or only in the case of having detected a conflict against the target ref at the would-be commit point. > I think alter is exactly the right tool. Good. I can understand `alter

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

2010-03-01 Thread Steven E. Harris
#x27; behave. In particular, if a transaction touches several values with several `alter' or `commute' calls, and any 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 s

Re: difference between if/when

2010-02-28 Thread Steven E. Harris
dig through 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

Re: difference between if/when

2010-02-28 Thread Steven E. Harris
s habit: , | (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 fr

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 t

Re: My first use of cells: hashing

2010-02-27 Thread Steven E. Harris
unctions 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/dataf

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 wrote: > Hi Matt, > I think what you're looking for is line-seq: > > h

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

2010-02-15 Thread Steven E. Harris
gmane.org/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 b

Re: processing two collections

2010-02-14 Thread Steven E. Harris
;) is the inner 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 unsu

Re: Clojure Dev Environment

2010-02-13 Thread Steven E. Harris
s 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 "Clo

Re: Clojure/SLIME/Emacs questions

2010-02-12 Thread Steven E. Harris
956 -- 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 fr

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 PM,

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

2010-02-08 Thread Steven E. Harris
James Reeves 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
n > is updated for the dev versions and I've never had any real stability issues > with them. > > http://www.newlisp.org/downloads/development/ > > The community is located here: > > http://newlispfanclub.alh.net/forum/ > > - Greg > > On Feb 5, 2010, at

Re: Clojure for system administration

2010-02-05 Thread e
sounds like a good idea to me, too. On Fri, Feb 5, 2010 at 2:02 PM, Greg wrote: > What about a Clojure directly on top of the LLVM? > > It would be super-fast, you could start from scratch and leave behind all > of the issues associated with the JVM, no more complicated classpath, > namespace, i

Re: Clojure for system administration

2010-02-05 Thread e
On Fri, Feb 5, 2010 at 12:56 AM, Greg 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 recommend newLI

Re: Heap implementation in Clojure

2010-02-03 Thread e
:05 PM, ajay gopalakrishnan wrote: > What is the time and space complexity for your implementation? Equals the > normal non-functional implementation? > > On Tue, Feb 2, 2010 at 7:31 AM, e wrote: > >> i was messing around a while back with this: >> http://code.google.com/p

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 wrote: > On Tue, Dec 08, 2009 at 03:22:47PM -0800, ataggart wrote:

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 struct

Re: Promise/Deliver use cases

2010-01-30 Thread Steven E. Harris
uedSynchronizer so that I 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 ema

Re: newbie question about ns and :require

2010-01-26 Thread Steven E. Harris
a lot 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 cloj

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 wrote: > +1 Lincoln/Omaha Nebraska. :) > > --- > Joseph Smith > j...@uwcreations.com > (402)601-5

Re: newbie question about ns and :require

2010-01-25 Thread Steven E. Harris
Justin Kramer writes: > You may find this ns cheatsheet helpful: > > http://gist.github.com/284277 That is most helpful. What's not helpful is the weird mix of lists and vectors used by these forms. When I finally made it to :rename accepting a map, I had to take a break. -- St

Re: Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
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, se

Proxy macro, and calling on a protected method

2010-01-24 Thread Steven E. Harris
idden 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 - pl

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 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 that program

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 mor

Re: Promise/Deliver use cases

2010-01-23 Thread Steven E. Harris
on a separate thread 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

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

2010-01-22 Thread Steven E. Harris
pec/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" group. To

Re: Promise/Deliver use cases

2010-01-22 Thread Steven E. Harris
er means of spawning 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@googleg

Re: Lift and bind

2010-01-12 Thread Steven E. Harris
I felt confident enough to ask. Learning was my goal, and your essays have been 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 post

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

2010-01-11 Thread Steven E. Harris
(fn [v] | (m-result (f v ` 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

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

2010-01-09 Thread Steven E. Harris
Phil Hagelberg 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 this mess

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

2010-01-08 Thread Steven E. Harris
Phil Hagelberg 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

Re: Understanding the continuation monad's bind operator

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

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

2010-01-07 Thread Steven E. Harris
did try all 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 th

Re: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
ould one be able to call on a "lifted" function? A simple example would help. -- 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: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
ning 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 moderate

Re: Understanding the continuation monad's bind operator

2010-01-06 Thread Steven E. Harris
nction. Is that right? If so, is it the case with all or most monads that the bind operator is not meant 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

Understanding the continuation monad's bind operator

2010-01-04 Thread Steven E. Harris
--- | (f v) ` should evaluate to a monadic value and be suitable 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 subsc

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

2010-01-03 Thread Steven E. Harris
oesn't start up) 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 -

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

2010-01-02 Thread Steven E. Harris
"Steven E. Harris" 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) &g

  1   2   3   4   >