aot resolve question

2015-01-20 Thread bob
Hi, I have a function (defn load-sym [s] (require (symbol (namespace s))) (resolve s)) There is no problem if not using the uberjar. when using the uberjar, (common/load-sym 'web/app-routes) // it can work {:route web/app-routes} //an edn file I read the edn file and put the value

Re: ANN: ClojureScript 0.0-2341, Improved Analysis Transducers

2014-09-18 Thread bob
It would be better that the jira issues have links. On Thursday, September 18, 2014 8:23:45 PM UTC+8, David Nolen wrote: ClojureScript, the Clojure compiler that emits JavaScript source code. README and source code: https://github.com/clojure/clojurescript New release version: 0.0-2341

Re: [ANN] Async Ring 0.1.0

2014-09-09 Thread bob
Great, I just wonder how you evaluate the performance, how many concurrences? how many requests? On Tuesday, September 9, 2014 11:25:04 PM UTC+8, dgrnbrg wrote: Announcing the release of Async Ring! Ring is a great foundation for building HTTP servers in Clojure. However, Ring fails to solve

Re: [ANN] aprint (awesome print) released

2014-09-08 Thread bob
Cool On Friday, September 5, 2014 5:50:10 AM UTC+8, Vladimir Bokov wrote: Hi folks, I got just tired to gazing into big amount of data and scroll 3-4 screens of my 13' laptop to grasp the structure, so I used pprint's pretty printer, but add colors and changed indentation *by default*

Re: Help Getting Sente to Work

2014-07-26 Thread Bob Hutchison
right. Cheers, Bob On Jul 26, 2014, at 12:33 AM, Timothy Washington twash...@gmail.com wrote: Hi all, I'm using [com.taoensso/sente 0.15.1], and having trouble connecting the client to the server. I'm sure it's something simple, but not obvious, as this is taken directly from the examples

Re: Is this behavior with recur and pre/post a bug?

2014-07-25 Thread Bob Hutchison
, file the ticket. At the very least it can be documented. Cheers, Bob -- 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: unexpected behavior of clojure.core/empty

2014-07-18 Thread Bob Hutchison
]) {:foo 5}))) clojure.lang.PersistentVector = (empty (first (mapv (fn [[k v]] [k v]) {:foo 5}))) [] by mapping identity over the map you're returning a vector of MapEntries (which print/deconstruct like a two element array). Cheers, Bob What just happened there? Is this expected? In the second

Re: Local variable

2014-07-08 Thread Bob Hutchison
:chain :frog :pole])) (println (f [:whiskey :bucket :chain :frog1 :pole]))) I hope you can make sense of that :-) Cheers, Bob -- Cecil Westerhof -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Local variable

2014-07-08 Thread Bob Hutchison
On Jul 8, 2014, at 7:08 PM, Cecil Westerhof cldwester...@gmail.com wrote: 2014-07-08 23:11 GMT+02:00 Bob Hutchison hutch-li...@recursive.ca: On Jul 8, 2014, at 9:40 AM, Cecil Westerhof cldwester...@gmail.com wrote: In Clojure you can define a local constant with let, but I need

Re: Workflow: cljx, cljsbuild tdd in one process

2014-06-22 Thread Bob Hutchison
Thanks for the tip, works nicely. I was doing the same thing Michal was doing. Cheers, Bob On Jun 20, 2014, at 11:07 AM, Michael Griffiths mikeygriffi...@gmail.com wrote: There's also a Leiningen plugin called lein-pdo that lets you run tasks in parallel: https://github.com/Raynes/lein-pdo

Re: Clojure:Lisp :: LSD:Meditation

2014-06-13 Thread Bob Hutchison
On Jun 13, 2014, at 6:58 AM, Jonas jonas.enl...@gmail.com wrote: I found this post from 2011 which probably is still relevant: https://groups.google.com/d/msg/clojure/t0pGIuoyB7I/RQtuuAOhes8J And just for fun, from that thread... Rich Hickey wrote: There will be times, yes, when the most

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
computations and can be carried through (using the type system, not code) to sub-computations, not just a simple sequence of function applications. That probably wasn't a lot of help, but... Cheers, Bob JG PS If this post is unhelpful, could be worded better - please let me know. I'm asking

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:44 PM, Ben Wolfson wolf...@gmail.com wrote: I wouldn't say that I *often* find myself reaching for monads, or the state monad in particular, but I certainly have found them useful on occasion (and would have sometimes refrained from using them where I'd naturally lean

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 1:50 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 7:48 AM, Bob Hutchison hutch-li...@recursive.ca wrote: Haskell's STM transactions can be thought of as a form of IO action (like reading a file is an IO action) that modify refs (there are no atoms

Re: in Clojure I rarely find myself reaching for something like the state monad, as I would in Haskell

2014-05-19 Thread Bob Hutchison
On May 19, 2014, at 2:45 PM, Ben Wolfson wolf...@gmail.com wrote: On Mon, May 19, 2014 at 11:28 AM, Bob Hutchison hutch-li...@recursive.ca wrote: I badly miss the Maybe and Either monads, but would want the syntactic support Haskell provides (which I can't see will ever be available

implicit :required behavior in Tools.cli is deceptive

2014-05-15 Thread Bob Larrick
A single element in the cli-options can be as brief as [-p --port A port number] What is non-obvious is that specifying --port PORT has entirely different semantics than specifying --port In the first case the command lein run -p 3000 will result in an options map of {:options {:port

Re: Proposing a new Clojure documentation system (in Clojure)

2014-05-13 Thread bob
Any Result? Talk is cheap On Sunday, April 27, 2014 12:39:04 AM UTC+8, Val Waeselynck wrote: Hello to all, *Short version :* I think Clojure needs a documentation system in Clojure, I would like to know if some efforts exist in that direction, and I am willing to create it / contribute to

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
and much easier to understand. If you look carefully at your code the only part that isn't boiler-plate is the (assoc result-map key default) -- the boiler-plate corresponds closely to what reduce does. I hope this doesn't confuse you even more. Cheers, Bob Roelof -- You received

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
://clojuredocs.org/clojure_core/clojure.core/reduce is what you need. Cheers, Bob Roelof -- 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: Clojure equivalent of special common lisp vars: still looking for that zen place...

2014-05-03 Thread Bob Hutchison
transactions or actions for mutation. in the docs at http://clojure.org/special_forms#def which is roughly what you did with the atom. But it'll work. You can also just write it: (def ^:dynamic *x* (atom 1)) which is a little less verbose. Cheers, Bob Is that the simplest way to map between

Re: My experiments with concurrent programming

2014-04-13 Thread Bob Hutchison
, standard deviation and lower upper quintiles. It's a little slow, but you'll not be wasting your time dealing with strange JVM behaviour, and your benchmarks have a good chance of being representative. Anyway, have fun! Cheers, Bob -- You received this message because you are subscribed

Re: Clojure performance question

2014-03-02 Thread bob
Cool, Kiss. From my 2 cent, the solid is important to the clojure, and the core team is making any change carefully, but looks to me that the `radical` idea is important to the community and clojure as well, might that we need a branch of clojure to do some `radical` attempt and experiment, it

Re: Clojure performance question

2014-03-01 Thread bob
Case : clojure verison: (time (dotimes [n 1000] (str n another word))) ;; take about 5000msec java version long time = System.nanoTime(); for(int i=0 ; i1000 ;i++){ String a=i+another word; } System.out.println(System.nanoTime()-time);

Re: Clojure performance question

2014-03-01 Thread bob
Good point, Thanks a lot. Shall we improve the str fn in the core lib? From my point of view, the core fns should be performance sensitive. On Sunday, March 2, 2014 12:03:21 AM UTC+8, Shantanu Kumar wrote: On Saturday, 1 March 2014 15:32:41 UTC+5:30, bob wrote: Case : clojure

Re: A faster clojure startup

2014-02-28 Thread bob
Great, will it impact the runtime performance? On Friday, February 28, 2014 11:16:44 PM UTC+8, Gal Dolber wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- You received

Clojure performance question

2014-02-28 Thread bob
Hi, Can I ask a newbie question about clojure performance? What make clojure performance slow than java?, it seems clojure has the 1/4 performance compared to java in general, according to tests, some cases it might be 1/10. the reasons I can think out are - the byte code is not efficient

Question about map destrustures

2014-02-24 Thread bob
Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for example (a :k 1 :j 2), however now I have a map {:k 1 :j 2}, the question is how to convert the map to be accepted by a? Thanks -- You received this message because you are subscribed to the

Re: Question about map destrustures

2014-02-24 Thread bob
, Feb 24, 2014 at 10:34 PM, bob wee...@gmail.com javascript:wrote: Hi, There is a function a (defn a [ {:as m}] (println m)) it accepts pair of params , for example (a :k 1 :j 2), however now I have a map {:k 1 :j 2}, the question is how to convert the map to be accepted

Want a game? let's refactor in the functional way

2014-02-21 Thread bob
Hi, I have a lab project called raiseup https://github.com/weejulius/raiseup to play clojure , event though I have used clojure more than one year, but I still do not know how to write functional program,how to change my mind, therefore I plan to make a feature branch to refactor the project

Re: Want a game? let's refactor in the functional way

2014-02-21 Thread bob
I make a changehttps://github.com/weejulius/raiseup/commit/dfd15d0f0af007bc2899573e63e144620b12b432#commitcomment-5449992to refactor, is it more functional? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: [ANN]: Buddy 0.1.0-beta3: Authentication, Authorization Signing library for Clojure.

2014-02-15 Thread bob
Good library! On Monday, February 10, 2014 12:54:59 AM UTC+8, Andrey Antukh wrote: Hi! Buddy is an authentication, authorization and signing library for clojure, designed with simplicity in mind. Features / Sub libraries: * Modular Authentication (implemented using protocols). *

pretty-exception middleware for ring

2014-02-13 Thread bob
Hey, a simple exception middle-ware for ring, maybe useful for some,maybe none. it catch exceptions and print, meanwhile the source code produced the exception will be print as well. - The demo will stay here (click me)http://red-raiseup.rhcloud.com/notes/abc . - The source code is

Question about Reagent

2014-02-11 Thread bob
Hi All, I am new to react and reagent, the state is hard coded in the demo and tutorials, I am not sure how to retrieve data from server side and set to reagent? Thanks -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: [ANN] durable-queue: an in-process disk-backed queue

2014-02-07 Thread Bob Hutchison
of new tasks to be queued on the same queue (and likely on other queues too) - signal completion, and put the new tasks Cheers, Bob Zach P.S. If this sort of work is interesting to you, Factual is hiring: https://groups.google.com/forum/#!searchin/clojure/factual/clojure/8bPIEnNpfyQ/lvv

standard indentation tool

2014-01-27 Thread bob
Hi All, Should clojure have a standard format tool like go lang, it will waste time. Thanks -- -- 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

Re: core.async count in a channel

2014-01-21 Thread Bob Hutchison
On Jan 21, 2014, at 11:56 AM, Paul Viola vi...@highspot.com wrote: I think this is all well and good for a particular use of channel. So perhaps I am misusing channels?? To repeat: in one case I have workers pulling from a channel of real work. For various reasons this channel might

Re: [ANN] tools.analyzer(.jvm) 0.1.0-alpha1

2014-01-15 Thread bob
It seems tools.analyzer is to copy the analyzer of compiler from clojure, actually it is time to improve the error message and so on. On Saturday, January 11, 2014 9:23:56 AM UTC+8, Nicola Mometto wrote: Today I released the first version of the tools.analyzer[1] and tools.analyzer.jvm[2]

Re: Effects of diving into Clojure

2014-01-14 Thread Bob Hutchison
successful ideas is another. Not to mention abandoning everything you’ve attained through the learning of Ruby. Keep going back and forth until all that’s left is preference. Sorry for the pontificating :-) Cheers, Bob gvim -- -- You received this message because you are subscribed

Re: Effects of diving into Clojure

2014-01-14 Thread Bob Hutchison
On Jan 14, 2014, at 3:46 PM, gvim gvi...@gmail.com wrote: No, you're probably right. It's just that there never seem to be enough hours in a day/life :( You’re not alone there either :-) Cheers, Bob gvim On 14/01/2014 20:26, Bob Hutchison wrote: No it’s not just you. Hardly

Type hint using protocol

2014-01-12 Thread bob
Hi, Is it possible to add type hint (the type is protocol) to funs? for example: (defprotocol IProtocol (f1 [])) can we define fn like this? (defn ftest [^IProtocol arg] (.toString arg)) -- -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Type hint using protocol

2014-01-12 Thread bob
ask why would you want to do this? Are you hitting any reflection? Jim On 12/01/14 12:38, bob wrote: Hi, Is it possible to add type hint (the type is protocol) to funs? for example: (defprotocol IProtocol (f1 [])) can we define fn like this? (defn ftest

Re: Type hint using protocol

2014-01-12 Thread bob
Sure, here has a protocol named Storehttps://github.com/weejulius/raiseup/blob/master/diy/raiseup/src/cqrs/storage.clj , and will be used in this filehttps://github.com/weejulius/raiseup/blob/master/diy/raiseup/src/cqrs/eventstore.clj at line #14, the compiler tells me the warnings, forgot

Re: Type hint using protocol

2014-01-12 Thread bob
If I remove the dot, it cannot be compiled. can you give an example? On Sunday, January 12, 2014 9:22:00 PM UTC+8, Jim foo.bar wrote: I am suspecting you are calling the protocol implementations via the `.` form, whereas you should be going via the protocol itself (whatever namespace that

Re: Type hint using protocol

2014-01-12 Thread bob
Thanks for the big help, I treated the protocol as interface. :) On Sunday, January 12, 2014 9:38:12 PM UTC+8, Jim foo.bar wrote: It is not compiling because it cannot find the function...either fully qualify it like in my previous email or change your ns declaration to something like:

Re: Type hint using protocol

2014-01-12 Thread bob
Cool! learn a lot from you. thanks again. On Sunday, January 12, 2014 10:22:30 PM UTC+8, Jim foo.bar wrote: or even nicer: (map [this f] (let [^DBIterator iterator (doto (.iterator db) .seekToFirst)] (clojure.core/map #(apply f %) (iterator-seq iterator Ok I will stop now! :)

library development

2013-12-20 Thread Bob Hutchison
with it. I do not care if every developer on my team has to execute that command. I don’t care about sharing. I don’t care about naming. I just want to work on my library, install it, and use it in my other four projects. Running “cp -r” will do it, but it’s a bit crude. Thanks, Bob -- -- You

Re: library development

2013-12-20 Thread Bob Hutchison
just discovered that myself. I nice cup of tea and thinking “there’s no way these leiningen guys didn’t do something so obvious” led be to suck it up and poke around my maven repository to see what I could see. Maven’s getting pretty quick isn’t it? Cheers, Bob On Friday, December 20, 2013 9

Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison
either. However, the changes it makes to the namespaces are excellent! I tried updating both fireplace and clojure-static but that made no difference. Cheers, Bob -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: [ANN] Slamhound 1.5.0 + screencast + Vim plugin

2013-11-30 Thread Bob Hutchison
On Nov 30, 2013, at 10:59 AM, guns s...@sungpae.com wrote: On Sat 30 Nov 2013 at 09:29:30AM -0500, Bob Hutchison wrote: This is a great idea… but I’m having an awful time getting it to work. Hello Bob, I'm sorry to hear that setup is problematic. If it's trouble for you, it's bound

Question regarding core.async

2013-11-19 Thread bob
Hi, There are two fn, one is to spawn the channel and the other is to send the message to the channel, The problem is that if the time to handle the message(or command) is more than the specified timeout time, and then another messages are emitted to the channel before the channel finish

Re: Question regarding core.async

2013-11-19 Thread bob
I write a test to produce it,just run the fact several times quickly, and we can see that (println 3 v (java.util.Date.) only be executed one time. (defn handler [c] (go (let [] (loop [] (when-let [v (! c)] (println 2 (java.util.Date.)) (Thread/sleep 4000)

Re: [ANN] overload-middleware 0.1.1

2013-11-17 Thread Bob Hutchison
() * (Math.pow(4, response.collisionCount() - 1) * 100)), serviceStackRestConfig.maxDelayBetweenRetries Cheers, Bob On Nov 16, 2013, at 1:21 PM, Rob Day r...@rkd.me.uk wrote: Hi all, I've just published the first working version of a Ring middleware that some of you might find useful. It's designed

Re: is PG's imperative outside-in advice any good?

2013-10-15 Thread Bob Hutchison
of, is shadowing in a let statement, and I think you'll find this is frowned upon. So, is PG's advice any good? Yup. Cheers, Bob Thanks! Daniel -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure

Re: Sequential conditional transforms of an argument

2013-07-08 Thread Bob Hutchison
. Cheers, Bob Cheers, -- Laurent 2013/7/8 Yoshinori Kohyama yykohy...@gmail.com: Hi Laurent, How about a macro like below? (defmacro tt ([x] x) ([x ts tr more] `(tt (if (~ts ~x) (~tr ~x) ~x) ~@more))) To use this, (tt x test1 transform1 test2 transform2 test3 transform3

Re: What's the point of - ?

2013-03-11 Thread Bob Hutchison
and pasted correctly) and you can see a little better where this is going, especially if you tried putting real names in there. Is it imperative? Is it declarative? Who cares? Cheers, Bob -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: how would you implement sending out a verification email?

2013-02-21 Thread Bob Hutchison
the email request is received by the service -- there's a protocol for that. A decent service will do much better than you can do at making sure the email is sent. Cheers, Bob -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group

Re: Why is this so difficult?

2013-02-15 Thread Bob Hutchison
there :-) Cheers, Bob -- -- 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: Clojure + Web Services + Web Sockets

2013-02-11 Thread Bob Hutchison
/ Cheers, Bob If you have more details on the issue or alternatives I would love to hear about them. On Tuesday, February 12, 2013 12:54:53 AM UTC+2, Ryan T. wrote: Hello, I am trying to figure out how to setup my clojure project in order to be able to serve both normal http requests

Re: [ANN] jenkins-leiningen

2013-02-10 Thread Bob Foster
Is this version obsolete, i.e., replaced by your leiningen-plugin at https://github.com/jenkinsci/leiningen-plugin? I've seen several old broken links referring to it, and it is still in the Jenkins update center as jenkins-leiningen. Bob On Wednesday, July 18, 2012 7:23:50 AM UTC-7, Pierre

Re: Clojure web server benchmarks

2013-01-25 Thread Bob Hutchison
or so (I hope so), I think you'll be 'amused' by what you see. Cheers, Bob -- -- 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: [ANN] Formative - render, parse, and validate web forms

2013-01-16 Thread Bob Hutchison
come up with. Cheers, Bob Justin -- 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: [ANN] Formative - render, parse, and validate web forms

2013-01-16 Thread Bob Hutchison
the render-field and parse-input multimethods). Is that how you'd approach the problem? While I think of it, do you provide a way to validate that a value corresponds to one of the :options? Cheers, Bob Justin On Wednesday, January 16, 2013 8:35:54 AM UTC-5, hutch wrote: This is *really

Re: [ANN] nrepl-transcript

2013-01-15 Thread Bob Hutchison
On 2013-01-14, at 3:58 PM, Jonas jonas.enl...@gmail.com wrote: Hi I created a middleware for nrepl that saves a transcript of your repl interactions so you can go back and see what you did. https://github.com/jonase/nrepl-transcript Feedback welcome! Oh! Thank you! Bob Jonas

clojure for the java noob(while experienced functional programmers)?

2013-01-08 Thread bob zhang
Hi List, * * I am interested in learning clojure these days(mainly for the JVM), I am a long-term functional programmer(one of the maintainers of the ocaml compiler, designing my language Fan (a variant of ocaml which has the similar macro mechanism as clojure), quite familiar with common

Re: [ANN] sublime-lispindent, clojure indenting for sublime text 2

2012-11-25 Thread Bob Hutchison
Packages I did that too. You need to put it in: /Applications/Sublime Text 2.app/Contents/MacOS/Pristine Packages Cheers, Bob Also, will this work with the built in 'reindent' command? If not, will it work with vintage mode (you can reindent blocks with =ab from Vim)? I really wish

Re: Modelling for DAG with identity map - or not?

2012-09-18 Thread Bob Hutchison
in cells… you can see the mapping between them in your application (where the mapping doesn't work or is hard might be pointing at something quite interesting). There's also something called 'Cells' in Common Lisp that might be interesting. I'm not sure what's been done in Clojure. Cheers, Bob

classpath issues

2012-03-06 Thread Bob
to java so how can I check that class path is ok? I dont have any $CLASSPATH variable set AFAIK. I tried: export CLASSPATH=$CLASSPATH:/path to feedparser-clj-0.3.jar But that had no effect, still got same error in REPL. Thanks Bob -- You received this message because you are subscribed

Re: clojurescript: how do i copy one input text field to another?

2011-12-17 Thread bob
On Thu, Dec 15, 2011 at 5:12 PM, bob rditm...@gmail.com wrote: I new to clojurescript and i thought i would take a simple example likehttp://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick it has javascript that does the following: button onclick=document.getElementById

clojurescript: how do i copy one input text field to another?

2011-12-16 Thread bob
I new to clojurescript and i thought i would take a simple example like http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onclick it has javascript that does the following: button onclick=document.getElementById('field2').value=document.getElementById('field1').valueCopy Text/button i

Re: All subsets of a vector

2011-11-09 Thread Bob Shock
Or my current favorite take-while iterate combo: C:\clojure-1.2.0java -jar clojure.jar Clojure 1.2.0 user= (take-while seq (iterate rest [1 2 3 4])) ([1 2 3 4] (2 3 4) (3 4) (4)) user= (take-while seq (iterate butlast [1 2 3 4])) ([1 2 3 4] (1 2 3) (1 2) (1)) user= On Nov 9, 4:52 pm, Alex

Re: Newbie help in pitching in

2011-10-19 Thread Bob Shock
I would recommend adding examples to clojuredocs.org and adding new problems to 4clojure.com. On Oct 19, 4:32 pm, Rett Kent rett.k...@gmail.com wrote: Hi all, Now that I have my shiny new, clojure-dev membership, I'd like to pitch in.  I took a look at the pages describing how to contribute.

Re: How To Empty A Tree or Returning The Skelton of A Tree Without Leaves

2011-09-07 Thread Bob Shock
I am confused by your question. If you are looking for help on a 4clojure problem, you may post to the new Google 4clojure group (http://groups.google.com/group/4clojure). If not, please give more details on the skeleton of a tree problem and I'm sure someone here can help. On Sep 7, 3:38 pm,

Re: is there a 4Clojure forum anywhere?

2011-08-27 Thread Bob Shock
Hint: use the take function. On Aug 27, 8:45 pm, Shree Mulay shreemu...@gmail.com wrote: yeah, i'm stuck on the nth without cheating problem myself...  would be cool if there were forums for this site! :) -- You received this message because you are subscribed to the Google Groups Clojure

Re: is there a 4Clojure forum anywhere?

2011-08-26 Thread Bob Shock
Is there a recovery group for 4clojure.com addicts? Stop now! Don't go further before it's too late and you are checking the website every five minutes waiting for the next problem, obsessing over every character in your code so you can get one of the best code golf scores, etc. But seriously,

Re: Creating a map algorithmically

2011-08-09 Thread Bob Shock
user= (def n 5) #'user/n user= (zipmap (range 2 (inc n)) (repeat true)) {5 true, 4 true, 3 true, 2 true} user= As a start... On Aug 9, 10:50 am, Kevin Sookocheff kevin.sookoch...@gmail.com wrote: Hi, I have a question regarding the map data structure. I'm trying to program a Sieve of

Re: Enhanced Primitive Support Syntax

2011-01-17 Thread Bob Hutchison
is taking isn't persuasive, not to say it couldn't be made persuasive. I think I did add what might be considered an additional axis. Syntax. Specifically what annotations are needed and for what purpose. I don't think this should be dismissed out of hand. Cheers, Bob Stu Stuart

Re: Enhanced Primitive Support Syntax

2011-01-15 Thread Bob Hutchison
like every performance improvements makes the language more complex, uglier or both. Compiler switches were/are problematic too, but at least they are explicit and have to be *added*. Cheers, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://xampl.com/so

Re: How do I find implemented protocols in Clojure object?

2011-01-12 Thread Bob Hutchison
that can tell if something is a protocol if written directly in clojure, but does not work on the results from those methods. (defn protocol? [maybe-p] (boolean (:on-interface maybe-p))) Cheers, Bob -S clojure.com -- You received this message because you are subscribed to the Google

Re: Argument is not an array, in a function inside deftype

2010-12-30 Thread Bob Shock
I don't get any errors when I run your code. This is the output: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Are you sure you are using the latest Clojure 1.2 version and not an early beta, etc.? Process finished with exit code 0 On Dec 29, 11:25 pm, Jarl Haggerty

Weird result for (get max key)

2010-11-19 Thread Bob Shock
I had a bug in my code where I meant to type: (get map key) and instead typed: (get max key) It seems that any function name I put in for max always returns nil. user= (get max 3) nil user= (get min 3) nil user= (get maxx 3) java.lang.Exception: Unable to resolve symbol: maxx in this context

help to improve a multimethod with a vaguely interesting dispatch function

2010-11-15 Thread Bob Hutchison
on both values if the method exists, on the major value alone if it exists, and to the default if there's still no method. Can anyone see a better way of doing this? Thanks, Bob (declare can-we-not-do-better-dispatcher) (defmulti can-we-not-do-better (fn [major minor] (can-we-not-do-better

Re: ANN: Programothesis screencast series on Clojure, Emacs, etc

2010-11-12 Thread Bob Hutchison
, Emacs, Slime, etc. http://youtube.com/emailataskcom Thanks Scott. Nice idea, short to the point demonstrations of how things work. I am new to emacs so these are pretty handy. Cheers, Bob -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Python is way faster than Clojure on this task

2010-11-06 Thread Bob Hutchison
by the way the JVM increases the heap space. Setting min to max (and max big) pretty much took care of that issue. Cheers, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://xampl.com/so -- You received this message because you are subscribed to the Google

Re: Python is way faster than Clojure on this task

2010-11-06 Thread Bob Hutchison
(and, this is all I was suggesting here). Perhaps a hold over from earlier versions of the JVM but I don't personally care that much with my servers -- I have a machine dedicated to the application, it's got a lot of memory, use it. Might have a different attitude for a desktop app :-) Cheers, Bob

Re: Clojure on Javascript

2010-10-30 Thread Bob Hutchison
working? or Mongrel2/Ring/Clojure? or ZeroMQ/Ring/Clojure? or what? That's the kind of problem *I* am having to deal with. I should probably bring this up on the Clojure web dev mailing list. Cheers, Bob [1] and mootools and Google's Closure are making real progress with dealing with the DOM

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
that uses the swank I'm connected to? Is this even possible? Thanks *so* much in advance. Cheers, Bob In particular, SWANK/SLIME prints the value of the last expression in the evaluate region in the minibuffer. At least, that's what' it's always done for me. mike -- Mike Meyer m

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
with a 'y', then a success message. The only buffer created is *slime-events*. I'm on OSX with three versions of emacs that I can use, all three do exactly the same thing. That version incompatibility thing I've googled, nobody seems to think it matters. Cheers, Bob On Oct 5, 11:57 am, Bob

Re: Fighting with Emacs ;-)

2010-10-05 Thread Bob Hutchison
On 2010-10-05, at 3:51 PM, Phil Hagelberg wrote: On Tue, Oct 5, 2010 at 11:57 AM, Bob Hutchison hutch-li...@recursive.ca wrote: What do you mean by 'switch to the repl', in fact, how do you do that? I'm using lein swank, I can connect to it, I can evaluate expressions and get

Re: Why so?

2010-09-05 Thread Bob Shock
I've been programming in large OO applications since about 1993. One problem is that a lot of useful code gets buried way deep in an OO class hierarchy, where you are forced to create lots of intermediate objects just to get to the useful functions. This really hurts the re-usability, unit

Re: Thinking in Clojure

2010-09-03 Thread Bob Hutchison
:-) I strongly second the recommendation of the book Joy Of Clojure as a next thing to read (it's from Manning and you can get from their MEAP in pdf/epub formats) Cheers, Bob On Sep 3, 4:55 am, David Nolen dnolen.li...@gmail.com wrote: On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com

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

2010-08-15 Thread sponge bob
On 14 авг, 14:19, Steve Purcell st...@sanityinc.com wrote: A while ago I hooked Slime's completion and documentation features into the popular Emacs auto-completion framework auto-complete (http://www.emacswiki.org/emacs/AutoComplete). Since it may be of interest to others, I've released

Re: usage examples in clojure api docs

2010-07-02 Thread Bob Tolbert
I'm very new here but I have to say I really like this. These kind of usage examples are the most helpful resource for newcomers. I'll be happy to contribute once I learn more. Bob On Jul 2, 2010, at 16:46, Justin Kramer jkkra...@gmail.com wrote: Partly in response to this issue and partly

Re: Question about 'chains' of derefs a request for better ideas

2010-04-05 Thread Bob Hutchison
To unsubscribe, reply using remove me as the subject. Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://xampl.com/so -- 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

Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
: (dosync (ref-set my-thing (delay my-updated-thing))) Is the the way to do it? Is there something better I could be doing? Something deref-able that I'm missing that is better suited than delay? Some kind of deref-all-the-way function? Thanks, Bob Bob Hutchison Recursive Design Inc. http

Re: Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
. That's really interesting. Thanks so much! Now I'll go think about it some more :-) Cheers, Bob -Per On Sun, Apr 4, 2010 at 9:35 PM, Bob Hutchison hutch-li...@recursive.ca wrote: Hi, I have a situation where: 1) I have a lot of 'values' that are both expensive to compute and quite

Re: Question about 'chains' of derefs a request for better ideas

2010-04-04 Thread Bob Hutchison
an illusion maybe, but useful) Anyway, looks like this'll work well. Cheers, Bob -Per On Sun, Apr 4, 2010 at 9:35 PM, Bob Hutchison hutch-li...@recursive.ca wrote: Hi, I have a situation where: 1) I have a lot of 'values' that are both expensive to compute and quite large (they aren't

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 12:17 PM, Laurent PETIT wrote: 2009/12/6 Bob Hutchison hutch-li...@recursive.ca On 6-Dec-09, at 3:46 PM, Meikel Brandmeyer wrote: Hi, Am 06.12.2009 um 21:29 schrieb Bob Hutchison: It turns out that dispatching on play.foo.Foo is the only way that works. I was hoping

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 4:16 PM, ataggart wrote: On Dec 7, 12:37 pm, Bob Hutchison hutch-li...@recursive.ca wrote: On 7-Dec-09, at 12:17 PM, Laurent PETIT wrote: 2009/12/6 Bob Hutchison hutch-li...@recursive.ca Yes! Thanks! The dispatch on type rather than class is the trick. I actually ended up

Re: The new deftype and multimethod dispatching

2009-12-07 Thread Bob Hutchison
On 7-Dec-09, at 4:05 PM, Meikel Brandmeyer wrote: Hi, Am 07.12.2009 um 21:37 schrieb Bob Hutchison: Please note that in clojure, it's the dispatch on the class that's the trick, not on the type ;-) Sorry, I don't understand what you mean. Could you expand on that a bit? Dispatch

The new deftype and multimethod dispatching

2009-12-06 Thread Bob Hutchison
the namespace harder than it should be. If someone could help me out I'd appreciate it. Thanks, Bob Bob Hutchison Recursive Design Inc. http://www.recursive.ca/ weblog: http://www.recursive.ca/hutch -- You received this message because you are subscribed to the Google Groups Clojure group

  1   2   >